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