aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Elder <aelder@sgi.com>2010-07-30 21:48:47 +0000
committerAlex Elder <aelder@sgi.com>2010-08-03 09:17:17 -0500
commit77b5dc932356281f008cb202947430178fa2077c (patch)
tree7ba5c336934c4b0b980c3d5c8573e65c332aecca
parente8b7c4f54a2ce109ba7557aa0a10d4876ee3860b (diff)
downloadxfsdump-dev-77b5dc932356281f008cb202947430178fa2077c.tar.gz
xfsdump: 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>
-rw-r--r--Makefile6
-rw-r--r--dump/Makefile2
-rw-r--r--include/buildrules16
-rw-r--r--inventory/Makefile2
-rw-r--r--librmt/Makefile2
-rw-r--r--restore/Makefile2
6 files changed, 17 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index ba48f21c..b1a73501 100644
--- a/Makefile
+++ b/Makefile
@@ -30,9 +30,9 @@ SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar.gz
CONFIGURE = aclocal.m4 configure config.guess config.sub install-sh ltmain.sh
LSRCFILES = configure.in release.sh README VERSION $(CONFIGURE)
-LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
- built .census install.* install-dev.* *.gz autom4te.cache/* libtool \
- include/builddefs include/config.h
+LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
+ conftest* built .census install.* install-dev.* *.gz \
+ autom4te.cache/* libtool include/builddefs include/config.h
ifeq ($(HAVE_BUILDDEFS), yes)
LDIRDIRT = $(SRCDIR)
diff --git a/dump/Makefile b/dump/Makefile
index e0e6f34b..8c6172e7 100644
--- a/dump/Makefile
+++ b/dump/Makefile
@@ -105,7 +105,7 @@ install: default
$(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
install-dev:
-depend: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
+.dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
$(COMMINCL) $(COMMON):
@echo " [LN] $@"
diff --git a/include/buildrules b/include/buildrules
index c2e3ebe6..4d55d01f 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -7,7 +7,7 @@ _BUILDRULES_INCLUDED_ = 1
include $(TOPDIR)/include/builddefs
clean clobber : $(addsuffix -clean,$(SUBDIRS))
- @rm -f $(DIRT) .dep
+ @rm -f $(DIRT) .ltdep .dep
@rm -fr $(DIRDIRT)
%-clean:
@echo "Cleaning $*"
@@ -94,10 +94,14 @@ $(_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)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' > .ltdep
+
+depend: .dep
-depend: $(CFILES) $(HFILES)
+.dep: $(CFILES) $(HFILES)
@echo " [DEP]"
- $(Q)$(MAKEDEP) $(CFILES) > .dep
+ $(Q)[ -n "$(CFILES)" ] && $(MAKEDEP) $(CFILES) > .dep
diff --git a/inventory/Makefile b/inventory/Makefile
index 4bc1e095..cda145e1 100644
--- a/inventory/Makefile
+++ b/inventory/Makefile
@@ -13,4 +13,4 @@ default install install-dev:
include $(BUILDRULES)
--include .dep
+-include .ltdep
diff --git a/librmt/Makefile b/librmt/Makefile
index 2493d210..534acad9 100644
--- a/librmt/Makefile
+++ b/librmt/Makefile
@@ -21,4 +21,4 @@ include $(BUILDRULES)
install install-dev: default
--include .dep
+-include .ltdep
diff --git a/restore/Makefile b/restore/Makefile
index d70f88d4..dd7304fe 100644
--- a/restore/Makefile
+++ b/restore/Makefile
@@ -117,7 +117,7 @@ install: default
$(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
install-dev:
-depend: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
+.dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
$(COMMINCL) $(COMMON):
@echo " [LN] $@"