home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.utils.bug
- Path: sparky!uunet!cis.ohio-state.edu!fid.morgan.COM!ber
- From: ber@fid.morgan.COM (Brian Redman)
- Subject: problem with included makefiles
- Message-ID: <9212310147.AA04155@Morgan.COM>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Wed, 30 Dec 1992 15:47:47 GMT
- Approved: bug-gnu-utils@prep.ai.mit.edu
- Lines: 39
-
- 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
-
-