lufa.doxygen.in 2.29 KB
Newer Older
1
2
3
4
5
6
7
8
#
#             LUFA Library
#     Copyright (C) Dean Camera, 2012.
#
#  dean [at] fourwalledcubicle [dot] com
#           www.lufa-lib.org
#

9
10
LUFA_BUILD_MODULES        += DOXYGEN
LUFA_BUILD_TARGETS        += doxygen
11
LUFA_BUILD_MANDATORY_VARS += LUFA_PATH
12
LUFA_BUILD_OPTIONAL_VARS  += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
13
14
15
16
17
18
19
20
21
22
23
24
25
26

# -----------------------------------------------------------------------------
#                 LUFA Doxygen Buildsystem Makefile Module.
# -----------------------------------------------------------------------------
# DESCRIPTION:
#   Provides a set of targets to automatically build Doxygen documentation for
#   a project (see www.doxygen.org).
# -----------------------------------------------------------------------------
# TARGETS:
#
#    doxygen                   - Build Doxygen Documentation
#
# MANDATORY PARAMETERS:
#
27
#    LUFA_PATH                 - Path to the LUFA library core
28
29
30
31
32
33
34
35
36
37
#
# OPTIONAL PARAMETERS:
#
#    DOXYGEN_CONF              - Doxygen configuration filename
#    DOXYGEN_FAIL_ON_WARNING   - Set to Y to fail the build on Doxygen warnings,
#                                N to continue even if warnings occur
#    DOXYGEN_OVERRIDE_PARAMS   - Parameters to override in the doxygen
#                                configuration file
# -----------------------------------------------------------------------------

38
39
40
# Sanity-check values of mandatory user-supplied variables
LUFA_PATH               ?= $(error Makefile LUFA_PATH value not set.)

41
# Default values of optionally user-supplied variables
42
43
DOXYGEN_CONF            ?= Doxygen.conf
DOXYGEN_FAIL_ON_WARNING ?= Y
44
DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES HTML_STYLESHEET=$(patsubst %/,%,$(LUFA_PATH))/DoxygenPages/Style/Style.css
45

46
47
48
# Output Messages
MSG_DOXYGEN_CMD          = ' [DOXYGEN] :'

49
# Determine Doxygen invocation command
50
BASE_DOXYGEN_CMD = ( cat Doxygen.conf $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen -
51
ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)
52
   DOXYGEN_CMD = if ( $(BASE_DOXYGEN_CMD) 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi;
53
else
54
   DOXYGEN_CMD = $(BASE_DOXYGEN_CMD)
55
56
57
58
59
endif

doxygen:
	@echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
	$(DOXYGEN_CMD)