From: Francesco <fr...@us...> - 2005-06-12 22:09:21
|
Update of /cvsroot/wxlua/wxLua/modules/build/bakefiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7008/modules/build/bakefiles Modified Files: Bakefiles.bkgen modules.bkl sources.bkl Added Files: listallsrc.bat listmodulesrc.bat Log Message: Fixed module builds (beta) --- NEW FILE: listmodulesrc.bat --- @echo off REM REM Author: Francesco Montorsi (fr...@us...) REM REM This batch file runs only under WinXP. REM It lists all the source files in the %1\src folder and all the REM header files in the %1\include folder and then puts the list REM into the %2 file as an XML variable. REM Note that the new variables will be appended to %2 and REM its old content won't be overwritten. REM An indentation of 4 space is respected. REM REM default variables setlocal set OUTPUT=%2 REM ++++++++++++++++++++++++++++++++++++++++++++++ REM write the src var for this module echo ^<!-- --^> >> %OUTPUT% echo ^<!-- %1 module --^> >> %OUTPUT% echo ^<!-- --^> >> %OUTPUT% echo ^<set var="%1_src"^> >> %OUTPUT% REM ++++++++++++++++++++++++++++++++++++++++++++++ REM Process all CPP files in %1\SRC folder, REM prepending the string "%1/src" before their names FOR %%F IN (%1\src\*.c*) DO @echo %1/src/%%~nxF >> %OUTPUT% REM ++++++++++++++++++++++++++++++++++++++++++++++ REM Process all H files in %1\INCLUDE folder, REM prepending the string "%1/include" before their names echo ^</set^> >> %OUTPUT% echo. >> %OUTPUT% echo ^<set var="%1_hdr"^> >> %OUTPUT% FOR %%F IN (%1\include\*.h) DO @echo %1/include/%%~nxF >> %OUTPUT% echo ^</set^> >> %OUTPUT% echo. >> %OUTPUT% REM ++++++++++++++++++++++++++++++++++++++++++++++ REM end of the script echo. >> %OUTPUT% Index: sources.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/bakefiles/sources.bkl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sources.bkl 12 Jun 2005 21:31:38 -0000 1.1 --- sources.bkl 12 Jun 2005 22:09:12 -0000 1.2 *************** *** 2,34 **** <makefile> ! <set var="LUA_SRC"> ! lua/src/lapi.c ! lua/src/lcode.c ! lua/src/ldebug.c ! lua/src/ldo.c ! lua/src/ldump.c ! lua/src/lfunc.c ! lua/src/lgc.c ! lua/src/llex.c ! lua/src/lmem.c ! lua/src/lobject.c ! lua/src/lopcodes.c ! lua/src/lparser.c ! lua/src/lstate.c ! lua/src/lstring.c ! lua/src/ltable.c ! lua/src/ltests.c ! lua/src/ltm.c ! lua/src/lundump.c ! lua/src/lvm.c ! lua/src/lzio.c ! </set> ! ! <set var="LUA_HDR"> ! lua/include/lauxlib.h ! lua/include/lua.h ! lua/include/lualib.h ! lua/include/luathread.h ! </set> ! </makefile> --- 2,103 ---- <makefile> ! <!-- --> ! <!-- build module --> ! <!-- --> ! <set var="build_src"> ! </set> ! ! <set var="build_hdr"> ! </set> ! ! ! <!-- --> ! <!-- lua module --> ! <!-- --> ! <set var="lua_src"> ! lua/src/lapi.c ! lua/src/lcode.c ! lua/src/ldebug.c ! lua/src/ldllmain.c ! lua/src/ldo.c ! lua/src/ldump.c ! lua/src/lfunc.c ! lua/src/lgc.c ! lua/src/llex.c ! lua/src/lmem.c ! lua/src/lobject.c ! lua/src/lopcodes.c ! lua/src/lparser.c ! lua/src/lstate.c ! lua/src/lstring.c ! lua/src/ltable.c ! lua/src/ltests.c ! lua/src/ltm.c ! lua/src/lundump.c ! lua/src/lvm.c ! lua/src/lzio.c ! </set> ! ! <set var="lua_hdr"> ! lua/include/lauxlib.h ! lua/include/lua.h ! lua/include/lualib.h ! lua/include/luathread.h ! </set> ! ! ! <!-- --> ! <!-- wxlua module --> ! <!-- --> ! <set var="wxlua_src"> ! wxlua/src/internal.cpp ! wxlua/src/interp.cpp ! wxlua/src/library.cpp ! </set> ! ! <set var="wxlua_hdr"> ! wxlua/include/callback.h ! wxlua/include/defs.h ! wxlua/include/internal.h ! wxlua/include/interp.h ! wxlua/include/library.h ! wxlua/include/wxlua.h ! </set> ! ! ! <!-- --> ! <!-- wxluadebug module --> ! <!-- --> ! <set var="wxluadebug_src"> ! wxluadebug/src/debug.cpp ! wxluadebug/src/splttree.cpp ! wxluadebug/src/staktree.cpp ! </set> ! ! <set var="wxluadebug_hdr"> ! wxluadebug/include/debug.h ! wxluadebug/include/splttree.h ! wxluadebug/include/staktree.h ! </set> ! ! ! <!-- --> ! <!-- wxluasocket module --> ! <!-- --> ! <set var="wxluasocket_src"> ! wxluasocket/src/debugio.cpp ! wxluasocket/src/dserver.cpp ! wxluasocket/src/dtarget.cpp ! wxluasocket/src/socket.cpp ! </set> ! ! <set var="wxluasocket_hdr"> ! wxluasocket/include/debugio.h ! wxluasocket/include/dserver.h ! wxluasocket/include/dtarget.h ! wxluasocket/include/socket.h ! </set> ! ! ! </makefile> Index: Bakefiles.bkgen =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/bakefiles/Bakefiles.bkgen,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Bakefiles.bkgen 12 Jun 2005 21:31:38 -0000 1.2 --- Bakefiles.bkgen 12 Jun 2005 22:09:12 -0000 1.3 *************** *** 13,17 **** <!-- List of output formats to generate: --> <add-formats> ! msvc,autoconf,borland,dmars,mingw,msvc6prj,watcom,cbuilderx,cbx_unix,gnu </add-formats> --- 13,17 ---- <!-- List of output formats to generate: --> <add-formats> ! autoconf,borland,dmars,mingw,msvc6prj,watcom,cbuilderx,cbx_unix,gnu,msvc </add-formats> --- NEW FILE: listallsrc.bat --- @echo off REM REM Author: Francesco Montorsi (fr...@us...) REM REM This batch file runs only under WinXP. REM It lists all the source files & header files of all modules REM placed in the ..\.. folder. REM The task is performed using "listmodulesrc.bat" script file. REM default variables setlocal IF EXIST sources.bkl del /f sources.bkl set OUTPUT=%CD%\sources.bkl REM ++++++++++++++++++++++++++++++++++++++++++++++ REM write the incipit of the bakefile echo ^<?xml version="1.0" ?^> > %OUTPUT% echo ^<makefile^> >> %OUTPUT% echo. >> %OUTPUT% REM ++++++++++++++++++++++++++++++++++++++++++++++ REM Process all FOLDERs in the MODULES directory set DIR=src/ cd ..\.. FOR /D %%F IN (*) DO CALL build\bakefiles\listmodulesrc.bat %%F %OUTPUT% REM ++++++++++++++++++++++++++++++++++++++++++++++ REM end of the script cd .. echo. >> %OUTPUT% echo ^</makefile^> >> %OUTPUT% Index: modules.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/build/bakefiles/modules.bkl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** modules.bkl 12 Jun 2005 21:31:38 -0000 1.2 --- modules.bkl 12 Jun 2005 22:09:12 -0000 1.3 *************** *** 22,28 **** <include file="../../../build/bakefiles/wxluabase.bkl"/> <!-- This one contains the lists of all source & header files --> <include file="sources.bkl"/> ! --- 22,45 ---- <include file="../../../build/bakefiles/wxluabase.bkl"/> + + + <!-- --> + <!-- SOURCE LIST --> + <!-- --> + <!-- This one contains the lists of all source & header files --> <include file="sources.bkl"/> ! ! <set var="lualib_src"> ! lua/src/lib/lauxlib.c ! lua/src/lib/lbaselib.c ! lua/src/lib/ldblib.c ! lua/src/lib/liolib.c ! lua/src/lib/lmathlib.c ! lua/src/lib/loadlib.c ! lua/src/lib/lstrlib.c ! lua/src/lib/ltablib.c ! </set> ! <set var="lualib_hdr"/> *************** *** 53,87 **** <include file="options.bkl"/> ! <!-- --> ! <!-- TEMPLATES --> <!-- --> ! <template id="wxlua_lib" template="wxlua-lib"> ! <dirname>$(WXLUA_BASEDIR)$(DIRSEP)$(WXLUA_LIBOUTPUT_FOLDER)</dirname> ! </template> ! <template id="wxlua_dll" template="wxlua"> ! <dirname>$(WXLUA_BASEDIR)$(DIRSEP)$(WXLUA_DLLOUTPUT_FOLDER)</dirname> ! ! <!-- The DLL version --> ! <version>$(WXLUA_VERSION)</version> ! <so_version>$(WXLUA_SOVERSION)</so_version> ! <mac_version>$(WXLUA_MACVERSION)</mac_version> ! ! <!-- Libraries must be put in the right order ! --> ! <wxlua-req-libs/> ! <wx-lib>adv</wx-lib> ! <wx-lib>xml</wx-lib> <!-- in case we're using the XML layout load/save system --> ! <wx-lib>core</wx-lib> ! <wx-lib>base</wx-lib> ! </template> <!-- --> <!-- AUXILIARY TARGETS --> --- 70,146 ---- <include file="options.bkl"/> ! <!-- --> ! <!-- NEW RULES --> ! <!-- with these ones, each module/sample target takes few lines only --> <!-- --> + + <define-rule name="wxlua_lib" extends="lib"> + <template> + <dirname>$(WXLUA_BASEDIR)$(DIRSEP)$(WXLUA_LIBOUTPUT_FOLDER)</dirname> + <set var="__modname"/> + </template> + <define-tag name="module-name"> + <set var="__modname">$(value)</set> + <set var="__modnamelow">$(__modname.lower())</set> + + <set var="__modsrc">$(mk.evalExpr('$(' + __modnamelow + '_src)'))</set> + <set var="__modhdr">$(mk.evalExpr('$(' + __modnamelow + '_hdr)'))</set> ! <libname>$(__modnamelow)</libname> ! <sources>$(__modsrc)</sources> ! <headers>$(__modhdr)</headers> ! ! <!-- to make MSVC6PRJ output look better... --> ! <msvc-file-group>$(__modname) sources:*.cpp</msvc-file-group> ! <msvc-file-group>$(__modname) headers:*.h</msvc-file-group> ! </define-tag> ! </define-rule> ! <define-rule name="wxlua_dll" extends="dll"> ! <template> ! <dirname>$(WXLUA_BASEDIR)$(DIRSEP)$(WXLUA_DLLOUTPUT_FOLDER)</dirname> ! ! <!-- The DLL version --> ! <version>$(WXLUA_VERSION)</version> ! <so_version>$(WXLUA_SOVERSION)</so_version> ! <mac_version>$(WXLUA_MACVERSION)</mac_version> ! ! <!-- Libraries must be put in the right order ! --> ! <wxlua-req-libs/> ! <wx-lib>adv</wx-lib> ! <wx-lib>xml</wx-lib> <!-- in case we're using the XML layout load/save system --> ! <wx-lib>core</wx-lib> ! <wx-lib>base</wx-lib> + <set var="__modname"/> + </template> + <define-tag name="module-name"> + <set var="__modname">$(value)</set> + <set var="__modnamelow">$(__modname.lower())</set> + + <set var="__modsrc">$(mk.evalExpr('$(' + __modnamelow + '_src)'))</set> + <set var="__modhdr">$(mk.evalExpr('$(' + __modnamelow + '_hdr)'))</set> + + <libname>$(__modnamelow)</libname> + <sources>$(__modsrc)</sources> + <headers>$(__modhdr)</headers> + + <!-- to make MSVC6PRJ output look better... --> + <msvc-file-group>$(__modname) sources:*.cpp</msvc-file-group> + <msvc-file-group>$(__modname) headers:*.h</msvc-file-group> + + <!-- now, shared stuff --> + <define>A2D$(__modname)MAKINGDLL</define> + </define-tag> + </define-rule> + + <!-- --> <!-- AUXILIARY TARGETS --> *************** *** 113,126 **** <set var="SRCDIR">$(WXLUA_MODULEDIR)</set> ! <!-- lua must always be built inconditionally in static mode --> ! <lib id="lua" template="wxlua_lib"> <libname>lua</libname> - <sources>$(LUA_SRC)</sources> - <headers>$(LUA_HDR)</headers> - </lib> - <lib id="wxlua" template="wxlua_lib" cond="WX_SHARED=='0'"> - </lib> <!-- since all the previous targets would generate each one a different DSP project --- 172,222 ---- <set var="SRCDIR">$(WXLUA_MODULEDIR)</set> ! <!-- lua must always be built inconditionally in static mode ! NOTE: we won't use the lua_lib rule since the LUA module does not follow ! the same conventions followed by other modules... --> ! <lib id="lua_lib"> ! <sources>$(lualib_src)</sources> ! <headers>$(lualib_hdr)</headers> ! <include>$(WXLUA_MODULEDIR)$(DIRSEP)lua$(DIRSEP)include</include> ! <dirname>$(WXLUA_BASEDIR)$(DIRSEP)$(WXLUA_LIBOUTPUT_FOLDER)</dirname> <libname>lua</libname> </lib> + <!-- this is the lua app + NOTE: like for lua_lib we don't use any wxLua-project-specific rule here --> + <exe id="lua"> + <library>lua_lib</library> + <sources>$(lua_src) lua/src/lua/lua.c</sources> + <headers>$(lua_hdr)</headers> + <include>$(WXLUA_MODULEDIR)$(DIRSEP)lua$(DIRSEP)include</include> + <dirname>$(WXLUA_BASEDIR)$(DIRSEP)bin</dirname> + <exename>lua</exename> + </exe> + + + <!-- the wxLua lib & dll --> + <wxlua_lib id="wxlua_lib" template="wxlua-lib" cond="WX_SHARED=='0'"> + <module-name>WXLUA</module-name> + </wxlua_lib> + <wxlua_dll id="wxlua_dll" template="wxlua" cond="WX_SHARED=='1'"> + <module-name>WXLUA</module-name> + </wxlua_dll> + + <!-- the wxLuaDebug lib & dll --> + <wxlua_lib id="wxluadebug_lib" template="wxlua-lib" cond="WX_SHARED=='0'"> + <module-name>WXLUADEBUG</module-name> + </wxlua_lib> + <wxlua_dll id="wxluadebug_dll" template="wxlua" cond="WX_SHARED=='1'"> + <module-name>WXLUADEBUG</module-name> + </wxlua_dll> + + <!-- the wxLuaSocket lib & dll --> + <wxlua_lib id="wxluasocket_lib" template="wxlua-lib" cond="WX_SHARED=='0'"> + <module-name>WXLUASOCKET</module-name> + </wxlua_lib> + <wxlua_dll id="wxluasocket_dll" template="wxlua" cond="WX_SHARED=='1'"> + <module-name>WXLUASOCKET</module-name> + </wxlua_dll> + <!-- since all the previous targets would generate each one a different DSP project |