help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue w/ statements that work in some versions of Make and not 3.77


From: Rick Flower
Subject: Issue w/ statements that work in some versions of Make and not 3.77
Date: Mon, 5 Nov 2007 19:19:35 -0800 (PST)
User-agent: SquirrelMail/1.4.10a

Hi all..

We've got a mixed environment here and have Make 3.74. Make 3.77 and Make
3.81.. I've got the following statements that are accepted (w/o
complaining) by Make 3.74 and also 3.81 but elicit errors from 3.74.. Any
ideas on what its complaining about?

# Given ${stubname} set to the fully qualified pathname of the stub,
expand to
# the rule that should be eval'ed when the rule is triggered:
define link-rule
$$(notdir $$(filter ${stubname},$${TESTSTUB_SOURCES})): %: ${stubname}
        ln -sf $$< $$@
endef

$(foreach stubname,$(TESTSTUB_SOURCES),$(eval ${link-rule}))


Below is what Make 3.77 spits out when chewing on this file:

% /usr/local/bin/make clean all
/export/home/mylogin/foo/Makefile-targets.mak:141: *** missing separator. 
Stop.

Interestingly enough, when using the above code w/ Make 3.74 it doesn't
really work as compared to 3.81.. In 3.81, it generates implicit rules
which then build the required sym-links followed by a compile, but 3.74
seems to get lost (but doesn't complain).. Is the above somehow wrong for
3.77 (is there an alternate that might work for that version?).. I'm not
sure if we'll be able to upgrade or not (long story).  Thanks!

-- Rick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]