diff options
author | David Woodhouse <dwmw2@infradead.org> | 2008-07-17 02:44:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-17 12:12:04 -0400 |
commit | 7259d936c6af216198ae6af3a25ac6c9dbdbe779 (patch) | |
tree | b3d873bf6a0bd480329e5e375bc51f2a5ed38f74 /scripts | |
parent | ee723cb3d419afcc8b6c7ccc0f73a34b0eb5ac7b (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.fwinst | 25 |
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 | |||
28 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) | 28 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) |
29 | installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/. | 29 | installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/. |
30 | 30 | ||
31 | # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. | ||
32 | PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs | ||
33 | $(INSTALL_FW_PATH)/$$(%): install-all-dirs | ||
34 | @true | ||
35 | install-all-dirs: $(installed-fw-dirs) | ||
36 | @true | ||
37 | |||
31 | quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) | 38 | quiet_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 | 47 | PHONY += __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 | ||
45 | FORCE: | 54 | FORCE: |
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 | |||
61 | targets := $(wildcard $(sort $(targets))) | ||
62 | cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) | ||
63 | |||
64 | ifneq ($(cmd_files),) | ||
65 | include $(cmd_files) | ||
66 | endif | ||