From: Bruno Haible Date: Wed, 10 Aug 2005 11:32:48 +0000 (+0000) Subject: Get rid of the need to define DIST_SUBDIRS manually. X-Git-Tag: v0.15~431 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2543642102d3ebcaad6d014a075a058244c3fcc;p=thirdparty%2Fgettext.git Get rid of the need to define DIST_SUBDIRS manually. --- diff --git a/gettext-runtime/ChangeLog b/gettext-runtime/ChangeLog index 2e628ea68..5ff94dfff 100644 --- a/gettext-runtime/ChangeLog +++ b/gettext-runtime/ChangeLog @@ -1,3 +1,13 @@ +2005-08-10 Bruno Haible + + * configure.ac (SUBDIR_libasprintf, SUBDIR_glocale): Remove AC_SUBSTs. + (ENABLE_LIBASPRINTF, ENABLE_GLOCALE): New automake conditionals. + * Makefile.am (SUBDIR_libasprintf, SUBDIR_glocale): New variables. + (SUBDIRS): Use them. + (DIST_SUBDIRS): Remove variable. Automake computes it correctly through + the conditionals. + Suggested by Stepan Kasal . + 2005-07-31 Bruno Haible * glocale: New directory. diff --git a/gettext-runtime/Makefile.am b/gettext-runtime/Makefile.am index d8c1fc456..62477100d 100644 --- a/gettext-runtime/Makefile.am +++ b/gettext-runtime/Makefile.am @@ -22,8 +22,19 @@ ACLOCAL_AMFLAGS = -I m4 -I ../gettext-tools/m4 -I ../autoconf-lib-link/m4 -I ../ MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ -SUBDIRS = doc intl intl-java intl-csharp lib @SUBDIR_libasprintf@ @SUBDIR_glocale@ src po man m4 tests -DIST_SUBDIRS = doc intl intl-java intl-csharp lib libasprintf glocale src po man m4 tests +# The list of subdirectories depends on whether --disable-libasprintf or +# --disable-glocale was specified. +if ENABLE_LIBASPRINTF +SUBDIR_libasprintf = libasprintf +else +SUBDIR_libasprintf = +endif +if ENABLE_GLOCALE +SUBDIR_glocale = glocale +else +SUBDIR_glocale = +endif +SUBDIRS = doc intl intl-java intl-csharp lib $(SUBDIR_libasprintf) $(SUBDIR_glocale) src po man m4 tests EXTRA_DIST = BUGS diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac index f19540480..ee80c77e6 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -147,7 +147,7 @@ AC_ARG_ENABLE(libasprintf, if test "$CXX" = ":"; then SUBDIR_libasprintf= fi -AC_SUBST(SUBDIR_libasprintf) +AM_CONDITIONAL([ENABLE_LIBASPRINTF], [test -n "$SUBDIR_libasprintf"]) dnl Determine whether to build glocale. AC_ARG_ENABLE(libglocale, @@ -158,7 +158,7 @@ AC_ARG_ENABLE(libglocale, SUBDIR_glocale= fi ], SUBDIR_glocale=glocale) -AC_SUBST(SUBDIR_glocale) +AM_CONDITIONAL([ENABLE_GLOCALE], [test -n "$SUBDIR_glocale"]) AC_CONFIG_SUBDIRS(libasprintf glocale)