threads / patch / 32446

patchSort howto documents in howto-index.txt

Subject: [PATCH] Sort howto documents in howto-index.txt

## tl;dr

3 messages between Dec 22, 2012 and Dec 22, 2012. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Thomas Ackermann· Dec 22, 2012, 18:34 UTC · lore

Howto documents in howto-index.txt were listed in a rather random order. So better sort them.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/Makefile +1 −1
diff --git a/Documentation/Makefile b/Documentation/Makefile
index d7417b8..ff8ad9a 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -348,7 +348,7 @@ $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
 
 howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
 	$(QUIET_GEN)$(RM) $@+ $@ && \
-	'$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \
+	'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@+ && \
 	mv $@+ $@
 
 $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
-- 
1.8.0.msysgit.0



---
Thomas
Junio C Hamano· Dec 22, 2012, 19:40 UTC · re: Thomas Ackermann · lore

Re: [PATCH] Sort howto documents in howto-index.txt

Thomas Ackermann <th.acker@arcor.de> writes:
Show 5 quoted lines
> Howto documents in howto-index.txt were listed in a rather
> random order. So better sort them.
>
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---

I think $(wildcard) used to sort but in recent GNU make it no longer does, so this is probably a good change.

Do we need to explicitly sort the api-index as well? $(API_DOCS) is fed to the script that reads filenames one at a time in the given order, but I do not see anybody asking for a sorted list while producing that list. The result looks to be sorted in my build farm with GNU make 3.82, but that could be by accident.

Show 16 quoted lines
>  Documentation/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index d7417b8..ff8ad9a 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -348,7 +348,7 @@ $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
>  
>  howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
>  	$(QUIET_GEN)$(RM) $@+ $@ && \
> -	'$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \
> +	'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@+ && \
>  	mv $@+ $@
>  
>  $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
Thomas Ackermann· Dec 22, 2012, 19:54 UTC · re: Junio C Hamano · lore

Aw: Re: [PATCH] Sort howto documents in howto-index.txt

Show 10 quoted lines
> 
> I think $(wildcard) used to sort but in recent GNU make it no longer
> does, so this is probably a good change.
> 
> Do we need to explicitly sort the api-index as well?  $(API_DOCS) is
> fed to the script that reads filenames one at a time in the given
> order, but I do not see anybody asking for a sorted list while
> producing that list.  The result looks to be sorted in my build
> farm with GNU make 3.82, but that could be by accident.
> 

$(API_DOCS) is not fed to api-index.sh; it's only in the dependencies. api-index.sh uses "ls api-*.txt" internally which produces a correct sorting.

Unifying api-index.sh and howto-index.sh is on my todo list ...

--- Thomas

← back to recent threads