tableopts.sh (flex-2.6.3) | : | tableopts.sh (flex-2.6.4) | ||
---|---|---|---|---|
#!/bin/bash | #!/bin/sh | |||
set -euo pipefail | set -eu | |||
IFS=$'\n\t' | # IFS=$'\n\t' | |||
IFS=' | ||||
'' ' | ||||
# This script is present to generate the automake _SOURCES variables | # This script is present to generate the automake _SOURCES variables | |||
# for the tableopts_* tests. It also generates the linking rules for | # for the tableopts_* tests. It also generates the linking rules for | |||
# each test since automake isn't able to handle the pattern rules that | # each test since automake isn't able to handle the pattern rules that | |||
# would be natural to use. Output is written to standard output for | # would be natural to use. Output is written to standard output for | |||
# inclusion in a Makefile.am, typically by redirecting the output and then an au | # inclusion in a Makefile.am, typically by redirecting the output and | |||
tomake include directive. | # then an automake include directive. | |||
TABLEOPTS_TESTS="" | TABLEOPTS_TESTS="" | |||
tableopts_tables="" | tableopts_tables="" | |||
for kind in opt ser ver ; do | for kind in opt ser ver ; do | |||
for threading in nr r ; do | for threading in nr r ; do | |||
for opt in -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem ; do | for opt in -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem ; do | |||
testname=tableopts_${kind}_${threading}${opt}.${kind} | testname=tableopts_${kind}_${threading}${opt}.${kind} | |||
if [ "${TABLEOPTS_TESTS}" = "" ] ;then | if [ "${TABLEOPTS_TESTS}" = "" ] ;then | |||
TABLEOPTS_TESTS=${testname} | TABLEOPTS_TESTS=${testname} | |||
if [ "$kind" = "ser" -o "$kind" = "ver" ] ; then | if [ "$kind" = "ser" ] || [ "$kind" = "ver" ] ; then | |||
tableopts_tables=${testname}.tables | tableopts_tables=${testname}.tables | |||
fi | fi | |||
else | else | |||
TABLEOPTS_TESTS="${TABLEOPTS_TESTS} ${testname}" | TABLEOPTS_TESTS="${TABLEOPTS_TESTS} ${testname}" | |||
if [ "$kind" = "ser" -o "$kind" = "ver" ] ; then | if [ "$kind" = "ser" ] || [ "$kind" = "ver" ] ; then | |||
tableopts_tables="${tableopts_tables} ${testname}.tables" | tableopts_tables="${tableopts_tables} ${testname}.tables" | |||
fi | fi | |||
fi | fi | |||
bare_opt=${opt#-} | bare_opt=${opt#-} | |||
cat << EOF | cat << EOF | |||
tableopts_${kind}_${threading}_${bare_opt}_${kind}_SOURCES = tableopts.l4 | tableopts_${kind}_${threading}_${bare_opt}_${kind}_SOURCES = tableopts.l4 | |||
${testname}\$(EXEEXT): tableopts_${kind}_${threading}${opt}.\$(OBJEXT) | ${testname}\$(EXEEXT): tableopts_${kind}_${threading}${opt}.\$(OBJEXT) | |||
\$(LINK) -o \$@ \$< | \$(AM_V_CCLD)\$(LINK) -o \$@ \$< | |||
EOF | EOF | |||
done | done | |||
done | done | |||
done | done | |||
echo TABLEOPTS_TESTS = ${TABLEOPTS_TESTS} | echo TABLEOPTS_TESTS = ${TABLEOPTS_TESTS} | |||
echo | echo | |||
echo tableopts_tables = ${tableopts_tables} | echo tableopts_tables = ${tableopts_tables} | |||
End of changes. 5 change blocks. | ||||
8 lines changed or deleted | 10 lines changed or added |