rust/mk/docs.mk
Brian Anderson 7ae757583a Begin documenting std and add doc generation using naturaldocs
Naturaldocs isn't really that great but it seems easier to get
something working than with doxygen, for which we would need to
convert rust code to something C++ish. We probably want to just
write a rustdoc utility at some point.
2011-10-25 18:01:52 -07:00

35 lines
1.1 KiB
Makefile

######################################################################
# Doc variables and rules
######################################################################
doc/version.texi: $(MKFILES) rust.texi
@$(call E, version-stamp: $@)
$(Q)echo "@macro gitversion" >$@
$(Q)echo "$(CFG_VERSION)" >>$@
$(Q)echo "@end macro" >>$@
doc/%.pdf: %.texi doc/version.texi
@$(call E, texi2pdf: $@)
$(Q)texi2pdf --silent --batch -I doc -o $@ --clean $<
doc/%.html: %.texi doc/version.texi
@$(call E, makeinfo: $@)
$(Q)makeinfo -I doc --html --ifhtml --force --no-split --output=$@ $<
docsnap: doc/rust.pdf
@$(call E, snap: doc/rust-$(shell date +"%Y-%m-%d")-snap.pdf)
$(Q)mv $< doc/rust-$(shell date +"%Y-%m-%d")-snap.pdf
doc/std/index.html: nd/std/Languages.txt nd/std/Topics.txt \
$(STDLIB_CRATE) $(STDLIB_INPUTS)
@$(call E, naturaldocs: $@)
naturaldocs -i $(S)src/lib -o HTML doc/std -p nd/std -r
nd/std/Languages.txt: $(S)doc/Languages.txt
@$(call E, cp: $@)
$(Q)cp $< $@
nd/std/Topics.txt: $(S)doc/Topics.txt
@$(call E, cp: $@)
$(Q)cp $< $@