shithub: choc

Download patch

ref: 04911de6b34fe139214d7cc2893d2b1e8eb6ac44
parent: 7c9dcf6db6b123b046a37270cd1e961a9986e814
author: Simon Howard <fraggle@gmail.com>
date: Sat Jul 11 08:26:15 EDT 2009

Generate programs with names based on PROGRAM_PREFIX.

Subversion-branch: /branches/raven-branch
Subversion-revision: 1617

--- a/configure.in
+++ b/configure.in
@@ -84,8 +84,15 @@
 
 WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' `
 
-AC_DEFINE(PROGRAM_PREFIX, "chocolate-",
-          Change this when you create your awesome forked version)
+# This controls the prefix added to the start of program names.  For example,
+# if this is changed to "lemon-", the programs generated will be named
+# lemon-doom, lemon-heretic, etc.
+
+PROGRAM_PREFIX=chocolate-
+
+AC_SUBST(PROGRAM_PREFIX)
+AC_DEFINE_UNQUOTED(PROGRAM_PREFIX, "$PROGRAM_PREFIX",
+                   Change this when you create your awesome forked version)
 
 AM_CONFIG_HEADER(config.h:config.hin)
 
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,11 +3,11 @@
 
 gamesdir = $(prefix)/games
 
-games_PROGRAMS = chocolate-doom     \
-                 chocolate-heretic  \
-                 chocolate-hexen    \
-                 chocolate-server   \
-                 chocolate-setup
+games_PROGRAMS = @PROGRAM_PREFIX@doom     \
+                 @PROGRAM_PREFIX@heretic  \
+                 @PROGRAM_PREFIX@hexen    \
+                 @PROGRAM_PREFIX@server   \
+                 @PROGRAM_PREFIX@setup
 
 AM_CFLAGS = -I$(top_builddir)/textscreen            \
             -I$(top_builddir)/pcsound               \
@@ -36,8 +36,8 @@
 net_structrw.c       net_structrw.h        \
 z_native.c           z_zone.h
 
-chocolate_server_SOURCES=$(COMMON_SOURCE_FILES) $(DEDSERV_FILES)
-chocolate_server_LDADD = $(top_builddir)/wince/libc_wince.a           \
+@PROGRAM_PREFIX@server_SOURCES=$(COMMON_SOURCE_FILES) $(DEDSERV_FILES)
+@PROGRAM_PREFIX@server_LDADD = $(top_builddir)/wince/libc_wince.a           \
                          @LDFLAGS@ @SDLNET_LIBS@
 
 # Source files used by the game binaries (chocolate-doom, etc.)
@@ -128,28 +128,28 @@
                @SDLNET_LIBS@ 
 
 if HAVE_WINDRES
-chocolate_doom_SOURCES=$(SOURCE_FILES) resource.rc
+@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES) resource.rc
 else
-chocolate_doom_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES)
 endif
 
-chocolate_doom_LDADD = doom/libdoom.a $(EXTRA_LIBS)
+@PROGRAM_PREFIX@doom_LDADD = doom/libdoom.a $(EXTRA_LIBS)
 
 if HAVE_WINDRES
-chocolate_heretic_SOURCES=$(SOURCE_FILES) resource.rc
+@PROGRAM_PREFIX@heretic_SOURCES=$(SOURCE_FILES) resource.rc
 else
-chocolate_heretic_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@heretic_SOURCES=$(SOURCE_FILES)
 endif
 
-chocolate_heretic_LDADD = heretic/libheretic.a $(EXTRA_LIBS)
+@PROGRAM_PREFIX@heretic_LDADD = heretic/libheretic.a $(EXTRA_LIBS)
 
 if HAVE_WINDRES
-chocolate_hexen_SOURCES=$(SOURCE_FILES) resource.rc
+@PROGRAM_PREFIX@hexen_SOURCES=$(SOURCE_FILES) resource.rc
 else
-chocolate_hexen_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@hexen_SOURCES=$(SOURCE_FILES)
 endif
 
-chocolate_hexen_LDADD = hexen/libhexen.a $(EXTRA_LIBS)
+@PROGRAM_PREFIX@hexen_LDADD = hexen/libhexen.a $(EXTRA_LIBS)
 
 # Source files needed for chocolate-setup:
 
@@ -162,11 +162,11 @@
 z_native.c           z_zone.h
 
 if HAVE_WINDRES
-chocolate_setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES) setup-res.rc
+@PROGRAM_PREFIX@setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES) setup-res.rc
 else
-chocolate_setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES)
+@PROGRAM_PREFIX@setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES)
 endif
-chocolate_setup_LDADD = setup/libsetup.a                             \
+@PROGRAM_PREFIX@setup_LDADD = setup/libsetup.a                             \
                         $(top_builddir)/wince/libc_wince.a           \
                         $(top_builddir)/textscreen/libtextscreen.a   \
                         @LDFLAGS@ @SDL_LIBS@ @SDLNET_LIBS@