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