[PATCH] maint: detect VPATH builds when checking for gnulib update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I accidentally typed 'make' in the srcdir of a VPATH build, and
was surprised to see this:

$ make
/bin/sh: s/^[ +-]//;s/ .*//: No such file or directory
INFO: gnulib update required; running ./autogen.sh first
make: -n: Command not found
./autogen.sh
I am going to run ./configure with no arguments - if you wish
to pass any to it, please specify them on the ./autogen.sh command line.
running bootstrap...
./bootstrap: Bootstrapping from checked-out libvirt sources...
./bootstrap: getting gnulib files...

Oops - we're trying to execute some fairly bogus command names,
and then trying to configure in-tree (which breaks all existing
VPATH builds, since automake refuses to do a VPATH build if it
detects an in-tree configure).  The third line (executing "-n")
is fixed by updating to the latest gnulib; the rest of the problem
is fixed by copying the same filtering in our cfg.mk as what
gnulib just added, so that we avoid any $(shell) invocations which
in turn depend on variables that are only populated by a working
Makefile.  With that in place, we are back to the much nicer:

$ make
There seems to be no Makefile in this directory.
You must run ./configure before running 'make'.
make: *** [abort-due-to-no-makefile] Error 1

Additionally, although harder to see - there was a trailing space in
the message warning us that autogen would run an in-tree configure.

* .gnulib: Update to latest, in part for maint.mk improvements.
* cfg.mk (_update_required): Don't check for update in
unconfigured directory.
* autogen.sh (no_git): Drop trailing space.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---

Pushing under the gnulib maintenance rule.

* .gnulib e8e0eb6...d55899f (35):
  > maintainer-makefile: delete obsolete code
  > maintainer-makefile: avoid spurious error messages
  > rename: avoid unused-but-set-variable compiler warning
  > maint: add ChangeLog entry missing in previous commit
  > rename: mark a label as potentially unused
  > gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL.
  > acl: apply pure attribute to two functions
  > gnulib-common.m4: add _GL_UNUSED_LABEL
  > dup2, fcntl, fcntl-h: port to AIX 7.1
  > printf, config.rpath: Port to FreeBSD 10.
  > ftoastr: work around compiler bug in IBM xlc 12.1
  > valgrind-tests: fixed misleading help message
  > isfinite, isinf, isnan tests: fix for little-endian PowerPC
  > exclude-tests: port to AIX 7.1
  > pthread_sigmask, timer-time: use gl_THREADLIB only if needed
  > gnulib-tool: wget translations using --no-verbose rather than --quiet
  > gnulib-tool: adjust translation wget to avoid a https redirection
  > getlogin_r-tests: check return value rather than errno
  > getlogin_r-tests: fix various issues in recent change
  > fchdir: port 'open' and 'close' redefinitions to AIX 7.1
  > update from texinfo
  > xalloc: don't potentially generate invalid code for xmemdup calls
  > getlogin_r-tests: avoid false failure under sudo/ssh etc.
  > getlogin-tests: avoid false failure under cron
  > mbrtowc.m4: fix a comment typo
  > mbrlen, mbrtowc: fix bug with empty input
  > doc: document mbrtowc and mbrlen problem with empty input
  > doc: document exec* = spawn+exit bug with non-Cygwin Windows platforms
  > autoupdate
  > getlogin-tests: avoid false failure under sudo/ssh etc.
  > mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc
  > update from texinfo
  > autoupdate
  > autoupdate
  > autoupdate

 .gnulib    | 2 +-
 autogen.sh | 2 +-
 cfg.mk     | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gnulib b/.gnulib
index e8e0eb6..d55899f 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit e8e0eb6bfb728685ec8d5afd924e41b18e9d928d
+Subproject commit d55899fd2c5794ac85ecb14d5e2f646a89e4b4dd
diff --git a/autogen.sh b/autogen.sh
index 5aa1990..1965f64 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -35,7 +35,7 @@ if test -z "$NOCONFIGURE" ; then
     echo "Running ./configure with $EXTRA_ARGS $@"
   else
     if test -z "$*" && test ! -f "$THEDIR/config.status"; then
-        echo "I am going to run ./configure with no arguments - if you wish "
+        echo "I am going to run ./configure with no arguments - if you wish"
         echo "to pass any to it, please specify them on the $0 command line."
     fi
   fi
diff --git a/cfg.mk b/cfg.mk
index 4601b35..b5f1fa2 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -939,6 +939,7 @@ sc_require_locale_h:
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null

+ifneq ($(_gl-Makefile),)
 ifeq (0,$(MAKELEVEL))
   _curr_status = .git-module-status
   # The sed filter accommodates those who check out on a commit from which
@@ -971,6 +972,7 @@ ifeq (0,$(MAKELEVEL))
 maint.mk Makefile: _autogen
   endif
 endif
+endif

 # It is necessary to call autogen any time gnulib changes.  Autogen
 # reruns configure, then we regenerate all Makefiles at once.
@@ -980,7 +982,9 @@ _autogen:
 	./config.status

 # regenerate HACKING as part of the syntax-check
+ifneq ($(_gl-Makefile),)
 syntax-check: $(top_srcdir)/HACKING bracket-spacing-check
+endif

 bracket-spacing-check:
 	$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]