1## Process this file with automake to produce Makefile.in
2
3# HTML help is built only when building the distribution
4# (make dist is invoked at ato level). It can be built explicitely by
5# make html-doc from html-help directory.
6
7pkgdatadir = @GPUTILS_HTMLDOC_PATH@
8
9html-doc:
10	if [ "$(ENABLE_HTML_DOC)" == "yes" ]; then \
11	  if [ ! -e $(DEFAULT_MPLABX_PATH)/mpasmx/8bit_device.info ]; then \
12	    @echo "Can't find mplabx installation; HTML documentation will not be built."; \
13	  else \
14	    $(top_srcdir)/../scripts/tools/device-help.pl -gp $(top_srcdir) -od ./ -v 4; \
15	  fi; \
16	fi
17
18install: install-html
19
20install-html:
21	if [ "$(ENABLE_HTML_DOC)" == "yes" ]; then \
22	  if [ -n "$$(ls *.html 2>/dev/null)" -a -n "$$(ls *.css 2>/dev/null)" ]; then \
23	    $(install_sh) -d "$(DESTDIR)$(pkgdatadir)"; \
24	    $(install_sh) -c -m 644 *.css *.html "$(DESTDIR)$(pkgdatadir)"; \
25	  fi; \
26	fi
27
28dist-hook: html-doc
29	if [ -n "$$(ls *.html 2>/dev/null)" -a -n "$$(ls *.css 2>/dev/null)" ]; then \
30	  cp *.html *.css $(distdir); \
31	fi
32
33MAINTAINERCLEANFILES = *.css *.html
34