[PATCH] build: fix incremental autogen.sh when no AUTHORS is present

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

 



Commit 71d1256 tried to fix a problem where rebasing an old
branch on top of newer libvirt.git resulted in automake failing
because of a missing AUTHORS file.  However, while the fix
worked for an incremental 'make', it did not work for someone
that directly reran './autogen.sh'.  Reported by Laine Stump.

* autogen.sh (autoreconf): Check for same conditions as cfg.mk.
* cfg.mk (_update_required): Add comments.
---
 autogen.sh |    3 ++-
 cfg.mk     |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 126b272..d4957f1 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -69,14 +69,15 @@ if test -d .git; then
         *:set) ;;
         *-dirty*)
             echo "error: gnulib submodule is dirty, please investigate" 2>&1
             echo "set env-var CLEAN_SUBMODULE to discard gnulib changes" 2>&1
             exit 1 ;;
     esac
+    # Keep this test in sync with cfg.mk:_update_required
     if test "$t" = "$(cat $curr_status 2>/dev/null)" \
-        && test -f "po/Makevars"; then
+        && test -f "po/Makevars" && test -f AUTHORS; then
         # good, it's up to date, all we need is autoreconf
         autoreconf -if
     else
         if test ${CLEAN_SUBMODULE+set}; then
             echo cleaning up submodules...
             git submodule foreach 'git clean -dfqx && git reset --hard'
diff --git a/cfg.mk b/cfg.mk
index ec4ab1c..c4ae195 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -688,12 +688,14 @@ ifeq (0,$(MAKELEVEL))
   # in column 1 and does not print a "git describe"-style string after the
   # submodule name.  Contrast these:
   # -b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib
   #  b653eda3ac4864de205419d9f41eec267cb89eeb .gnulib (v0.0-2286-gb653eda)
   # $ cat .git-module-status
   # b653eda3ac4864de205419d9f41eec267cb89eeb
+  #
+  # Keep this logic in sync with autogen.sh.
   _submodule_hash = sed 's/^[ +-]//;s/ .*//'
   _update_required := $(shell						\
       cd '$(srcdir)';							\
       test -d .git || { echo 0; exit; };				\
       test -f po/Makevars || { echo 1; exit; };				\
       test -f AUTHORS || { echo 1; exit; };				\
-- 
1.7.1

--
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]