-
Notifications
You must be signed in to change notification settings - Fork 7
/
boot.sh
executable file
·98 lines (88 loc) · 3.41 KB
/
boot.sh
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
#! /bin/sh -e
have_ext=$(if test -e src/nox/ext/Makefile.am; then echo yes; else echo no; fi)
for opt
do
case $opt in
(--apps-core) core_only=yes ;;
(--apps-net) net_only=yes ;;
(--enable-ext) have_ext=yes ;;
(--disable-ext) have_ext=no ;;
(--help) cat <<EOF
$0: bootstrap NOX from a Git repository
usage: $0 [OPTIONS]
The recognized options are:
--enable-ext include noxext
--disable-ext exclude noxext
--apps-core only build with core apps
--apps-net build with core and net apps
By default, noxext is included if it is present.
EOF
exit 0
;;
(*) echo "unknown option $opt; use --help for help"; exit 1 ;;
esac
done
if test -e src/nox/ext/boot.sh ; then
(cd src/nox/ext && ./boot.sh)
fi
if test "$core_only" = yes; then
echo 'building with only core apps'
cat configure.ac.in | sed -e "s/APPS_ID/core/" | sed -e "s/TURN_ON_NETAPPS/no/" > configure.ac
if test -e ./installer; then
echo "AC_CONFIG_FILES([installer/Makefile installer/build installer/decompress installer/package/installer " >> configure.ac
else
echo "AC_CONFIG_FILES([ " >> configure.ac
fi
find . -path "*Makefile.am" | grep -v "\<apache-log4cxx\/" | grep -v \
"\<ext\>" | grep -v "\<protobuf\/" | grep -v "\<netapps\>" \
| sed -e "s/\.\<am\>//" | sed -e "s/\.\///" \
>> configure.ac
echo "]) " >> configure.ac
elif test "$net_only" = yes; then
echo 'building with core and net apps'
cat configure.ac.in | sed -e "s/APPS_ID/core/" | sed -e "s/TURN_ON_NETAPPS/yes/" > configure.ac
if test -e ./installer; then
echo "AC_CONFIG_FILES([installer/Makefile installer/build installer/decompress installer/package/installer " >> configure.ac
else
echo "AC_CONFIG_FILES([ " >> configure.ac
fi
find . -path "*Makefile.am" | grep -v "\<apache-log4cxx\/" | grep -v \
"\<ext\>" | grep -v "\<protobuf\/" \
| sed -e "s/\.\<am\>//" | sed -e "s/\.\///" \
>> configure.ac
echo "]) " >> configure.ac
else
echo 'building with all apps'
cat configure.ac.in | sed -e "s/APPS_ID/full/" | sed -e "s/TURN_ON_NETAPPS/yes/" > configure.ac
if test -e ./installer; then
echo "AC_CONFIG_FILES([installer/Makefile installer/build installer/decompress installer/package/installer " >> configure.ac
else
echo "AC_CONFIG_FILES([ " >> configure.ac
fi
find . -path "*Makefile.am" | grep -v "\<apache-log4cxx\/" | grep -v \
"\<ext\>" | grep -v "\<protobuf\/" \
| sed -e "s/\.\<am\>//" | sed -e "s/\.\///" \
>> configure.ac
echo "doc/doxygen/doxygen.conf" >> configure.ac
echo "]) " >> configure.ac
fi
# Enable or disable ext.
if test "$have_ext" = yes; then
echo 'Enabling noxext...'
echo "" >> configure.ac
echo "#" >> configure.ac
echo "# Automatically included by boot.sh" >> configure.ac
echo "#" >> configure.ac
echo "if test \"\$noext\" = false; then" >> configure.ac
echo -n "AC_CONFIG_SUBDIRS([" >> configure.ac
find src/nox/ext -name "configure.ac" | grep -v "\<protobuf\/" | sed -e "s/configure.ac//" \
| sed -e's%/$%%' >> configure.ac
echo "]) " >> configure.ac
echo "fi" >> configure.ac
echo "" >> configure.ac
else
echo 'Disabling noxext...'
fi
echo "AC_OUTPUT " >> configure.ac
# Bootstrap configure system from .ac/.am files
autoreconf -Wno-portability --install -I `pwd`/config --force