]> git.saurik.com Git - wxWidgets.git/commitdiff
Build tool updates
authorRobin Dunn <robin@alldunn.com>
Tue, 24 Aug 1999 19:53:40 +0000 (19:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 24 Aug 1999 19:53:40 +0000 (19:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/wxPython/distrib/build.py
utils/wxPython/modules/glcanvas/build.cfg
utils/wxPython/src/build.cfg

index e8f0b3d5b8518bcfdb26114215747d49970b00b2..f56df7c7461341857d1a653b4c7b53ee7b252825 100755 (executable)
@@ -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
     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.
 
@@ -164,6 +164,7 @@ def main(args):
                          runUninstall = runUninstall)
 
     if config.readConfigFiles(args):
                          runUninstall = runUninstall)
 
     if config.readConfigFiles(args):
+        config.doFixups()
         config.makeMakefile()
         err = 0
 
         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)
 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)'
 
             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__'
 
@@ -299,13 +288,7 @@ class BuildConfig:
                 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')
@@ -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
     #------------------------------------------------------------
     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:
         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)
 
             objects = objects + os.path.splitext(obj)[0] + self.OBJEXT + ' '
         self.OBJECTS = splitlines(objects)
 
index 24103b41310c10859cf4cea83518b9ce6b017f5a..f9bcc56d487509f4b12c34c7eb20736c994f8bce 100644 (file)
@@ -4,6 +4,7 @@ import sys
 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
@@ -12,9 +13,9 @@ if sys.platform == 'win32':
     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 $@
 """
index 41e5191f792541ffe9b6bf58713caad796087414..38eb86f7e71ab7bcc398ce5d4540f8d1494b28fb 100644 (file)
@@ -43,7 +43,7 @@ $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO) : lib$(HELPERLIB)$(SO)
 
 
 installLibDemo:
 
 
 installLibDemo:
-       @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;                        \\