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 [ "$$NOTAINT" != 0 ]; then printf -- "-T"; fi)
27 extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-MDevel::Profiler"; fi)
29 ikiwiki.out: ikiwiki.in
30 ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
33 extra_build: ikiwiki.out
34 LANG= perl -I. $(extramodules) $(tflag) ikiwiki.out doc html --templatedir=templates \
35 --underlaydir=basewiki --nousedirs\
36 --wikiname="ikiwiki" --verbose \
37 --exclude=/discussion --no-discussion --userdir=users \
39 --plugin=haiku --plugin=polygen --plugin=fortune
40 ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
41 ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
43 if [ "$$PROFILE" = 1 ]; then dprofpp; fi
46 rm -rf html doc/.ikiwiki
47 rm -f ikiwiki.man ikiwiki-mass-rebuild.man ikiwiki.out
51 install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
52 for dir in `find basewiki templates -follow -type d ! -regex '.*\.svn.*'`; do \
53 install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
54 for file in `find $$dir -follow -maxdepth 1 -type f`; do \
55 install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
59 install -d $(DESTDIR)$(PREFIX)/lib/ikiwiki/plugins
60 for file in `find plugins -maxdepth 1 -type f`; do \
61 install -m 755 $$file $(DESTDIR)$(PREFIX)/lib/ikiwiki/plugins; \
64 install -d $(DESTDIR)$(PREFIX)/share/man/man1
65 install -m 644 ikiwiki.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki.1
67 install -d $(DESTDIR)$(PREFIX)/share/man/man8
68 install -m 644 ikiwiki-mass-rebuild.man $(DESTDIR)$(PREFIX)/share/man/man8/ikiwiki-mass-rebuild.8
70 install -d $(DESTDIR)$(PREFIX)/sbin
71 install ikiwiki-mass-rebuild $(DESTDIR)$(PREFIX)/sbin
73 install -d $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
74 install ikiwiki-w3m.cgi $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
76 install -d $(DESTDIR)$(PREFIX)/bin
77 install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki
79 $(MAKE) -C po install PREFIX=$(PREFIX)
85 PREFIX => "/usr/local",
86 PM_FILTER => './pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB)',
90 'Text::Markdown' => 0,
92 'HTML::Template' => 0,
93 'HTML::Scrubber' => 0,
94 'CGI::FormBuilder' => 3.02.02,
95 'Time::Duration' => 0,
97 'Mail::Sendmail' => 0,