diff options
author | rse <rse> | 2007-06-14 06:42:07 +0000 |
---|---|---|
committer | rse <rse> | 2007-06-14 06:42:07 +0000 |
commit | e7d14e4ae166cd040d5025a693c653d4d2b13bf2 (patch) | |
tree | 181d56bbd4161dd4fdd80b95be1b9ad49f80a732 | |
parent | a8f07501e090ffb86f57a9df2235cdb36f6d31e9 (diff) | |
download | libpopt-e7d14e4ae166cd040d5025a693c653d4d2b13bf2.tar.gz |
Fix building POPT directly from CVS sources.
The ultimate golden rule of "the content of versioned files should be
_never_ changed during a regular building from source" was horribly
broken by gettextize which assumes that if po/Makefile.in.in is still
not present (which is the case after a checkout as we do not version
such a generated file) it can feel free to update Makefile.am and
configure.am, even if it doubles entries there.
Here skipping the call to gettextize in case po/Makefile.in.in does
not exists doesn't really help _initially_ at all. It just helps on
subsequent calls. To no longer break the rule one either has to fix
gettextize upstream (it should not blindly append po/Makefile.in.in to
"AC_OUTPUT" in configure.ac and "po" to "SUBDIRS" in Makefile.am in
if it is _already present_ there) or we have to workaround locally by
explicitly reversing its results. As we do not control gettextize, we
now reverse the results. I have chosen to use perl(1) instead of sed(1)
here as perl(1) is already used by Automake (so it is available anyway)
and it allows us to revert the changes with shorter calls on the CLI.
Additionally, let's call gettextize _after_ libtoolize to prevent
gettextize from complaining about a missing config.guess and config.sub.
Also, add config.rpath to Makefile.am as this is a required file,
generated by gettextize, too. Finally, pass --no-changelog to gettextize
as we really don't need a useless generated m4/ChangeLog distributed
with POPT.
This way one can now (again) do a fresh checkout of the popt/ module
and build POPT really out-of-the-box and without having versioned files
garbled up, too.
-rw-r--r-- | Makefile.am | 2 | ||||
-rwxr-xr-x | autogen.sh | 4 | ||||
-rwxr-xr-x | configure.ac | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 3d8f0d5..f1c7099 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.4 foreign LINT = splint -EXTRA_DIST = autogen.sh CHANGES $(man_MANS) popt.spec libpopt.vers \ +EXTRA_DIST = config.rpath autogen.sh CHANGES $(man_MANS) popt.spec libpopt.vers \ testit.sh test-poptrc test3-data/0* \ po/*.in po/*.po po/popt.pot \ popt.ps @@ -16,8 +16,10 @@ case $libtoolize in esac cd "$srcdir" -[ -f po/Makefile.in.in ] || gettextize --copy --force --intl $libtoolize --copy --force +gettextize --copy --force --no-changelog +perl -p -i~ -e 's/(po\/Makefile\.in)\s+po\/Makefile\.in/$1/' configure.ac +perl -p -i~ -e 's/(SUBDIRS\s+=\s+po)\s+po/$1/' Makefile.am aclocal -I m4 autoheader automake -a -c diff --git a/configure.ac b/configure.ac index d312023..42c0801 100755 --- a/configure.ac +++ b/configure.ac @@ -109,4 +109,4 @@ AC_DEFINE_UNQUOTED(POPT_SOURCE_PATH, "$POPT_SOURCE_PATH", [Full path to popt top_srcdir.]) AC_SUBST(POPT_SOURCE_PATH) -AC_OUTPUT([Doxyfile Makefile]) +AC_OUTPUT([Doxyfile Makefile po/Makefile.in]) |