- contrib_copy_tree(WXDIR + '/contrib/include/wx/stc', STCINC+'/wx/stc')
- contrib_copy_tree(WXDIR + '/contrib/src/stc', STCLOC)
+ # Check if gen_iface needs to be run for the wxSTC sources
+ if (newer(opj(CTRB_SRC, 'stc/stc.h.in'), opj(CTRB_INC, 'stc/stc.h' )) or
+ newer(opj(CTRB_SRC, 'stc/stc.cpp.in'), opj(CTRB_SRC, 'stc/stc.cpp')) or
+ newer(opj(CTRB_SRC, 'stc/gen_iface.py'), opj(CTRB_SRC, 'stc/stc.cpp'))):
+
+ msg('Running gen_iface.py, regenerating stc.h and stc.cpp...')
+ cwd = os.getcwd()
+ os.chdir(opj(CTRB_SRC, 'stc'))
+ import gen_iface
+ gen_iface.main([])
+ os.chdir(cwd)
+
+
+ # make sure local copy of contrib files are up to date
+ contrib_copy_tree(opj(CTRB_INC, 'stc'), opj(STCINC, 'wx/stc'))
+ contrib_copy_tree(opj(CTRB_SRC, 'stc'), STCLOC)
+