9efbbcbcc419ac2c96bb36110ac503a4db1337e9
[pub/USBasp.git] / LUFA / Build / lufa.doxygen.in
1 #
2 # LUFA Library
3 # Copyright (C) Dean Camera, 2012.
4 #
5 # dean [at] fourwalledcubicle [dot] com
6 # www.lufa-lib.org
7 #
8
9 LUFA_BUILD_MODULES += DOXYGEN
10 LUFA_BUILD_TARGETS += doxygen
11
12 # -----------------------------------------------------------------------------
13 # LUFA Doxygen Buildsystem Makefile Module.
14 # -----------------------------------------------------------------------------
15 # DESCRIPTION:
16 # Provides a set of targets to automatically build Doxygen documentation for
17 # a project (see www.doxygen.org).
18 # -----------------------------------------------------------------------------
19 # TARGETS:
20 #
21 # doxygen - Build Doxygen Documentation
22 #
23 # MANDATORY PARAMETERS:
24 #
25 # (None)
26 #
27 # OPTIONAL PARAMETERS:
28 #
29 # DOXYGEN_CONF - Doxygen configuration filename
30 # DOXYGEN_FAIL_ON_WARNING - Set to Y to fail the build on Doxygen warnings,
31 # N to continue even if warnings occur
32 # DOXYGEN_OVERRIDE_PARAMS - Parameters to override in the doxygen
33 # configuration file
34 # -----------------------------------------------------------------------------
35
36 # Output Messages
37 MSG_DOXYGEN_CMD = ' [DOXYGEN] :'
38
39 # Default values of user-supplied variables
40 DOXYGEN_CONF ?= Doxygen.conf
41 DOXYGEN_FAIL_ON_WARNING ?= Y
42 DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES
43
44 # Determine Doxygen invocation command
45 DOXYGEN_CMD = ( cat Doxygen.conf ; $(DOXYGEN_OVERRIDE_PARAMS:%=echo "%";)) | doxygen -
46 ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)
47 DOXYGEN_CMD = if ( ( cat Doxygen.conf $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen - 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi;
48 endif
49
50 doxygen:
51 @echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
52 $(DOXYGEN_CMD)