All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] PO makefile rules touching source
Date: Thu, 06 Aug 2015 19:14:37 +0200	[thread overview]
Message-ID: <55C395FD.7080008@weilnetz.de> (raw)
In-Reply-To: <20150806115451.GA7242@work-vm>

Am 06.08.2015 um 13:54 schrieb Dr. David Alan Gilbert:
> Hi Stefan,
>    I don't really understand the way PO stuff is supposed to work,
> but I often get the problem that my git tree gets changed during
> an out of tree build, causing the po subdirectory to be
> dirtied.
>
> I think this is due to the rule:
>
> $(PO_PATH)/%.po: $(PO_PATH)/messages.po
>          $(call quiet-command, msgmerge -q $@ $< > $@.bak && mv $@.bak $@, "  GEN   $@")
>
> in po/Makefile.
>
> Why does that merge into $(PO_PATH)/%.po rather than %.po - i.e.
> why to the source rather than to the build directory?
>
> Dave
>
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

Hi Dave,

the *.po files are initially generated, then manually
enhanced by the translated texts.

Each time when there are modifications to the
related source file (for QEMU: ui/gtk.c), the *.po
files need updates, too (new or removed texts,
but most often changes of line numbers).

That's why I have sent a patch to update the
*.po files for QEMU 2.4.0. With this patch
(which is still not applied), you would not
get changes when doing a complete build
because *.po files and ui/gtk.c would match.

As long as there is the mismatch, you'll
get modified *.po files when running
"make install". I usually handle this case
by running "git diff po|patch -p1 -R"
which removes the *.po modifications.

Stefan

  reply	other threads:[~2015-08-06 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 11:54 [Qemu-devel] PO makefile rules touching source Dr. David Alan Gilbert
2015-08-06 17:14 ` Stefan Weil [this message]
2015-08-06 17:34   ` Peter Maydell
2015-08-07  9:09   ` Dr. David Alan Gilbert
2015-08-07  9:30     ` Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55C395FD.7080008@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=dgilbert@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.