From: Eric Wong Date: Thu, 13 Jun 2019 03:44:41 +0000 (+0000) Subject: Makefile.PL: "dsyn" target to check syntax of changed files X-Git-Tag: v1.2.0~184 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=9bcbfbd478b961786586099af6e6c14775b3827c Makefile.PL: "dsyn" target to check syntax of changed files 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. --- diff --git a/Makefile.PL b/Makefile.PL index 341d42af..113f8c77 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -70,14 +70,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