summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2002-04-10 17:06:38 +0000
committerWill Estes <wlestes@users.sourceforge.net>2002-04-10 17:06:38 +0000
commit479c112de31f35a409ef19c7bab60d2100b9dca7 (patch)
tree12905b781709ed97043398b4d45d166f9b49ad38 /tests
parentfbe9a96469562b32e2839ebadba890ce72335490 (diff)
put test-include-by-reentrant under automake
Diffstat (limited to 'tests')
-rw-r--r--tests/test-include-by-reentrant/.cvsignore1
-rw-r--r--tests/test-include-by-reentrant/Makefile.am28
-rw-r--r--tests/test-include-by-reentrant/Makefile.in71
3 files changed, 29 insertions, 71 deletions
diff --git a/tests/test-include-by-reentrant/.cvsignore b/tests/test-include-by-reentrant/.cvsignore
index b523c90..a824aa3 100644
--- a/tests/test-include-by-reentrant/.cvsignore
+++ b/tests/test-include-by-reentrant/.cvsignore
@@ -1,4 +1,5 @@
Makefile
+Makefile.in
parser.c
parser.h
scanner.c
diff --git a/tests/test-include-by-reentrant/Makefile.am b/tests/test-include-by-reentrant/Makefile.am
new file mode 100644
index 0000000..f0742a5
--- /dev/null
+++ b/tests/test-include-by-reentrant/Makefile.am
@@ -0,0 +1,28 @@
+BISON = @BISON@
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test-1.input test-2.input test-3.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h test-include-by-reentrant OUTPUT $(OBJS)
+OBJS = scanner.o # parser.o
+
+INCLUDES = -I $(srcdir) -I $(top_srcdir)
+#LDFLAGS = $(top_srcdir)/libfl.a
+#LFLAGS = --header="scanner.h"
+#YFLAGS = --defines --output=parser.c
+
+testname = test-include-by-reentrant
+
+scanner.c: $(srcdir)/scanner.l
+ $(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+ $(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+ $(CC) -o $@ $(OBJS) $(LDFLAGS)
+
+test: $(testname)$(EXEEXT)
+ ./$(testname) test-1.input
+
+.c.o:
+ $(CC) -c -o $@ $(INCLUDES) $<
diff --git a/tests/test-include-by-reentrant/Makefile.in b/tests/test-include-by-reentrant/Makefile.in
deleted file mode 100644
index 82957c8..0000000
--- a/tests/test-include-by-reentrant/Makefile.in
+++ /dev/null
@@ -1,71 +0,0 @@
-# Makefile.in for a single TEST.
-#
-# By default this Makefile will build the target "$(TESTNAME)"
-# from the sources "scanner.l" and "parser.y".
-#
-# $(TESTNAME) is supplied by the calling Makefile.
-# "parser.y" is not necessary. You may delete this file
-# if you do not require a parser.
-# "scanner.l" is necessary. It should build "scanner.c".
-#
-
-@SET_MAKE@
-
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@ -I. -I"@srcdir@" -I..
-DEFS = @DEFS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-SHELL = /bin/sh
-srcdir = @srcdir@
-VPATH = @srcdir@
-LN_S = @LN_S@
-YACC = @YACC@
-CC = @CC@
-AR = ar
-RANLIB = @RANLIB@
-YACC = @YACC@
-
-# Edit these if necessary for your specific test.
-FLEX = ../../flex
-YFLAGS = --defines --output-file="parser.c" --name-prefix="test"
-OBJS = scanner.o # parser.o
-
-# Force YACC to be bison (autoconf generates 'bison -y')
-YACC = @BISON@
-
-TESTNAME = test-include-by-reentrant
-all: $(TESTNAME)
-
-$(TESTNAME): $(OBJS)
- $(CC) $(CFLAGS) -o $(TESTNAME) $(OBJS) $(LDFLAGS) $(LIBS)
-
-scanner.c: $(srcdir)/scanner.l
- $(FLEX) $(srcdir)/scanner.l
-
-scanner.o: scanner.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -c scanner.c
-
-parser.c: $(srcdir)/parser.y
- $(YACC) $(YFLAGS) $(srcdir)/parser.y
-
-parser.o: parser.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -c parser.c
-
-test: check
-
-check: $(TESTNAME)
- for f in test-1.input test-2.input test-3.input ; do \
- if test ! -f $$f ; then \
- cp -f $(srcdir)/$$f . ; \
- fi \
- done
- ./$(TESTNAME) test-1.input
-
-clean:
- rm -f scanner.o scanner.c parser.o parser.c parser.h $(TESTNAME)
-
-
-distclean: clean
- rm -f Makefile
-