This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: A patch for Makefile.in
- To: law at cygnus dot com
- Subject: Re: A patch for Makefile.in
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 26 Jun 1998 10:36:02 -0400 (EDT)
- Cc: egcs-patches at cygnus dot com
> From: Jeffrey A Law <law@hurl.cygnus.com>
>
> In message <199806220146.VAA10957@caip.rutgers.edu>you write:
> > Rather than do this, wouldn't it be easier to maintain if you
> > created $(EXPR_H) which expanded to "expr.h insn-codes.h"? (Similar to
> > how TREE_H/RTL_H are handled.) Then you replace all dependencies on
> > expr.h with $(EXPR_H).
>
> I'll happily accept this change if someone cobbles it together.
> jeff
Okay, here are changes to use a variable, EXPR_H, set to
"expr.h insn-codes.h" to calculate dependencies for .c files which
include expr.h. In cases where the .c file included insn-codes.h
itself, I didn't remove the dependency. But if insn-codes.h was only
obtained through expr.h then I did remove it.
I also did the cp/ directory. The f/ didn't seem to need it.
In addition, I fixed a couple of places where dependencies
listed explicit headers rather than variables, for TREE_H, RECOG_H and
BASIC_BLOCK_H.
--Kaveh
Wed Jun 24 10:35:13 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (EXPR_H): New dependency variable.
(c-typeck.o): Depend on $(EXPR_H) instead of expr.h.
(c-iterate.o): Likewise.
(gencheck): Depend on $(TREE_H) instead of tree.h, etc.
(stor-layout.o): Depend on $(EXPR_H) instead of expr.h.
(toplev.o): Likewise. Also depend on $(RECOG_H) instead of recog.h.
(varasm.o): Depend on $(EXPR_H) instead of expr.h.
(function.o): Likewise.
(stmt.o): Likewise.
(except.o): Likewise.
(expr.o): Likewise.
(calls.o): Likewise.
(expmed.o): Likewise.
(explow.o): Likewise.
(optabs.o): Likewise.
(sdbout.o): Likewise.
(dwarf2out.o): Likewise.
(emit-rtl.o): Likewise.
(integrate.o): Likewise.
(jump.o): Likewise.
(cse.o): Likewise.
(gcse.o): Likewise. Also depend on $(BASIC_BLOCK_H) instead of
basic-block.h.
(loop.o): Depend on $(EXPR_H) instead of expr.h.
(unroll.o): Likewise.
(combine.o): Likewise.
(reload.o): Likewise.
(reload1.o): Likewise.
(caller-save.o): Likewise.
(reorg.o): Likewise.
(alias.o): Don't depend on insn-codes.h.
(regmove.o): Depend on $(RECOG_H)/$(EXPR_H) instead of recog.h/expr.h.
(insn-emit.o): Depend on $(EXPR_H) instead of expr.h.
(insn-opinit.o): Likewise.
diff -rup orig/egcs-CVS19980623/gcc/Makefile.in egcs-CVS19980623/gcc/Makefile.in
--- orig/egcs-CVS19980623/gcc/Makefile.in Tue Jun 23 14:21:45 1998
+++ egcs-CVS19980623/gcc/Makefile.in Tue Jun 23 13:55:34 1998
@@ -717,6 +717,7 @@ TREE_H = tree.h real.h tree.def gansidec
BASIC_BLOCK_H = basic-block.h bitmap.h
DEMANGLE_H = demangle.h gansidecl.h
RECOG_H = recog.h gansidecl.h
+EXPR_H = expr.h insn-codes.h
#
# Language makefile fragments.
@@ -1265,7 +1266,7 @@ $(srcdir)/c-gperf.h: c-parse.gperf
c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \
output.h toplev.h
c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h \
- output.h expr.h insn-codes.h $(RTL_H) toplev.h
+ output.h $(EXPR_H) $(RTL_H) toplev.h
c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h toplev.h \
output.h
c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \
@@ -1276,7 +1277,7 @@ c-convert.o : c-convert.c $(CONFIG_H) sy
c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) except.h \
function.h defaults.h c-pragma.h toplev.h
c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \
- flags.h toplev.h expr.h insn-codes.h
+ flags.h toplev.h $(EXPR_H)
collect2$(exeext): collect2.o tlink.o hash.o cplus-dem.o underscore.o \
version.o choose-temp.o $(LIBDEPS)
@@ -1335,7 +1336,7 @@ s-check : tree.def gencheck $(srcdir)/mo
$(srcdir)/move-if-change tmp-check.h tree-check.h
touch s-check
-gencheck : gencheck.o tree.h tree.def $(HOST_LIBDEPS)
+gencheck : gencheck.o $(TREE_H) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
gencheck.o $(HOST_LIBS)
@@ -1358,11 +1359,11 @@ convert.o: convert.c $(CONFIG_H) $(TREE_
tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h except.h
print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H)
stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
- function.h expr.h insn-codes.h $(RTL_H) toplev.h except.h
+ function.h $(EXPR_H) $(RTL_H) toplev.h except.h
fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
- insn-codes.h insn-config.h recog.h Makefile toplev.h dwarfout.h \
+ insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h dwarfout.h \
dwarf2out.h sdbout.h dbxout.h \
$(lang_options_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
@@ -1375,72 +1376,72 @@ print-rtl.o : print-rtl.c $(CONFIG_H) sy
rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H)
varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
- function.h defaults.h insn-codes.h expr.h hard-reg-set.h regs.h \
+ function.h defaults.h $(EXPR_H) hard-reg-set.h regs.h \
xcoffout.h output.h c-pragma.h toplev.h except.h dbxout.h sdbout.h
function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
- function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \
+ function.h insn-flags.h insn-codes.h $(EXPR_H) regs.h hard-reg-set.h \
insn-config.h $(RECOG_H) output.h toplev.h except.h
stmt.o : stmt.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \
- insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h except.h \
+ insn-flags.h insn-config.h insn-codes.h hard-reg-set.h $(EXPR_H) except.h \
loop.h $(RECOG_H) toplev.h output.h
except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
- function.h insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h \
+ function.h insn-flags.h $(EXPR_H) regs.h hard-reg-set.h \
insn-config.h $(RECOG_H) output.h except.h toplev.h
expr.o : expr.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \
- regs.h insn-flags.h insn-codes.h expr.h insn-config.h $(RECOG_H) output.h \
+ regs.h insn-flags.h insn-codes.h $(EXPR_H) insn-config.h $(RECOG_H) output.h \
typeclass.h hard-reg-set.h toplev.h hard-reg-set.h except.h
-calls.o : calls.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h expr.h \
- insn-codes.h insn-flags.h regs.h toplev.h output.h
+calls.o : calls.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(EXPR_H) \
+ insn-flags.h regs.h toplev.h output.h
expmed.o : expmed.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
- insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) real.h
+ insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) real.h
explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
- hard-reg-set.h insn-config.h expr.h $(RECOG_H) insn-flags.h insn-codes.h
+ hard-reg-set.h insn-config.h $(EXPR_H) $(RECOG_H) insn-flags.h insn-codes.h
optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
- insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) reload.h
+ insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) reload.h
dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h regs.h \
insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h \
toplev.h
sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
- function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
- insn-config.h obstack.h xcoffout.h c-pragma.h sdbout.h insn-codes.h toplev.h
+ function.h $(EXPR_H) output.h hard-reg-set.h regs.h defaults.h real.h \
+ insn-config.h obstack.h xcoffout.h c-pragma.h sdbout.h toplev.h
dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
- flags.h insn-config.h insn-codes.h reload.h output.h defaults.h \
- hard-reg-set.h regs.h expr.h toplev.h dwarf2out.h
+ flags.h insn-config.h reload.h output.h defaults.h \
+ hard-reg-set.h regs.h $(EXPR_H) toplev.h dwarf2out.h
xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
flags.h toplev.h output.h dbxout.h
emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
- except.h function.h regs.h insn-config.h insn-codes.h $(RECOG_H) real.h \
- expr.h obstack.h hard-reg-set.h bitmap.h
+ except.h function.h regs.h insn-config.h $(RECOG_H) real.h \
+ $(EXPR_H) obstack.h hard-reg-set.h bitmap.h
real.o : real.c $(CONFIG_H) system.h $(TREE_H) toplev.h
getpwd.o : getpwd.c $(CONFIG_H) system.h
integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
- integrate.h insn-flags.h insn-config.h insn-codes.h expr.h real.h regs.h \
+ integrate.h insn-flags.h insn-config.h $(EXPR_H) real.h regs.h \
function.h output.h $(RECOG_H) except.h toplev.h
jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h regs.h \
- insn-config.h insn-codes.h insn-flags.h $(RECOG_H) expr.h real.h except.h \
+ insn-config.h insn-flags.h $(RECOG_H) $(EXPR_H) real.h except.h \
toplev.h
stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h \
flags.h toplev.h
cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h flags.h \
- real.h insn-config.h insn-codes.h $(RECOG_H) expr.h toplev.h output.h
+ real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h
gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) regs.h hard-reg-set.h flags.h \
- real.h insn-config.h insn-codes.h $(RECOG_H) expr.h basic-block.h output.h
+ real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h
profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \
gcov-io.h $(TREE_H) output.h regs.h toplev.h
loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
- insn-flags.h insn-codes.h regs.h hard-reg-set.h $(RECOG_H) expr.h real.h \
+ insn-flags.h regs.h hard-reg-set.h $(RECOG_H) $(EXPR_H) real.h \
toplev.h
-unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h insn-codes.h \
- integrate.h regs.h $(RECOG_H) flags.h expr.h loop.h toplev.h
+unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
+ integrate.h regs.h $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
$(BASIC_BLOCK_H) regs.h hard-reg-set.h output.h toplev.h
combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h \
- insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
+ insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h $(EXPR_H) \
$(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
regclass.o : regclass.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h flags.h \
$(BASIC_BLOCK_H) regs.h insn-config.h $(RECOG_H) reload.h real.h toplev.h \
@@ -1453,23 +1454,23 @@ bitmap.o : bitmap.c $(CONFIG_H) system.h
global.o : global.c $(CONFIG_H) system.h $(RTL_H) flags.h \
$(BASIC_BLOCK_H) regs.h hard-reg-set.h insn-config.h output.h toplev.h
-reload.o : reload.c $(CONFIG_H) system.h $(RTL_H) flags.h output.h expr.h \
+reload.o : reload.c $(CONFIG_H) system.h $(RTL_H) flags.h output.h $(EXPR_H) \
reload.h $(RECOG_H) hard-reg-set.h insn-config.h insn-codes.h regs.h \
real.h toplev.h
-reload1.o : reload1.c $(CONFIG_H) system.h $(RTL_H) real.h flags.h expr.h \
+reload1.o : reload1.c $(CONFIG_H) system.h $(RTL_H) real.h flags.h $(EXPR_H) \
reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
$(BASIC_BLOCK_H) $(RECOG_H) output.h toplev.h
caller-save.o : caller-save.c $(CONFIG_H) system.h $(RTL_H) flags.h \
- regs.h hard-reg-set.h insn-codes.h insn-config.h $(BASIC_BLOCK_H) \
- $(RECOG_H) reload.h expr.h toplev.h
+ regs.h hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) \
+ $(RECOG_H) reload.h $(EXPR_H) toplev.h
reorg.o : reorg.c $(CONFIG_H) system.h $(RTL_H) conditions.h hard-reg-set.h \
- $(BASIC_BLOCK_H) regs.h insn-config.h insn-codes.h insn-attr.h \
- insn-flags.h $(RECOG_H) flags.h output.h expr.h
+ $(BASIC_BLOCK_H) regs.h insn-config.h insn-attr.h \
+ insn-flags.h $(RECOG_H) flags.h output.h $(EXPR_H)
alias.o : alias.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h regs.h \
- insn-codes.h toplev.h
+ toplev.h
regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
- insn-codes.h recog.h output.h reload.h regs.h hard-reg-set.h flags.h \
- expr.h insn-flags.h $(BASIC_BLOCK_H) toplev.h
+ $(RECOG_H) output.h reload.h regs.h hard-reg-set.h flags.h \
+ $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
$(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
$(BASIC_BLOCK_H) regs.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
toplev.h
@@ -1554,7 +1555,7 @@ s-codes : $(md_file) gencodes $(srcdir)/
$(srcdir)/move-if-change tmp-codes.h insn-codes.h
touch s-codes
-insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
+insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
insn-config.h insn-flags.h insn-codes.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
@@ -1575,7 +1576,7 @@ s-recog : $(md_file) genrecog $(srcdir)/
touch s-recog
insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
- insn-config.h flags.h $(RECOG_H) expr.h reload.h system.h
+ insn-config.h flags.h $(RECOG_H) $(EXPR_H) reload.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
insn-opinit.c: s-opinit ; @true
This is for the cp/ directory.
Wed Jun 24 10:35:13 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (EXPR_H): New dependency variable.
(decl2.o): Depend on $(EXPR_H).
(typeck.o): Likewise.
(init.o): Likewise.
(expr.o): Likewise.
diff -rup orig/egcs-CVS19980623/gcc/cp/Makefile.in egcs-CVS19980623/gcc/cp/Makefile.in
--- orig/egcs-CVS19980623/gcc/cp/Makefile.in Tue Jun 23 09:55:40 1998
+++ egcs-CVS19980623/gcc/cp/Makefile.in Tue Jun 23 13:41:35 1998
@@ -207,6 +207,7 @@ TREE_H = $(srcdir)/../tree.h $(srcdir)/.
CXX_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
PARSE_H = $(srcdir)/parse.h
PARSE_C = $(srcdir)/parse.c
+EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
$(srcdir)/../except.h $(srcdir)/../output.h $(srcdir)/../system.h \
@@ -248,14 +249,13 @@ decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H
lex.h decl.h $(srcdir)/../stack.h $(srcdir)/../output.h \
$(srcdir)/../except.h $(srcdir)/../system.h $(srcdir)/../toplev.h
decl2.o : decl2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
- lex.h decl.h $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../except.h \
+ lex.h decl.h $(EXPR_H) $(srcdir)/../except.h \
$(srcdir)/../output.h $(srcdir)/../except.h $(srcdir)/../system.h \
$(srcdir)/../toplev.h $(srcdir)/../dwarf2out.h $(srcdir)/../dwarfout.h
typeck2.o : typeck2.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h
typeck.o : typeck.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
- $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../system.h \
- $(srcdir)/../toplev.h
+ $(EXPR_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
class.o : class.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h
call.o : call.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h \
@@ -263,8 +263,7 @@ call.o : call.c $(CONFIG_H) $(CXX_TREE_H
friend.o : friend.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
$(srcdir)/../system.h $(srcdir)/../toplev.h
init.o : init.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
- $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../system.h \
- $(srcdir)/../toplev.h
+ $(EXPR_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
method.o : method.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../system.h \
$(srcdir)/../toplev.h
cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../system.h
@@ -278,8 +277,7 @@ rtti.o : rtti.c $(CONFIG_H) $(CXX_TREE_H
except.o : except.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h $(RTL_H) \
$(srcdir)/../except.h $(srcdir)/../system.h $(srcdir)/../toplev.h
expr.o : expr.c $(CONFIG_H) $(CXX_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
- $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../system.h \
- $(srcdir)/../toplev.h
+ $(EXPR_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
xref.o : xref.c $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../input.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h
pt.o : pt.c $(CONFIG_H) $(CXX_TREE_H) decl.h $(PARSE_H) lex.h \