aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-18 14:27:04 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-18 23:57:08 +0100
commit9228d1c066cf3a2cd01288bed3646e53638705b6 (patch)
treee5e9af619fd75d10b58f4088191ca2adec64549c /include
parent6cf067d084cc551c721e98b6d6c6403a63e521d5 (diff)
downloadupstream-9228d1c066cf3a2cd01288bed3646e53638705b6.tar.gz
upstream-9228d1c066cf3a2cd01288bed3646e53638705b6.tar.bz2
upstream-9228d1c066cf3a2cd01288bed3646e53638705b6.zip
build: introduce extra targets that contain only proper dependencies
This can be used to check if targets like prepare or compile are up to date Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include')
-rw-r--r--include/depends.mk6
-rw-r--r--include/host-build.mk8
-rw-r--r--include/package-ipkg.mk4
-rw-r--r--include/package.mk11
4 files changed, 18 insertions, 11 deletions
diff --git a/include/depends.mk b/include/depends.mk
index 293409d8b7..c26c8e547e 100644
--- a/include/depends.mk
+++ b/include/depends.mk
@@ -20,6 +20,7 @@ define rdep
.SILENT: $(2)_check
$(2): $(2)_check
+ check-depends: $(2)_check
ifneq ($(wildcard $(2)),)
$(2)_check::
@@ -46,3 +47,8 @@ endif
endef
+ifeq ($(filter .%,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),$(MAKECMDGOALS),x))
+ define rdep
+ $(2): $(2)_check
+ endef
+endif
diff --git a/include/host-build.mk b/include/host-build.mk
index 0bd386781d..c38f8cfeb7 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -175,10 +175,10 @@ ifndef DUMP
)
endif
- host-prepare: $(HOST_STAMP_PREPARED)
- host-configure: $(HOST_STAMP_CONFIGURED)
- host-compile: $(HOST_STAMP_BUILT) $(if $(STAMP_BUILT),$(HOST_STAMP_INSTALLED))
- host-install: $(HOST_STAMP_INSTALLED)
+ .host-prepare: $(HOST_STAMP_PREPARED)
+ .host-configure: $(HOST_STAMP_CONFIGURED)
+ .host-compile: $(HOST_STAMP_BUILT) $(if $(STAMP_BUILT),$(HOST_STAMP_INSTALLED))
+ .host-install: $(HOST_STAMP_INSTALLED)
host-clean: FORCE
$(call Host/Clean)
$(call Host/Uninstall)
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index e168eb390f..8727b4ec30 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -106,9 +106,9 @@ ifeq ($(DUMP),)
ifdef do_install
ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
IPKGS += $(1)
- compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
+ .compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
ifneq ($(ABI_VERSION),)
- compile: $(PKG_INFO_DIR)/$(1).version
+ .compile: $(PKG_INFO_DIR)/$(1).version
endif
else
$(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected))
diff --git a/include/package.mk b/include/package.mk
index 62e538c594..37cea1448d 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -204,13 +204,13 @@ define Build/CoreTargets
touch $$@
ifdef Build/InstallDev
- compile: $(STAMP_INSTALLED)
+ .compile: $(STAMP_INSTALLED)
endif
- prepare: $(STAMP_PREPARED)
- configure: $(STAMP_CONFIGURED)
- dist: $(STAMP_CONFIGURED)
- distcheck: $(STAMP_CONFIGURED)
+ .prepare: $(STAMP_PREPARED)
+ .configure: $(STAMP_CONFIGURED)
+ .dist: $(STAMP_CONFIGURED)
+ .distcheck: $(STAMP_CONFIGURED)
endef
define Build/DefaultTargets
@@ -289,6 +289,7 @@ $(PACKAGE_DIR):
mkdir -p $@
compile: prepare-package-install
+.install: .compile
install: compile
clean: FORCE