From: Robin Dunn Date: Tue, 24 Aug 1999 19:53:40 +0000 (+0000) Subject: Build tool updates X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f32bba383fbdf6304efe4e50a2932122333ec232 Build tool updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxPython/distrib/build.py b/utils/wxPython/distrib/build.py index e8f0b3d5b8..f56df7c746 100755 --- a/utils/wxPython/distrib/build.py +++ b/utils/wxPython/distrib/build.py @@ -65,7 +65,7 @@ Configuration Files 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. @@ -164,6 +164,7 @@ def main(args): runUninstall = runUninstall) if config.readConfigFiles(args): + config.doFixups() config.makeMakefile() err = 0 @@ -209,18 +210,6 @@ def splitlines(st): #---------------------------------------------------------------------------- -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) @@ -285,7 +274,7 @@ class BuildConfig: 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__' @@ -299,13 +288,7 @@ class BuildConfig: 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') - 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') @@ -324,6 +307,18 @@ class BuildConfig: ' ') + #------------------------------------------------------------ + 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 @@ -343,7 +338,7 @@ class BuildConfig: for name in self.SWIGFILES: objects = objects + os.path.splitext(name)[0] + self.OBJEXT + ' ' for name in self.SOURCES: - obj = strippath(name) + obj = os.path.basename(name) objects = objects + os.path.splitext(obj)[0] + self.OBJEXT + ' ' self.OBJECTS = splitlines(objects) diff --git a/utils/wxPython/modules/glcanvas/build.cfg b/utils/wxPython/modules/glcanvas/build.cfg index 24103b4131..f9bcc56d48 100644 --- a/utils/wxPython/modules/glcanvas/build.cfg +++ b/utils/wxPython/modules/glcanvas/build.cfg @@ -4,6 +4,7 @@ import sys 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 @@ -12,9 +13,9 @@ if sys.platform == 'win32': 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 = """ -$(GENCODEDIR)/_glcanvas.cpp : +$(GENCODEDIR)/_glcanvas.cpp : cp $(WXDIR)/utils/glcanvas/$(GENCODEDIR)/glcanvas.cpp $@ """ diff --git a/utils/wxPython/src/build.cfg b/utils/wxPython/src/build.cfg index 41e5191f79..38eb86f7e7 100644 --- a/utils/wxPython/src/build.cfg +++ b/utils/wxPython/src/build.cfg @@ -43,7 +43,7 @@ $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) : lib$(HELPERLIB)$(SO) installLibDemo: - @if [ "$(TARGETDIR)" != ".." ]; then \\ + @if [ "$(TARGETDIR)" != ".." -a "$(TARGETDIR)" != "$(WXWIN)/utils/wxPython"]; then \\ mkdir $(TARGETDIR)/lib; \\ mkdir $(TARGETDIR)/lib/sizers; \\ mkdir $(TARGETDIR)/demo; \\