aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap49
1 files changed, 35 insertions, 14 deletions
diff --git a/bootstrap b/bootstrap
index 984c56cb3..d5bf30af4 100755
--- a/bootstrap
+++ b/bootstrap
@@ -40,8 +40,8 @@ check_uncrustify()
40{ 40{
41 if existence uncrustify; then 41 if existence uncrustify; then
42 echo "Installing uncrustify hook and configuration" 42 echo "Installing uncrustify hook and configuration"
43 ln -fs contrib/build-common/conf/uncrustify.cfg uncrustify.cfg 2> /dev/null 43 ln -fs $(pwd)/contrib/conf/uncrustify.cfg uncrustify.cfg 2> /dev/null
44 ln -fs contrib/build-common/conf/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null 44 ln -fs $(pwd)/contrib/conf/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
45 else 45 else
46 echo "Uncrustify not detected, hook not installed." 46 echo "Uncrustify not detected, hook not installed."
47 echo "Please install uncrustify if you plan on doing development" 47 echo "Please install uncrustify if you plan on doing development"
@@ -65,7 +65,7 @@ check_yapf()
65 existence yapf3.9 || \ 65 existence yapf3.9 || \
66 existence yapf4.0; then 66 existence yapf4.0; then
67 echo "Installing yapf symlink" 67 echo "Installing yapf symlink"
68 ln -fs contrib/build-common/conf/.style.yapf .style.yapf 2> /dev/null 68 ln -fs contrib/conf/.style.yapf .style.yapf 2> /dev/null
69 else 69 else
70 echo "yapf not detected, please install yapf if you plan on contributing python code" 70 echo "yapf not detected, please install yapf if you plan on contributing python code"
71 fi 71 fi
@@ -79,10 +79,9 @@ check_libtool()
79 existence libtoolize || \ 79 existence libtoolize || \
80 existence glibtoolize || \ 80 existence glibtoolize || \
81 existence slibtool; then 81 existence slibtool; then
82 autoreconf -if || exit 1 82 autoreconf -if
83 . "bin/pogen.sh" || exit 1 83 elif ! existence meson; then
84 else 84 echo "*** No libtoolize (libtool) or libtool or meson found, please install it ***" >&2;
85 echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2;
86 exit 1 85 exit 1
87 fi 86 fi
88} 87}
@@ -97,25 +96,47 @@ submodules()
97 if ! git --version >/dev/null; then 96 if ! git --version >/dev/null; then
98 echo "git not installed, skipping submodule update" 97 echo "git not installed, skipping submodule update"
99 else 98 else
100 git submodule update --init || exit 1 99 git submodule update --init --force --remote
101 git submodule update --recursive || exit 1
102 git submodule sync || exit 1
103 fi 100 fi
104} 101}
105 102
106init_buildcommon_include() 103
104install_hooks()
107{ 105{
108 cp contrib/build-common/Makefile.inc contrib/Makefile.inc || exit 1 106 ln -fs $(pwd)/contrib/conf/prepare-commit-msg .git/hooks/prepare-commit-msg 2> /dev/null
107 ln -fs $(pwd)/contrib/conf/commit-msg .git/hooks/commit-msg 2> /dev/null
108}
109
110create_handbook()
111{
112 . "scripts/sphinx_update.sh" || exit 1
113}
114
115pogen()
116{
117 . "scripts/pogen.sh" || exit 1
118}
119
120update_gana()
121{
122 . "scripts/gana_update.sh" || exit 1
109} 123}
110 124
111main() 125main()
112{ 126{
113 cleanup 127 cleanup
114 submodules 128 submodules
115 init_buildcommon_include
116 check_uncrustify 129 check_uncrustify
117 check_yapf 130 check_yapf
118 check_libtool 131 create_handbook
132 update_gana
133 if [ "$1" = "meson" ]; then
134 echo "Skipping autoreconf"
135 else
136 check_libtool
137 fi
138 pogen
139 install_hooks
119} 140}
120 141
121main "$@" 142main "$@"