sconfig: avoid regenerating the binary all the time

This makes USE_XARGS-abuild unhappy due to races

Change-Id: I1237468366c7f8af7eacd572c2bd32df9a3d58ca
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/4486
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Patrick Georgi 2013-12-05 20:17:36 +01:00
parent 99451b174a
commit d935f03938
1 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,10 @@ SCONFIGFLAGS += -I$(top)/util/sconfig -I$(objutil)/sconfig
$(objutil)/sconfig: $(objutil)/sconfig:
mkdir -p $@ mkdir -p $@
$(objutil)/sconfig/%.o: util/sconfig/%.c $(objutil)/sconfig/.generated: $(objutil)/sconfig
touch $@
$(objutil)/sconfig/%.o: util/sconfig/%.c | $(objutil)/sconfig/.generated
printf " HOSTCC $(subst $(obj)/,,$(@))\n" printf " HOSTCC $(subst $(obj)/,,$(@))\n"
$(HOSTCC) $(SCONFIGFLAGS) $(HOSTCFLAGS) -c -o $@ $< $(HOSTCC) $(SCONFIGFLAGS) $(HOSTCFLAGS) -c -o $@ $<
@ -35,6 +38,6 @@ $(objutil)/sconfig/%: $(top)/util/sconfig/%_shipped
mkdir -p $(dir $@) mkdir -p $(dir $@)
cp $< $@ cp $< $@
$(objutil)/sconfig/sconfig: $(objutil)/sconfig $(addprefix $(objutil)/sconfig/,$(sconfigobj)) $(objutil)/sconfig/sconfig: $(addprefix $(objutil)/sconfig/,$(sconfigobj))
printf " HOSTCC $(subst $(obj)/,,$(@)) (link)\n" printf " HOSTCC $(subst $(obj)/,,$(@)) (link)\n"
$(HOSTCC) $(SCONFIGFLAGS) -o $@ $(addprefix $(objutil)/sconfig/,$(sconfigobj)) $(HOSTCC) $(SCONFIGFLAGS) -o $@ $(addprefix $(objutil)/sconfig/,$(sconfigobj))