*.o
*~
.git
+.git-module-status
ABOUT-NLS
COPYING
INSTALL
clean-cov:
rm -rf $(top_builddir)/coverage
+MAINTAINERCLEANFILES = .git-module-status
+
# disable this check
distuninstallcheck:
$ git clone git://libvirt.org/libvirt
$ cd libvirt
-The next step is to get and check other files needed to build,
-which are extracted from other source packages:
-
- $ ./bootstrap
-
-Then run this to create e.g., Makefiles and ./configure,
-and to invoke ./configure:
+The next step is to get all required pieces from gnulib,
+to run autoreconf, and to invoke ./configure:
$ ./autogen.sh
echo "to pass any to it, please specify them on the $0 command line."
fi
+# Ensure that whenever we pull in a gnulib update or otherwise change to a
+# different version (i.e., when switching branches), we also rerun ./bootstrap.
+curr_status=.git-module-status
+t=$(git submodule status)
+if test "$t" = "$(cat $curr_status 2>/dev/null)"; then
+ : # good, it's up to date
+else
+ echo running bootstrap...
+ ./bootstrap && echo "$t" > $curr_status
+fi
+
# Automake requires that ChangeLog exist.
touch ChangeLog
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
+
+ifeq (0,$(MAKELEVEL))
+ _curr_status = .git-module-status
+ _update_required := \
+ $(shell t=$$(git submodule status); \
+ test "$$t" = "$$(cat $(_curr_status) 2>/dev/null)"; echo $$?)
+ ifeq (1,$(_update_required))
+ $(error gnulib update required; run ./autogen.sh first)
+ endif
+endif