[Buildroot] [PATCH 2/6] manual: add package-list.txt generation support

Arnout Vandecappelle arnout at mind.be
Thu Nov 29 00:11:22 UTC 2012


On 28/11/12 22:40, Samuel Martin wrote:
>
> Signed-off-by: Samuel Martin<s.martin49 at gmail.com>
> ---
>   docs/manual/manual.mk | 20 ++++++++++++++++++++
>   1 file changed, 20 insertions(+)
>
> diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
> index aa20534..c4a21b2 100644
> --- a/docs/manual/manual.mk
> +++ b/docs/manual/manual.mk
> @@ -24,6 +24,26 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES)
>   	  -D $$(@D) $$<
>   endef
>
> +$(TOPDIR)/docs/manual/package-list.txt:
> +	@echo -en "\
> +	//\n\
> +	// Autogenerated file\n\
> +	//\n\n\
> +	[[package-list]]\n\
> +	Available packages\n\
> +	------------------\n\n\
> +	// docs/manaual/pkg-list.txt is generated using the following command:\n\
> +	// $ git grep -E '\\((autotools|cmake|generic)-package\\)' package/ | \\\n\
> +	//     cut -d':' -f1 | grep '\\.mk$$' | \\\n\
> +	//     sed -e 's;.*\\?/\\(.*\\?\\).mk;* \\1;' | \\\n\
> +	//     sort>  docs/manual/pkg-list.txt\n\n\

  Since there is now support to do this, I don't think it makes sense to add this
to the .txt file.  Especially with the typo in manaual :-)

> +	">  $@
> +	grep -rHE --color=never '\((autotools|cmake|generic)-package\)' \
> +		$(TOPDIR)/package/ | \
> +		cut -d':' -f1 | grep '\.mk$$' | \

  Why not just 'grep -lrE' instead of this cut ?

> +		sed -e 's;.*\?/\(.*\?\).mk;* \1;' | \

  You can do the grep and sed together with

  sed -n -e '/.*\/\(.*\).mk$$/s//* \1/p'

(not sure why the \? was necessary)

> +		sort>>  $@

  Personally, I wouldn't have put this in the makefile but just in
support/scripts/gen-manual-pkg-list.sh.

  Regardless of these comments, this gets my

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>

  Regards,
  Arnout

> +
>   ################################################################################
>   # GENDOC -- generates the make targets needed to build asciidoc documentation.
>   #

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F



More information about the buildroot mailing list