Files
textmate/configure
Allan Odgaard 19c2271434 Update ./configure script to write rudimentary ‘local.rave’ file
If user does not have dependencies in /usr/local then they must edit the file themselves.
2021-05-26 14:45:28 +02:00

36 lines
1.2 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/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