syntax_check_conf.set('runutf8', ' '.join(runutf8))
syntax_check_conf.set('PYTHON3', python3_prog.path())
-configure_file(
- input: 'Makefile.in',
- output: '@BASENAME@',
- configuration: syntax_check_conf,
-)
+
+grep_prog = find_program('grep')
if host_machine.system() == 'freebsd'
make_prog = find_program('gmake')
+
+ grep_cmd = run_command(grep_prog, '--version')
+ if grep_cmd.stdout().startswith('grep (BSD grep')
+ grep_prog = find_program('/usr/local/bin/grep')
+ grep_cmd = run_command(grep_prog, '--version')
+ if grep_cmd.stdout().startswith('grep (BSD grep')
+ error('GNU grep not found')
+ endif
+ endif
else
make_prog = find_program('make')
endif
+syntax_check_conf.set('GREP', grep_prog.path())
+
+configure_file(
+ input: 'Makefile.in',
+ output: '@BASENAME@',
+ configuration: syntax_check_conf,
+)
+
rc = run_command(
'sed', '-n',
's/^\\(sc_[a-zA-Z0-9_-]*\\):.*/\\1/p',
# of the module description. But some packages import this file directly,
# ignoring the module description.
AWK ?= awk
-GREP ?= grep
# FreeBSD (and probably some other OSes too) ships own version of sed(1), not
# compatible with the GNU sed. GNU sed is available as gsed(1), so use this
# instead