dmapi: fix depend targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

---
 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

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux