forked from textmate/textmate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·35 lines (28 loc) · 1.23 KB
/
configure
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
#!/bin/sh
# set -u
function error () { printf >&2 "%s\n\nPlease see README.md for build instructions.\n" "$1"; exit 1; }
# ===============================
# = Check required dependencies =
# ===============================
for dep in capnp ninja ragel multimarkdown pgrep pkill; do
which -s "$dep" || error "*** dependency missing: ‘${dep}’."
done
if [[ -e local.rave ]]; then
echo >&2 "Skipping writing ‘local.rave’: File already exists"
else
echo >> local.rave 'add FLAGS "-I/usr/local/include"'
echo >> local.rave 'add LN_FLAGS "-L/usr/local/lib"'
for hdr in boost/{crc,variant}.hpp capnp/{message,serialize-packed}.h sparsehash/dense_hash_map; do
test -f "/usr/local/include/${hdr}" || error "*** dependency missing: ‘/usr/local/include/${hdr}’. Install dependency and/or update ‘local.rave’ with correct path."
done
for lib in capnp kj; do
test -f "/usr/local/lib/lib${lib}."* || error "*** dependency missing: ‘/usr/local/lib/lib${lib}.*’. Install dependency and/or update ‘local.rave’ with correct path."
done
fi
# ========================
# = Generate build files =
# ========================
if [[ -d "$builddir" ]];
then bin/rave -crelease -tTextMate -b"$builddir"
else bin/rave -crelease -tTextMate
fi