From: Alex Elder Date: Fri, 30 Jul 2010 21:45:45 +0000 (+0000) Subject: xfsprogs: fix depend targets X-Git-Tag: v3.1.3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=932b0ba9d2ea7e1c29e09709a98831064b75e318;p=thirdparty%2Fxfsprogs-dev.git xfsprogs: 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 Reviewed-by: Dave Chinner --- diff --git a/Makefile b/Makefile index 68025e5b4..9d98bb00a 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/platform_defs.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/platform_defs.h ifeq ($(HAVE_BUILDDEFS), yes) LDIRDIRT = $(SRCDIR) diff --git a/include/buildrules b/include/buildrules index 77d4c1a4a..f53b5ee4d 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 diff --git a/libdisk/Makefile b/libdisk/Makefile index 32416a5b6..f56f3b491 100644 --- a/libdisk/Makefile +++ b/libdisk/Makefile @@ -30,4 +30,4 @@ install-dev: default install-qa: install-dev --include .dep +-include .ltdep diff --git a/libhandle/Makefile b/libhandle/Makefile index 9422c344c..865ca221e 100644 --- a/libhandle/Makefile +++ b/libhandle/Makefile @@ -27,4 +27,4 @@ install-dev: default install-qa: install-dev --include .dep +-include .ltdep diff --git a/libxcmd/Makefile b/libxcmd/Makefile index 60b6f9ed6..b3544f42c 100644 --- a/libxcmd/Makefile +++ b/libxcmd/Makefile @@ -34,4 +34,4 @@ include $(BUILDRULES) install install-dev install-qa: default --include .dep +-include .ltdep diff --git a/libxfs/Makefile b/libxfs/Makefile index 5088b5513..990cbf7ec 100644 --- a/libxfs/Makefile +++ b/libxfs/Makefile @@ -48,4 +48,4 @@ install-dev: default install-qa: default --include .dep +-include .ltdep diff --git a/libxlog/Makefile b/libxlog/Makefile index 7358fb133..467366387 100644 --- a/libxlog/Makefile +++ b/libxlog/Makefile @@ -21,4 +21,4 @@ include $(BUILDRULES) install install-dev install-qa: default --include .dep +-include .ltdep