Here is a trivial patch to build the source tree even with unknown options
for autosetup/autosetup but make sure to warn user.

The idea is from Barak A. Pearlmutter.



PS: re-send from subscribed addess
From: "Barak A. Pearlmutter" <b...@debian.org>
Date: Sun, 9 Oct 2016 08:05:52 +0900
Subject: Build to be continued for unknown options

This patch is based on the patch by Barak A. Pearlmutter used to build
Debian package.  Osamu Aoki used his idea to update autosetup/autosetup
by copy-and-paste existing code in the file with trivial changes.

This patch does not contain diff for auto-generated files.

This patch can be applied by the upstream to the trunk.
 autosetup/autosetup | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/autosetup/autosetup b/autosetup/autosetup
index df3317c..d2888cc 100755
--- a/autosetup/autosetup
+++ b/autosetup/autosetup
@@ -422,7 +422,7 @@ proc options {optlist} {
 	if {[opt-bool option-checking]} {
 		foreach o [array names ::useropts] {
 			if {$o ni $::autosetup(options)} {
-				user-error "Unknown option --$o"
+				user-warning "Unknown option --$o"
@@ -759,6 +759,18 @@ proc user-error {msg} {
 	exit 1
+# @user-warning msg
+# Indicate incorrect usage to the user, including if required components
+# or features are not found.
+# autosetup doesn't exit.
+proc user-warning {msg} {
+	show-notices
+	puts stderr "Error: $msg"
+	puts stderr "Try: '[file tail $::autosetup(exe)] --help' for options"
 # @user-notice msg
 # Output the given message to stderr.
fossil-users mailing list

Reply via email to