All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] po/Makefile: Fix source path for in-tree builds
@ 2014-04-18 11:55 Stefan Weil
  2014-04-27  9:37 ` Michael Tokarev
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2014-04-18 11:55 UTC (permalink / raw)
  To: qemu-trivial; +Cc: Stefan Weil, qemu-devel, qemu-stable

Use an absolute value for SRC_PATH. This fixes a build problem:

$ LANG=C make -C po update
make: Entering directory `/qemu/po'
  GEN   ../po/messages.po
/bin/sh: 1: cannot create ../po/messages.po: Directory nonexistent
make: *** [../po/messages.po] Error 2
make: Leaving directory `/qemu/po'

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 po/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/po/Makefile b/po/Makefile
index 705166e..576b172 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -2,7 +2,7 @@
 # process and also within the source tree to update the translation files.
 
 # Set SRC_PATH for in-tree builds without configuration.
-SRC_PATH=..
+SRC_PATH=$(shell cd .. && pwd)
 
 -include ../config-host.mak
 include $(SRC_PATH)/rules.mak
-- 
1.7.10.4



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

* Re: [Qemu-trivial] [PATCH] po/Makefile: Fix source path for in-tree builds
  2014-04-18 11:55 [Qemu-trivial] [PATCH] po/Makefile: Fix source path for in-tree builds Stefan Weil
@ 2014-04-27  9:37 ` Michael Tokarev
  2014-04-27 10:25   ` Stefan Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Tokarev @ 2014-04-27  9:37 UTC (permalink / raw)
  To: Stefan Weil, qemu-trivial; +Cc: qemu-devel, qemu-stable

18.04.2014 15:55, Stefan Weil wrote:
> Use an absolute value for SRC_PATH. This fixes a build problem:
> 
> $ LANG=C make -C po update
> make: Entering directory `/qemu/po'
>   GEN   ../po/messages.po
> /bin/sh: 1: cannot create ../po/messages.po: Directory nonexistent
> make: *** [../po/messages.po] Error 2
> make: Leaving directory `/qemu/po'
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  po/Makefile |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/po/Makefile b/po/Makefile
> index 705166e..576b172 100644
> --- a/po/Makefile
> +++ b/po/Makefile
> @@ -2,7 +2,7 @@
>  # process and also within the source tree to update the translation files.
>  
>  # Set SRC_PATH for in-tree builds without configuration.
> -SRC_PATH=..
> +SRC_PATH=$(shell cd .. && pwd)
>  
>  -include ../config-host.mak
>  include $(SRC_PATH)/rules.mak

How about moving it below inclusion of config-host.mak and using something like

 SRC_PATH ?= $(realpath ..)

?  I dunno how gnu'ish this construct is... :)


However, I think I've a better fix for this:

Author: Michael Tokarev <mjt@tls.msk.ru>
Date:   Sun Apr 27 13:32:07 2014 +0400

    po/Makefile: fix $SRC_PATH reference

    The rule for messages.po appears to be slightly wrong.
    Move the `cd' command within parens.

    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Cc: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>

diff --git a/po/Makefile b/po/Makefile
index 705166e..669f865 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -37,8 +37,8 @@ install: $(OBJS)
        $(call quiet-command, msgfmt -o $@ $<, "  GEN   $@")

 $(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c
-       $(call quiet-command, cd $(SRC_PATH) && \
-        (xgettext -o - --from-code=UTF-8 --foreign-user \
+       $(call quiet-command, ( cd $(SRC_PATH) && \
+          xgettext -o - --from-code=UTF-8 --foreign-user \
            --package-name=QEMU --package-version=$(VERSION) \
            --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C ui/gtk.c | \
          sed -e s/CHARSET/UTF-8/) >$@, "  GEN   $@")


Note the already existing parens () -- it looks like this is in order to
run commands within a subshell (with its own current directory) but still
have correct output redirection.

If you don't have objections, I'll apply my version (it also fixes the issue).

Thanks,

/mjt

Thanks,

/mjt


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

* Re: [Qemu-trivial] [PATCH] po/Makefile: Fix source path for in-tree builds
  2014-04-27  9:37 ` Michael Tokarev
@ 2014-04-27 10:25   ` Stefan Weil
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Weil @ 2014-04-27 10:25 UTC (permalink / raw)
  To: Michael Tokarev, qemu-trivial; +Cc: qemu-devel, qemu-stable

Am 27.04.2014 11:37, schrieb Michael Tokarev:
> 
> How about moving it below inclusion of config-host.mak and using something like
> 
>  SRC_PATH ?= $(realpath ..)
> 
> ?  I dunno how gnu'ish this construct is... :)
> 
> 
> However, I think I've a better fix for this:
> 
> Author: Michael Tokarev <mjt@tls.msk.ru>
> Date:   Sun Apr 27 13:32:07 2014 +0400
> 
>     po/Makefile: fix $SRC_PATH reference
> 
>     The rule for messages.po appears to be slightly wrong.
>     Move the `cd' command within parens.
> 
>     Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>     Cc: Stefan Weil <sw@weilnetz.de>
>     Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> 
> diff --git a/po/Makefile b/po/Makefile
> index 705166e..669f865 100644
> --- a/po/Makefile
> +++ b/po/Makefile
> @@ -37,8 +37,8 @@ install: $(OBJS)
>         $(call quiet-command, msgfmt -o $@ $<, "  GEN   $@")
> 
>  $(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c
> -       $(call quiet-command, cd $(SRC_PATH) && \
> -        (xgettext -o - --from-code=UTF-8 --foreign-user \
> +       $(call quiet-command, ( cd $(SRC_PATH) && \
> +          xgettext -o - --from-code=UTF-8 --foreign-user \
>             --package-name=QEMU --package-version=$(VERSION) \
>             --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C ui/gtk.c | \
>           sed -e s/CHARSET/UTF-8/) >$@, "  GEN   $@")
> 
> 
> Note the already existing parens () -- it looks like this is in order to
> run commands within a subshell (with its own current directory) but still
> have correct output redirection.
> 
> If you don't have objections, I'll apply my version (it also fixes the issue).
> 
> Thanks,
> 
> /mjt
> 
> Thanks,
> 
> /mjt
> 


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

Cheers,
Stefan



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

end of thread, other threads:[~2014-04-27 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 11:55 [Qemu-trivial] [PATCH] po/Makefile: Fix source path for in-tree builds Stefan Weil
2014-04-27  9:37 ` Michael Tokarev
2014-04-27 10:25   ` Stefan Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.