From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNOkj-00054u-Md for qemu-devel@nongnu.org; Thu, 06 Aug 2015 13:14:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNOkg-0002Nd-0T for qemu-devel@nongnu.org; Thu, 06 Aug 2015 13:14:49 -0400 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=60078 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNOkf-0002MN-QS for qemu-devel@nongnu.org; Thu, 06 Aug 2015 13:14:45 -0400 Message-ID: <55C395FD.7080008@weilnetz.de> Date: Thu, 06 Aug 2015 19:14:37 +0200 From: Stefan Weil MIME-Version: 1.0 References: <20150806115451.GA7242@work-vm> In-Reply-To: <20150806115451.GA7242@work-vm> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] PO makefile rules touching source List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" , qemu-devel@nongnu.org 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