* [Qemu-devel] PO makefile rules touching source @ 2015-08-06 11:54 Dr. David Alan Gilbert 2015-08-06 17:14 ` Stefan Weil 0 siblings, 1 reply; 5+ messages in thread From: Dr. David Alan Gilbert @ 2015-08-06 11:54 UTC (permalink / raw) To: sw, qemu-devel 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] PO makefile rules touching source 2015-08-06 11:54 [Qemu-devel] PO makefile rules touching source Dr. David Alan Gilbert @ 2015-08-06 17:14 ` Stefan Weil 2015-08-06 17:34 ` Peter Maydell 2015-08-07 9:09 ` Dr. David Alan Gilbert 0 siblings, 2 replies; 5+ messages in thread From: Stefan Weil @ 2015-08-06 17:14 UTC (permalink / raw) To: Dr. David Alan Gilbert, qemu-devel; +Cc: Peter Maydell 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] PO makefile rules touching source 2015-08-06 17:14 ` Stefan Weil @ 2015-08-06 17:34 ` Peter Maydell 2015-08-07 9:09 ` Dr. David Alan Gilbert 1 sibling, 0 replies; 5+ messages in thread From: Peter Maydell @ 2015-08-06 17:34 UTC (permalink / raw) To: Stefan Weil; +Cc: Dr. David Alan Gilbert, QEMU Developers On 6 August 2015 at 18:14, Stefan Weil <sw@weilnetz.de> wrote: > 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) Sorry, I didn't notice that patch when I was collecting up last minute fixes, and it's now missed the 2.4 release. -- PMM ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] PO makefile rules touching source 2015-08-06 17:14 ` Stefan Weil 2015-08-06 17:34 ` Peter Maydell @ 2015-08-07 9:09 ` Dr. David Alan Gilbert 2015-08-07 9:30 ` Fam Zheng 1 sibling, 1 reply; 5+ messages in thread From: Dr. David Alan Gilbert @ 2015-08-07 9:09 UTC (permalink / raw) To: Stefan Weil; +Cc: Peter Maydell, qemu-devel * Stefan Weil (sw@weilnetz.de) wrote: > 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. But why are these files in the source tree *ever* updated by a make install; if you're saying the .po files need updating, that's fine, but have the makefile do the update into the build directory, not the source directory. You might want a convenience make target for updating the source directory po files to make your life easier, but I don't understand why that triggers during a normal make install. Dave > > Stefan > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] PO makefile rules touching source 2015-08-07 9:09 ` Dr. David Alan Gilbert @ 2015-08-07 9:30 ` Fam Zheng 0 siblings, 0 replies; 5+ messages in thread From: Fam Zheng @ 2015-08-07 9:30 UTC (permalink / raw) To: Dr. David Alan Gilbert; +Cc: Stefan Weil, qemu-devel, Peter Maydell On Fri, 08/07 10:09, Dr. David Alan Gilbert wrote: > * Stefan Weil (sw@weilnetz.de) wrote: > > 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. > > But why are these files in the source tree *ever* updated by a make install; > if you're saying the .po files need updating, that's fine, but have the > makefile do the update into the build directory, not the source directory. > You might want a convenience make target for updating the source directory > po files to make your life easier, but I don't understand why that triggers > during a normal make install. I agree. IMO Makefile should generally write anything to the build dir and only read the SRC_PATH. Fam ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-07 9:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-08-06 11:54 [Qemu-devel] PO makefile rules touching source Dr. David Alan Gilbert 2015-08-06 17:14 ` Stefan Weil 2015-08-06 17:34 ` Peter Maydell 2015-08-07 9:09 ` Dr. David Alan Gilbert 2015-08-07 9:30 ` Fam Zheng
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).