🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Brian Redman Wed, 30 Dec 1992 15:47
problem with included makefiles
#1184
Author: Brian Redman
Date: Wed, 30 Dec 1992 15:47
38 lines
2153 bytes
I appreciate GNU make, your past and continuing efforts.

I compiled version 3.62 on an rs6000 running AIX 3.2.  Here is my Makefile:


yomomma:
	echo yomomma

include /dev/null

The documentation doesn't seem to point out that GNU make attempts to
"make" all the included files before it begins processing targets.
Not only that, it appears to try to make them in the reverse of the order
they're included.
In the above example I would expect "yomomma" to be executed before
/dev/null was read.  This is a trivial example but the problem came
about when I wanted to simulate the behavior of sunos's .INIT target.
On sunos 4.1.3 make, .INIT is the first target processed and in my application
it makes the file which I want to include.  Specifically I'm using imake
to make imake.  (you can stop reading here, I'll understand)

The file I want to include depends on Makefile.  Unfortuately (in this case)
imake sees to it that Makefile depends on the program I want to build (in this
case imake).  My .c.o rules try to place the binary in a machine specific
subdirectory.  The rub is that that subdirectory is created by the first
dependency (the thing I'm trying to do to simulate .INIT).  But the first
dependency isn't made first.  The last included file is made first.  Catch-22.

The first paragraph of section 3.1 suffers from serious omissions.  The
first thing make (possibly before reading the makefile) does is try to
make the makefile, then before processing the first rule it tries to
make the included files.
I think the documentation ought to discuss more thoroughly how include files
are handled.  My thought is to append "include .INIT" to the end
of the Makefile.  Not elegant but maybe it'll work.


	brian redman
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads