Re: define strangeness

2004-04-19 Thread Boris Kolpackov
I see you are running make time-slice ;-) Paul D. Smith <[EMAIL PROTECTED]> writes: > bk> No, I think it should handle newline-backslash sequence the same > bk> way everywhere, including inside "define". > > Hm. But, make already doesn't handle backslash/newline the same way > everywhere;

Re: [PATCH] pattern-specific variable expansion

2004-04-19 Thread Boris Kolpackov
Paul D. Smith <[EMAIL PROTECTED]> writes: > bk> In contrast the patch fixes the following case: > > bk> a := A > > bk> %bar : a_ := $a > > bk> %bar :; @echo $(a_) > > bk> a := B > > bk> foobar: > > bk> Which prints (without patch) B. > > I want to point out that I think we

Re: define strangeness

2004-04-19 Thread Paul D. Smith
%% Boris Kolpackov <[EMAIL PROTECTED]> writes: bk> No, I think it should handle newline-backslash sequence the same bk> way everywhere, including inside "define". Hm. But, make already doesn't handle backslash/newline the same way everywhere; in command scripts the backslash/newline is not r

Re: [PATCH] order-only prerequisite ends up in $

2004-04-19 Thread Paul D. Smith
%% Noel Yap <[EMAIL PROTECTED]> writes: ny> Paul D. Smith wrote: >> %% Boris Kolpackov <[EMAIL PROTECTED]> writes: bk> If you expect it to print >> bk> %r: | baz >> bk> then look in read.c line 537. The dumping code simply does not bk> distinguish between normal and order-only

Re: [PATCH] order-only prerequisite ends up in $

2004-04-19 Thread Noel Yap
Paul D. Smith wrote: %% Boris Kolpackov <[EMAIL PROTECTED]> writes: bk> If you expect it to print bk> %r: | baz bk> then look in read.c line 537. The dumping code simply does not bk> distinguish between normal and order-only prerequisites. ITYM rule.c. I have a fix for this already b

Re: [PATCH] pattern-specific variable expansion

2004-04-19 Thread Paul D. Smith
%% Boris Kolpackov <[EMAIL PROTECTED]> writes: bk> In contrast the patch fixes the following case: bk> a := A bk> %bar : a_ := $a bk> %bar :; @echo $(a_) bk> a := B bk> foobar: bk> Which prints (without patch) B. I want to point out that I think we already discussed this bef

Re: [PATCH] pattern-specific variable expansion

2004-04-19 Thread Noel Yap
Paul D. Smith wrote: %% Noel Yap <[EMAIL PROTECTED]> writes: ny> Hmmm, I ran into something similar in which: ny> a := A ny> bar: ny>@echo $a ny> a := B ny> would output B. Of course. As expected. Command scripts are not expanded until they are about to be invoked by make,

Re: [PATCH] order-only prerequisite ends up in $

2004-04-19 Thread Paul D. Smith
%% Boris Kolpackov <[EMAIL PROTECTED]> writes: bk> ___ bk> Bug-make mailing list bk> [EMAIL PROTECTED] bk> http://mail.gnu.org/mailman/listinfo/bug-make Boris, what email client do you use? It's so bizarre; it always puts the body of your messa

Re: [PATCH] order-only prerequisite ends up in $

2004-04-19 Thread Boris Kolpackov
Noel Yap <[EMAIL PROTECTED]> writes: > Once this patch is installed, does "gmake -npqr | grep '%r:'" output the > proper thing? If so, I suspect this patch will fix much of the odd > behaviour I've seen with regards to implicit rules and order rules. Well, it depends what is "proper thing"? Wi

Re: [PATCH] pattern-specific variable expansion

2004-04-19 Thread Paul D. Smith
%% Noel Yap <[EMAIL PROTECTED]> writes: ny> Hmmm, I ran into something similar in which: ny> a := A ny> bar: ny> @echo $a ny> a := B ny> would output B. Of course. As expected. Command scripts are not expanded until they are about to be invoked by make, which is well after all

Re: [PATCH] pattern-specific variable expansion

2004-04-19 Thread Boris Kolpackov
Noel Yap <[EMAIL PROTECTED]> writes: > Hmmm, I ran into something similar in which: > > a := A > > bar: > @echo $a > > a := B > > > would output B. This is correct behavior as per manual. If you want it to print A then write something like bar: a_ := $a # not sure a := $a will

Re: [PATCH] pattern-specific variable expansion

2004-04-19 Thread Noel Yap
Hmmm, I ran into something similar in which: a := A bar: @echo $a a := B would output B. Does this patch fix this as well? Thanks, Noel Boris Kolpackov wrote: Good day, The following makefile prints 'B' instead of 'A'. a := A %bar : arg := $a %bar : ; @echo $(arg) a := B foobar:

Re: [PATCH] order-only prerequisite ends up in $

2004-04-19 Thread Noel Yap
Once this patch is installed, does "gmake -npqr | grep '%r:'" output the proper thing? If so, I suspect this patch will fix much of the odd behaviour I've seen with regards to implicit rules and order rules. Thanks, Noel Boris Kolpackov wrote: Good day, The following makefile prints "baz foo ba

Re: [PATCH] order-only prerequisite ends up in $

2004-04-19 Thread Paul D. Smith
Good stuff; thanks Boris. -- --- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am

[PATCH] order-only prerequisite ends up in $

2004-04-19 Thread Boris Kolpackov
Good day, The following makefile prints "baz foo baz" instead of "foo foo baz". %r: | baz @echo $< $^ $| bar: foo foo:;@: baz:;@: In command.c in function set_file_variables $< is initialized with the first prerequisite. While in most cases this would be a normal prerequisite in ca