From 29441fd7bc60ec6010e64f5e8b702c4b6290cec4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Jun 2021 10:31:33 -0700 Subject: getopt-gnu: port back to Solaris 10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnulib-tool (func_emit_lib_Makefile_am) (func_emit_tests_Makefile_am): Don’t substitute things like $(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT), as this mishandles unistd and getopt-gnu, which breaks ‘make check’ on Solaris 10 with getopt-gnu. * pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am): Likewise, albeit hackier since I did not test this and so went with a trivial hack instead. --- pygnulib/GLEmiter.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pygnulib/GLEmiter.py') diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index e6b5a2a726..729862bc17 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -716,8 +716,12 @@ AC_DEFUN([%V1%_LIBSOURCES], [ pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M) amsnippet1 = pattern.sub('%s_%s_\\1' % (libname, libext), amsnippet1) + # FIXME: Use regular expression substitution instead + # of this hack. + amsnippet1 = amsnippet1.replace('$(GNULIB_$', '$(GNULIB!@#$%') amsnippet1 = amsnippet1.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_') + amsnippet1 = amsnippet1.replace('$(GNULIB!@#$%', '$(GNULIB_$') amsnippet1 = amsnippet1.replace( 'lib%_LIBRARIES', 'lib_LIBRARIES') amsnippet1 = amsnippet1.replace( @@ -741,8 +745,12 @@ AC_DEFUN([%V1%_LIBSOURCES], [ pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M) amsnippet2 = pattern.sub('%s_%s_\\1' % (libname, libext), amsnippet2) + # FIXME: Use regular expression substitution instead + # of this hack. + amsnippet2 = amsnippet2.replace('$(GNULIB_$', '$(GNULIB!@#$%') amsnippet2 = amsnippet2.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_') + amsnippet1 = amsnippet2.replace('$(GNULIB!@#$%', '$(GNULIB_$') if type(amsnippet1) is bytes: amsnippet1 = amsnippet1.decode(ENCS['default']) if type(amsnippet2) is bytes: @@ -1011,8 +1019,12 @@ AC_DEFUN([%V1%_LIBSOURCES], [ snippet = pattern.sub('', snippet) pattern = compiler('lib_([A-Z][A-Z](?:.*?))', re.S | re.M) snippet = pattern.sub('libtests_a_\\1', snippet) + # FIXME: Use regular expression substitution instead + # of this hack. + snippet = snippet.replace('$(GNULIB_$', '$(GNULIB!@#$%') snippet = snippet.replace( '$(GNULIB_', '$(' + module_indicator_prefix + '_GNULIB_') + snippet = snippet.replace('$(GNULIB!@#$%', '$(GNULIB_$') snippet = snippet.replace('lib%_LIBRARIES', 'lib_LIBRARIES') snippet = snippet.replace( 'lib%_LTLIBRARIES', 'lib_LTLIBRARIES') -- cgit v1.2.1