Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / nlunit-test / repo / doc / Makefile.am
1 #
2 #    Copyright 2015-2017 Nest Labs Inc. All Rights Reserved.
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License");
5 #    you may not use this file except in compliance with the License.
6 #    You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS,
12 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #    See the License for the specific language governing permissions and
14 #    limitations under the License.
15 #
16
17 #
18 #    Description:
19 #      This file is the GNU automake template for the Nest Labs Unit
20 #      Test, in-package, documentation.
21 #
22
23 include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
24
25 EXTRA_DIST                                      = \
26     $(srcdir)/Doxyfile.in                         \
27     $(NULL)
28
29 #
30 # Override autotool's default notion of the package version variables.
31 # This ensures that when we create a doc distribution that the
32 # version is always the current version, not the version when the
33 # package was bootstrapped.
34 #
35 PACKAGE_VERSION                                 = $(shell cat $(top_builddir)/.local-version)
36 VERSION                                         = $(PACKAGE_VERSION)
37
38
39 docdistdir                                     ?= .
40
41 nlunit_test_docdist_alias                       = \
42     $(PACKAGE_TARNAME)-docs
43
44 nlunit_test_docdist_name                        = \
45     $(nlunit_test_docdist_alias)-$(VERSION)
46
47 nlunit_test_docdist_archive                     = \
48     $(docdistdir)/$(nlunit_test_docdist_name).tar.gz
49
50 CLEANFILES                                      = \
51     Doxyfile                                      \
52     $(nlunit_test_docdist_archive)                \
53     $(NULL)
54
55 if NLUNIT_TEST_BUILD_DOCS
56
57 all-local: html/index.html
58
59 #
60 # We choose to manually transform Doxyfile.in into Doxyfile here in
61 # the makefile rather than in the configure script so that we can take
62 # advantage of live, at build time (rather than at configure time),
63 # updating of the package version number.
64 #
65
66 Doxyfile: $(srcdir)/Doxyfile.in Makefile
67         $(AM_V_GEN)$(SED)                                     \
68             -e "s,\@DOXYGEN_USE_DOT\@,$(DOXYGEN_USE_DOT),g"   \
69             -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g"         \
70             -e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g"   \
71             -e "s,\@PERL\@,$(PERL),g"                         \
72             -e "s,\@abs_builddir\@,$(abs_builddir),g"         \
73             -e "s,\@abs_srcdir\@,$(abs_srcdir),g"             \
74             -e "s,\@abs_top_builddir\@,$(abs_top_builddir),g" \
75             -e "s,\@abs_top_srcdir\@,$(abs_top_srcdir),g"     \
76             < "$(srcdir)/Doxyfile.in" > "$(@)"
77
78 html/index.html: Doxyfile
79         $(AM_V_GEN)$(DOXYGEN) $(<)
80
81 #
82 # Addition rules and commands to create a documentation-only
83 # distribution of nlunit-test
84 #
85
86 $(nlunit_test_docdist_name): html/index.html
87         $(AM_V_at)rm -f -r $(@)
88         $(call create-directory)
89         $(AM_V_at)cp -R html $(@)
90
91 $(nlunit_test_docdist_archive): $(nlunit_test_docdist_name)
92         $(AM_V_at)echo "  TAR      $(@)"
93         $(AM_V_at)tardir="$(<)" && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c > "$(@)" && rm -rf $(<)
94
95 docdist $(nlunit_test_docdist_alias): $(nlunit_test_docdist_archive)
96
97 clean-local:
98         $(AM_V_at)rm -f -r html
99
100 endif # NLUNIT_TEST_BUILD_DOCS
101
102 include $(abs_top_nlbuild_autotools_dir)/automake/post.am