# Makefile - makefile to build the kernel shell command documentation
#
# modification history
# --------------------
# 01e,18nov11,jph  replace the versioned mapping file name with
#                  mappingfile.txt
# 01d,28jul11,jam  update mapping file for docs
# 01c,12may11,jam  change mapping file version
# 01b,06jan11,jph  check if mapping file exists
# 01a,08nov10,jph  add mapping file
# 01b,05nov10,???  fix path to mapping file
# 01a,25oct10,jph  remove version
# 01a,20oct10,???  change version
# 01f,18oct10,???  change version
# 01e,22jul08,kkz  Updating API book name
# 01d,04jun08,kkz  Use variables for doc version number
# 01c,22jun07,kkz  Updating apidoc version number
# 01b,07dec06,kkz  update apidoc version number
# 01a,29jul05,bpn  Created.
#
# DESCRIPTION
# This file contains the makefile rules for building the kernel shell commands
# documentation automatically.
#

DOCS_ROOT	= $(WIND_DOCS)/extensions/eclipse/plugins
# Check if mapping file exists
ifneq ($(wildcard $(DOCS_ROOT)/mappingfile.txt),)
-include $(wildcard $(DOCS_ROOT)/mappingfile.txt)
endif

TGT_DIR		= $(WIND_BASE)/target

CMD_FILES	= shellCmdDoc.c
CMD_DOC_DIR	= $(DOCS_ROOT)/$(DOC_KERNEL_SHELL_CMD)
DOC_OPTS	= -mg -nostrict -missingok
DOC_BOOK        = VxWorks_Kernel_Shell
DOC_CHAPTER     = VxWorks_Kernel_Shell_Command_Reference
include $(TGT_DIR)/h/make/defs.library

man:
	-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
	    -sort -book $(DOC_BOOK) -chapter $(DOC_CHAPTER) \
	    -out $(CMD_DOC_DIR) -set $(DOC_KERNEL) $(CMD_FILES)
	-$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/apigen $(DOC_OPTS) \
	    -sort -book $(DOC_BOOK) -chapter $(DOC_CHAPTER) \
	    -out $(CMD_DOC_DIR) -set $(DOC_KERNEL) -format xml $(CMD_FILES)
	@date
