diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-05-10 08:26:52 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-05-10 08:26:52 -0400 |
commit | 7ac16ba05b3599300418c4d941b25c97c4c7c3fe (patch) | |
tree | b99f5484774f3e2f8225b58075978d9281bacc41 /gcc | |
parent | 046b1537a0e4d57cb0c5908c993b13603a116790 (diff) | |
download | gcc-7ac16ba05b3599300418c4d941b25c97c4c7c3fe.zip gcc-7ac16ba05b3599300418c4d941b25c97c4c7c3fe.tar.gz gcc-7ac16ba05b3599300418c4d941b25c97c4c7c3fe.tar.bz2 |
(out_file, md_file, tm_file, {build,host}_xm_file):
New symbols, to be overridden by configure.
(insn-*): Use $(md_file), not md.
(aux-output.o): Use $(out_file), not aux-output.c.
($(MD_FILE)): Rework to use new conventions.
(gen*.o, bi-*.o): Depend on $(build_xm_file), not hconfig.h.
(scan.o, fix-header.o, scan-decls.o): Likewise.
(distclean): Adjust files removed for new convention.
From jason@cygnus.com:
(STAGESTUFF): Add underscore.c.
(underscore.c): Rename temporary files to begin with 'tmp-' so that they will
be removed by 'make mostlyclean'.
From-SVN: r9608
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/Makefile.in | 123 |
1 files changed, 64 insertions, 59 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 6aaa3eb..0e50270 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -150,6 +150,11 @@ PREMADE_ATTRTAB = target= ... `configure' substitutes actual target name here. xmake_file= ... `configure' substitutes actual x- file name here. tmake_file= ... `configure' substitutes actual t- file name here. +out_file= ... `configure' substitutes actual out- file name here. +md_file= ... `configure' substitutes actual md file name here. +tm_file= ... `configure' substitutes actual tm file name here. +build_xm_file= ... `configure' substitutes actual build xm- file name here. +host_xm_file= ... `configure' substitutes actual host xm- file name here. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c` mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c` @@ -511,7 +516,7 @@ STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \ bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \ $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) $(CCCP) \ cc1obj$(exeext) enquire$(exeext) protoize$(exeext) unprotoize$(exeext) \ - specs collect2$(exeext) $(USE_COLLECT2) \ + specs collect2$(exeext) $(USE_COLLECT2) underscore.c \ $(LANG_STAGESTUFF) # Members of libgcc1.a. @@ -552,7 +557,7 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \ # one of the machine description files is edited. # That may or may not be what one wants to do. # If it is, rm *.o is an easy way to do it. -# CONFIG_H = config.h tm.h +# CONFIG_H = $(host_xm_file) $(tm_file) CONFIG_H = RTL_H = rtl.h rtl.def machmode.h machmode.def TREE_H = tree.h real.h tree.def machmode.h machmode.def @@ -1048,16 +1053,16 @@ collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h cplus-dem.o: cplus-dem.c demangle.h underscore.c: $(GCC_PASSES) - echo "int xxy_us_dummy;" >dummy.c - $(GCC_FOR_TARGET) -S dummy.c - echo '/*WARNING: This file is automatically generated!*/' >underscore.t - if grep _xxy_us_dummy dummy.s > /dev/null ; then \ - echo "int prepends_underscore = 1;" >>underscore.t; \ + echo "int xxy_us_dummy;" >tmp-dum.c + $(GCC_FOR_TARGET) -S tmp-dum.c + echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c + if grep _xxy_us_dummy tmp-dum.s > /dev/null ; then \ + echo "int prepends_underscore = 1;" >>tmp-under.c; \ else \ - echo "int prepends_underscore = 0;" >>underscore.t; \ + echo "int prepends_underscore = 0;" >>tmp-under.c; \ fi - $(srcdir)/move-if-change underscore.t underscore.c - -rm -f dummy.c dummy.s + $(srcdir)/move-if-change tmp-under.c underscore.c + -rm -f tmp-dum.c tmp-dum.s # Objective C language specific files. @@ -1196,11 +1201,11 @@ recog.o : recog.c $(CONFIG_H) $(RTL_H) \ reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \ regs.h hard-reg-set.h flags.h insn-config.h -aux-output.o : aux-output.c $(CONFIG_H) \ +aux-output.o : $(out_file) $(CONFIG_H) \ $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \ insn-flags.h output.h insn-attr.h insn-codes.h - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ - $(MAYBE_TARGET_DEFAULT) aux-output.c + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -o $@ \ + $(MAYBE_TARGET_DEFAULT) $(out_file) # Build auxiliary files that support ecoff format. mips-tfile: mips-tfile.o version.o $(LIBDEPS) @@ -1251,20 +1256,20 @@ alloca.o: alloca.c # trailing `;'), we call true for each. insn-config.h: stamp-config ; @true -stamp-config : md genconfig $(srcdir)/move-if-change - ./genconfig md > tmp-config.h +stamp-config : $(md_file) genconfig $(srcdir)/move-if-change + ./genconfig $(md_file) > tmp-config.h $(srcdir)/move-if-change tmp-config.h insn-config.h touch stamp-config insn-flags.h: stamp-flags ; @true -stamp-flags : md genflags $(srcdir)/move-if-change - ./genflags md > tmp-flags.h +stamp-flags : $(md_file) genflags $(srcdir)/move-if-change + ./genflags $(md_file) > tmp-flags.h $(srcdir)/move-if-change tmp-flags.h insn-flags.h touch stamp-flags insn-codes.h: stamp-codes ; @true -stamp-codes : md gencodes $(srcdir)/move-if-change - ./gencodes md > tmp-codes.h +stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change + ./gencodes $(md_file) > tmp-codes.h $(srcdir)/move-if-change tmp-codes.h insn-codes.h touch stamp-codes @@ -1273,8 +1278,8 @@ insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c insn-emit.c: stamp-emit ; @true -stamp-emit : md genemit $(srcdir)/move-if-change - ./genemit md > tmp-emit.c +stamp-emit : $(md_file) genemit $(srcdir)/move-if-change + ./genemit $(md_file) > tmp-emit.c $(srcdir)/move-if-change tmp-emit.c insn-emit.c touch stamp-emit @@ -1283,8 +1288,8 @@ insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c insn-recog.c: stamp-recog ; @true -stamp-recog : md genrecog $(srcdir)/move-if-change - ./genrecog md > tmp-recog.c +stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change + ./genrecog $(md_file) > tmp-recog.c $(srcdir)/move-if-change tmp-recog.c insn-recog.c touch stamp-recog @@ -1293,8 +1298,8 @@ insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c insn-opinit.c: stamp-opinit ; @true -stamp-opinit : md genopinit $(srcdir)/move-if-change - ./genopinit md > tmp-opinit.c +stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change + ./genopinit $(md_file) > tmp-opinit.c $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c touch stamp-opinit @@ -1302,8 +1307,8 @@ insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c insn-extract.c: stamp-extract ; @true -stamp-extract : md genextract $(srcdir)/move-if-change - ./genextract md > tmp-extract.c +stamp-extract : $(md_file) genextract $(srcdir)/move-if-change + ./genextract $(md_file) > tmp-extract.c $(srcdir)/move-if-change tmp-extract.c insn-extract.c touch stamp-extract @@ -1311,8 +1316,8 @@ insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c insn-peep.c: stamp-peep ; @true -stamp-peep : md genpeep $(srcdir)/move-if-change - ./genpeep md > tmp-peep.c +stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change + ./genpeep $(md_file) > tmp-peep.c $(srcdir)/move-if-change tmp-peep.c insn-peep.c touch stamp-peep @@ -1321,19 +1326,19 @@ insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c insn-attr.h: stamp-attr ; @true -stamp-attr : md genattr $(srcdir)/move-if-change - ./genattr md > tmp-attr.h +stamp-attr : $(md_file) genattr $(srcdir)/move-if-change + ./genattr $(md_file) > tmp-attr.h $(srcdir)/move-if-change tmp-attr.h insn-attr.h touch stamp-attr insn-attrtab.c: stamp-attrtab ; @true -stamp-attrtab : md genattrtab $(srcdir)/move-if-change - if cmp -s $(PREMADE_ATTRTAB_MD) md; \ +stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change + if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \ then \ echo Using $(PREMADE_ATTRTAB); \ cp $(PREMADE_ATTRTAB) tmp-attrtab.c; \ else \ - ./genattrtab md > tmp-attrtab.c; \ + ./genattrtab $(md_file) > tmp-attrtab.c; \ fi $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c touch stamp-attrtab @@ -1344,8 +1349,8 @@ insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c insn-output.c: stamp-output ; @true -stamp-output : md genoutput $(srcdir)/move-if-change - ./genoutput md > tmp-output.c +stamp-output : $(md_file) genoutput $(srcdir)/move-if-change + ./genoutput $(md_file) > tmp-output.c $(srcdir)/move-if-change tmp-output.c insn-output.c touch stamp-output @@ -1362,84 +1367,84 @@ stamp-output : md genoutput $(srcdir)/move-if-change # Pass the md file through cpp if the target requests it. $(MD_FILE): $(MD_DEPS) rm -f $@ - $(MD_CPP) $(MD_CPPFLAGS) md.pre-cpp | sed 's/^# /; /g' > tmp-$@ + $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@ mv tmp-$@ $@ genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \ genconfig.o $(HOST_RTL) $(HOST_LIBS) -genconfig.o : genconfig.c $(RTL_H) hconfig.h +genconfig.o : genconfig.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \ genflags.o $(HOST_RTL) $(HOST_LIBS) -genflags.o : genflags.c $(RTL_H) hconfig.h +genflags.o : genflags.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \ gencodes.o $(HOST_RTL) $(HOST_LIBS) -gencodes.o : gencodes.c $(RTL_H) hconfig.h +gencodes.o : gencodes.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \ genemit.o $(HOST_RTL) $(HOST_LIBS) -genemit.o : genemit.c $(RTL_H) hconfig.h +genemit.o : genemit.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genopinit \ genopinit.o $(HOST_RTL) $(HOST_LIBS) -genopinit.o : genopinit.c $(RTL_H) hconfig.h +genopinit.o : genopinit.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \ genrecog.o $(HOST_RTL) $(HOST_LIBS) -genrecog.o : genrecog.c $(RTL_H) hconfig.h +genrecog.o : genrecog.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \ genextract.o $(HOST_RTL) $(HOST_LIBS) -genextract.o : genextract.c $(RTL_H) hconfig.h insn-config.h +genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \ genpeep.o $(HOST_RTL) $(HOST_LIBS) -genpeep.o : genpeep.c $(RTL_H) hconfig.h +genpeep.o : genpeep.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \ genattr.o $(HOST_RTL) $(HOST_LIBS) -genattr.o : genattr.c $(RTL_H) hconfig.h +genattr.o : genattr.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \ genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS) -genattrtab.o : genattrtab.c $(RTL_H) hconfig.h insn-config.h +genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) insn-config.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \ genoutput.o $(HOST_RTL) $(HOST_LIBS) -genoutput.o : genoutput.c $(RTL_H) hconfig.h +genoutput.o : genoutput.c $(RTL_H) $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c # Compile the libraries to be used by gen*. @@ -1512,19 +1517,19 @@ bi-run.o: $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \ $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c -bi-parser.o: $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h +bi-parser.o: $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-parser.c -bi-lexer.o: $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h +bi-lexer.o: $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-lexer.c -bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h hconfig.h +bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-arity.c -bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h +bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-opcode.c -bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h hconfig.h +bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(srcdir)/bi-opname.c bi-reverse.o: bi-reverse.c $(srcdir)/bi-defs.h @@ -1757,10 +1762,10 @@ gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS) ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \ gen-protos.o scan.o cppalloc.o $(HOST_LIBS) -gen-protos.o: gen-protos.c scan.h hconfig.h +gen-protos.o: gen-protos.c scan.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c -scan.o: scan.c scan.h hconfig.h +scan.o: scan.c scan.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile @@ -1776,10 +1781,10 @@ fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) cppli $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fix-header \ fix-header.o scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o cppexp.o $(HOST_LIBS) -fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h hconfig.h +fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c -scan-decls.o: scan-decls.c scan.h hconfig.h +scan-decls.o: scan-decls.c scan.h $(build_xm_file) $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c # stmp-fixproto depends on this, not on fix-header directly. @@ -1920,9 +1925,9 @@ clean: mostlyclean bytecode.clean lang.clean # Delete all files that users would normally create # while building and installing GCC. distclean: clean bytecode.distclean lang.distclean - -rm -f tm.h aux-output.c config.h tconfig.h hconfig.h + -rm -f tm.h config.h tconfig.h hconfig.h -rm -f config.status config.run - -rm -f md md.pre-cpp + -rm -f md -rm -f Makefile *.oaux -rm -fr stage1 stage2 stage3 stage4 -rm -f */stage1 */stage2 */stage3 */stage4 */include |