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
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)
dep = string.join(deps + [bake], ' ')
add(bake, makedirs, 'Makefile.in', dep, 'autoconf', args)
+ add(bake, makedirs, 'makefile.bcc', dep, 'borland', 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
prefix = ''.join(['../' for i in range(0,depth)])
args = {
- 'all':'-DWXTOPDIR=/%s..' % prefix,
- 'autoconf':'-DAUTOCONF_MACROS_FILE=../../samples/autoconf_inc.m4',
+ 'all':'-DWXTOPDIR=%s../' % prefix,
+ '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 = ''
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