1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
wikidir = $(docdir)/wiki
#
# NOTE: While constructing the list of files to install,
# we search for symbolic links (-type l) as well as
# regular files (-type f). This is done to facilitate
# out-of-source builds using a tree of symbolic links,
# created, for example, with lndir(1).
#
# Copy wiki into distribution
dist-hook:
@for dir in $$(cd $(srcdir) && find . -type d -print | sed -e's:^\./::' ); do \
$(MKDIR_P) $(distdir)/$$dir; \
list=`(cd $(srcdir)/$$dir && find . -maxdepth 1 \( -type f -o -type l \) \! -name 'Makefile*' \! -name '.gitignore' -print | sed -e 's:^\./::')`; \
for file in $$list; do \
cp -p $(srcdir)/$$dir/$$file $(distdir)/$$dir || exit $$?; \
done; \
done
# Install wiki
install-data-local:
@for dir in $$(cd $(srcdir) && find . -type d -print | sed -e's:^\./::' ); do \
d="$(DESTDIR)$(wikidir)/$$dir"; \
$(MKDIR_P) $$d; \
list=`(cd $(srcdir)/$$dir && find . -maxdepth 1 \( -type f -o -type l \) \! -name 'Makefile*' \! -name '.gitignore' -print | sed -e 's:^\./::')`; \
if test -n "$$list"; then \
echo " ( cd $(srcdir)/$$dir && $(INSTALL_DATA)" $$list "'$$d' )"; \
(cd $(srcdir)/$$dir && $(INSTALL_DATA) $$list "$$d") || exit $$?; \
fi; \
done
# Uninstall wiki
uninstall-local:
@for dir in $$(cd $(srcdir) && find . -type d -print | sed -e's:^\./::' ); do \
d="$(DESTDIR)$(wikidir)/$$dir"; \
list=`(cd $(srcdir)/$$dir && find . -maxdepth 1 \( -type f -o -type l \) \! -name 'Makefile*' \! -name '.gitignore' -print | sed -e 's:^\./::')`; \
if test -n "$$list"; then \
echo " ( cd '$$d' && rm -f" $$list ")"; \
(cd "$$d" && rm -f $$list) || exit $$?; \
fi; \
done
|