This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathmain.bit
101 lines (90 loc) · 2.82 KB
/
main.bit
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
product.bit -- Product Bit File for the Embedthis Http Library
*/
Bit.load({
blend: [
"${BITS}/embedthis.bit",
"src/deps/mpr/mpr.bit",
"src/deps/pcre/pcre.bit",
"doc/doc.bit",
],
customize: [
/* Optionally load this if present. Feel free to create and customize */
'custom.bit',
],
'+modules': [ ],
settings: {
/* Default settings overridden by build.bit */
product: 'http',
title: 'Http Library',
company: 'Embedthis',
version: '1.0.1',
buildNumber: '0',
manager: '',
sync: [ 'mpr', 'pcre' ],
'+required': [ 'pcre' ],
'+optional': [ 'doxygen', 'dsi', 'ejs', 'man', 'man2html', 'openssl', 'matrixssl', 'ssl', 'utest' ],
minimal: ['doxygen', 'dsi', 'man', 'man2html', 'pmaker', 'matrixssl', 'ssl' ],
pam: true,
},
usage: {
assert: 'Enable program assertions',
},
profiles: {
debug: { settings: {
debug: true,
assert: true,
}, },
release: { settings: {
debug: false,
assert: false,
} },
},
defaults: {
'+includes': [ 'src' ]
},
targets: {
libhttp: {
type: 'lib',
headers: [ 'src/*.h' ],
sources: [ 'src/*.c' ],
exclude: /http.c/,
depends: [ 'libmpr', 'libpcre' ],
scripts: {
prebuild: "
if (bit.settings.hasPam) {
bit.target.libraries.push('pam')
}
",
},
},
http: {
type: 'exe',
depends: [ 'libhttp' ],
sources: [ 'src/http.c' ],
},
package: {
depends: ['packageCombo'],
},
packageCombo: {
depends: ['build'],
action: "
let d = bit.dir.pkg.join('${settings.product}-${settings.version}')
safeRemove(bit.dir.pkg)
install('package/http.bit', d.join('src/deps/http/http.bit'), {hidden: true})
install(['doc/api/http.html', 'doc/api/httpBare.html', 'doc/api/http*.tags', 'doc/api/http.dtags'],
d.join('doc/api'))
install('doc/man/http.1', d.join('doc/man/http.1'))
install(['src/http.h', 'src/http.c'], d.join('src/deps/http'))
install('src/*.c', d.join('src/deps/http/httpLib.c'), {
cat: true,
exclude: /http.c/,
filter: /^#inc.*http.*$/mg,
header: '#include \"http.h\"',
title: bit.settings.title + ' Library Source',
})
package(bit.dir.pkg, ['combo', 'flat'])
",
},
},
})