From: Robin Dunn Date: Thu, 26 Aug 1999 04:05:01 +0000 (+0000) Subject: Better uninstall handling and some other tweaks X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b164fb385a2646d7e5a6c683d294f91bfb42db8b?ds=inline Better uninstall handling and some other tweaks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxPython/distrib/build.py b/utils/wxPython/distrib/build.py index f56df7c746..02b3673c8f 100755 --- a/utils/wxPython/distrib/build.py +++ b/utils/wxPython/distrib/build.py @@ -257,6 +257,9 @@ class BuildConfig: self.RESFILE = '' self.RESRULE = '' self.OVERRIDEFLAGS = '/GX-' + self.RMCMD = '-erase ' + self.WXPSRCDIR = os.path.normpath(self.WXPSRCDIR) + else: self.MAKE = 'make' @@ -273,6 +276,7 @@ class BuildConfig: '-I$(WXPSRCDIR)' self.LFLAGS = '-L$(WXPSRCDIR) `wx-config --libs`' self.LIBS = '-l$(HELPERLIB)' + self.RMCMD = '-rm -f ' # **** What to do when I start supporting Motif, etc.??? self.GENCODEDIR = 'gtk' @@ -366,6 +370,14 @@ class BuildConfig: self.PYMODULES = splitlines(swapslash(pymodules)) + # now make a list of the python files that would need uninstalled + pycleanup = "" + for name in self.SWIGFILES: + pycleanup = pycleanup + self.makeCleanupList(name) + for name in self.PYFILES: + pycleanup = pycleanup + self.makeCleanupList(name) + self.PYCLEANUP = swapslash(pycleanup) + # finally, build the makefile if sys.platform == 'win32': @@ -383,6 +395,16 @@ class BuildConfig: print "Makefile created: ", self.MAKEFILE + + #------------------------------------------------------------ + def makeCleanupList(self, name): + st = "" + st = st + '\t%s$(TARGETDIR)\\%s.py\n' % (self.RMCMD, os.path.splitext(name)[0]) + st = st + '\t%s$(TARGETDIR)\\%s.pyc\n' % (self.RMCMD, os.path.splitext(name)[0]) + st = st + '\t%s$(TARGETDIR)\\%s.pyo\n' % (self.RMCMD, os.path.splitext(name)[0]) + return st + + #------------------------------------------------------------ def readConfigFiles(self, args): return self.processFile(self.bldCfg, 1) and \ @@ -433,6 +455,7 @@ class BuildConfig: +#---------------------------------------------------------------------------- #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- @@ -516,7 +539,8 @@ clean: uninstall: -erase $(TARGETDIR)\\$(TARGET) - -erase $(PYMODULES) +%(PYCLEANUP)s + #---------------------------------------------------------------------- # implicit rule for compiling .cpp and .c files @@ -652,12 +676,12 @@ endif install: $(TARGETDIR) $(TARGETDIR)/$(TARGET) pycfiles %(OTHERINSTALLTARGETS)s clean: - -rm -f *.o *.so *~ + -rm -f *.o *$(SO) *~ -rm -f $(TARGET) uninstall: -rm -f $(TARGETDIR)/$(TARGET) - -rm -f $(PYMODULES) +%(PYCLEANUP)s #---------------------------------------------------------------------- diff --git a/utils/wxPython/modules/glcanvas/build.cfg b/utils/wxPython/modules/glcanvas/build.cfg index f9bcc56d48..fb9ad4b057 100644 --- a/utils/wxPython/modules/glcanvas/build.cfg +++ b/utils/wxPython/modules/glcanvas/build.cfg @@ -13,7 +13,8 @@ if sys.platform == 'win32': OTHERLIBS = '$(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib' else: SOURCES = [GENCODEDIR+'/_glcanvas.cpp'] - print "Warning: assuming MesaGL libraries. Override OTHERLIBS in build.local if you have native GL!" + print "Warning: Assuming MesaGL libraries. Override OTHERLIBS in build.local\n"\ + " if you have native GL!" OTHERLIBS = "-lMesaGL -lMesaGLU" OTHERRULES = """ $(GENCODEDIR)/_glcanvas.cpp :