[make_compiled]

Description

Link: [make_compiled]
Author: Jolle Carlestam
Category: File
Version: 9.x
License: Public Domain
Posted: Jun. 14, 2011
Updated: Jun. 14, 2011
More by this author...

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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?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('.')
		' '
	^}
^}

?>

 

Comments

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net