From: Gilles Darold Date: Sat, 14 Sep 2019 13:47:42 +0000 (+0200) Subject: Do not fail if pod2markdown is not installed X-Git-Tag: v11.1~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61a8cc7843659f04e3ce62fef6dcd9597f6fc4d1;p=pgbadger Do not fail if pod2markdown is not installed --- diff --git a/Makefile.PL b/Makefile.PL index 313730c..38c1e34 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -37,12 +37,16 @@ if ($ExtUtils::MakeMaker::VERSION >= 6.46) { sub MY::postamble { return <<'EOMAKE'; +USE_MARKDOWN=$(shell which pod2markdown) + README: doc/pgBadger.pod pod2text $^ > $@ +ifneq ("$(USE_MARKDOWN)", "") cat doc/pgBadger.pod | grep "=head1 " | sed 's/^=head1 \(.*\)/- [\1](#\1)/' | sed 's/ /-/g' | sed 's/--/- /' > $@.md sed -i '1s/^/### TABLE OF CONTENTS\n\n/' $@.md echo >> $@.md pod2markdown $^ | sed 's/^# /### /' >> $@.md +endif .INTERMEDIATE: doc/synopsis.pod doc/synopsis.pod: Makefile pgbadger