File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1717# --php-config <PATH> Path to custom `php-config' executable
1818# --install Install Zephir Parser
1919#
20- # Available env. vars:
21- # RE2C_BIN Path to custom `re2c
20+ # Available environment variables:
21+ # RE2C_BIN Path to custom `re2c'
22+ # RE2C_FLAGS The `re2c' flags e.g. `--debug-output', `--no-optimize-tag', etc.
2223#
2324# Usage:
2425#
@@ -46,6 +47,7 @@ PHPIZE_BIN=`command -v phpize 2>/dev/null || true`
4647PHPCONFIG_BIN=` command -v php-config 2> /dev/null || true`
4748
4849INSTALL_EXTENSION=" ${INSTALL_EXTENSION:- 0} "
50+ RE2C_FLAGS=" ${RE2C_FLAGS:- ' ' } "
4951
5052if [ x" $RE2C_BIN " = x ]; then
5153 echo -e " error: unable to locate the re2c"
@@ -80,7 +82,7 @@ for arg in "$@"; do
8082 " --phpize" ) set -- " $@ " " -i" ;;
8183 " --php-config" ) set -- " $@ " " -c" ;;
8284 " --install" ) set -- " $@ " " -e" ;;
83- * ) set -- " $@ " " $arg "
85+ * ) set -- " $@ " " $arg " ;;
8486 esac
8587done
8688
@@ -136,7 +138,9 @@ rm -f \
136138
137139rm -rf .libs
138140
139- ${RE2C_BIN} --no-generation-date -o scanner.c scanner.re
141+ SCANNER_OPTIONS=" ${RE2C_FLAGS} --no-generation-date -o scanner.c scanner.re"
142+
143+ ${RE2C_BIN} ${SCANNER_OPTIONS}
140144
141145# Compile lemon
142146${CC} lemon.c -o lemon
You can’t perform that action at this time.
0 commit comments