Skip to content

Commit

Permalink
po: Fix Makefile rules for in-tree builds without configuration
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
  • Loading branch information
stweil authored and Michael Tokarev committed Aug 24, 2014
1 parent 2fd5d86 commit bcc55f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions po/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

0 comments on commit bcc55f3

Please sign in to comment.