Add a --debug flag for DEBUG builds

If you compile with:

  DEBUG=true rake build

then all the commands get a --debug flag as an option which will make
the server dump crazy amounts of data to stderr.
This commit is contained in:
Alex Young
2012-05-31 13:31:22 +01:00
parent 268bebd408
commit 623a398767
6 changed files with 85 additions and 35 deletions

View File

@@ -1,8 +1,6 @@
require 'rake_utils/debian'
include RakeUtils::DSL
DEBUG = true
ALL_SOURCES =FileList['src/*']
SOURCES = ALL_SOURCES.select { |c| c =~ /\.c$/ }
OBJECTS = SOURCES.pathmap( "%{^src,build}X.o" )
@@ -14,7 +12,7 @@ LIBCHECK = "/usr/lib/libcheck.a"
TEST_MODULES = Dir["tests/check_*.c"].map { |n| n[12..-3] }
if DEBUG
if ENV['DEBUG']
LDFLAGS << ["-g"]
CCFLAGS << ["-g -DDEBUG"]
end