From cc28a246b5e0cca484e3c66dadfd584a268e2039 Mon Sep 17 00:00:00 2001 From: Chris Blanton Date: Fri, 7 Feb 2020 10:37:02 -0500 Subject: [PATCH] Revert "26 escape.git.version.string (#27)" This reverts commit 1a60b1a0f7e19b1381d71146bd2f0b4a204c1427. Revert the update to `mkmf -g` option that escaped the double quotes around the call to `git-version-string`. The reason is that this update causes some compiler wrappers to have quoting problems (#33) that resulted in `git-version-string`'s output not being quoted as needed. --- bin/mkmf | 4 ++-- t/t003-mkmf.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/mkmf b/bin/mkmf index 58a9712..e98845e 100755 --- a/bin/mkmf +++ b/bin/mkmf @@ -38,7 +38,7 @@ sub ensureTrailingSlash { local $/ = '/'; chomp @_[0]; @_[0] .= '/'; } -my $version = '19.3.1'; +my $version = '19.3.0'; # initialize variables: use getopts for these GetOptions("abspath|a=s" => \$opt_a, @@ -142,7 +142,7 @@ if ( $opt_c ) { } if ( $opt_g ) { - $opt_c .= ' -D_FILE_VERSION=\"`git-version-string $<`\"'; + $opt_c .= ' -D_FILE_VERSION="`git-version-string $<`"'; } &print_formatted_list("CPPDEFS = $opt_c") if $opt_c; diff --git a/t/t003-mkmf.sh b/t/t003-mkmf.sh index 783527d..a922938 100755 --- a/t/t003-mkmf.sh +++ b/t/t003-mkmf.sh @@ -112,7 +112,7 @@ teardown() { run mkmf -g [ "$status" -eq 0 ] [ -e Makefile ] - regexString='^CPPDEFS = -D_FILE_VERSION=\\"`git-version-string $<`\\"$' + regexString='^CPPDEFS = -D_FILE_VERSION="`git-version-string $<`"$' run grep -q "${regexString}" Makefile [ "$status" -eq 0 ] }