Skip to contentSkip to conversation

base.bbclass: fix CLEANBROKEN logic

PATCH New Ross Burton 1 participant 4 messages Dec 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 base.bbclass: fix CLEANBROKEN logic

The evalation order was incorrect in some situations (CLEANBROKEN=1 and GNUmakefile exists) the clean would be executed incorrectly.

Add brackets to correct the logic.

---
 meta/classes/base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/base.bbclass +1 -1
index f3185b4..de81a7d 100644
@@ -226,7 +226,7 @@ base_do_configure() {
 	if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
 		if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
 			cd ${B}
-			if [ "${CLEANBROKEN}" != "1" -a -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
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/4 autotools.bbclass: respect CLEANBROKEN

autotools.bbclass should respect CLEANBROKEN as it invokes 'make clean' on configure.

---
 meta/classes/autotools.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +1 -1
index bed8a83..ca04e79 100644
@@ -110,7 +110,7 @@ autotools_preconfigure() {
 				# At least remove the .la files since automake won't automatically
 				# regenerate them even if CFLAGS/LDFLAGS are different
 				cd ${S}
-				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 ${S} -name \*.la -delete
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/4 gnome-doc-utils: set CLEANBROKEN

In reply to Ross Burton
---
 meta/recipes-gnome/gnome/gnome-doc-utils.inc |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-gnome/gnome/gnome-doc-utils.inc +2 -0
index e148ce3..9587506 100644
@@ -10,6 +10,8 @@ DEPENDS_class-native = "libxml2-native libxslt-native intltool-native glib-2.0-n
 
 inherit gnomebase gettext python-dir pythonnative autotools-brokensep
 
+CLEANBROKEN = "1"
+
 EXTRA_OECONF += "--disable-scrollkeeper"
 
 do_install_append() {
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 4/4 cwautomacros: stub do_configure to avoid cleaning

In reply to Ross Burton

cwuatomacros's build system doesn't have a clean target, so stub out do_configure to a no-op.

---
 meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb +4 -2
index ee4b890..4e12169 100644
@@ -5,11 +5,13 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
 
 SRC_URI = "http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2"
-
-
 SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d"
 SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121"
 
+do_configure() {
+	:
+}
+
 do_install() {
 	oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install
 }
Signature · 1 line
1.7.10.4