Code aimed to run from the CLI. Will batch compile all Lasso 9 files found in the same directory as this file. can be set to use all available processors in parallel.
Parameters
none
Sample Usage
Save file as make_compiled.lasso9 to the same directory as the files that you want to compile.
Run this from the command line when inside the directory:
lasso9 ./make_compiled.lasso9 | bash
Source Code
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.
<?LassoScript
/*
Use this to batch compile all .lasso files found in the same directory as this file.
-fN will send files in parallel to available processors.
If you don't know how many processors you have at your disposal run (on Linux)
cat /proc/cpuinfo | grep processor | wc -l
The returned number will be the number of processors (cores) you have.
Make sure make_compiled.lasso9 is in the same directory as the .lasso files you want to compile. Run this when inside the directory:
lasso9 ./make_compiled.lasso9 | bash
Working version by Jolle Carlestam 2011-06-14
*/
local(filename = array)
local(filesuffix = sys_dll_ext)
'make -f2 '
iterate(file_listdirectory('./')) => {^
if(loop_value -> endswith('.lasso')) => {^
#filename = loop_value -> split('.')
#filename -> removelast
#filename -> insert(#filesuffix)
#filename -> join('.')
' '
^}
^}
?>