-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·36 lines (32 loc) · 947 Bytes
/
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
36
#!/bin/sh
prefix=/opt
for arg in "$@"; do
case "$arg" in
--prefix=*)
prefix=`echo $arg | sed 's/--prefix=//'`
;;
--clean)
rm Makefile &> /dev/null
rm -r release/* &> /dev/null
exit 0
;;
--help)
echo 'usage: ./configure [options]'
echo 'options:'
echo ' --prefix=<path>: installation prefix'
echo ' --clean: remove Makefile and clean'
echo 'all invalid options are silently ignored'
exit 0
;;
esac
done
jsondata=$(cat library.json)
LIB_VERSION=$(echo "$jsondata"|grep -w \"version\" |tail -1 | cut -d\" -f4)
echo 'generating makefile ...'
echo "PREFIX = $prefix" > Makefile
echo "VERSION = $LIB_VERSION" >> Makefile
cat Makefile.in >> Makefile
echo "VERSION = $LIB_VERSION"
echo "PREFIX = $prefix"
echo "INSTALL = $prefix/miniThread/miniThread-$LIB_VERSION.tar.gz"
echo 'configuration complete, type make to build.'