[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gettext] Suggestion: improve handling of cond. subdirs
From: |
Bruno Haible |
Subject: |
Re: [gettext] Suggestion: improve handling of cond. subdirs |
Date: |
Tue, 9 Aug 2005 13:10:10 +0200 |
User-agent: |
KMail/1.5 |
Hello Stepan,
> --- 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
Thanks for the patch. It is technically correct.
However, it is well-known that when there is a declarative and an imperative
way to specify something, the declarative is more readable and maintainable
in the long run. Here, SUBDIRS with some substitutable elements is more
declarative, whereas the 'if' and '+=' code is more imperative. (Even
though automake actually succeeds in transforming this imperative code
in a declarative one.)
> 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
If I did this, the following would not work any more:
$ ./configure --disable-libasprintf
$ make
$ make dist
(That's exactly the purpose of the variable DIST_SUBDIRS.)
Bruno