From 00882d9e5ce7b693aa536346f68a826064c8683a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 10 Mar 2015 22:33:24 -0400 Subject: [PATCH] Move pg_test_fsync from contrib/ to src/bin/ Reviewed-by: Michael Paquier --- contrib/Makefile | 1 - contrib/pg_test_fsync/Makefile | 18 ------------- doc/src/sgml/contrib.sgml | 1 - doc/src/sgml/filelist.sgml | 1 - doc/src/sgml/ref/allfiles.sgml | 1 + doc/src/sgml/{ => ref}/pgtestfsync.sgml | 10 +------ doc/src/sgml/reference.sgml | 1 + src/bin/Makefile | 1 + {contrib => src/bin}/pg_test_fsync/.gitignore | 0 src/bin/pg_test_fsync/Makefile | 27 +++++++++++++++++++ .../bin}/pg_test_fsync/pg_test_fsync.c | 0 src/tools/msvc/Mkvcbuild.pm | 8 +++--- 12 files changed, 35 insertions(+), 34 deletions(-) delete mode 100644 contrib/pg_test_fsync/Makefile rename doc/src/sgml/{ => ref}/pgtestfsync.sgml (95%) rename {contrib => src/bin}/pg_test_fsync/.gitignore (100%) create mode 100644 src/bin/pg_test_fsync/Makefile rename {contrib => src/bin}/pg_test_fsync/pg_test_fsync.c (100%) diff --git a/contrib/Makefile b/contrib/Makefile index cc60d680fc..9ca1ed707a 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -33,7 +33,6 @@ SUBDIRS = \ pg_prewarm \ pg_standby \ pg_stat_statements \ - pg_test_fsync \ pg_test_timing \ pg_trgm \ pgcrypto \ diff --git a/contrib/pg_test_fsync/Makefile b/contrib/pg_test_fsync/Makefile deleted file mode 100644 index 15afba7682..0000000000 --- a/contrib/pg_test_fsync/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# contrib/pg_test_fsync/Makefile - -PGFILEDESC = "pg_test_fsync - test various disk sync methods" -PGAPPICON = win32 - -PROGRAM = pg_test_fsync -OBJS = pg_test_fsync.o $(WIN32RES) - -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -else -subdir = contrib/pg_test_fsync -top_builddir = ../.. -include $(top_builddir)/src/Makefile.global -include $(top_srcdir)/contrib/contrib-global.mk -endif diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml index adc21843db..b25d18b344 100644 --- a/doc/src/sgml/contrib.sgml +++ b/doc/src/sgml/contrib.sgml @@ -202,7 +202,6 @@ pages. &pgstandby; - &pgtestfsync; &pgtesttiming; &pgxlogdump; diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 2d7514c3ea..5095e0fce2 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -133,7 +133,6 @@ - diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index 211a3c42bd..e940153540 100644 --- a/doc/src/sgml/ref/allfiles.sgml +++ b/doc/src/sgml/ref/allfiles.sgml @@ -193,6 +193,7 @@ Complete list of usable sgml source files in this directory. + diff --git a/doc/src/sgml/pgtestfsync.sgml b/doc/src/sgml/ref/pgtestfsync.sgml similarity index 95% rename from doc/src/sgml/pgtestfsync.sgml rename to doc/src/sgml/ref/pgtestfsync.sgml index c4b4014b1a..5dcabe4b77 100644 --- a/doc/src/sgml/pgtestfsync.sgml +++ b/doc/src/sgml/ref/pgtestfsync.sgml @@ -1,4 +1,4 @@ - + @@ -103,14 +103,6 @@ - - Author - - - Bruce Momjian bruce@momjian.us - - - See Also diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml index fb18d94ea0..666493cd64 100644 --- a/doc/src/sgml/reference.sgml +++ b/doc/src/sgml/reference.sgml @@ -263,6 +263,7 @@ &pgCtl; &pgResetxlog; &pgRewind; + &pgtestfsync; &pgupgrade; &postgres; &postmaster; diff --git a/src/bin/Makefile b/src/bin/Makefile index cc78798fba..06a0ab75b6 100644 --- a/src/bin/Makefile +++ b/src/bin/Makefile @@ -23,6 +23,7 @@ SUBDIRS = \ pg_dump \ pg_resetxlog \ pg_rewind \ + pg_test_fsync \ pg_upgrade \ pgbench \ psql \ diff --git a/contrib/pg_test_fsync/.gitignore b/src/bin/pg_test_fsync/.gitignore similarity index 100% rename from contrib/pg_test_fsync/.gitignore rename to src/bin/pg_test_fsync/.gitignore diff --git a/src/bin/pg_test_fsync/Makefile b/src/bin/pg_test_fsync/Makefile new file mode 100644 index 0000000000..90496df566 --- /dev/null +++ b/src/bin/pg_test_fsync/Makefile @@ -0,0 +1,27 @@ +# src/bin/pg_test_fsync/Makefile + +PGFILEDESC = "pg_test_fsync - test various disk sync methods" +PGAPPICON = win32 + +subdir = src/bin/pg_test_fsync +top_builddir = ../../.. +include $(top_builddir)/src/Makefile.global + +OBJS = pg_test_fsync.o $(WIN32RES) + +all: pg_test_fsync + +pg_test_fsync: $(OBJS) | submake-libpgport + $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) + +install: all installdirs + $(INSTALL_PROGRAM) pg_test_fsync$(X) '$(DESTDIR)$(bindir)/pg_test_fsync$(X)' + +installdirs: + $(MKDIR_P) '$(DESTDIR)$(bindir)' + +uninstall: + rm -f '$(DESTDIR)$(bindir)/pg_test_fsync$(X)' + +clean distclean maintainer-clean: + rm -f pg_test_fsync$(X) $(OBJS) diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/src/bin/pg_test_fsync/pg_test_fsync.c similarity index 100% rename from contrib/pg_test_fsync/pg_test_fsync.c rename to src/bin/pg_test_fsync/pg_test_fsync.c diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 986f3b3794..5b86c805ae 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -35,13 +35,13 @@ my @contrib_uselibpq = my @contrib_uselibpgport = ( 'oid2name', 'pg_standby', - 'pg_test_fsync', 'pg_test_timing', + 'pg_test_timing', 'pg_xlogdump', 'vacuumlo'); my @contrib_uselibpgcommon = ( 'oid2name', 'pg_standby', - 'pg_test_fsync', 'pg_test_timing', + 'pg_test_timing', 'pg_xlogdump', 'vacuumlo'); my $contrib_extralibs = undef; @@ -55,8 +55,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_upgrade', 'pgbench' ); -my @frontend_uselibpgcommon = ( 'pg_archivecleanup', 'pg_upgrade', 'pgbench' ); +my @frontend_uselibpgport = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_upgrade', 'pgbench' ); +my @frontend_uselibpgcommon = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_upgrade', 'pgbench' ); my $frontend_extralibs = { 'initdb' => ['ws2_32.lib'], 'pg_restore' => ['ws2_32.lib'],