-extra_build:
- ./ikiwiki.pl doc html --templatedir=templates --underlaydir=basewiki \
- --wikiname="ikiwiki" --verbose --no-rcs \
- --exclude=/discussion --no-discussion \
- --plugin=brokenlinks --plugin=pagecount \
- --plugin=orphans --plugin=haiku --plugin=meta \
- --plugin=tag --plugin=polygen --plugin=pagestats \
- --plugin=fortune --plugin=aggregate --plugin=map \
- --plugin=template --plugin=toc --plugin=shortcut
+PROBABLE_INST_LIB=$(shell \\
+ if [ "$(INSTALLDIRS)" = "perl" ]; then \\
+ echo $(INSTALLPRIVLIB); \\
+ elif [ "$(INSTALLDIRS)" = "site" ]; then \\
+ echo $(INSTALLSITELIB); \\
+ elif [ "$(INSTALLDIRS)" = "vendor" ]; then \\
+ echo $(INSTALLVENDORLIB); \\
+ fi \\
+)
+
+# Additional configurable path variables.
+W3M_CGI_BIN?=$(PREFIX)/lib/w3m/cgi-bin
+
+tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi)
+extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:Profile"; fi)
+
+ikiwiki.out: ikiwiki.in
+ ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out
+ chmod +x ikiwiki.out
+
+ikiwiki.setup: ikiwiki.out
+ HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -dumpsetup ikiwiki.setup
+
+extra_build: ikiwiki.out ikiwiki.setup docwiki