manual: add support to autogenerate *-list.txt
PATCH 1/2 manual: add support to autogenerate *-list.txt
* autogenerate the package-list.txt file without any git command
* add script searching for deprecated stuff and generating the doc (support/script/deprecated.py)
--- docs/manual/manual.mk | 34 +++++++++++- support/scripts/deprecated.py | 117 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100755 support/scripts/deprecated.py
docs/manual/manual.mk +33 -1
@@ -18,12 +18,44 @@ $(1): $(1)-$(3) $(1)-$(3): $$(O)/docs/$(1)/$(1).$(4) $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) - @echo "Generating $(5) $(1)..." + @$(call MESSAGE,"Generating $(5) $(1)...") $(Q)mkdir -p $$(@D) $(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \ -D $$(@D) $$< endef +clean-package-lists: + -rm -f $(TOPDIR)/docs/manual/package-list.txt + -rm -f $(TOPDIR)/docs/manual/deprecated-list.txt + +$(TOPDIR)/docs/manual/package-list.txt: + @$(call MESSAGE,"Generating package list...") + @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\ + " > $@ + grep -rHE --color=never '\((autotools|cmake|generic)-package\)' \ + $(TOPDIR)/package/ | \ + cut -d':' -f1 | grep '\.mk$$' | \ + sed -e 's;.*\?/\(.*\?\).mk;* \1;' | \ + sort >> $@ + +$(TOPDIR)/docs/manual/deprecated-list.txt: + @$(call MESSAGE,"Generating deprecated list...") + python2 $(TOPDIR)/support/scripts/deprecated.py > $@ + +generate-doc-lists: clean-package-lists $(TOPDIR)/docs/manual/package-list.txt \ + $(TOPDIR)/docs/manual/deprecated-list.txt + ################################################################################ # GENDOC -- generates the make targets needed to build asciidoc documentation. #
support/scripts/deprecated.py new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 1/2 manual: add support to autogenerate *-list.txt
This patch has been reworked in the serie that I just post. So, it can be dropped.
Regards,
Signature · 1 line
Samuel
PATCH 2/2 manual: autogenerate *-list.txt
In reply to Samuel Martin* remove autogenerated package-list.txt (formerly named pkg-list.txt) and derecated-list.txt
* do not keep these files under git tracking
---
I wonder whether the deprecated-list.txt file should be kept under scm; here I've just removed it and auto-generate it whenever the manual is built.
It works well because the python script does not miss anything... so far.
However, at the end, manual checking is still recommended.
OTOH, keeping the deprecated-list.txt file under scm allows us to enforce synchronization between marking something as deprecated and the update of this list.
--- .gitignore | 2 + docs/manual/appendix.txt | 13 +- docs/manual/deprecated-list.txt | 46 --- docs/manual/manual.mk | 3 +- docs/manual/pkg-list.txt | 870 ---------------------------------------- 5 files changed, 7 insertions(+), 927 deletions(-) delete mode 100644 docs/manual/deprecated-list.txt delete mode 100644 docs/manual/pkg-list.txt
.gitignore +2 -0
@@ -12,3 +12,5 @@ *.orig *.rej *~ +/docs/manual/package-list.txt +/docs/manual/deprecated-list.txt
docs/manual/appendix.txt +3 -10
@@ -5,15 +5,8 @@ Appendix include::makedev-syntax.txt[] -[[package-list]] -Available packages ------------------- -// docs/manaual/pkg-list.txt is generated using the following command: -// $ git grep -E '\((autotools|cmake|generic)-package\)' package/ | \ -// cut -d':' -f1 | grep '\.mk$' | \ -// sed -e 's;.*\?/\(.*\?\).mk;* \1;' | \ -// sort > docs/manual/pkg-list.txt - -include::pkg-list.txt[] +// autogenerated +include::package-list.txt[] +// autogenerated include::deprecated-list.txt[]
docs/manual/deprecated-list.txt deleted +0 -46
46 lines not on this page · raw message
docs/manual/manual.mk +2 -1
@@ -17,7 +17,8 @@ $(1): $(1)-$(3) .PHONY: $(1)-$(3) $(1)-$(3): $$(O)/docs/$(1)/$(1).$(4) -$$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES) +$$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt generate-doc-lists \ + $$($(call UPPERCASE,$(1))_SOURCES) @$(call MESSAGE,"Generating $(5) $(1)...") $(Q)mkdir -p $$(@D) $(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \
docs/manual/pkg-list.txt deleted +0 -870
870 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 2/2 manual: autogenerate *-list.txt
Quoted 11 lines · Samuel Martin
I wonder whether the deprecated-list.txt file should be kept under scm; here I've just removed it and auto-generate it whenever the manual is built.
It works well because the python script does not miss anything... so far.
However, at the end, manual checking is still recommended.
OTOH, keeping the deprecated-list.txt file under scm allows us to enforce synchronization between marking something as deprecated and the update of this list.
I think these things should be kept under SCM. Not just because manual
checking is recommended, but also because I don't like writing anything outside the output directory. Some people may have the buildroot tree in a shared, readonly location.
Regards,
Arnout
Signature · 6 lines
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
PATCH 2/2 manual: autogenerate *-list.txt
Hi Arnout, all,
2012/11/25 Arnout Vandecappelle <[email protected]>:
Quoted 15 lines · Samuel Martin
Quoted 5 lines
I wonder whether the deprecated-list.txt file should be kept under scm; here I've just removed it and auto-generate it whenever the manual is built.
Quoted 7 lines
It works well because the python script does not miss anything... so far.
However, at the end, manual checking is still recommended.
OTOH, keeping the deprecated-list.txt file under scm allows us to enforce synchronization between marking something as deprecated and the update of this list.
Quoted 5 lines
I think these things should be kept under SCM. Not just because manual
checking is recommended, but also because I don't like writing anything outside
the output directory. Some people may have the buildroot tree in a shared, readonly location.
Right, I forgot this use case.
I'll rework it.
Regards,
Signature · 1 line
Samuel
PATCH 2/2 manual: autogenerate *-list.txt
2012/11/26 Samuel Martin <[email protected]>:
Quoted 18 lines
Hi Arnout, all,
2012/11/25 Arnout Vandecappelle <[email protected]>:
Quoted 15 lines · Samuel Martin
Quoted 12 lines
I wonder whether the deprecated-list.txt file should be kept under scm; here I've just removed it and auto-generate it whenever the manual is built.
It works well because the python script does not miss anything... so far.
However, at the end, manual checking is still recommended.
OTOH, keeping the deprecated-list.txt file under scm allows us to enforce synchronization between marking something as deprecated and the update of this list.
Quoted 9 lines
Quoted 5 lines
I think these things should be kept under SCM. Not just because manual
checking is recommended, but also because I don't like writing anything outside
the output directory. Some people may have the buildroot tree in a shared, readonly location.Right, I forgot this use case.
I'll rework it.
I've just post a rework of this serie, taking care this suggestion. So, this patch can be dropped.
Regards,
Signature · 1 line
Samuel