mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Bring chkpass build process into sync with other contrib modules;
make it use Makefile.shlib, etc.
This commit is contained in:
parent
119fd7956a
commit
0525ddc3e5
@ -1,46 +1,51 @@
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/contrib/chkpass/Makefile,v 1.1 2001/05/03 12:32:13 darcy Exp $
|
||||
# $Header: /cvsroot/pgsql/contrib/chkpass/Makefile,v 1.2 2001/08/23 16:50:33 tgl Exp $
|
||||
#
|
||||
|
||||
subdir = contrib/chkpass
|
||||
top_builddir = ../..
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
NAME := chkpass
|
||||
SONAME := $(NAME)$(DLSUFFIX)
|
||||
# override libdir to install shlib in contrib not main directory
|
||||
libdir := $(libdir)/contrib
|
||||
|
||||
SQLS = $(NAME).sql
|
||||
MODS = $(NAME)$(DLSUFFIX)
|
||||
# shared library parameters
|
||||
NAME= chkpass
|
||||
SO_MAJOR_VERSION= 1
|
||||
SO_MINOR_VERSION= 0
|
||||
|
||||
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
|
||||
override CFLAGS += $(CFLAGS_SL)
|
||||
|
||||
ifdef REFINT_VERBOSE
|
||||
override CPPFLAGS+= -DREFINT_VERBOSE
|
||||
endif
|
||||
|
||||
all: $(SONAME) $(NAME).sql
|
||||
OBJS= chkpass.o
|
||||
|
||||
all: all-lib $(NAME).sql
|
||||
|
||||
# Shared library stuff
|
||||
include $(top_srcdir)/src/Makefile.shlib
|
||||
|
||||
|
||||
$(NAME).sql: $(NAME).sql.in
|
||||
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(SONAME):g' < $< > $@
|
||||
sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@
|
||||
|
||||
install: all installdirs
|
||||
$(INSTALL_SHLIB) $(SONAME) $(libdir)/contrib
|
||||
$(INSTALL_DATA) README.$(NAME) $(docdir)/contrib
|
||||
sed "s+%%PGDIR%%+$(libdir)+g" < chkpass.sql > $(datadir)/contrib
|
||||
install: all installdirs install-lib
|
||||
$(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib
|
||||
$(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(libdir)/contrib $(docdir)/contrib $(datadir)/contrib
|
||||
$(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
|
||||
|
||||
uninstall:
|
||||
rm -f $(libdir)/contrib/$(SONAME) $(docdir)/contrib/README.$(NAME) \
|
||||
$(addprefix $(datadir)/contrib/, $(NAME).sql)
|
||||
uninstall: uninstall-lib
|
||||
rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql
|
||||
|
||||
clean distclean maintainer-clean:
|
||||
rm -f $(SONAME) $(NAME).sql
|
||||
clean distclean maintainer-clean: clean-lib
|
||||
rm -f $(OBJS) $(NAME).sql
|
||||
|
||||
depend dep:
|
||||
$(CC) -MM -MG $(CFLAGS) *.c > depend
|
||||
$(CC) -MM -MG $(CFLAGS) *.c >depend
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
|
@ -4,12 +4,10 @@
|
||||
-- darcy@druid.net
|
||||
-- http://www.druid.net/darcy/
|
||||
--
|
||||
-- $Header: /cvsroot/pgsql/contrib/chkpass/Attic/chkpass.sql,v 1.2 2001/08/10 18:57:32 tgl Exp $
|
||||
-- best viewed with tabs set to 4
|
||||
-- %%PGDIR%% changed to your local directory where modules is
|
||||
-- $Header: /cvsroot/pgsql/contrib/chkpass/chkpass.sql.in,v 1.1 2001/08/23 16:50:33 tgl Exp $
|
||||
--
|
||||
-- best viewed with tabs set to 4
|
||||
--
|
||||
|
||||
load '%%PGDIR%%/modules/chkpass.so';
|
||||
|
||||
--
|
||||
-- Input and output functions and the type itself:
|
||||
@ -17,12 +15,12 @@ load '%%PGDIR%%/modules/chkpass.so';
|
||||
|
||||
create function chkpass_in(opaque)
|
||||
returns opaque
|
||||
as '%%PGDIR%%/modules/chkpass.so'
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create function chkpass_out(opaque)
|
||||
returns opaque
|
||||
as '%%PGDIR%%/modules/chkpass.so'
|
||||
as 'MODULE_PATHNAME'
|
||||
language 'c';
|
||||
|
||||
create type chkpass (
|
||||
@ -34,7 +32,7 @@ create type chkpass (
|
||||
|
||||
create function raw(chkpass)
|
||||
returns text
|
||||
as '%%PGDIR%%/modules/chkpass.so', 'chkpass_rout'
|
||||
as 'MODULE_PATHNAME', 'chkpass_rout'
|
||||
language 'c';
|
||||
|
||||
--
|
||||
@ -43,12 +41,12 @@ create function raw(chkpass)
|
||||
|
||||
create function eq(chkpass, text)
|
||||
returns bool
|
||||
as '%%PGDIR%%/modules/chkpass.so', 'chkpass_eq'
|
||||
as 'MODULE_PATHNAME', 'chkpass_eq'
|
||||
language 'c';
|
||||
|
||||
create function ne(chkpass, text)
|
||||
returns bool
|
||||
as '%%PGDIR%%/modules/chkpass.so', 'chkpass_ne'
|
||||
as 'MODULE_PATHNAME', 'chkpass_ne'
|
||||
language 'c';
|
||||
|
||||
--
|
Loading…
Reference in New Issue
Block a user