mirror of https://github.com/postgres/postgres
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>pull/14/head
parent
0275ecf31c
commit
b0a738f428
@ -1,31 +1,40 @@ |
|||||||
# contrib/pg_xlogdump/Makefile
|
# src/bin/pg_xlogdump/Makefile
|
||||||
|
|
||||||
PGFILEDESC = "pg_xlogdump - decode and display WAL"
|
PGFILEDESC = "pg_xlogdump - decode and display WAL"
|
||||||
PGAPPICON=win32
|
PGAPPICON=win32
|
||||||
|
|
||||||
PROGRAM = pg_xlogdump
|
subdir = src/bin/pg_xlogdump
|
||||||
|
top_builddir = ../../..
|
||||||
|
include $(top_builddir)/src/Makefile.global |
||||||
|
|
||||||
OBJS = pg_xlogdump.o compat.o xlogreader.o rmgrdesc.o \
|
OBJS = pg_xlogdump.o compat.o xlogreader.o rmgrdesc.o \
|
||||||
$(RMGRDESCOBJS) $(WIN32RES)
|
$(RMGRDESCOBJS) $(WIN32RES)
|
||||||
|
|
||||||
|
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) |
||||||
|
|
||||||
RMGRDESCSOURCES = $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c))
|
RMGRDESCSOURCES = $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c))
|
||||||
RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
|
RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
|
||||||
|
|
||||||
EXTRA_CLEAN = $(RMGRDESCSOURCES) xlogreader.c
|
|
||||||
|
|
||||||
ifdef USE_PGXS |
|
||||||
$(error "pg_xlogdump cannot be built with PGXS") |
|
||||||
endif |
|
||||||
|
|
||||||
subdir = contrib/pg_xlogdump
|
|
||||||
top_builddir = ../..
|
|
||||||
include $(top_builddir)/src/Makefile.global |
|
||||||
include $(top_srcdir)/contrib/contrib-global.mk |
|
||||||
|
|
||||||
|
all: pg_xlogdump |
||||||
|
|
||||||
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) |
pg_xlogdump: $(OBJS) | submake-libpgport |
||||||
|
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
||||||
|
|
||||||
xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/% |
xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/% |
||||||
rm -f $@ && $(LN_S) $< .
|
rm -f $@ && $(LN_S) $< .
|
||||||
|
|
||||||
$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/% |
$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/% |
||||||
rm -f $@ && $(LN_S) $< .
|
rm -f $@ && $(LN_S) $< .
|
||||||
|
|
||||||
|
install: all installdirs |
||||||
|
$(INSTALL_PROGRAM) pg_xlogdump$(X) '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
|
||||||
|
|
||||||
|
installdirs: |
||||||
|
$(MKDIR_P) '$(DESTDIR)$(bindir)'
|
||||||
|
|
||||||
|
uninstall: |
||||||
|
rm -f '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
|
||||||
|
|
||||||
|
clean distclean maintainer-clean: |
||||||
|
rm -f pg_xlogdump$(X) $(OBJS) $(RMGRDESCSOURCES) xlogreader.c
|
Loading…
Reference in new issue