From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] doc: automate examples file list for API doc Date: Wed, 08 Feb 2017 13:08:28 +0100 Message-ID: <1665905.OHHQAK7vyE@xps13> References: <2081164.5ClB4gsZ3F@xps13> <20170127173728.21618-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: John McNamara , dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 09E6E952 for ; Wed, 8 Feb 2017 13:08:32 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id c85so194638206wmi.1 for ; Wed, 08 Feb 2017 04:08:32 -0800 (PST) In-Reply-To: <20170127173728.21618-1-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 [...] > +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.