bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gettext] Suggestion: improve handling of cond. subdirs


From: Stepan Kasal
Subject: [gettext] Suggestion: improve handling of cond. subdirs
Date: Sat, 6 Aug 2005 18:19:44 +0200
User-agent: Mutt/1.4.1i

Hello,
  I noticed that gettext-runtime/Makefile.am uses conditional SUBDIRS.
I think that the more modern method, with AM_CONDITIONAL, is more readable.

That would mean making the change attached below and calling

if test "$CXX" = :; then
        enable_libasprintf=no
fi
AM_CONDITIONAL([LIBASPRINTF], [test "$enable_libasprintf" != no])
AM_CONDITIONAL([GLOCALE], [test "$enable_glocale" != no]

in configure.ac.  Automake would then compute DIST_SUBDIRS automatically.
AM_CONDITIONAL seems to be available at least since Automake 1.6.

Wdyt?

Another suggestion:
I think you should call the subconfigures only if needed, like this:

if test "$enable_libasprintf" != no; then
  AC_CONFIG_SUBDIRS(libasprintf)
fi
if test "$enable_glocale" != no; then
  AC_CONFIG_SUBDIRS(glocale)
fi

Stepan Kasal

--- gettext-runtime/Makefile.am 3 Aug 2005 11:20:41 -0000       1.27
+++ gettext-runtime/Makefile.am 6 Aug 2005 16:07:25 -0000
@@ -22,8 +22,14 @@
 
 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
+SUBDIRS = doc intl intl-java intl-csharp lib
+if LIBASPRINTF
+  SUBDIRS += libasprintf
+endif
+if GLOCALE
+  SUBDIRS += glocale          
+endif
+SUBDIRS += src po man m4 tests
 
 EXTRA_DIST = BUGS
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]