diff options
author | John Millaway <john43@users.sourceforge.net> | 2006-03-21 21:18:02 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2006-03-21 21:18:02 +0000 |
commit | d71e70468f7f654b56941eb73a3e5cf15fca6091 (patch) | |
tree | 914b3a9ce2894111fc070b7b8349f7f7a5dfbd3c /tests | |
parent | 007d1bb2aa0b9d80946a69cac90b81f8cac7844d (diff) |
Removed m4 from test-table-opts
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-table-opts/Makefile.am | 10 | ||||
-rw-r--r-- | tests/test-table-opts/scanner.l | 15 |
2 files changed, 14 insertions, 11 deletions
diff --git a/tests/test-table-opts/Makefile.am b/tests/test-table-opts/Makefile.am index 4380e3d..3deb3ba 100644 --- a/tests/test-table-opts/Makefile.am +++ b/tests/test-table-opts/Makefile.am @@ -122,8 +122,14 @@ test-mul: $(serexe) ./$$t all-ser.tables < $(srcdir)/test.input || { echo $$t FAILED; exit 1; } ; \ done -.c.o: - $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< +test-opt-nr-%.o: test-opt-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< +test-ser-nr-%.o: test-ser-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< +test-ver-nr-%.o: test-ver-nr-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $< + +test-opt-r-%.o: test-opt-r-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_IS_REENTRANT $(CFLAGS) $< +test-ser-r-%.o: test-ser-r-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT $(CFLAGS) $< +test-ver-r-%.o: test-ver-r-%.c ; $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL -DTEST_IS_REENTRANT $(CFLAGS) $< + .PHONY: test-table-opts test test-opt test-ser test-ver test-mul .SECONDARY: $(allobj) $(allsrc) diff --git a/tests/test-table-opts/scanner.l b/tests/test-table-opts/scanner.l index 5b3255f..a9a87c6 100644 --- a/tests/test-table-opts/scanner.l +++ b/tests/test-table-opts/scanner.l @@ -48,13 +48,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); @@ -62,7 +60,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) @@ -72,10 +70,9 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], while(yylex(M4_YY_CALL_ONLY_ARG) != 0) ; -m4_ifdef( [[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 */ |