summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2002-04-12 15:23:45 +0000
committerWill Estes <wlestes@users.sourceforge.net>2002-04-12 15:23:45 +0000
commita3df12847825a5db3da7627166f2ae80da76ff2a (patch)
treedb3f67b6b24d6365163f43e00a94dbf6b4431e5e /tests
parenta56a0cdb0036b04fe52bbc7f6fb55921d904e833 (diff)
downloadflex-git-a3df12847825a5db3da7627166f2ae80da76ff2a.tar.gz
put test-prefix-r under automake
Diffstat (limited to 'tests')
-rw-r--r--tests/test-prefix-r/Makefile.am28
-rw-r--r--tests/test-prefix-r/Makefile.in66
2 files changed, 28 insertions, 66 deletions
diff --git a/tests/test-prefix-r/Makefile.am b/tests/test-prefix-r/Makefile.am
new file mode 100644
index 0000000..aa3c694
--- /dev/null
+++ b/tests/test-prefix-r/Makefile.am
@@ -0,0 +1,28 @@
+BISON = @BISON@
+FLEX = $(top_builddir)/flex
+
+EXTRA_DIST = scanner.l test.input
+CLEANFILES = scanner.c scanner.h parser.c parser.h test-prefix-r 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-prefix-r
+
+scanner.c: $(srcdir)/scanner.l
+ $(FLEX) $(LFLAGS) $<
+
+parser.c: $(srcdir)/parser.y
+ $(BISON) $(YFLAGS) $<
+
+$(testname)$(EXEEXT): $(OBJS)
+ $(CC) -o $@ $(OBJS) $(LDFLAGS)
+
+test: $(testname)$(EXEEXT)
+ $(srcdir)/$(testname)$(EXEEXT) < $(srcdir)/test.input
+
+.c.o:
+ $(CC) -c -o $@ $(INCLUDES) $<
diff --git a/tests/test-prefix-r/Makefile.in b/tests/test-prefix-r/Makefile.in
deleted file mode 100644
index b00d5f3..0000000
--- a/tests/test-prefix-r/Makefile.in
+++ /dev/null
@@ -1,66 +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-prefix-r
-
-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)
- ./$(TESTNAME) < $(srcdir)/test.input
-
-distclean: clean
- rm -f Makefile
-
-clean:
- rm -f scanner.o scanner.c parser.o parser.c parser.h parser.h $(TESTNAME)
-