From 7a6e1292928865be110e66020932eba4522b2bf6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 2 Jan 2020 23:29:28 +0000 Subject: build: allow "check" to work in non-git subdirs of worktrees 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index e9e4e2ab..b8c05cf7 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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) -- cgit v1.2.3-24-ge0c7