forked from osmocom/wireshark
CMake: remove GIT_BIN_PARAM
Added inadb731c1cd
but never worked, and later corrected ine21da73826
. Correction however gave cygwin user problems with the perl optional parameter which droped qoutes around the path. But since the orginal commit never worked as intended in the beginning, it's assume safe to remove. Change-Id: I825a4e53b257d47601c330b210ac5ffb6870e0d9 Reviewed-on: https://code.wireshark.org/review/27758 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
1b6c702226
commit
790d490249
|
@ -1358,15 +1358,11 @@ endif()
|
|||
include(gmxTestLargeFiles)
|
||||
gmx_test_large_files(GMX_LARGEFILES)
|
||||
|
||||
if (GIT_EXECUTABLE)
|
||||
set(GIT_BIN_PARAM --git-bin ${GIT_EXECUTABLE})
|
||||
endif()
|
||||
set( VERSION ${PROJECT_VERSION} )
|
||||
add_custom_target(version
|
||||
BYPRODUCTS version.h
|
||||
COMMAND ${PERL_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/make-version.pl
|
||||
--set-vcs ${GIT_BIN_PARAM}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
set_target_properties(version PROPERTIES FOLDER "Auxiliary")
|
||||
|
@ -2704,7 +2700,6 @@ if(RPMBUILD_EXECUTABLE)
|
|||
execute_process(
|
||||
COMMAND ${PERL_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/make-version.pl
|
||||
--set-vcs ${GIT_BIN_PARAM}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ my $last_change = 0;
|
|||
my $num_commits = 0;
|
||||
my $commit_id = '';
|
||||
my $repo_branch = "unknown";
|
||||
my $git_executable = "git";
|
||||
my $git_description = undef;
|
||||
my $get_vcs = 0;
|
||||
my $set_vcs = 0;
|
||||
|
@ -139,13 +138,13 @@ sub read_repo_info {
|
|||
$version_pref{"svn_client"} = 1;
|
||||
} elsif (-d "$srcdir/.git/svn") {
|
||||
$info_source = "Command line (git-svn)";
|
||||
$info_cmd = "(cd $srcdir; $git_executable svn info)";
|
||||
$info_cmd = "(cd $srcdir; git svn info)";
|
||||
$is_git_repo = 1;
|
||||
$version_pref{"git_svn"} = 1;
|
||||
}
|
||||
|
||||
# Make sure git is available.
|
||||
if ($is_git_repo && !`$git_executable --version`) {
|
||||
if ($is_git_repo && !`git --version`) {
|
||||
print STDERR "Git unavailable. Git revision will be missing from version string.\n";
|
||||
return;
|
||||
}
|
||||
|
@ -192,13 +191,13 @@ sub read_repo_info {
|
|||
use warnings "all";
|
||||
no warnings "all";
|
||||
|
||||
chomp($line = qx{$git_executable --git-dir="$srcdir"/.git log -1 --pretty=format:%at});
|
||||
chomp($line = qx{git --git-dir="$srcdir"/.git log -1 --pretty=format:%at});
|
||||
if ($? == 0 && length($line) > 1) {
|
||||
$last_change = $line;
|
||||
}
|
||||
|
||||
# Commits since last annotated tag.
|
||||
chomp($line = qx{$git_executable --git-dir="$srcdir"/.git describe --abbrev=8 --long --always --match "v[1-9]*"});
|
||||
chomp($line = qx{git --git-dir="$srcdir"/.git describe --abbrev=8 --long --always --match "v[1-9]*"});
|
||||
if ($? == 0 && length($line) > 1) {
|
||||
my @parts = split(/-/, $line);
|
||||
$git_description = $line;
|
||||
|
@ -208,7 +207,7 @@ sub read_repo_info {
|
|||
|
||||
# This will break in some cases. Hopefully not during
|
||||
# official package builds.
|
||||
chomp($line = qx{$git_executable --git-dir="$srcdir"/.git rev-parse --abbrev-ref --symbolic-full-name \@\{upstream\} 2> $devnull});
|
||||
chomp($line = qx{git --git-dir="$srcdir"/.git rev-parse --abbrev-ref --symbolic-full-name \@\{upstream\} 2> $devnull});
|
||||
if ($? == 0 && length($line) > 1) {
|
||||
$repo_branch = basename($line);
|
||||
}
|
||||
|
@ -279,21 +278,21 @@ sub read_repo_info {
|
|||
# If someone had properly tagged 1.9.0 we could also use
|
||||
# "git describe --abbrev=1 --tags HEAD"
|
||||
|
||||
$info_cmd = "(cd $srcdir; $git_executable log --format='%b' -n 1)";
|
||||
$info_cmd = "(cd $srcdir; git log --format='%b' -n 1)";
|
||||
$line = qx{$info_cmd};
|
||||
if (defined($line)) {
|
||||
if ($line =~ /svn path=.*; revision=(\d+)/) {
|
||||
$num_commits = $1;
|
||||
}
|
||||
}
|
||||
$info_cmd = "(cd $srcdir; $git_executable log --format='%ad' -n 1 --date=iso)";
|
||||
$info_cmd = "(cd $srcdir; git log --format='%ad' -n 1 --date=iso)";
|
||||
$line = qx{$info_cmd};
|
||||
if (defined($line)) {
|
||||
if ($line =~ /(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/) {
|
||||
$last_change = timegm($6, $5, $4, $3, $2 - 1, $1);
|
||||
}
|
||||
}
|
||||
$info_cmd = "(cd $srcdir; $git_executable branch)";
|
||||
$info_cmd = "(cd $srcdir; git branch)";
|
||||
$line = qx{$info_cmd};
|
||||
if (defined($line)) {
|
||||
if ($line =~ /\* (\S+)/) {
|
||||
|
@ -627,7 +626,6 @@ sub get_config {
|
|||
"help|h", \$show_help,
|
||||
"get-vcs|get-svn|g", \$get_vcs,
|
||||
"set-vcs|set-svn|s", \$set_vcs,
|
||||
"git-bin=s" => \$git_executable,
|
||||
"print-vcs", \$print_vcs,
|
||||
"set-version|v", \$set_version,
|
||||
"set-release|r|package-version|p", \$set_release,
|
||||
|
|
Loading…
Reference in New Issue