@@ -100,42 +100,34 @@ endif
100
100
101
101
102
102
# #####################################################################
103
- # Naturaldocs (library reference related )
103
+ # Rustdoc (libcore/std )
104
104
# #####################################################################
105
105
106
- ifeq ($(CFG_NATURALDOCS ) ,)
107
- $(info cfg : no naturaldocs found, omitting library doc build)
106
+ ifeq ($(CFG_PANDOC ) ,)
107
+ $(info cfg : no pandoc found, omitting library doc build)
108
108
else
109
109
110
- define libdoc
111
- doc/$(1 ) /index.html: nd/$(1 ) /Languages.txt nd/$(1 ) /Topics.txt \
112
- nd/$(1 ) /lib.css $(2 )
113
- @$$(call E, naturaldocs: $$@ )
114
- $(CFG_NATURALDOCS ) -i $(S ) src/lib$(1 ) -o HTML doc/$(1 ) \
115
- -p nd/$(1 ) -r -s Default lib
116
-
117
- nd/$(1 ) /Languages.txt: $(S ) doc/Languages.txt
118
- @$$(call E, cp: $$@ )
119
- $(Q ) cp $$< $$@
110
+ # The rustdoc executable
111
+ RUSTDOC = $(HBIN2_H_$(CFG_HOST_TRIPLE ) ) /rustdoc$(X )
120
112
121
- nd/$(1 ) /Topics.txt: $(S ) doc/Topics.txt
122
- @$$(call E, cp: $$@ )
123
- $(Q ) cp $$< $$@
113
+ # The library documenting macro
114
+ # $(1) - The output directory
115
+ # $(2) - The crate file
116
+ # $(3) - The crate soruce files
117
+ define libdoc
118
+ doc/$(1 ) /index.html: $(2 ) $(3 ) $$(RUSTDOC ) doc/$(1 ) /rust.css
119
+ @$$(call E, rustdoc: $$@ )
120
+ $(Q )$(RUSTDOC ) $(2 ) --output-dir=doc/$(1 )
124
121
125
- nd /$(1 ) /lib .css: $(S ) doc/lib .css
122
+ doc /$(1 ) /rust .css: $(S ) doc/rust .css
126
123
@$$(call E, cp: $$@ )
127
124
$(Q ) cp $$< $$@
128
125
129
- GENERATED += nd/$(1 ) /Languages.txt \
130
- nd/$(1 ) /Topics.txt \
131
- nd/$(1 ) /Menu.txt \
132
- nd/$(1 ) /Data
133
-
134
- DOCS += doc/$(1 ) /index.html nd/$(1 ) /lib.css
126
+ DOCS += doc/$(1 ) /index.html
135
127
endef
136
128
137
- $(eval $(call libdoc,core,$(CORELIB_CRATE) $(CORELIB_INPUTS)))
138
- $(eval $(call libdoc,std,$(STDLIB_CRATE) $(STDLIB_INPUTS)))
129
+ $(eval $(call libdoc,core,$(CORELIB_CRATE), $(CORELIB_INPUTS)))
130
+ $(eval $(call libdoc,std,$(STDLIB_CRATE), $(STDLIB_INPUTS)))
139
131
endif
140
132
141
133
0 commit comments