]> granicus.if.org Git - flex/commitdiff
add tableopts.sh script
authorWill Estes <westes575@gmail.com>
Fri, 18 Jul 2014 01:36:43 +0000 (21:36 -0400)
committerWill Estes <westes575@gmail.com>
Wed, 12 Nov 2014 10:14:28 +0000 (05:14 -0500)
tests/tableopts.sh [new file with mode: 0755]

diff --git a/tests/tableopts.sh b/tests/tableopts.sh
new file mode 100755 (executable)
index 0000000..eada259
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# This script is present to generate the automake _SOURCES variables
+# for the tableopts_* tests. It also generates the linking rules for
+# 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
+# inclusion in a Makefile.am, typically by redirecting the output and then an automake include directive.
+
+for kind in opt ser ver ; do
+for threading in nr r ; do
+for opt in -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem ; do
+    testname=tableopts_${kind}_${threading}${opt}.${kind}
+    if [ "${TABLEOPTS_TESTS}" = "" ] ;then
+        TABLEOPTS_TESTS=${testname}
+        tableopts_tables=${testname}.tables
+    else
+        TABLEOPTS_TESTS="${TABLEOPTS_TESTS} ${testname}"
+        tableopts_tables="${tableopts_tables} ${testname}.tables"
+    fi
+    bare_opt=${opt#-}
+    cat << EOF
+tableopts_${kind}_${threading}_${bare_opt}_${kind}_SOURCES = tableopts.l4
+
+${testname}\$(EXEEXT): tableopts_${kind}_${threading}${opt}.\$(OBJEXT)
+       \$(LINK) -o \$@ \$<
+
+EOF
+done
+done
+done
+
+echo TABLEOPTS_TESTS = ${TABLEOPTS_TESTS}
+echo
+echo tableopts_tables = ${tableopts_tables}