summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrse <rse>2007-06-14 06:42:07 +0000
committerrse <rse>2007-06-14 06:42:07 +0000
commite7d14e4ae166cd040d5025a693c653d4d2b13bf2 (patch)
tree181d56bbd4161dd4fdd80b95be1b9ad49f80a732
parenta8f07501e090ffb86f57a9df2235cdb36f6d31e9 (diff)
downloadlibpopt-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.am2
-rwxr-xr-xautogen.sh4
-rwxr-xr-xconfigure.ac2
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
diff --git a/autogen.sh b/autogen.sh
index ad46219..e1867b7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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])