home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / gcc / bug / 2231 < prev    next >
Encoding:
Text File  |  1992-09-01  |  3.0 KB  |  82 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!ms.UKy.EDU!kherron
  3. From: kherron@ms.UKy.EDU (Kenneth Herron)
  4. Subject: Gcc 2.2.2 Makefile (three problems)
  5. Message-ID: <9209011731.aa26058@s.s.ms.uky.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: University Of Kentucky, Dept. of Math Sciences
  8. Distribution: gnu
  9. Date: Tue, 1 Sep 1992 17:31:43 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 69
  12.  
  13. The FIRST problem:
  14.  
  15. Gcc's INSTALL document contains these comments:
  16.  
  17.        make CC="stage2/gcc -Bstage2/" CFLAGS="-g -O" install LANGUAGES="LIST"
  18.  
  19.      (Use the same value for `CC', `CFLAGS' and `LANGUAGES' that you
  20.      used when compiling the files that are being installed.  One
  21.      reason this is necessary is that some versions of Make have bugs
  22.      and recompile files gratuitously when you do this step.  If you
  23.      use the same variable values, those files will be recompiled
  24.      properly.
  25. [...]
  26.      On some systems, this command will cause recompilation of some
  27.      files. This is usually due to bugs in `make'.  You should either
  28.      ignore this problem, or use GNU Make.
  29.  
  30. Well, I AM using gnu make (v. 3.60) and under gmake -n, gmake acts as
  31. if it will recompile everything.  When run without -n, doesn't actually 
  32. recompile anything, but it clearly thinks some targets are out of date, 
  33. cc1 for example.
  34.  
  35. I traced the problem to the various insn-* rules, eg:
  36.  
  37.     insn-config.h: stamp-config ;
  38.     stamp-config : md genconfig $(srcdir)/move-if-change
  39.         ./genconfig md > tmp-config.h
  40.         $(srcdir)/move-if-change tmp-config.h insn-config.h
  41.         touch stamp-config
  42.  
  43. >From these two rules, insn-config.h is always out of date, since its
  44. dependency is built after it is.  Several things list insn-* files
  45. as dependencies so they get rebuilt after the (empty) ruleset for
  46. insn-config.h runs.  I'd go so far as to say that gnu make is buggy
  47. for not actually performing the compiles it says are needed when run
  48. with -n.
  49.  
  50. It seems either of these two changes avoid this problem:
  51.  
  52.         insn-config.h: stamp-config
  53.         sleep 1; touch insn-config.h
  54.         stamp-config : md genconfig $(srcdir)/move-if-change
  55.                 ./genconfig md > tmp-config.h
  56.                 $(srcdir)/move-if-change tmp-config.h insn-config.h
  57.                 touch stamp-config
  58.  
  59.         insn-config.h: stamp-config
  60.         stamp-config : md genconfig $(srcdir)/move-if-change
  61.                 ./genconfig md > tmp-config.h
  62.                 $(srcdir)/move-if-change tmp-config.h insn-config.h
  63.                 touch stamp-config && sleep 1 && touch insn-config.h
  64.  
  65.  
  66. The SECOND problem:
  67.  
  68. When run with gnu make, a bogus 
  69.  
  70.     cat install.sh > install
  71.  
  72. command pops up at the end of "make install".  I believe this is coming
  73. from a builtin rule since there's no such command in the makefile.
  74.  
  75. The THIRD problem:
  76.  
  77. The ruleset for install-limits-h writes to the source directory.  It would
  78. be nice if one could make install from a read-only filesystem or without
  79. write permission to the current directory.  I fixed it here by putting
  80. tmp-limits.h in /tmp.
  81.  
  82.