2005-10-18 05:30:49 +04:00
|
|
|
# $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.14 2005/10/18 01:30:48 tgl Exp $
|
2000-12-11 23:40:33 +03:00
|
|
|
|
2001-09-06 14:49:30 +04:00
|
|
|
MODULE_big = seg
|
2003-09-14 06:18:49 +04:00
|
|
|
OBJS = seg.o segparse.o
|
2001-09-06 14:49:30 +04:00
|
|
|
DATA_built = seg.sql
|
|
|
|
DOCS = README.seg
|
|
|
|
REGRESS = seg
|
2000-12-11 23:40:33 +03:00
|
|
|
|
2004-08-21 00:13:10 +04:00
|
|
|
EXTRA_CLEAN = segparse.c segparse.h segscan.c y.tab.c y.tab.h
|
|
|
|
|
2005-10-18 05:30:49 +04:00
|
|
|
PG_CPPFLAGS = -I.
|
|
|
|
|
2004-08-21 00:13:10 +04:00
|
|
|
ifdef USE_PGXS
|
2005-09-27 21:13:14 +04:00
|
|
|
PGXS := $(shell pg_config --pgxs)
|
2004-08-21 00:13:10 +04:00
|
|
|
include $(PGXS)
|
|
|
|
else
|
|
|
|
subdir = contrib/seg
|
|
|
|
top_builddir = ../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
|
|
|
endif
|
2000-12-11 23:40:33 +03:00
|
|
|
|
2002-11-02 01:52:34 +03:00
|
|
|
# segscan is compiled as part of segparse
|
|
|
|
segparse.o: segscan.c
|
|
|
|
|
2001-11-16 19:32:33 +03:00
|
|
|
segparse.c: segparse.h ;
|
|
|
|
|
|
|
|
segparse.h: segparse.y
|
2001-02-11 01:31:42 +03:00
|
|
|
ifdef YACC
|
2000-12-11 23:40:33 +03:00
|
|
|
$(YACC) -d $(YFLAGS) -p seg_yy $<
|
2003-05-14 07:27:22 +04:00
|
|
|
mv -f y.tab.c segparse.c
|
2000-12-11 23:40:33 +03:00
|
|
|
mv -f y.tab.h segparse.h
|
2001-02-11 01:31:42 +03:00
|
|
|
else
|
|
|
|
@$(missing) bison $< $@
|
|
|
|
endif
|
2000-12-11 23:40:33 +03:00
|
|
|
|
|
|
|
segscan.c: segscan.l
|
|
|
|
ifdef FLEX
|
2003-09-14 06:18:49 +04:00
|
|
|
$(FLEX) $(FLEXFLAGS) -o'$@' $<
|
2000-12-11 23:40:33 +03:00
|
|
|
else
|
|
|
|
@$(missing) flex $< $@
|
|
|
|
endif
|