mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
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.
This commit is contained in:
parent
a65ee63c71
commit
a93ecc2004
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user