home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / utils / bug / 2287 < prev    next >
Encoding:
Text File  |  1992-12-31  |  2.1 KB  |  52 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!fid.morgan.COM!ber
  3. From: ber@fid.morgan.COM (Brian Redman)
  4. Subject: problem with included makefiles
  5. Message-ID: <9212310147.AA04155@Morgan.COM>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 30 Dec 1992 15:47:47 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 39
  12.  
  13. I appreciate GNU make, your past and continuing efforts.
  14.  
  15. I compiled version 3.62 on an rs6000 running AIX 3.2.  Here is my Makefile:
  16.  
  17.  
  18. yomomma:
  19.     echo yomomma
  20.  
  21. include /dev/null
  22.  
  23. The documentation doesn't seem to point out that GNU make attempts to
  24. "make" all the included files before it begins processing targets.
  25. Not only that, it appears to try to make them in the reverse of the order
  26. they're included.
  27. In the above example I would expect "yomomma" to be executed before
  28. /dev/null was read.  This is a trivial example but the problem came
  29. about when I wanted to simulate the behavior of sunos's .INIT target.
  30. On sunos 4.1.3 make, .INIT is the first target processed and in my application
  31. it makes the file which I want to include.  Specifically I'm using imake
  32. to make imake.  (you can stop reading here, I'll understand)
  33.  
  34. The file I want to include depends on Makefile.  Unfortuately (in this case)
  35. imake sees to it that Makefile depends on the program I want to build (in this
  36. case imake).  My .c.o rules try to place the binary in a machine specific
  37. subdirectory.  The rub is that that subdirectory is created by the first
  38. dependency (the thing I'm trying to do to simulate .INIT).  But the first
  39. dependency isn't made first.  The last included file is made first.  Catch-22.
  40.  
  41. The first paragraph of section 3.1 suffers from serious omissions.  The
  42. first thing make (possibly before reading the makefile) does is try to
  43. make the makefile, then before processing the first rule it tries to
  44. make the included files.
  45. I think the documentation ought to discuss more thoroughly how include files
  46. are handled.  My thought is to append "include .INIT" to the end
  47. of the Makefile.  Not elegant but maybe it'll work.
  48.  
  49.  
  50.     brian redman
  51.  
  52.