Thread (9 messages) 9 messages, 3 authors, 2017-02-08

Re: [PATCH v2] doc: automate examples file list for API doc

From: Thomas Monjalon <hidden>
Date: 2017-02-08 12:08:32

2017-01-27 17:37, Ferruh Yigit:
These files are linked to API documentation as usage samples, list of
files created automatically during doc creation.

Remove manually updated old one.

Signed-off-by: Ferruh Yigit <redacted>
[...]
+API_EXAMPLES := $(RTE_OUTPUT)/doc/html/examples.dox
I feel it should be in $(RTE_OUTPUT)/doc/ because the doc could be generated
in another format (not HTML only).

[...]
 	@echo 'doxygen for API...'
 	$(Q)mkdir -p $(RTE_OUTPUT)/doc/html
 	$(Q)(cat $(RTE_SDK)/doc/api/doxy-api.conf     && \
+	    echo INPUT           += $(API_EXAMPLES)   && \
 	    printf 'PROJECT_NUMBER = '                && \
 	                      $(MAKE) -rR showversion && \
It would be nicer to see INPUT here.
 	    echo OUTPUT_DIRECTORY = $(RTE_OUTPUT)/doc && \
[...]
+$(API_EXAMPLES):
+	$(Q)mkdir -p $(RTE_OUTPUT)/doc/html
+	@echo "/**" > $(API_EXAMPLES)
+	@echo "@page examples DPDK Example Programs" >> $(API_EXAMPLES)
+	@echo "" >> $(API_EXAMPLES)
+	@find examples -type f -name "*.c" | awk '{ print "@example", $$0 }' >> $(API_EXAMPLES)
May I suggest this simpler syntax?
	find examples -type f -name '*.c' -printf '@example %p\n'

Please prefer simple quotes where possible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help