cleaning the generic module :)

Ralf Habacker ralf.habacker at freenet.de
Tue Jan 10 14:51:10 CET 2006


Am Montag, 9. Januar 2006 10:50 schrieb Frederic-Emmanuel PICCA:
> Hello
>
> 2) I propose to set the prefix to /usr as default for unix platform and
> "C:\" open for dicussion :) for the win32 platform. (I do not have a
> cygwin installation so I don't know about the default installation path
> in that environment.

like unix = /usr


> 3) I am wondering about the environmental variable which are influencing
> the compilation. Must we add them to the GEN FLAGS ?
>
> for gcc their are:
>   GCC_EXEC_PREFIX, COMPILER_PATH, LIBRARY_PATH, LANG
>   CPATH, C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, OBJC_INCLUDE_PATH
>
> So what is the meaning of
> if os.environ.has_key('CXXFLAGS'):  env['GENCXXFLAGS']  +=
> SCons.Util.CLVar( os.environ['CXXFLAGS'] )
>
> if os.environ.has_key('CFLAGS'): env['GENCCFLAGS'] = SCons.Util.CLVar(
> os.environ['CFLAGS'] )
>
> if os.environ.has_key('LINKFLAGS'): env['GENLINKFLAGS'] +=
> SCons.Util.CLVar( os.environ['LINKFLAGS'] )

> CXXFLAGS, CFLAGS, LINKFLAGS are not present in the gcc man page.

These flags are used for example by the autotool based buildsystem and they 
are uses to be compatible in this area. 

The are referenced in generic.py:  line 1153

	if env.has_key('GENCXXFLAGS'):   env.AppendUnique( CPPFLAGS  = 
env['GENCXXFLAGS'] )
	if env.has_key('GENCCFLAGS'):    env.AppendUnique( CCFLAGS   = 
env['GENCCFLAGS'] )
	if env.has_key('GENLINKFLAGS'):  env.AppendUnique( LINKFLAGS = 
env['GENLINKFLAGS'] )
	if env.has_key('EXTRAINCLUDES'): env.AppendUnique( CPPPATH   = 
env['EXTRAINCLUDES'])
	if env.has_key('EXTRALIBS'):     env.AppendUnique( LIBPATH   = 
env['EXTRALIBS'])


for SCons.Util.CLVar see scons-local-0.96.91/Scons/util.py
class CLVar(UserList):
    """A class for command-line construction variables.


Ralf


More information about the Kde-buildsystem mailing list