]> Sergey Matveev's repositories - public-inbox.git/blobdiff - Makefile.PL
build: support eatmydata in "make check" target by default
[public-inbox.git] / Makefile.PL
index 904b6adfc04110b6adbb61f5423739723d4402ec..448c79c36b37b6f2d6abd86d4b20b202d98e8c9f 100644 (file)
@@ -14,8 +14,8 @@ WriteMakefile(
        ABSTRACT => 'public-inbox server infrastructure',
        EXE_FILES => \@EXE_FILES,
        PREREQ_PM => {
-               # note: we use ssoma(1) and spamc(1), NOT the Perl modules
-               # We also depend on git through ssoma.
+               # note: we use spamc(1), NOT the Perl modules
+               # We also depend on git.
                # Keep this sorted and synced to the INSTALL document
                'Date::Parse' => 0,
                'Email::Address' => 0,
@@ -36,6 +36,10 @@ WriteMakefile(
 
 sub MY::postamble {
   <<EOF;
+# support using eatmydata to speed up tests (apt-get install eatmydata):
+# https://www.flamingspork.com/projects/libeatmydata/
+EATMYDATA =
+-include config.mak
 -include Documentation/include.mk
 my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES))
 
@@ -47,7 +51,7 @@ N := \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1)))
 syntax:: \$(my_syntax)
 
 check:: pure_all
-       prove -lv -j\$(N)
+       \$(EATMYDATA) prove -lv -j\$(N)
 
 EOF
 }