2011-05-01 22:18:52 +02:00
|
|
|
######################################################################
|
|
|
|
# Doc variables and rules
|
|
|
|
######################################################################
|
|
|
|
|
2011-11-23 16:24:56 +01:00
|
|
|
doc/keywords.texi: $(S)doc/keywords.txt $(S)src/etc/gen-keywords-table.py
|
|
|
|
@$(call E, gen-keywords-table: $@)
|
|
|
|
$(Q)$(S)src/etc/gen-keywords-table.py
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
doc/version.texi: $(MKFILE_DEPS) rust.texi
|
2011-06-25 21:23:27 +02:00
|
|
|
@$(call E, version-stamp: $@)
|
|
|
|
$(Q)echo "@macro gitversion" >$@
|
|
|
|
$(Q)echo "$(CFG_VERSION)" >>$@
|
|
|
|
$(Q)echo "@end macro" >>$@
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-12-30 21:47:43 +01:00
|
|
|
GENERATED += doc/keywords.texi doc/version.texi
|
|
|
|
|
2011-11-23 16:24:56 +01:00
|
|
|
doc/%.pdf: %.texi doc/version.texi doc/keywords.texi
|
2011-06-25 21:23:27 +02:00
|
|
|
@$(call E, texi2pdf: $@)
|
2011-11-05 17:32:58 +01:00
|
|
|
@# LC_COLLATE=C works around a bug in texi2dvi; see
|
|
|
|
@# https://bugzilla.redhat.com/show_bug.cgi?id=583011 and
|
|
|
|
@# https://github.com/graydon/rust/issues/1134
|
|
|
|
$(Q)LC_COLLATE=C texi2pdf --silent --batch -I doc -o $@ --clean $<
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-11-23 16:24:56 +01:00
|
|
|
doc/%.html: %.texi doc/version.texi doc/keywords.texi
|
2011-06-25 21:23:27 +02:00
|
|
|
@$(call E, makeinfo: $@)
|
|
|
|
$(Q)makeinfo -I doc --html --ifhtml --force --no-split --output=$@ $<
|
2011-05-01 22:18:52 +02:00
|
|
|
|
|
|
|
docsnap: doc/rust.pdf
|
2011-06-25 21:23:27 +02:00
|
|
|
@$(call E, snap: doc/rust-$(shell date +"%Y-%m-%d")-snap.pdf)
|
|
|
|
$(Q)mv $< doc/rust-$(shell date +"%Y-%m-%d")-snap.pdf
|
2011-10-25 00:25:41 +02:00
|
|
|
|
2011-12-06 01:46:37 +01:00
|
|
|
define libdoc
|
|
|
|
doc/$(1)/index.html: nd/$(1)/Languages.txt nd/$(1)/Topics.txt \
|
|
|
|
nd/$(1)/lib.css $(2)
|
|
|
|
@$$(call E, naturaldocs: $$@)
|
|
|
|
naturaldocs -i $(S)src/lib$(1) -o HTML doc/$(1) -p nd/$(1) -r -s Default lib
|
|
|
|
|
|
|
|
nd/$(1)/Languages.txt: $(S)doc/Languages.txt
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$(Q)cp $$< $$@
|
|
|
|
|
|
|
|
nd/$(1)/Topics.txt: $(S)doc/Topics.txt
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$(Q)cp $$< $$@
|
|
|
|
|
|
|
|
nd/$(1)/lib.css: $(S)doc/lib.css
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$(Q)cp $$< $$@
|
|
|
|
|
2011-12-30 21:47:43 +01:00
|
|
|
GENERATED += nd/$(1)/Languages.txt \
|
|
|
|
nd/$(1)/Topics.txt \
|
|
|
|
nd/$(1)/Menu.txt \
|
|
|
|
nd/$(1)/Data
|
|
|
|
|
|
|
|
DOCS += nd/$(1)/index.html nd/$(1)/lib.css
|
|
|
|
|
2011-12-06 01:46:37 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call libdoc,core,$(CORELIB_CRATE) $(CORELIB_INPUTS)))
|
|
|
|
$(eval $(call libdoc,std,$(STDLIB_CRATE) $(STDLIB_INPUTS)))
|
2011-12-30 21:47:43 +01:00
|
|
|
|
|
|
|
docs: $(DOCS)
|