aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-04-10 20:10:47 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-04-10 20:11:33 +0300
commitb6f9ef4232e189b3cae00dadf68336aa3e07f9ad (patch)
tree0fc28b828e7430e71844db4c6bcaceaac42803f2 /contrib
parentd2919a6e7a8874fda287cfc4009f9915e4a26be9 (diff)
downloadlibmicrohttpd-b6f9ef4232e189b3cae00dadf68336aa3e07f9ad.tar.gz
libmicrohttpd-b6f9ef4232e189b3cae00dadf68336aa3e07f9ad.zip
contrib/make-dist.sh: added new helper script
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/make-dist.sh96
1 files changed, 96 insertions, 0 deletions
diff --git a/contrib/make-dist.sh b/contrib/make-dist.sh
new file mode 100755
index 00000000..c84ac2b3
--- /dev/null
+++ b/contrib/make-dist.sh
@@ -0,0 +1,96 @@
1#!/bin/bash
2
3#
4# This file creates dist tarball.
5# Optional autotools patches are applied for better toolchains
6# compatibility.
7#
8# Based on Debian SID baseline files as of April 2023.
9#
10
11if ! grep -Eq -e '^PRETTY_NAME="Debian GNU/Linux 12 \(bookworm\)"$' /etc/os-release
12then
13 echo "Only Debian 'bookworm' is suppoted by this script." >&2
14 exit 1
15fi
16
17if ! autoconf --version | head -1 | grep -Eq -e ' 2\.71$' -
18then
19 echo "The only supported autoconf version is 2.71." >&2
20 exit 1
21fi
22
23
24tooldir=$(dirname $BASH_SOURCE) || exit 2
25test -n "$tooldir" || exit 2
26cd "$tooldir" || exit 2
27tooldir="$PWD" || exit 2
28cd "${tooldir}/.." || exit 2
29rootsrcdir="$PWD" || exit 2
30
31# Cleanup sources
32echo ''
33echo '*** Perfoming initial cleanup...'
34echo ''
35if [[ ! -f 'Makefile' ]] || ! make maintainer-clean
36then
37 # Makefile needed for initial cleanup
38 if [[ ! -f 'Makefile.in' ]] || [[ ! -f 'configure' ]] || ! ./configure || ! make maintainer-clean
39 then
40 rm -f po/Makefile || exit 3
41 # Build 'configure' to build Makefile for initial cleanup
42 autoreconf -fvi || exit 3
43 ./configure || exit 3
44 make maintainer-clean || exit 3
45 fi
46fi
47echo ''
48echo '** Initial cleanup completed.'
49echo ''
50
51# Copy latest autotools files
52echo ''
53echo '*** Copying autotools files...'
54echo ''
55autoreconf -fvi || exit 4
56echo ''
57echo '*** Perfoming intermediate cleanup...'
58echo ''
59./configure || exit 4
60make distclean || exit 4
61rm -f ./configure ./aclocal.m4 || exit 4
62rm -rf ./autom4te.cache || exit 4
63echo ''
64echo '** Initial intermediate completed.'
65echo ''
66
67# Patching local autotools files
68echo ''
69echo '*** Perfoming patching of local autotools files...'
70echo ''
71"$tooldir/fixes-libtool/apply-all.sh" || exit 5
72"$tooldir/fixes-autoconf/apply-all.sh" || exit 5
73echo ''
74echo '** Local autotools files patched.'
75echo ''
76
77# Build the configure and the related files with patches
78echo ''
79echo '*** Building patched configure and related files...'
80echo ''
81autoreconf -v || exit 6
82echo ''
83echo '** Patched build system ready.'
84echo ''
85
86# Build the configure and the related files with patches
87echo ''
88echo '*** Building dist tarball...'
89echo ''
90./configure || exit 7
91make dist || exit 7
92echo ''
93echo '** Dist tarball ready.'
94echo ''
95
96exit 0 \ No newline at end of file