Commit b0a738f4 authored by Peter Eisentraut's avatar Peter Eisentraut

Move pg_xlogdump from contrib/ to src/bin/

Reviewed-by: default avatarMichael Paquier <michael.paquier@gmail.com>
parent 0275ecf3
......@@ -37,7 +37,6 @@ SUBDIRS = \
pgcrypto \
pgrowlocks \
pgstattuple \
pg_xlogdump \
postgres_fdw \
seg \
spi \
......
......@@ -202,6 +202,5 @@ pages.
</para>
&pgstandby;
&pgxlogdump;
</sect1>
</appendix>
......@@ -134,7 +134,6 @@
<!ENTITY pgstatstatements SYSTEM "pgstatstatements.sgml">
<!ENTITY pgstattuple SYSTEM "pgstattuple.sgml">
<!ENTITY pgtrgm SYSTEM "pgtrgm.sgml">
<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
<!ENTITY postgres-fdw SYSTEM "postgres-fdw.sgml">
<!ENTITY seg SYSTEM "seg.sgml">
<!ENTITY contrib-spi SYSTEM "contrib-spi.sgml">
......
......@@ -196,6 +196,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
<!ENTITY postmaster SYSTEM "postmaster.sgml">
<!ENTITY psqlRef SYSTEM "psql-ref.sgml">
......
......@@ -266,6 +266,7 @@
&pgtestfsync;
&pgtesttiming;
&pgupgrade;
&pgxlogdump;
&postgres;
&postmaster;
......
......@@ -26,6 +26,7 @@ SUBDIRS = \
pg_test_fsync \
pg_test_timing \
pg_upgrade \
pg_xlogdump \
pgbench \
psql \
scripts
......
# contrib/pg_xlogdump/Makefile
# src/bin/pg_xlogdump/Makefile
PGFILEDESC = "pg_xlogdump - decode and display WAL"
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 \
$(RMGRDESCOBJS) $(WIN32RES)
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
RMGRDESCSOURCES = $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c))
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/%
rm -f $@ && $(LN_S) $< .
$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/%
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
......@@ -6,7 +6,7 @@
* Portions Copyright (c) 2013-2015, PostgreSQL Global Development Group
*
* IDENTIFICATION
* contrib/pg_xlogdump/compat.c
* src/bin/pg_xlogdump/compat.c
*
* This file contains client-side implementations for various backend
* functions that the rm_desc functions in *desc.c files rely on.
......
......@@ -5,7 +5,7 @@
* Copyright (c) 2013-2015, PostgreSQL Global Development Group
*
* IDENTIFICATION
* contrib/pg_xlogdump/pg_xlogdump.c
* src/bin/pg_xlogdump/pg_xlogdump.c
*-------------------------------------------------------------------------
*/
......
......@@ -3,7 +3,7 @@
*
* pg_xlogdump resource managers definition
*
* contrib/pg_xlogdump/rmgrdesc.c
* src/bin/pg_xlogdump/rmgrdesc.c
*/
#define FRONTEND 1
#include "postgres.h"
......
......@@ -3,7 +3,7 @@
*
* pg_xlogdump resource managers declaration
*
* contrib/pg_xlogdump/rmgrdesc.h
* src/bin/pg_xlogdump/rmgrdesc.h
*/
#ifndef RMGRDESC_H
#define RMGRDESC_H
......
......@@ -35,12 +35,10 @@ my @contrib_uselibpq =
my @contrib_uselibpgport = (
'oid2name',
'pg_standby',
'pg_xlogdump',
'vacuumlo');
my @contrib_uselibpgcommon = (
'oid2name',
'pg_standby',
'pg_xlogdump',
'vacuumlo');
my $contrib_extralibs = undef;
my $contrib_extraincludes =
......@@ -53,8 +51,8 @@ my @contrib_excludes = ('pgcrypto', 'commit_ts', 'intagg', 'sepgsql');
# Set of variables for frontend modules
my $frontend_defines = { 'initdb' => 'FRONTEND' };
my @frontend_uselibpq = ('pg_ctl', 'pg_upgrade', 'pgbench', 'psql');
my @frontend_uselibpgport = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pgbench' );
my @frontend_uselibpgcommon = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pgbench' );
my @frontend_uselibpgport = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pg_xlogdump', 'pgbench' );
my @frontend_uselibpgcommon = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pg_xlogdump', 'pgbench' );
my $frontend_extralibs = {
'initdb' => ['ws2_32.lib'],
'pg_restore' => ['ws2_32.lib'],
......@@ -69,7 +67,7 @@ my $frontend_extrasource = {
[ 'src\bin\pgbench\exprscan.l', 'src\bin\pgbench\exprparse.y' ],
};
my @frontend_excludes =
('pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', 'scripts');
('pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', 'pg_xlogdump', 'scripts');
sub mkvcbuild
{
......@@ -648,9 +646,7 @@ sub mkvcbuild
# fix up pg_xlogdump once it's been set up
# files symlinked on Unix are copied on windows
my $pg_xlogdump =
(grep { $_->{name} eq 'pg_xlogdump' }
@{ $solution->{projects}->{contrib} })[0];
my $pg_xlogdump = AddSimpleFrontend('pg_xlogdump');
$pg_xlogdump->AddDefine('FRONTEND');
foreach my $xf (glob('src\\backend\\access\\rmgrdesc\\*desc.c'))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment