Examples cleanup
[maxima.git] / common-html.mk
blob34046d019fc23ad49de0643a2c95fae8715fcf14
1 # Installation/uninstallation and distribution for .html files.
2 # htmlname -- html base name (e.g. maxima or xmaxima)
3 # htmlinstdir -- html installation directory
5 install-data-local: install-maxima-html
6 install-maxima-html: $(htmlname).html
7 @$(NORMAL_INSTALL)
8 $(mkinstalldirs) $(DESTDIR)$(htmlinstdir)
9 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
10 list="$(srcdir)/$(htmlname).html $(srcdir)/$(htmlname)_*.html" ; \
11 for p in $$list; do \
12 f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`; \
13 if test -f $(srcdir)/$$f; then \
14 if test ! -d `dirname $(DESTDIR)$(htmlinstdir)/$$f`; then \
15 $(mkinstalldirs) `dirname $(DESTDIR)$(htmlinstdir)/$$f`; \
16 fi; \
17 echo " $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(htmlinstdir)/$$f"; \
18 $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(htmlinstdir)/$$f; \
19 else if test -f $$f; then \
20 if test ! -d `dirname $(DESTDIR)$(htmlinstdir)/$$f`; then \
21 $(mkinstalldirs) `dirname $(DESTDIR)$(htmlinstdir)/$$f`; \
22 fi; \
23 echo " $(INSTALL_DATA) $$f $(DESTDIR)$(htmlinstdir)/$$f"; \
24 $(INSTALL_DATA) $$f $(DESTDIR)$(htmlinstdir)/$$f; \
25 fi; fi; \
26 done
28 uninstall-local: uninstall-maxima-html
29 uninstall-maxima-html:
30 @$(NORMAL_UNINSTALL)
31 rm -f $(DESTDIR)$(htmlinstdir)/$(htmlname).html
32 rm -f $(DESTDIR)$(htmlinstdir)/$(htmlname)_*.html
34 dist-hook: dist-maxima-html
35 dist-maxima-html: $(htmlname).html
36 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
37 list="$(srcdir)/$(htmlname).html $(srcdir)/$(htmlname)_*.html" ; \
38 for p in $$list; do \
39 f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`; \
40 test -f $(distdir)/$$f || cp -p $(srcdir)/$$f $(distdir)/$$f; \
41 done