2 # Copyright (c) 2015 Nest Labs, Inc.
5 # This document is the property of Nest. It is considered
6 # confidential and proprietary information.
8 # This document may not be reproduced or transmitted in any form,
9 # in whole or in part, without the express written permission of
13 # This file is the GNU automake template for the Nest Labs
14 # runtime assertion library in-package, documentation.
17 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
20 $(srcdir)/Doxyfile.in \
24 # Override autotool's default notion of the package version variables.
25 # This ensures that when we create a doc distribution that the
26 # version is always the current version, not the version when the
27 # package was bootstrapped.
29 PACKAGE_VERSION = $(shell cat $(top_builddir)/.local-version)
30 VERSION = $(PACKAGE_VERSION)
35 nlassert_docdist_alias = \
36 $(PACKAGE_TARNAME)-docs
38 nlassert_docdist_name = \
39 $(nlassert_docdist_alias)-$(VERSION)
41 nlassert_docdist_archive = \
42 $(docdistdir)/$(nlassert_docdist_name).tar.gz
46 $(nlassert_docdist_archive) \
49 if NLASSERT_BUILD_DOCS
51 all-local: html/index.html
54 # We choose to manually transform Doxyfile.in into Doxyfile here in
55 # the makefile rather than in the configure script so that we can take
56 # advantage of live, at build time (rather than at configure time),
57 # updating of the package version number.
60 Doxyfile: $(srcdir)/Doxyfile.in Makefile
62 -e "s,\@DOXYGEN_USE_DOT\@,$(DOXYGEN_USE_DOT),g" \
63 -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g" \
64 -e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g" \
65 -e "s,\@PERL\@,$(PERL),g" \
66 -e "s,\@abs_builddir\@,$(abs_builddir),g" \
67 -e "s,\@abs_srcdir\@,$(abs_srcdir),g" \
68 -e "s,\@abs_top_builddir\@,$(abs_top_builddir),g" \
69 -e "s,\@abs_top_srcdir\@,$(abs_top_srcdir),g" \
70 < "$(srcdir)/Doxyfile.in" > "$(@)"
72 html/index.html: Doxyfile
73 $(AM_V_GEN)$(DOXYGEN) $(<)
76 # Addition rules and commands to create a documentation-only
77 # distribution of nlassert
80 $(nlassert_docdist_name): html/index.html
81 $(AM_V_at)rm -f -r $(@)
82 $(call create-directory)
83 $(AM_V_at)cp -R html $(@)
85 $(nlassert_docdist_archive): $(nlassert_docdist_name)
86 $(AM_V_at)echo " TAR $(@)"
87 $(AM_V_at)tardir="$(<)" && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c > "$(@)" && rm -rf $(<)
89 docdist $(nlassert_docdist_alias): $(nlassert_docdist_archive)
92 $(AM_V_at)rm -f -r html
94 endif # NLASSERT_BUILD_DOCS
96 include $(abs_top_nlbuild_autotools_dir)/automake/post.am