diff mbox

[v2] Makefile: add dependency on scripts/create_config

Message ID 1465301264-115272-1-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini June 7, 2016, 12:07 p.m. UTC
Make sure that config-host.h and config-target.h are rebuilt whenever
there is a change in the scripts that generates them; add the dependency
to the pattern rule as suggested by Peter.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rules.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell June 7, 2016, 12:13 p.m. UTC | #1
On 7 June 2016 at 13:07, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Make sure that config-host.h and config-target.h are rebuilt whenever
> there is a change in the scripts that generates them; add the dependency
> to the pattern rule as suggested by Peter.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rules.mak | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rules.mak b/rules.mak
> index 4a8f464..fae16b3 100644
> --- a/rules.mak
> +++ b/rules.mak
> @@ -172,7 +172,7 @@ TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
>  config-%.h: config-%.h-timestamp
>         @cmp $< $@ >/dev/null 2>&1 || cp $< $@
>
> -config-%.h-timestamp: config-%.mak
> +config-%.h-timestamp: config-%.mak $(SRC_PATH)/scripts/create_config
>         $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, "  GEN   $(TARGET_DIR)config-$*.h")
>
>  .PHONY: clean-timestamp
> --
> 1.8.3.1

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox

Patch

diff --git a/rules.mak b/rules.mak
index 4a8f464..fae16b3 100644
--- a/rules.mak
+++ b/rules.mak
@@ -172,7 +172,7 @@  TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
 config-%.h: config-%.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
 
-config-%.h-timestamp: config-%.mak
+config-%.h-timestamp: config-%.mak $(SRC_PATH)/scripts/create_config
 	$(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, "  GEN   $(TARGET_DIR)config-$*.h")
 
 .PHONY: clean-timestamp