[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automake Digest, Vol 175, Issue 3
From: |
Kip Warner |
Subject: |
Re: Automake Digest, Vol 175, Issue 3 |
Date: |
Thu, 07 Sep 2017 18:23:55 -0700 |
On Tue, 2017-09-05 at 18:57 -0400, Nick Bowler wrote:
> If your only uses of the directoryless-filenames are in rules, then
> just write the names including directories in the make variables,
> then strip off the directory components inside the rule. In rules
> you can use the much more powerful shell constructs.
Hey Nick.
> Example:
>
> % cat >Makefile <<'EOF'
> FOO = a b/c d/e/f
>
> my_rule:
> for i in $(FOO); do \
> case $$i in */*) i=`expr "$$i" : '.*/\(.*\)'`; esac; \
> printf '%s\n' "$$i"; \
> done
> EOF
> % make my_rule
> a
> c
> f
This would work beautifully, except the short version of the file names
has to be computed in advance for the _SOURCES Automake primary as
Thomas hinted at. I'm not sure how Automake parses those variables, but
I'm assuming they have to be computed in advance if you're also using
them outside of a rule.
--
Kip Warner | Senior Software Engineer
OpenPGP signed/encrypted mail preferred
http://www.thevertigo.com
signature.asc
Description: This is a digitally signed message part
- Re: Automake Digest, Vol 175, Issue 3, Kip Warner, 2017/09/05
- Re: Automake Digest, Vol 175, Issue 3, Nick Bowler, 2017/09/05
- Re: Automake Digest, Vol 175, Issue 3, Thomas Jahns, 2017/09/07
- Re: Automake Digest, Vol 175, Issue 3, Kip Warner, 2017/09/07
- Re: Automake Digest, Vol 175, Issue 3, Václav Haisman, 2017/09/08
- Re: Automake Digest, Vol 175, Issue 3, Kip Warner, 2017/09/08
- Re: Automake Digest, Vol 175, Issue 3,
Kip Warner <=