From: Florian Forster Date: Fri, 9 Feb 2007 07:23:29 +0000 (+0100) Subject: More fiddling with the automake stuff. X-Git-Tag: liboconfig-0.1.0~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3be849633e6ef4ad55167af440613839076a12f1;p=liboconfig.git More fiddling with the automake stuff. It's starting to annoy me, but I might just be getting there.. --- diff --git a/src/Makefile.am b/src/Makefile.am index e519ada..ee05acf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,15 +1,14 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -BUILT_SOURCES = scanner.c parser.h -CLEANFILES = parser.h parser.c scanner.c +BUILT_SOURCES = parser.h +CLEANFILES = parser.h +AM_YFLAGS = -d include_HEADERS = oconfig.h lib_LTLIBRARIES = liboconfig.la -scanner.c: scanner.l - $(LEX) $(AM_LFLAGS) $(LFLAGS) -o scanner.c $< +#scanner.c: scanner.l -parser.h: parser.y scanner.c - $(YACC) $(AM_YFLAGS) $(YFLAGS) -o parser.c $< +liboconfig_la_SOURCES = oconfig.c oconfig.h scanner.l parser.y -liboconfig_la_SOURCES = oconfig.c oconfig.h parser.c +# $(YACC) $(AM_YFLAGS) $(YFLAGS) -o parser.c $< diff --git a/src/aux_types.h b/src/aux_types.h new file mode 100644 index 0000000..25b81ab --- /dev/null +++ b/src/aux_types.h @@ -0,0 +1,18 @@ +#ifndef AUX_TYPES_H +#define AUX_TYPES_H 1 + +struct statement_list_s +{ + oconfig_item_t *statement; + int statement_num; +}; +typedef struct statement_list_s statement_list_t; + +struct argument_list_s +{ + oconfig_value_t *argument; + int argument_num; +}; +typedef struct argument_list_s argument_list_t; + +#endif /* AUX_TYPES_H */ diff --git a/src/parser.y b/src/parser.y index 9932469..7f048d0 100644 --- a/src/parser.y +++ b/src/parser.y @@ -2,20 +2,7 @@ #include #include #include "oconfig.h" - -struct statement_list_s -{ - oconfig_item_t *statement; - int statement_num; -}; -typedef struct statement_list_s statement_list_t; - -struct argument_list_s -{ - oconfig_value_t *argument; - int argument_num; -}; -typedef struct argument_list_s argument_list_t; +#include "aux_types.h" static char *unquote (const char *orig); static void dump_ci (oconfig_item_t *ci, int shift); @@ -170,7 +157,9 @@ entire_file: ; %% +#if 0 #include "scanner.c" +#endif static char *unquote (const char *orig) { diff --git a/src/scanner.l b/src/scanner.l index de92f1c..1205508 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1,5 +1,8 @@ %{ #include +#include "oconfig.h" +#include "aux_types.h" +#include "parser.h" %} WHITE_SPACE [\ \t\b] ALNUM [A-Za-z0-9_]