mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-20 01:13:22 +02:00
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/).
37 lines
745 B
Makefile
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
|