Thread (14 messages) 14 messages, 2 authors, 2016-06-15

[PATCH v5 4/6] Makefile: update to new command-list.txt format

flat view
STALE3767d

From: Sébastien Guimmara <hidden>
Date: 2016-06-15 23:04:42
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Revision v5 of 3 in this series.

Revisions (3)
  1. v5 current
  2. v1 [diff vs current]
  3. v7 [diff vs current]
* In target common-cmds.h:
  The AWK script 'generate-cmdlist.awk' replaces 'generate-cmdlist.sh'

* In target check-docs:
  command-list.txt now contains common commands group in
  the header [common]. sed ignore all lines in command-list.txt
  until the [commands] list to correctly checks for missing
  documentation on Git commands.

For the target common-cmds.h part:
Signed-off-by: Eric Sunshine <redacted>

For the target check-docs part:
Helped-by: Eric Sunshine [off-list ref]
Signed-off-by: Sébastien Guimmara <redacted>
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 5f3987f..9f333e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1687,10 +1687,10 @@ $(BUILT_INS): git$X
 	ln -s $< $@ 2>/dev/null || \
 	cp $< $@
 
-common-cmds.h: ./generate-cmdlist.sh command-list.txt
+common-cmds.h: generate-cmdlist.awk command-list.txt
 
 common-cmds.h: $(wildcard Documentation/git-*.txt)
-	$(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
+	$(QUIET_GEN)awk -f generate-cmdlist.awk command-list.txt > $@+ && mv $@+ $@
 
 SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
 	$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
@@ -2447,7 +2447,7 @@ check-docs::
 		esac ; \
 		test -f "Documentation/$$v.txt" || \
 		echo "no doc: $$v"; \
-		sed -e '/^#/d' command-list.txt | \
+		sed -e '1,/^\[commands\]/d' <command-list.txt | \
 		grep -q "^$$v[ 	]" || \
 		case "$$v" in \
 		git) ;; \
@@ -2455,7 +2455,7 @@ check-docs::
 		esac ; \
 	done; \
 	( \
-		sed -e '/^#/d' \
+		sed -e '1,/^\[commands\]/d' \
 		    -e 's/[ 	].*//' \
 		    -e 's/^/listed /' command-list.txt; \
 		$(MAKE) -C Documentation print-man1 | \
-- 
2.4.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help