unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [ssoma PATCH 0/2] minor build fixes
@ 2016-03-03  3:38 Eric Wong
  2016-03-03  3:38 ` [PATCH 1/2] move scripts to script/ directory Eric Wong
  2016-03-03  3:38 ` [PATCH 2/2] build: make syntax check target Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2016-03-03  3:38 UTC (permalink / raw)
  To: meta

Eric Wong (2):
      move scripts to script/ directory
      build: make syntax check target

 MANIFEST                      |  7 ++++---
 Makefile.PL                   | 20 ++++++++++++++++----
 ssoma => script/ssoma         |  0
 ssoma-mda => script/ssoma-mda |  0
 ssoma-rm => script/ssoma-rm   |  0
 5 files changed, 20 insertions(+), 7 deletions(-)
 rename ssoma => script/ssoma (100%)
 rename ssoma-mda => script/ssoma-mda (100%)
 rename ssoma-rm => script/ssoma-rm (100%)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] move scripts to script/ directory
  2016-03-03  3:38 [ssoma PATCH 0/2] minor build fixes Eric Wong
@ 2016-03-03  3:38 ` Eric Wong
  2016-03-03  3:38 ` [PATCH 2/2] build: make syntax check target Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-03-03  3:38 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

This seems to match more closely with what is expected of Perl
packages based on how blib is used.  Hopefully makes the top-level
source tree less cluttered and things easier-to-find.
---
 MANIFEST                      | 7 ++++---
 Makefile.PL                   | 2 +-
 ssoma => script/ssoma         | 0
 ssoma-mda => script/ssoma-mda | 0
 ssoma-rm => script/ssoma-rm   | 0
 5 files changed, 5 insertions(+), 4 deletions(-)
 rename ssoma => script/ssoma (100%)
 rename ssoma-mda => script/ssoma-mda (100%)
 rename ssoma-rm => script/ssoma-rm (100%)

diff --git a/MANIFEST b/MANIFEST
index ebfbe09..f610ad8 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,5 +1,6 @@
 .gitignore
 COPYING
+Documentation/.gitignore
 Documentation/include.mk
 Documentation/ssoma-mda.pod
 Documentation/ssoma-rm.pod
@@ -16,9 +17,9 @@ lib/Ssoma/GitIndexInfo.pm
 lib/Ssoma/IMAP.pm
 lib/Ssoma/MDA.pm
 lib/Ssoma/Remover.pm
-ssoma
-ssoma-mda
-ssoma-rm
+script/ssoma
+script/ssoma-mda
+script/ssoma-rm
 t/all.t
 t/extractor.t
 t/git.t
diff --git a/Makefile.PL b/Makefile.PL
index 6316423..bf30ad0 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -11,7 +11,7 @@ WriteMakefile(
 	VERSION => '0.1.0',
 	AUTHOR => 'Eric Wong <e@80x24.org>',
 	ABSTRACT => 'some sort of mail archiver',
-	EXE_FILES => [qw/ssoma-mda ssoma ssoma-rm/],
+	EXE_FILES => [ map { "script/$_" } qw/ssoma-mda ssoma ssoma-rm/],
 	PREREQ_PM => {
 		# Keep this sorted and synced to the INSTALL document
 		'Digest::SHA' => 0,
diff --git a/ssoma b/script/ssoma
similarity index 100%
rename from ssoma
rename to script/ssoma
diff --git a/ssoma-mda b/script/ssoma-mda
similarity index 100%
rename from ssoma-mda
rename to script/ssoma-mda
diff --git a/ssoma-rm b/script/ssoma-rm
similarity index 100%
rename from ssoma-rm
rename to script/ssoma-rm
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] build: make syntax check target
  2016-03-03  3:38 [ssoma PATCH 0/2] minor build fixes Eric Wong
  2016-03-03  3:38 ` [PATCH 1/2] move scripts to script/ directory Eric Wong
@ 2016-03-03  3:38 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-03-03  3:38 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

This can be useful for quickly checking for syntax errors
and warnings without running the full test suite
---
 Makefile.PL | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index bf30ad0..2a7a6e7 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,12 +6,16 @@
 # so don't depend on any public Perl API
 use strict;
 use ExtUtils::MakeMaker;
+my @EXE_FILES = split("\n", `git ls-files 'script/' 2>/dev/null`);
+my $PM_FILES = `git ls-files lib '*.pm' 2>/dev/null`;
+$PM_FILES =~ tr/\n/ /;
+
 WriteMakefile(
 	NAME => 'ssoma',
 	VERSION => '0.1.0',
 	AUTHOR => 'Eric Wong <e@80x24.org>',
 	ABSTRACT => 'some sort of mail archiver',
-	EXE_FILES => [ map { "script/$_" } qw/ssoma-mda ssoma ssoma-rm/],
+	EXE_FILES => \@EXE_FILES,
 	PREREQ_PM => {
 		# Keep this sorted and synced to the INSTALL document
 		'Digest::SHA' => 0,
@@ -25,11 +29,19 @@ WriteMakefile(
 );
 
 sub MY::postamble {
-  <<'EOF';
+  <<EOF;
 -include Documentation/include.mk
-N = $(shell echo $$(( $$(nproc 2>/dev/null || echo 2) + 1)))
+N := \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1)))
+my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES))
+
+%.syntax ::
+	@\$(PERL) -I lib -c \$(subst .syntax,,\$@)
+
+syntax:: \$(my_syntax)
+
+
 check:: pure_all
-	prove -lv -j$(N)
+	prove -lv -j\$(N)
 
 EOF
 }
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-03  3:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03  3:38 [ssoma PATCH 0/2] minor build fixes Eric Wong
2016-03-03  3:38 ` [PATCH 1/2] move scripts to script/ directory Eric Wong
2016-03-03  3:38 ` [PATCH 2/2] build: make syntax check target Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).