From a93ecc20045b8faa129fd32d2663624429851949 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 25 Jun 2018 09:27:26 +0100 Subject: [PATCH] glib-mkenums: fix @filename@ in file-head/-tail If @filename@ or @basename@ are used in the head and tail of the template, the path/basename of the first and last file to be processed are substituted. 9023fa350d6271811e75d06848a3772fff8588b1 sorts the list of files being processed, in the name of producing reproducible output regardless of command-line ordering. But this was done only when iterating the files, not when generating the head and tail. For consistency, sort sooner. --- gobject/glib-mkenums.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in index fe9a10756..1d2052ce7 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -415,6 +415,8 @@ def replace_specials(prod): prod = prod.rstrip() return prod +options.args.sort() + if len(fhead) > 0: prod = fhead base = os.path.basename(options.args[0]) @@ -707,7 +709,7 @@ def process_file(curfilename): prod = replace_specials(prod) write_output(prod) -for fname in sorted(options.args): +for fname in options.args: process_file(fname) if len(ftail) > 0: