4 use ExtUtils::MakeMaker;
6 # Add a few more targets.
11 install:: extra_install
12 pure_install:: extra_install
14 VER=$(shell perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)
16 PROBABLE_INST_LIB=$(shell \\
17 if [ "$(INSTALLDIRS)" = "perl" ]; then \\
18 echo $(INSTALLPRIVLIB); \\
19 elif [ "$(INSTALLDIRS)" = "site" ]; then \\
20 echo $(INSTALLSITELIB); \\
21 elif [ "$(INSTALLDIRS)" = "vendor" ]; then \\
22 echo $(INSTALLVENDORLIB); \\
26 tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi)
27 extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:Profile"; fi)
29 ikiwiki.out: ikiwiki.in
30 ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
33 extra_build: ikiwiki.out
34 $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -dumpsetup ikiwiki.setup
35 $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup docwiki.setup -refresh
36 ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
37 ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
38 ./mdwn2man ikiwiki-makerepo 1 doc/ikiwiki-makerepo.mdwn > ikiwiki-makerepo.man
39 ./mdwn2man ikiwiki-transition 1 doc/ikiwiki-transition.mdwn > ikiwiki-transition.man
40 ./mdwn2man ikiwiki-update-wikilist 1 doc/ikiwiki-update-wikilist.mdwn > ikiwiki-update-wikilist.man
44 rm -rf html doc/.ikiwiki
45 rm -f *.man ikiwiki.out ikiwiki.setup plugins/*.pyc
49 install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
50 for dir in `cd underlays && find . -follow -type d ! -regex '.*\.svn.*'`; do \
51 install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
52 for file in `find underlays/$$dir -follow -maxdepth 1 -type f`; do \
53 install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
56 for dir in `find templates -follow -type d ! -regex '.*\.svn.*'`; do \
57 install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
58 for file in `find $$dir -follow -maxdepth 1 -type f`; do \
59 install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
63 install -d $(DESTDIR)$(PREFIX)/lib/ikiwiki/plugins
64 for file in `find plugins -maxdepth 1 -type f ! -wholename plugins/.\*`; do \
65 cp -a $$file $(DESTDIR)$(PREFIX)/lib/ikiwiki/plugins; \
68 install -d $(DESTDIR)$(PREFIX)/share/man/man1
69 install -m 644 ikiwiki.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki.1
70 install -m 644 ikiwiki-makerepo.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki-makerepo.1
71 install -m 644 ikiwiki-transition.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki-transition.1
72 install -m 644 ikiwiki-update-wikilist.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki-update-wikilist.1
74 install -d $(DESTDIR)$(PREFIX)/share/man/man8
75 install -m 644 ikiwiki-mass-rebuild.man $(DESTDIR)$(PREFIX)/share/man/man8/ikiwiki-mass-rebuild.8
77 install -d $(DESTDIR)$(PREFIX)/sbin
78 install ikiwiki-mass-rebuild $(DESTDIR)$(PREFIX)/sbin
80 install -d $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
81 install ikiwiki-w3m.cgi $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
83 install -d $(DESTDIR)$(PREFIX)/bin
84 install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki
85 install ikiwiki-makerepo ikiwiki-transition ikiwiki-update-wikilist $(DESTDIR)$(PREFIX)/bin/
87 $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX)
93 PREFIX => "/usr/local",
94 PM_FILTER => './pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB)',
98 'Text::Markdown' => 0,
100 'HTML::Template' => 0,
101 'HTML::Scrubber' => 0,
102 'CGI::FormBuilder' => 3.02.02,
104 'Mail::Sendmail' => 0,
107 'Data::Dumper' => 2.11,