Better uninstall handling and some other tweaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 1999-08-26 04:05:01 +00:00
parent 0ac77ef5c8
commit b164fb385a
2 changed files with 29 additions and 4 deletions

View File

@ -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
#----------------------------------------------------------------------

View File

@ -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 :