From: Francesco <fr...@us...> - 2005-06-12 18:29:29
|
Update of /cvsroot/wxlua/wxLua/build/bakefiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25491/build/bakefiles Added Files: Bakefiles.bkgen globalregen.bat regen.bat utils.bkl wxlua.bkl wxluabase.bkl Log Message: Initial upload of bakefile build system --- NEW FILE: regen.bat --- @echo off REM REM MAKEFILE REGENERATION SCRIPT (for WinXP) REM REM author: Francesco Montorsi (fr...@us...) REM date: 18-8-2004 echo. echo. echo Regenerating makefiles for MSVC, BORLAND, MINGW and AUTOCONF... echo. bakefile_gen echo. echo Regeneration completed. echo. echo. pause --- NEW FILE: wxluabase.bkl --- <?xml version="1.0" ?> <!-- Author: Francesco Montorsi <fr...@us...> --> <!-- RCS-ID: $Id: wxluabase.bkl,v 1.1 2005/06/12 18:29:20 frm Exp $ --> <!-- --> <!-- WXLUA GENERIC BAKEFILE --> <!-- --> <!-- This bakefile can be used by all wxLua-based apps and --> <!-- libraries. --> <!-- --> <makefile> <using module="datafiles"/> <!-- This file contains the declaration of the WX & WX-LIB templates --> <set var="WX_VERSION_DEFAULT">26</set> <include file="presets/wx.bkl"/> <!-- This one contains some utility targets --> <include file="utils.bkl"/> <!-- --> <!-- VARIABLES --> <!-- --> <!-- Some infos on the version. --> <set var="WXLUA_MAJOR">2</set> <set var="WXLUA_MINOR">6</set> <set var="WXLUA_RELEASE">1</set> <set var="WXLUA_VERSION">$(WXLUA_MAJOR).$(WXLUA_MINOR).$(WXLUA_RELEASE)</set> <!-- 0.0.0 must be used for stable releases; 1.0.0, 2.0.0 ... are used for development releases. --> <set var="WXLUA_SOVERSION">0.0.0</set> <!-- Same as WXLUA_SOVERSION just without dots --> <set var="WXLUA_MACVERSION">0</set> <!-- A simple variable used to understand if we are --> <!-- creating a makefile for a Win32 target or a more --> <!-- generic linux/GNU-based system. --> <set var="TARGETING_WIN32"> <if cond="FORMAT=='autoconf' or FORMAT=='gnu'">0</if> <if cond="FORMAT!='autoconf' and FORMAT!='gnu'">1</if> </set> <set var="TARGETING_IDE"> <if cond="FORMAT=='msvc6prj' or FORMAT=='cbuilderx'">1</if> <if cond="FORMAT!='msvc6prj' and FORMAT!='cbuilderx'">0</if> </set> <set var="WXLUA_LIBPOSTFIX"> <!-- Use same naming conventions as for wxWidgets. --> <if cond="TARGETING_WIN32=='1'">$(WXLIBPOSTFIX)</if> <if cond="TARGETING_WIN32=='0'"></if> <!-- empty in this case... --> </set> <!-- some path stuff --> <if cond="TARGETING_WIN32=='1'"> <!-- Win32 makefiles will be put in BUILD/MSW --> <set var="WXLUA_BASEDIR">..$(DIRSEP)..</set> </if> <if cond="TARGETING_WIN32=='0'"> <!-- Unix makefiles will be put in the main folder --> <set var="WXLUA_BASEDIR">.</set> </if> <set var="WXLUA_LIBOUTPUT_FOLDER"> <if cond="TARGETING_WIN32=='1'"> <!-- in this case, the COMPILER variable is defined --> lib$(DIRSEP)$(COMPILER)_lib </if> <if cond="TARGETING_WIN32=='0'"> lib </if> </set> <set var="WXLUA_DLLOUTPUT_FOLDER"> <if cond="TARGETING_WIN32=='1'"> <!-- in this case, the COMPILER variable is defined --> lib$(DIRSEP)$(COMPILER)_dll </if> <if cond="TARGETING_WIN32=='0'"> lib </if> </set> <set var="WXLUA_OUTPUT_FOLDER"> <if cond="TARGETING_WIN32=='1' and WX_SHARED=='1'">$(WXLUA_DLLOUTPUT_FOLDER)</if> <if cond="TARGETING_WIN32=='1' and WX_SHARED=='0'">$(WXLUA_LIBOUTPUT_FOLDER)</if> <if cond="TARGETING_WIN32=='0'">lib</if> <!-- shared & static builds go to the same folder --> </set> <if cond="TARGETING_WIN32=='1'"> <set var="WARNINGS"> <if cond="WX_DEBUG=='1'">max</if> <if cond="WX_DEBUG=='0'">no</if> </set> <set var="DEBUGINFO"> <if cond="WX_DEBUG=='1'">on</if> <if cond="WX_DEBUG=='0'">off</if> </set> <set var="DEBUGRUNTIME"> <if cond="WX_DEBUG=='1'">on</if> <if cond="WX_DEBUG=='0'">off</if> </set> <set var="OPTIMIZEFLAG"> <if cond="WX_DEBUG=='1'">off</if> <if cond="WX_DEBUG=='0'">speed</if> </set> <set var="WX_SHAREDDEFINE"> <if cond="WX_SHARED=='1'">WXUSINGDLL</if> </set> <set var="SUBPROJECT_POSTFIX_PATH">build$(DIRSEP)msw</set> </if> <if cond="TARGETING_WIN32=='0'"> <set var="WX_SHAREDDEFINE"/> <if cond="FORMAT=='autoconf'"> <option name="WX_DEBUG"/> <option name="WX_UNICODE"/> <option name="WX_SHARED"/> <option name="WX_DIR"/> <option name="WX_VERSION"/> </if> <set var="SUBPROJECT_POSTFIX_PATH"/> </if> <!-- --> <!-- NEW TAGS --> <!-- --> <!-- This defines a tag which includes headers on MSVC --> <!-- Note that $(value) is stuck in there by bakefile, --> <!-- and is the value between the beginning and end tag. --> <define-tag name="headers" rules="dll,lib,exe"> <if cond="FORMAT=='msvc6prj'"> <msvc-project-files> $(value) </msvc-project-files> </if> </define-tag> <define-tag name="run-tarball" rules="action"> <command>tar -cvzf $(value) --exclude-from=$(WXLUA_BASEDIR)$(DIRSEP)build$(DIRSEP)bakefiles$(DIRSEP)excludelist.txt wxLua/*</command> </define-tag> <define-tag name="run-zip" rules="action"> <command>zip -r9 $(value) $(WXLUA_BASEDIR)$(DIRSEP)* -x *.pdb -x *.log -x *.o* -x *.#* -x *.csm -x *.il?</command> </define-tag> <!-- --> <!-- TEMPLATES --> <!-- --> <!-- just a placeholder to mark the place where <lua-lib> will be placed, thanks to the order precedence declaration below it: --> <define-tag name="__wxlua-libs-point" rules="exe,dll,module"/> <define-tag name="__wxlua-req-libs-point" rules="exe,dll,module"/> <!-- our <lua-lib> tag is simple: it just declares the dependency from the $(value) library; this is because wxLua does not adopt special library namings like wx does --> <define-tag name="lua-lib" rules="exe,dll,module"><sys-lib>$(value)</sys-lib></define-tag> <!-- this tag includes the wxLua required libraries, it will be defined later in options.bkl --> <define-tag name="lua-req-libs" rules="exe,dll,module"/> <!-- some tag infos --> <tag-info name="lua-lib" position="before:lua-req-libs"/> <tag-info name="lua-req-libs" position="before:__wxlua-libs-point"/> <tag-info name="wx-lib" position="after:__wxlua-libs-point"/> <!-- the generic template for wxLua-based libs/apps: this does not derive from wx or from wx-lib so that these templates can be added later to create templates specific for wxlua-based libs and templates specific for wxlua-based apps --> <template id="wxlua-base"> <!-- an additional include & link path are required not only on win32 but also on *nix: when compiling the samples or the library the user has not installed the library yet ! --> <include>$(WXLUA_BASEDIR)$(DIRSEP)include</include> <include>$(WXLUA_BASEDIR)$(DIRSEP)modules</include> <if cond="TARGETING_WIN32=='1'"> <warnings>$(WARNINGS)</warnings> <optimize>$(OPTIMIZEFLAG)</optimize> <debug-info>$(DEBUGINFO)</debug-info> <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs> <threading>multi</threading> </if> <!-- This is a non-empty variable only when using wxWidgets as a DLL --> <define>$(WX_SHAREDDEFINE)</define> </template> <!-- a template for wxlua-based libraries --> <template id="wxlua-lib" template="wx-lib,wxlua-base"> <!-- we don't need to add anything else to wxlua-base template --> </template> <!-- a template for wxLua-based exe/dll targets --> <template id="wxlua" template="wx,wxlua-base"> <lib-path>$(WXLUA_BASEDIR)$(DIRSEP)$(WXLUA_OUTPUT_FOLDER)</lib-path> <!-- same technique used by wx_win32.bkl: this is a placeholder for the lua-lib tags so that the library order is always the exact one --> <__wxlua-libs-point/> </template> </makefile> --- NEW FILE: Bakefiles.bkgen --- <?xml version="1.0" ?> <!-- $Id: Bakefiles.bkgen,v 1.1 2005/06/12 18:29:20 frm Exp $ --> <bakefile-gen> <disable-formats>gnu,dmars,cbx_unix,cbuilderx</disable-formats> <input>wxlua.bkl</input> <!-- required since wxArt2d uses wx presets stored in wxWidgets subfolders... --> <add-flags>-I%WXWIN%\build\bakefiles\wxpresets</add-flags> <!-- List of output formats to generate: --> <add-formats> autoconf,borland,dmars,mingw,msvc,watcom,cbuilderx,cbx_unix,gnu </add-formats> <!-- Directories where msw makefiles should go: --> <add-flags formats="borland"> -o../msw/makefile.bcc </add-flags> <add-flags formats="dmars_smake"> -o../msw/makefile.dms </add-flags> <add-flags formats="dmars"> -o../msw/makefile.dmc </add-flags> <add-flags formats="mingw"> -o../msw/makefile.gcc </add-flags> <add-flags formats="msvc"> -o../msw/makefile.vc </add-flags> <add-flags formats="watcom"> -o../msw/makefile.wat </add-flags> <add-flags formats="msvc6prj"> -o../msw/wxlua.dsw </add-flags> <!-- Directory where AUTOCONF files should go: --> <add-flags formats="autoconf"> -o../../Makefile.in </add-flags> <add-flags formats="autoconf"> -DAUTOCONF_MACROS_FILE=../../autoconf_inc.m4 </add-flags> </bakefile-gen> --- NEW FILE: wxlua.bkl --- <?xml version="1.0" ?> <!-- Author: Francesco Montorsi <fr...@us...> --> <!-- RCS-ID: $Id: wxlua.bkl,v 1.1 2005/06/12 18:29:20 frm Exp $ --> <!-- --> <!-- WXLUA MAIN BAKEFILE --> <!-- --> <makefile> <!-- This is required because it contains the definitions of a lot of utils --> <include file="wxluabase.bkl"/> <!-- This file contains the list of UTILS options --> <include file="../../utils/build/bakefiles/options.bkl"/> <!-- This file contains the list of MODULES options --> <include file="../../modules/build/bakefiles/options.bkl"/> <!-- This file contains the list of APPS options --> <include file="../../apps/build/bakefiles/options.bkl"/> <!-- --> <!-- The utils --> <!-- --> <subproject id="utils"> <dependency-of>all</dependency-of> <dir>$(WXLUA_BASEDIR)$(DIRSEP)utils$(DIRSEP)$(SUBPROJECT_POSTFIX_PATH)</dir> <target/> </subproject> <!-- --> <!-- The modules libraries & samples --> <!-- --> <subproject id="modules"> <dependency-of>all</dependency-of> <dir>$(WXLUA_BASEDIR)$(DIRSEP)modules$(DIRSEP)$(SUBPROJECT_POSTFIX_PATH)</dir> <target/> </subproject> <!-- --> <!-- The wxLua applications --> <!-- --> <subproject id="apps"> <dependency-of>all</dependency-of> <dir>$(WXLUA_BASEDIR)$(DIRSEP)apps$(DIRSEP)$(SUBPROJECT_POSTFIX_PATH)</dir> <target/> </subproject> <!-- --> <!-- Miscellaneous utility targets --> <!-- --> <!-- <action id="docs"> <command>@echo =============================================</command> <command>@echo Creating wxArt2d docs using doxygen... </command> <command>@echo =============================================</command> <command>cd ..\..\doc</command> <command>doxygen doxygen.inc</command> </action> --> </makefile> --- NEW FILE: utils.bkl --- <?xml version="1.0" ?> <!-- Author: Francesco Montorsi <fr...@us...> --> <!-- Date: 1/5/2005 --> <!-- Last revision: 13/5/2005 --> <!-- --> <!-- GENERIC BAKEFILE WITH UTILITY TAGS --> <!-- --> <!-- This bakefile provides various new tags for easier --> <!-- target creation (in particular these tags give you --> <!-- the tools required to build INSTALL/UNINSTALL/RPM --> <!-- targets. --> <makefile> <!-- --> <!-- NEW TAGS --> <!-- --> <!-- Removes the $(value) file. --> <!-- Usage sample: --> <!-- <action id="uninstall-lib"> --> <!-- <rmfile>$(LIBDIR)/*mylib*</rmfile> --> <!-- </action> --> <define-tag name="rmfile" rules="action"> <if cond="TARGETING_WIN32=='0'"> <command>rm -f $(value)</command> </if> <if cond="TARGETING_WIN32=='1' and FORMAT!='mingw'"> <command>-if exist $(value) del /Q $(value)</command> </if> <if cond="TARGETING_WIN32=='1' and FORMAT=='mingw'"> <!-- The MINGW format needs the "then" keyword... --> <command>-if exist $(value) then del /Q $(value)</command> </if> </define-tag> <!-- Recursively removes the $(value) file from the current folder. --> <!-- Usage sample: --> <!-- <action id="deepclean"> --> <!-- <rmfile-rec>$(BUILDDIR)/*.o</rmfile> --> <!-- </action> --> <define-tag name="rmfile-rec" rules="action"> <if cond="TOOLSET=='unix'"><command>$(RM) -r $(value)</command></if> <if cond="TOOLSET=='win32'"><command>-del /S $(value)</command></if> </define-tag> <!-- Removes the $(value) list of files. Each file should be --> <!-- separed from the previous with a single space. --> <!-- To each file is prepended the $(DESTDIR)$(INCLUDEDIR)/ --> <!-- string (the file list is supposed to be a list of headers)... --> <!-- Usage sample: --> <!-- <set var="MYPRJ_HDR"> --> <!-- hdr1.h wx/hdr2.h --> <!-- </set> --> <!-- <modify-target target="uninstall"> --> <!-- <rmheaders>$(BUILDDIR)/*.o</rmheaders> --> <!-- </modify-target> --> <define-tag name="rmheaders" rules="action"> <!-- First of all remove all unnecessary whitespaces and wrap long lines --> <set var="__tmplist">$(wrapLongLine("", value, "\\", "\t", 20))</set> <!-- then put the $(DESTDIR)$(INCLUDEDIR)/ string in front of all files --> <set var="__tmplist">$(" " + __tmplist)</set> <set var="__tmplist">$(__tmplist.replace(" ", " " + DESTDIR + INCLUDEDIR + DIRSEP))</set> <set var="__tmplist">$(__tmplist.replace("\t", "\t" + DESTDIR + INCLUDEDIR + DIRSEP))</set> <!-- RM/DEL commands can take also lists of files (thanks Vaclav!) --> <rmfile>$(__tmplist)</rmfile> </define-tag> <!-- Removes the $(value) folder. --> <!-- Usage sample: --> <!-- <action id="uninstall-scripts"> --> <!-- <rmdir>$(DATADIR)/myscripts</rmdir> --> <!-- </action> --> <define-tag name="rmdir" rules="action"> <if cond="TARGETING_WIN32=='0'"> <command>rm -rf $(value)</command> </if> <if cond="TARGETING_WIN32=='1' and FORMAT!='mingw'"> <command>-if exist $(value) rmdir /S /Q $(value)</command> </if> <if cond="TARGETING_WIN32=='1' and FORMAT=='mingw'"> <!-- The MINGW format needs the "then" keyword... --> <command>-if exist $(value) then rmdir /S /Q $(value)</command> </if> </define-tag> <!-- Removes the intermediate folders whose names are composed as --> <!-- "$(value)[u][d]" where 'u' is used when Unicode is enabled and --> <!-- 'd' is used for debug builds. --> <!-- Usage sample: --> <!-- <set var="BUILDDIR">$(FORMAT)$(WXLIBPOSTFIX)</set> --> <!-- <action id="deepclean"> --> <!-- <rmintdir>$(FORMAT)</rmintdir> --> <!-- </action> --> <define-tag name="rmintdir" rules="action"> <rmdir>$(value)</rmdir> <rmdir>$(value)d</rmdir> <rmdir>$(value)u</rmdir> <rmdir>$(value)ud</rmdir> </define-tag> <!-- Removes *all* intermediate files from the given folder --> <!-- recursively. --> <!-- Usage sample: --> <!-- <action id="deepclean"> --> <!-- <rmintfiles>build</rmintfiles> --> <!-- </action> --> <define-tag name="rmintfiles" rules="action"> <!-- remove results --> <rmfile-rec>$(value)$(DIRSEP)*.a</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.lib</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.pdb</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.dll</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.exp</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.so*</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.exe</rmfile-rec> <!-- various intermediate files for the bakefile-supported compilers --> <rmfile-rec>$(value)$(DIRSEP)*.obj</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.o</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.log</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.manifest*</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.log</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP).bakefile_gen.state</rmfile-rec> <!-- MSVC --> <rmfile-rec>$(value)$(DIRSEP)*.pch</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.ncb</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.plg</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.ncb</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.aps</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.suo</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.user</rmfile-rec> <!-- Borland --> <rmfile-rec>$(value)$(DIRSEP)*.il?</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.tds</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.idb</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)*.map</rmfile-rec> <!-- autoconf --> <rmdir>$(value)$(DIRSEP)autom4te.cache</rmdir> <rmdir>$(value)$(DIRSEP).deps</rmdir> <rmfile-rec>$(value)$(DIRSEP)config.status</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)config.log</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)Makefile</rmfile-rec> <rmfile-rec>$(value)$(DIRSEP)bk-deps</rmfile-rec> </define-tag> <!-- --> <!-- NEW RULES --> <!-- --> <!-- Changes the current directory to the folder given to the CD --> <!-- tag and then executes the command given to the RUN tag. --> <!-- Usage sample: --> <!-- <cd-and-run id="tarball"> --> <!-- <cd>..</cd> --> <!-- <run>tar -cvzf tarball.tar.gz myproj/*</run> --> <!-- </cd-and-run> --> <define-rule name="cd-and-run" extends="action"> <template> <set var="__cmddir"/> <set var="__cmdstr"/> </template> <define-tag name="cd"> <set var="__cmddir">$(nativePaths(value))</set> </define-tag> <define-tag name="run"> <set var="__cmdstr">$(value)</set> <if cond="FORMAT=='msvc' or FORMAT=='mingw' or FORMAT=='gnu' or FORMAT=='autoconf'"> <command>( cd $(__cmddir) && $(__cmdstr) )</command> </if> <if cond="FORMAT=='borland' or FORMAT=='watcom'"> <command>-cd $(__cmddir)</command> <command>-$(__cmdstr)</command> </if> </define-tag> </define-rule> </makefile> --- NEW FILE: globalregen.bat --- @echo off REM REM MAKEFILE REGENERATION SCRIPT (for WinXP) REM REM author: Francesco Montorsi (fr...@us...) REM date: 18-8-2004 echo. echo. echo Regenerating makefiles for all wxLua project... echo. bakefile_gen ( cd ..\..\apps\build\bakefiles && bakefile_gen && cd ..\..\..\build\bakefiles ) ( cd ..\..\modules\build\bakefiles && bakefile_gen && cd ..\..\..\build\bakefiles ) ( cd ..\..\utils\build\bakefiles && bakefile_gen && cd ..\..\..\build\bakefiles ) echo. echo Regeneration completed. echo. echo. pause |