summaryrefslogtreecommitdiff
path: root/src/common/Makefile
diff options
context:
space:
mode:
authorAlvaro Herrera2013-02-22 01:46:17 +0000
committerAlvaro Herrera2013-02-22 01:46:17 +0000
commita73018392636ce832b09b5c31f6ad1f18a4643ea (patch)
tree45ff73dc25699e9156147948e7f4ba2a85961a33 /src/common/Makefile
parent6e3fd964632e95c7359457b7d67aa20c72a71679 (diff)
Move relpath() to libpgcommon
This enables non-backend code, such as pg_xlogdump, to use it easily. The previous location, in src/backend/catalog/catalog.c, made that essentially impossible because that file depends on many backend-only facilities; so this needs to live separately.
Diffstat (limited to 'src/common/Makefile')
-rw-r--r--src/common/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/common/Makefile b/src/common/Makefile
index 55d7b5b9350..cd97980ce66 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -23,13 +23,13 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
LIBS += $(PTHREAD_LIBS)
-OBJS_COMMON =
+OBJS_COMMON = relpath.o
OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o
OBJS_SRV = $(OBJS_COMMON:%.o=%_srv.o)
-all: libpgcommon.a
+all: libpgcommon.a libpgcommon_srv.a
# libpgcommon is needed by some contrib
install: all installdirs
@@ -60,5 +60,12 @@ libpgcommon_srv.a: $(OBJS_SRV)
%_srv.o: %.c %.o
$(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@
+$(OBJS_SRV): | submake-errcodes
+
+.PHONY: submake-errcodes
+
+submake-errcodes:
+ $(MAKE) -C ../backend submake-errcodes
+
clean distclean maintainer-clean:
rm -f libpgcommon.a libpgcommon_srv.a $(OBJS_FRONTEND) $(OBJS_SRV)