Makefile: Do not generate files if "configure" has not been run yet
PATCH v3 1/1 Makefile: Do not generate files if "configure" has not been run yet
When doing a "make -j10" in the vanilla QEMU source tree (without running "configure" first), the Makefile currently generates two files already, qemu-version.h and qemu-options.def. This should not happen, so let's only build the generated files if config-host.mak is available (i.e. "configure" has been run already).
---
v3:
- Check for config-host.mak at the place where we add the dependencies for $(GENERATED_FILES) instead of adding single dependencies all over the place
Makefile | 2 ++ 1 file changed, 2 insertions(+)
Makefile +2 -0
@@ -791,9 +791,11 @@ endif # CONFIG_WIN # Add a dependency on the generated files, so that they are always # rebuilt before other object files +ifneq ($(wildcard config-host.mak),) ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) Makefile: $(GENERATED_FILES) endif +endif .SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \ $(TRACE_SOURCES) $(TRACE_SOURCES:%=%-timestamp) \
Signature · 1 line
1.8.3.1
Quoted 23 lines · Thomas Huth
When doing a "make -j10" in the vanilla QEMU source tree (without running "configure" first), the
Makefilecurrently generates two files already,qemu-version.hand qemu-options.def. This should not happen, so let's only build the generated files if config-host.mak is available (i.e. "configure" has been run already).Signed-off-by Thomas Huth <[email protected]>---
v3:
- Check for config-host.mak at the place where we add the dependencies for $(GENERATED_FILES) instead of adding single dependencies all over the placeMakefile | 2 ++ 1 file changed, 2 insertions(+)Makefile +0
-0@@ -791,9 +791,11 @@ endif # CONFIG_WIN
Makefile endif # CONFIG_WIN · line 801
Quoted 10 lines
Makefile +2
-0# Add a dependency on the generated files, so that they are always # rebuilt before other object files +ifneq ($(wildcard config-host.mak),) ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) Makefile: $(GENERATED_FILES) endif +endif .SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \ $(TRACE_SOURCES) $(TRACE_SOURCES:%=%-timestamp) \
Thanks, queued.
Paolo