diff options
| author | Joe Conway | 2016-02-17 17:12:06 +0000 |
|---|---|---|
| committer | Joe Conway | 2016-02-17 17:12:06 +0000 |
| commit | a5c43b886942e96ec5c745041f2d6a50c3205147 (patch) | |
| tree | b7d1967286366131bc65d34457fb0ba91ec710b8 /src/common/Makefile | |
| parent | f1f5ec1efafe74ca45e24e0bf3371b1d6985c8ee (diff) | |
Add new system view, pg_config
Move and refactor the underlying code for the pg_config client
application to src/common in support of sharing it with a new
system information SRF called pg_config() which makes the same
information available via SQL. Additionally wrap the SRF with a
new system view, as called pg_config.
Patch by me with extensive input and review by Michael Paquier
and additional review by Alvaro Herrera.
Diffstat (limited to 'src/common/Makefile')
| -rw-r--r-- | src/common/Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/common/Makefile b/src/common/Makefile index c47445e768b..bde4fc25975 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -23,8 +23,21 @@ include $(top_builddir)/src/Makefile.global override CPPFLAGS := -DFRONTEND $(CPPFLAGS) LIBS += $(PTHREAD_LIBS) -OBJS_COMMON = exec.o pg_lzcompress.o pgfnames.o psprintf.o relpath.o \ - rmtree.o string.o username.o wait_error.o +# don't include subdirectory-path-dependent -I and -L switches +STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS)) +STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/port,$(LDFLAGS)) +override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\"" +override CPPFLAGS += -DVAL_CC="\"$(CC)\"" +override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\"" +override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\"" +override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\"" +override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" +override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" +override CPPFLAGS += -DVAL_LDFLAGS_SL="\"$(LDFLAGS_SL)\"" +override CPPFLAGS += -DVAL_LIBS="\"$(LIBS)\"" + +OBJS_COMMON = config_info.o exec.o pg_lzcompress.o pgfnames.o psprintf.o \ + relpath.o rmtree.o string.o username.o wait_error.o OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o @@ -61,7 +74,7 @@ libpgcommon_srv.a: $(OBJS_SRV) # a hack that might fail someday if there is a *_srv.o without a # corresponding *.o, but it works for now. %_srv.o: %.c %.o - $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@ + $(CC) $(CFLAGS) $(subst -DFRONTEND ,, $(CPPFLAGS)) -c $< -o $@ $(OBJS_SRV): | submake-errcodes |
