| 1 |
# This file is part of flex. |
| 2 |
|
| 3 |
# Redistribution and use in source and binary forms, with or without |
| 4 |
# modification, are permitted provided that the following conditions |
| 5 |
# are met: |
| 6 |
|
| 7 |
# 1. Redistributions of source code must retain the above copyright |
| 8 |
# notice, this list of conditions and the following disclaimer. |
| 9 |
# 2. Redistributions in binary form must reproduce the above copyright |
| 10 |
# notice, this list of conditions and the following disclaimer in the |
| 11 |
# documentation and/or other materials provided with the distribution. |
| 12 |
|
| 13 |
# Neither the name of the University nor the names of its contributors |
| 14 |
# may be used to endorse or promote products derived from this software |
| 15 |
# without specific prior written permission. |
| 16 |
|
| 17 |
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 18 |
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 19 |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 20 |
# PURPOSE. |
| 21 |
|
| 22 |
AM_CFLAGS = $(WARNINGFLAGS) |
| 23 |
|
| 24 |
TESTS = $(check_PROGRAMS) options.cn |
| 25 |
|
| 26 |
# The script testwrapper.sh will run most tests as is. A couple tests |
| 27 |
# in the suite end in .reject, .table and the like so that we can pass |
| 28 |
# different arguments to the test runner. We list those extensions so |
| 29 |
# automake knows how to distinguish between the various kinds of tests |
| 30 |
# we have. |
| 31 |
|
| 32 |
TEST_EXTENSIONS = .reject .table .direct .cn .i3 .pthread .one .opt .ser .ver |
| 33 |
|
| 34 |
LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 35 |
AM_LOG_FLAGS = -d $(srcdir) -r |
| 36 |
|
| 37 |
REJECT_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 38 |
AM_REJECT_LOG_FLAGS = -d $(srcdir) -i $(srcdir)/reject.txt -r |
| 39 |
|
| 40 |
TABLE_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 41 |
AM_TABLE_LOG_FLAGS = -d $(builddir) -i $(srcdir)/reject.txt -t |
| 42 |
|
| 43 |
DIRECT_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper-direct.sh |
| 44 |
AM_DIRECT_LOG_FLAGS = -b $(abs_builddir) -s $(srcdir) |
| 45 |
|
| 46 |
CN_LOG_COMPILER = $(SHELL) $(srcdir)/options.cn |
| 47 |
AM_CN_LOG_FLAGS = $(FLEX) |
| 48 |
|
| 49 |
I3_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 50 |
AM_I3_LOG_FLAGS = -i $(srcdir)/cxx_yywrap.txt -i $(srcdir)/cxx_yywrap.txt -i $(srcdir)/cxx_yywrap.txt |
| 51 |
|
| 52 |
PTHREAD_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 53 |
AM_PTHREAD_LOG_FLAGS = -i $(srcdir)/pthread_1.txt -i $(srcdir)/pthread_2.txt -i $(srcdir)/pthread_3.txt -i $(srcdir)/pthread_4.txt -i $(srcdir)/pthread_5.txt |
| 54 |
|
| 55 |
ONE_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 56 |
AM_ONE_LOG_FLAGS = -1 -d $(srcdir) |
| 57 |
|
| 58 |
AM_YFLAGS = -d -p test |
| 59 |
AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src |
| 60 |
|
| 61 |
check_PROGRAMS = $(simple_tests) $(reject_tests) $(TABLE_TESTS) $(DIRECT_TESTS) $(I3_TESTS) $(PTHREAD_TESTS) $(ONE_TESTS) $(TABLEOPTS_TESTS) |
| 62 |
|
| 63 |
simple_tests = \ |
| 64 |
alloc_extra \ |
| 65 |
array_nr \ |
| 66 |
array_r \ |
| 67 |
basic_nr \ |
| 68 |
basic_r \ |
| 69 |
bison_nr \ |
| 70 |
bison_yylloc \ |
| 71 |
bison_yylval \ |
| 72 |
c_cxx_nr \ |
| 73 |
c_cxx_r \ |
| 74 |
ccl \ |
| 75 |
cxx_basic \ |
| 76 |
cxx_multiple_scanners \ |
| 77 |
cxx_restart \ |
| 78 |
debug_nr \ |
| 79 |
debug_r \ |
| 80 |
extended \ |
| 81 |
header_nr \ |
| 82 |
header_r \ |
| 83 |
mem_nr \ |
| 84 |
mem_r \ |
| 85 |
multiple_scanners_nr \ |
| 86 |
multiple_scanners_r \ |
| 87 |
posix \ |
| 88 |
posixly_correct \ |
| 89 |
prefix_nr \ |
| 90 |
prefix_r \ |
| 91 |
quote_in_comment \ |
| 92 |
quotes \ |
| 93 |
string_nr \ |
| 94 |
string_r \ |
| 95 |
top \ |
| 96 |
yyextra |
| 97 |
|
| 98 |
reject_tests = \ |
| 99 |
reject_nr.reject \ |
| 100 |
reject_r.reject |
| 101 |
|
| 102 |
TABLE_TESTS = \ |
| 103 |
reject_ver.table \ |
| 104 |
reject_ser.table |
| 105 |
|
| 106 |
DIRECT_TESTS = \ |
| 107 |
include_by_buffer.direct \ |
| 108 |
include_by_push.direct \ |
| 109 |
include_by_reentrant.direct \ |
| 110 |
rescan_nr.direct \ |
| 111 |
rescan_r.direct |
| 112 |
|
| 113 |
I3_TESTS = \ |
| 114 |
cxx_yywrap.i3 |
| 115 |
|
| 116 |
PTHREAD_TESTS = \ |
| 117 |
pthread.pthread |
| 118 |
|
| 119 |
ONE_TESTS = \ |
| 120 |
lineno_nr.one \ |
| 121 |
lineno_r.one \ |
| 122 |
lineno_trailing.one |
| 123 |
|
| 124 |
quote_in_comment_SOURCES = quote_in_comment.l |
| 125 |
alloc_extra_SOURCES = alloc_extra.l |
| 126 |
array_nr_SOURCES = array_nr.l |
| 127 |
array_r_SOURCES = array_r.l |
| 128 |
basic_nr_SOURCES = basic_nr.l |
| 129 |
basic_r_SOURCES = basic_r.l |
| 130 |
if HAVE_BISON |
| 131 |
bison_nr_SOURCES = bison_nr_scanner.l bison_nr_parser.y bison_nr_main.c |
| 132 |
nodist_bison_nr_SOURCES = bison_nr_parser.h bison_nr_scanner.h |
| 133 |
bison_yylloc_SOURCES = bison_yylloc_scanner.l bison_yylloc_parser.y bison_yylloc_main.c |
| 134 |
nodist_bison_yylloc_SOURCES = bison_yylloc_parser.h bison_yylloc_scanner.h |
| 135 |
bison_yylval_SOURCES = bison_yylval_scanner.l bison_yylval_parser.y bison_yylval_main.c |
| 136 |
nodist_bison_yylval_SOURCES = bison_yylval_parser.h bison_yylval_scanner.h |
| 137 |
else |
| 138 |
bison_nr_SOURCES = no_bison_stub.c |
| 139 |
bison_yylloc_SOURCES = no_bison_stub.c |
| 140 |
bison_yylval_SOURCES = no_bison_stub.c |
| 141 |
endif |
| 142 |
c_cxx_nr_SOURCES = c_cxx_nr.lll |
| 143 |
c_cxx_r_SOURCES = c_cxx_r.lll |
| 144 |
ccl_SOURCES = ccl.l |
| 145 |
cxx_basic_SOURCES = cxx_basic.ll |
| 146 |
cxx_restart_SOURCES = cxx_restart.ll |
| 147 |
cxx_multiple_scanners_SOURCES = cxx_multiple_scanners_main.cc cxx_multiple_scanners_1.ll cxx_multiple_scanners_2.ll |
| 148 |
cxx_yywrap_i3_SOURCES = cxx_yywrap.ll |
| 149 |
debug_nr_SOURCES = debug_nr.l |
| 150 |
debug_r_SOURCES = debug_r.l |
| 151 |
extended_SOURCES = extended.l |
| 152 |
header_nr_SOURCES = header_nr_scanner.l header_nr_main.c |
| 153 |
nodist_header_nr_SOURCES = header_nr_scanner.h |
| 154 |
header_r_SOURCES = header_r_scanner.l header_r_main.c |
| 155 |
nodist_header_r_SOURCES = header_r_scanner.h |
| 156 |
include_by_buffer_direct_SOURCES = include_by_buffer.direct.l |
| 157 |
include_by_push_direct_SOURCES = include_by_push.direct.l |
| 158 |
include_by_reentrant_direct_SOURCES = include_by_reentrant.direct.l |
| 159 |
lineno_nr_one_SOURCES = lineno_nr.l |
| 160 |
lineno_r_one_SOURCES = lineno_r.l |
| 161 |
lineno_trailing_one_SOURCES = lineno_trailing.l |
| 162 |
mem_nr_SOURCES = mem_nr.l |
| 163 |
mem_r_SOURCES = mem_r.l |
| 164 |
multiple_scanners_nr_SOURCES = multiple_scanners_nr_main.c multiple_scanners_nr_1.l multiple_scanners_nr_2.l |
| 165 |
nodist_multiple_scanners_nr_SOURCES = multiple_scanners_nr_1.h multiple_scanners_nr_2.h |
| 166 |
multiple_scanners_r_SOURCES = multiple_scanners_r_main.c multiple_scanners_r_1.l multiple_scanners_r_2.l |
| 167 |
nodist_multiple_scanners_r_SOURCES = multiple_scanners_nr_1.h multiple_scanners_nr_2.h |
| 168 |
posix_SOURCES = posix.l |
| 169 |
posixly_correct_SOURCES = posixly_correct.l |
| 170 |
prefix_nr_SOURCES = prefix_nr.l |
| 171 |
prefix_r_SOURCES = prefix_r.l |
| 172 |
pthread_pthread_SOURCES = pthread.l |
| 173 |
quotes_SOURCES = quotes.l |
| 174 |
reject_nr_reject_SOURCES = reject.l4 |
| 175 |
reject_r_reject_SOURCES = reject.l4 |
| 176 |
reject_ver_table_SOURCES = reject.l4 |
| 177 |
reject_ser_table_SOURCES = reject.l4 |
| 178 |
rescan_nr_direct_SOURCES = rescan_nr.direct.l |
| 179 |
rescan_r_direct_SOURCES = rescan_r.direct.l |
| 180 |
string_nr_SOURCES = string_nr.l |
| 181 |
string_r_SOURCES = string_r.l |
| 182 |
top_SOURCES = top.l top_main.c |
| 183 |
nodist_top_SOURCES = top.h |
| 184 |
yyextra_SOURCES = yyextra.l |
| 185 |
|
| 186 |
# Normally, automake would distribute files built by flex. Since the |
| 187 |
# point of the test suite is to test the files that flex builds, and |
| 188 |
# since anyone who has the flex distribution can build a flex binary |
| 189 |
# without having a flex binary, we want to not distribute the files |
| 190 |
# built by flex in the test suite. The dist-hook target accomplishes |
| 191 |
# this goal. It's also handy to have the list of files to clean since |
| 192 |
# automake doesn't know about the whacky ways in which we're abusing |
| 193 |
# it. |
| 194 |
|
| 195 |
CLEANFILES = \ |
| 196 |
alloc_extra.c \ |
| 197 |
array_nr.c \ |
| 198 |
array_r.c \ |
| 199 |
basic_nr.c \ |
| 200 |
basic_r.c \ |
| 201 |
bison_nr_parser.c \ |
| 202 |
bison_nr_parser.h \ |
| 203 |
bison_nr_scanner.c \ |
| 204 |
bison_nr_scanner.h \ |
| 205 |
bison_yylloc_parser.c \ |
| 206 |
bison_yylloc_parser.h \ |
| 207 |
bison_yylloc_scanner.c \ |
| 208 |
bison_yylloc_scanner.h \ |
| 209 |
bison_yylval_parser.c \ |
| 210 |
bison_yylval_parser.h \ |
| 211 |
bison_yylval_scanner.c \ |
| 212 |
bison_yylval_scanner.h \ |
| 213 |
c_cxx_nr.cc \ |
| 214 |
c_cxx_r.cc \ |
| 215 |
ccl.c \ |
| 216 |
cxx_basic.cc \ |
| 217 |
cxx_multiple_scanners_1.cc \ |
| 218 |
cxx_multiple_scanners_2.cc \ |
| 219 |
cxx_restart.cc \ |
| 220 |
cxx_yywrap.cc \ |
| 221 |
debug_nr.c \ |
| 222 |
debug_r.c \ |
| 223 |
extended.c \ |
| 224 |
header_nr_scanner.c \ |
| 225 |
header_nr_scanner.h \ |
| 226 |
header_r_scanner.c \ |
| 227 |
header_r_scanner.h \ |
| 228 |
include_by_buffer.direct.c \ |
| 229 |
include_by_push.direct.c \ |
| 230 |
include_by_reentrant.direct.c \ |
| 231 |
lineno_nr.c \ |
| 232 |
lineno_r.c \ |
| 233 |
lineno_trailing.c \ |
| 234 |
mem_nr.c \ |
| 235 |
mem_r.c \ |
| 236 |
multiple_scanners_nr_1.c \ |
| 237 |
multiple_scanners_nr_1.h \ |
| 238 |
multiple_scanners_nr_2.c \ |
| 239 |
multiple_scanners_nr_2.h \ |
| 240 |
multiple_scanners_r_1.c \ |
| 241 |
multiple_scanners_r_1.h \ |
| 242 |
multiple_scanners_r_2.c \ |
| 243 |
multiple_scanners_r_2.h \ |
| 244 |
posix.c \ |
| 245 |
posixly_correct.c \ |
| 246 |
prefix_nr.c \ |
| 247 |
prefix_r.c \ |
| 248 |
pthread.c \ |
| 249 |
quote_in_comment.c \ |
| 250 |
quotes.c \ |
| 251 |
reject_nr.reject.c \ |
| 252 |
reject_r.reject.c \ |
| 253 |
reject_ser.table.c \ |
| 254 |
reject_ser.table.tables \ |
| 255 |
reject_ver.table.c \ |
| 256 |
reject_ver.table.tables \ |
| 257 |
rescan_nr.direct.c \ |
| 258 |
rescan_r.direct.c \ |
| 259 |
string_nr.c \ |
| 260 |
string_r.c \ |
| 261 |
top.c \ |
| 262 |
top.h \ |
| 263 |
yyextra.c \ |
| 264 |
$(tableopts_c) \ |
| 265 |
$(tableopts_tables) |
| 266 |
|
| 267 |
dist-hook: |
| 268 |
for file in $(CLEANFILES) ; do \ |
| 269 |
rm -f $(distdir)/$$file \ |
| 270 |
; done |
| 271 |
|
| 272 |
EXTRA_DIST = \ |
| 273 |
README \ |
| 274 |
alloc_extra.txt \ |
| 275 |
array_nr.txt \ |
| 276 |
array_r.txt \ |
| 277 |
basic_nr.txt \ |
| 278 |
basic_r.txt \ |
| 279 |
bison_nr.txt \ |
| 280 |
bison_yylloc.txt \ |
| 281 |
bison_yylval.txt \ |
| 282 |
c_cxx_nr.txt \ |
| 283 |
c_cxx_r.txt \ |
| 284 |
ccl.txt \ |
| 285 |
cxx_basic.txt \ |
| 286 |
cxx_multiple_scanners.txt \ |
| 287 |
cxx_restart.txt \ |
| 288 |
cxx_yywrap.txt \ |
| 289 |
debug_nr.txt \ |
| 290 |
debug_r.txt \ |
| 291 |
extended.txt \ |
| 292 |
header_nr.txt \ |
| 293 |
header_r.txt \ |
| 294 |
include_by_buffer.direct.txt \ |
| 295 |
include_by_buffer.direct_2.txt \ |
| 296 |
include_by_buffer.direct_3.txt \ |
| 297 |
include_by_push.direct.txt \ |
| 298 |
include_by_push.direct_2.txt \ |
| 299 |
include_by_push.direct_3.txt \ |
| 300 |
include_by_reentrant.direct.txt \ |
| 301 |
include_by_reentrant.direct_2.txt \ |
| 302 |
include_by_reentrant.direct_3.txt \ |
| 303 |
lineno_nr.one.txt \ |
| 304 |
lineno_r.one.txt \ |
| 305 |
lineno_trailing.one.txt \ |
| 306 |
mem_nr.txt \ |
| 307 |
mem_r.txt \ |
| 308 |
prefix_nr.txt \ |
| 309 |
prefix_r.txt \ |
| 310 |
pthread_1.txt \ |
| 311 |
pthread_2.txt \ |
| 312 |
pthread_3.txt \ |
| 313 |
pthread_4.txt \ |
| 314 |
pthread_5.txt \ |
| 315 |
reject.txt \ |
| 316 |
rescan_nr.direct.txt \ |
| 317 |
rescan_r.direct.txt \ |
| 318 |
quote_in_comment.txt \ |
| 319 |
quotes.txt \ |
| 320 |
top.txt \ |
| 321 |
yyextra.txt \ |
| 322 |
tableopts.txt |
| 323 |
|
| 324 |
dist_noinst_SCRIPTS = \ |
| 325 |
tableopts.sh |
| 326 |
|
| 327 |
dist_check_SCRIPTS = \ |
| 328 |
options.cn \ |
| 329 |
testwrapper-direct.sh \ |
| 330 |
testwrapper.sh |
| 331 |
|
| 332 |
pthread_pthread_LDADD = @LIBPTHREAD@ |
| 333 |
|
| 334 |
# specify how to process .l files in order to test the flex built by make all |
| 335 |
|
| 336 |
FLEX = $(FLEXexe) |
| 337 |
|
| 338 |
.l.c: $(FLEX) |
| 339 |
$(AM_V_LEX)$(FLEX) -o $@ $< |
| 340 |
|
| 341 |
.ll.cc: $(FLEX) |
| 342 |
$(AM_V_LEX)$(FLEX) -+ -o $@ $< |
| 343 |
|
| 344 |
bison_nr_main.$(OBJEXT): bison_nr_parser.h bison_nr_scanner.h |
| 345 |
bison_nr_scanner.$(OBJEXT): bison_nr_parser.h |
| 346 |
|
| 347 |
bison_nr_scanner.h: bison_nr_scanner.c |
| 348 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 349 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 350 |
|
| 351 |
bison_yylloc_main.$(OBJEXT): bison_yylloc_parser.h bison_yylloc_scanner.h |
| 352 |
bison_yylloc_scanner.$(OBJEXT): bison_yylloc_parser.h |
| 353 |
|
| 354 |
bison_yylloc_scanner.h: bison_yylloc_scanner.c |
| 355 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 356 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 357 |
|
| 358 |
bison_yylval_main.$(OBJEXT): bison_yylval_parser.h bison_yylval_scanner.h |
| 359 |
bison_yylval_scanner.$(OBJEXT): bison_yylval_parser.h |
| 360 |
|
| 361 |
bison_yylval_scanner.h: bison_yylval_scanner.c |
| 362 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 363 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 364 |
|
| 365 |
# automake does not support compiling flex scanners output in C as C++ |
| 366 |
# so we explicitly sayhow, using the .lll suffix for the lex input file |
| 367 |
|
| 368 |
.lll.cc: $(FLEX) |
| 369 |
$(AM_V_LEX)$(FLEX) -o $@ $< |
| 370 |
|
| 371 |
header_nr_main.$(OBJEXT): header_nr_scanner.h |
| 372 |
|
| 373 |
header_nr_scanner.h: header_nr_scanner.c |
| 374 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 375 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 376 |
|
| 377 |
header_r_main.$(OBJEXT): header_r_scanner.h |
| 378 |
|
| 379 |
header_r_scanner.h: header_r_scanner.c |
| 380 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 381 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 382 |
|
| 383 |
multiple_scanners_nr_main.$(OBJEXT): multiple_scanners_nr_1.h multiple_scanners_nr_2.h |
| 384 |
|
| 385 |
multiple_scanners_nr_1.h: multiple_scanners_nr_1.c |
| 386 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 387 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 388 |
|
| 389 |
multiple_scanners_nr_2.h: multiple_scanners_nr_2.c |
| 390 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 391 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 392 |
|
| 393 |
multiple_scanners_r_main.$(OBJEXT): multiple_scanners_r_1.h multiple_scanners_r_2.h |
| 394 |
|
| 395 |
multiple_scanners_r_1.h: multiple_scanners_r_1.c |
| 396 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 397 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 398 |
|
| 399 |
multiple_scanners_r_2.h: multiple_scanners_r_2.c |
| 400 |
@if test ! -f $@; then rm -f $<; else :; fi |
| 401 |
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) $<; else :; fi |
| 402 |
|
| 403 |
posixly_correct.c: posixly_correct.l $(FLEX) |
| 404 |
$(AM_V_LEX)POSIXLY_CORRECT=1 $(FLEX) -o $@ $< |
| 405 |
|
| 406 |
reject_nr.reject.c: reject.l4 $(FLEX) |
| 407 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -o $@ $< |
| 408 |
|
| 409 |
reject_nr.reject$(EXEEXT): reject_nr.reject.$(OBJEXT) |
| 410 |
$(AM_V_CCLD)$(LINK) $^ |
| 411 |
|
| 412 |
reject_r.reject.c: reject.l4 $(FLEX) |
| 413 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape --reentrant -o $@ $< |
| 414 |
|
| 415 |
reject_r.reject.$(OBJEXT): reject_r.reject.c |
| 416 |
$(AM_V_CC)$(COMPILE) -DTEST_IS_REENTRANT -c -o $@ $< |
| 417 |
|
| 418 |
reject_r.reject$(EXEEXT): reject_r.reject.$(OBJEXT) |
| 419 |
$(AM_V_CCLD)$(LINK) $^ |
| 420 |
|
| 421 |
reject_ver.table.c: reject.l4 $(FLEX) |
| 422 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -o $@ --tables-verify --tables-file=$(basename $@).tables $< |
| 423 |
|
| 424 |
reject_ver.table.$(OBJEXT): reject_ver.table.c |
| 425 |
$(AM_V_CC)$(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< |
| 426 |
|
| 427 |
reject_ver.table$(EXEEXT): reject_ver.table.$(OBJEXT) |
| 428 |
$(AM_V_CCLD)$(LINK) $^ |
| 429 |
|
| 430 |
reject_ser.table.c: reject.l4 $(FLEX) |
| 431 |
$(AM_V_LEX)$(FLEX) -o $@ --unsafe-no-m4-sect3-escape --tables-file=$(basename $@).tables $< |
| 432 |
|
| 433 |
reject_ser.table.$(OBJEXT): reject_ser.table.c |
| 434 |
$(AM_V_CC)$(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< |
| 435 |
|
| 436 |
reject_ser.table$(EXEEXT): reject_ser.table.$(OBJEXT) |
| 437 |
$(AM_V_CCLD)$(LINK) $^ |
| 438 |
|
| 439 |
top_main.$(OBJEXT): top.h |
| 440 |
top.h: top.c |
| 441 |
|
| 442 |
# We separate out the tableopts _SOURCES variables and the linking |
| 443 |
# rules for those programs because automake has no way to specify such |
| 444 |
# things with a loop in a variable (even though make can do such |
| 445 |
# things) and the resultant list is both long an unenlightening. And |
| 446 |
# it can be / is generated by a shell script, tableopts.sh. |
| 447 |
|
| 448 |
$(srcdir)/tableopts.am: tableopts.sh |
| 449 |
$(SHELL) $(srcdir)/tableopts.sh > $(srcdir)/tableopts.am |
| 450 |
|
| 451 |
include $(srcdir)/tableopts.am |
| 452 |
|
| 453 |
tableopts := -Ca -Ce -Cf -CF -Cm -Cem -Cae -Caef -CaeF -Cam -Caem |
| 454 |
tableopts_opt_tests := $(foreach opt,$(tableopts), tableopts_opt_nr$(opt) tableopts_opt_r$(opt)) |
| 455 |
tableopts_sertests := $(foreach opt,$(tableopts), tableopts_ser_nr$(opt) tableopts_ser_r$(opt)) |
| 456 |
tableopts_vertests := $(foreach opt,$(tableopts), tableopts_ver_nr$(opt) tableopts_ver_r$(opt)) |
| 457 |
tableopts_tests := $(tableopts_opttests) $(tableopts_vertests) $(tableopts_sertests) |
| 458 |
|
| 459 |
tableopts_c := $(addsuffix .c,$(tableopts_tests)) |
| 460 |
|
| 461 |
OPT_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 462 |
AM_OPT_LOG_FLAGS = -d $(srcdir) -i $(srcdir)/tableopts.txt -r |
| 463 |
|
| 464 |
tableopts_opt_nr%.c: tableopts.l4 $(FLEX) |
| 465 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -P $(subst -,_,$(basename $(*F))) $(*:_F=F) -o $@ $< |
| 466 |
|
| 467 |
tableopts_opt_nr%.$(OBJEXT): tableopts_opt_nr%.c |
| 468 |
$(AM_V_CC)$(COMPILE) -c -o $@ $< |
| 469 |
|
| 470 |
tableopts_opt_r%.c: tableopts.l4 $(FLEX) |
| 471 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -P $(subst -,_,$(basename $(*F))) --reentrant $(subst _F,F,$*) -o $@ $< |
| 472 |
|
| 473 |
tableopts_opt_r%.$(OBJEXT): tableopts_opt_r%.c |
| 474 |
$(AM_V_CC)$(COMPILE) -DTEST_IS_REENTRANT -c -o $@ $< |
| 475 |
|
| 476 |
SER_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 477 |
AM_SER_LOG_FLAGS = -d $(builddir) -i $(srcdir)/tableopts.txt -r -t |
| 478 |
|
| 479 |
tableopts_ser_nr%.c: tableopts.l4 $(FLEX) |
| 480 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -P $(subst -,_,$(basename $(*F))) --tables-file="tableopts_ser_nr$*.ser.tables" $(subst _F,F,$*) -o $@ $< |
| 481 |
|
| 482 |
tableopts_ser_nr%.$(OBJEXT): tableopts_ser_nr%.c |
| 483 |
$(AM_V_CC)$(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< |
| 484 |
|
| 485 |
tableopts_ser_r%.c: tableopts.l4 $(FLEX) |
| 486 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -P $(subst -,_,$(basename $(*F))) -R --tables-file="tableopts_ser_r$*.ser.tables" $(subst _F,F,$*) -o $@ $< |
| 487 |
|
| 488 |
tableopts_ser_r%.$(OBJEXT): tableopts_ser_r%.c |
| 489 |
$(AM_V_CC)$(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT -c -o $@ $< |
| 490 |
|
| 491 |
VER_LOG_COMPILER = $(SHELL) $(srcdir)/testwrapper.sh |
| 492 |
AM_VER_LOG_FLAGS = -d $(builddir) -i $(srcdir)/tableopts.txt -r -t |
| 493 |
|
| 494 |
tableopts_ver_nr%.c: tableopts.l4 $(FLEX) |
| 495 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -P $(subst -,_,$(basename $(*F))) --tables-file="tableopts_ver_nr$*.ver.tables" --tables-verify $(subst _F,F,$*) -o $@ $< |
| 496 |
|
| 497 |
tableopts_ver_nr%.$(OBJEXT): tableopts_ver_nr%.c |
| 498 |
$(AM_V_CC)$(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -c -o $@ $< |
| 499 |
|
| 500 |
tableopts_ver_nr%.ver$(EXEEXT): tableopts_ver_nr%.$(OBJEXT) |
| 501 |
$(AM_V_CCLD)$(LINK) -o $@ $^ |
| 502 |
|
| 503 |
tableopts_ver_r%.c: tableopts.l4 $(FLEX) |
| 504 |
$(AM_V_LEX)$(FLEX) --unsafe-no-m4-sect3-escape -P $(subst -,_,$(basename $(*F))) -R --tables-file="tableopts_ver_r$*.ver.tables" --tables-verify $(subst _F,F,$*) -o $@ $< |
| 505 |
|
| 506 |
tableopts_ver_r%.$(OBJEXT): tableopts_ver_r%.c |
| 507 |
$(AM_V_CC)$(COMPILE) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT -c -o $@ $< |