From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Thu, 14 Dec 2006 15:24:20 +0000 (+0100)
Subject: rigorous cleaning: do rm -rf "$(outdir)".
X-Git-Tag: release/2.11.3-1~21
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7ead89adca7cafea9188436705e9458dd2af99b8;p=lilypond.git

rigorous cleaning: do rm -rf "$(outdir)".

This fixes problems with too large outdirs, and obviates
complex rm -rF outdir/subdir hacks.
---

diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile
index 9974762647..11653d575f 100644
--- a/Documentation/user/GNUmakefile
+++ b/Documentation/user/GNUmakefile
@@ -192,13 +192,13 @@ $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internal
 $(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
 
 $(outdir)/%.png: %.png
-	convert -geometry 50x50% $< $@
+	convert -depth 8 -geometry 50x50% $< $@
 
 $(outdir)/%.png: %.eps
 	gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
 
 $(outdir)/%.pdf: %.png
-	convert $< $@
+	convert -depth 8 $< $@
 
 $(outdir)/%.pdf: %.eps
 	gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
@@ -229,11 +229,6 @@ $(outdir)/music-glossary/source:
 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
  $(datafiles) $(PDF_FILES) $(source-links) info info-dir
 
-local-WWW-clean: deep-WWW-clean
-
-deep-WWW-clean:
-	rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
-
 info-dir:
 	$(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary
 
@@ -241,9 +236,6 @@ info-dir:
 $(outdir)/%.bib: %.bib
 	ln -f $< $@
 
-local-clean:
-	rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
-	rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/music-glossary
 
 # lilypond.texi deps
 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
@@ -270,10 +262,3 @@ $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_
 ## unused
 $(outdir)/interfaces.itexi: dummy
 	cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc
-
-
-local-clean: local-delete
-
-# use `find` together with `xargs` to avoid too long argument-lists.
-local-delete:
-	$(FIND) $(outdir)/ -empty -name '*' | xargs rm -f
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 4bcf1a54fb..423d2154ca 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -212,16 +212,6 @@ $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-fo
 TAGS.make: dummy
 	etags -o $@ $(find $(top-src-dir) -name 'GNUmakefile*' -o -name '*.make')
 
-local-clean: build-dir-setup-clean local-web-clean
-
-local-web-clean:
-	rm -rf $(outdir)/web-root/
-
-
-
-build-dir-setup-clean:
-	cd $(top-build-dir) && rm -rf share
-
 $(config_h): config.hh.in
 #
 # this is to prevent people from getting
diff --git a/input/regression/GNUmakefile b/input/regression/GNUmakefile
index 15b634bccf..df3a19a13b 100644
--- a/input/regression/GNUmakefile
+++ b/input/regression/GNUmakefile
@@ -6,9 +6,3 @@ LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
 include $(depth)/make/stepmake.make
 TITLE=LilyPond Regression Tests
 
-local-clean: local-delete
-
-# use `find` together with `xargs` to avoid too long argument-lists.
-local-delete:
-	$(FIND) $(outdir)/ -empty -name '*' | xargs rm -f
-
diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make
index 26874ad5b5..7546bbd2b5 100644
--- a/stepmake/stepmake/generic-targets.make
+++ b/stepmake/stepmake/generic-targets.make
@@ -7,9 +7,8 @@ all:	 default
 man:
 	$(LOOP)
 
-# be careful about deletion.
 clean: local-clean
-	-rm -f $(outdir)/*
+	-rm -rf "./$(outdir)"
 	$(LOOP)
 
 ifneq ($(strip $(depth)),.)
@@ -23,8 +22,8 @@ distclean: clean
 
 cvs-clean:
 	$(MAKE) local-distclean
-	find . -type d -name out | xargs rm -rf
-	find . -type d -name out-www | xargs rm -rf
+	rm -rf out
+	rm -rf out-www
 	rm -f aclocal.m4 configure
 
 maintainerclean: