Skip to content

Commit

Permalink
Revert "26 escape.git.version.string (NOAA-GFDL#27)"
Browse files Browse the repository at this point in the history
This reverts commit 1a60b1a.

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 (NOAA-GFDL#33)
that resulted in `git-version-string`'s output not being quoted as needed.
  • Loading branch information
Chris Blanton authored and Chris Blanton committed Feb 7, 2020
1 parent a8b5049 commit cc28a24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/mkmf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion t/t003-mkmf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
}
Expand Down

0 comments on commit cc28a24

Please sign in to comment.