shithub: scc

Download patch

ref: 874cce9c8746da398c57e021ea6ee740ca71e1cb
parent: 866b125797cfd5ab0ebb60024c39ca91c5053cea
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed May 16 16:45:36 EDT 2018

Fix inclusion dependencies generation

.c dependencies do nothing.

--- a/as/Makefile
+++ b/as/Makefile
@@ -27,32 +27,32 @@
 include target/z80.mk
 
 #deps
-expr.c: ./../inc/scc.h
-expr.c: ./as.h
-ins.c: ./../inc/scc.h
-ins.c: ./as.h
-main.c: ./../inc/arg.h
-main.c: ./../inc/scc.h
-main.c: ./as.h
-myro.c: ./../inc/myro.h
-myro.c: ./../inc/scc.h
-myro.c: ./as.h
-parser.c: ./../inc/scc.h
-parser.c: ./as.h
-symbol.c: ./../inc/scc.h
-symbol.c: ./as.h
-target/x80/ins.c: target/x80/../../../inc/scc.h
-target/x80/ins.c: target/x80/../../as.h
-target/x80/ins.c: target/x80/proc.h
-target/x80/z80.c: target/x80/../../../inc/scc.h
-target/x80/z80.c: target/x80/../../as.h
-target/x80/z80.c: target/x80/../x80/proc.h
-target/x86/amd64.c: target/x86/../../../inc/scc.h
-target/x86/amd64.c: target/x86/../../as.h
-target/x86/i386.c: target/x86/../../../inc/scc.h
-target/x86/i386.c: target/x86/../../as.h
-target/x86/i386.c: target/x86/../x86/proc.h
-target/x86/i8086.c: target/x86/arch16.h
-target/x86/ins.c: target/x86/../../../inc/scc.h
-target/x86/ins.c: target/x86/../../as.h
-target/x86/ins.c: target/x86/proc.h
+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/x86/amd64.o: ./target/x86/../../../inc/scc.h
+target/x86/amd64.o: ./target/x86/../../as.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/i8086.o: ./target/x86/arch16.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/ld/Makefile
+++ b/ld/Makefile
@@ -21,15 +21,15 @@
 distclean: clean
 
 #deps
-coff32.c: ./../inc/coff32/filehdr.h
-coff32.c: ./../inc/coff32/scnhdr.h
-coff32.c: ./../inc/coff32/syms.h
-coff32.c: ./../inc/scc.h
-coff32.c: ./ld.h
-formats.c: ./ld.h
-main.c: ./../inc/ar.h
-main.c: ./../inc/scc.h
-main.c: ./../inc/syslibs.h
-main.c: ./ld.h
-obj.c: ./../inc/scc.h
-obj.c: ./ld.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
+formats.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
@@ -6,8 +6,8 @@
 (sed '/^#deps/q' Makefile
 for i in `find . -name '*.c'`
 do
-	file=${i#./}
-	dir=`dirname $i | sed -e 's,/*$,,' -e 's,\./,,'`
+	file=`echo $i | sed -e 's,^./,,' -e 's/\.c$/.o/'`
+	dir=`dirname $i | sed 's,/*$,,'`
 	sed -n '/#include "/ s,#include "\(.*\)",'"$file: $dir"'/\1,p' $i
 done |
 sort) > $$.tmp && mv $$.tmp Makefile
--- a/nm/Makefile
+++ b/nm/Makefile
@@ -21,13 +21,13 @@
 distclean: clean
 
 #deps
-coff32.c: ./../inc/coff32/filehdr.h
-coff32.c: ./../inc/coff32/scnhdr.h
-coff32.c: ./../inc/coff32/syms.h
-coff32.c: ./../inc/scc.h
-coff32.c: ./nm.h
-formats.c: ./nm.h
-main.c: ./../inc/ar.h
-main.c: ./../inc/arg.h
-main.c: ./../inc/scc.h
-main.c: ./nm.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: ./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