X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bd5dab59251364f1b94af4b6d7ba03be44e730a..47f958684086b83a77c460c5eff044cd2e6ac7ca:/build/bakefiles/regenMakefile.py diff --git a/build/bakefiles/regenMakefile.py b/build/bakefiles/regenMakefile.py index 083895793f..4a115e662d 100755 --- a/build/bakefiles/regenMakefile.py +++ b/build/bakefiles/regenMakefile.py @@ -21,7 +21,7 @@ BAKEARGS = -v lines = [] all = {} -all['autoconf'] = ['../../configure', '../../samples/configure'] +all['autoconf'] = ['../../configure'] def addMakefile(bake, makedirs, deps=[], args={}): """Adds rules to regenerate native makefile in directory 'makedir' from @@ -40,7 +40,7 @@ def addMakefile(bake, makedirs, deps=[], args={}): else: makedir = makedirs['all'] tfile = '%s/%s' % (makedir, make) - lines.append('%s: %s Makefile' % (tfile, dep)) + lines.append('%s: %s' % (tfile, dep)) lines.append('\t$(BAKEFILE) $(BAKEARGS) -f%s -o%s%s %s' % \ (format, tfile, a, bake)) lines.append('\ttouch %s' % tfile) @@ -60,13 +60,15 @@ def addMakefile(bake, makedirs, deps=[], args={}): # main makefile: addMakefile('wx.bkl', {'all':'..','autoconf':'../..'}, ['common.bkl', 'config.bkl', 'files.bkl', 'monolithic.bkl', - 'wxwin.py']) + 'multilib.bkl', 'wxwin.py']) # samples main makefile: addMakefile('../../samples/samples.bkl', {'all':'../../samples'}) -def onSample(arg, dirname, names): +CONTRIB_DIR = 1 + +def onSubmakefile(type, dirname, names): bakes = [x for x in names if x.endswith('.bkl')] if len(bakes) == 0: return depth = dirname.count('/') - 2 @@ -75,15 +77,23 @@ def onSample(arg, dirname, names): args = { 'all':'-DWXTOPDIR=/%s..' % prefix, - 'autoconf':'-DAUTOCONF_MACROS_FILE=../../samples/autoconf_inc.m4', + 'autoconf':'-DAUTOCONF_MACROS_FILE=../../autoconf_inc.m4', } for bake in bakes: - addMakefile('%s/%s' % (dirname, bake), {'all':dirname}, - deps=['common.bkl','common_samples.bkl','config.bkl'], + if type==CONTRIB_DIR: + acdir = '../../contrib/src/%s' % dirname.split('/')[-1] + ruledep = 'common_contrib.bkl' + else: + acdir = dirname + ruledep = 'common_samples.bkl' + addMakefile('%s/%s' % (dirname, bake), + {'all':dirname,'autoconf':acdir}, + deps=['common.bkl',ruledep,'config.bkl'], args=args) -os.path.walk('../../samples', onSample, None) +os.path.walk('../../samples', onSubmakefile, None) +os.path.walk('../../contrib/build', onSubmakefile, CONTRIB_DIR) cleanCmds = '' @@ -105,17 +115,12 @@ for f in all: file.write(""" clean: \trm -f ../../autoconf_inc.m4 -\trm -f ../../samples/autoconf_inc.m4 %s ../../autoconf_inc.m4: ../../Makefile.in ../../configure: ../../autoconf_inc.m4 \t(cd ../.. ; aclocal && autoconf) -../../samples/autoconf_inc.m4: ../../samples/Makefile.in -../../samples/configure: ../../samples/autoconf_inc.m4 -\t(cd ../../samples ; aclocal && autoconf) - Makefile: regenMakefile.py \t./regenMakefile.py \t@echo