-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.mb
56 lines (47 loc) · 1.4 KB
/
build.mb
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
sector config
section files
str build_root 'build/'
str debug_dir '$(/config/files/build_root)debug/'
str release_dir '$(/config/files/build_root)release/'
str obj_dirname 'obj/'
end
section scripts
str directories '
if [[ ! -d $(/config/files/debug_dir) ]]; then
mkdir -p $(/config/files/debug_dir)$(/config/files/obj_dirname)
fi
if [[ ! -d $(/config/files/release_dir) ]]; then
mkdir -p $(/config/files/release_dir)$(/config/files/obj_dirname)
fi
'
str compile_command 'fpc $(/config/mariebuild/source) -FE"$(%target_objdir%)" -Fu"inc/" '
end
section mariebuild
str build_type 'full'
str source 'src/sitegen.pas'
list str targets 'debug', 'release', 'clean'
str default 'debug'
end
end
sector targets
section debug
str target_objdir '$(/config/files/debug_dir)$(/config/files/obj_dirname)'
str exec '#!/bin/bash
$(/config/scripts/directories)
$(/config/scripts/compile_command) -g -dDEBUG
mv $(%target_objdir%)/sitegen $(%target_objdir%)../fpc-sitegen
'
end
section release
str target_objdir '$(/config/files/release_dir)$(/config/files/obj_dirname)'
str exec '#!/bin/bash
$(/config/scripts/directories)
$(/config/scripts/compile_command) -O4 -XX -Xs
mv $(%target_objdir%)/sitegen $(%target_objdir%)../fpc-sitegen
'
end
section clean
str exec '#!/bin/bash
rm -rf $(/config/files/build_root)
$(/config/scripts/directories)'
end