in reply to Re: A bug in GNU make ?
in thread A bug in GNU make ?

Maybe something like (untested): PATH = $(PATH);build

I had already tried that, and found it to not work:
Makefile:1160: *** Recursive variable 'PATH' references itself (eventu +ally). Stop.
However, encouraged by your suggestion, I went back to it and found that either of the following 2 options do the job as intended:
PATH := $(PATH);build PATH := ${PATH};build
Does it seem right that both of those bracket types are acceptable ?

I've gone with altering the appropriate line in the Makefile.PL to:
$inherited =~ s/($target)/.IMPORT: PATH\nPATH := \$(PATH);build\n.EXPO +RT: PATH\n$1/;
I think I'll file a Glib::Object::Introspection bug report, suggesting that this change to the Makefile.PL be made.
Still interested in hearing opinions regarding the correctness of the way gmake interprets the current form.. (Already answered in the affirmative ... pay attention, Rob ;-)

Thanks again, swl.

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: A bug in GNU make ?
by swl (Prior) on Aug 27, 2023 at 22:39 UTC

    Does it seem right that both of those bracket types are acceptable ?

    The manual states both bracket types are acceptable. I haven't looked into any history behind it, though.

    And for those wondering about the different assignments operators in GNU make, the := is equivalent to assignment operators in most languages in that variables are evaluated at the time of assignment. Make's = operator defers evaluation until use, which is why Rob's case hit the recursion error. More details are in the linked manual chapter (which I only just read so this is all new to me).