From eba53d1399ace3c0bf933e6bead6e7b8a0e046b5 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 27 Mar 2020 01:52:33 +0000
Subject: [PATCH] Save the make definitions specified on the make command-line
 (or inferred from the absence of command-line arguments) to the
 src/build/localdefs.mk file.

This insures that incremental builds (e.g. in src/sbbs3) use the same
build type (e.g. debug vs. release) as the intitial install. Unfortuantely
it also means that switching the build type later requires editing or
deleting the localdefs.mk file, which means new instructions for the wiki.
---
 install/GNUmakefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/install/GNUmakefile b/install/GNUmakefile
index 3c6327baba..585c155494 100644
--- a/install/GNUmakefile
+++ b/install/GNUmakefile
@@ -141,7 +141,10 @@ ifndef NO_GTK
  endif
 endif
 
-all: binaries baja externals
+all: localdefs binaries baja externals
+
+localdefs: src
+	echo $(MKFLAGS) | tr ' ' '\n' > $(SBBSDIR)/src/build/localdefs.mk
 
 binaries:	sbbs3 gtkuseredit gtkchat gtkmonitor gtkuserlist syncview sexpots
 
-- 
GitLab