From 88136c0c958e77dedc002eb2fcbfeab13c6e6fc8 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Thu, 15 Jan 2015 09:15:07 -0500 Subject: [PATCH] Determine debug builds by looking for a magic file If .debug exists, then we'll compile as a debug build. This will let me toggle debug status during development without needing to worry about committing the change. Signed-off-by: Anna Schumaker --- .gitignore | 1 + Sconstruct | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fd12dd6c..68dabb44 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ bin/ core.* html/ latex/ +.debug diff --git a/Sconstruct b/Sconstruct index 9c9136ff..9b8e13de 100644 --- a/Sconstruct +++ b/Sconstruct @@ -1,12 +1,11 @@ #!/usr/bin/python import os -# Configuration variables CONFIG_VERSION = "6.3" -CONFIG_DEBUG = True # Set up default environment +CONFIG_DEBUG = os.path.exists(".debug") CONFIG_CCFLAGS = [ "-O2" ] if CONFIG_DEBUG == True: CONFIG_CCFLAGS = [ "-Wall", "-Werror", "-g", "-DCONFIG_DEBUG" ]