Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / nlassert / repo / doc / Makefile.am
1 #
2 #    Copyright (c) 2015 Nest Labs, Inc.
3 #    All rights reserved.
4 #
5 #    This document is the property of Nest. It is considered
6 #    confidential and proprietary information.
7 #
8 #    This document may not be reproduced or transmitted in any form,
9 #    in whole or in part, without the express written permission of
10 #    Nest.
11 #
12 #    Description:
13 #      This file is the GNU automake template for the Nest Labs
14 #      runtime assertion library in-package, documentation.
15 #
16
17 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
18
19 EXTRA_DIST                                      = \
20     $(srcdir)/Doxyfile.in                         \
21     $(NULL)
22
23 #
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.
28 #
29 PACKAGE_VERSION                                 = $(shell cat $(top_builddir)/.local-version)
30 VERSION                                         = $(PACKAGE_VERSION)
31
32
33 docdistdir                                     ?= .
34
35 nlassert_docdist_alias                          = \
36     $(PACKAGE_TARNAME)-docs
37
38 nlassert_docdist_name                           = \
39     $(nlassert_docdist_alias)-$(VERSION)
40
41 nlassert_docdist_archive                        = \
42     $(docdistdir)/$(nlassert_docdist_name).tar.gz
43
44 CLEANFILES                                      = \
45     Doxyfile                                      \
46     $(nlassert_docdist_archive)                   \
47     $(NULL)
48
49 if NLASSERT_BUILD_DOCS
50
51 all-local: html/index.html
52
53 #
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.
58 #
59
60 Doxyfile: $(srcdir)/Doxyfile.in Makefile
61         $(AM_V_GEN)$(SED)                                     \
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" > "$(@)"
71
72 html/index.html: Doxyfile
73         $(AM_V_GEN)$(DOXYGEN) $(<)
74
75 #
76 # Addition rules and commands to create a documentation-only
77 # distribution of nlassert
78 #
79
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 $(@)
84
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 $(<)
88
89 docdist $(nlassert_docdist_alias): $(nlassert_docdist_archive)
90
91 clean-local:
92         $(AM_V_at)rm -f -r html
93
94 endif # NLASSERT_BUILD_DOCS
95
96 include $(abs_top_nlbuild_autotools_dir)/automake/post.am