Problem 1139

Summary: ./Configure generates long informational messages for -cppflags etc.
Product: Geant4 Reporter: Michael Kelsey <kelsey>
Component: configAssignee: Ben Morgan <Ben.Morgan>
Status: CLOSED FIXED    
Severity: minor    
Priority: P5    
Version: 9.3   
Hardware: Apple   
OS: Mac OS X   

Description Michael Kelsey 2010-08-28 08:07:09 CEST
I've got 4.9.3.p01 installed on my MacBook.  I am trying to use ./Configure to capture compiler flags for GMake.  Unfortunately, the output is excessively verbose, for example:

{michael-kelseys-macbook.local:285} $G4INSTALL/Configure -cppflags

DYLD_LIBRARY_PATH is set to include CLHEP and Geant4 libraries. 
NOTE : you should verify that the correct path for the CLHEP library

/Applications/CLHEP/lib

is included in the dynamic library search path ahead of any other
installations of CLHEP on your system that may be referenced by this
path.

-DG4DEBUG -Iinclude -I/Applications/CLHEP/include -DG4VERBOSE -DG4_STORE_TRAJECTORY -I/Applications/GEANT4/geant4.9.3.p01/source/interfaces/basic/include -I/Applications/GEANT4/geant4.9.3.p01/source/interfaces/common/include -I/Applications/GEANT4/geant4.9.3.p01/source/interfaces/GAG/include -DG4UI_USE_XAW -DG4UI_USE -DG4VIS_USE_ASCIITREE -DG4VIS_USE_DAWNFILE -DG4VIS_USE_GMOCRENFILE -DG4VIS_USE_HEPREPFILE -DG4VIS_USE_RAYTRACER -DG4VIS_USE_VRMLFILE -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/FukuiRenderer/include -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/gMocren/include -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/HepRep/include -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/RayTracer/include -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/Tree/include -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/VRML/include -DG4VIS_USE -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/management/include -I/Applications/GEANT4/geant4.9.3.p01/source/visualization/modeling/include -I/usr/X11R6/include -I/usr/include/X11/extensions -I/usr/include/X11 -DG4INTY_USE_XT

Notice all that extra cruft at the beginning, which shows up because I have G4LIB_BUILD_SHARED set.  Would it be possible to eliminate or suppress this message (at least for the -cppflags and related non-interactive options), in the next 4.9.3 patch and in the 4.9.4 runup?
Comment 1 Michael Kelsey 2010-08-30 21:01:17 CEST
I have implemented a workaround for this bug in my own Makefiles, piping the command output through |grep '^-'|.  That picks off the last line, containing the actual flags, while discarding all of the information messages.  However, I still think those messages should be suppressed.
Comment 2 Ben Morgan 2010-08-31 12:05:34 CEST
Already fixed in CVS, so will be the next 9.3 patch and/or the 9.4 release. It's already in the 9.4 beta release, so you can grab the fix from there if needed (it's the env.(c)sh.SH files in config/scripts).

Cheers,

Ben.