[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Breakage in out-of-tree builds
From: |
Hans-Bernhard Bröker |
Subject: |
Re: Breakage in out-of-tree builds |
Date: |
Sun, 16 Apr 2017 13:45:36 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Am 16.04.2017 um 12:24 schrieb Gavin Smith:
On Sat, Apr 15, 2017 at 11:12:05PM +0200, Hans-Bernhard Bröker wrote:
the recent round of updates to the gnulib stuff triggered what must be
a rather old bug in the tp/maintain/regenerate_docstr.pl script.
I suspect it is the update to the translation files, rather than the
gnulib update.
You're probably right.
completely fails to work in out-of-tree, a.k.a. VPATH builds. The problem
is that this perl script writes makefile rules into tp/Makefile.docstr which
look like this:
$(srcdir)/../po_document/'"$lingua.gmo"':
$(srcdir)/../po_document/'"$lingua.po"'
cd $(srcdir)/../po_document/ && $(MAKE) $(AM_MAKEFLAGS) '"$lingua.gmo"'
But in a VPATH build, there is no makefile in $(srcdir)/../po_document. The
Makefile to be used is in $(builddir)/../po_document instead, or the shorter
version: ../po_document. So the above rule really should become
$(srcdir)/../po_document/'"$lingua.gmo"':
$(srcdir)/../po_document/'"$lingua.po"'
cd ../po_document/ && $(MAKE) $(AM_MAKEFLAGS) '"$lingua.gmo"'
I think that the *.gmo files should be built in the srcdir, because that
is where they are in a distribution archive.
And they will be: both target and dependency of that rule are explicitly
in $(srcdir), and I was not proposing to change that. But the
_Makefile_ that actually does the job is in $(builddir).
This is the old problem with generated files being or not being tracked
in version control.
Not really, IMHO.
The *.gmo files are not tracked at the moment. If
they had been tracked, they would not have been out-of-date in your SVN
checkout.
The problem is not that I had to build them. The problem is that the
build didn't _work_, because the Makefile rule is broken.
I can think of two possible fixes:
* Track the generated *.gmo files under po_document in SVN.
Please, no.
* Remove the makefile rules in tp/Makefile.docstr (via the script you
mentioned) in order not to regenerate the *.gmo files. They would have
to be regenerated at some other time.
That would risk breaking the option to run 'make' directly in
$(top_builddir)/tp. The rules that copy stuff from po_documents to
tp/LocaleData need those files for input, so it's the responsibility of
that Makefile to procure them.
Or maybe it should just run a single sub-make in po_document from tp's
$(builddir) and be done with that, instead of one sub-make per out-of-date
.po file target.
"make update-gmo" seems to be the commmand to do this.
But without digging even further into GNU-make-only feature space, I
don't see an easy way to make each invocation of make in 'tp' run "make
update-gmo" exactly once, and doing that _before_ any of the .gmo files
are actually needed.