summaryrefslogtreecommitdiff
path: root/build/makerelease.sh
blob: f2869dfca5edc9e7848a2f99812045afeeb7ad52 (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
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
#!/bin/sh

#
# This script exists primarily to document some of the
# steps needed when building an "official libarchive distribution".
# Feel free to hack it up as necessary to adjust to the peculiarities
# of a particular build environment.
#

PATH=/usr/local/gnu-autotools/bin/:$PATH
export PATH

# Start from one level above the build directory
if [ -f version ]; then
    cd ..
fi

if [ \! -f build/version ]; then
    echo "Can't find source directory"
    exit 1
fi

# BSD make's "OBJDIR" support freaks out the automake-generated
# Makefile.  Effectively disable it.
export MAKEOBJDIRPREFIX=/junk

set -ex

#
# Scrub the local tree before running the build tests below.
#
/bin/sh build/clean.sh

#
# Verify the CMake-generated build
#
mkdir -p _cmtest
cd _cmtest
cmake ..
make
make test
cd ..
rm -rf _cmtest
# TODO: Build distribution using cmake

#
# Construct and verify the autoconf build system
#
export MAKE_LIBARCHIVE_RELEASE="1"
/bin/sh build/autogen.sh

# Get the newest config.guess/config.sub from savannah.gnu.org
curl 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' > build/autoconf/config.guess
curl 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' > build/autoconf/config.sub

./configure
make distcheck
make dist-zip