]> git.sur5r.net Git - openldap/commitdiff
Minor changes to support parallel make: Eliminate for-loops for building
authorHoward Chu <hyc@openldap.org>
Sat, 24 Jul 1999 08:25:48 +0000 (08:25 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 24 Jul 1999 08:25:48 +0000 (08:25 +0000)
subdirectories; add explicit dependencies for subdirs that need them.

Makefile.in
build/dir.mk
libraries/Makefile.in

index e0554966622c38627bca91c64b4784c9f1902c7b..39399a83c6023f16a9d40e10b8a81866631fa87b 100644 (file)
@@ -13,6 +13,10 @@ SUBDIRS= include libraries clients servers tests doc
 CLEANDIRS= contrib
 INSTALLDIRS= 
 
+libraries: include
+clients servers: libraries
+tests: clients servers
+
 makefiles:     FORCE
        ./config.status
 
index ebf4d813e75034d4c7af226bb60db3eedcf663a3..3f1abbd0735b7e80c743ab63b5e013c04bfe4766 100644 (file)
@@ -6,45 +6,12 @@
 ## Makes subdirectories
 ##
 
+all-common install-common clean-common veryclean-common depend-common: FORCE
+       @T=`echo $@ | cut -d- -f1`; echo "Making $$T in `$(PWD)`"; \
+        $(MAKE) $(MFLAGS) $(SUBDIRS) TARG=$$T
 
-all-common: FORCE
-       @echo "Making all in `$(PWD)`"
-       @for i in $(SUBDIRS) $(ALLDIRS); do             \
-               echo "  Entering subdirectory $$i";             \
-               ( cd $$i; $(MAKE) $(MFLAGS) all );              \
-               echo " ";                                                               \
-       done
-
-install-common: FORCE
-       @echo "Making install in `$(PWD)`"
-       @for i in $(SUBDIRS) $(INSTALLDIRS); do         \
-               echo "  Entering subdirectory $$i";             \
-               ( cd $$i; $(MAKE) $(MFLAGS) install );  \
-               echo " ";                                                               \
-       done
-
-clean-common: FORCE
-       @echo "Making clean in `$(PWD)`"
-       @for i in $(SUBDIRS) $(CLEANDIRS); do           \
-               echo "  Entering subdirectory $$i";             \
-               ( cd $$i; $(MAKE) $(MFLAGS) clean );    \
-               echo " ";                                                               \
-       done
-
-veryclean-common: FORCE
-       @echo "Making veryclean in `$(PWD)`"
-       @for i in $(SUBDIRS) $(CLEANDIRS); do           \
-               echo "  Entering subdirectory $$i";             \
-               ( cd $$i; $(MAKE) $(MFLAGS) veryclean );        \
-               echo " ";                                                               \
-       done
-
-depend-common: FORCE
-       @echo "Making depend in `$(PWD)`"
-       @for i in $(SUBDIRS) $(DEPENDDIRS); do          \
-               echo "  Entering subdirectory $$i";             \
-               ( cd $$i; $(MAKE) $(MFLAGS) depend );   \
-               echo " ";                                                               \
-       done
+$(SUBDIRS): FORCE
+       @echo "  Entering subdirectory $@"; cd $@; $(MAKE) $(MFLAGS) $(TARG); \
+       echo ""
 
 Makefile: $(top_srcdir)/build/dir.mk
index 7ffb1b9bfa7482cf641415865f7060632a9de71b..56bf0eb39468c6d4c70eb2371429bef5f203ba90 100644 (file)
@@ -5,3 +5,4 @@
 
 SUBDIRS= liblutil libldif liblber libldap libavl libldbm libldap_r
 
+libldap libldap_r: liblber