[source] build: clean up redundant touching of the package install info file
LEDE Commits
lede-commits at lists.infradead.org
Sun Feb 26 04:32:00 PST 2017
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/1f22957247caa85b9583ebb4edaee618dff4b3ba
commit 1f22957247caa85b9583ebb4edaee618dff4b3ba
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Feb 21 18:27:22 2017 +0100
build: clean up redundant touching of the package install info file
Instead of using a separate .clean stamp file, remove the install info
file on compile, then append the install package list afterwards
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
include/package-ipkg.mk | 12 ++++--------
include/package.mk | 4 ++--
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index 2b3ff14..620be99 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -107,22 +107,18 @@ ifeq ($(DUMP),)
ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
IPKGS += $(1)
$(_pkg_target)compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
+ prepare-package-install: $$(IPKG_$(1))
compile: $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
else
$(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected))
endif
.PHONY: $(PKG_INSTALL_STAMP).$(1)
- compile: $(PKG_INSTALL_STAMP).$(1)
- $(PKG_INSTALL_STAMP).$(1):
- if [ -f $(PKG_INSTALL_STAMP).clean ]; then \
- rm -f \
- $(PKG_INSTALL_STAMP) \
- $(PKG_INSTALL_STAMP).clean; \
- fi
ifeq ($(CONFIG_PACKAGE_$(1)),y)
- echo "$(1)" >> $(PKG_INSTALL_STAMP)
+ compile: $(PKG_INSTALL_STAMP).$(1)
endif
+ $(PKG_INSTALL_STAMP).$(1): prepare-package-install
+ echo "$(1)" >> $(PKG_INSTALL_STAMP)
endif
endif
diff --git a/include/package.mk b/include/package.mk
index a3ef302..bf308bb 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -293,13 +293,13 @@ Build/DistCheck=$(call Build/DistCheck/Default,)
.PHONY: prepare-package-install
prepare-package-install:
@mkdir -p $(PKG_INFO_DIR)
- @touch $(PKG_INSTALL_STAMP).clean
+ @rm -f $(PKG_INSTALL_STAMP)
@echo "$(filter-out essential nonshared,$(PKG_FLAGS))" > $(PKG_INSTALL_STAMP).flags
$(PACKAGE_DIR):
mkdir -p $@
-compile: prepare-package-install
+compile:
.install: .compile
install: compile
More information about the lede-commits
mailing list