1# 2# Copyright 2016 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 @PACKAGE_DESCRIPTION@ 20# in-package, documentation. 21# 22 23include $(abs_top_nlbuild_autotools_dir)/automake/pre.am 24 25EXTRA_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# 35PACKAGE_VERSION = $(shell cat $(top_builddir)/.local-version) 36VERSION = $(PACKAGE_VERSION) 37 38 39docdistdir ?= . 40 41@PACKAGE_SHORT_LOWER@_docdist_alias = \ 42 $(PACKAGE_TARNAME)-docs 43 44@PACKAGE_SHORT_LOWER@_docdist_name = \ 45 $(@PACKAGE_SHORT_LOWER@_docdist_alias)-$(VERSION) 46 47@PACKAGE_SHORT_LOWER@_docdist_archive = \ 48 $(docdistdir)/$(@PACKAGE_SHORT_LOWER@_docdist_name).tar.gz 49 50CLEANFILES = \ 51 Doxyfile \ 52 $(@PACKAGE_SHORT_LOWER@_docdist_archive) \ 53 $(NULL) 54 55if @PACKAGE_SHORT_UPPER@_BUILD_DOCS 56 57all-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 66Doxyfile: $(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 78html/index.html: Doxyfile 79 $(AM_V_GEN)$(DOXYGEN) $(<) 80 81# 82# Addition rules and commands to create a documentation-only 83# distribution of @PACKAGE_SHORT_LOWER@ 84# 85 86$(@PACKAGE_SHORT_LOWER@_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$(@PACKAGE_SHORT_LOWER@_docdist_archive): $(@PACKAGE_SHORT_LOWER@_docdist_name) 92 $(AM_V_at)echo " TAR $(@)" 93 $(AM_V_at)tardir="$(<)" && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c > "$(@)" && rm -rf $(<) 94 95docdist $(@PACKAGE_SHORT_LOWER@_docdist_alias): $(@PACKAGE_SHORT_LOWER@_docdist_archive) 96 97clean-local: 98 $(AM_V_at)rm -f -r html 99 100endif # @PACKAGE_SHORT_UPPER@_BUILD_DOCS 101 102include $(abs_top_nlbuild_autotools_dir)/automake/post.am 103