X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e1a466fcba0078a8d5c0ae259fe8cb854509bb1..5646c3f82d3f1b1ed8c2635f1ee86f81f715f896:/build/bakefiles/regenMakefile.py?ds=sidebyside diff --git a/build/bakefiles/regenMakefile.py b/build/bakefiles/regenMakefile.py index 04742046f2..1d44cc0548 100755 --- a/build/bakefiles/regenMakefile.py +++ b/build/bakefiles/regenMakefile.py @@ -13,10 +13,12 @@ file = open('Makefile', 'wt') file.write(""" # Generated by regenMakefile.py -BAKEFILE = bakefile -BAKEARGS = -v +BAKEFILE = bakefile -v +CDEPS = config.bkl common.bkl common_contrib.bkl +SDEPS = config.bkl common.bkl common_samples.bkl +MDEPS = common.bkl config.bkl files.bkl monolithic.bkl multilib.bkl wxwin.py """) lines = [] @@ -29,7 +31,6 @@ def addMakefile(bake, makedirs, deps=[], args={}): other than 'bake'.""" print 'adding %s...' % bake lines.append('') - lines.append('# from %s' % bake) def add(bake, makedirs, make, dep, format, args={}): a = '' @@ -43,9 +44,8 @@ def addMakefile(bake, makedirs, deps=[], args={}): makedir = makedirs['all'] tfile = '%s/%s' % (makedir, make) 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) + lines.append('\t$(BAKEFILE) -f%s -o$@ %s %s' % (format, a, bake)) + lines.append('\ttouch $@') if format not in all: all[format] = [] all[format].append(tfile) @@ -55,6 +55,7 @@ def addMakefile(bake, makedirs, deps=[], args={}): add(bake, makedirs, 'makefile.bcc', dep, 'borland', 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) @@ -63,9 +64,7 @@ def addMakefile(bake, makedirs, deps=[], args={}): # ----------------------------------------------- # main makefile: -addMakefile('wx.bkl', {'all':'..','autoconf':'../..'}, - ['common.bkl', 'config.bkl', 'files.bkl', 'monolithic.bkl', - 'multilib.bkl', 'wxwin.py']) +addMakefile('wx.bkl', {'all':'..','autoconf':'../..'}, [ '$(MDEPS)' ]) # samples main makefile: addMakefile('../../samples/samples.bkl', {'all':'../../samples'}, @@ -97,13 +96,12 @@ def onSubmakefile(type, dirname, names): for bake in bakes: if type==CONTRIB_DIR: acdir = '../../contrib/src/%s' % dirname.split('/')[-1] - ruledep = 'common_contrib.bkl' + ruledep = '$(CDEPS)' else: acdir = dirname - ruledep = 'common_samples.bkl' + ruledep = '$(SDEPS)' addMakefile('%s/%s' % (dirname, bake), - {'all':dirname,'autoconf':acdir}, - deps=['common.bkl',ruledep,'config.bkl'], + {'all':dirname,'autoconf':acdir}, deps=[ruledep], args=args) os.path.walk(os.path.join('..','..','samples'),