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@xxxxxxx> --- Makefile | 6 +++--- include/buildrules | 14 +++++++++----- libdisk/Makefile | 2 +- libhandle/Makefile | 2 +- libxcmd/Makefile | 2 +- libxfs/Makefile | 2 +- libxlog/Makefile | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) Index: b/Makefile =================================================================== --- a/Makefile +++ b/Makefile @@ -30,9 +30,9 @@ SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar. 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) Index: b/include/buildrules =================================================================== --- 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 Index: b/libdisk/Makefile =================================================================== --- a/libdisk/Makefile +++ b/libdisk/Makefile @@ -30,4 +30,4 @@ install-dev: default install-qa: install-dev --include .dep +-include .ltdep Index: b/libhandle/Makefile =================================================================== --- a/libhandle/Makefile +++ b/libhandle/Makefile @@ -27,4 +27,4 @@ install-dev: default install-qa: install-dev --include .dep +-include .ltdep Index: b/libxcmd/Makefile =================================================================== --- a/libxcmd/Makefile +++ b/libxcmd/Makefile @@ -34,4 +34,4 @@ include $(BUILDRULES) install install-dev install-qa: default --include .dep +-include .ltdep Index: b/libxfs/Makefile =================================================================== --- a/libxfs/Makefile +++ b/libxfs/Makefile @@ -48,4 +48,4 @@ install-dev: default install-qa: default --include .dep +-include .ltdep Index: b/libxlog/Makefile =================================================================== --- a/libxlog/Makefile +++ b/libxlog/Makefile @@ -21,4 +21,4 @@ include $(BUILDRULES) install install-dev install-qa: default --include .dep +-include .ltdep _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs