It's starting to annoy me, but I might just be getting there..
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 $<
--- /dev/null
+#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 */
#include <stdlib.h>
#include <string.h>
#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);
;
%%
+#if 0
#include "scanner.c"
+#endif
static char *unquote (const char *orig)
{
%{
#include <stdlib.h>
+#include "oconfig.h"
+#include "aux_types.h"
+#include "parser.h"
%}
WHITE_SPACE [\ \t\b]
ALNUM [A-Za-z0-9_]