2001-01-12 03:16:26 +03:00
|
|
|
subdir = contrib/intarray
|
|
|
|
top_builddir = ../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
|
|
|
|
# override libdir to install shlib in contrib not main directory
|
|
|
|
libdir := $(libdir)/contrib
|
|
|
|
|
|
|
|
# shared library parameters
|
|
|
|
NAME= _int
|
|
|
|
SO_MAJOR_VERSION= 1
|
|
|
|
SO_MINOR_VERSION= 0
|
|
|
|
|
2001-03-18 00:59:42 +03:00
|
|
|
override CPPFLAGS += -I$(srcdir) -DPGSQL71
|
2001-01-12 03:16:26 +03:00
|
|
|
|
|
|
|
OBJS= _int.o
|
|
|
|
|
|
|
|
all: all-lib $(NAME).sql
|
|
|
|
|
|
|
|
# Shared library stuff
|
|
|
|
include $(top_srcdir)/src/Makefile.shlib
|
|
|
|
|
|
|
|
|
|
|
|
$(NAME).sql: $(NAME).sql.in
|
2001-03-18 00:59:42 +03:00
|
|
|
sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
|
2001-01-12 03:16:26 +03:00
|
|
|
|
|
|
|
.PHONY: submake
|
|
|
|
submake:
|
|
|
|
$(MAKE) -C $(top_builddir)/src/test/regress pg_regress
|
|
|
|
|
2001-03-18 00:59:42 +03:00
|
|
|
# against installed postmaster
|
2001-01-12 03:16:26 +03:00
|
|
|
installcheck: submake
|
|
|
|
$(top_builddir)/src/test/regress/pg_regress _int
|
|
|
|
|
2001-03-18 00:59:42 +03:00
|
|
|
# in-tree test doesn't work yet (no way to install my shared library)
|
|
|
|
#check: all submake
|
|
|
|
# $(top_builddir)/src/test/regress/pg_regress --temp-install \
|
|
|
|
# --top-builddir=$(top_builddir) _int
|
2001-01-12 03:16:26 +03:00
|
|
|
check:
|
2001-03-18 00:59:42 +03:00
|
|
|
@echo "'make check' is not supported."
|
|
|
|
@echo "Do 'make install', then 'make installcheck' instead."
|
2001-01-12 03:16:26 +03:00
|
|
|
|
|
|
|
install: all installdirs install-lib
|
2001-03-18 00:59:42 +03:00
|
|
|
#$(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
|
2001-01-12 03:16:26 +03:00
|
|
|
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
$(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
|
|
|
|
|
|
|
|
uninstall: uninstall-lib
|
2001-03-18 00:59:42 +03:00
|
|
|
rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
|
2001-01-12 03:16:26 +03:00
|
|
|
|
|
|
|
clean distclean maintainer-clean: clean-lib
|
2001-03-18 00:59:42 +03:00
|
|
|
rm -f *.so y.tab.c y.tab.h $(OBJS) $(NAME).sql
|
2001-01-12 03:16:26 +03:00
|
|
|
# things created by various check targets
|
2001-03-18 00:59:42 +03:00
|
|
|
rm -rf results tmp_check log
|
|
|
|
rm -f regression.diffs regression.out regress.out run_check.out
|
|
|
|
ifeq ($(PORTNAME), win)
|
|
|
|
rm -f regress.def
|
|
|
|
endif
|
|
|
|
|
|
|
|
depend dep:
|
|
|
|
$(CC) -MM $(CFLAGS) *.c >depend
|
|
|
|
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|