]> granicus.if.org Git - flex/commitdiff
Removed m4 from test-reject
authorJohn Millaway <john43@users.sourceforge.net>
Tue, 21 Mar 2006 20:58:39 +0000 (20:58 +0000)
committerJohn Millaway <john43@users.sourceforge.net>
Tue, 21 Mar 2006 20:58:39 +0000 (20:58 +0000)
tests/test-reject/Makefile.am
tests/test-reject/scanner.l

index 2a9c3e2ced3c79bb251e519f818e72347737423c..8fe5d7cebc466d6b5c6673ccc942d0d0c541c9a2 100644 (file)
@@ -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) $<
+
+
index a90a1facf142fc6e158b91db895feab7d438a037..25dab60633d79e1b93cfa3168865e0b5ada65fc7 100644 (file)
@@ -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 */