# automake knows how to distinguish between the various kinds of tests
# we have.
-TEST_EXTENSIONS = .reject .table .direct .cn .i3
+TEST_EXTENSIONS = .reject .table .direct .cn .i3 .pthread
LOG_COMPILER = $(srcdir)/testwrapper.sh
AM_LOG_FLAGS = -d $(srcdir) -r
I3_LOG_COMPILER=$(srcdir)/testwrapper.sh
AM_I3_LOG_FLAGS=-i $(srcdir)/cxx_yywrap.txt -i $(srcdir)/cxx_yywrap.txt -i $(srcdir)/cxx_yywrap.txt
+PTHREAD_LOG_COMPILER=$(srcdir)/testwrapper.sh
+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
+
AM_YFLAGS = -d -p test
-check_PROGRAMS = $(simple_tests) $(reject_tests) $(TABLE_TESTS) $(DIRECT_TESTS) $(I3_TESTS)
+check_PROGRAMS = $(simple_tests) $(reject_tests) $(TABLE_TESTS) $(DIRECT_TESTS) $(I3_TESTS) $(PTHREAD_TESTS)
simple_tests = \
alloc_extra \
I3_TESTS = \
cxx_yywrap.i3
+PTHREAD_TESTS = \
+ pthread.pthread
+
alloc_extra_SOURCES = alloc_extra.l
array_nr_SOURCES = array_nr.l
array_r_SOURCES = array_r.l
posixly_correct_SOURCES = posixly_correct.l
prefix_nr_SOURCES = prefix_nr.l
prefix_r_SOURCES = prefix_r.l
+pthread_pthread_SOURCES = pthread.l
quotes_SOURCES = quotes.l
reject_nr_reject_SOURCES = reject.l4
reject_r_reject_SOURCES = reject.l4
noansi_r.txt \
prefix_nr.txt \
prefix_r.txt \
+ pthread_1.txt \
+ pthread_2.txt \
+ pthread_3.txt \
+ pthread_4.txt \
+ pthread_5.txt \
reject.txt \
reject_nr.reject.c \
reject_r.reject.c \
yyextra.txt \
options.cn
+pthread_pthread_LDADD = -lpthread
+
# specify how to process .l files in order to test the flex built by make all
FLEX = $(top_builddir)/src/flex
+++ /dev/null
-# This file is part of flex.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-
-# Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE.
-
-
-FLEX = $(top_builddir)/flex
-
-EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input test-4.input test-5.input
-CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
-OBJS = scanner.o # parser.o
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-LIBS = -lpthread
-#LFLAGS = --header="scanner.h"
-#YFLAGS = --defines --output=parser.c
-
-testname = test-pthread
-
-scanner.c: $(srcdir)/scanner.l
- $(FLEX) $(LFLAGS) $<
-
-$(testname)$(EXEEXT): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
- ./$(testname) $(srcdir)/test-*.input
-
-.c.o:
- $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<