diff options
author | Alex Elder <aelder@sgi.com> | 2010-07-30 21:49:48 +0000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-08-03 09:23:00 -0500 |
commit | 2294e28218e02b4568c42156a1788409547e0f61 (patch) | |
tree | 494a90b116221a75e8868175a03ae76d54460c1f /include | |
parent | 0629d835881075c4dfa999b8f9ed9531bd53f1d6 (diff) |
xfstests: 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.
Also change the name of the dependency file created for "ltdepend"
to be ".ltdep".
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/buildrules | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/buildrules b/include/buildrules index 5388210e..d8ef6b1e 100644 --- a/include/buildrules +++ b/include/buildrules @@ -8,7 +8,7 @@ include $(TOPDIR)/include/builddefs clean clobber : $(addsuffix -clean,$(SUBDIRS)) $(Q)rm -f $(DIRT) - $(Q)rm -fr .libs .dep + $(Q)rm -fr .libs .ltdep .dep %-clean: @echo "Cleaning $*" @@ -75,11 +75,17 @@ $(_FORCE): MAKEDEP := $(MAKEDEPEND) $(CFLAGS) -ltdepend: $(CFILES) $(HFILES) - @echo " [DEP]" - $(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' > .dep +ltdepend: .ltdep + +.ltdep: $(CFILES) $(HFILES) + @echo " [LTDEP]" + $(Q)[ -n "$(CFILES)" ] && \ + $(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' > .ltdep + +depend: .dep -depend: $(CFILES) $(HFILES) +.dep: $(CFILES) $(HFILES) @echo " [DEP]" - $(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1,' > .dep + $(Q)[ -n "$(CFILES)" ] && \ + $(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1,' > .dep |