From 02ef19621032044c1488931b3f970e11dca0afe0 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 29 Dec 2005 22:45:29 -0500 Subject: [PATCH] Avoid needlessly recompilation of library objection files Fixing the problem of parallel builds sometimes not creating the library subdirectories caused library object files to get constantly recompiled. Fix this by remaping how the Makefile subdirectories decide to create the subdirectories. Signed-off-by: "Theodore Ts'o" --- lib/ChangeLog | 7 +++++++ lib/Makefile.bsd-lib | 5 ++--- lib/Makefile.checker | 8 +++----- lib/Makefile.darwin-lib | 7 +++---- lib/Makefile.elf-lib | 8 +++----- lib/Makefile.library | 6 +++++- lib/Makefile.profile | 6 ++---- lib/Makefile.solaris-lib | 7 +++---- 8 files changed, 28 insertions(+), 26 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 3e62728..5604f96 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,10 @@ +2005-12-29 Theodore Ts'o + + * Makefile.bsd-lib, Makefile.checker, Makefile.darwin-lib, + Makefile.elf-lib, Makefile.library, Makefile.profile, + Makefile.solaris-lib: Revamp subdirs target so to avoid + needless recompilation of library object files. + 2005-12-10 Theodore Ts'o * Makefile.elf-lib, Makefile.solaris-lib: Add $(LDFLAGS) to the diff --git a/lib/Makefile.bsd-lib b/lib/Makefile.bsd-lib index d11301f..e49dd7a 100644 --- a/lib/Makefile.bsd-lib +++ b/lib/Makefile.bsd-lib @@ -13,9 +13,8 @@ all:: pic image subdirs:: pic - -pic: - mkdir pic + @echo " MKDIR pic" + @mkdir -p pic BSD_LIB = $(BSDLIB_IMAGE).so.$(BSDLIB_VERSION) BSDLIB_PIC_FLAG = -fpic diff --git a/lib/Makefile.checker b/lib/Makefile.checker index 372c088..304fc55 100644 --- a/lib/Makefile.checker +++ b/lib/Makefile.checker @@ -1,10 +1,8 @@ all:: checker $(LIBRARY)_chk.a -subdirs:: checker - -checker: - @echo " MKDIR $@" - @mkdir checker +subdirs:: Makefile + @echo " MKDIR checker" + @mkdir -p checker clean:: $(RM) -rf checker diff --git a/lib/Makefile.darwin-lib b/lib/Makefile.darwin-lib index 7ab584f..c414a91 100644 --- a/lib/Makefile.darwin-lib +++ b/lib/Makefile.darwin-lib @@ -12,10 +12,9 @@ all:: pic image -subdirs:: pic - -pic: - mkdir pic +subdirs:: Makefile + @echo " MKDIR pic" + @mkdir -p pic BSD_LIB = $(BSDLIB_IMAGE).$(BSDLIB_VERSION).dylib BSDLIB_PIC_FLAG = -fPIC diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib index 97d9a70..8819ced 100644 --- a/lib/Makefile.elf-lib +++ b/lib/Makefile.elf-lib @@ -11,13 +11,11 @@ # ELF_INSTALL_DIR = $(SHLIBDIR) # ELF_OTHER_LIBS = -lc -all:: elfshared image +all:: image -subdirs:: elfshared - -elfshared: +subdirs:: Makefile @echo " MKDIR elfshared" - @mkdir elfshared + @mkdir -p elfshared ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION) ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION) diff --git a/lib/Makefile.library b/lib/Makefile.library index 5cff608..92001a7 100644 --- a/lib/Makefile.library +++ b/lib/Makefile.library @@ -4,7 +4,11 @@ install-shlibs:: uninstall-shlibs:: -subdirs:: +subdirs:: Makefile + @touch subdirs + +clean:: + @$(RM) -f subdirs $(LIBRARY).a: $(OBJS) @echo " GEN_LIB $@" diff --git a/lib/Makefile.profile b/lib/Makefile.profile index 44b5704..ad0f1df 100644 --- a/lib/Makefile.profile +++ b/lib/Makefile.profile @@ -1,10 +1,8 @@ all:: profiled $(LIBRARY)_p.a -subdirs:: profiled - -profiled: +subdirs:: Makefile @echo " MKDIR $@" - @mkdir profiled + @mkdir -p profiled clean:: $(RM) -rf profiled diff --git a/lib/Makefile.solaris-lib b/lib/Makefile.solaris-lib index b75c20e..4bb3f6d 100644 --- a/lib/Makefile.solaris-lib +++ b/lib/Makefile.solaris-lib @@ -13,10 +13,9 @@ all:: elfshared image -subdirs:: elfshared - -elfshared: - mkdir elfshared +subdirs:: Makefile + @echo " MKDIR elfshared" + @mkdir -p elfshared ELF_LIB = $(ELF_IMAGE).so.$(ELF_VERSION) ELF_SONAME = $(ELF_IMAGE).so.$(ELF_SO_VERSION) -- 1.8.3.1