Skip to content

Commit

Permalink
install: set dir arg with '--arg val' form in configure
Browse files Browse the repository at this point in the history
Enable the definition of the installation directory argument of the
./configure script with the `--arg val` syntax form in addition to the
`--arg=val` syntax.

Fixes cea-hpc#348
  • Loading branch information
xdelaruelle committed Jul 29, 2020
1 parent d77bcfe commit 193db29
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -404,29 +404,58 @@ get_package_value() {

# parse arguments
for arg in "$@"; do
# set argument value defined with "--arg val" form
if [ -n "${nextargisval+x}" ]; then
declare $nextargisval=$arg
unset nextargisval
continue
fi

case "$arg" in
--prefix=*)
prefix="${arg#*=}" ;;
--prefix)
nextargisval=prefix ;;
--bindir=*)
bindir="${arg#*=}" ;;
--bindir)
nextargisval=bindir ;;
--libdir=*)
libdir="${arg#*=}" ;;
--libdir)
nextargisval=libdir ;;
--libexecdir=*)
libexecdir="${arg#*=}" ;;
--libexecdir)
nextargisval=libexecdir ;;
--etcdir=*)
etcdir="${arg#*=}" ;;
--etcdir)
nextargisval=etcdir ;;
--initdir=*)
initdir="${arg#*=}" ;;
--initdir)
nextargisval=initdir ;;
--datarootdir=*)
datarootdir="${arg#*=}" ;;
--datarootdir)
nextargisval=datarootdir ;;
--mandir=*)
mandir="${arg#*=}" ;;
--mandir)
nextargisval=mandir ;;
--docdir=*)
docdir="${arg#*=}" ;;
--docdir)
nextargisval=docdir ;;
--vimdatadir=*)
vimdatadir="${arg#*=}" ;;
--vimdatadir)
nextargisval=vimdatadir ;;
--modulefilesdir=*)
modulefilesdir="${arg#*=}" ;;
--modulefilesdir)
nextargisval=modulefilesdir ;;
--enable-set-manpath*|--disable-set-manpath)
setmanpath=$(get_feature_value "$arg") ;;
--enable-append-manpath*|--disable-append-manpath)
Expand Down

0 comments on commit 193db29

Please sign in to comment.