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)
30 ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
32 LANG=C perl -I. $(extramodules) $(tflag) ikiwiki.out doc html --templatedir=templates \
33 --underlaydir=basewiki \
34 --wikiname="ikiwiki" --verbose \
35 --exclude=/discussion --no-discussion --userdir=users \
37 --plugin=haiku --plugin=polygen --plugin=fortune
38 ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
39 ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
41 if [ "$$PROFILE" = 1 ]; then dprofpp; fi
44 rm -rf html doc/.ikiwiki
45 rm -f ikiwiki.man ikiwiki-mass-rebuild.man ikiwiki.out tmon.out
49 install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
50 find basewiki templates \( -type f -or -type l \) ! -regex '.*\.svn.*' \
51 -exec cp --parents -aL {} $(DESTDIR)$(PREFIX)/share/ikiwiki \;
53 install -d $(DESTDIR)$(PREFIX)/share/man/man1
54 install -m 644 ikiwiki.man $(DESTDIR)$(PREFIX)/share/man/man1/ikiwiki.1
56 install -d $(DESTDIR)$(PREFIX)/share/man/man8
57 install -m 644 ikiwiki-mass-rebuild.man $(DESTDIR)$(PREFIX)/share/man/man8/ikiwiki-mass-rebuild.8
59 install -d $(DESTDIR)$(PREFIX)/sbin
60 install ikiwiki-mass-rebuild $(DESTDIR)$(PREFIX)/sbin
62 install -d $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
63 install ikiwiki-w3m.cgi $(DESTDIR)$(PREFIX)/lib/w3m/cgi-bin
65 install -d $(DESTDIR)$(PREFIX)/bin
66 install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki
68 $(MAKE) -C po install PREFIX=$(PREFIX)
74 PREFIX => "/usr/local",
75 PM_FILTER => './pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB)',
79 'Text::Markdown' => 0,
81 'HTML::Template' => 0,
82 'HTML::Scrubber' => 0,
83 'CGI::FormBuilder' => 3.02.02,
84 'Time::Duration' => 0,
86 'Mail::Sendmail' => 0,