diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2008-03-26 07:00:44 +0100 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2008-03-26 07:24:59 +0100 |
commit | e19a2988bbd78fa046159ded5075ca4358e437b3 (patch) | |
tree | e4626381f9f1c4c741cfd2c8f77766972a7cd5cb /m4/cond.m4 | |
parent | bfb846498ca08e33dc7448a6b618cab360a12921 (diff) | |
download | automake-e19a2988bbd78fa046159ded5075ca4358e437b3.tar.gz |
Implement conditional AC_CONFIG_FILES: AM_COND_IF.
* automake.in (%ac_config_files_condition): New.
(scan_autoconf_config_files): Record condition if any.
(scan_autoconf_traces): Trace _AM_COND_IF, _AM_COND_ELSE,
_AM_COND_ENDIF, updating @cond_stack as appropriate.
(handle_configure): Prefix config.status rule with condition.
Check that m4 quotation is done consistently.
* m4/cond.m4 (AM_CONDITION): Define `_AM_COND_VALUE_name'
with `name' being the name of the condition, to its shell
condition.
* m4/cond-if.m4: New file.
(_AM_COND_IF, _AM_COND_ELSE, _AM_COND_ENDIF): New trace helpers.
(AM_COND_IF): New macro, implements conditionals.
* m4/Makefile.am: Adjust.
* doc/automake.texi (Requirements, Optional, Conditionals):
Document AM_COND_IF.
* NEWS: Update.
* tests/cond39.test, tests/cond40.test, tests/cond41.test,
tests/cond42.test, tests/cond43.test: New tests.
* tests/Makefile.am: Adjust.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'm4/cond.m4')
-rw-r--r-- | m4/cond.m4 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/m4/cond.m4 b/m4/cond.m4 index d9a58d2f3..fd248b2f7 100644 --- a/m4/cond.m4 +++ b/m4/cond.m4 @@ -1,13 +1,13 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -20,6 +20,7 @@ AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' |