m4/cond-if.m4


Log

Author Commit Date CI Message
Ralf Wildenhues 6f6e3288 2010-07-27T21:35:19 Fix AM_COND_IF for gone-invalid condition shell expression. * m4/cond-if.m4 (AM_COND_IF): test contents of $COND_TRUE variable, rather than re-evaluating the shell expression for the condition. * tests/cond40.test: Extend test. * NEWS: Update. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Ralf Wildenhues 1f92ad1d 2010-07-27T21:20:04 Avoid syntax error if IF-TRUE part of AM_COND_IF expands empty. * m4/cond-if.m4 (AM_COND_IF): Ensure IF-TRUE part is never empty to avoid shell syntax error if the m4 expansion is empty. * tests/cond40.test: Enhance test. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Ralf Wildenhues e19a2988 2008-03-26T07:00:44 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>