postgresql/contrib/spi/Makefile
Marc G. Fournier 5b4b3d563d From: Jun Kuwamura <juk@rccm.co.jp>
This patch fix the Makefiles in contrib/{pginterface, spi,
miscutil, int8, ip_and_mac, sequence, soundex, string, userlock,
array, datetime} to install their modules in one directory(lib/modules/).
1998-04-22 04:16:46 +00:00

37 lines
745 B
Makefile

SRCDIR= ../../src
include $(SRCDIR)/Makefile.global
CONTRIBDIR=$(LIBDIR)/modules
CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
endif
TARGETS= refint$(DLSUFFIX) refint.sql timetravel$(DLSUFFIX) timetravel.sql \
autoinc$(DLSUFFIX) autoinc.sql \
insert_username$(DLSUFFIX) insert_username.sql
CLEANFILES+= $(TARGETS)
all:: $(TARGETS)
install:: all $(CONTRIBDIR)
$(INSTALL) -c README $(CONTRIBDIR)/README.spi
for f in *.example *.sql *$(DLSUFFIX); do $(INSTALL) -c $$f $(CONTRIBDIR)/$$f; done
$(CONTRIBDIR):
mkdir -p $(CONTRIBDIR)
%.sql: %.source
rm -f $@; \
C=`pwd`; \
sed -e "s:_OBJWD_:$(CONTRIBDIR):g" \
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" < $< > $@
clean:
rm -f $(TARGETS) *.o