From 25fdd4bedc59a06ba3102867067c557e342bfc13 Mon Sep 17 00:00:00 2001 From: Matthew Andres Moreno Date: Thu, 13 Oct 2022 22:49:32 -0700 Subject: [PATCH] Ensure consistent autogen ordering Minimize diff sizes on updates --- include/uit_emp/_codegen/make_pop_headerguards.py | 2 +- include/uit_emp/_codegen/make_pop_macros.py | 2 +- include/uit_emp/_codegen/make_push_headerguards.py | 2 +- include/uit_emp/_codegen/make_push_macros.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uit_emp/_codegen/make_pop_headerguards.py b/include/uit_emp/_codegen/make_pop_headerguards.py index 0bc497495..7777d8db3 100755 --- a/include/uit_emp/_codegen/make_pop_headerguards.py +++ b/include/uit_emp/_codegen/make_pop_headerguards.py @@ -5,7 +5,7 @@ from pylib import iter_headerguards content = "#ifdef UIT_VENDORIZE_EMP\n" -for headerguard in iter_headerguards(): +for headerguard in sorted(iter_headerguards()): content += textwrap.dedent(f"""\ diff --git a/include/uit_emp/_codegen/make_pop_macros.py b/include/uit_emp/_codegen/make_pop_macros.py index 2553ade04..5c2c848c3 100755 --- a/include/uit_emp/_codegen/make_pop_macros.py +++ b/include/uit_emp/_codegen/make_pop_macros.py @@ -5,7 +5,7 @@ from pylib import iter_macros content = "#ifdef UIT_VENDORIZE_EMP\n" -for macro in iter_macros(): +for macro in sorted(iter_macros()): new_content = textwrap.dedent(f"""\ #ifdef {macro} diff --git a/include/uit_emp/_codegen/make_push_headerguards.py b/include/uit_emp/_codegen/make_push_headerguards.py index f30f2c8ef..66e5729dd 100755 --- a/include/uit_emp/_codegen/make_push_headerguards.py +++ b/include/uit_emp/_codegen/make_push_headerguards.py @@ -5,7 +5,7 @@ from pylib import iter_headerguards content = "#ifdef UIT_VENDORIZE_EMP\n" -for headerguard in iter_headerguards(): +for headerguard in sorted(iter_headerguards()): content += textwrap.dedent(f"""\ diff --git a/include/uit_emp/_codegen/make_push_macros.py b/include/uit_emp/_codegen/make_push_macros.py index e63456b57..7bb0570ca 100755 --- a/include/uit_emp/_codegen/make_push_macros.py +++ b/include/uit_emp/_codegen/make_push_macros.py @@ -5,7 +5,7 @@ from pylib import iter_macros content = "\n#ifdef UIT_VENDORIZE_EMP" -for macro in iter_macros(): +for macro in sorted(iter_macros()): new_content = textwrap.dedent(f"""\ #ifdef {macro}