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,AWL,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 237101F462 for ; Thu, 13 Jun 2019 03:44:42 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] Makefile.PL: "dsyn" target to check syntax of changed files Date: Thu, 13 Jun 2019 03:44:41 +0000 Message-Id: <20190613034441.5924-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We have lots of files and syntax-checking every single one of them is slow. Enable "perl -w" in the existing syntax check while we're at it. --- Makefile.PL | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index b1274ad..1006d27 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -57,14 +57,17 @@ N = \$\$(( \$\$(nproc 2>/dev/null || gnproc 2>/dev/null || echo 2) + 1 )) -include config.mak -include Documentation/include.mk SCRIPTS := scripts/ssoma-replay -my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES) \$(SCRIPTS)) - +syn_files := $PM_FILES \$(EXE_FILES) \$(SCRIPTS) +my_syntax := \$(addsuffix .syntax, \$(syn_files)) +changed = \$(shell git ls-files -m) %.syntax :: - @\$(PERL) -I lib -c \$(subst .syntax,,\$@) + @\$(PERL) -w -I lib -c \$(subst .syntax,,\$@) syntax:: \$(my_syntax) +dsyn :: \$(addsuffix .syntax, \$(filter \$(changed), \$(syn_files))) + check-manifest :: MANIFEST if git ls-files >\$?.gen 2>&1; then diff -u \$? \$?.gen; fi -- EW