X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/29f76293f5fb0dc4a8040820b79165422175b046..5b87f8bf2ea3b9ae7ac0ae812a311d31cce13bb7:/build/bakefiles/regenMakefile.py diff --git a/build/bakefiles/regenMakefile.py b/build/bakefiles/regenMakefile.py index 39f1adc85d..bbae5cdc0c 100755 --- a/build/bakefiles/regenMakefile.py +++ b/build/bakefiles/regenMakefile.py @@ -9,6 +9,16 @@ import string, os.path, copy +# list of files that should _not_ be generated even thought we could do it: +DONT_GENERATE = [ + '../../samples/Makefile.in', + '../../samples/samples.dsw', + '../../demos/demos.dsw', + '../../samples/html/html_samples.dsw', + '../../samples/opengl/opengl_samples.dsw', + '../../samples/mobile/mobile_samples.dsw', +] + file = open('Makefile', 'wt') file.write(""" # Generated by regenMakefile.py @@ -54,6 +64,9 @@ def addMakefile(bake, makedirs, deps=[], args={}): else: makedir = makedirs['all'] tfile = '%s/%s' % (makedir, make) + + if tfile in DONT_GENERATE: return + linesCur.append('%s: %s' % (tfile, dep)) linesCur.append('\t$(BAKEFILE) -f%s -o$@ %s %s' % (format, a, bake)) linesCur.append('\ttouch $@') @@ -67,11 +80,9 @@ def addMakefile(bake, makedirs, deps=[], args={}): add(bake, makedirs, 'makefile.vc', dep, 'msvc', args) add(bake, makedirs, 'makefile.gcc', dep, 'mingw', args) add(bake, makedirs, 'makefile.wat', dep, 'watcom', args) - - if 'msvc6prj' in args and args['msvc6prj'] != None: - add(bake, makedirs, - (bake[1+bake.rfind('/'):]).replace('.bkl','.dsw'), - dep, 'msvc6prj', args) + add(bake, makedirs, + (bake[1+bake.rfind('/'):]).replace('.bkl','.dsw'), + dep, 'msvc6prj', args) lines[bake] = linesCur @@ -82,7 +93,7 @@ def addMakefile(bake, makedirs, deps=[], args={}): # ----------------------------------------------- # main makefile: -addMakefile('wx.bkl', {'all':'..','autoconf':'../..'}, [ '$(MDEPS)' ], +addMakefile('wx.bkl', {'all':'../msw','autoconf':'../..'}, [ '$(MDEPS)' ], args={ 'borland':'-DOPTIONS_FILE=config.bcc', 'msvc':'-DOPTIONS_FILE=config.vc', @@ -95,11 +106,18 @@ addMakefile('wx.bkl', {'all':'..','autoconf':'../..'}, [ '$(MDEPS)' ], addMakefile('../../samples/samples.bkl', {'all':'../../samples'}, args={ 'autoconf':'-DAUTOCONF_MACROS_FILE=../../autoconf_inc.m4', - 'borland':'-DOPTIONS_FILE=../build/config.bcc -DWRITE_OPTIONS_FILE=0', - 'msvc':'-DOPTIONS_FILE=../build/config.vc -DWRITE_OPTIONS_FILE=0', - 'mingw':'-DOPTIONS_FILE=../build/config.gcc -DWRITE_OPTIONS_FILE=0', - 'watcom':'-DOPTIONS_FILE=../build/config.wat -DWRITE_OPTIONS_FILE=0', - 'msvc6prj':None, + 'borland':'-DOPTIONS_FILE=../build/msw/config.bcc -DWRITE_OPTIONS_FILE=0', + 'msvc':'-DOPTIONS_FILE=../build/msw/config.vc -DWRITE_OPTIONS_FILE=0', + 'mingw':'-DOPTIONS_FILE=../build/msw/config.gcc -DWRITE_OPTIONS_FILE=0', + 'watcom':'-DOPTIONS_FILE=../build/msw/config.wat -DWRITE_OPTIONS_FILE=0', + }) +addMakefile('../../demos/demos.bkl', {'all':'../../demos'}, + args={ + 'autoconf':'-DAUTOCONF_MACROS_FILE=../../autoconf_inc.m4', + 'borland':'-DOPTIONS_FILE=../build/msw/config.bcc -DWRITE_OPTIONS_FILE=0', + 'msvc':'-DOPTIONS_FILE=../build/msw/config.vc -DWRITE_OPTIONS_FILE=0', + 'mingw':'-DOPTIONS_FILE=../build/msw/config.gcc -DWRITE_OPTIONS_FILE=0', + 'watcom':'-DOPTIONS_FILE=../build/msw/config.wat -DWRITE_OPTIONS_FILE=0', }) @@ -116,15 +134,17 @@ def onSubmakefile(type, dirname, names): if type==SAMPLES_DIR: prefix = ''.join(['../' for i in range(0,depth)]) - dirflags = '-DWXTOPDIR=%s../' % prefix - cfgbase = '%s../build/config.' % prefix + topdirflags = '-DWXTOPDIR=%s../' % prefix + srcdirflags = '' + cfgbase = '%s../build/msw/config.' % prefix elif type==CONTRIB_DIR: - dirflags = '-DSRCDIR=../../src/%s' % dirname.split('/')[-1] - dirflags += ' -DWXTOPDIR=../../../' - cfgbase = '../../../build/config.' + srcdirflags = '-DSRCDIR=../../src/%s' % dirname.split('/')[-1] + topdirflags = ' -DWXTOPDIR=../../../' + cfgbase = '../../../build/msw/config.' args = { - 'not_autoconf':dirflags, + 'all':topdirflags, + 'not_autoconf':srcdirflags, 'autoconf':'-DAUTOCONF_MACROS_FILE=../../autoconf_inc.m4', 'msvc':'-DOPTIONS_FILE='+cfgbase+'vc -DWRITE_OPTIONS_FILE=0', 'mingw':'-DOPTIONS_FILE='+cfgbase+'gcc -DWRITE_OPTIONS_FILE=0', @@ -134,8 +154,6 @@ def onSubmakefile(type, dirname, names): } for bake in bakes: - if bake.endswith('_samples.bkl'): - args['msvc6prj'] = None if type==CONTRIB_DIR: acdir = '../../contrib/src/%s' % dirname.split('/')[-1] ruledep = '$(CDEPS)' @@ -188,7 +206,13 @@ clean: \trm -f $(COMPAT_TARGETS) %s -library: ../../Makefile.in ../makefile.bcc ../makefile.vc ../makefile.wat ../makefile.gcc +library: ../../Makefile.in\\ + ../msw/makefile.bcc\\ + ../msw/makefile.vc\\ + ../msw/makefile.wat\\ + ../msw/makefile.gcc\\ + ../msw/wx.dsw\\ + ../../src/wxWindows.dsp ../../autoconf_inc.m4: ../../Makefile.in