+ ./mdwn2man ikiwiki-makerepo 1 doc/ikiwiki-makerepo.mdwn > ikiwiki-makerepo.man
+ ./mdwn2man ikiwiki-transition 1 doc/ikiwiki-transition.mdwn > ikiwiki-transition.man
+ ./mdwn2man ikiwiki-update-wikilist 1 doc/ikiwiki-update-wikilist.mdwn > ikiwiki-update-wikilist.man
+ ./mdwn2man ikiwiki-calendar 1 doc/ikiwiki-calendar.mdwn > ikiwiki-calendar.man
+ ./mdwn2man ikiwiki-comment 1 doc/ikiwiki-comment.mdwn > ikiwiki-comment.man
+ $(MAKE) -C po
+ $(PERL) -pi.bkp -e "s/Version:.*/Version: $(VER)/" ikiwiki.spec
+ rm -f ikiwiki.spec.bkp
+
+docwiki:
+ $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --refresh
+
+perl_shebangs:
+ifneq "$(PERL)" "/usr/bin/perl"
+ for file in $(shebang_scripts); do \
+ $(PERL) -pe "s|^#!/usr/bin/perl\b|#!$(PERL)| if 1" < $$file > "$$file.new"; \
+ [ -x $$file ] && chmod +x "$$file.new"; \
+ mv -f "$$file.new" $$file; \
+ done
+endif
+
+perl_shebangs_clean:
+ifneq "$(PERL)" "/usr/bin/perl"
+ for file in $(shebang_scripts); do \
+ $(PERL) -pe "s|^#!$(PERL)\b|#!/usr/bin/perl| if 1" < $$file > "$$file.new"; \
+ [ -x $$file ] && chmod +x "$$file.new"; \
+ mv -f "$$file.new" $$file; \
+ done
+endif
+
+sysconfdir:
+ $(PERL) -pi -e "s|\"/etc/ikiwiki|\"$(SYSCONFDIR)|g" $(sysconfdir_scripts)
+
+extra_clean: perl_shebangs_clean
+ $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.in --setup docwiki.setup --clean
+ rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc
+ $(MAKE) -C po clean
+
+# Joey uses this before committing.
+myclean: clean
+ git checkout po ikiwiki.spec
+
+underlay_install:
+ install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
+ for dir in `cd underlays && $(FIND) . -follow -type d`; do \
+ install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
+ for file in `$(FIND) underlays/$$dir -follow -maxdepth 1 -type f ! -name jquery.js ! -name jquery-ui.css ! -name jquery-ui.js ! -name jquery.tmpl.js`; do \
+ cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir 2>/dev/null || \
+ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
+ done; \
+ done