changeset 38838:afb7d857d580

gnulib-tool.py: Keep substitution order like in gnulib-tool. This should be a no-op change. Just for easier parallel maintenance with gnulib-tool.
author Bruno Haible <bruno@clisp.org>
date Sat, 09 Sep 2017 14:16:35 +0200
parents c3fece354ba9
children 7a3e867d5bee
files pygnulib/GLEmiter.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pygnulib/GLEmiter.py	Sat Sep 09 12:48:58 2017 +0200
+++ b/pygnulib/GLEmiter.py	Sat Sep 09 14:16:35 2017 +0200
@@ -711,6 +711,9 @@
                     'lib%_LIBRARIES', 'lib_LIBRARIES')
                 amsnippet1 = amsnippet1.replace(
                     'lib%_LTLIBRARIES', 'lib_LTLIBRARIES')
+                if check_PROGRAMS:
+                    amsnippet1 = amsnippet1.replace(
+                        'check_PROGRAMS', 'noinst_PROGRAMS')
                 amsnippet1 = amsnippet1.replace('${gl_include_guard_prefix}',
                                                 include_guard_prefix)
                 if str(module) == 'alloca':
@@ -718,11 +721,8 @@
                         (libname, libext, perhapsLT)
                     amsnippet1 += '%s_%s_DEPENDENCIES += @%sALLOCA@\n' % \
                         (libname, libext, perhapsLT)
-                if check_PROGRAMS:
-                    amsnippet1 = amsnippet1.replace(
-                        'check_PROGRAMS', 'noinst_PROGRAMS')
 
-                # Get unconditional snippet, edit it and save to amsnippet1.
+                # Get unconditional snippet, edit it and save to amsnippet2.
                 amsnippet2 = module.getAutomakeSnippet_Unconditional()
                 pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M)
                 amsnippet2 = pattern.sub('%s_%s_\\1' %
@@ -996,11 +996,11 @@
                 snippet = snippet.replace('lib%_LIBRARIES', 'lib_LIBRARIES')
                 snippet = snippet.replace(
                     'lib%_LTLIBRARIES', 'lib_LTLIBRARIES')
-                snippet = snippet.replace('${gl_include_guard_prefix}',
-                                          include_guard_prefix)
                 if check_PROGRAMS:
                     snippet = snippet.replace(
                         'check_PROGRAMS', 'noinst_PROGRAMS')
+                snippet = snippet.replace('${gl_include_guard_prefix}',
+                                          include_guard_prefix)
                 # Check if module is 'alloca'.
                 if libtests and str(module) == 'alloca':
                     snippet += 'libtests_a_LIBADD += @%sALLOCA@\n' % perhapsLT