Hi Noel,
> Since there is a workaround, simplifying GNU make in this respect
> isn't worth it.
Speaking of workaround, having the following implicit rule
%/. :
@mkdir $*
you cannot just write
foo : bar/
instead you will have to write
foo : bar/.
which is quite ugly and unnatural.
Noel Yap wrote:
> It's even uglier when you're dealing with macros:
>
> $(FOO): $(dir $(FOO)).
Correction, this should be:
$(FOO): | $(dir $(FOO)).
Noel
--
NOTICE: If received in error, please destroy and notify sender. Sender does not waive
confidentiality or privilege, and use is prohibite
Boris Kolpackov wrote:
>
> Hi Noel,
>
> > Since there is a workaround, simplifying GNU make in this respect
> > isn't worth it.
>
> Speaking of workaround, having the following implicit rule
>
> %/. :
> @mkdir $*
>
> you cannot just write
>
> foo : bar/
>
> instead you will have to w
Hi Paul,
> It's done so that if you write:
>
> foo: bar/
>
> in one place in your makefile, and:
>
> bar: biz
>
> another place, and:
>
> boz: $(CURDIR)/bar
>
> in a third place, make realizes they are all the same target and won't
> try to build them multiple times (or, say "do
"Paul D. Smith" wrote:
> It's done so that if you write:
>
> foo: bar/
>
> in one place in your makefile, and:
>
> bar: biz
>
> another place, and:
>
> boz: $(CURDIR)/bar
>
> in a third place, make realizes they are all the same target and won't
> try to build them multiple times
%% Boris Kolpackov <[EMAIL PROTECTED]> writes:
bk> Hi Paul,
>> GNU make strips trailing slashes, so that "foo/" and "foo" are
>> considered the same prerequisite.
bk> Is it because make just does it this way or there is some deep
bk> reason for that?
It's done so that if you write:
Hi Paul,
> GNU make strips trailing slashes, so that "foo/" and "foo" are
> considered the same prerequisite.
Is it because make just does it this way or there is some deep
reason for that?
For example, $(dir) does not strip the trailing slash. Oh, but $(@D)
does...
> You can get your makefile
"Paul D. Smith" wrote:
> GNU make strips trailing slashes, so that "foo/" and "foo" are
> considered the same prerequisite.
Is there any reason, other than backwards compatibility, to keep this particular
feature? I find it a bit annoying although the workaround is feasible.
Thanks,
Noel
--
NO
%% Boris Kolpackov <[EMAIL PROTECTED]> writes:
bk> I was wondering if there is a valid reason for the following makefile
bk> not to work.
bk> hello : | foo/
bk> hello :
bk> @echo hello
bk> %/ :
bk> mkdir $*
GNU make strips trailing slashes, so that "foo/" and "foo" are
consid
Good day,
I was wondering if there is a valid reason for the following makefile
not to work.
hello : | foo/
hello :
@echo hello
%/ :
mkdir $*
thanks,
-boris
signature.asc
Description: Digital signature
___
Bug-make mailing list
[EMA
10 matches
Mail list logo