1 | #------------------------------------------------------------ |
---|
2 | # Makefile for MIME:: |
---|
3 | #------------------------------------------------------------ |
---|
4 | |
---|
5 | # Where to install the libraries: |
---|
6 | SITE_PERL = /usr/lib/perl5 |
---|
7 | |
---|
8 | # What Perl5 is called on your system (no need to give entire path): |
---|
9 | PERL5 = perl |
---|
10 | |
---|
11 | # You probably won't need to change these... |
---|
12 | MODS = Decoder.pm Entity.pm Head.pm Parser.pm Base64.pm QuotedPrint.pm |
---|
13 | SHELL = /bin/sh |
---|
14 | |
---|
15 | #------------------------------------------------------------ |
---|
16 | # For installers... |
---|
17 | #------------------------------------------------------------ |
---|
18 | |
---|
19 | help: |
---|
20 | @echo "Valid targets: test clean install" |
---|
21 | |
---|
22 | clean: |
---|
23 | rm -f testout/* |
---|
24 | |
---|
25 | test: |
---|
26 | # @echo "TESTING Head.pm..." |
---|
27 | # ${PERL5} MIME/Head.pm < testin/first.hdr > testout/Head.out |
---|
28 | # @echo "TESTING Decoder.pm..." |
---|
29 | # ${PERL5} MIME/Decoder.pm < testin/quot-print.body > testout/Decoder.out |
---|
30 | # @echo "TESTING Parser.pm (simple)..." |
---|
31 | # ${PERL5} MIME/Parser.pm < testin/simple.msg > testout/Parser.s.out |
---|
32 | # @echo "TESTING Parser.pm (multipart)..." |
---|
33 | # ${PERL5} MIME/Parser.pm < testin/multi-2gifs.msg > testout/Parser.m.out |
---|
34 | @echo "TESTING Parser.pm (multi_nested.msg)..." |
---|
35 | ${PERL5} MIME/Parser.pm < testin/multi-nested.msg > testout/Parser.n.out |
---|
36 | @echo "All tests passed... see ./testout/MODULE*.out for output" |
---|
37 | |
---|
38 | install: |
---|
39 | @if [ ! -d ${SITE_PERL} ]; then \ |
---|
40 | echo "Please edit the SITE_PERL in your Makefile"; exit -1; \ |
---|
41 | fi |
---|
42 | @if [ ! -w ${SITE_PERL} ]; then \ |
---|
43 | echo "No permission... should you be root?"; exit -1; \ |
---|
44 | fi |
---|
45 | @if [ ! -d ${SITE_PERL}/MIME ]; then \ |
---|
46 | mkdir ${SITE_PERL}/MIME; \ |
---|
47 | fi |
---|
48 | install -m 0644 MIME/*.pm ${SITE_PERL}/MIME |
---|
49 | |
---|
50 | |
---|
51 | #------------------------------------------------------------ |
---|
52 | # For developer only... |
---|
53 | #------------------------------------------------------------ |
---|
54 | |
---|
55 | POD2HTML_FLAGS = --podpath=. --flush --htmlroot=.. |
---|
56 | HTMLS = ${MODS:.pm=.html} |
---|
57 | VPATH = MIME |
---|
58 | |
---|
59 | .SUFFIXES: .pm .pod .html |
---|
60 | |
---|
61 | # v.1.8 generated 30 Apr 96 |
---|
62 | # v.1.9 is only because 1.8 failed CPAN ingestion |
---|
63 | dist: documented |
---|
64 | VERSION=1.9 ; \ |
---|
65 | mkdist -tgz MIME-parser-$$VERSION ; \ |
---|
66 | cp MKDIST/MIME-parser-$$VERSION.tgz ${HOME}/public_html/cpan |
---|
67 | |
---|
68 | documented: ${HTMLS} ${MODS} |
---|
69 | |
---|
70 | .pm.html: |
---|
71 | pod2html ${POD2HTML_FLAGS} \ |
---|
72 | --title=MIME::$* \ |
---|
73 | --infile=$< \ |
---|
74 | --outfile=docs/$*.html |
---|
75 | |
---|
76 | #------------------------------------------------------------ |
---|