Whamcloud - gitweb
Avoid needlessly recompilation of library objection files
authorTheodore Ts'o <tytso@mit.edu>
Fri, 30 Dec 2005 03:45:29 +0000 (22:45 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 30 Dec 2005 03:45:29 +0000 (22:45 -0500)
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" <tytso@mit.edu>
lib/ChangeLog
lib/Makefile.bsd-lib
lib/Makefile.checker
lib/Makefile.darwin-lib
lib/Makefile.elf-lib
lib/Makefile.library
lib/Makefile.profile
lib/Makefile.solaris-lib

index 3e62728..5604f96 100644 (file)
@@ -1,3 +1,10 @@
+2005-12-29  Theodore Ts'o  <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
 
        * Makefile.elf-lib, Makefile.solaris-lib: Add $(LDFLAGS) to the
index d11301f..e49dd7a 100644 (file)
@@ -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
index 372c088..304fc55 100644 (file)
@@ -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
index 7ab584f..c414a91 100644 (file)
 
 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
index 97d9a70..8819ced 100644 (file)
 # 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)
index 5cff608..92001a7 100644 (file)
@@ -4,7 +4,11 @@ install-shlibs::
 
 uninstall-shlibs::
 
-subdirs::
+subdirs:: Makefile
+       @touch subdirs
+
+clean::
+       @$(RM) -f subdirs
 
 $(LIBRARY).a: $(OBJS)
        @echo " GEN_LIB $@"
index 44b5704..ad0f1df 100644 (file)
@@ -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
index b75c20e..4bb3f6d 100644 (file)
 
 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)