mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +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,41 +1,11 @@
|
||||
# $Header: /cvsroot/pgsql/contrib/fuzzystrmatch/Makefile,v 1.2 2001/09/06 10:49:29 petere Exp $
|
||||
|
||||
subdir = contrib/fuzzystrmatch
|
||||
top_builddir = ../..
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
# override libdir to install shlib in contrib not main directory
|
||||
libdir := $(libdir)/contrib
|
||||
MODULES = fuzzystrmatch
|
||||
DATA_built = fuzzystrmatch.sql
|
||||
DOCS = README.fuzzystrmatch README.soundex
|
||||
|
||||
# shared library parameters
|
||||
NAME= fuzzystrmatch
|
||||
SO_MAJOR_VERSION= 0
|
||||
SO_MINOR_VERSION= 1
|
||||
|
||||
override CPPFLAGS := -I$(srcdir)/src/include $(CPPFLAGS)
|
||||
|
||||
OBJS= fuzzystrmatch.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)/$(shlib):g' < $< > $@
|
||||
|
||||
install: all installdirs install-lib
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
|
||||
uninstall: uninstall-lib
|
||||
|
||||
clean distclean maintainer-clean: clean-lib
|
||||
rm -f $(OBJS) $(NAME).sql
|
||||
|
||||
depend dep:
|
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
endif
|
||||
include $(top_srcdir)/contrib/contrib-global.mk
|
||||
|
Reference in New Issue
Block a user