dmapi: fix depend targets
Alex Elder
aelder at sgi.com
Wed Jun 9 09:13:32 CDT 2010
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 at sgi.com>
---
include/buildrules | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: b/include/buildrules
===================================================================
--- 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
More information about the xfs
mailing list