automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-ng] [FYI] [ng] opts: new 'ng' option, to better differentiate


From: Stefano Lattarini
Subject: [Automake-ng] [FYI] [ng] opts: new 'ng' option, to better differentiate from mainstream Automake
Date: Fri, 20 Apr 2012 15:26:43 +0200

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 <address@hidden>
---
 doc/automake.texi       |    9 +++++++++
 lib/Automake/Options.pm |    1 +
 t/list-of-tests.mk      |    1 +
 t/option-ng.sh          |   32 ++++++++++++++++++++++++++++++++
 4 files changed, 43 insertions(+)
 create mode 100755 t/option-ng.sh

diff --git a/doc/automake.texi b/doc/automake.texi
index 8e5b0d2..263b907 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}).
 
address@hidden @option{ng}
address@hidden Option, @option{ng}
address@hidden 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 702d428..e8c5289 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 e97140e..5c67db5 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 0000000..3ad9fa7
--- /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 <http://www.gnu.org/licenses/>.
+
+# Automake-NG should recognize the (no-op) 'ng' option.
+
+. ./defs || Exit 1
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([ng])
+AC_CONFIG_FILES([Makefile])
+END
+
+echo AUTOMAKE_OPTIONS = ng > Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+
+:
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]