build: disable CONFIG_AUTOREMOVE for packages/tools where QUILT is used
authorFelix Fietkau <nbd@nbd.name>
Thu, 19 Jan 2017 11:41:59 +0000 (12:41 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 19 Jan 2017 12:30:22 +0000 (13:30 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/host-build.mk
include/package-bin.mk
include/package-ipkg.mk
include/package.mk
include/quilt.mk

index cf1203995c422cc7e21d5889a7343c797a17b295..6a335fcbc3b1fe62e4b18f7e2f7f1b590e8b1c1c 100644 (file)
@@ -35,6 +35,8 @@ override MAKEFLAGS=
 include $(INCLUDE_DIR)/quilt.mk
 include $(INCLUDE_DIR)/autotools.mk
 
+_host_target:=$(if $(HOST_QUILT),,.)
+
 Host/Patch:=$(Host/Patch/Default)
 ifneq ($(strip $(HOST_UNPACK)),)
   define Host/Prepare/Default
@@ -176,9 +178,9 @@ ifndef DUMP
     )
   endif
 
-  .host-prepare: $(HOST_STAMP_PREPARED)
-  .host-configure: $(HOST_STAMP_CONFIGURED)
-  .host-compile: $(HOST_STAMP_BUILT) $(HOST_STAMP_INSTALLED)
+  $(_host_target)host-prepare: $(HOST_STAMP_PREPARED)
+  $(_host_target)host-configure: $(HOST_STAMP_CONFIGURED)
+  $(_host_target)host-compile: $(HOST_STAMP_BUILT) $(HOST_STAMP_INSTALLED)
   host-clean: FORCE
        $(call Host/Clean)
        $(call Host/Uninstall)
index a777eadad92fad326ea152c2d1374947838ec9bf..ee35ca180f021da16ee09d41a967b2efde926bfe 100644 (file)
@@ -10,7 +10,7 @@ ifeq ($(DUMP),)
     ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT))
     ifdef Package/$(1)/install
       ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
-        .compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
+        $(_pkg_target)compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
         compile: install-bin-$(1)
       else
         compile: $(1)-disabled
index 8a9c10f64b229c0c017c3d77957d2e2e59e0577d..d73d46153750de32986a727e4bcde1282d107169 100644 (file)
@@ -106,7 +106,7 @@ ifeq ($(DUMP),)
     ifdef do_install
       ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
         IPKGS += $(1)
-        .compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
+        $(_pkg_target)compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
         compile: $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
       else
         $(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected))
index 6e24788a58e1b72c23e261903abb0f20dc95336e..95b5f76dc3895e88c8115876c4c97359193cc9c6 100644 (file)
@@ -96,6 +96,8 @@ include $(INCLUDE_DIR)/package-ipkg.mk
 include $(INCLUDE_DIR)/package-bin.mk
 include $(INCLUDE_DIR)/autotools.mk
 
+_pkg_target:=$(if $(QUILT),,.)
+
 override MAKEFLAGS=
 CONFIG_SITE:=$(INCLUDE_DIR)/site/$(ARCH)
 CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST)))
@@ -204,13 +206,13 @@ define Build/CoreTargets
        touch $$@
 
   ifdef Build/InstallDev
-    .compile: $(STAMP_INSTALLED)
+    $(_pkg_target)compile: $(STAMP_INSTALLED)
   endif
 
-  .prepare: $(STAMP_PREPARED)
-  .configure: $(STAMP_CONFIGURED)
-  .dist: $(STAMP_CONFIGURED)
-  .distcheck: $(STAMP_CONFIGURED)
+  $(_pkg_target)prepare: $(STAMP_PREPARED)
+  $(_pkg_target)configure: $(STAMP_CONFIGURED)
+  $(_pkg_target)dist: $(STAMP_CONFIGURED)
+  $(_pkg_target)distcheck: $(STAMP_CONFIGURED)
 
   ifneq ($(CONFIG_AUTOREMOVE),)
     compile:
index 796e7160c480e717d592f2093390f656c29dc54b..88f84f8cff466f69a0af70cd64744d84f34a6440 100644 (file)
@@ -64,6 +64,7 @@ ifneq ($(PKG_BUILD_DIR),)
   ifneq ($(QUILT),)
     STAMP_CHECKED:=$(PKG_BUILD_DIR)/.quilt_checked
     override CONFIG_AUTOREBUILD=
+    override CONFIG_AUTOREMOVE=
     quilt-check: $(STAMP_CHECKED)
   endif
 endif
@@ -73,6 +74,7 @@ ifneq ($(HOST_BUILD_DIR),)
   ifneq ($(HOST_QUILT),)
     HOST_STAMP_CHECKED:=$(HOST_BUILD_DIR)/.quilt_checked
     override CONFIG_AUTOREBUILD=
+    override CONFIG_AUTOREMOVE=
     host-quilt-check: $(HOST_STAMP_CHECKED)
   endif
 endif