Fix to support git worktree.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 13 Jan 2016 08:22:37 +0000 (17:22 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 13 Jan 2016 08:22:37 +0000 (17:22 +0900)
* autogen.sh, Makefile.am, doc/Makefile.am: Use -e for testing .git.

--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Makefile.am
autogen.sh
doc/Makefile.am

index 8e213f3..8bff2ef 100644 (file)
@@ -120,7 +120,7 @@ endif
 gen_start_date = 2011-12-01T06:00:00
 .PHONY: gen-ChangeLog
 gen-ChangeLog:
-       if test -d $(top_srcdir)/.git; then                             \
+       if test -e $(top_srcdir)/.git; then                             \
          (cd $(top_srcdir) &&                                          \
            $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
            --amend=build-aux/git-log-fix                               \
index 3fe24ea..7d843bd 100755 (executable)
@@ -214,7 +214,7 @@ if [ "$myhost" = "find-version" ]; then
     esac
 
     beta=no
-    if [ -d .git ]; then
+    if [ -e .git ]; then
       ingit=yes
       tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
       if [ -n "$tmp" ]; then
index 5449d07..a1a570c 100644 (file)
@@ -136,7 +136,7 @@ dist-hook: defsincdate
 
 defsincdate: $(gnupg_TEXINFOS)
        : >defsincdate ; \
-       if test -d $(top_srcdir)/.git; then \
+       if test -e $(top_srcdir)/.git; then \
          (cd $(srcdir) && git log -1 --format='%ct' \
                -- $(gnupg_TEXINFOS) 2>/dev/null) >>defsincdate; \
        fi