summaryrefslogtreecommitdiffstats
path: root/include/host-build.mk
diff options
context:
space:
mode:
authorlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-03 18:00:28 +0000
committerlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-03 18:00:28 +0000
commite6c9aacc5937d1f4a0686ae660d7c6f48f998218 (patch)
treed5b50389e52d2b0ef407fa7c5ffddfbf1b48583d /include/host-build.mk
parent6d15a5170a6f5ae92748da96d2adf054a216080a (diff)
Prevent unnecessary host package rebuilds.
Sometimes `make install` touches a file inside the build directory, so it is betterr to create the build stamp after calling `make install` otherwise the package is going to be rebuild even though nothing really changed. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19021 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/host-build.mk')
-rw-r--r--include/host-build.mk25
1 files changed, 14 insertions, 11 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index 8eb49c8f4..6324276a7 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -130,17 +130,8 @@ ifndef DUMP
touch $$@
$(call Host/Exports,$(HOST_STAMP_BUILT))
- $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED)
- $(call Host/Compile)
- touch $$@
-
- $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT)
- $(call Host/Install)
- mkdir -p $$(shell dirname $$@)
- touch $$@
-
ifdef Host/Install
- host-install: $(HOST_STAMP_INSTALLED)
+ host-install: $(if $(STAMP_BUILT),$(HOST_STAMP_BUILT),$(HOST_STAMP_INSTALLED))
endif
ifndef STAMP_BUILT
@@ -149,8 +140,20 @@ ifndef DUMP
install: host-install
clean: host-clean
update: host-update
+
+ $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED)
+ $(call Host/Compile)
+ touch $$@
+
+ $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT)
+ $(call Host/Install)
+ mkdir -p $$(shell dirname $$@)
+ touch $$@
else
- host-compile: $(HOST_STAMP_INSTALLED)
+ $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED)
+ $(call Host/Compile)
+ $(call Host/Install)
+ touch $$@
endif
host-prepare: $(HOST_STAMP_PREPARED)
host-configure: $(HOST_STAMP_CONFIGURED)