2008-08-29 21:02:33 +08:00
|
|
|
# $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.21 2008/08/29 13:02:32 petere Exp $
|
2000-12-12 04:40:33 +08:00
|
|
|
|
2001-09-06 18:49:30 +08:00
|
|
|
MODULE_big = seg
|
2003-09-14 10:18:49 +08:00
|
|
|
OBJS = seg.o segparse.o
|
2001-09-06 18:49:30 +08:00
|
|
|
DATA_built = seg.sql
|
2006-02-27 20:54:39 +08:00
|
|
|
DATA = uninstall_seg.sql
|
2001-09-06 18:49:30 +08:00
|
|
|
REGRESS = seg
|
2000-12-12 04:40:33 +08:00
|
|
|
|
2006-04-04 02:47:41 +08:00
|
|
|
EXTRA_CLEAN = y.tab.c y.tab.h
|
2004-08-21 04:13:10 +08:00
|
|
|
|
|
|
|
ifdef USE_PGXS
|
2007-06-27 06:05:04 +08:00
|
|
|
PG_CONFIG = pg_config
|
|
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
2004-08-21 04:13:10 +08: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-12 04:40:33 +08:00
|
|
|
|
2006-03-07 09:03:12 +08:00
|
|
|
|
2002-11-02 06:52:34 +08:00
|
|
|
# segscan is compiled as part of segparse
|
2006-04-04 02:47:41 +08:00
|
|
|
segparse.o: $(srcdir)/segscan.c
|
2002-11-02 06:52:34 +08:00
|
|
|
|
2008-08-29 21:02:33 +08:00
|
|
|
$(srcdir)/segparse.c: segparse.y
|
|
|
|
ifdef BISON
|
|
|
|
$(BISON) $(BISONFLAGS) -o $@ $<
|
2001-02-11 06:31:42 +08:00
|
|
|
else
|
|
|
|
@$(missing) bison $< $@
|
|
|
|
endif
|
2000-12-12 04:40:33 +08:00
|
|
|
|
2006-04-04 02:47:41 +08:00
|
|
|
$(srcdir)/segscan.c: segscan.l
|
2000-12-12 04:40:33 +08:00
|
|
|
ifdef FLEX
|
2003-09-14 10:18:49 +08:00
|
|
|
$(FLEX) $(FLEXFLAGS) -o'$@' $<
|
2000-12-12 04:40:33 +08:00
|
|
|
else
|
|
|
|
@$(missing) flex $< $@
|
|
|
|
endif
|
2006-04-04 02:47:41 +08:00
|
|
|
|
2008-08-29 21:02:33 +08:00
|
|
|
distprep: $(srcdir)/segparse.c $(srcdir)/segscan.c
|
2006-04-04 02:47:41 +08:00
|
|
|
|
|
|
|
maintainer-clean:
|
2008-08-29 21:02:33 +08:00
|
|
|
rm -f $(srcdir)/segparse.c $(srcdir)/segscan.c
|