ref: f515c88a963d7b00bc6ed81fdd2b7fe87dde09b0
parent: c1f553b92a7a4873b33026463866101e18be8e76
author: Jonathan Dowland <jon@dow.land>
date: Thu Nov 30 12:15:56 EST 2017
install.template: move definitions to Makefile Define and pass LONG_EXE_NAME and LONG_GAME_NAME within the controlling Makefile when generating INSTALL.*, instead of deriving their values within the template depending on whether DOOM/HERETIC/HEXEN/STRIFE are defined. This means we can incorporate the values from @PROGRAM_PREFIX@ and @PACKAGE_SHORTNAME@, instead of hardcoding chocolate- and Chocolate, respectively.
--- a/man/INSTALL.template
+++ b/man/INSTALL.template
@@ -1,18 +1,10 @@
#ifdef DOOM
-#define LONG_GAME_NAME Chocolate Doom
-#define LONG_EXE_NAME chocolate-doom
#define DEFAULT_IWAD doom2.wad
#elif HERETIC
-#define LONG_GAME_NAME Chocolate Heretic
-#define LONG_EXE_NAME chocolate-heretic
#define DEFAULT_IWAD heretic.wad
#elif HEXEN
-#define LONG_GAME_NAME Chocolate Hexen
-#define LONG_EXE_NAME chocolate-hexen
#define DEFAULT_IWAD hexen.wad
#elif STRIFE
-#define LONG_GAME_NAME Chocolate Strife
-#define LONG_EXE_NAME chocolate-strife
#define DEFAULT_IWAD strife1.wad
#endif
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -77,9 +77,11 @@
$(top_srcdir)/src/ $(top_srcdir)/src/doom/ > $@
INSTALL.doom: INSTALL.template
- $(srcdir)/simplecpp -DDOOM -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
+ $(srcdir)/simplecpp -DDOOM \
+ -D LONG_GAME_NAME="@PACKAGE_SHORTNAME@ Doom" \
+ -D LONG_EXE_NAME="@PROGRAM_PREFIX@doom" \
+ -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
-
@PROGRAM_PREFIX@heretic.6: $(top_srcdir)/src $(MANPAGE_GEN_FILES) heretic.template
$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
-g heretic -m $(srcdir)/heretic.template \
@@ -101,7 +103,10 @@
$(top_srcdir)/src/ $(top_srcdir)/src/heretic/ > $@
INSTALL.heretic: INSTALL.template
- $(srcdir)/simplecpp -DHERETIC -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
+ $(srcdir)/simplecpp -DHERETIC \
+ -D LONG_GAME_NAME="@PACKAGE_SHORTNAME@ Heretic" \
+ -D LONG_EXE_NAME="@PROGRAM_PREFIX@heretic" \
+ -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
@PROGRAM_PREFIX@hexen.6: $(top_srcdir)/src $(MANPAGE_GEN_FILES)
@@ -125,9 +130,11 @@
$(top_srcdir)/src/ $(top_srcdir)/src/hexen/ > $@
INSTALL.hexen: INSTALL.template
- $(srcdir)/simplecpp -DHEXEN -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
+ $(srcdir)/simplecpp -DHEXEN \
+ -D LONG_GAME_NAME="@PACKAGE_SHORTNAME@ Hexen" \
+ -D LONG_EXE_NAME="@PROGRAM_PREFIX@hexen" \
+ -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
-
@PROGRAM_PREFIX@strife.6: $(top_srcdir)/src $(MANPAGE_GEN_FILES)
$(DOCGEN) $(DOCGEN_COMMON_ARGS) \
-g strife -m $(srcdir)/strife.template \
@@ -159,7 +166,10 @@
$(top_srcdir)/src/ $(top_srcdir)/src/strife/ > $@
INSTALL.strife: INSTALL.template
- $(srcdir)/simplecpp -DSTRIFE -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
+ $(srcdir)/simplecpp -DSTRIFE \
+ -DLONG_EXE_NAME="@PROGRAM_PREFIX@strife" \
+ -DLONG_GAME_NAME="@PACKAGE_SHORTNAME@ Strife" \
+ -DPRECOMPILED < $(srcdir)/INSTALL.template > $@
INSTALL: INSTALL.template