summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-09-24 23:28:00 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-09-24 23:28:00 -0700
commit0b876b42caf102c20d595b343ae60a71b9048eb9 (patch)
treeebbb3e8455049ea20fe92d5f083015a8f6d94a4e /configure
parent1d12e4169ffa4148ddaabc91e515850d341267ae (diff)
downloadtxr-0b876b42caf102c20d595b343ae60a71b9048eb9.tar.gz
txr-0b876b42caf102c20d595b343ae60a71b9048eb9.tar.bz2
txr-0b876b42caf102c20d595b343ae60a71b9048eb9.zip
configure: only detect lex in maintainer mode.
* Makefile (lex.yy.c): Move rule into maintainer conditional. * configure: Describe maintainer variable in help text. Move lex check into maintainer conditional. * lex.yy.c.shipped: New file.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure52
1 files changed, 30 insertions, 22 deletions
diff --git a/configure b/configure
index 2126c9b7..abd3a425 100755
--- a/configure
+++ b/configure
@@ -288,7 +288,7 @@ Canonical:
variable=value Defines the given variable as having the given value.
variable= Defines the variable as having an empty value.
- An empty value serves as boolean false.
+ An empty value serves as Boolean false.
Long-option style:
@@ -308,6 +308,14 @@ be used in paths. Default values are shown in [square brackets].
Variables are case-sensitive, but underscores and dashes are interchangeable.
+maintainer [$maintainer]
+
+ This a Boolean variable. If set to 'y', then it it specifies maintainer
+ mode, otherwise the build is configured for user mode. In maintainer mode,
+ the scanner and parser generator tools are expected to be available.
+ In user mode, the shipped parser and scanner are used. Changes to
+ the parser.l and parser.y files will have no effect.
+
prefix [$prefix]
Specifies root directory where the software will ultimately be installed and
@@ -1671,34 +1679,34 @@ fi
# Lex and Yacc tests
#
-printf "Checking for lex ... "
+if [ $maintainer ] ; then
+ printf "Checking for lex ... "
-if [ -z "$lex_given" -a -z "$lexname_given" ] ; then
- for lexname in '$(LEX)' "lex" "flex" "" ; do
+ if [ -z "$lex_given" -a -z "$lexname_given" ] ; then
+ for lexname in '$(LEX)' "lex" "flex" "" ; do
+ rm -f lex.yy.c
+ if make lexname="$lexname" lex.yy.c > /dev/null 2>&1; then
+ break;
+ fi
+ done
+ if [ -z "$lexname" ] ; then
+ printf "not found\n"
+ exit 1
+ fi
+ else
rm -f lex.yy.c
- if make lexname="$lexname" lex.yy.c > /dev/null 2>&1; then
- break;
+ if ! make lexname="$lexname" lex.yy.c > /dev/null 2>&1; then
+ printf "error\n\n"
+ printf 'values --lexname="%s" --lex="%s" are not working\n\n' "$lexname" "$lex"
+ printf 'A GNU Flex compatible lex is required\n\n'
+ exit 1
fi
- done
- if [ -z "$lexname" ] ; then
- printf "not found\n"
- exit 1
- fi
-else
- rm -f lex.yy.c
- if ! make lexname="$lexname" lex.yy.c > /dev/null 2>&1; then
- printf "error\n\n"
- printf 'values --lexname="%s" --lex="%s" are not working\n\n' "$lexname" "$lex"
- printf 'A GNU Flex compatible lex is required\n\n'
- exit 1
fi
-fi
-rm -f lex.yy.c
+ rm -f lex.yy.c
-printf '"%s"\n' "$lexname"
+ printf '"%s"\n' "$lexname"
-if [ $maintainer ] ; then
printf "Checking for yacc program ... "
if [ -z "$yacc_given" -a -z "$yaccname_given" ] ; then