ref: 61d8ab34d1ccd7ffdc3fd0e3fe73bf1a87bf0af6
parent: 93143fdbcbdf5fa2ecf4759f6c71344856469d87
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Jan 22 02:07:03 EST 2020
libc: Add deps.mk to arch Makefiles After adding mem* functions we have inclusion dependencies that are not handled. For this reason This patch adds deps,mk and support to keep them updated.
--- a/src/cmd/deps.mk
+++ b/src/cmd/deps.mk
@@ -4,6 +4,193 @@
./ar.o: $(INCDIR)/scc/scc/ar.h
./ar.o: $(INCDIR)/scc/scc/arg.h
./ar.o: ./sys.h
+./as/expr.o: $(INCDIR)/scc/scc/scc.h
+./as/expr.o: ./as/as.h
+./as/ins.o: $(INCDIR)/scc/scc/scc.h
+./as/ins.o: ./as/as.h
+./as/main.o: $(INCDIR)/scc/scc/arg.h
+./as/main.o: $(INCDIR)/scc/scc/scc.h
+./as/main.o: ./as/as.h
+./as/parser.o: $(INCDIR)/scc/scc/cstd.h
+./as/parser.o: $(INCDIR)/scc/scc/scc.h
+./as/parser.o: ./as/as.h
+./as/symbol.o: $(INCDIR)/scc/scc/scc.h
+./as/symbol.o: ./as/as.h
+./as/target/powerpc/ins.o: $(INCDIR)/scc/scc/scc.h
+./as/target/powerpc/ins.o: ./as/target/powerpc/../../as.h
+./as/target/powerpc/ins.o: ./as/target/powerpc/proc.h
+./as/target/powerpc/powerpc.o: $(INCDIR)/scc/scc/scc.h
+./as/target/powerpc/powerpc.o: ./as/target/powerpc/../../as.h
+./as/target/powerpc/powerpc.o: ./as/target/powerpc/proc.h
+./as/target/powerpc/powerpc64.o: $(INCDIR)/scc/scc/scc.h
+./as/target/powerpc/powerpc64.o: ./as/target/powerpc/../../as.h
+./as/target/powerpc/powerpc64.o: ./as/target/powerpc/proc.h
+./as/target/powerpc/powerpc64tbl.o: $(INCDIR)/scc/scc/scc.h
+./as/target/powerpc/powerpc64tbl.o: ./as/target/powerpc/../../as.h
+./as/target/powerpc/powerpc64tbl.o: ./as/target/powerpc/../powerpc/proc.h
+./as/target/powerpc/powerpctbl.o: $(INCDIR)/scc/scc/scc.h
+./as/target/powerpc/powerpctbl.o: ./as/target/powerpc/../../as.h
+./as/target/powerpc/powerpctbl.o: ./as/target/powerpc/../powerpc/proc.h
+./as/target/x80/ins.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x80/ins.o: ./as/target/x80/../../as.h
+./as/target/x80/ins.o: ./as/target/x80/proc.h
+./as/target/x80/z80.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x80/z80.o: ./as/target/x80/../../as.h
+./as/target/x80/z80.o: ./as/target/x80/../x80/proc.h
+./as/target/x80/z80tbl.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x80/z80tbl.o: ./as/target/x80/../../as.h
+./as/target/x80/z80tbl.o: ./as/target/x80/../x80/proc.h
+./as/target/x86/amd64.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x86/amd64.o: ./as/target/x86/../../as.h
+./as/target/x86/amd64tbl.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x86/amd64tbl.o: ./as/target/x86/../../as.h
+./as/target/x86/amd64tbl.o: ./as/target/x86/../x86/proc.h
+./as/target/x86/i286.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x86/i286.o: ./as/target/x86/../../as.h
+./as/target/x86/i286.o: ./as/target/x86/../x86/proc.h
+./as/target/x86/i286tbl.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x86/i286tbl.o: ./as/target/x86/../../as.h
+./as/target/x86/i286tbl.o: ./as/target/x86/../x86/proc.h
+./as/target/x86/i386.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x86/i386.o: ./as/target/x86/../../as.h
+./as/target/x86/i386.o: ./as/target/x86/../x86/proc.h
+./as/target/x86/i386tbl.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x86/i386tbl.o: ./as/target/x86/../../as.h
+./as/target/x86/i386tbl.o: ./as/target/x86/../x86/proc.h
+./as/target/x86/ins.o: $(INCDIR)/scc/scc/scc.h
+./as/target/x86/ins.o: ./as/target/x86/../../as.h
+./as/target/x86/ins.o: ./as/target/x86/proc.h
+./cc/cc1/builtin.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/builtin.o: ./cc/cc1/cc1.h
+./cc/cc1/code.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/code.o: ./cc/cc1/cc1.h
+./cc/cc1/cpp.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/cpp.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/cpp.o: ./cc/cc1/cc1.h
+./cc/cc1/decl.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/decl.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/decl.o: ./cc/cc1/cc1.h
+./cc/cc1/error.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/error.o: ./cc/cc1/cc1.h
+./cc/cc1/expr.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/expr.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/expr.o: ./cc/cc1/cc1.h
+./cc/cc1/fold.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/fold.o: ./cc/cc1/cc1.h
+./cc/cc1/init.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/init.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/init.o: ./cc/cc1/cc1.h
+./cc/cc1/lex.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/lex.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/lex.o: ./cc/cc1/cc1.h
+./cc/cc1/main.o: $(INCDIR)/scc/scc/arg.h
+./cc/cc1/main.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/main.o: ./cc/cc1/cc1.h
+./cc/cc1/stmt.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/stmt.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/stmt.o: ./cc/cc1/cc1.h
+./cc/cc1/symbol.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/symbol.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/symbol.o: ./cc/cc1/cc1.h
+./cc/cc1/target/amd64-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/target/amd64-sysv/arch.o: ./cc/cc1/target/amd64-sysv/../../cc1.h
+./cc/cc1/target/arm64-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/target/arm64-sysv/arch.o: ./cc/cc1/target/arm64-sysv/../../cc1.h
+./cc/cc1/target/i386-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/target/i386-sysv/arch.o: ./cc/cc1/target/i386-sysv/../../cc1.h
+./cc/cc1/target/z80-scc/arch.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/target/z80-scc/arch.o: ./cc/cc1/target/z80-scc/../../cc1.h
+./cc/cc1/types.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc1/types.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc1/types.o: ./cc/cc1/cc1.h
+./cc/cc2/code.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/code.o: ./cc/cc2/cc2.h
+./cc/cc2/main.o: $(INCDIR)/scc/scc/arg.h
+./cc/cc2/main.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/main.o: ./cc/cc2/cc2.h
+./cc/cc2/main.o: ./cc/cc2/error.h
+./cc/cc2/node.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/node.o: ./cc/cc2/cc2.h
+./cc/cc2/optm.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/optm.o: ./cc/cc2/cc2.h
+./cc/cc2/parser.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc2/parser.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/parser.o: ./cc/cc2/cc2.h
+./cc/cc2/peep.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/peep.o: ./cc/cc2/cc2.h
+./cc/cc2/symbol.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/symbol.o: ./cc/cc2/cc2.h
+./cc/cc2/target/amd64-sysv/cgen.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/amd64-sysv/cgen.o: ./cc/cc2/target/amd64-sysv/../../cc2.h
+./cc/cc2/target/amd64-sysv/cgen.o: ./cc/cc2/target/amd64-sysv/arch.h
+./cc/cc2/target/amd64-sysv/code.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc2/target/amd64-sysv/code.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/amd64-sysv/code.o: ./cc/cc2/target/amd64-sysv/../../cc2.h
+./cc/cc2/target/amd64-sysv/code.o: ./cc/cc2/target/amd64-sysv/arch.h
+./cc/cc2/target/amd64-sysv/optm.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/amd64-sysv/optm.o: ./cc/cc2/target/amd64-sysv/../../cc2.h
+./cc/cc2/target/amd64-sysv/types.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/amd64-sysv/types.o: ./cc/cc2/target/amd64-sysv/../../cc2.h
+./cc/cc2/target/i386-sysv/cgen.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/i386-sysv/cgen.o: ./cc/cc2/target/i386-sysv/../../cc2.h
+./cc/cc2/target/i386-sysv/cgen.o: ./cc/cc2/target/i386-sysv/arch.h
+./cc/cc2/target/i386-sysv/code.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc2/target/i386-sysv/code.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/i386-sysv/code.o: ./cc/cc2/target/i386-sysv/../../cc2.h
+./cc/cc2/target/i386-sysv/code.o: ./cc/cc2/target/i386-sysv/arch.h
+./cc/cc2/target/i386-sysv/optm.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/i386-sysv/optm.o: ./cc/cc2/target/i386-sysv/../../cc2.h
+./cc/cc2/target/i386-sysv/types.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/i386-sysv/types.o: ./cc/cc2/target/i386-sysv/../../cc2.h
+./cc/cc2/target/qbe/cgen.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc2/target/qbe/cgen.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/qbe/cgen.o: ./cc/cc2/target/qbe/../../cc2.h
+./cc/cc2/target/qbe/cgen.o: ./cc/cc2/target/qbe/arch.h
+./cc/cc2/target/qbe/code.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc2/target/qbe/code.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/qbe/code.o: ./cc/cc2/target/qbe/../../cc2.h
+./cc/cc2/target/qbe/code.o: ./cc/cc2/target/qbe/arch.h
+./cc/cc2/target/qbe/optm.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/qbe/optm.o: ./cc/cc2/target/qbe/../../cc2.h
+./cc/cc2/target/z80-scc/cgen.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/z80-scc/cgen.o: ./cc/cc2/target/z80-scc/../../cc2.h
+./cc/cc2/target/z80-scc/cgen.o: ./cc/cc2/target/z80-scc/arch.h
+./cc/cc2/target/z80-scc/code.o: $(INCDIR)/scc/scc/cstd.h
+./cc/cc2/target/z80-scc/code.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/z80-scc/code.o: ./cc/cc2/target/z80-scc/../../cc2.h
+./cc/cc2/target/z80-scc/code.o: ./cc/cc2/target/z80-scc/arch.h
+./cc/cc2/target/z80-scc/optm.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/z80-scc/optm.o: ./cc/cc2/target/z80-scc/../../cc2.h
+./cc/cc2/target/z80-scc/types.o: $(INCDIR)/scc/scc/scc.h
+./cc/cc2/target/z80-scc/types.o: ./cc/cc2/target/z80-scc/../../cc2.h
+./cc/posix/cc.o: $(INCDIR)/scc/scc/arg.h
+./cc/posix/cc.o: $(INCDIR)/scc/scc/ldflags.h
+./cc/posix/cc.o: $(INCDIR)/scc/scc/scc.h
+./cc/posix/cc.o: $(INCDIR)/scc/scc/syscrts.h
+./cc/posix/cc.o: $(INCDIR)/scc/scc/sysincludes.h
+./cc/posix/cc.o: $(INCDIR)/scc/scc/syslibs.h
+./cc/posix/cc.o: ./cc/posix/config.h
+./ld/main.o: $(INCDIR)/scc/scc/mach.h
+./ld/main.o: ./ld/ld.h
+./ld/pass1.o: $(INCDIR)/scc/scc/ar.h
+./ld/pass1.o: $(INCDIR)/scc/scc/mach.h
+./ld/pass1.o: $(INCDIR)/scc/scc/scc.h
+./ld/pass1.o: ./ld/ld.h
+./ld/pass2.o: $(INCDIR)/scc/scc/mach.h
+./ld/pass2.o: ./ld/ld.h
+./ld/pass3.o: $(INCDIR)/scc/scc/mach.h
+./ld/pass3.o: ./ld/ld.h
+./ld/pass4.o: $(INCDIR)/scc/scc/mach.h
+./ld/pass4.o: ./ld/ld.h
+./ld/pass5.o: $(INCDIR)/scc/scc/mach.h
+./ld/pass5.o: ./ld/ld.h
+./ld/section.o: $(INCDIR)/scc/scc/mach.h
+./ld/section.o: $(INCDIR)/scc/scc/scc.h
+./ld/section.o: ./ld/ld.h
+./ld/symbol.o: $(INCDIR)/scc/scc/mach.h
+./ld/symbol.o: $(INCDIR)/scc/scc/scc.h
+./ld/symbol.o: ./ld/ld.h
+./nm.o: $(INCDIR)/scc/scc/ar.h
./nm.o: $(INCDIR)/scc/scc/arg.h
./nm.o: $(INCDIR)/scc/scc/mach.h
./objdump.o: $(INCDIR)/scc/scc/arg.h
--- a/src/libc/arch/amd64/Makefile
+++ b/src/libc/arch/amd64/Makefile
@@ -27,5 +27,9 @@
$(SYS): FORCE
+@cd $@ && $(MAKE)
+dep: inc-dep
+
dep clean:
$(FORALL)
+
+include deps.mk
--- /dev/null
+++ b/src/libc/arch/amd64/deps.mk
@@ -1,0 +1,34 @@
+#deps
+./darwin/_tzone.o: ./darwin/../../posix/_tzone.c
+./darwin/getenv.o: ./darwin/../../posix/getenv.c
+./darwin/raise.o: ./darwin/../../posix/raise.c
+./darwin/signal.o: ./darwin/../../posix/signal.c
+./darwin/time.o: ./darwin/../../posix/time.c
+./dragonfly/_getheap.o: ./dragonfly/../../posix/_getheap.c
+./dragonfly/_tzone.o: ./dragonfly/../../posix/_tzone.c
+./dragonfly/getenv.o: ./dragonfly/../../posix/getenv.c
+./dragonfly/raise.o: ./dragonfly/../../posix/raise.c
+./dragonfly/signal.o: ./dragonfly/../../posix/signal.c
+./dragonfly/time.o: ./dragonfly/../../posix/time.c
+./linux/_getheap.o: ./linux/../../posix/_getheap.c
+./linux/_tzone.o: ./linux/../../posix/_tzone.c
+./linux/getenv.o: ./linux/../../posix/getenv.c
+./linux/raise.o: ./linux/../../posix/raise.c
+./linux/signal.o: ./linux/../../posix/signal.c
+./linux/time.o: ./linux/../../posix/time.c
+./memchr.o: ./../../string/memchr.c
+./memcmp.o: ./../../string/memcmp.c
+./memmove.o: ./../../string/memmove.c
+./memset.o: ./../../string/memset.c
+./netbsd/_getheap.o: ./netbsd/../../posix/_getheap.c
+./netbsd/_tzone.o: ./netbsd/../../posix/_tzone.c
+./netbsd/getenv.o: ./netbsd/../../posix/getenv.c
+./netbsd/raise.o: ./netbsd/../../posix/raise.c
+./netbsd/signal.o: ./netbsd/../../posix/signal.c
+./netbsd/time.o: ./netbsd/../../posix/time.c
+./openbsd/_getheap.o: ./openbsd/../../posix/_getheap.c
+./openbsd/_tzone.o: ./openbsd/../../posix/_tzone.c
+./openbsd/getenv.o: ./openbsd/../../posix/getenv.c
+./openbsd/raise.o: ./openbsd/../../posix/raise.c
+./openbsd/signal.o: ./openbsd/../../posix/signal.c
+./openbsd/time.o: ./openbsd/../../posix/time.c
--- a/src/libc/arch/arm32/Makefile
+++ b/src/libc/arch/arm32/Makefile
@@ -22,5 +22,9 @@
$(SYS): FORCE
+@cd $@ && $(MAKE)
+dep: inc-dep
+
dep clean:
$(FORALL)
+
+include deps.mk
--- /dev/null
+++ b/src/libc/arch/arm32/deps.mk
@@ -1,0 +1,13 @@
+#deps
+./linux/_getheap.o: ./linux/../../posix/_getheap.c
+./linux/_open.o: ./linux/../../../syscall.h
+./linux/_tzone.o: ./linux/../../posix/_tzone.c
+./linux/getenv.o: ./linux/../../posix/getenv.c
+./linux/raise.o: ./linux/../../posix/raise.c
+./linux/signal.o: ./linux/../../posix/signal.c
+./linux/time.o: ./linux/../../posix/time.c
+./memchr.o: ./../../string/memchr.c
+./memcmp.o: ./../../string/memcmp.c
+./memcpy.o: ./../../string/memcpy.c
+./memmove.o: ./../../string/memmove.c
+./memset.o: ./../../string/memset.c
--- a/src/libc/arch/arm64/deps.mk
+++ b/src/libc/arch/arm64/deps.mk
@@ -6,3 +6,8 @@
./linux/raise.o: ./linux/../../posix/raise.c
./linux/signal.o: ./linux/../../posix/signal.c
./linux/time.o: ./linux/../../posix/time.c
+./memchr.o: ./../../string/memchr.c
+./memcmp.o: ./../../string/memcmp.c
+./memcpy.o: ./../../string/memcpy.c
+./memmove.o: ./../../string/memmove.c
+./memset.o: ./../../string/memset.c
--- a/src/libc/arch/i386/Makefile
+++ b/src/libc/arch/i386/Makefile
@@ -22,5 +22,9 @@
$(SYS): FORCE
+@cd $@ && $(MAKE)
+dep: inc-dep
+
dep clean:
$(FORALL)
+
+include deps.mk
--- /dev/null
+++ b/src/libc/arch/i386/deps.mk
@@ -1,0 +1,9 @@
+#deps
+./linux/_getheap.o: ./linux/../../posix/_getheap.c
+./linux/raise.o: ./linux/../../posix/raise.c
+./linux/signal.o: ./linux/../../posix/signal.c
+./memchr.o: ./../../string/memchr.c
+./memcmp.o: ./../../string/memcmp.c
+./memcpy.o: ./../../../string/memcpy.c
+./memmove.o: ./../../string/memmove.c
+./memset.o: ./../../string/memset.c