From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 028601F463 for ; Thu, 2 Jan 2020 23:29:29 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] build: allow "check" to work in non-git subdirs of worktrees Date: Thu, 2 Jan 2020 23:29:28 +0000 Message-Id: <20200102232928.17407-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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..c7c661e8 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)