Added new doxygen_upgrade and doxygen_create targets to the DOXYGEN build system module. Clean up CORE build system module.

pull/1469/head
Dean Camera 13 years ago
parent 7750783809
commit 8d8e5c06b9

@ -136,27 +136,33 @@ help:
# Lists build modules included by the project makefile, in alphabetical order # Lists build modules included by the project makefile, in alphabetical order
list_modules: list_modules:
@echo Currently Used Build System Modules: $(PRINTABLE_LUFA_BUILD_MODULES) @echo Currently Used Build System Modules:
@printf " %b" "$(PRINTABLE_LUFA_BUILD_MODULES:%= - %\n)"
# Lists build targets included by the project makefile, in alphabetical order # Lists build targets included by the project makefile, in alphabetical order
list_targets: list_targets:
@echo Currently Available Build Targets: $(PRINTABLE_LUFA_BUILD_TARGETS) @echo Currently Available Build Targets:
@printf " %b" "$(PRINTABLE_LUFA_BUILD_TARGETS:%= - %\n)"
# Lists mandatory variables that must be set by the project makefile, in alphabetical order # Lists mandatory variables that must be set by the project makefile, in alphabetical order
list_mandatory: list_mandatory:
@echo Mandatory Variables for Included Modules: $(PRINTABLE_LUFA_MANDATORY_VARS) @echo Mandatory Variables for Included Modules:
@printf " %b" "$(PRINTABLE_LUFA_MANDATORY_VARS:%= - %\n)"
# Lists optional variables that must be set by the project makefile, in alphabetical order # Lists optional variables that must be set by the project makefile, in alphabetical order
list_optional: list_optional:
@echo Optional Variables for Included Modules: $(PRINTABLE_LUFA_OPTIONAL_VARS) @echo Optional Variables for Included Modules:
@printf " %b" "$(PRINTABLE_LUFA_OPTIONAL_VARS:%= - %\n)"
# Lists variables provided by the included build modules, in alphabetical order # Lists variables provided by the included build modules, in alphabetical order
list_provided: list_provided:
@echo Variables Provided by the Included Modules: $(PRINTABLE_LUFA_PROVIDED_VARS) @echo Variables Provided by the Included Modules:
@printf " %b" "$(PRINTABLE_LUFA_PROVIDED_VARS:%= - %\n)"
# Lists macros provided by the included build modules, in alphabetical order # Lists macros provided by the included build modules, in alphabetical order
list_macros: list_macros:
@echo Macros Provided by the Included Modules: $(PRINTABLE_LUFA_PROVIDED_MACROS) @echo Macros Provided by the Included Modules:
@printf " %b" "$(PRINTABLE_LUFA_PROVIDED_MACROS:%= - %\n)"
# Disable default in-built make rules (those that are needed are explicitly # Disable default in-built make rules (those that are needed are explicitly
# defined, and doing so has performance benefits when recursively building) # defined, and doing so has performance benefits when recursively building)

@ -7,7 +7,7 @@
# #
LUFA_BUILD_MODULES += DOXYGEN LUFA_BUILD_MODULES += DOXYGEN
LUFA_BUILD_TARGETS += doxygen LUFA_BUILD_TARGETS += doxygen doxygen_upgrade doxygen_create
LUFA_BUILD_MANDATORY_VARS += LUFA_PATH LUFA_BUILD_MANDATORY_VARS += LUFA_PATH
LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
LUFA_BUILD_PROVIDED_VARS += LUFA_BUILD_PROVIDED_VARS +=
@ -23,6 +23,10 @@ LUFA_BUILD_PROVIDED_MACROS +=
# TARGETS: # TARGETS:
# #
# doxygen - Build Doxygen Documentation # doxygen - Build Doxygen Documentation
# doxygen_create - Create a new Doxygen configuration file using
# the latest template
# doxygen_upgrade - Upgrade an existing Doxygen configuration file
# to the latest template
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
@ -73,10 +77,24 @@ else
DOXYGEN_CMD := $(BASE_DOXYGEN_CMD) DOXYGEN_CMD := $(BASE_DOXYGEN_CMD)
endif endif
# Error if the specified Doxygen configuration file does not exist
$(DOXYGEN_CONF):
$(error Doxygen configuration file $@ does not exist)
# Builds the project documentation using the specified configuration file and the DOXYGEN tool # Builds the project documentation using the specified configuration file and the DOXYGEN tool
doxygen: doxygen: $(DOXYGEN_CONF)
@echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\" @echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
$(DOXYGEN_CMD) $(DOXYGEN_CMD)
# Upgrades an existing Doxygen configuration file to the latest Doxygen template, preserving settings
doxygen_upgrade: $(DOXYGEN_CONF)
@echo $(MSG_DOXYGEN_CMD) Upgrading configuration file \"$(DOXYGEN_CONF)\" with latest template
doxygen -u $(DOXYGEN_CONF) > /dev/null
# Creates a new Doxygen configuration file with the set file name
doxygen_create:
@echo $(MSG_DOXYGEN_CMD) Creating new configuration file \"$(DOXYGEN_CONF)\" with latest template
doxygen -g $(DOXYGEN_CONF) > /dev/null
# Phony build targets for this module # Phony build targets for this module
.PHONY: doxygen .PHONY: doxygen doxygen_upgrade doxygen_create

@ -631,9 +631,9 @@
* *
* \section SSec_BuildModule_DOXYGEN_Requirements Requirements * \section SSec_BuildModule_DOXYGEN_Requirements Requirements
* This module requires the <tt>doxygen</tt> utility from the Doxygen website * This module requires the <tt>doxygen</tt> utility from the Doxygen website
* (<a>http://www.stack.nl/~dimitri/doxygen/</a>) to be available in your system's <b>PATH</b> * (<a>http://www.doxygen.org/</a>) to be available in your system's <b>PATH</b> variable. On *nix
* variable. On *nix systems the <tt>doxygen</tt> utility can be installed via the project's source * systems the <tt>doxygen</tt> utility can be installed via the project's source code or through
* code or through the package manager. * the package manager.
* *
* \section SSec_BuildModule_DOXYGEN_Targets Targets * \section SSec_BuildModule_DOXYGEN_Targets Targets
* *
@ -642,6 +642,14 @@
* <td><tt>doxygen</tt></td> * <td><tt>doxygen</tt></td>
* <td>Generate project documentation.</td> * <td>Generate project documentation.</td>
* </tr> * </tr>
* <tr>
* <td><tt>doxygen_create</tt></td>
* <td>Create a new Doxygen configuration file using the latest template.</td>
* </tr>
* <tr>
* <td><tt>doxygen_upgrade</tt></td>
* <td>Upgrade an existing Doxygen configuration file to the latest template</td>
* </tr>
* </table> * </table>
* *
* \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters * \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters

@ -10,6 +10,7 @@
* <b>New:</b> * <b>New:</b>
* - Core: * - Core:
* - Added support for the Arduino Leonardo board * - Added support for the Arduino Leonardo board
* - Added new doxygen_upgrade and doxygen_create targets to the DOXYGEN build system module
* - Library Applications: * - Library Applications:
* - <i>None</i> * - <i>None</i>
* *

@ -12,14 +12,17 @@
LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING Version.h | cut -d'"' -f2) LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING Version.h | cut -d'"' -f2)
EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build *.conf *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build *.conf *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin
# Default target - no default action when attempting to build the core directly
all: all:
# Export the library core as a TAR archive for importing into an IDE
export_tar: export_tar:
@echo Exporting LUFA library to a TAR archive... @echo Exporting LUFA library to a TAR archive...
@tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) * @tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) *
@tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates @tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates
@echo Export LUFA_$(LUFA_VERSION_NUM).tar complete. @echo Export LUFA_$(LUFA_VERSION_NUM).tar complete.
# Display the LUFA version of this library copy
version: version:
@echo "LUFA $(LUFA_VERSION_NUM)" @echo "LUFA $(LUFA_VERSION_NUM)"
@ -36,6 +39,7 @@ else
ARCH = {AVR8,UC3,XMEGA} ARCH = {AVR8,UC3,XMEGA}
DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM) DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM)
# Remove all object and associated files from the LUFA library core
clean: clean:
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o) rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o)
rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d) rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d)
@ -46,5 +50,4 @@ else
include Build/lufa_doxygen.mk include Build/lufa_doxygen.mk
endif endif
.PHONY: all export_tar version clean .PHONY: all export_tar version clean
Loading…
Cancel
Save