Skip to contentSkip to conversation

support: trivial fixes (typos and minor rewording) in gen-manual-lists.py

PATCH New Samuel Martin 2 participants 4 messages Oct 6, 2013 – Oct 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 support: trivial fixes (typos and minor rewording) in gen-manual-lists.py

---
Changes v1 -> v2:
- split patch content
- detail a bit more the commit message

---
 support/scripts/gen-manual-lists.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
support/scripts/gen-manual-lists.py +4 -5
index 3568843..5c81e1d 100755
@@ -107,7 +107,7 @@ def get_symbol_parents(item, root=None, enable_choice=False):
         parent = parent.get_parent()
     if isinstance(root, kconfiglib.Menu) or \
             (enable_choice and isinstance(root, kconfiglib.Choice)):
-        parents.append("") # Dummy empty parrent to get a leading arrow ->
+        parents.append("") # Dummy empty parent to get a leading arrow ->
     parents.reverse()
     return parents
 
@@ -126,15 +126,14 @@ def format_asciidoc_table(root, get_label_func, filter_func=lambda x: True,
     :param sub_menu:       Output the column with the sub-menu path
 
     """
-    def _format_entry(label, parents, sub_menu):
+    def _format_entry(item, parents, sub_menu):
         """ Format an asciidoc table entry.
 
         """
         if sub_menu:
-            return "| {0:<40} <| {1}\n".format(label, " -> ".join(parents))
+            return "| {0:<40} <| {1}\n".format(item, " -> ".join(parents))
         else:
-            return "| {0:<40}\n".format(label)
-
+            return "| {0:<40}\n".format(item)
     lines = []
     for item in get_symbol_subset(root, filter_func):
         if not item.is_symbol() or not item.prompts:
Signature · 1 line
1.8.4
#1 lore raw

PATCH 2/2 manual: move the manual rsync directory under $(O)/build/

This patch just moves the manual source/build directory in $(O)/build/ (currently this location is $(O)/docs/manual/.build/, which is removed at this end of the manual generation).

This location is used to:
- generate the package list files
- rsync the *.txt source from docs/manual/

The output manuals are still generated in $(O)/docs/manual/, so the release target is unchanged.

Moving the manual source/build directory is more consistent with the rest of how Buildroot works.
This also avoid to remove the *.txt that are generated and are actually used by a2x, this is very helpful for investigating asdciidoc/dblatex/texlive related issues.

---
Changes v1 -> v2:
- split patch content
- detail a bit more the commit message

---
 docs/manual/manual.mk | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
docs/manual/manual.mk +7 -6
index d092d3f..84acaae 100644
@@ -1,6 +1,8 @@
+MANUAL_BUILDDIR = $(BUILD_DIR)/buildroot-manual
 manual-update-lists:
 	$(Q)$(call MESSAGE,"Updating the manual lists...")
-	$(Q)BR2_DEFCONFIG="" TOPDIR=$(TOPDIR) O=$(O)/docs/manual/.build \
+	$(Q)mkdir -p $(MANUAL_BUILDDIR)
+	$(Q)BR2_DEFCONFIG="" TOPDIR=$(TOPDIR) O=$(MANUAL_BUILDDIR) \
 		$(TOPDIR)/support/scripts/gen-manual-lists.py
 
 ################################################################################
@@ -26,11 +28,10 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt \
 			   $$($(call UPPERCASE,$(1))_SOURCES) \
 			   manual-update-lists
 	$(Q)$(call MESSAGE,"Generating $(5) $(1)...")
-	$(Q)mkdir -p $$(@D)/.build
-	$(Q)rsync -au docs/$(1)/*.txt $$(@D)/.build
+	$(Q)mkdir -p $$(@D) $(MANUAL_BUILDDIR)
+	$(Q)rsync -au docs/$(1)/*.txt $(MANUAL_BUILDDIR)
 	$(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \
-	        -D $$(@D) $$(@D)/.build/$(1).txt
-	-$(Q)rm -rf $$(@D)/.build
+		-D $$(@D) $(MANUAL_BUILDDIR)/$(1).txt
 endef
 
 ################################################################################
@@ -49,7 +50,7 @@ $(call GENDOC_INNER,$(1),text,txt,text,text)
 $(call GENDOC_INNER,$(1),epub,epub,epub,ePUB)
 clean: $(1)-clean
 $(1)-clean:
-	$(Q)$(RM) -rf $(O)/docs/$(1)
+	$(Q)$(RM) -rf $(O)/docs/$(1) $(MANUAL_BUILDDIR)
 .PHONY: $(1) $(1)-clean manual-update-lists
 endef
 
Signature · 1 line
1.8.4
#2 lore raw

PATCH 2/2 manual: move the manual rsync directory under $(O)/build/

Quoted 11 lines · Samuel Martin

This patch just moves the manual source/build directory in $(O)/build/ (currently this location is $(O)/docs/manual/.build/, which is removed at this end of the manual generation).

This location is used to:
- generate the package list files
- rsync the *.txt source from docs/manual/

The output manuals are still generated in $(O)/docs/manual/, so the release target is unchanged.

Quoted 7 lines

Moving the manual source/build directory is more consistent with the rest of how Buildroot works.
This also avoid to remove the *.txt that are generated and are actually used by a2x, this is very helpful for investigating asdciidoc/dblatex/texlive related issues.

Quoted 48 lines

---
Changes v1 -> v2:
- split patch content
- detail a bit more the commit message

---
  docs/manual/manual.mk | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
docs/manual/manual.mk +7 -6
index d092d3f..84acaae 100644
@@ -1,6 +1,8 @@
+MANUAL_BUILDDIR = $(BUILD_DIR)/buildroot-manual
  manual-update-lists:
  	$(Q)$(call MESSAGE,"Updating the manual lists...")
-	$(Q)BR2_DEFCONFIG="" TOPDIR=$(TOPDIR) O=$(O)/docs/manual/.build \
+	$(Q)mkdir -p $(MANUAL_BUILDDIR)
+	$(Q)BR2_DEFCONFIG="" TOPDIR=$(TOPDIR) O=$(MANUAL_BUILDDIR) \
  		$(TOPDIR)/support/scripts/gen-manual-lists.py
 
  ################################################################################
@@ -26,11 +28,10 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt \
  			   $$($(call UPPERCASE,$(1))_SOURCES) \
  			   manual-update-lists
  	$(Q)$(call MESSAGE,"Generating $(5) $(1)...")
-	$(Q)mkdir -p $$(@D)/.build
-	$(Q)rsync -au docs/$(1)/*.txt $$(@D)/.build
+	$(Q)mkdir -p $$(@D) $(MANUAL_BUILDDIR)
+	$(Q)rsync -au docs/$(1)/*.txt $(MANUAL_BUILDDIR)
  	$(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \
-	        -D $$(@D) $$(@D)/.build/$(1).txt
-	-$(Q)rm -rf $$(@D)/.build
+		-D $$(@D) $(MANUAL_BUILDDIR)/$(1).txt
  endef
 
  ################################################################################
@@ -49,7 +50,7 @@ $(call GENDOC_INNER,$(1),text,txt,text,text)
  $(call GENDOC_INNER,$(1),epub,epub,epub,ePUB)
  clean: $(1)-clean
  $(1)-clean:
-	$(Q)$(RM) -rf $(O)/docs/$(1)
+	$(Q)$(RM) -rf $(O)/docs/$(1) $(MANUAL_BUILDDIR)
  .PHONY: $(1) $(1)-clean manual-update-lists
  endef
 
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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
#3 lore raw

PATCH 1/2 support: trivial fixes (typos and minor rewording) in gen-manual-lists.py

In reply to Samuel Martin
Quoted 1 line · Samuel Martin

Regards,
Arnout

Quoted 42 lines

---
Changes v1 -> v2:
- split patch content
- detail a bit more the commit message

---
  support/scripts/gen-manual-lists.py | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)
support/scripts/gen-manual-lists.py +4 -5
index 3568843..5c81e1d 100755
@@ -107,7 +107,7 @@ def get_symbol_parents(item, root=None, enable_choice=False):
          parent = parent.get_parent()
      if isinstance(root, kconfiglib.Menu) or \
              (enable_choice and isinstance(root, kconfiglib.Choice)):
-        parents.append("") # Dummy empty parrent to get a leading arrow ->
+        parents.append("") # Dummy empty parent to get a leading arrow ->
      parents.reverse()
      return parents
 
@@ -126,15 +126,14 @@ def format_asciidoc_table(root, get_label_func, filter_func=lambda x: True,
      :param sub_menu:       Output the column with the sub-menu path
 
      """
-    def _format_entry(label, parents, sub_menu):
+    def _format_entry(item, parents, sub_menu):
          """ Format an asciidoc table entry.
 
          """
          if sub_menu:
-            return "| {0:<40} <| {1}\n".format(label, " -> ".join(parents))
+            return "| {0:<40} <| {1}\n".format(item, " -> ".join(parents))
          else:
-            return "| {0:<40}\n".format(label)
-
+            return "| {0:<40}\n".format(item)
      lines = []
      for item in get_symbol_subset(root, filter_func):
          if not item.is_symbol() or not item.prompts:
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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