use 5.008004;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'SWISH::Split',
    VERSION_FROM      => 'Split.pm', # finds $VERSION
    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
      (ABSTRACT_FROM  => 'Split.pm', # retrieve abstract from module
       AUTHOR         => 'Dobrica Pavlinusic <dpavlin@rot13.org>') : ()),
    depend => {
	   dist => 'changelog',
    },
);

sub MY::postamble {
	return <<'MAKE_MORE';

HTML_DIR=pod2html

html: $(TO_INST_PM)
	test -e $(HTML_DIR) || mkdir $(HTML_DIR)
	ls $(MAN1PODS) $(MAN3PODS) | cut -d. -f1 | xargs -i sh -c "pod2html --infile {}.p[lm] --outfile $(HTML_DIR)/{}.html --htmldir $(HTML_DIR)"
	rm -f pod2htm?.tmp
	test ! -z "`which svn2html.pl`" && svn update && svn2html.pl > $(HTML_DIR)/Changes.html

changelog:
	svn update && svn -v log > Changes

tags:
	ctags *.p?

MAKE_MORE
}
