nes-proj/doc/Makefile

37 lines
1.0 KiB
Makefile
Raw Normal View History

2017-10-06 11:18:28 +00:00
basedirs := os arch
manuals := $(shell find ./ -name "*.txt")
filetypes := -iwholename "*/doc/*.txt"
empty :=
space := $(empty) $(empty)
pwd := $(shell cd ..; pwd)
# Doxyfile configuration variables
export docdir := .
export docdirs
export docsrc
export doclatex := NO
export docroot := ../
# Get appropriate root for doxygen path cutoff
ifeq ($(HOST_OS),Windows)
# on windows need to convert cygwin path to windows path for doxygen
ifneq (,$(findstring cygdrive,$(pwd)))
cygroot = $(subst /,$(space),$(patsubst /cygdrive/%,%,$(pwd)))
export docroot = $(firstword $(cygroot)):/$(subst $(space),/,$(wordlist 2,$(words $(cygroot)),$(cygroot)))
endif
endif
2017-10-06 11:18:28 +00:00
docdirs = $(sort $(foreach dir,$(basedirs),${shell find ../${dir} -type d -not -path "*/.*" -not -path "*/obj_*"}))
docsrc = $(docdirs) $(foreach dir,$(docdirs),${shell find $(dir) -type f $(filetypes)}) $(manuals)
2017-10-06 11:18:28 +00:00
.PHONY: clean html
2017-10-06 11:18:28 +00:00
html:
@doxygen Doxyfile
clean:
@echo "> Cleaning Documentation"
@$(RM) -r "$(docdir)/html"
@$(RM) -r "doxygen.log"
@echo " done."