[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] [PATCH] Add a --disable-tools option
From: |
Stefano Lattarini |
Subject: |
Re: [bug-gettext] [PATCH] Add a --disable-tools option |
Date: |
Tue, 28 May 2013 20:40:32 +0200 |
On 05/28/2013 08:27 PM, Thomas Petazzoni wrote:
> This patch adds a --disable-tools option that allows to disable the
> compilation of the gettext tools, which may not be necessary on a
> small embedded Linux system.
>
> Signed-off-by: Thomas Petazzoni <address@hidden>
> ---
> Makefile.am | 8 +++++++-
> configure.ac | 5 +++++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 74e8dae..e9678af 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -20,7 +20,13 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
> ACLOCAL = build-aux/fixaclocal @ACLOCAL@
> ACLOCAL_AMFLAGS = -I m4
>
> -SUBDIRS = gnulib-local gettext-runtime gettext-tools
> +if ENABLE_TOOLS
> +TOOLS_SUBDIR = gettext-tools
> +else
> +TOOLS_SUBDIR =
> +endif
> +
> +SUBDIRS = gnulib-local gettext-runtime $(TOOLS_SUBDIR)
>
Or even simply:
-SUBDIRS = gnulib-local gettext-runtime gettext-tools
+SUBDIRS = gnulib-local gettext-runtime
+if ENABLE_TOOLS
+SUBDIRS += gettext-tools
+endif
maybe?
> EXTRA_DIST = \
> version.sh DEPENDENCIES PACKAGING HACKING ChangeLog.0 autogen.sh \
> diff --git a/configure.ac b/configure.ac
> index 7c8d2c0..a5541b3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -37,6 +37,11 @@ dnl Checks for typedefs, structures, and compiler
> characteristics.
>
> dnl Checks for library functions.
>
> +AC_ARG_ENABLE([tools],
> + [ --disable-tools do not build tools],
> + [enable_tools=$enableval], [enable_tools=yes])
> +AM_CONDITIONAL([ENABLE_TOOLS], [test "$enable_tools" = "yes"])
> +
> AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools])
>
> dnl Ensure that "configure --help" lists all the command line options that
Regards,
Stefano