only run trap error code in the configure template, if the configure script was not...
[openwrt-10.03/.git] / include / package.mk
index 3328332725a4aa1aa5913d45370d016da0850d83..ce3c4b6a1b22a27cf13d9414757b57f0bf0fc134 100644 (file)
@@ -27,7 +27,9 @@ define Build/DefaultTargets
       endif
 
       ifneq ($(MAKECMDGOALS),prereq)
-        $$(info Rebuilding $$(_INFO))
+        ifneq ($$(_INFO),)
+          $$(info Rebuilding $$(_INFO))
+        endif
       endif
     endif
   endif
@@ -129,6 +131,10 @@ define BuildPackage
 
     ifneq ($(CONFIG_PACKAGE_$(1)),)
       compile-targets: $$(IPKG_$(1))
+    else
+      compile-targets: $(1)-disabled
+      $(1)-disabled:
+       @echo "WARNING: skipping $(1) -- package not selected"
     endif
   endif
 
@@ -257,7 +263,7 @@ endef
 
 define Build/Configure/Default
        @(cd $(PKG_BUILD_DIR)/$(3); \
-       [ -x configure ] && \
+       [ -x configure ] && \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS)" \
                CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
@@ -281,7 +287,7 @@ define Build/Configure/Default
                --infodir=/usr/info \
                $(DISABLE_NLS) \
                $(1); \
-               true; \
+       } || true; \
        )
 endef