Skip to contentSkip to conversation

po: Fix Makefile rules for in-tree builds without configuration

PATCH Applied Stefan Weil 2 participants 3 messages Jul 18, 2014 – Aug 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 po: Fix Makefile rules for in-tree builds without configuration

Adding 'update' to the phony targets fixes this error:

$ LANG=C make -C po update
make: Entering directory `/qemu/po'
  LINK  update
/qemu/po/de_DE.po: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [update] Error 1
make: Leaving directory `/qemu/po'

Some other phony targets (build, install) were also added, and the existing .PHONY statement was moved to a more prominent position at the beginning of the Makefile.

The patch also fixes a 2nd bug. The default target should be 'all', but instead 'modules' (from rules.mak) was the default. Fix this by adding 'all' as a target before any include statement.

---

v2: Update the subject line because the patch is only needed for
in-tree builds without configuration).
Rebase patch (v1 was based on a locally modified tree).

 po/Makefile |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
po/Makefile +5 -2
index 669f865..1ab241a 100644
@@ -4,6 +4,11 @@
 # Set SRC_PATH for in-tree builds without configuration.
 SRC_PATH=..
 
+# The default target must come before any include statements.
+all:
+
+.PHONY:	all build clean install update
+
 -include ../config-host.mak
 include $(SRC_PATH)/rules.mak
 
@@ -45,5 +50,3 @@ $(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c
 
 $(PO_PATH)/%.po: $(PO_PATH)/messages.po
 	$(call quiet-command, msgmerge -q $@ $< > [email protected] && mv [email protected] $@, "  GEN   $@")
-
-.PHONY: clean all
Signature · 1 line
1.7.10.4
#1 lore raw

Am 18.07.2014 um 16:52 schrieb Stefan Weil:

Quoted 46 lines

Adding 'update' to the phony targets fixes this error:

$ LANG=C make -C po update
make: Entering directory `/qemu/po'
  LINK  update
/qemu/po/de_DE.po: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [update] Error 1
make: Leaving directory `/qemu/po'

Some other phony targets (build, install) were also added, and the existing .PHONY statement was moved to a more prominent position at the beginning of the Makefile.

The patch also fixes a 2nd bug. The default target should be 'all', but instead 'modules' (from rules.mak) was the default. Fix this by adding 'all' as a target before any include statement.

---

v2: Update the subject line because the patch is only needed for
in-tree builds without configuration).
Rebase patch (v1 was based on a locally modified tree).

 po/Makefile |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
po/Makefile +5 -0
index 669f865..1ab241a 100644
@@ -4,6 +4,11 @@
 # Set SRC_PATH for in-tree builds without configuration.
 SRC_PATH=..
 
+# The default target must come before any include statements.
+all:
+
+.PHONY:	all build clean install update
+
 -include ../config-host.mak
 include $(SRC_PATH)/rules.mak
 

po/Makefile $(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c · line 49

Quoted 5 lines
po/Makefile +0 -2
@@ -45,5 +50,3 @@ $(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c
 
 $(PO_PATH)/%.po: $(PO_PATH)/messages.po
 	$(call quiet-command, msgmerge -q $@ $< > [email protected] && mv [email protected] $@, "  GEN   $@")
-
-.PHONY: clean all

Ping. Please consider this patch for the trivial qeueue.

Thanks,
Stefan