-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·65 lines (53 loc) · 2.15 KB
/
autogen.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
#!/bin/sh
# Bootstrap script for AUCTeX
# Maintainer: auctex-devel@gnu.org
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is part of AUCTeX.
# AUCTeX is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# AUCTeX is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with AUCTeX; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
test "x${AUTOCONF}" != x || AUTOCONF=autoconf
test "x${MAKEINFO}" != x || MAKEINFO=makeinfo
test "x${PDFTEX}" != x || PDFTEX=pdftex
test "x${PERL}" != x || PERL=perl
test "x${MAKE}" != x || MAKE=make
${AUTOCONF} || { echo "Error running ${AUTOCONF} in ." >&2 ; exit 1; }
rm -rf autom4te.cache
if test "x${AUCTEXDATE}" = x
then
AUCTEXDATE=`git log -1 --date=short --format=%cd 2> /dev/null`
if test "X${AUCTEXDATE}" = X
then
echo "Can't find date with git, trying with ChangeLog.1..." >&2
AUCTEXDATE=`LC_ALL=C sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' ChangeLog.1`
test "X${AUCTEXDATE}" != X || { echo "Can't find date in ChangeLog.1" >&2 ; exit 1; }
fi
fi
if test "x${AUCTEXVERSION}" = x
then
if git describe --tags >/dev/null 2> /dev/null
then
if test "X`git describe --tags | sed 's/release_.._..//'`" = X
then
AUCTEXVERSION=`git describe --tags`
else
AUCTEXVERSION=${AUCTEXDATE}
fi
else
AUCTEXVERSION=`sed -n '2,/^[0-9]/s/.*Version \(.*\) released\..*/\1/p' ChangeLog.1`
test "X${AUCTEXVERSION}" != X || AUCTEXVERSION=${AUCTEXDATE}
fi
fi
cd doc
rm -f version.texi
${MAKE} -f Makefile.in MAKEINFO="${MAKEINFO}" PDFTEX="${PDFTEX}" PERL="$PERL" AUCTEXDATE="$AUCTEXDATE" AUCTEXVERSION="$AUCTEXVERSION" dist || { echo "Error running ${MAKE} in doc" >&2 ; exit 1; }
cd ..