qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.1] po: Fix Makefile rules
@ 2014-07-17 17:56 Stefan Weil
  2014-07-17 18:07 ` Stefan Weil
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2014-07-17 17:56 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Stefan Weil, qemu-devel

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.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---

Hi Peter,

I suggest to apply this (trivial) fix directly for 2.1
(without pull request).

I noticed that problem when I wanted to prepare an e-mail for rc3:
could you please run "make -C po update" (and commit the updated .po files)
before releasing rc3? Or would it be better if I sent a patch which
updates the .po files for the next QEMU release?

Regards
Stefan

 po/Makefile |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/po/Makefile b/po/Makefile
index d2c2a8e..9add20f 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -4,6 +4,11 @@
 # Set SRC_PATH for in-tree builds without configuration.
 SRC_PATH=$(shell cd .. && pwd)
 
+# 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 $@ $< > $@.bak && mv $@.bak $@, "  GEN   $@")
-
-.PHONY: clean all
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.1] po: Fix Makefile rules
  2014-07-17 17:56 [Qemu-devel] [PATCH for-2.1] po: Fix Makefile rules Stefan Weil
@ 2014-07-17 18:07 ` Stefan Weil
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Weil @ 2014-07-17 18:07 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

Am 17.07.2014 19:56, schrieb Stefan Weil:
> 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.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> 

I just noticed that both errors which I mentioned in the commit message
only occur when there was no "make configure" run in the source tree.

My normal builds are always out-of-tree, but for po updates, running
"make -C po update" is the fastest solution, and it should work without
a prior configuration step because that is not needed for the resulting
.po files.

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-17 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-17 17:56 [Qemu-devel] [PATCH for-2.1] po: Fix Makefile rules Stefan Weil
2014-07-17 18:07 ` Stefan Weil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).