]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Simplify: Don't build libintl+libgnuintl a second time in gettext-tools.
authorBruno Haible <bruno@clisp.org>
Tue, 15 Jun 2021 10:49:11 +0000 (12:49 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 15 Jun 2021 10:49:11 +0000 (12:49 +0200)
* PACKAGING: Document that gettext-tools cannot be built without
gettext-runtime.
* autogen.sh: Don't create gettext-tools/intl/Makefile.am.
* gettext-tools/Makefile.am (SUBDIRS): Remove 'intl'.
* gettext-runtime/intl/Makefile.am (dist-hook): Remove.
(install-data-local, uninstall-local, uninstall-sources): Moved ...
* gettext-tools/misc/Makefile.am (install-data-local, uninstall-local,
uninstall-sources): ... to here.
* gettext-runtime/configure.ac (PACKAGE_IS_GETTEXT_TOOLS): Remove conditional.
* gettext-tools/configure.ac: Add 3rd argument to AM_GNU_GETTEXT invocation.
(PACKAGE_IS_GETTEXT_TOOLS): Remove conditional.
Update reference to os2compat.h.
Don't create intl/Makefile from intl/Makefile.in.
* gettext-tools/gnulib-lib/Makefile.am (AM_CPPFLAGS): Use the built header files
in gettext-runtime/intl/.
* gettext-tools/libgrep/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/src/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/libgettextpo/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/gnulib-tests/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/tests/Makefile.am (AM_CPPFLAGS): Likewise.
(LDADD_yes, LDADD_no): Use the built libraries in gettext-runtime/intl/.
* gettext-tools/tests/lang-c: Use the built header files in gettext-runtime/intl/.
* gettext-tools/tests/lang-c++: Likewise.
* gettext-tools/tests/lang-objc: Likewise.

17 files changed:
.gitignore
PACKAGING
autogen.sh
gettext-runtime/configure.ac
gettext-runtime/intl/Makefile.am
gettext-tools/Makefile.am
gettext-tools/configure.ac
gettext-tools/gnulib-lib/Makefile.am
gettext-tools/gnulib-tests/Makefile.am
gettext-tools/libgettextpo/Makefile.am
gettext-tools/libgrep/Makefile.am
gettext-tools/misc/Makefile.am
gettext-tools/src/Makefile.am
gettext-tools/tests/Makefile.am
gettext-tools/tests/lang-c
gettext-tools/tests/lang-c++
gettext-tools/tests/lang-objc

index 9a7b3ef084c6eb703cdb0f937c1fdbfff4649665..0ad280878ffd659ccca7553c6117407d34a10017 100644 (file)
 # Other files brought in by autogen.sh:
 /build-aux/config.guess
 /build-aux/config.sub
-/gettext-tools/intl/
 # Dummy ChangeLogs:
 /ChangeLog
 /gettext-runtime/ChangeLog
index f4bae4561ec70a9de2532502b5c2358bb976036c..cf1ae86aded935ca79cc822a86c306725f106f86 100644 (file)
--- a/PACKAGING
+++ b/PACKAGING
@@ -39,7 +39,8 @@ The 'libtextstyle' binary package can be installed by doing
       make
       make install
 
-The 'gettext-tools' binary package can be installed by doing
+The 'gettext-tools' binary package can be installed by building
+'gettext-runtime' first, and then
 
       cd gettext-tools
       ./configure --with-installed-libtextstyle --with-installed-csharp-dll
index 04b8ca985df1dbc8267bae14750b0204f1484781..7935e2f66e21ece052413a0108ecfcfd9a753ca1 100755 (executable)
@@ -476,8 +476,6 @@ for file in po.m4; do
 done
 
 echo "$0: generating configure in gettext-tools..."
-mkdir -p gettext-tools/intl
-cp -p gettext-runtime/intl/Makefile.am gettext-tools/intl/Makefile.am
 cd gettext-tools
 aclocal -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 \
   && autoconf \
index 26b8f07453c65eb9dacb77b147c3bf1761123d75..2b0afc62745820a55298e6c998a741a604bf6bb8 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-runtime directory of GNU gettext
-dnl Copyright (C) 1995-2010, 2012-2015, 2018-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2010, 2012-2015, 2018-2021 Free Software Foundation, Inc.
 dnl
 dnl This program is free software: you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -101,7 +101,6 @@ AM_GNU_GETTEXT([use-libtool], [need-ngettext])
 dnl Conditionals for the intl/ directory.
 AM_CONDITIONAL([USE_INCLUDED_LIBINTL], [test $USE_INCLUDED_LIBINTL = yes])
 AM_CONDITIONAL([BUILD_INCLUDED_LIBINTL], [test $BUILD_INCLUDED_LIBINTL = yes])
-AM_CONDITIONAL([PACKAGE_IS_GETTEXT_TOOLS], [false])
 AM_CONDITIONAL([PRELOADABLE_LIBINTL], [false])
 
 dnl Checks for header files, functions and declarations.
index 329c1410bce82bbf8771e9049af4b653c6c8a2d5..ea78e76d83b543c15f707e435cb11c204f3944b0 100644 (file)
@@ -26,26 +26,6 @@ DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 SUFFIXES =
 
-# The VPATH variable allows builds with $builddir != $srcdir, assuming a
-# 'make' program that supports VPATH (such as GNU make). The VPATH definition
-# is removed by autoconf automatically when "$(srcdir)" = ".".
-# In this directory, the VPATH handling is particular:
-# 1. The .c -> .lo rule carefully uses $(srcdir), so that VPATH can be omitted.
-# 2. If PACKAGE = gettext-tools, VPATH _must_ be omitted, because otherwise
-#    'make' does the wrong thing if GNU gettext was configured with
-#    "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la
-#    files it finds in srcdir = ../../gettext-runtime/intl.
-origsrcdir = @srcdir@
-# In gettext-tools/intl/, distribute the right Makefile.in.
-dist-hook:
-if PACKAGE_IS_GETTEXT_TOOLS
-       for file in Makefile.am Makefile.in; do \
-         cp -p $(origsrcdir)/$$file $(distdir)/$$file || exit 1; \
-       done
-else
-       @:
-endif
-
 # -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro.
 # -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
 AM_CPPFLAGS = \
@@ -630,18 +610,6 @@ uninstall-aliasfile: ref-del.sed
 endif
 
 
-# We don't install the source code any more.
-
-if PACKAGE_IS_GETTEXT_TOOLS
-
-install-data-local: uninstall-sources
-uninstall-local: uninstall-sources
-uninstall-sources:
-       rm -rf $(DESTDIR)$(datadir)/gettext/intl
-
-endif
-
-
 # Clean up after Solaris cc.
 clean-local:
        rm -rf SunWS_cache
index 449a79754c8112dde536e5daba637b316c1eb229..90f554860a6c1ed9bf8daec0fee38084e69dd842 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools directory of GNU gettext
-## Copyright (C) 1995-2007, 2010, 2013-2016, 2018-2019 Free Software Foundation, Inc.
+## Copyright (C) 1995-2007, 2010, 2013-2016, 2018-2019, 2021 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
 ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
 
-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
+SUBDIRS = gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
 
 EXTRA_DIST = misc/DISCLAIM
 MOSTLYCLEANFILES = core *.stackdump
index 63a0b1ee56f9acd04643d03c51ba37b9c35caa88..623fde4fc40a27faafe36035e59c0a379c7f6437 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-tools directory of GNU gettext
-dnl Copyright (C) 1995-2020 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2021 Free Software Foundation, Inc.
 dnl
 dnl This program is free software: you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -122,11 +122,10 @@ dnl Checks for libraries.
 
 dnl These are the only lines required to internationalize the package.
 dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.)
-AM_GNU_GETTEXT([use-libtool], [need-ngettext])
-dnl Conditionals for the intl/ directory.
+AM_GNU_GETTEXT([use-libtool], [need-ngettext], [\${top_builddir}/../gettext-runtime/intl])
+dnl Conditionals for referencing the ../gettext-runtime/intl/ directory.
 AM_CONDITIONAL([USE_INCLUDED_LIBINTL], [test $USE_INCLUDED_LIBINTL = yes])
 AM_CONDITIONAL([BUILD_INCLUDED_LIBINTL], [test $BUILD_INCLUDED_LIBINTL = yes])
-AM_CONDITIONAL([PACKAGE_IS_GETTEXT_TOOLS], [true])
 AM_CONDITIONAL([PRELOADABLE_LIBINTL],
   [test $USE_INCLUDED_LIBINTL = no && test $GLIBC2 = yes && test "$enable_shared" = yes])
 
@@ -335,7 +334,7 @@ AH_BOTTOM([
 
 /* Extra OS/2 (emx+gcc) defines.  */
 #if defined __EMX__ && !defined __KLIBC__
-# include "intl/os2compat.h"
+# include "../gettext-runtime/intl/os2compat.h"
 #endif
 ])
 
@@ -544,15 +543,6 @@ AC_CONFIG_FILES([Makefile])
 
 AC_CONFIG_FILES([doc/Makefile])
 
-AC_CONFIG_FILES([intl/Makefile], [
-  # Change srcdir variable so that it points to ../gettext-runtime/intl.
-  sed -e 's|^srcdir =.*$|srcdir = $(top_srcdir)/../gettext-runtime/intl|' \
-      -e 's|^VPATH =.*$||' \
-      -e 's|^DISTFILES =.*|DISTFILES =|' \
-    < intl/Makefile > intl/Makefile.tmp
-  mv intl/Makefile.tmp intl/Makefile
-  ])
-
 AC_CONFIG_FILES([its/Makefile])
 
 AC_CONFIG_FILES([gnulib-lib/Makefile])
index e2a935df9500ef67dd159cbd296e114726270264..244c3acfa5d62a28a995fa1be3441ac2236dcd20 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/gnulib-lib subdirectory of GNU gettext
-## Copyright (C) 1995-1998, 2000-2006, 2009, 2016, 2019 Free Software
+## Copyright (C) 1995-1998, 2000-2006, 2009, 2016, 2019, 2021 Free Software
 ## Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
@@ -38,7 +38,7 @@ pkgdata_DATA =
 AM_CPPFLAGS =
 
 # Hmm... is this still necessary?
-AM_CPPFLAGS += -I$(top_builddir)/intl -I$(top_srcdir)/intl
+AM_CPPFLAGS += -I$(top_builddir)/../gettext-runtime/intl -I$(top_srcdir)/../gettext-runtime/intl
 # Needed so that config.h and woe32dll/export.h are found.
 AM_CPPFLAGS += -I$(top_builddir) -I$(top_srcdir)
 
index 68d094c28306e6bc8d369c5bfeabd314ba247d9a..d5d53cba1b0a85d688f8b2f163a91f6b34df3086 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/gnulib-tests subdirectory of GNU gettext
-## Copyright (C) 2007, 2009-2010, 2019 Free Software Foundation, Inc.
+## Copyright (C) 2007, 2009-2010, 2019, 2021 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ include Makefile.gnulib
 AUTOMAKE_OPTIONS += 1.11 color-tests
 
 # Ensure that test-quotearg.c finds libintl.h.
-AM_CPPFLAGS += -I../intl
+AM_CPPFLAGS += -I../../gettext-runtime/intl
 
 
 # Remove .deps directories created by 'configure'.
index f5e96027bbf2dacd89a46bf5c54ab1aba6a1289b..e5688b82fc6a15c9a39077b452e6d78c3050691c 100644 (file)
@@ -38,7 +38,7 @@ AM_CPPFLAGS = \
   -I. -I$(srcdir) \
   -I.. -I$(top_srcdir) \
   -I../src -I$(top_srcdir)/src \
-  -I../intl -I$(top_srcdir)/../gettext-runtime/intl
+  -I../../gettext-runtime/intl -I$(top_srcdir)/../gettext-runtime/intl
 
 DEFS = -DIN_LIBGETTEXTPO=1 -DOMIT_SETLOCALE_LOCK=1 @DEFS@
 
index d5e6b8372acf281bf84d028b72020f6e451f94fd..37393a2a35ca5eaceaf91a0c25bc37f588681b35 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for libgrep directory in GNU gettext package.
-## Copyright (C) 2005-2007, 2009-2010, 2014 Free Software Foundation, Inc.
+## Copyright (C) 2005-2007, 2009-2010, 2014, 2021 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ MAINTAINERCLEANFILES =
 
 noinst_LIBRARIES =
 
-AM_CPPFLAGS = -I.. -I../gnulib-lib -I$(top_srcdir)/gnulib-lib -I../intl
+AM_CPPFLAGS = -I.. -I../gnulib-lib -I$(top_srcdir)/gnulib-lib -I../../gettext-runtime/intl
 
 # Rules generated and collected by gnulib-tool, for building libgrep.a.
 include Makefile.gnulib
index a0ade1e459c56c6680f5564df7a7402806f94dda..87fa7806b10a2797413c343296f9f8892a2fcbd6 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/misc subdirectory of GNU gettext
-## Copyright (C) 1995-1997, 2000-2003, 2005-2007, 2009-2010, 2019-2020 Free
+## Copyright (C) 1995-1997, 2000-2003, 2005-2007, 2009-2010, 2019-2021 Free
 ## Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
@@ -99,3 +99,10 @@ archive.git.tar.gz: $(srcdir)/archive.dir.tar
 # The archive.cvs.tar.gz is generated from archive.dir.tar.
 archive.cvs.tar.gz: $(srcdir)/archive.dir.tar
        ./convert-archive dir cvs '$(srcdir)'/archive.dir.tar $@
+
+
+# We don't install the source code in unpacked form any more.
+install-data-local: uninstall-sources
+uninstall-local: uninstall-sources
+uninstall-sources:
+       rm -rf $(DESTDIR)$(datadir)/gettext/intl
index 1024992f0a3b294a8f0c1069b3134eb0c2082a78..37062367c77f55950234cf60e36d841bcb91c47a 100644 (file)
@@ -95,7 +95,7 @@ AM_CPPFLAGS = \
   -I.. -I$(top_srcdir) \
   -I$(top_srcdir)/libgrep \
   -I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
-  -I../intl -I$(top_srcdir)/../gettext-runtime/intl
+  -I../../gettext-runtime/intl -I$(top_srcdir)/../gettext-runtime/intl
 DEFS = \
   -DLOCALEDIR=\"$(localedir)\" -DBISON_LOCALEDIR=\"$(BISON_LOCALEDIR)\" \
   -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
index 04db0554f869df89cee189fab6a1bd4265b0498c..68f833c0df7dc5ab542cac0612bd15bf08e7bbda 100644 (file)
@@ -244,13 +244,13 @@ xg-c-1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c
 AM_CPPFLAGS = \
   -I.. \
   -I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
-  -I../intl
+  -I../../gettext-runtime/intl
 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
 # INTL_MACOSX_LIBS is needed because the programs depend on libintl.la
 # but libtool doesn't put -Wl,-framework options into .la files.
 LDADD = $(LDADD_@USE_INCLUDED_LIBINTL@) @INTL_MACOSX_LIBS@
-LDADD_yes = ../intl/libintl.la @LTLIBTHREAD@
-LDADD_no = ../intl/libgnuintl.la @LTLIBTHREAD@ @LTLIBINTL@
+LDADD_yes = ../../gettext-runtime/intl/libintl.la @LTLIBTHREAD@
+LDADD_no = ../../gettext-runtime/intl/libgnuintl.la @LTLIBTHREAD@ @LTLIBINTL@
 check_PROGRAMS = tstgettext tstngettext testlocale intl-1-prg intl-3-prg intl-4-prg intl-5-prg intl-6-prg intl-setlocale-1-prg intl-setlocale-2-prg intl-thread-1-prg intl-thread-2-prg intl-thread-3-prg intl-version-prg cake fc3 fc4 fc5 gettextpo-1-prg sentence-1-prg
 tstgettext_SOURCES = \
   tstgettext.c ../../gettext-runtime/src/escapes.h \
index b350899a675edf3d4f8ce2e2087ee5b72d8d8694..28464689c0e490d6a36ea011164a8f5b00323759 100755 (executable)
@@ -46,14 +46,13 @@ EOF
 # Put the -I flags before ${CFLAGS} ${CPPFLAGS}, to make sure that libintl.h
 # is found in the build directory, regardless of -I options present in
 # ${CFLAGS} or ${CPPFLAGS}.
-${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CFLAGS} \
-      ${CPPFLAGS} -c prog.c || Exit 1
+${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../../gettext-runtime/intl ${CFLAGS} ${CPPFLAGS} -c prog.c \
+  || Exit 1
 
 : ${CONFIG_SHELL=${SHELL-/bin/sh}}
 ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \
-                ${CC} ${CFLAGS} -o prog prog.${OBJEXT} \
-                ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \
-               || Exit 1
+  ${CC} ${CFLAGS} -o prog prog.${OBJEXT} ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \
+  || Exit 1
 
 : ${XGETTEXT=xgettext}
 ${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.c || Exit 1
index d5ed00a4363f2ccd932a580bd40b3d4b5673435f..1439ceb1e6d80bb1309aca1bddd61a7f9d6302ff 100755 (executable)
@@ -65,17 +65,17 @@ EOF
 # Put the -I flags before ${CXXFLAGS} ${CPPFLAGS}, to make sure that libintl.h
 # is found in the build directory, regardless of -I options present in
 # ${CXXFLAGS} or ${CPPFLAGS}.
-${CXX} -I../.. -I../../../gettext-runtime/libasprintf -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CXXFLAGS} ${CPPFLAGS} -c prog.cc \
+${CXX} -I../.. -I../../../gettext-runtime/libasprintf -I"$abs_top_srcdir"/gnulib-lib -I../../../gettext-runtime/intl ${CXXFLAGS} ${CPPFLAGS} -c prog.cc \
   || Exit 1
 # Remove the -Wl,--disable-auto-import option here that is added by
 # woe32-dll.m4. Cygwin 1.7.2 does not support it in C++ mode: It gives
 # a link error about 'std::cout'.
 : ${CONFIG_SHELL=${SHELL-/bin/sh}}
 ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CXX --mode=link \
-                ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o prog prog.${OBJEXT} \
-                ../../../gettext-runtime/libasprintf/libasprintf.la \
-                ../../gnulib-lib/libgettextlib.la ${LTLIBINTL} \
-               || Exit 1
+  ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o prog prog.${OBJEXT} \
+         ../../../gettext-runtime/libasprintf/libasprintf.la \
+         ../../gnulib-lib/libgettextlib.la ${LTLIBINTL} \
+  || Exit 1
 
 : ${XGETTEXT=xgettext}
 ${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.cc || Exit 1
index bc2578cc1214cd67d3f5d0b2e6a574216745d01c..a40311a5e8db12f4f622a68cd5abe4c74bee6076 100755 (executable)
@@ -61,14 +61,13 @@ EOF
 # Put the -I flags before ${CFLAGS} ${CPPFLAGS}, to make sure that libintl.h
 # is found in the build directory, regardless of -I options present in
 # ${CFLAGS} or ${CPPFLAGS}.
-${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CFLAGS} \
-      ${CPPFLAGS} -c prog.m || Exit 1
+${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../../gettext-runtime/intl ${CFLAGS} ${CPPFLAGS} -c prog.m \
+  || Exit 1
 
 : ${CONFIG_SHELL=${SHELL-/bin/sh}}
 ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \
-                ${CC} ${CFLAGS} -o prog prog.${OBJEXT} \
-                ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \
-               || Exit 1
+  ${CC} ${CFLAGS} -o prog prog.${OBJEXT} ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \
+  || Exit 1
 
 : ${XGETTEXT=xgettext}
 ${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.m || Exit 1