]> git.saurik.com Git - wxWidgets.git/blobdiff - build/bakefiles/regenMakefile.py
Override CocoaSetEnabled() to call -[NSControl setEnabled:]
[wxWidgets.git] / build / bakefiles / regenMakefile.py
index c1dbab5cc23b4e1acfd0bb6eec9aa4b452a304d3..5ecc47351ad8ab44b04e9dcf083c2992db82de07 100755 (executable)
@@ -9,6 +9,17 @@
 
 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',
+    '../../utils/utils.dsw',
+]
+
 file = open('Makefile', 'wt')
 file.write("""
 # Generated by regenMakefile.py
@@ -19,11 +30,18 @@ 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 opengl.bkl wxwin.py
+
+DSWFLAGS = -DRUNTIME_LIBS=dynamic -DOFFICIAL_BUILD=0 -DUSE_HTML=1 \\
+           -DUSE_OPENGL=1 -DUSE_ODBC=1 -DMONOLITHIC=0 -DUSE_GUI=1 \\
+           -DDEBUG_INFO=default -DDEBUG_FLAG=default -DMSLU=0
+
+COMPAT_TARGETS = ../../src/wxWindows.dsp
+
 """)
 
 lines = {}
 all = {}
-all['autoconf'] = ['../../configure']
+all['autoconf'] = []
 
 linesCur = None
 
@@ -47,6 +65,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 $@')
@@ -60,6 +81,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)
+    add(bake, makedirs,
+        (bake[1+bake.rfind('/'):]).replace('.bkl','.dsw'),
+        dep, 'msvc6prj', args)
     
     lines[bake] = linesCur
 
@@ -70,22 +94,39 @@ 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',
                 'mingw':'-DOPTIONS_FILE=config.gcc',
                 'watcom':'-DOPTIONS_FILE=config.wat',
+                'msvc6prj':'$(DSWFLAGS)',
             })
 
 # samples main makefile:
 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',
+            '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',
+            })
+addMakefile('../../utils/utils.bkl', {'all':'../../utils'},
+            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',
             })
 
 
@@ -102,22 +143,25 @@ 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',
         'borland':'-DOPTIONS_FILE='+cfgbase+'bcc -DWRITE_OPTIONS_FILE=0',
         'watcom':'-DOPTIONS_FILE='+cfgbase+'wat -DWRITE_OPTIONS_FILE=0',
+        'msvc6prj':'$(DSWFLAGS)',
     }
-    
+
     for bake in bakes:
         if type==CONTRIB_DIR:
             acdir = '../../contrib/src/%s' % dirname.split('/')[-1]
@@ -131,27 +175,36 @@ def onSubmakefile(type, dirname, names):
 
 os.path.walk(os.path.join('..','..','samples'),
              onSubmakefile, SAMPLES_DIR)
+os.path.walk(os.path.join('..','..','demos'),
+             onSubmakefile, SAMPLES_DIR)
+os.path.walk(os.path.join('..','..','utils'),
+             onSubmakefile, SAMPLES_DIR)
 os.path.walk(os.path.join('..','..','contrib','build'),
              onSubmakefile, CONTRIB_DIR)
 os.path.walk(os.path.join('..','..','contrib','samples'),
              onSubmakefile, SAMPLES_DIR)
+os.path.walk(os.path.join('..','..','contrib','utils'),
+             onSubmakefile, SAMPLES_DIR)
 
 
 cleanCmds = ''
 allK = all.keys()
 allK.sort()
 cleanList = []
+
+for f in allK:
+    all[f].sort()
+
 for f in allK:
     for i in all[f]:
         cleanList.append('\trm -f %s\n' % i)
-    cleanList.sort()
     cleanCmds = ''.join(cleanList)
 
 for f in allK:
     var = '%s_ALL' % f.upper()
     file.write('%s = \\\n\t%s\n' % (var,' \\\n\t'.join(all[f])))
 
-file.write('all:')
+file.write('\nall: $(COMPAT_TARGETS)')
 for f in allK:
     file.write(' %s' % f)
 file.write('\n\n')
@@ -161,11 +214,22 @@ for f in allK:
 file.write("""
 clean:
 \trm -f ../../autoconf_inc.m4
+\trm -f $(COMPAT_TARGETS)
 %s
 
+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
-../../configure: ../../autoconf_inc.m4
-\t(cd ../.. ; aclocal && autoconf)
+
+../../src/wxWindows.dsp: monolithic.bkl files.bkl
+\t$(BAKEFILE) -Icompat -fwx24dsp -DUSE_GUI=1 -DWXUNIV=0 -o$@ wx.bkl
+\ttouch $@
 
 Makefile: regenMakefile.py
 \t./regenMakefile.py