2017-09-01 15:32:04 +00:00
|
|
|
basedirs := os arch/cpu arch/platform
|
2008-04-28 11:36:59 +00:00
|
|
|
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
|
2012-02-21 23:57:22 +00:00
|
|
|
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
|
2008-04-28 11:36:59 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: clean html pdf upload
|
|
|
|
|
2014-11-18 16:34:41 +00:00
|
|
|
html: init doxygen.log
|
2006-06-17 22:41:10 +00:00
|
|
|
|
2008-04-28 11:36:59 +00:00
|
|
|
pdf: doclatex = YES
|
2014-11-18 16:34:41 +00:00
|
|
|
pdf: init doxygen.log
|
2008-04-28 11:36:59 +00:00
|
|
|
gmake -C latex refman.pdf
|
2006-06-17 22:41:10 +00:00
|
|
|
|
2008-04-28 11:36:59 +00:00
|
|
|
init:
|
|
|
|
@echo "> Scanning files"
|
2006-06-17 22:41:10 +00:00
|
|
|
|
2008-04-28 11:36:59 +00:00
|
|
|
# This target requires and graphviz and doxygen
|
2014-12-02 11:00:00 +00:00
|
|
|
doxygen.log: docdirs = $(sort $(foreach dir,$(basedirs),${shell find ../${dir} -type d -not -path "*/.*" -not -path "*/obj_*"}))
|
2014-11-18 16:34:41 +00:00
|
|
|
doxygen.log: docsrc = $(docdirs) $(foreach dir,$(docdirs),${shell find $(dir) -type f $(filetypes)}) $(manuals)
|
|
|
|
doxygen.log:
|
2008-04-28 11:36:59 +00:00
|
|
|
@doxygen Doxyfile
|
|
|
|
@echo "Done, errorlog follows:"
|
|
|
|
@echo ""
|
2014-11-18 16:34:41 +00:00
|
|
|
@touch doxygen.log
|
2008-04-28 11:36:59 +00:00
|
|
|
@cat "doxygen.log"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo "> Cleaning Documentation"
|
|
|
|
@$(RM) -r "$(docdir)/html"
|
|
|
|
@$(RM) -r "$(docdir)/rtf"
|
|
|
|
@$(RM) -r "$(docdir)/latex"
|
|
|
|
@$(RM) -r "doxygen.log"
|
|
|
|
@echo " done."
|
|
|
|
|
2017-06-22 13:48:28 +00:00
|
|
|
#upload: html #pdf
|
2007-03-25 21:55:35 +00:00
|
|
|
# scp -C latex/refman.pdf adamdunkels@shell.sourceforge.net:/home/groups/c/co/contiki/htdocs/
|
|
|
|
# tar czfv - html | ssh adamdunkels@shell.sourceforge.net "cd /home/groups/c/co/contiki/htdocs/; tar xfz -"
|
2017-06-22 13:48:28 +00:00
|
|
|
# (cd html; rsync -rv . r2d2.sics.se:/home/adam/public_html/contiki/docs)
|
2008-04-28 11:36:59 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
@echo $(docroot)
|
|
|
|
@echo $(docsrc)
|
|
|
|
|