From f4b69a2e9dc2ec552700af44524937d84cdbc0dc Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Wed, 23 Jun 2021 06:14:55 +0200 Subject: [PATCH] install: add --with-variant-shortcut configure option --- Makefile | 1 + Makefile.inc.in | 3 +++ configure | 10 +++++++++- site.exp.in | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ba320585..e80ce2b0 100644 --- a/Makefile +++ b/Makefile @@ -315,6 +315,7 @@ sed -e 's|@prefix@|$(prefix)|g' \ -e 's|@availterseoutput@|$(availterseoutput)|g' \ -e 's|@listoutput@|$(listoutput)|g' \ -e 's|@listterseoutput@|$(listterseoutput)|g' \ + -e 's|@variantshortcut@|$(variantshortcut)|g' \ -e 's|@editor@|$(editor)|g' \ -e 's|@autohandling@|$(setautohandling)|g' \ -e 's|@implicitrequirement@|$(setimplicitrequirement)|g' \ diff --git a/Makefile.inc.in b/Makefile.inc.in index 50801777..f8d466e5 100644 --- a/Makefile.inc.in +++ b/Makefile.inc.in @@ -135,6 +135,9 @@ availterseoutput := @availterseoutput@ listoutput := @listoutput@ listterseoutput := @listterseoutput@ +# variant configuration +variantshortcut := @variantshortcut@ + # editor editor := @editor@ diff --git a/configure b/configure index e5dc09f3..75d10e66 100755 --- a/configure +++ b/configure @@ -38,7 +38,7 @@ pageropts verbosity color darkbgcolors lightbgcolors termbg lockedconfigs \ icase unloadmatchorder searchmatch modulepath loadedmodules quarantinevars \ wa277 advversspec ml windowssupport nearlyforbiddendays implicitrequirement \ tagabbrev tagcolorname mcookieversioncheck availoutput availterseoutput \ -listoutput listterseoutput editor" +listoutput listterseoutput editor variantshortcut" compatarglist= libarglist= @@ -130,6 +130,7 @@ availterseoutput='modulepath:alias:dirwsym:sym:tag' listoutput='header:idx:variant:sym:tag:key' listterseoutput='header' editor='vi' +variantshortcut= # git branch to use to build compat version compatbranch='c-3.2' @@ -394,6 +395,11 @@ Optional Packages: \`idx', \`variant', \`sym', \`tag' and \`key' (elements in LIST are separated by \`:') [$listterseoutput] + --with-variant-shortcut=SHORTCUTLIST + define shortcut characters to specify variant names. + Each element in SHORTCUTLIST is a variant name + associated to a shortcut character (elements in + SHORTCUTLIST are separated by \`:') [$variantshortcut] --with-editor=BIN name or full path of default editor program to use to edit modulefiles [$editor] --with-modulepath=PATHLIST @@ -764,6 +770,8 @@ for arg in "$@"; do fi ; done ; IFS=$ORIG_IFS ;; + --with-variant-shortcut=*|--without-variant-shortcut) + variantshortcut=$(get_package_value "$arg") ;; --with-editor=*|--without-editor) editor=$(get_package_value "$arg") ;; --with-modulepath=*|--without-modulepath) diff --git a/site.exp.in b/site.exp.in index 25dbc11e..ddc4b2c8 100644 --- a/site.exp.in +++ b/site.exp.in @@ -91,6 +91,8 @@ set install_availterseoutput "@availterseoutput@" set install_listoutput "@listoutput@" set install_listterseoutput "@listterseoutput@" +set install_variantshortcut "@variantshortcut@" + set install_editor "@editor@" # command location