summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: 413083b48a67fa918638402b269501bd214b8fa4 (plain)
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
#!/bin/sh

# "autoreconf -f" will clobber our INSTALL file with a generic one if we
# don't move it out of the way.

# EXIT and signals that correspond to SIGHUP, SIGINT, SIGQUIT and SIGTERM.
signals="0 1 2 3 15"

cleanup()
{
  trap '' $signals
  if [ -f INSTALL.$$.tmp ]; then
    echo "$0: restoring the INSTALL file" >&2
    mv -f INSTALL.$$.tmp INSTALL
  fi
}

rm -f INSTALL.$$.tmp
trap cleanup $signals
mv -f INSTALL INSTALL.$$.tmp

autoreconf -v -f -i -W all
status=$?

rm -rf autom4te.cache

exit $status