]> code.ossystems Code Review - openembedded-core.git/commitdiff
base: Improve makefile clean handling, introduce CLEANBROKEN variable
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Nov 2014 18:46:35 +0000 (18:46 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Nov 2014 11:07:58 +0000 (11:07 +0000)
It turns out we have quite a number of Makefiles out there without a
clean target. Rather than have all cases code an empty do_configure, add
a CLEANBROKEN variable which when set to "1" will disable the attempt to
"make clean".

This patch also adjusts various recipes which either have this problem
fixed, or have been reported to have make clean failures.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass
meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
meta/recipes-devtools/gnu-config/gnu-config_git.bb
meta/recipes-extended/cups/cups.inc
meta/recipes-extended/lsb/lsb_4.1.bb
meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
meta/recipes-multimedia/flac/flac_1.3.0.bb

index e1b25ff1342469979ddc67ad348a54b84735db06..c135939709fa0ea466b514d62f6fc0480ed9f7f5 100644 (file)
@@ -217,6 +217,7 @@ python base_eventhandler() {
 }
 
 CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
+CLEANBROKEN = "0"
 
 addtask configure after do_patch
 do_configure[dirs] = "${S} ${B}"
@@ -225,7 +226,7 @@ base_do_configure() {
        if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
                if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
                        cd ${B}
-                       if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
+                       if [ "${CLEANBROKEN}" != "1" -a -e Makefile -o -e makefile -o -e GNUmakefile ]; then
                                ${MAKE} clean
                        fi
                        find ${B} -name \*.la -delete
index 21d24f07ee15ec111996a3aa6ff28b2fbaec44a7..f5fce6f020751c977f4d107826990c24aaeaab31 100644 (file)
@@ -17,10 +17,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-${PV
 SRC_URI[md5sum] = "bcfca5a2bb39edad4aae5a65efc84094"
 SRC_URI[sha256sum] = "44f99a8e76f3e8e4fec0bb5ad4762f8e44366168554ce66cb85afbe2ed3efd8b"
 
-# Disable default since make clean doesn't work
-do_configure () {
-       :
-}
+CLEANBROKEN = "1"
 
 do_compile() {
        :
index ef9e323349545ad6ea7fb9a662a11af4b3a338ac..754a99a4b09b553b69864a7835c838c17c7585e0 100644 (file)
@@ -17,10 +17,7 @@ SRC_URI = "git://git.sv.gnu.org/config.git \
 
 S = "${WORKDIR}/git"
 
-# Disable default since make clean doesn't work
-do_configure () {
-       :
-}
+CLEANBROKEN = "1"
 
 do_compile() {
        :
index fbdc48eab19f22914c93da9771580d9c11239516..945f69a2c433d1b83c7d8e29fdcbd9682456478b 100644 (file)
@@ -15,6 +15,8 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
 
 LEAD_SONAME = "libcupsdriver.so"
 
+CLEANBROKEN = "1"
+
 inherit autotools-brokensep binconfig useradd systemd
 
 USERADD_PACKAGES = "${PN}"
index d265731e0450f87e59b42f120abae47058c6e9e9..e012497550aed4fa7b8c3c9416126742889798b2 100644 (file)
@@ -21,6 +21,8 @@ SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
 SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
 S = "${WORKDIR}/lsb-release-1.4"
 
+CLEANBROKEN = "1"
+
 do_install(){
        oe_runmake install prefix=${D}  mandir=${D}/${datadir}/man/ DESTDIR=${D}
 
index 946faac7d2def75f136472a27dec1947412ddc70..6a93a35a39e1a1bfe439833fd071cb8b8907f389 100644 (file)
@@ -9,3 +9,5 @@ SRC_URI[md5sum] = "eade38998313c25fd7934719cdf8a2ea"
 SRC_URI[sha256sum] = "75f1425c8ea1f8cae523905a5a046a35092327a6152800b0b86efc4e56fb3e2f"
 
 S = "${WORKDIR}/cryptodev-linux-${PV}"
+
+CLEANBROKEN = "1"
index a107f804fa782fa466a26539243318a87db1fb59..a2f16d14061b17928f4d321a6fb440c96a72bdbe 100644 (file)
@@ -34,6 +34,8 @@ S = "${WORKDIR}/git"
 
 inherit allarch update-alternatives
 
+CLEANBROKEN = "1"
+
 do_compile() {
        :
 }
index fdf38e9ea9fb1ff2d6a11aa3777063d1534fceb3..cf786a473dd5fa44380852cb5fae362d491b9d97 100644 (file)
@@ -21,6 +21,8 @@ SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
 SRC_URI[md5sum] = "13b5c214cee8373464d3d65dee362cdd"
 SRC_URI[sha256sum] = "fa2d64aac1f77e31dfbb270aeb08f5b32e27036a52ad15e69a77e309528010dc"
 
+CLEANBROKEN = "1"
+
 inherit autotools-brokensep gettext
 
 EXTRA_OECONF = "--disable-oggtest \