scripts/Makefile.headersinst: make scratch file parallel safe

If the scratch file used to store input files is not named in
a unique way, a parallel build will not work.

Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
This commit is contained in:
Steve Muckle 2013-01-21 22:39:46 -08:00 committed by Stephen Boyd
parent 71f613a0a5
commit 69005c760d
1 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
file$(if $(word 2, $(all-files)),s))
cmd_install = \
xargs $(CONFIG_SHELL) $< $(installdir) < $(INSTALL_HDR_PATH)/.input-files; \
xargs $(CONFIG_SHELL) $< $(installdir) < $@-input-files; \
for F in $(wrapper-files); do \
echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \
done; \
@ -101,9 +101,9 @@ targets += $(install-file)
$(install-file): scripts/headers_install.sh $(input-files) FORCE
$(if $(unwanted),$(call cmd,remove),)
$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
@echo $(input-files) > $(INSTALL_HDR_PATH)/.input-files
@echo $(input-files) > $@-input-files
$(call if_changed,install)
@rm $(INSTALL_HDR_PATH)/.input-files
@rm $@-input-files
else
__headerscheck: $(subdirs) $(check-file)