diff options
-rw-r--r-- | bin/Makefile.am | 2 | ||||
-rwxr-xr-x | bin/gana_update.sh | 59 | ||||
-rw-r--r-- | bin/meson.build | 16 | ||||
-rwxr-xr-x | bin/sphinx_update.sh | 35 | ||||
-rwxr-xr-x | bootstrap | 89 | ||||
-rw-r--r-- | meson-dist-script | 31 | ||||
-rw-r--r-- | meson.build | 1 |
7 files changed, 122 insertions, 111 deletions
diff --git a/bin/Makefile.am b/bin/Makefile.am index 6c11e26ef..18fccda56 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am | |||
@@ -3,4 +3,6 @@ EXTRA_DIST = \ | |||
3 | grephdr.sh \ | 3 | grephdr.sh \ |
4 | grepsrc.sh \ | 4 | grepsrc.sh \ |
5 | pogen.sh \ | 5 | pogen.sh \ |
6 | sphinx_update.sh \ | ||
7 | gana_update.sh \ | ||
6 | rename.sh | 8 | rename.sh |
diff --git a/bin/gana_update.sh b/bin/gana_update.sh new file mode 100755 index 000000000..0707433f5 --- /dev/null +++ b/bin/gana_update.sh | |||
@@ -0,0 +1,59 @@ | |||
1 | # This is more portable than `which' but comes with | ||
2 | # the caveat of not(?) properly working on busybox's ash: | ||
3 | existence() | ||
4 | { | ||
5 | type "$1" >/dev/null 2>&1 | ||
6 | } | ||
7 | |||
8 | gana_update() | ||
9 | { | ||
10 | if [ ! -z $GNUNET_SKIP_GANA ]; then | ||
11 | echo "Skipping GANA update" | ||
12 | return | ||
13 | fi | ||
14 | echo "Updating GANA..." | ||
15 | if existence recfmt; then | ||
16 | cwd=$PWD | ||
17 | cd contrib/gana || exit 1 | ||
18 | # GNS | ||
19 | echo "Updating GNS record types" | ||
20 | cd gnu-name-system-record-types && \ | ||
21 | make >/dev/null && \ | ||
22 | cp gnu_name_system_record_types.h ../../../src/include/ || exit 1 | ||
23 | echo "Creating default TLDs" | ||
24 | cd ../gnu-name-system-default-tlds && \ | ||
25 | make >/dev/null && \ | ||
26 | cp tlds.conf ../../../src/service/gns || exit 1 | ||
27 | echo "Creating default GNS protocol numbers" | ||
28 | cd ../gns-protocol-numbers && \ | ||
29 | make >/dev/null && \ | ||
30 | cp gnu_name_system_protocols.h ../../../src/include/ || exit 1 | ||
31 | echo "Creating default GNS service port nummbers" | ||
32 | cd ../gns-service-port-numbers && \ | ||
33 | make >/dev/null && \ | ||
34 | cp gnu_name_system_service_ports.h ../../../src/include/ || exit 1 | ||
35 | |||
36 | # Signatures | ||
37 | echo "Updating GNUnet signatures" | ||
38 | cd ../gnunet-signatures && \ | ||
39 | make >/dev/null && \ | ||
40 | cp gnunet_signatures.h ../../../src/include || exit 1 | ||
41 | # DHT Block Types | ||
42 | echo "Updating DHT record types" | ||
43 | cd ../gnunet-dht-block-types && \ | ||
44 | make >/dev/null && \ | ||
45 | cp gnunet_dht_block_types.h ../../../src/include || exit 1 | ||
46 | echo "Generating GNUnet error types" | ||
47 | cd ../gnunet-error-codes && \ | ||
48 | make >/dev/null && \ | ||
49 | cp gnunet_error_codes.h ../../../src/include && \ | ||
50 | cp gnunet_error_codes.c ../../../src/lib/util || exit 1 | ||
51 | cd $cwd | ||
52 | else | ||
53 | echo "ERROR: No recutils found! Unable to generate recent GANA headers and configs." | ||
54 | exit 1 | ||
55 | fi | ||
56 | echo "GANA finished" | ||
57 | } | ||
58 | |||
59 | gana_update | ||
diff --git a/bin/meson.build b/bin/meson.build new file mode 100644 index 000000000..e98bd2fb3 --- /dev/null +++ b/bin/meson.build | |||
@@ -0,0 +1,16 @@ | |||
1 | binfiles = [ | ||
2 | 'dosubst.awk', | ||
3 | 'grephdr.sh', | ||
4 | 'grepsrc.sh', | ||
5 | 'pogen.sh', | ||
6 | 'rename.sh', | ||
7 | 'gana_update.sh', | ||
8 | 'sphinx_update.sh', | ||
9 | ] | ||
10 | |||
11 | foreach f : binfiles | ||
12 | configure_file(input : f, | ||
13 | output : f, | ||
14 | copy: true) | ||
15 | endforeach | ||
16 | |||
diff --git a/bin/sphinx_update.sh b/bin/sphinx_update.sh new file mode 100755 index 000000000..6d589667c --- /dev/null +++ b/bin/sphinx_update.sh | |||
@@ -0,0 +1,35 @@ | |||
1 | # This is more portable than `which' but comes with | ||
2 | # the caveat of not(?) properly working on busybox's ash: | ||
3 | existence() | ||
4 | { | ||
5 | type "$1" >/dev/null 2>&1 | ||
6 | } | ||
7 | |||
8 | sphinx_update() | ||
9 | { | ||
10 | echo "Updating handbook..." | ||
11 | if existence sphinx-build; then | ||
12 | cwd=$PWD | ||
13 | cd contrib/handbook || exit 1 | ||
14 | if test -e _build; then | ||
15 | make clean | ||
16 | fi | ||
17 | # GNS | ||
18 | make html >/dev/null || exit 1 | ||
19 | if test -e ../../doc/handbook/html; then | ||
20 | rm -r ../../doc/handbook/html || exit 1 | ||
21 | fi | ||
22 | cp -r _build/html ../../doc/handbook/ || exit 1 | ||
23 | if test -e ../../doc/handbook/texinfo; then | ||
24 | rm -r ../../doc/handbook/texinfo || exit 1 | ||
25 | fi | ||
26 | make info >/dev/null || exit 1 | ||
27 | cp -r _build/texinfo ../../doc/handbook/ || exit 1 | ||
28 | cd $cwd | ||
29 | else | ||
30 | echo "ERROR: Sphinx not found! Unable to generate recent documentation." | ||
31 | exit 1 | ||
32 | fi | ||
33 | } | ||
34 | |||
35 | sphinx_update | ||
@@ -79,8 +79,15 @@ 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 | if existence autoreconf; then |
83 | autoreconf -if | ||
84 | elif ! existence meson; then | ||
85 | echo "*** No autoconf or meson installed, please install either ***" | ||
86 | exit 1 | ||
87 | fi | ||
83 | . "bin/pogen.sh" || exit 1 | 88 | . "bin/pogen.sh" || exit 1 |
89 | . "bin/gana_update.sh" || exit 1 | ||
90 | . "bin/sphinx_update.sh" || exit 1 | ||
84 | else | 91 | else |
85 | echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2; | 92 | echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2; |
86 | exit 1 | 93 | exit 1 |
@@ -102,84 +109,6 @@ submodules() | |||
102 | fi | 109 | fi |
103 | } | 110 | } |
104 | 111 | ||
105 | sphinx_update() | ||
106 | { | ||
107 | echo "Updating handbook..." | ||
108 | if existence sphinx-build; then | ||
109 | cwd=$PWD | ||
110 | cd contrib/handbook || exit 1 | ||
111 | if test -e _build; then | ||
112 | make clean | ||
113 | fi | ||
114 | # GNS | ||
115 | make html >/dev/null || exit 1 | ||
116 | if test -e ../../doc/handbook/html; then | ||
117 | rm -r ../../doc/handbook/html || exit 1 | ||
118 | fi | ||
119 | cp -r _build/html ../../doc/handbook/ || exit 1 | ||
120 | if test -e ../../doc/handbook/texinfo; then | ||
121 | rm -r ../../doc/handbook/texinfo || exit 1 | ||
122 | fi | ||
123 | make info >/dev/null || exit 1 | ||
124 | cp -r _build/texinfo ../../doc/handbook/ || exit 1 | ||
125 | cd $cwd | ||
126 | else | ||
127 | echo "ERROR: Sphinx not found! Unable to generate recent documentation." | ||
128 | exit 1 | ||
129 | fi | ||
130 | } | ||
131 | |||
132 | |||
133 | gana_update() | ||
134 | { | ||
135 | if [ ! -z $GNUNET_SKIP_GANA ]; then | ||
136 | echo "Skipping GANA update" | ||
137 | return | ||
138 | fi | ||
139 | echo "Updating GANA..." | ||
140 | if existence recfmt; then | ||
141 | cwd=$PWD | ||
142 | cd contrib/gana || exit 1 | ||
143 | # GNS | ||
144 | echo "Updating GNS record types" | ||
145 | cd gnu-name-system-record-types && \ | ||
146 | make >/dev/null && \ | ||
147 | cp gnu_name_system_record_types.h ../../../src/include/ || exit 1 | ||
148 | echo "Creating default TLDs" | ||
149 | cd ../gnu-name-system-default-tlds && \ | ||
150 | make >/dev/null && \ | ||
151 | cp tlds.conf ../../../src/service/gns || exit 1 | ||
152 | echo "Creating default GNS protocol numbers" | ||
153 | cd ../gns-protocol-numbers && \ | ||
154 | make >/dev/null && \ | ||
155 | cp gnu_name_system_protocols.h ../../../src/include/ || exit 1 | ||
156 | echo "Creating default GNS service port nummbers" | ||
157 | cd ../gns-service-port-numbers && \ | ||
158 | make >/dev/null && \ | ||
159 | cp gnu_name_system_service_ports.h ../../../src/include/ || exit 1 | ||
160 | |||
161 | # Signatures | ||
162 | echo "Updating GNUnet signatures" | ||
163 | cd ../gnunet-signatures && \ | ||
164 | make >/dev/null && \ | ||
165 | cp gnunet_signatures.h ../../../src/include || exit 1 | ||
166 | # DHT Block Types | ||
167 | echo "Updating DHT record types" | ||
168 | cd ../gnunet-dht-block-types && \ | ||
169 | make >/dev/null && \ | ||
170 | cp gnunet_dht_block_types.h ../../../src/include || exit 1 | ||
171 | echo "Generating GNUnet error types" | ||
172 | cd ../gnunet-error-codes && \ | ||
173 | make >/dev/null && \ | ||
174 | cp gnunet_error_codes.h ../../../src/include && \ | ||
175 | cp gnunet_error_codes.c ../../../src/lib/util || exit 1 | ||
176 | cd $cwd | ||
177 | else | ||
178 | echo "ERROR: No recutils found! Unable to generate recent GANA headers and configs." | ||
179 | exit 1 | ||
180 | fi | ||
181 | echo "GANA finished" | ||
182 | } | ||
183 | 112 | ||
184 | install_hooks() | 113 | install_hooks() |
185 | { | 114 | { |
@@ -191,8 +120,6 @@ main() | |||
191 | { | 120 | { |
192 | cleanup | 121 | cleanup |
193 | submodules | 122 | submodules |
194 | gana_update | ||
195 | sphinx_update | ||
196 | check_uncrustify | 123 | check_uncrustify |
197 | check_yapf | 124 | check_yapf |
198 | check_libtool | 125 | check_libtool |
diff --git a/meson-dist-script b/meson-dist-script index eddda1135..6bcf48f9d 100644 --- a/meson-dist-script +++ b/meson-dist-script | |||
@@ -2,34 +2,5 @@ | |||
2 | 2 | ||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | # This is more portable than `which' but comes with | ||
6 | # the caveat of not(?) properly working on busybox's ash: | ||
7 | existence() | ||
8 | { | ||
9 | type "$1" >/dev/null 2>&1 | ||
10 | } | ||
11 | |||
12 | cd "${MESON_DIST_ROOT}" | 5 | cd "${MESON_DIST_ROOT}" |
13 | echo "Updating handbook..." | 6 | . bin/update_sphinx.sh |
14 | if existence sphinx-build; then | ||
15 | cwd=$PWD | ||
16 | cd contrib/handbook || exit 1 | ||
17 | if test -e _build; then | ||
18 | make clean | ||
19 | fi | ||
20 | # GNS | ||
21 | make html >/dev/null || exit 1 | ||
22 | if test -e ../../doc/handbook/html; then | ||
23 | rm -r ../../doc/handbook/html || exit 1 | ||
24 | fi | ||
25 | cp -r _build/html ../../doc/handbook/ || exit 1 | ||
26 | if test -e ../../doc/handbook/texinfo; then | ||
27 | rm -r ../../doc/handbook/texinfo || exit 1 | ||
28 | fi | ||
29 | make info >/dev/null || exit 1 | ||
30 | cp -r _build/texinfo ../../doc/handbook/ || exit 1 | ||
31 | cd $cwd | ||
32 | else | ||
33 | echo "ERROR: Sphinx not found! Unable to generate recent documentation." | ||
34 | exit 1 | ||
35 | fi | ||
diff --git a/meson.build b/meson.build index 65c8165eb..aa9237a31 100644 --- a/meson.build +++ b/meson.build | |||
@@ -445,6 +445,7 @@ configuration_inc = include_directories('.') | |||
445 | 445 | ||
446 | pkg = import('pkgconfig') | 446 | pkg = import('pkgconfig') |
447 | 447 | ||
448 | subdir('bin') | ||
448 | subdir('src') | 449 | subdir('src') |
449 | subdir('doc') | 450 | subdir('doc') |
450 | subdir('contrib') | 451 | subdir('contrib') |