You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/07/06 02:09:51 UTC

cvs commit: apache-2.0/src/build rules.mk

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)