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.
This commit is contained in:
Jonathan Dowland 2017-11-30 23:04:53 +00:00
parent 32ccfe015a
commit d0aca32411
2 changed files with 15 additions and 18 deletions

View file

@ -30,7 +30,6 @@ GENERATED_MAN_PAGES = \
@PROGRAM_PREFIX@strife.6 \
strife.cfg.5 \
@PROGRAM_PREFIX@strife.cfg.5 \
@PROGRAM_PREFIX@setup.6 \
@PROGRAM_PREFIX@server.6
SETUP_MAN_PAGES = \
@ -53,9 +52,6 @@ CLEANFILES = $(GENERATED_MAN_PAGES) $(SETUP_MAN_PAGES) \
DOCGEN = $(srcdir)/docgen
DOCGEN_COMMON_ARGS = -n "@PROGRAM_SPREFIX@" -s "@PACKAGE_NAME@" -z "@PACKAGE_SHORTNAME@"
$(SETUP_MAN_PAGES): @PROGRAM_PREFIX@setup.6
cp $(srcdir)/@PROGRAM_PREFIX@setup.6 $@
@PROGRAM_PREFIX@doom.6: $(top_srcdir)/src $(MANPAGE_GEN_FILES)
$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
-g doom -m $(srcdir)/doom.template \
@ -145,9 +141,10 @@ INSTALL.hexen: INSTALL.template
-g server -m $(srcdir)/server.template \
$(top_srcdir)/src > $@
@PROGRAM_PREFIX@setup.6: $(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

View file

@ -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@\-@GAME@.cfg.
.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@\-@GAME@.cfg\fR(5)
.SH AUTHOR
Chocolate Doom is written and maintained by Simon Howard.
.PP