From 74aa347ed7e32ef96608eddf6602a22aaaf6115b Mon Sep 17 00:00:00 2001 From: john43 Date: Tue, 21 Mar 2006 20:58:39 +0000 Subject: Removed m4 from test-reject --- tests/test-reject/Makefile.am | 13 ++++++++++++- tests/test-reject/scanner.l | 15 ++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/test-reject/Makefile.am b/tests/test-reject/Makefile.am index 2a9c3e2..8fe5d7c 100644 --- a/tests/test-reject/Makefile.am +++ b/tests/test-reject/Makefile.am @@ -65,5 +65,16 @@ test: $(tests) ./$(testname)-ver$(EXEEXT) $(testname)-ver.tables < $(srcdir)/test.input ./$(testname)-ser$(EXEEXT) $(testname)-ser.tables < $(srcdir)/test.input -.c.o: +test-reject-nr.o: test-reject-nr.c $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< + +test-reject-ver.o: test-reject-ver.c + $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< + +test-reject-ser.o: test-reject-ser.c + $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< + +test-reject-r.o: test-reject-r.c + $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_IS_REENTRANT $(CFLAGS) $< + + diff --git a/tests/test-reject/scanner.l b/tests/test-reject/scanner.l index a90a1fa..25dab60 100644 --- a/tests/test-reject/scanner.l +++ b/tests/test-reject/scanner.l @@ -46,13 +46,11 @@ int main ( int argc, char** argv ) void *yyscanner=0; M4_YY_DECL_GUTS_VAR(); -m4_ifdef( [[M4_YY_REENTRANT]], -[[ +#ifdef TEST_IS_REENTRANT yylex_init(&yyscanner); -]]) +#endif -m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], -[[ +#ifdef TEST_HAS_TABLES_EXTERNAL if((fp = fopen(argv[1],"r"))== NULL) yy_fatal_error("could not open tables file for reading" M4_YY_CALL_LAST_ARG); @@ -60,7 +58,7 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], yy_fatal_error("yytables_fload returned < 0" M4_YY_CALL_LAST_ARG); if(M4_YY_TABLES_VERIFY) exit(0); -]]) +#endif if(argc > 2){ if((fp = fopen(argv[2],"r"))== NULL) @@ -70,10 +68,9 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], while(yylex(M4_YY_CALL_ONLY_ARG) != 0) ; -m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], -[[ +#ifdef TEST_HAS_TABLES_EXTERNAL yytables_destroy(M4_YY_CALL_ONLY_ARG); -]]) +#endif yylex_destroy(M4_YY_CALL_ONLY_ARG); if(argc < 0) /* silence the compiler */ -- cgit v1.2.1