diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-08 16:08:41 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-08 16:13:22 -0500 |
commit | d9572c4e3b474031060189050e14ef384b94e001 (patch) | |
tree | 07646762f4086b94a69b9fc215734d2bccade5db /src/makefiles | |
parent | 414c5a2ea65cbd38d79ffdf9b1fde7cc75c134e0 (diff) | |
download | postgresql-d9572c4e3b474031060189050e14ef384b94e001.tar.gz |
Core support for "extensions", which are packages of SQL objects.
This patch adds the server infrastructure to support extensions.
There is still one significant loose end, namely how to make it play nice
with pg_upgrade, so I am not yet committing the changes that would make
all the contrib modules depend on this feature.
In passing, fix a disturbingly large amount of breakage in
AlterObjectNamespace() and callers.
Dimitri Fontaine, reviewed by Anssi Kääriäinen,
Itagaki Takahiro, Tom Lane, and numerous others
Diffstat (limited to 'src/makefiles')
-rw-r--r-- | src/makefiles/pgxs.mk | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk index 912578a84d..655c5f9e38 100644 --- a/src/makefiles/pgxs.mk +++ b/src/makefiles/pgxs.mk @@ -17,16 +17,17 @@ # # Set one of these three variables to specify what is built: # -# MODULES -- list of shared objects to be built from source files with -# same stem (do not include suffix in this list) -# MODULE_big -- a shared object to build from multiple source files +# MODULES -- list of shared-library objects to be built from source files +# with same stem (do not include library suffixes in this list) +# MODULE_big -- a shared library to build from multiple source files # (list object files in OBJS) -# PROGRAM -- a binary program to build (list object files in OBJS) +# PROGRAM -- an executable program to build (list object files in OBJS) # # The following variables can also be set: # -# MODULEDIR -- subdirectory into which DATA and DOCS files should be -# installed (if not set, default is "contrib") +# MODULEDIR -- subdirectory into which EXTENSION, DATA and DOCS files +# should be installed (if not set, default is "contrib") +# EXTENSION -- name of extension (there must be a $EXTENSION.control file) # DATA -- random files to install into $PREFIX/share/$MODULEDIR # DATA_built -- random files to install into $PREFIX/share/$MODULEDIR, # which need to be built first @@ -82,7 +83,7 @@ ifdef PG_CPPFLAGS override CPPFLAGS := $(PG_CPPFLAGS) $(CPPFLAGS) endif -all: $(PROGRAM) $(DATA_built) $(SCRIPTS_built) $(addsuffix $(DLSUFFIX), $(MODULES)) +all: $(PROGRAM) $(DATA_built) $(SCRIPTS_built) $(addsuffix $(DLSUFFIX), $(MODULES)) $(addsuffix .control, $(EXTENSION)) ifdef MODULE_big # shared library parameters @@ -95,8 +96,8 @@ endif # MODULE_big install: all installdirs -ifneq (,$(DATA)$(DATA_built)) - @for file in $(addprefix $(srcdir)/, $(DATA)) $(DATA_built); do \ +ifneq (,$(DATA)$(DATA_built)$(EXTENSION)) + @for file in $(addprefix $(srcdir)/, $(DATA)) $(DATA_built) $(addsuffix .control, $(EXTENSION)); do \ echo "$(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/$(datamoduledir)'"; \ $(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/$(datamoduledir)'; \ done @@ -167,8 +168,8 @@ endif # MODULE_big uninstall: -ifneq (,$(DATA)$(DATA_built)) - rm -f $(addprefix '$(DESTDIR)$(datadir)/$(datamoduledir)'/, $(notdir $(DATA) $(DATA_built))) +ifneq (,$(DATA)$(DATA_built)$(EXTENSION)) + rm -f $(addprefix '$(DESTDIR)$(datadir)/$(datamoduledir)'/, $(notdir $(DATA) $(DATA_built) $(addsuffix .control, $(EXTENSION)))) endif ifneq (,$(DATA_TSEARCH)) rm -f $(addprefix '$(DESTDIR)$(datadir)/tsearch_data'/, $(notdir $(DATA_TSEARCH))) |