X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=support%2Fmake%2Fdocs.extra;fp=support%2Fmake%2Fdocs.extra;h=767382275a3d05d5b3e444abcb068eeaa27360e5;hb=1ba974b83d19fc41bf80acd52726f36f7f1df297;hp=0000000000000000000000000000000000000000;hpb=4db69a460ad5d18d33cbf5c3ef74ad584d9e2886;p=tinyos-2.x.git diff --git a/support/make/docs.extra b/support/make/docs.extra new file mode 100644 index 00000000..76738227 --- /dev/null +++ b/support/make/docs.extra @@ -0,0 +1,35 @@ +#-*-Makefile-*- vim:syntax=make +#$Id$ + +# configure the base for the app dirs. This is used to generate more +# useful package names in the documentation. +ifeq ($(BASEDIR)_x, _x) +BASEDIR := $(shell pwd | sed 's@\(.*\)/apps.*$$@\1@' ) +endif + +# The output directory for generated documentation +ifeq ($(DOCDIR)_x, _x) +DOCDIR := $(BASEDIR)/doc/nesdoc +endif + +COMMA=, +DOCS := $(subst $(COMMA), ,$(subst ., ,$(DOCS))) + +ifeq ($(filter here,$(DOCS)),here) +DOCDIR = doc +endif + +ifeq ($(filter preserve,$(DOCS)),preserve) +PFLAGS += -preserve +endif + +BUILD_DEPS = docs_ + +docs_: FORCE + @echo " Making documentation for $(COMPONENT) on $(PLATFORM)" + # first generate the xml files + nesdoc -o $(DOCDIR) $(NESDOC_FLAGS) $(PFLAGS) $(CFLAGS) $(COMPONENT).nc +ifneq ($(filter nohtml,$(DOCS)),nohtml) + # generate html from the xml files + nesdoc -o $(DOCDIR) -html -target=$(PLATFORM) $(DOCS) +endif