git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3466
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
separate namespace which is then used later as a configuration object.
This keeps the build script simple in that it doesn't have to parse
anything, and the config files can be much more than just names and
separate namespace which is then used later as a configuration object.
This keeps the build script simple in that it doesn't have to parse
anything, and the config files can be much more than just names and
- values as any pretty much any python code can be executed. The global
+ values as pretty much any python code can be executed. The global
variables set in the config namespace are what are used later as
configuation values.
variables set in the config namespace are what are used later as
configuation values.
runUninstall = runUninstall)
if config.readConfigFiles(args):
runUninstall = runUninstall)
if config.readConfigFiles(args):
config.makeMakefile()
err = 0
config.makeMakefile()
err = 0
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
-def strippath(st):
- # remove any leading paths, retrieve only file name. Used while
- # parsing the SOURCES file list, so that object files are local,
- # while source may be anywere)
- if sys.platform == 'win32':
- sep = '\\'
- else:
- sep = '/'
- return string.split(st,sep)[-1]
-
-#----------------------------------------------------------------------------
-
class BuildConfig:
def __init__(self, **kw):
self.__dict__.update(kw)
class BuildConfig:
def __init__(self, **kw):
self.__dict__.update(kw)
self.LFLAGS = '-L$(WXPSRCDIR) `wx-config --libs`'
self.LIBS = '-l$(HELPERLIB)'
self.LFLAGS = '-L$(WXPSRCDIR) `wx-config --libs`'
self.LIBS = '-l$(HELPERLIB)'
- # **** what to do when I start supporting Motif, etc.???
+ # **** What to do when I start supporting Motif, etc.???
self.GENCODEDIR = 'gtk'
self.SWIGTOOLKITFLAG = '-D__WXGTK__'
self.GENCODEDIR = 'gtk'
self.SWIGTOOLKITFLAG = '-D__WXGTK__'
raise SystemExit, "Python development files not found"
self.CCC = self.findMFValue(mfText, 'CCC')
raise SystemExit, "Python development files not found"
self.CCC = self.findMFValue(mfText, 'CCC')
- if not self.CCC:
- print "Warning: C++ compiler not specified (CCC). Assuming c++"
- self.CCC = 'c++'
self.CC = self.findMFValue(mfText, 'CC')
self.CC = self.findMFValue(mfText, 'CC')
- if not self.CC:
- print "Warning: C compiler not specified (CCC). Assuming cc"
- self.CC = 'cc'
self.OPT = self.findMFValue(mfText, 'OPT')
self.SO = self.findMFValue(mfText, 'SO')
self.LDSHARED = self.findMFValue(mfText, 'LDSHARED')
self.OPT = self.findMFValue(mfText, 'OPT')
self.SO = self.findMFValue(mfText, 'SO')
self.LDSHARED = self.findMFValue(mfText, 'LDSHARED')
+ #------------------------------------------------------------
+ def doFixups(self):
+ # This is called after the config files have been evaluated
+ # so we can do some sanity checking...
+ if sys.platform != 'win32':
+ if not self.CCC:
+ print "Warning: C++ compiler not specified (CCC). Assuming c++"
+ self.CCC = 'c++'
+ if not self.CC:
+ print "Warning: C compiler not specified (CC). Assuming cc"
+ self.CC = 'cc'
+
#------------------------------------------------------------
def findMFValue(self, mfText, st):
# Find line begining with st= and return the value
#------------------------------------------------------------
def findMFValue(self, mfText, st):
# Find line begining with st= and return the value
for name in self.SWIGFILES:
objects = objects + os.path.splitext(name)[0] + self.OBJEXT + ' '
for name in self.SOURCES:
for name in self.SWIGFILES:
objects = objects + os.path.splitext(name)[0] + self.OBJEXT + ' '
for name in self.SOURCES:
+ obj = os.path.basename(name)
objects = objects + os.path.splitext(obj)[0] + self.OBJEXT + ' '
self.OBJECTS = splitlines(objects)
objects = objects + os.path.splitext(obj)[0] + self.OBJEXT + ' '
self.OBJECTS = splitlines(objects)
MODULE = 'glcanvasc'
SWIGFILES = ['glcanvas.i', ]
OTHERCFLAGS = '-DWITH_GLCANVAS -I$(WXDIR)\utils\glcanvas\%s' % (GENCODEDIR,)
MODULE = 'glcanvasc'
SWIGFILES = ['glcanvas.i', ]
OTHERCFLAGS = '-DWITH_GLCANVAS -I$(WXDIR)\utils\glcanvas\%s' % (GENCODEDIR,)
# Special action; for win32 we require you make the glcanvas lib. The
# makefile will copy it to WXWIN\lib
# Unix make system isn't so advanced, so we'll go looking for the source
# Special action; for win32 we require you make the glcanvas lib. The
# makefile will copy it to WXWIN\lib
# Unix make system isn't so advanced, so we'll go looking for the source
OTHERLIBS = '$(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib'
else:
SOURCES = [GENCODEDIR+'/_glcanvas.cpp']
OTHERLIBS = '$(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib'
else:
SOURCES = [GENCODEDIR+'/_glcanvas.cpp']
- print "Warning: assuming MesaGL libraries. Modify build.cfg if you have native GL!"
+ print "Warning: assuming MesaGL libraries. Override OTHERLIBS in build.local if you have native GL!"
OTHERLIBS = "-lMesaGL -lMesaGLU"
OTHERRULES = """
OTHERLIBS = "-lMesaGL -lMesaGLU"
OTHERRULES = """
-$(GENCODEDIR)/_glcanvas.cpp :
+$(GENCODEDIR)/_glcanvas.cpp :
cp $(WXDIR)/utils/glcanvas/$(GENCODEDIR)/glcanvas.cpp $@
"""
cp $(WXDIR)/utils/glcanvas/$(GENCODEDIR)/glcanvas.cpp $@
"""
- @if [ "$(TARGETDIR)" != ".." ]; then \\
+ @if [ "$(TARGETDIR)" != ".." -a "$(TARGETDIR)" != "$(WXWIN)/utils/wxPython"]; then \\
mkdir $(TARGETDIR)/lib; \\
mkdir $(TARGETDIR)/lib/sizers; \\
mkdir $(TARGETDIR)/demo; \\
mkdir $(TARGETDIR)/lib; \\
mkdir $(TARGETDIR)/lib/sizers; \\
mkdir $(TARGETDIR)/demo; \\