-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_autotools.sh
More file actions
executable file
·50 lines (46 loc) · 1.21 KB
/
build_autotools.sh
File metadata and controls
executable file
·50 lines (46 loc) · 1.21 KB
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
#!/bin/bash
set -xe
_SC_DIR="$(dirname "$0")"
_PREFIX=/usr/local
_SCRATCH_DIR="$(cd "$_SC_DIR/.."; pwd)"
# Parse command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
--prefix=*)
_PREFIX="${1#*=}"
;;
--scratch-path=*)
_SCRATCH_DIR="${1#*=}"
;;
--with-m4=*)
_M4="${1#*=}"
;;
--with-autoconf=*)
_AUTOCONF="${1#*=}"
;;
--with-automake=*)
_AUTOMAKE="${1#*=}"
;;
--with-libtool=*)
_LIBTOOL="${1#*=}"
;;
--unit-test)
_NO_TESTS=0
;;
--with-brew-pc)
_BREW_PC=1
;;
*)
echo "Usage: $0 [--prefix=$_PREFIX] [--scratch-path=$_SCRATCH_DIR]"
echo " [--with-autoconf=] [--with-automake=] [--with-libtool=]"
exit
;;
esac
shift
done
[[ ":$PATH:" == *":$_PREFIX/bin:"* ]] || export PATH="$_PREFIX/bin:$PATH"
"$_SC_DIR/__build_pkgconfig.sh" "$_PREFIX" "$_SCRATCH_DIR" '' "$_NO_TESTS" "$_BREW_PC"
[[ -z "$_M4" ]] || "$_SC_DIR/__build_m4.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_M4" "$_NO_TESTS"
"$_SC_DIR/__build_autoconf.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_AUTOCONF" "$_NO_TESTS"
"$_SC_DIR/__build_automake.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_AUTOMAKE" "$_NO_TESTS"
"$_SC_DIR/__build_libtool.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_LIBTOOL" "$_NO_TESTS"