Forums

Full Version: make scons less verbose
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This patch makes scons less verbose.

With scons VERBOSE=1 anything is build like usual.

Code:
diff --git a/SConstruct b/SConstruct
index 5177c0b..2a8b78f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -26,6 +26,7 @@ opts.Add(BoolOption('use_distcc', 'Set this to 1 to enable distributed compilaci
opts.Add(BoolOption('force_feedback', 'Enable force-feedback support', 0))
opts.Add(BoolOption('profiling', 'Turn on profiling output', 0))
opts.Add(BoolOption('efficiency', 'Turn on compile-time efficiency warnings', 0))
+opts.Add(BoolOption('VERBOSE', 'Show verbose compiling output', 0))


#--------------------------#
@@ -143,6 +144,12 @@ else:
         options = opts)
     check_headers = ['asio.hpp', 'boost/bind.hpp', 'GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h', 'GL/gle

+if ARGUMENTS.get('VERBOSE') != "1":
+       env['ARCOMSTR'] = "\tARCH $TARGET"
+       env['CCCOMSTR'] = "\tCC $TARGET"
+       env['CXXCOMSTR'] = "\tCPP $TARGET"
+       env['LINKCOMSTR'] = "\tLINK $TARGET"
+       env['RANLIBCOMSTR'] = "\tRANLIB $TARGET"

#-------------------------------#
# General configurarion options #

[quote]

Comments?[/quote]
sorry, without the 'quote' of course...

Code:
diff --git a/SConstruct b/SConstruct
index 5177c0b..2a8b78f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -26,6 +26,7 @@ opts.Add(BoolOption('use_distcc', 'Set this to 1 to enable distributed compilaci
opts.Add(BoolOption('force_feedback', 'Enable force-feedback support', 0))
opts.Add(BoolOption('profiling', 'Turn on profiling output', 0))
opts.Add(BoolOption('efficiency', 'Turn on compile-time efficiency warnings', 0))
+opts.Add(BoolOption('VERBOSE', 'Show verbose compiling output', 0))


#--------------------------#
@@ -143,6 +144,12 @@ else:
         options = opts)
     check_headers = ['asio.hpp', 'boost/bind.hpp', 'GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h', 'GL/gle

+if ARGUMENTS.get('VERBOSE') != "1":
+       env['ARCOMSTR'] = "\tARCH $TARGET"
+       env['CCCOMSTR'] = "\tCC $TARGET"
+       env['CXXCOMSTR'] = "\tCPP $TARGET"
+       env['LINKCOMSTR'] = "\tLINK $TARGET"
+       env['RANLIBCOMSTR'] = "\tRANLIB $TARGET"

#-------------------------------#
# General configurarion options #
Committed, R2513. Note that I defaulted the verbose option to on so by default and also renamed the option "verbose" instead of "VERBOSE" to match the case of the other options.