Skip to contentSkip to conversation

w32: Fix broken out-of-tree builds (missing version.o)

PATCH In review Stefan Weil 2 participants 2 messages Aug 16, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 w32: Fix broken out-of-tree builds (missing version.o)

Commit 0b516ef0dfad9a7b34c675c98e8ec92ab4d38466 added version.o to all executables, but broke out-of-tree builds: for those builds the pattern rule %.o: %.rc from rules.mak does not match, so version.o was no longer built.

Adding explicit build rules fixes this.

---

Hello Michael,

thank you for the report and your hint for a possible fix. This is still not the final solution which should build version.o at link time, but it is a minimal fix for the broken build.

Regards,
Stefan

 Makefile |    2 ++
 1 file changed, 2 insertions(+)
Makefile +2 -0
index 4d257f1..806946e 100644
@@ -168,7 +168,9 @@ recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
 bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
 
 $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h | $(BUILD_DIR)/version.lo
+	$(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"  RC    version.o")
 $(BUILD_DIR)/version.lo: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h
+	$(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"  RC    version.lo")
 
 Makefile: $(version-obj-y) $(version-lobj-y)
 
Signature · 1 line
1.7.10.4
Tested-by on v1 1/1
#1 lore raw

Quoting Stefan Weil (2013-08-16 14:51:53)

Quoted 9 lines

Commit 0b516ef0dfad9a7b34c675c98e8ec92ab4d38466 added version.o to all executables, but broke out-of-tree builds: for those builds the pattern rule %.o: %.rc from rules.mak does not match, so version.o was no longer built.

Adding explicit build rules fixes this.

Quoted 8 lines

---

Hello Michael,

thank you for the report and your hint for a possible fix. This is still not the final solution which should build version.o at link time, but it is a minimal fix for the broken build.

Sounds fine to me, thanks for the quick fix.

Quoted 23 lines

Regards,
Stefan

 Makefile |    2 ++
 1 file changed, 2 insertions(+)
Makefile +2 -0
index 4d257f1..806946e 100644
@@ -168,7 +168,9 @@ recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
 bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
 
 $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h | $(BUILD_DIR)/version.lo
+       $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"  RC    version.o")
 $(BUILD_DIR)/version.lo: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h
+       $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<,"  RC    version.lo")
 
 Makefile: $(version-obj-y) $(version-lobj-y)
 
Signature · 1 line
1.7.10.4