[SCM] audacity/master: Add distclean.patch to make dh_auto_clean work again.

bdrung at users.alioth.debian.org bdrung at users.alioth.debian.org
Tue Oct 22 10:41:51 UTC 2013


The following commit has been merged in the master branch:
commit df4d28a1600a98201de3817dc1a1f4ca31548a37
Author: Benjamin Drung <bdrung at debian.org>
Date:   Tue Oct 22 12:41:43 2013 +0200

    Add distclean.patch to make dh_auto_clean work again.

diff --git a/debian/patches/distclean.patch b/debian/patches/distclean.patch
new file mode 100644
index 0000000..fbafcf4
--- /dev/null
+++ b/debian/patches/distclean.patch
@@ -0,0 +1,147 @@
+Description: Improve distclean target.
+ distclean will be run for every subdirectory that contains a Makefile instead
+ of speculatively calling distclean on every subdirectory and ignoring errors.
+Author: Benjamin Drung <bdrung at debian.org>
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -149,8 +149,10 @@
+ 
+ clean:
+ 	$(MAKE) -C lib-src clean
++	$(MAKE) -C locale clean
++	test ! -f tests/Makefile || $(MAKE) -C tests clean
+ 	$(MAKE) -C src clean
+-	-$(MAKE) -C tests clean
++
+ 	rm -f audacity
+ 	rm -f help/audacity.1.gz
+ 	rm -rf Audacity.app
+@@ -163,11 +165,11 @@
+ 	rm -f `find . -name core`
+ 
+ distclean: clean
+-	$(MAKE) -C locale distclean
+ 	$(MAKE) -C lib-src distclean
+-	-$(MAKE) -C tests distclean
++	$(MAKE) -C locale distclean
++	test ! -f tests/Makefile || $(MAKE) -C tests distclean
++	$(MAKE) -C src distclean
+ 
+-	rm -f Makefile src/Makefile lib-src/Makefile
+-	rm -f locale/Makefile src/configunix.h
++	rm -f Makefile
+ 	rm -f config.log config.status config.cache
+ 
+--- a/lib-src/Makefile.in
++++ b/lib-src/Makefile.in
+@@ -150,52 +150,53 @@
+ 
+ # Utility rules
+ clean:
+-	-$(MAKE) -C portsmf clean
+-	-$(MAKE) -C expat clean
+-	-$(MAKE) -C FileDialog clean
+-	-$(MAKE) -C libid3tag clean
+-	-$(MAKE) -C libmad clean
+-	-$(MAKE) -C libnyquist clean
+-	-$(MAKE) -C liblrdf clean
+-	-$(MAKE) -C libogg clean
+-	-$(MAKE) -C libsoxr clean
+-	-$(MAKE) -C libsamplerate clean
+-	-$(MAKE) -C libresample clean
+-	-$(MAKE) -C libsndfile clean
+-	-$(MAKE) -C libvamp clean
+-	-$(MAKE) -C libvorbis clean
+-	-$(MAKE) -C lib-widget-extra clean
+-	-$(MAKE) -C libflac clean
+-	-$(MAKE) -C portaudio-v19 clean
+-	-$(MAKE) -C portmixer clean
+-	-$(MAKE) -C sbsms clean
+-	-$(MAKE) -C soundtouch clean
+-	-$(MAKE) -C twolame clean
+-	-rm -rf @LOCAL_LIBS@
++	test ! -f portsmf/Makefile || $(MAKE) -C portsmf clean
++	test ! -f expat/Makefile || $(MAKE) -C expat clean
++	test ! -f FileDialog/Makefile || $(MAKE) -C FileDialog clean
++	test ! -f libid3tag/Makefile || $(MAKE) -C libid3tag clean
++	test ! -f libmad/Makefile || $(MAKE) -C libmad clean
++	test ! -f libnyquist/Makefile || $(MAKE) -C libnyquist clean
++	test ! -f liblrdf/Makefile || $(MAKE) -C liblrdf clean
++	test ! -f libogg/Makefile || $(MAKE) -C libogg clean
++	test ! -f libsoxr/Makefile || $(MAKE) -C libsoxr clean
++	test ! -f libsamplerate/Makefile || $(MAKE) -C libsamplerate clean
++	test ! -f libresample/Makefile || $(MAKE) -C libresample clean
++	test ! -f libsndfile/Makefile || $(MAKE) -C libsndfile clean
++	test ! -f libvamp/Makefile || $(MAKE) -C libvamp clean
++	test ! -f libvorbis/Makefile || $(MAKE) -C libvorbis clean
++	test ! -f lib-widget-extra/Makefile || $(MAKE) -C lib-widget-extra clean
++	test ! -f libflac/Makefile || $(MAKE) -C libflac clean
++	test ! -f portaudio-v19/Makefile || $(MAKE) -C portaudio-v19 clean
++	test ! -f portmixer/Makefile || $(MAKE) -C portmixer clean
++	test ! -f sbsms/Makefile || $(MAKE) -C sbsms clean
++	test ! -f soundtouch/Makefile || $(MAKE) -C soundtouch clean
++	test ! -f twolame/Makefile || $(MAKE) -C twolame clean
++	rm -f @LOCAL_LIBS@
+ 
+ distclean:
+-	-$(MAKE) -C portsmf distclean
+-	-$(MAKE) -C expat distclean
+-	-$(MAKE) -C FileDialog distclean
+-	-$(MAKE) -C libid3tag distclean
+-	-$(MAKE) -C libmad distclean
+-	-$(MAKE) -C libnyquist distclean
+-	-$(MAKE) -C liblrdf distclean
+-	-$(MAKE) -C libogg distclean
+-	-$(MAKE) -C libsoxr distclean
+-	-$(MAKE) -C libsamplerate distclean
+-	-$(MAKE) -C libresample distclean
+-	-$(MAKE) -C libsndfile distclean
+-	-$(MAKE) -C libvamp distclean
+-	-$(MAKE) -C libvorbis distclean
+-	-$(MAKE) -C lib-widget-extra distclean
+-	-$(MAKE) -C libflac distclean
+-	-$(MAKE) -C portaudio-v19 distclean
+-	-$(MAKE) -C portmixer distclean
+-	-$(MAKE) -C sbsms distclean
+-	-$(MAKE) -C soundtouch distclean
+-	-$(MAKE) -C twolame distclean
+-	-rm -f @LOCAL_LIBS@
++	test ! -f portsmf/Makefile || $(MAKE) -C portsmf distclean
++	test ! -f expat/Makefile || $(MAKE) -C expat distclean
++	test ! -f FileDialog/Makefile || $(MAKE) -C FileDialog distclean
++	test ! -f libid3tag/Makefile || $(MAKE) -C libid3tag distclean
++	test ! -f libmad/Makefile || $(MAKE) -C libmad distclean
++	test ! -f libnyquist/Makefile || $(MAKE) -C libnyquist distclean
++	test ! -f liblrdf/Makefile || $(MAKE) -C liblrdf distclean
++	test ! -f libogg/Makefile || $(MAKE) -C libogg distclean
++	test ! -f libsoxr/Makefile || $(MAKE) -C libsoxr distclean
++	test ! -f libsamplerate/Makefile || $(MAKE) -C libsamplerate distclean
++	test ! -f libresample/Makefile || $(MAKE) -C libresample distclean
++	test ! -f libsndfile/Makefile || $(MAKE) -C libsndfile distclean
++	test ! -f libvamp/Makefile || $(MAKE) -C libvamp distclean
++	test ! -f libvorbis/Makefile || $(MAKE) -C libvorbis distclean
++	test ! -f lib-widget-extra/Makefile || $(MAKE) -C lib-widget-extra distclean
++	test ! -f libflac/Makefile || $(MAKE) -C libflac distclean
++	test ! -f portaudio-v19/Makefile || $(MAKE) -C portaudio-v19 distclean
++	test ! -f portmixer/Makefile || $(MAKE) -C portmixer distclean
++	test ! -f sbsms/Makefile || $(MAKE) -C sbsms distclean
++	test ! -f soundtouch/Makefile || $(MAKE) -C soundtouch distclean
++	test ! -f twolame/Makefile || $(MAKE) -C twolame distclean
++	rm -f @LOCAL_LIBS@
++	rm -f Makefile
+ 
+ # list here all the targets that aren't actually files to be made
+ .PHONY: portsmf-recursive eexpat-recursive FileDialog-recursive \
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -335,6 +335,9 @@
+ 	rm -rf $(OBJS) $(LIBAUDACITY_OBJS)
+ 	rm -f libaudacity.a AudacityHeaders.h.gch
+ 
++distclean: clean
++	rm -f configunix.h Makefile
++
+ #
+ # Rule for compiling C++ files
+ #
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..41f8fe3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+distclean.patch
diff --git a/debian/rules b/debian/rules
index 19df1f8..9ca62ec 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,12 +26,6 @@ configure_flags := \
 %:
 	dh $@ --parallel --with autoreconf
 
-override_dh_auto_clean:
-	# dh_auto_clean doesn't detect the clean targets since some Makefiles in the
-	# subdirectories don't have them. Hence dh_auto_clean thinks they don't exist.
-	# We also want to make sure that both clean and distclean are run.
-	[ ! -f Makefile ] || $(MAKE) clean distclean
-
 override_dh_auto_configure:
 	dh_auto_configure -- $(configure_flags)
 

-- 
Audacity debian packaging



More information about the pkg-multimedia-commits mailing list