diff options
author | Chris Wilson <chris+github@qwirx.com> | 2017-06-02 21:59:21 +0100 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2018-01-01 16:13:16 +0000 |
commit | 01755b62f6542d25a885a4fe26ce9fc1ac6decaf (patch) | |
tree | dd0dfc6b467c48c205a921d786c9c46b1c85f9e8 | |
parent | d22ea1891f8930b105665d896ad6c7d5034769cf (diff) |
Fix quoting of CXXFLAGS and LDFLAGS in Makefiles
Previously, it was impossible to include an @ sign in these flags (for example,
to link to support --with-ssl-headers=/usr/local/opt/openssl@1.1/include/)
because it was interpreted as a list variable name by Perl. Now the variables
are evaluated single-quoted before being substituted into the Makefile output.
(cherry picked from commit 2e9c90d3f32c69cc89d01fb64ced9fca80aae985)
-rwxr-xr-x | infrastructure/makebuildenv.pl.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in index e4379824..d5ac9f2f 100755 --- a/infrastructure/makebuildenv.pl.in +++ b/infrastructure/makebuildenv.pl.in @@ -391,6 +391,9 @@ if ($target_windows) print "done\n\nGenerating Makefiles...\n"; my $makefile_ifdef_prefix = $bsd_make ? "." : ""; +my $autoconf_cppflags = '@CPPFLAGS@'; +my $autoconf_cxxflags = '@CXXFLAGS_STRICT@'; +my $autoconf_ldflags = '@LDFLAGS@'; open MASTER_MAKEFILE, ">Makefile" or die "Makefile: $!"; print MASTER_MAKEFILE <<__E; @@ -412,13 +415,13 @@ WINDRES = @WINDRES@ # Work around a mistake in QDBM (using <angled> includes for a file not in the # system path) by adding it to the include path with -I. -DEFAULT_CFLAGS = \@CPPFLAGS@ $default_cflags \@CXXFLAGS_STRICT@ \\ +DEFAULT_CFLAGS = $autoconf_cppflags $default_cflags $autoconf_cxxflags \\ $extra_platform_defines $platform_compile_line_extra \\ -DBOX_VERSION="\\"$product_version\\"" -Iqdbm -DEFAULT_CXXFLAGS = \@CPPFLAGS@ $default_cxxflags \@CXXFLAGS_STRICT@ \\ +DEFAULT_CXXFLAGS = $autoconf_cppflags $default_cxxflags $autoconf_cxxflags \\ $extra_platform_defines $platform_compile_line_extra \\ -DBOX_VERSION="\\"$product_version\\"" -LDFLAGS += \@LDFLAGS@ \@LDADD_RDYNAMIC@ $platform_link_line_extra +LDFLAGS += $autoconf_ldflags \@LDADD_RDYNAMIC@ $platform_link_line_extra RELEASE_CFLAGS = \$(DEFAULT_CFLAGS) -DBOX_RELEASE_BUILD $release_flags RELEASE_CXXFLAGS = \$(DEFAULT_CXXFLAGS) -DBOX_RELEASE_BUILD $release_flags |