aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Elder <aelder@sgi.com>2010-07-30 21:51:23 +0000
committerAlex Elder <aelder@sgi.com>2010-08-03 09:14:00 -0500
commit79a27d3764adce0cb9f50d63eb374e8b84bd6601 (patch)
tree697fbc3759ee4884d796cd7dfd6b3bf0005c06b5
parent9c177aedb11ecc89b75413054a23624efb71a45c (diff)
downloaddmapi-dev-79a27d3764adce0cb9f50d63eb374e8b84bd6601.tar.gz
dmapi: fix depend targets
There's no need to re-make the dependency files all the time. Make it so the "depend" target rebuilds the ".dep" file only if necessary. Signed-off-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--include/buildrules7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/buildrules b/include/buildrules
index e509833..706d948 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -8,7 +8,7 @@ include $(TOPDIR)/include/builddefs
clean clobber : $(addsuffix -clean,$(SUBDIRS))
rm -f $(DIRT)
- @rm -fr .libs
+ @rm -fr .libs .dep
%-clean:
$(MAKE) -C $* clean
@@ -72,9 +72,10 @@ ifdef LTLIBRARY
DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
endif
-depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS))
+depend : .dep $(addsuffix -depend,$(SUBDIRS))
+
+.dep : $(CFILES) $(HFILES)
$(DEPENDSCRIPT) > .dep
- test -s .dep || rm -f .dep
%-depend:
$(MAKE) -C $* depend