2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir
=.
10 test -f src
/libvirt.c ||
{
11 echo "You must run this script in the top-level libvirt directory"
17 if test "x$1" = "x--system"; then
19 EXTRA_ARGS
="--prefix=/usr --sysconfdir=/etc --localstatedir=/var"
20 echo "Running ./configure with $EXTRA_ARGS $@"
22 if test -z "$*" && test ! -f "$THEDIR/config.status"; then
23 echo "I am going to run ./configure with no arguments - if you wish "
24 echo "to pass any to it, please specify them on the $0 command line."
28 # Compute the hash we'll use to determine whether rerunning bootstrap
29 # is required. The first is just the SHA1 that selects a gnulib snapshot.
30 # The second ensures that whenever we change the set of gnulib modules used
31 # by this package, we rerun bootstrap to pull in the matching set of files.
34 git submodule status |
sed 's/^[ +-]//;s/ .*//'
35 git hash-object bootstrap.conf
38 # Ensure that whenever we pull in a gnulib update or otherwise change to a
39 # different version (i.e., when switching branches), we also rerun ./bootstrap.
40 # Also, running 'make rpm' tends to litter the po/ directory, and some people
41 # like to run 'git clean -x -f po' to fix it; but only ./bootstrap regenerates
42 # the required file po/Makevars.
43 curr_status
=.git-module-status
44 t
=$
(bootstrap_hash
; git
diff .gnulib
)
45 if test "$t" = "$(cat $curr_status 2>/dev/null)" \
46 && test -f "po/Makevars"; then
47 # good, it's up to date, all we need is autoreconf
50 echo running bootstrap...
51 .
/bootstrap
&& bootstrap_hash
> $curr_status \
52 ||
{ echo "Failed to bootstrap, please investigate."; exit 1; }
57 if test "x$OBJ_DIR" != x
; then
62 if test -z "$*" && test -f config.status
; then
63 .
/config.status
--recheck
65 $srcdir/configure
$EXTRA_ARGS "$@"
68 echo "Now type 'make' to compile libvirt."