File: Makefile.PL

package info (click to toggle)
dtdparse 2.00-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 352 kB
  • sloc: perl: 6,251; makefile: 4
file content (77 lines) | stat: -rw-r--r-- 1,866 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
use 5.000;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    NAME              => 'SGML::DTDParse',
    ABSTRACT	      => 'Parse SGML and XML DTDs',
    VERSION_FROM      => 'lib/SGML/DTDParse.pm',
    PREREQ_PM         => {
	Text::DelimMatch => 1.05,
	XML::Parser      => 2.25,
	XML::DOM         => 1.43,
	Getopt::Long	 => 0,
    },
    EXE_FILES	      => [qw(
	bin/dtddiff
	bin/dtddiff2html
	bin/dtdflatten
	bin/dtdformat
	bin/dtdparse
    )],
    PMLIBDIRS	      => [ 'lib' ],

    'dist'	      => {
	COMPRESS => 'gzip -9f',
	SUFFIX => 'gz',
    },
);

package MY;

# Add removal of HTML docs to clean target
sub clean {
    my $inherited = shift->SUPER::clean(@_);
    $inherited .= "\t".'$(RM_RF) doc/pod2htm* doc/html example'."\n";
    $inherited;
}

# Create htmldoc target
sub postamble {
    return <<EOT;
MKPATH=\$(PERL) -MExtUtils::Command -e mkpath

htmldoc: _FORCE
	\@echo "Generating HTML docs in docs/html..."
	-\$(MKPATH) doc/html
	\$(PERL) etc/gen-html-doc.pl \\
	    --inroot . \\
	    --outroot doc/html \\
	    --cachedir doc \\
	    --poddir bin \\
	    --poddir lib

example: _FORCE
	-\$(MKPATH) example/dtdparse-dtd \\
	            example/dtdparse-dtd/html \\
	            example/dtdparse-dtd/refentry
	PERL5LIB=lib \$(PERL) bin/dtdparse \\
	    --public-id "-//Norman Walsh//DTD DTDParse V2.0//EN" \\
	    --system-id dtd.dtd \\
	    --title "DTDParse XML DTD" \\
	    --xml \\
	    --output example/dtdparse-dtd/dtd.xml \\
	    etc/dtd.dtd
	PERL5LIB=lib \$(PERL) bin/dtdformat \\
	    --base-dir example/dtdparse-dtd/html \\
	    --html \\
	    example/dtdparse-dtd/dtd.xml
	PERL5LIB=lib \$(PERL) bin/dtdformat \\
	    --base-dir example/dtdparse-dtd/refentry \\
	    --refentry \\
	    example/dtdparse-dtd/dtd.xml

_FORCE:

EOT
}