diff --git a/Changes b/Changes index bc8b8f3..6f929f6 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for pmarkdown and the Markdown::Perl module. +1.04 - 2024-05-09 + + - Remove our custom make targets on platforms that don’t have GNU Make to + avoid parse failures. + 1.03 - 2024-04-10 - Disable hard line breaks using two spaces in our default syntax because they diff --git a/Makefile.PL b/Makefile.PL index 4387432..03b9854 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -45,14 +45,22 @@ WriteMakefile( clean => { FILES => 'Markdown-Perl-*' }, ); +# These platforms (usually) have GNU Make by default so the syntax that we use +# for our custom targets below will work (especially to export environment +# variables). +# On other platforms, we disable the custom parts of our Makefile generation, as +# the generated Makefile would otherwise not parse correctly. +sub supported_platform { + return $^O =~ m/^(?:linux|cygwin|MSWin32)$/; +} + sub MY::postamble { my ($self) = @_; my @postamble; push @postamble, ::postamble() if *::postamble{CODE}; - # Solaris has a weird (?) make that does not support our `export` statements. - push @postamble, <<"MAKE_FRAGMENT" unless $^O eq 'solaris'; + push @postamble, <<"MAKE_FRAGMENT" if supported_platform(); ALL_PM := \$(shell find lib -name "*.pm") ALL_EXE := script/pmarkdown @@ -79,6 +87,8 @@ spelling: export EXTENDED_TESTING = 1 spelling: \t\$(PERLRUN) t/001-spelling.t --interactive +test: export HARNESS_OPTIONS = j8:c + alltest: export EXTENDED_TESTING = 1 alltest: test @@ -127,7 +137,7 @@ MAKE_FRAGMENT # End of the template. You can add custom content below this line. sub postamble { - return if $^O eq 'solaris'; + return unless supported_platform(); return <<"EOF"; profile: \t-perl -Ilib -d:NYTProf t/900-cmark-test-suite.t --fast @@ -139,8 +149,6 @@ clean:: clean_nytprof clean_nytprof: \trm -fr nytprof nytprof.out -test: export HARNESS_OPTIONS = j8:c - fuzzing: export MAXI_TEST = 1 fuzzing: \tperl -Ilib t/801-fuzzing.t diff --git a/dist_setup.conf b/dist_setup.conf index 506716f..b08add0 100644 --- a/dist_setup.conf +++ b/dist_setup.conf @@ -9,6 +9,8 @@ exe_files => ['script/pmarkdown'], min_perl_version => '5.026', + test_harness_options => 'j8:c', + author => { name => 'Mathias Kende', email => 'mathias@cpan.org', diff --git a/lib/App/pmarkdown.pm b/lib/App/pmarkdown.pm index 8be66e7..36ec3ae 100644 --- a/lib/App/pmarkdown.pm +++ b/lib/App/pmarkdown.pm @@ -5,7 +5,7 @@ use warnings; use Markdown::Perl; -our $VERSION = '1.03'; # Remember to also set the Markdown::Perl version. +our $VERSION = '1.04'; # Remember to also set the Markdown::Perl version. 1; diff --git a/lib/Markdown/Perl.pm b/lib/Markdown/Perl.pm index c5b0cf4..42dfcad 100644 --- a/lib/Markdown/Perl.pm +++ b/lib/Markdown/Perl.pm @@ -17,7 +17,7 @@ use Scalar::Util 'blessed'; use parent 'Markdown::Perl::Options'; -our $VERSION = '1.03'; # Remember to also set the App::pmarkdown version. +our $VERSION = '1.04'; # Remember to also set the App::pmarkdown version. our @EXPORT_OK = qw(convert set_options); our %EXPORT_TAGS = (all => \@EXPORT_OK);