Makefile revision 440cde68
1# Copyright (c) 2016 Cisco and/or its affiliates.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at:
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14WS_ROOT=$(CURDIR)
15BR=$(WS_ROOT)/build-root
16
17#
18# OS Detection
19#
20OS_ID        = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
21OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
22
23help:
24	@echo "Make Targets:"
25	@echo " doxygen             - (re)generate documentation"
26	@echo " bootstrap-doxygen   - setup Doxygen dependencies"
27	@echo " wipe-doxygen        - wipe all generated documentation"
28	@echo ""
29
30
31
32#
33# Build the documentation
34#
35
36# Doxygen configuration and our utility scripts
37export DOXY_DIR ?= $(WS_ROOT)/doxygen
38
39define make-doxy
40	@OS_ID="$(OS_ID)" WS_ROOT="$(WS_ROOT)" BR="$(BR)" make -C $(DOXY_DIR) $@
41endef
42
43.PHONY: bootstrap-doxygen doxygen wipe-doxygen
44
45bootstrap-doxygen:
46	$(call make-doxy)
47
48doxygen:
49	$(call make-doxy)
50
51wipe-doxygen:
52	$(call make-doxy)
53
54