]> Sergey Matveev's repositories - public-inbox.git/commitdiff
build: allow "check" to work in non-git subdirs of worktrees
authorEric Wong <e@80x24.org>
Thu, 2 Jan 2020 23:29:28 +0000 (23:29 +0000)
committerEric Wong <e@80x24.org>
Fri, 3 Jan 2020 02:29:10 +0000 (02:29 +0000)
Some people will place the contents of an unpacked tarball
inside another directory controlled by git (e.g. a ports tree
or even git-versioned home directory).  "git ls-files" will
succeed in those cases, so we must check for the existence
of a ".git" dir, instead.

Makefile.PL

index e9e4e2abee9fd8befdb4b1b47245d4f0c41f6d0f..b8c05cf7ea75e99e9522eec65eee6378d41c7cd4 100644 (file)
@@ -167,13 +167,14 @@ changed = \$(shell git ls-files -m)
 dsyn :: \$(addsuffix .syntax, \$(filter \$(changed), \$(syn_files)))
 
 check-manifest :: MANIFEST
-       if git ls-files >\$?.gen 2>&1; then diff -u \$? \$?.gen; fi
+       if test -e .git && git ls-files >\$?.gen 2>&1; then \\
+               diff -u \$? \$?.gen; fi
 
 # the traditional way running per-*.t processes:
 check-each :: pure_all check-manifest
        \$(EATMYDATA) \$(PROVE) --state=save -bvw -j\$(N)
 
-# lightly-tested way to runn tests, relies "--state=save" in check-each
+# lightly-tested way to run tests, relies "--state=save" in check-each
 # for best performance
 check-run :: pure_all check-manifest
        \$(EATMYDATA) \$(PROVE) -bvw t/run.perl :: -j\$(N)