-extra_install:
- install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/templates
- $(CP) -a templates/* $(DESTDIR)$(PREFIX)/share/ikiwiki/templates
+ # The directive docs become their own special underlay.
+ install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive
+ for file in doc/ikiwiki/directive/*; do \
+ if [ -f "$$file" ]; then \
+ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive; \
+ fi \
+ done
+
+extra_install: underlay_install
+ # Install example sites.
+ for dir in `cd doc/examples; find . -type d ! -regex '.*\.svn.*'`; do \
+ install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$dir; \
+ done
+ for file in `cd doc/examples; find . -type f ! -regex '.*\.svn.*'`; do \
+ cp -aL doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file 2>/dev/null || \
+ install -m 644 doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file; \
+ done