🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #153

make

#153
From: G|ran Uddeborg
Date: Wed, 15 Apr 1992 18:54
28 lines
1225 bytes
I tried to make a number of dependencies using foreach and other
functions, but I failed because make obviously doesn't parse the
makefile in the order I'd expected.  If this qualifies as a bug or
not, I'm not sure.  Perhaps the documentation could clarify how
variables are expanded in this case, though.  I couldn't find it
there, but had to find out through experimentation.

Much simplified, I tried a Makefile looking like this:

	define deps
	apa: /usr
	bepa: /etc

	endef
	$(deps)

I hoped to make two dependencies this way, one for "apa" and one for
"bepa".  Turns out, however, that it interpretes it as a static
pattern rule, with the target-pattern containing the newline.  More
precisely, my make says

	Makefile:5: target pattern contains no `%'.  Stop.

This happened on

SunOS 4.1.2
SparcStation SLC
make 3.62
Technical Details
Message-ID: <199204151454.AA24435@gustaf.sisu.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!sisug.sisu.SE!uddeborg

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!sisug.sisu.SE!uddeborg
From: uddeborg@sisug.sisu.SE (G|ran Uddeborg)
Subject: make
Message-ID: <199204151454.AA24435@gustaf.sisu.se>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 15 Apr 1992 18:54:07 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 29