ref: 446dc0208959152bad0bb3ed1cb5f037d247d805
parent: 80f2dbc4616e466190918ed3882e027e94331aa6
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Aug 15 14:34:01 EDT 2018
Move generated dependencias to deps.mk It makes easier to read the base Makefiles.
--- a/as/Makefile
+++ b/as/Makefile
@@ -23,48 +23,4 @@
include target/i386.mk
include target/i286.mk
include target/z80.mk
-
-#deps
-expr.o: ./../inc/scc.h
-expr.o: ./as.h
-ins.o: ./../inc/scc.h
-ins.o: ./as.h
-main.o: ./../inc/arg.h
-main.o: ./../inc/scc.h
-main.o: ./as.h
-myro.o: ./../inc/myro.h
-myro.o: ./../inc/scc.h
-myro.o: ./as.h
-parser.o: ./../inc/scc.h
-parser.o: ./as.h
-symbol.o: ./../inc/scc.h
-symbol.o: ./as.h
-target/x80/ins.o: ./target/x80/../../../inc/scc.h
-target/x80/ins.o: ./target/x80/../../as.h
-target/x80/ins.o: ./target/x80/proc.h
-target/x80/z80.o: ./target/x80/../../../inc/scc.h
-target/x80/z80.o: ./target/x80/../../as.h
-target/x80/z80.o: ./target/x80/../x80/proc.h
-target/x80/z80tbl.o: ./target/x80/../../../inc/scc.h
-target/x80/z80tbl.o: ./target/x80/../../as.h
-target/x80/z80tbl.o: ./target/x80/../x80/proc.h
-target/x86/amd64.o: ./target/x86/../../../inc/scc.h
-target/x86/amd64.o: ./target/x86/../../as.h
-target/x86/amd64tbl.o: ./target/x86/../../../inc/scc.h
-target/x86/amd64tbl.o: ./target/x86/../../as.h
-target/x86/amd64tbl.o: ./target/x86/../x86/proc.h
-target/x86/i286.o: ./target/x86/../../../inc/scc.h
-target/x86/i286.o: ./target/x86/../../as.h
-target/x86/i286.o: ./target/x86/../x86/proc.h
-target/x86/i286tbl.o: ./target/x86/../../../inc/scc.h
-target/x86/i286tbl.o: ./target/x86/../../as.h
-target/x86/i286tbl.o: ./target/x86/../x86/proc.h
-target/x86/i386.o: ./target/x86/../../../inc/scc.h
-target/x86/i386.o: ./target/x86/../../as.h
-target/x86/i386.o: ./target/x86/../x86/proc.h
-target/x86/i386tbl.o: ./target/x86/../../../inc/scc.h
-target/x86/i386tbl.o: ./target/x86/../../as.h
-target/x86/i386tbl.o: ./target/x86/../x86/proc.h
-target/x86/ins.o: ./target/x86/../../../inc/scc.h
-target/x86/ins.o: ./target/x86/../../as.h
-target/x86/ins.o: ./target/x86/proc.h
+include deps.mk
--- /dev/null
+++ b/as/deps.mk
@@ -1,0 +1,45 @@
+
+#deps
+expr.o: ./../inc/scc.h
+expr.o: ./as.h
+ins.o: ./../inc/scc.h
+ins.o: ./as.h
+main.o: ./../inc/arg.h
+main.o: ./../inc/scc.h
+main.o: ./as.h
+myro.o: ./../inc/myro.h
+myro.o: ./../inc/scc.h
+myro.o: ./as.h
+parser.o: ./../inc/scc.h
+parser.o: ./as.h
+symbol.o: ./../inc/scc.h
+symbol.o: ./as.h
+target/x80/ins.o: ./target/x80/../../../inc/scc.h
+target/x80/ins.o: ./target/x80/../../as.h
+target/x80/ins.o: ./target/x80/proc.h
+target/x80/z80.o: ./target/x80/../../../inc/scc.h
+target/x80/z80.o: ./target/x80/../../as.h
+target/x80/z80.o: ./target/x80/../x80/proc.h
+target/x80/z80tbl.o: ./target/x80/../../../inc/scc.h
+target/x80/z80tbl.o: ./target/x80/../../as.h
+target/x80/z80tbl.o: ./target/x80/../x80/proc.h
+target/x86/amd64.o: ./target/x86/../../../inc/scc.h
+target/x86/amd64.o: ./target/x86/../../as.h
+target/x86/amd64tbl.o: ./target/x86/../../../inc/scc.h
+target/x86/amd64tbl.o: ./target/x86/../../as.h
+target/x86/amd64tbl.o: ./target/x86/../x86/proc.h
+target/x86/i286.o: ./target/x86/../../../inc/scc.h
+target/x86/i286.o: ./target/x86/../../as.h
+target/x86/i286.o: ./target/x86/../x86/proc.h
+target/x86/i286tbl.o: ./target/x86/../../../inc/scc.h
+target/x86/i286tbl.o: ./target/x86/../../as.h
+target/x86/i286tbl.o: ./target/x86/../x86/proc.h
+target/x86/i386.o: ./target/x86/../../../inc/scc.h
+target/x86/i386.o: ./target/x86/../../as.h
+target/x86/i386.o: ./target/x86/../x86/proc.h
+target/x86/i386tbl.o: ./target/x86/../../../inc/scc.h
+target/x86/i386tbl.o: ./target/x86/../../as.h
+target/x86/i386tbl.o: ./target/x86/../x86/proc.h
+target/x86/ins.o: ./target/x86/../../../inc/scc.h
+target/x86/ins.o: ./target/x86/../../as.h
+target/x86/ins.o: ./target/x86/proc.h
--- a/cc1/Makefile
+++ b/cc1/Makefile
@@ -27,49 +27,4 @@
include target/arm64-sysv/arch.mk
include target/i386-sysv/arch.mk
include target/z80-scc/arch.mk
-
-cpp.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-decl.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-expr.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-init.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-lex.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-stmt.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-symbol.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-types.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-
-#deps
-builtin.o: ./../inc/scc.h
-builtin.o: ./cc1.h
-code.o: ./../inc/scc.h
-code.o: ./cc1.h
-cpp.o: ./../inc/scc.h
-cpp.o: ./cc1.h
-decl.o: ./../inc/scc.h
-decl.o: ./cc1.h
-error.o: ./../inc/scc.h
-error.o: ./cc1.h
-expr.o: ./../inc/scc.h
-expr.o: ./cc1.h
-fold.o: ./../inc/scc.h
-fold.o: ./cc1.h
-init.o: ./../inc/scc.h
-init.o: ./cc1.h
-lex.o: ./../inc/scc.h
-lex.o: ./cc1.h
-main.o: ./../inc/arg.h
-main.o: ./../inc/scc.h
-main.o: ./cc1.h
-stmt.o: ./../inc/scc.h
-stmt.o: ./cc1.h
-symbol.o: ./../inc/scc.h
-symbol.o: ./cc1.h
-target/amd64-sysv/arch.o: ./target/amd64-sysv/../../../inc/scc.h
-target/amd64-sysv/arch.o: ./target/amd64-sysv/../../cc1.h
-target/arm64-sysv/arch.o: ./target/arm64-sysv/../../../inc/scc.h
-target/arm64-sysv/arch.o: ./target/arm64-sysv/../../cc1.h
-target/i386-sysv/arch.o: ./target/i386-sysv/../../../inc/scc.h
-target/i386-sysv/arch.o: ./target/i386-sysv/../../cc1.h
-target/z80-scc/arch.o: ./target/z80-scc/../../../inc/scc.h
-target/z80-scc/arch.o: ./target/z80-scc/../../cc1.h
-types.o: ./../inc/scc.h
-types.o: ./cc1.h
+include deps.mk
--- /dev/null
+++ b/cc1/deps.mk
@@ -1,0 +1,45 @@
+cpp.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+decl.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+expr.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+init.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+lex.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+stmt.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+symbol.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+types.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+
+#deps
+builtin.o: ./../inc/scc.h
+builtin.o: ./cc1.h
+code.o: ./../inc/scc.h
+code.o: ./cc1.h
+cpp.o: ./../inc/scc.h
+cpp.o: ./cc1.h
+decl.o: ./../inc/scc.h
+decl.o: ./cc1.h
+error.o: ./../inc/scc.h
+error.o: ./cc1.h
+expr.o: ./../inc/scc.h
+expr.o: ./cc1.h
+fold.o: ./../inc/scc.h
+fold.o: ./cc1.h
+init.o: ./../inc/scc.h
+init.o: ./cc1.h
+lex.o: ./../inc/scc.h
+lex.o: ./cc1.h
+main.o: ./../inc/arg.h
+main.o: ./../inc/scc.h
+main.o: ./cc1.h
+stmt.o: ./../inc/scc.h
+stmt.o: ./cc1.h
+symbol.o: ./../inc/scc.h
+symbol.o: ./cc1.h
+target/amd64-sysv/arch.o: ./target/amd64-sysv/../../../inc/scc.h
+target/amd64-sysv/arch.o: ./target/amd64-sysv/../../cc1.h
+target/arm64-sysv/arch.o: ./target/arm64-sysv/../../../inc/scc.h
+target/arm64-sysv/arch.o: ./target/arm64-sysv/../../cc1.h
+target/i386-sysv/arch.o: ./target/i386-sysv/../../../inc/scc.h
+target/i386-sysv/arch.o: ./target/i386-sysv/../../cc1.h
+target/z80-scc/arch.o: ./target/z80-scc/../../../inc/scc.h
+target/z80-scc/arch.o: ./target/z80-scc/../../cc1.h
+types.o: ./../inc/scc.h
+types.o: ./cc1.h
--- a/cc2/Makefile
+++ b/cc2/Makefile
@@ -32,61 +32,4 @@
include target/qbe_amd64-sysv/target.mk
include target/qbe_arm64-sysv/target.mk
include target/z80-scc/target.mk
-
-parser.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
-
-#deps
-code.o: ./../inc/scc.h
-code.o: ./cc2.h
-main.o: ./../inc/arg.h
-main.o: ./../inc/scc.h
-main.o: ./cc2.h
-main.o: ./error.h
-node.o: ./../inc/scc.h
-node.o: ./cc2.h
-optm.o: ./../inc/scc.h
-optm.o: ./cc2.h
-parser.o: ./../inc/scc.h
-parser.o: ./cc2.h
-peep.o: ./../inc/scc.h
-peep.o: ./cc2.h
-symbol.o: ./../inc/scc.h
-symbol.o: ./cc2.h
-target/amd64-sysv/cgen.o: ./target/amd64-sysv/../../../inc/scc.h
-target/amd64-sysv/cgen.o: ./target/amd64-sysv/../../cc2.h
-target/amd64-sysv/cgen.o: ./target/amd64-sysv/arch.h
-target/amd64-sysv/code.o: ./target/amd64-sysv/../../../inc/scc.h
-target/amd64-sysv/code.o: ./target/amd64-sysv/../../cc2.h
-target/amd64-sysv/code.o: ./target/amd64-sysv/arch.h
-target/amd64-sysv/optm.o: ./target/amd64-sysv/../../../inc/scc.h
-target/amd64-sysv/optm.o: ./target/amd64-sysv/../../cc2.h
-target/amd64-sysv/types.o: ./target/amd64-sysv/../../../inc/scc.h
-target/amd64-sysv/types.o: ./target/amd64-sysv/../../cc2.h
-target/i386-sysv/cgen.o: ./target/i386-sysv/../../../inc/scc.h
-target/i386-sysv/cgen.o: ./target/i386-sysv/../../cc2.h
-target/i386-sysv/cgen.o: ./target/i386-sysv/arch.h
-target/i386-sysv/code.o: ./target/i386-sysv/../../../inc/scc.h
-target/i386-sysv/code.o: ./target/i386-sysv/../../cc2.h
-target/i386-sysv/code.o: ./target/i386-sysv/arch.h
-target/i386-sysv/optm.o: ./target/i386-sysv/../../../inc/scc.h
-target/i386-sysv/optm.o: ./target/i386-sysv/../../cc2.h
-target/i386-sysv/types.o: ./target/i386-sysv/../../../inc/scc.h
-target/i386-sysv/types.o: ./target/i386-sysv/../../cc2.h
-target/qbe/cgen.o: ./target/qbe/../../../inc/scc.h
-target/qbe/cgen.o: ./target/qbe/../../cc2.h
-target/qbe/cgen.o: ./target/qbe/arch.h
-target/qbe/code.o: ./target/qbe/../../../inc/scc.h
-target/qbe/code.o: ./target/qbe/../../cc2.h
-target/qbe/code.o: ./target/qbe/arch.h
-target/qbe/optm.o: ./target/qbe/../../../inc/scc.h
-target/qbe/optm.o: ./target/qbe/../../cc2.h
-target/z80-scc/cgen.o: ./target/z80-scc/../../../inc/scc.h
-target/z80-scc/cgen.o: ./target/z80-scc/../../cc2.h
-target/z80-scc/cgen.o: ./target/z80-scc/arch.h
-target/z80-scc/code.o: ./target/z80-scc/../../../inc/scc.h
-target/z80-scc/code.o: ./target/z80-scc/../../cc2.h
-target/z80-scc/code.o: ./target/z80-scc/arch.h
-target/z80-scc/optm.o: ./target/z80-scc/../../../inc/scc.h
-target/z80-scc/optm.o: ./target/z80-scc/../../cc2.h
-target/z80-scc/types.o: ./target/z80-scc/../../../inc/scc.h
-target/z80-scc/types.o: ./target/z80-scc/../../cc2.h
+include deps.mk
--- /dev/null
+++ b/cc2/deps.mk
@@ -1,0 +1,57 @@
+parser.c: $(PROJECTDIR)/inc/$(STD)/cstd.h
+
+#deps
+code.o: ./../inc/scc.h
+code.o: ./cc2.h
+main.o: ./../inc/arg.h
+main.o: ./../inc/scc.h
+main.o: ./cc2.h
+main.o: ./error.h
+node.o: ./../inc/scc.h
+node.o: ./cc2.h
+optm.o: ./../inc/scc.h
+optm.o: ./cc2.h
+parser.o: ./../inc/scc.h
+parser.o: ./cc2.h
+peep.o: ./../inc/scc.h
+peep.o: ./cc2.h
+symbol.o: ./../inc/scc.h
+symbol.o: ./cc2.h
+target/amd64-sysv/cgen.o: ./target/amd64-sysv/../../../inc/scc.h
+target/amd64-sysv/cgen.o: ./target/amd64-sysv/../../cc2.h
+target/amd64-sysv/cgen.o: ./target/amd64-sysv/arch.h
+target/amd64-sysv/code.o: ./target/amd64-sysv/../../../inc/scc.h
+target/amd64-sysv/code.o: ./target/amd64-sysv/../../cc2.h
+target/amd64-sysv/code.o: ./target/amd64-sysv/arch.h
+target/amd64-sysv/optm.o: ./target/amd64-sysv/../../../inc/scc.h
+target/amd64-sysv/optm.o: ./target/amd64-sysv/../../cc2.h
+target/amd64-sysv/types.o: ./target/amd64-sysv/../../../inc/scc.h
+target/amd64-sysv/types.o: ./target/amd64-sysv/../../cc2.h
+target/i386-sysv/cgen.o: ./target/i386-sysv/../../../inc/scc.h
+target/i386-sysv/cgen.o: ./target/i386-sysv/../../cc2.h
+target/i386-sysv/cgen.o: ./target/i386-sysv/arch.h
+target/i386-sysv/code.o: ./target/i386-sysv/../../../inc/scc.h
+target/i386-sysv/code.o: ./target/i386-sysv/../../cc2.h
+target/i386-sysv/code.o: ./target/i386-sysv/arch.h
+target/i386-sysv/optm.o: ./target/i386-sysv/../../../inc/scc.h
+target/i386-sysv/optm.o: ./target/i386-sysv/../../cc2.h
+target/i386-sysv/types.o: ./target/i386-sysv/../../../inc/scc.h
+target/i386-sysv/types.o: ./target/i386-sysv/../../cc2.h
+target/qbe/cgen.o: ./target/qbe/../../../inc/scc.h
+target/qbe/cgen.o: ./target/qbe/../../cc2.h
+target/qbe/cgen.o: ./target/qbe/arch.h
+target/qbe/code.o: ./target/qbe/../../../inc/scc.h
+target/qbe/code.o: ./target/qbe/../../cc2.h
+target/qbe/code.o: ./target/qbe/arch.h
+target/qbe/optm.o: ./target/qbe/../../../inc/scc.h
+target/qbe/optm.o: ./target/qbe/../../cc2.h
+target/z80-scc/cgen.o: ./target/z80-scc/../../../inc/scc.h
+target/z80-scc/cgen.o: ./target/z80-scc/../../cc2.h
+target/z80-scc/cgen.o: ./target/z80-scc/arch.h
+target/z80-scc/code.o: ./target/z80-scc/../../../inc/scc.h
+target/z80-scc/code.o: ./target/z80-scc/../../cc2.h
+target/z80-scc/code.o: ./target/z80-scc/arch.h
+target/z80-scc/optm.o: ./target/z80-scc/../../../inc/scc.h
+target/z80-scc/optm.o: ./target/z80-scc/../../cc2.h
+target/z80-scc/types.o: ./target/z80-scc/../../../inc/scc.h
+target/z80-scc/types.o: ./target/z80-scc/../../cc2.h
--- a/ld/Makefile
+++ b/ld/Makefile
@@ -20,15 +20,4 @@
distclean: clean
-#deps
-coff32.o: ./../inc/coff32/filehdr.h
-coff32.o: ./../inc/coff32/scnhdr.h
-coff32.o: ./../inc/coff32/syms.h
-coff32.o: ./../inc/scc.h
-coff32.o: ./ld.h
-main.o: ./../inc/ar.h
-main.o: ./../inc/scc.h
-main.o: ./../inc/syslibs.h
-main.o: ./ld.h
-obj.o: ./../inc/scc.h
-obj.o: ./ld.h
+include deps.mk
--- /dev/null
+++ b/ld/deps.mk
@@ -1,0 +1,14 @@
+
+#deps
+coff32.o: ./../inc/coff32/aouthdr.h
+coff32.o: ./../inc/coff32/filehdr.h
+coff32.o: ./../inc/coff32/scnhdr.h
+coff32.o: ./../inc/coff32/syms.h
+coff32.o: ./../inc/scc.h
+coff32.o: ./ld.h
+main.o: ./../inc/ar.h
+main.o: ./../inc/scc.h
+main.o: ./../inc/syslibs.h
+main.o: ./ld.h
+obj.o: ./../inc/scc.h
+obj.o: ./ld.h
--- a/mkdep.sh
+++ b/mkdep.sh
@@ -3,7 +3,7 @@
set -e
trap "rm -f $$.tmp" 0 2 3
-(sed '/^#deps/q' Makefile
+(sed '/^#deps/q' deps.mk
for i in `find . -name '*.c'`
do
file=`echo $i | sed -e 's,^./,,' -e 's/\.c$/.o/'`
@@ -10,4 +10,4 @@
dir=`dirname $i | sed 's,/*$,,'`
sed -n '/#include "/ s,#include "\(.*\)",'"$file: $dir"'/\1,p' $i
done |
-LC_ALL=C sort -s) > $$.tmp && mv $$.tmp Makefile
+LC_ALL=C sort -s) > $$.tmp && mv $$.tmp deps.mk
--- a/nm/Makefile
+++ b/nm/Makefile
@@ -20,14 +20,4 @@
distclean: clean
-#deps
-coff32.o: ./../inc/coff32/filehdr.h
-coff32.o: ./../inc/coff32/scnhdr.h
-coff32.o: ./../inc/coff32/syms.h
-coff32.o: ./../inc/scc.h
-coff32.o: ./nm.h
-formats.o: ./nm.h
-main.o: ./../inc/ar.h
-main.o: ./../inc/arg.h
-main.o: ./../inc/scc.h
-main.o: ./nm.h
+include deps.mk
--- /dev/null
+++ b/nm/deps.mk
@@ -1,0 +1,12 @@
+
+#deps
+coff32.o: ./../inc/coff32/filehdr.h
+coff32.o: ./../inc/coff32/scnhdr.h
+coff32.o: ./../inc/coff32/syms.h
+coff32.o: ./../inc/scc.h
+coff32.o: ./nm.h
+formats.o: ./nm.h
+main.o: ./../inc/ar.h
+main.o: ./../inc/arg.h
+main.o: ./../inc/scc.h
+main.o: ./nm.h