Debian Codegraph @

bootstrap

raw
1 #!/bin/sh
2 #
3 # bootstrap - update generated files
4 # Copyright (C) 2015-2021 Alex Vong <alexvong1995 AT protonmail DOT com>
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # Process this file with autoconf to produce a configure script.
20
21 # use error
22 set -e
23
24 # Obtain DIRNAME by tranforming `foo/bar' to `foo'
25 # Otherwise, assume it is the current working directory
26 case "$0" in
27 */*)
28 DIRNAME=`expr "x$0" : 'x\(.*\)/[^/]*'`
29 ;;
30 *)
31 DIRNAME='./'
32 ;;
33 esac
34
35 # change to the directory of this script
36 cd "$DIRNAME"
37
38 # generate .debian/copyright
39 cp COPYING .debian/copyright
40
41 # generate man page
42 doc/manpage.pl > doc/mlucas.1
43
44 # generate Makefile.am
45 SRCS=`printf '%s ' upstream/src/*`
46 sed -e "s,[@]SRCS[@],$SRCS,g" < Makefile.am.in > Makefile.am
47
48 # invoke autotools
49 autoreconf -vfi
50
51 # patch configure script
52 printf '%s\n' "$(sed '/#define VERSION/d' configure)" > configure