mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
To fix the perpetually broken makefiles in the contrib tree, I have
written a generic framework of rules that the contrib makefiles can use instead of writing their own each time. You only need to set a few variables and off you go.
This commit is contained in:
@ -1,54 +1,12 @@
|
||||
# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.7 2001/06/18 21:38:01 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.8 2001/09/06 10:49:29 petere Exp $
|
||||
|
||||
subdir = contrib/intarray
|
||||
top_builddir = ../..
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
# override libdir to install shlib in contrib not main directory
|
||||
libdir := $(libdir)/contrib
|
||||
MODULES = _int
|
||||
DATA_built = _int.sql
|
||||
DOCS = README.intarray
|
||||
REGRESS = _int
|
||||
|
||||
# shared library parameters
|
||||
NAME= _int
|
||||
SO_MAJOR_VERSION= 1
|
||||
SO_MINOR_VERSION= 0
|
||||
|
||||
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
|
||||
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
|
||||
|
||||
OBJS= _int.o
|
||||
|
||||
all: all-lib $(NAME).sql
|
||||
|
||||
# Shared library stuff
|
||||
include $(top_srcdir)/src/Makefile.shlib
|
||||
|
||||
|
||||
$(NAME).sql: $(NAME).sql.in
|
||||
sed 's,MODULE_PATHNAME,$(libdir)/$(shlib),g' $< >$@
|
||||
|
||||
.PHONY: submake
|
||||
submake:
|
||||
$(MAKE) -C $(top_builddir)/src/test/regress pg_regress
|
||||
|
||||
installcheck: submake
|
||||
$(top_builddir)/src/test/regress/pg_regress _int
|
||||
|
||||
check:
|
||||
@echo "'$(MAKE) check' is not supported."
|
||||
@echo "Do '$(MAKE) install', then '$(MAKE) installcheck' instead."
|
||||
|
||||
install: all installdirs install-lib
|
||||
$(INSTALL_DATA) $(srcdir)/README.intarray $(docdir)/contrib
|
||||
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
|
||||
|
||||
uninstall: uninstall-lib
|
||||
rm -f $(docdir)/contrib/README.intarray $(datadir)/contrib/$(NAME).sql
|
||||
|
||||
clean distclean maintainer-clean: clean-lib
|
||||
rm -f $(OBJS) $(NAME).sql
|
||||
# things created by various check targets
|
||||
rm -rf results
|
||||
rm -f regression.diffs regression.out
|
||||
include $(top_srcdir)/contrib/contrib-global.mk
|
||||
|
Reference in New Issue
Block a user