mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Only look for bison as YACC; other yaccs need to be selected explicitly.
When no suitable YACC is configured, supply useful informational messages to users. (Same way flex has been handled for a while.)
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Makefile for the bootstrap module
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.26 2000/10/20 21:03:41 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.27 2001/02/10 22:31:42 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -42,10 +42,14 @@ endef
|
||||
|
||||
|
||||
$(srcdir)/bootparse.c $(srcdir)/bootstrap_tokens.h: bootparse.y Makefile
|
||||
ifdef YACC
|
||||
$(YACC) -d $(YFLAGS) $<
|
||||
$(sed-magic) < y.tab.c > $(srcdir)/bootparse.c
|
||||
$(sed-magic) < y.tab.h > $(srcdir)/bootstrap_tokens.h
|
||||
rm -f y.tab.c y.tab.h
|
||||
else
|
||||
@$(missing) bison $< $@
|
||||
endif
|
||||
|
||||
$(srcdir)/bootscanner.c: bootscanner.l Makefile
|
||||
ifdef FLEX
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Makefile for parser
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.31 2000/10/20 21:03:44 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.32 2001/02/10 22:31:42 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -25,9 +25,13 @@ SUBSYS.o: $(OBJS)
|
||||
$(LD) $(LDREL) $(LDOUT) $@ $^
|
||||
|
||||
$(srcdir)/gram.c $(srcdir)/parse.h: gram.y
|
||||
ifdef YACC
|
||||
$(YACC) -d $(YFLAGS) $<
|
||||
mv y.tab.c $(srcdir)/gram.c
|
||||
mv y.tab.h $(srcdir)/parse.h
|
||||
else
|
||||
@$(missing) bison $< $@
|
||||
endif
|
||||
|
||||
$(srcdir)/scan.c: scan.l
|
||||
ifdef FLEX
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.72 2000/11/30 20:36:13 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.73 2001/02/10 22:31:42 petere Exp $
|
||||
|
||||
subdir = src/interfaces/ecpg/preproc
|
||||
top_builddir = ../../../..
|
||||
@ -29,9 +29,13 @@ ecpg: $(OBJS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||
|
||||
$(srcdir)/preproc.c $(srcdir)/preproc.h: preproc.y
|
||||
ifdef YACC
|
||||
$(YACC) -d $(YFLAGS) $<
|
||||
mv y.tab.c $(srcdir)/preproc.c
|
||||
mv y.tab.h $(srcdir)/preproc.h
|
||||
else
|
||||
@$(missing) bison $< $@
|
||||
endif
|
||||
|
||||
$(srcdir)/pgc.c: pgc.l
|
||||
ifdef FLEX
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Makefile for the plpgsql shared object
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.10 2001/02/09 01:05:42 tgl Exp $
|
||||
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.11 2001/02/10 22:31:42 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -55,10 +55,14 @@ pl_parse.o: $(srcdir)/pl_gram.c $(srcdir)/pl_scan.c plpgsql.h
|
||||
# they must be generated in the srcdir (as opposed to builddir).
|
||||
|
||||
$(srcdir)/pl_gram.c $(srcdir)/pl.tab.h: gram.y
|
||||
ifdef YACC
|
||||
$(YACC) -d $(YFLAGS) $<
|
||||
sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' < y.tab.c > $(srcdir)/pl_gram.c
|
||||
sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' < y.tab.h > $(srcdir)/pl.tab.h
|
||||
rm -f y.tab.c y.tab.h
|
||||
else
|
||||
@$(missing) bison $< $@
|
||||
endif
|
||||
|
||||
$(srcdir)/pl_scan.c: scan.l
|
||||
ifdef FLEX
|
||||
|
Reference in New Issue
Block a user