httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/build rules.mk
Date Thu, 06 Jul 2000 00:09:51 GMT
rbb         00/07/05 17:09:49

  Modified:    src/build rules.mk
  Log:
  Fix make distclean and make clean.  Before this commit, we only cleaned
  directories that have been configured by the last call to ./configure.
  This means that if somebody does ./configure --with-mpm=dexter;make and
  then ./configure --with-mpm=prefork;make and then make distclean, dexter
  doesn't get cleaned up.  Same thing goes for clean.
  
  All this does is with distclean and clean, after we have recursively
  gone through the tree to clean everything, we do a quick find to get all
  of the left-over Makefiles.  Then we just do the same operation on those
  directories.
  
  Revision  Changes    Path
  1.21      +18 -2     apache-2.0/src/build/rules.mk
  
  Index: rules.mk
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/build/rules.mk,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- rules.mk	2000/06/27 22:25:12	1.20
  +++ rules.mk	2000/07/06 00:09:48	1.21
  @@ -104,7 +104,11 @@
   all: all-recursive
   install: install-recursive
   
  -distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
  +# if we are doing a distclean or clean, we actually want to hit every 
  +# directory that has ever been configured.  To do this, we just do a quick
  +# find for all the leftover Makefiles, and then run make distclean in those
  +# directories.
  +distclean-recursive clean-recursive depend-recursive all-recursive install-recursive:
   	@otarget=`echo $@|sed s/-recursive//`; \
   	list='$(SUBDIRS)'; for i in $$list; do \
   		target="$$otarget"; \
  @@ -116,7 +120,19 @@
   		(cd $$i && $(MAKE) $$target) || exit 1; \
   	done; \
   	if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi;\
  -	if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
  +	if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi; \
  +	if test "$$otarget" = "distclean" || test "$$otarget" = "clean"; then\
  +		for d in `find . -name Makefile`; do \
  +			i=`dirname "$$d"`; \
  +			target="$$otarget"; \
  +			echo "Making $$target in $$i"; \
  +			if test "$$i" = "."; then \
  +				ok=yes; \
  +				target="$$target-p"; \
  +			fi; \
  +			(cd $$i && $(MAKE) $$target) || exit 1; \
  +		done; \
  +	fi
   
   all-p: $(targets)
   install-p: $(targets) $(install_targets)
  
  
  

Mime
View raw message