aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-07-17 02:44:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-17 12:12:04 -0400
commit7259d936c6af216198ae6af3a25ac6c9dbdbe779 (patch)
treeb3d873bf6a0bd480329e5e375bc51f2a5ed38f74 /scripts
parentee723cb3d419afcc8b6c7ccc0f73a34b0eb5ac7b (diff)
Update scripts/Makefile.fwinst to cope with older make
Also fix unwanted rebuilds of the firmware/ihex2fw tool by including the .ihex2fw.cmd file when present. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reported-and-tested-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.fwinst25
1 files changed, 23 insertions, 2 deletions
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index 3d2f4609578f..c972c0f54ce0 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -28,18 +28,39 @@ endif
28installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) 28installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
29installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/. 29installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
30 30
31# Workaround for make < 3.81, where .SECONDEXPANSION doesn't work.
32PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
33$(INSTALL_FW_PATH)/$$(%): install-all-dirs
34 @true
35install-all-dirs: $(installed-fw-dirs)
36 @true
37
31quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) 38quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@)
32 cmd_install = $(INSTALL) -m0644 $< $@ 39 cmd_install = $(INSTALL) -m0644 $< $@
33 40
34$(installed-fw-dirs): 41$(installed-fw-dirs):
35 $(call cmd,mkdir) 42 $(call cmd,mkdir)
36 43
37$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)/ 44$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
38 $(call cmd,install) 45 $(call cmd,install)
39 46
40.PHONY: __fw_install __fw_modinst FORCE 47PHONY += __fw_install __fw_modinst FORCE
48
49.PHONY: $(PHONY)
41 50
42__fw_install: $(installed-fw) 51__fw_install: $(installed-fw)
43__fw_modinst: $(mod-fw) 52__fw_modinst: $(mod-fw)
44 53
45FORCE: 54FORCE:
55
56# Read all saved command lines and dependencies for the $(targets) we
57# may be building using $(if_changed{,_dep}). As an optimization, we
58# don't need to read them if the target does not exist; we will rebuild
59# anyway in that case.
60
61targets := $(wildcard $(sort $(targets)))
62cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
63
64ifneq ($(cmd_files),)
65 include $(cmd_files)
66endif