From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnout Vandecappelle Date: Thu, 29 Nov 2012 01:11:22 +0100 Subject: [Buildroot] [PATCH 2/6] manual: add package-list.txt generation support In-Reply-To: <1354138832-18149-2-git-send-email-s.martin49@gmail.com> References: <1354138832-18149-1-git-send-email-s.martin49@gmail.com> <1354138832-18149-2-git-send-email-s.martin49@gmail.com> Message-ID: <50B6A82A.7050800@mind.be> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 28/11/12 22:40, Samuel Martin wrote: > > Signed-off-by: Samuel Martin > --- > 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) 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