[Build-common-hackers] Bug#441020: cdbs: don't ignore errors in make clean target

Bastian Kleineidam calvin at debian.org
Thu Sep 6 07:33:07 UTC 2007


Package: cdbs
Version: 0.4.49
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

the makefile.mk cdbs rules currently ignore errors when calling the
makefile-clean target. This patch test the existance of the makefile
before calling the clean target, ie this:
	-make clean
is converted to this:
	[ ! -f Makefile ] || make clean

This way, errors in the clean target don't get ignored.


Kind regards,
  Bastian

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-ck1treasure3 (PREEMPT)
Locale: LANG=de_DE at euro, LC_CTYPE=de_DE at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

cdbs depends on no packages.

Versions of packages cdbs recommends:
ii  autotools-dev                 20070725.1 Update infrastructure for config.{
ii  debhelper                     5.0.53     helper programs for debian/rules

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG360zeBwlBDLsbz4RAmM2AJwNUbQ4+0zzQHWTyFAvSMK4wA571wCgiMoD
lkw4ZsCN2tywfZGYBsXpaAc=
=jwFT
-----END PGP SIGNATURE-----
-------------- next part --------------
--- /usr/share/cdbs/1/class/makefile.mk.orig	2007-09-06 09:22:50.000000000 +0200
+++ /usr/share/cdbs/1/class/makefile.mk	2007-09-06 09:19:20.000000000 +0200
@@ -36,7 +36,7 @@
 
 clean:: makefile-clean
 makefile-clean::
-	$(if $(DEB_MAKE_CLEAN_TARGET),+-$(DEB_MAKE_INVOKE) -k $(DEB_MAKE_CLEAN_TARGET), at echo "DEB_MAKE_CLEAN_TARGET unset, not running clean")
+	$(if $(DEB_MAKE_CLEAN_TARGET),+[ ! -f $(if $(DEB_MAKE_MAKEFILE),$(DEB_MAKE_MAKEFILE),Makefile) ] || $(DEB_MAKE_INVOKE) -k $(DEB_MAKE_CLEAN_TARGET), at echo "DEB_MAKE_CLEAN_TARGET unset, not running clean")
 	rm -f debian/stamp-makefile-build
 
 common-install-arch common-install-indep:: common-install-impl


More information about the Build-common-hackers mailing list