Merge branch 'rtoy-html-support-external-docs'
[maxima.git] / common-info.mk
blobbe6095787866d37a0e4b1b38b4bbdda0ea8fd810
1 # Installation/uninstallation and distribution for .html files.
2 # infoname -- info base name (e.g. maxima or xmaxima)
3 # infodir -- info installation directory
4 # langsdir -- info installation subdirectory
6 install-data-local: install-maxima-info
7 install-maxima-info: $(wildcard $(infoname).info* $(infoname)-index.lisp)
8 @d=$(DESTDIR)$(infodir)$(langsdir); \
9 test -d $$d && $(mkinstalldirs) $$d; \
10 list="$^"; for p in $$list; do \
11 b=$${p#$(builddir)/}; \
12 s=$${p#$(srcdir)/}; \
13 if test -f $(builddir)/$$b; then \
14 t=`dirname $$d/$$b`; \
15 test -d $$t || $(mkinstalldirs) $$t; \
16 echo " $(INSTALL_DATA) BUILDDIR/$$b $$d/$$b"; \
17 $(INSTALL_DATA) $(builddir)/$$b $$d/$$b; \
18 elif test -f $(srcdir)/$$s; then \
19 t=`dirname $$d/$$s`; \
20 test -d $$t || $(mkinstalldirs) $$t; \
21 echo " $(INSTALL_DATA) SRCDIR/$$s $$d/$$s"; \
22 $(INSTALL_DATA) $(srcdir)/$$s $$d/$$s; \
23 elif test -f $$p; then \
24 t=`dirname $$d/$$p`; \
25 test -d $$t || $(mkinstalldirs) $$t; \
26 echo " $(INSTALL_DATA) $$p $$d/$$p"; \
27 $(INSTALL_DATA) $$p $$d/$$p; \
28 fi; \
29 done
31 uninstall-local: uninstall-maxima-info
32 uninstall-maxima-info:
33 rm -f $(DESTDIR)$(infodir)$(langsdir)/$(infoname).info*
34 rm -f $(DESTDIR)$(infodir)$(langsdir)/$(infoname)-index.lisp
36 dist-hook: dist-maxima-info
37 dist-maxima-info:
38 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
39 list="$(infoname).info*" ; \
40 for p in $$list; do \
41 f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`; \
42 test -f $(distdir)/$$f || cp -p $(builddir)/$$f $(distdir)/$$f; \
43 done