1440cde68SHåkan Jonsson# Copyright (c) 2016 Cisco and/or its affiliates.
2440cde68SHåkan Jonsson# Licensed under the Apache License, Version 2.0 (the "License");
3440cde68SHåkan Jonsson# you may not use this file except in compliance with the License.
4440cde68SHåkan Jonsson# You may obtain a copy of the License at:
5440cde68SHåkan Jonsson#
6440cde68SHåkan Jonsson#     http://www.apache.org/licenses/LICENSE-2.0
7440cde68SHåkan Jonsson#
8440cde68SHåkan Jonsson# Unless required by applicable law or agreed to in writing, software
9440cde68SHåkan Jonsson# distributed under the License is distributed on an "AS IS" BASIS,
10440cde68SHåkan Jonsson# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11440cde68SHåkan Jonsson# See the License for the specific language governing permissions and
12440cde68SHåkan Jonsson# limitations under the License.
13440cde68SHåkan Jonsson
14440cde68SHåkan JonssonWS_ROOT=$(CURDIR)
15440cde68SHåkan JonssonBR=$(WS_ROOT)/build-root
16440cde68SHåkan Jonsson
17440cde68SHåkan Jonsson#
18440cde68SHåkan Jonsson# OS Detection
19440cde68SHåkan Jonsson#
20440cde68SHåkan JonssonOS_ID        = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
21440cde68SHåkan JonssonOS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
22440cde68SHåkan Jonsson
23440cde68SHåkan Jonssonhelp:
24440cde68SHåkan Jonsson	@echo "Make Targets:"
25440cde68SHåkan Jonsson	@echo " doxygen             - (re)generate documentation"
26440cde68SHåkan Jonsson	@echo " bootstrap-doxygen   - setup Doxygen dependencies"
27440cde68SHåkan Jonsson	@echo " wipe-doxygen        - wipe all generated documentation"
28440cde68SHåkan Jonsson	@echo ""
29440cde68SHåkan Jonsson
30440cde68SHåkan Jonsson
31440cde68SHåkan Jonsson
32440cde68SHåkan Jonsson#
33440cde68SHåkan Jonsson# Build the documentation
34440cde68SHåkan Jonsson#
35440cde68SHåkan Jonsson
36440cde68SHåkan Jonsson# Doxygen configuration and our utility scripts
37440cde68SHåkan Jonssonexport DOXY_DIR ?= $(WS_ROOT)/doxygen
38440cde68SHåkan Jonsson
39440cde68SHåkan Jonssondefine make-doxy
40440cde68SHåkan Jonsson	@OS_ID="$(OS_ID)" WS_ROOT="$(WS_ROOT)" BR="$(BR)" make -C $(DOXY_DIR) $@
41440cde68SHåkan Jonssonendef
42440cde68SHåkan Jonsson
43440cde68SHåkan Jonsson.PHONY: bootstrap-doxygen doxygen wipe-doxygen
44440cde68SHåkan Jonsson
45440cde68SHåkan Jonssonbootstrap-doxygen:
46440cde68SHåkan Jonsson	$(call make-doxy)
47440cde68SHåkan Jonsson
48440cde68SHåkan Jonssondoxygen:
49440cde68SHåkan Jonsson	$(call make-doxy)
50440cde68SHåkan Jonsson
51440cde68SHåkan Jonssonwipe-doxygen:
52440cde68SHåkan Jonsson	$(call make-doxy)
53440cde68SHåkan Jonsson