🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Kenneth Herron Tue, 01 Sep 1992 17:31
Gcc 2.2.2 Makefile (three problems)
#1037
Author: Kenneth Herron
Date: Tue, 01 Sep 1992 17:31
68 lines
3107 bytes
The FIRST problem:

Gcc's INSTALL document contains these comments:

       make CC="stage2/gcc -Bstage2/" CFLAGS="-g -O" install LANGUAGES="LIST"

     (Use the same value for `CC', `CFLAGS' and `LANGUAGES' that you
     used when compiling the files that are being installed.  One
     reason this is necessary is that some versions of Make have bugs
     and recompile files gratuitously when you do this step.  If you
     use the same variable values, those files will be recompiled
     properly.
[...]
     On some systems, this command will cause recompilation of some
     files. This is usually due to bugs in `make'.  You should either
     ignore this problem, or use GNU Make.

Well, I AM using gnu make (v. 3.60) and under gmake -n, gmake acts as
if it will recompile everything.  When run without -n, doesn't actually 
recompile anything, but it clearly thinks some targets are out of date, 
cc1 for example.

I traced the problem to the various insn-* rules, eg:

	insn-config.h: stamp-config ;
	stamp-config : md genconfig $(srcdir)/move-if-change
		./genconfig md > tmp-config.h
		$(srcdir)/move-if-change tmp-config.h insn-config.h
		touch stamp-config

>From these two rules, insn-config.h is always out of date, since its
dependency is built after it is.  Several things list insn-* files
as dependencies so they get rebuilt after the (empty) ruleset for
insn-config.h runs.  I'd go so far as to say that gnu make is buggy
for not actually performing the compiles it says are needed when run
with -n.

It seems either of these two changes avoid this problem:

        insn-config.h: stamp-config
		sleep 1; touch insn-config.h
        stamp-config : md genconfig $(srcdir)/move-if-change
                ./genconfig md > tmp-config.h
                $(srcdir)/move-if-change tmp-config.h insn-config.h
                touch stamp-config

        insn-config.h: stamp-config
        stamp-config : md genconfig $(srcdir)/move-if-change
                ./genconfig md > tmp-config.h
                $(srcdir)/move-if-change tmp-config.h insn-config.h
                touch stamp-config && sleep 1 && touch insn-config.h


The SECOND problem:

When run with gnu make, a bogus 

	cat install.sh > install

command pops up at the end of "make install".  I believe this is coming
from a builtin rule since there's no such command in the makefile.

The THIRD problem:

The ruleset for install-limits-h writes to the source directory.  It would
be nice if one could make install from a read-only filesystem or without
write permission to the current directory.  I fixed it here by putting
tmp-limits.h in /tmp.
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