summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--Makefile2
-rw-r--r--dep.mk16
-rw-r--r--depend.txr6
4 files changed, 24 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index efa92361..5a08bf20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-02 Kaz Kylheku <kkylheku@gmail.com>
+
+ Fix annoyances with dependency generation, such as picking up local
+ files that are not in the project.
+
+ * Makefile (depend): Rule passes object file names as arguments
+ to depend.txr script.
+
+ * depend.txr: Changed to take names of object files from command line,
+ rather than scanning the directory for all .c files. Switched
+ to new style next directives, using quasiliterals.
+
+ * dep.mk: Regenerated.
+
2009-11-28 Kaz Kylheku <kkylheku@gmail.com>
* Makefile (CFLAGS): If the compiler matches the pattern %g++,
diff --git a/Makefile b/Makefile
index 58cf57a3..e756e35c 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ distclean: clean
.PHONY: depend
depend:
- $(PROG) $(top_srcdir)/depend.txr > $(top_srcdir)/dep.mk
+ $(PROG) $(top_srcdir)/depend.txr $(OBJS) > $(top_srcdir)/dep.mk
TESTS := $(patsubst $(top_srcdir)/%.txr,./%.ok,\
$(shell find $(top_srcdir)/tests -name '*.txr' | sort))
diff --git a/dep.mk b/dep.mk
index 6662eb5f..355dc989 100644
--- a/dep.mk
+++ b/dep.mk
@@ -1,15 +1,11 @@
-parser.tab.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/regex.h $(top_srcdir)/parser.h
-utf8.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/utf8.h
-lib.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/hash.h $(top_srcdir)/unwind.h $(top_srcdir)/stream.h $(top_srcdir)/utf8.h
+txr.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/stream.h $(top_srcdir)/gc.h $(top_srcdir)/unwind.h $(top_srcdir)/parser.h $(top_srcdir)/match.h $(top_srcdir)/utf8.h $(top_srcdir)/txr.h
lex.yy.o: config.h $(top_srcdir)/lib.h y.tab.h $(top_srcdir)/gc.h $(top_srcdir)/stream.h $(top_srcdir)/utf8.h $(top_srcdir)/parser.h
-popen_getwc.o:
-test-sprintf.o:
-test.o:
-regex.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/unwind.h $(top_srcdir)/regex.h
y.tab.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/regex.h $(top_srcdir)/utf8.h $(top_srcdir)/parser.h
-unwind.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/stream.h $(top_srcdir)/txr.h $(top_srcdir)/unwind.h
-txr.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/stream.h $(top_srcdir)/gc.h $(top_srcdir)/unwind.h $(top_srcdir)/parser.h $(top_srcdir)/match.h $(top_srcdir)/utf8.h $(top_srcdir)/txr.h
match.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/unwind.h $(top_srcdir)/regex.h $(top_srcdir)/stream.h $(top_srcdir)/parser.h $(top_srcdir)/txr.h $(top_srcdir)/utf8.h $(top_srcdir)/match.h
-stream.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/unwind.h $(top_srcdir)/stream.h $(top_srcdir)/utf8.h
+lib.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/hash.h $(top_srcdir)/unwind.h $(top_srcdir)/stream.h $(top_srcdir)/utf8.h
+regex.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/unwind.h $(top_srcdir)/regex.h
gc.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/stream.h $(top_srcdir)/hash.h $(top_srcdir)/txr.h $(top_srcdir)/gc.h
+unwind.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/stream.h $(top_srcdir)/txr.h $(top_srcdir)/unwind.h
+stream.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/unwind.h $(top_srcdir)/stream.h $(top_srcdir)/utf8.h
hash.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/gc.h $(top_srcdir)/unwind.h $(top_srcdir)/hash.h
+utf8.o: config.h $(top_srcdir)/lib.h $(top_srcdir)/utf8.h
diff --git a/depend.txr b/depend.txr
index 9b5e568b..61dfcec3 100644
--- a/depend.txr
+++ b/depend.txr
@@ -1,7 +1,7 @@
-@(next)$.
+@(next :args)
@(collect)
-@file.c
-@(next)@file.c
+@file.o
+@(next `@file.c`)
@(collect)
#include "@hdr"
@(cases)