From 1f35a8e32e9287d84b0d46f48a94eca85b59836f Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 25 Feb 2015 16:09:53 +0100 Subject: configury: remove DISTSUFF variable completely And add NAME_SERVICE, NAME_PACKAGE and NAME_BINARYBASE on its place. This allows packager fine-tune how the files are going to be generated. * Makefile.am: Better work with variables. * .gitignore: Ignore any (generated) service file. * configure.ac (DISTSUFF): Remove. (NAME_BIN_PFX, NAME_BIN_SFX, NAME_PKG_PFX, NAME_PKG_SFX) (NAME_SRV_PFX, NAME_SRV_SFX, NAME_SERVICE, NAME_PACKAGE) (NAME_BINARYBASE): New variables * doc/.gitignore: Ignore any man(1) page. * doc/Makefile.am (HELP2MAN_RUN): Fix the call to work also with various prefixes/suffixes. * README.rpm-dist.in: Use new variables. * legacy-sysv-script.in: Likewise. * postgresql-setup.in: Likewise. * m4/packaging.m4 (PGSETUP_SUBST_OPT): New macro, defines, substitutes and also fixes sed-rules. --- doc/.gitignore | 1 + doc/Makefile.am | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 doc/.gitignore (limited to 'doc') diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..f7e585b --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +*.1 diff --git a/doc/Makefile.am b/doc/Makefile.am index 63d09de..3b7c378 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -13,9 +13,7 @@ HELP2MAN = $(SHELL) $(top_srcdir)/$(config_aux_dir)/missing --run help2man # TODO: separate it to its own m4 module (for easier distribution) HELP2MAN_RUN = \ - file=$< ; \ - file=$${file%%.in} ; \ - $(HELP2MAN) --output=$@ $$file -N ; \ + $(HELP2MAN) --output=$@ $$input -N ; \ rs=$$? ; \ if test $$rs -eq 127; then \ test -f $@ ; \ @@ -23,7 +21,10 @@ HELP2MAN_RUN = \ test $$rs -eq 0 ; \ fi -dist_man_MANS = $(srcdir)/postgresql$(DISTSUFF)-setup.1 +setup_man = $(srcdir)/$(NAME_BINARYBASE)-setup.1 -$(srcdir)/postgresql$(DISTSUFF)-setup.1: $(top_srcdir)/postgresql-setup.in - $(AM_V_GEN)$(HELP2MAN_RUN) +dist_man_MANS = $(setup_man) + +$(setup_man): $(top_srcdir)/postgresql-setup.in + $(AM_V_GEN)export input=$(top_srcdir)/$(NAME_BINARYBASE)-setup ; \ + $(HELP2MAN_RUN) -- cgit