mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
eec4c7366f
Here is a tar file the new directories, which substitute the old ones in contrib. Please remove the old directories array, datetime, miscutil, string and userlock before unpacking the tar file in contrib. Note that as the modules are now installed in lib/modules I install all my sql code in lib/sql. In my opinion also the other contributors should follow these rules.
62 lines
1.1 KiB
Makefile
62 lines
1.1 KiB
Makefile
#-------------------------------------------------------------------------
|
|
#
|
|
# Makefile--
|
|
# Makefile for array iterator functions.
|
|
#
|
|
#-------------------------------------------------------------------------
|
|
|
|
PGDIR = ../..
|
|
SRCDIR = $(PGDIR)/src
|
|
|
|
include $(SRCDIR)/Makefile.global
|
|
|
|
INCLUDE_OPT = -I ./ \
|
|
-I $(SRCDIR)/ \
|
|
-I $(SRCDIR)/include \
|
|
-I $(SRCDIR)/port/$(PORTNAME)
|
|
|
|
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
|
|
|
|
MODNAME = array_iterator
|
|
|
|
MODULE = $(MODNAME)$(DLSUFFIX)
|
|
|
|
MODDIR = $(LIBDIR)/modules
|
|
|
|
SQLDIR = $(LIBDIR)/sql
|
|
|
|
all: module sql
|
|
|
|
module: $(MODULE)
|
|
|
|
sql: $(MODNAME).sql
|
|
|
|
install: $(MODULE) $(MODDIR) $(SQLDIR)
|
|
cp -p $(MODULE) $(MODDIR)/
|
|
strip $(MODDIR)/$(MODULE)
|
|
cp -p $(MODNAME).sql $(SQLDIR)/
|
|
|
|
$(MODDIR):
|
|
mkdir -p $@
|
|
|
|
$(SQLDIR):
|
|
mkdir -p $@
|
|
|
|
%.sql: %.sql.in
|
|
sed "s|MODULE_PATHNAME|$(MODDIR)/$(MODULE)|" < $< > $@
|
|
|
|
.SUFFIXES: $(DLSUFFIX)
|
|
|
|
%$(DLSUFFIX): %.c
|
|
$(CC) $(CFLAGS) -shared -o $@ $<
|
|
|
|
depend dep:
|
|
$(CC) -MM $(INCLUDE_OPT) *.c >depend
|
|
|
|
clean:
|
|
rm -f *~ $(MODULE) $(MODNAME).sql
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
include depend
|
|
endif
|