Skip to content

Commit

Permalink
don't build chocolate-setup.6 anymore; more subs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmtd committed Jan 9, 2018
1 parent 32ccfe0 commit d0aca32
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
9 changes: 3 additions & 6 deletions man/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand All @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions man/setup.template
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d0aca32

Please sign in to comment.