Re: [Super-tux-commit] supertux SConstruct,1.15,1.16 TODO,1.77,1.78
Brought to you by:
wkendrick
From: Ondra H. <ond...@ao...> - 2004-11-20 06:32:23
|
I suppose it is time to checkout CVS once again... and see if SCons takes it :-) ~~ Ondra Hosek Matze Braun wrote: >Update of /cvsroot/super-tux/supertux >In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10083 > >Modified Files: > SConstruct TODO >Log Message: >config.h file is now generated > >Index: SConstruct >=================================================================== >RCS file: /cvsroot/super-tux/supertux/SConstruct,v >retrieving revision 1.15 >retrieving revision 1.16 >diff -u -d -r1.15 -r1.16 >--- SConstruct 19 Nov 2004 00:09:58 -0000 1.15 >+++ SConstruct 20 Nov 2004 02:08:33 -0000 1.16 >@@ -2,6 +2,31 @@ > # SConstruct build file. See http://www.scons.org for details. > import os > >+class ConfigHeader: >+ def __init__(self): >+ self.defines = { } >+ self.prefix = "" >+ self.postfix = "" >+ >+ def SetPrefix(self, prefix): >+ self.prefix = prefix >+ >+ def SetPostfix(self, postfix): >+ self.postfix = postfix >+ >+ def Define(self, name, value = ""): >+ self.defines[name] = value >+ >+ def Save(self, filename): >+ file = open(filename, 'w') >+ file.write("/* %s. Generated by SConstruct */\n" % (filename)) >+ file.write("\n") >+ file.write(self.prefix + "\n") >+ for key, value in self.defines.iteritems(): >+ file.write("#define %s \"%s\"\n" % (key, value)) >+ file.write(self.postfix + "\n") >+ file.close() >+ > def Glob(dirs, pattern = '*' ): > import os, fnmatch > files = [] >@@ -39,7 +64,14 @@ > context.Result(ret) > return ret > >+# Package options >+PACKAGE_NAME = "SuperTux" >+PACKAGE_VERSION = "0.2-cvs" >+PACKAGE_BUGREPORT = "sup...@li..." >+PACKAGE = PACKAGE_NAME.lower() >+PACKAGE_STRING = PACKAGE_NAME + " " + PACKAGE_VERSION > >+# User configurable options > opts = Options('build_config.py') > opts.Add('CXX', 'The C++ compiler', 'g++') > opts.Add('CXXFLAGS', 'Additional C++ compiler flags', '') >@@ -56,13 +88,20 @@ > > env = Environment(options = opts) > >-if not os.path.exists("build_config.py"): >- print "build_config.py doesn't exist - Generating new build config..." >+# Create build_config.py and config.h >+if not os.path.exists("build_config.py") or not os.path.exists("config.h"): >+ print "build_config.py or config.h don't exist - Generating new build config..." >+ >+ header = ConfigHeader() >+ header.Define("PACKAGE", PACKAGE) >+ header.Define("PACKAGE_NAME", PACKAGE_NAME) >+ header.Define("PACKAGE_VERSION", PACKAGE_VERSION) >+ header.Define("PACKAGE_BUGREPORT", PACKAGE_BUGREPORT) >+ header.Define("PACKAGE_STRING", PACKAGE_STRING) > > conf = Configure(env, custom_tests = { > 'CheckSDLConfig' : CheckSDLConfig > }) >- > if not conf.CheckSDLConfig('1.2.4'): > print "Couldn't find libSDL >= 1.2.4" > Exit(1) >@@ -83,9 +122,9 @@ > {'DATA_PREFIX':"'\"" + env['PREFIX'] + "/share/supertux\"'" , > 'LOCALEDIR' :"'\"" + env['PREFIX'] + "/locales\"'"}) > opts.Save("build_config.py", env) >+ header.Save("config.h") > else: > print "Using build_config.py" >- > > if env['VARIANT'] == "optimize": > env.Append(CXXFLAGS = "-O2 -g -Wall") > >Index: TODO >=================================================================== >RCS file: /cvsroot/super-tux/supertux/TODO,v >retrieving revision 1.77 >retrieving revision 1.78 >diff -u -d -r1.77 -r1.78 >--- TODO 19 Nov 2004 14:57:51 -0000 1.77 >+++ TODO 20 Nov 2004 02:08:33 -0000 1.78 >@@ -19,7 +19,6 @@ > > --Scons-- > * [H] Add an install target >- * [H] Generate the config.h file > * [M] improve opengl check to work on win32 and eventually more strange > systems again > * [H] Make sure compilation on win32 and cross-compilation works > > > >------------------------------------------------------- >This SF.Net email is sponsored by: InterSystems CACHE >FREE OODBMS DOWNLOAD - A multidimensional database that combines >robust object and relational technologies, making it a perfect match >for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >_______________________________________________ >Super-tux-commit mailing list >Sup...@li... >https://lists.sourceforge.net/lists/listinfo/super-tux-commit > > > > |