From: Stefano Lattarini Date: Sat, 14 Apr 2012 23:33:48 +0000 (+0200) Subject: [ng] opts: new 'ng' option, to better differentiate from mainstream Automake X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b30e38cb5d07cc6a4d5545e1f42ac717c0992a85;p=thirdparty%2Fautomake.git [ng] opts: new 'ng' option, to better differentiate from mainstream Automake We add a new no-op option 'ng', that will be recognized by Automake-NG but not by mainstream Automake. It can be used by developers to declare that their build system requires Automake-NG, and in a way that will ensure a clear error if mainstream Automake is used by mistake. * lib/Automake/Options.pm (_is_valid_easy_option): Recognize 'ng'. * doc/automake.texi: Document the new option and its purpose. * t/option-ng.sh: New test. * t/list-of-tests.mk: Add it. Signed-off-by: Stefano Lattarini --- diff --git a/doc/automake.texi b/doc/automake.texi index 8e5b0d200..263b907d6 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -10071,6 +10071,15 @@ options below. This option should be used in the top-level @file{configure.ac}, it will be ignored otherwise. It will also be ignored in sub-packages of nested packages (@pxref{Subpackages}). +@item @option{ng} +@cindex Option, @option{ng} +@opindex ng +This is a no-op option, whose only purpose it to be recognized by +Automake-NG but @emph{not} by mainstream Automake. It can be +used by developers to declare that their build system requires +Automake-NG, and in a way that will ensure a clear error if +mainstream Automake is used by mistake. + @item @option{no-define} @cindex Option, @option{no-define} @opindex no-define diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index 702d4287e..e8c528900 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -277,6 +277,7 @@ sub _is_valid_easy_option ($) dist-tarZ dist-xz dist-zip + ng no-define no-dependencies no-dist diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index e97140ec5..5c67db567 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -705,6 +705,7 @@ t/objdir.sh \ t/objext-pr10128.sh \ t/obsolete.sh \ t/oldvars.sh \ +t/option-ng.sh \ t/order.sh \ t/output.sh \ t/output2.sh \ diff --git a/t/option-ng.sh b/t/option-ng.sh new file mode 100755 index 000000000..3ad9fa74f --- /dev/null +++ b/t/option-ng.sh @@ -0,0 +1,32 @@ +#! /bin/sh +# Copyright (C) 2012 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Automake-NG should recognize the (no-op) 'ng' option. + +. ./defs || Exit 1 + +cat > configure.ac < Makefile.am + +$ACLOCAL +$AUTOMAKE + +: