Browse files

Add "show-deps" make target; rearrange existing dependencies to match…

… output

The hard-coded dependencies in Makefile were already exactly correct;
they just weren't alphabetized as gcc -MM alphabetizes them.
  • Loading branch information...
1 parent aeb24b3 commit ec5a412068364f63ea795bf273de3587b51abf5a @SamB SamB committed with jonas Sep 7, 2012
Showing with 17 additions and 5 deletions.
  1. +17 −5 Makefile
22 Makefile
@@ -154,14 +154,26 @@ configure: acinclude.m4
.PHONY: all all-debug doc doc-man doc-html install install-doc \
install-doc-man install-doc-html clean spell-check dist rpm
-io.o: io.c io.h tig.h
-graph.o: graph.c graph.h tig.h
-refs.o: refs.c refs.h tig.h
-tig.o: tig.c tig.h graph.h io.h refs.h git.h
+graph.o: graph.c tig.h graph.h
+io.o: io.c tig.h io.h
+refs.o: refs.c tig.h io.h refs.h
+test-graph.o: test-graph.c tig.h io.h graph.h
+tig.o: tig.c tig.h io.h refs.h graph.h git.h
tig: tig.o io.o graph.o refs.o
-test-graph.o: test-graph.c io.h tig.h graph.h
test-graph: io.o graph.o
+# To check the above.
+# NOTE: Assumes GCC, and that no local headers are conditionally
+# included (with the exception of config.h, which we take care of in
+# config.make).
+ @echo "== without config.h =="
+ $(CC) -MM *.c
+ @echo "== with config.h =="
tig.spec: contrib/
sed -e 's/@@VERSION@@/$(RPM_VERSION)/g' \
-e 's/@@RELEASE@@/$(RPM_RELEASE)/g' < $< > $@

0 comments on commit ec5a412

Please sign in to comment.