diff --git a/src/db/Makefile.Unix b/src/db/Makefile.Unix index d91ebc2d3..16c6fff4d 100644 --- a/src/db/Makefile.Unix +++ b/src/db/Makefile.Unix @@ -5,6 +5,11 @@ include $(EPICS)/config/CONFIG_BASE USR_LDLIBS = -lDb -lCom USR_LDFLAGS = -L. +LEX = $(ELEX) +YACC = $(EYACC) +YACCOPT = -l +LEXOPT = -L + DEPLIBS_BASE = $(EPICS_BASE_LIB) DEPLIBS = ./libDb.a\ $(DEPLIBS_BASE)/libCom.a @@ -16,7 +21,6 @@ SRCS.c = \ atdb_lex.c \ atdb_yacc.c \ ../dbta.c \ - ../atdb.c \ ../dbl.c \ ../dbls.c @@ -29,8 +33,8 @@ PROD = dbta dbl dbls atdb include $(EPICS)/config/RULES.Unix -atdb: atdb.o atdb_yacc.o $(DEPLIBS) - $(LINK.c) -o $@ atdb.o atdb_yacc.o $(LDLIBS) +atdb: atdb_yacc.o $(DEPLIBS) + $(LINK.c) -o $@ atdb_yacc.o $(LDLIBS) # Extra rule since atdb_lex.c is included in atdb_yacc.c # In my opinion, these objects should really be built diff --git a/src/db/atdb_yacc.y b/src/db/atdb_yacc.y index 8c7aa7b9f..1be5e3c00 100644 --- a/src/db/atdb_yacc.y +++ b/src/db/atdb_yacc.y @@ -2,6 +2,7 @@ #include #include #include +static int yy_start; #include /* kludge for buggy lex/yacc. exploits the fact that we know the union */ /* below will be given the name YYSTYPE. done so that ifndef YYSTYPE */ @@ -130,6 +131,5 @@ char *str; sprintf(message,"Error line %d : %s\n",line_num, yytext); errMessage(-1,message); } - -yywrap() { return(1); } - + +#include "atdb.c"