shithub: choc

Download patch

ref: d0aca32411982a0e2f7e418f07236661de913499
parent: 32ccfe015ac1282f187c6945ea26b05fe604612f
author: Jonathan Dowland <[email protected]>
date: Thu Nov 30 18:04:53 EST 2017

don't build chocolate-setup.6 anymore; more subs

Build chocolate-game-setup.6 directly instead of building
chocolate-setup.6 and copying it to for each game. Apply
substitutions to the template text to replace Chocolate,
chocolate etc., as well as substituting the proper default
cfg equivalent (e.g. heretic.cfg) for each game.

--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -30,7 +30,6 @@
            @[email protected]       \
            strife.cfg.5             \
            @[email protected]   \
-           @[email protected]  \
            @[email protected]
 
 SETUP_MAN_PAGES =                          \
@@ -53,9 +52,6 @@
 DOCGEN = $(srcdir)/docgen
 DOCGEN_COMMON_ARGS = -n "@PROGRAM_SPREFIX@" -s "@PACKAGE_NAME@" -z "@PACKAGE_SHORTNAME@"
 
-$(SETUP_MAN_PAGES): @[email protected]
-	cp $(srcdir)/@[email protected] $@
-
 @[email protected]: $(top_srcdir)/src $(MANPAGE_GEN_FILES)
 	$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
                   -g doom -m $(srcdir)/doom.template \
@@ -145,9 +141,10 @@
                   -g server -m $(srcdir)/server.template \
                   $(top_srcdir)/src > $@
 
-@[email protected]: $(top_srcdir)/src $(MANPAGE_GEN_FILES)
+$(SETUP_MAN_PAGES): $(top_srcdir)/src $(MANPAGE_GEN_FILES)
 	$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
-                  -g setup -m $(srcdir)/setup.template \
+                  -g $(patsubst @PROGRAM_PREFIX@%-setup.6,%,$@) \
+                  -m $(srcdir)/setup.template \
                   $(top_srcdir)/src > $@
 
 strife.cfg.5: $(top_srcdir)/src default.cfg.template
--- a/man/setup.template
+++ b/man/setup.template
@@ -1,33 +1,33 @@
-.TH @PROGRAM_SPREFIX@\-setup 6
+.TH @PROGRAM_SPREFIX@\-@GAME@-setup 6
 .SH NAME
-@PROGRAM_SPREFIX@\-setup \- configuration tool for @PROGRAM_SPREFIX@\-doom
+@PROGRAM_SPREFIX@\-@GAME@-setup \- configuration tool for @PROGRAM_SPREFIX@\-@GAME@
 .SH SYNOPSIS
-.B @PROGRAM_SPREFIX@\-setup
+.B @PROGRAM_SPREFIX@\-@GAME@-setup
 [OPTIONS]
 .SH DESCRIPTION
 .PP
-@PACKAGE_NAME@ is a modern Doom engine designed to behave
-as similar to the original Doom game as is possible.
+@PACKAGE_SHORTNAME@ @GAME_UPPER@ is a modern @GAME_UPPER@ engine designed to behave
+as similar to the original @GAME_UPPER@ game as is possible.
 .PP
-.B @PROGRAM_SPREFIX@\-setup
-is a tool for configuring @PACKAGE_NAME@. It provides a menu\-based
+.B @PROGRAM_SPREFIX@\-@GAME@-setup
+is a tool for configuring @PACKAGE_SHORTNAME@ @GAME_UPPER@. It provides a menu\-based
 interface for the display, joystick, keyboard, mouse, sound and
 compatibility settings.
 .PP
-.B @PROGRAM_SPREFIX@\-setup
+.B @PROGRAM_SPREFIX@\-@GAME@-setup
 can also be used to start and join network games.
 .PP
 .SH OPTIONS
 .TP
 \fB-config <file>\fR
-Load configuration from the specified file, instead of default.cfg. 
+Load configuration from the specified file, instead of @CFGFILE@.
 .TP
 \fB-extraconfig <file>\fR
-Load extra configuration from the specified file, instead of @PROGRAM_SPREFIX@\-doom.cfg. 
+Load extra configuration from the specified file, instead of @PROGRAM_SPREFIX@\-@[email protected]. 
 .SH SEE ALSO
-\fB@PROGRAM_SPREFIX@\-doom\fR(6),
+\fB@PROGRAM_SPREFIX@\-@GAME@\fR(6),
 \fBdefault.cfg\fR(5),
-\fB@PROGRAM_SPREFIX@\-doom.cfg\fR(5)
+\fB@PROGRAM_SPREFIX@\-@[email protected]\fR(5)
 .SH AUTHOR
 Chocolate Doom is written and maintained by Simon Howard.
 .PP