Skip to content

Commit de33f51

Browse files
committed
lcov: Finalize release 1.12
- Use full git describe output as tool version - Update version numbers and last-changed-dates in man pages, spec and README file - Replace static CHANGES file with git log - Switch Makefile logic to use mktemp for generating a temporary directory Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
1 parent 1ad4f77 commit de33f51

18 files changed

+54
-586
lines changed

CHANGES

-551
This file was deleted.

Makefile

+16-15
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313

1414
VERSION := $(shell bin/get_version.sh --version)
1515
RELEASE := $(shell bin/get_version.sh --release)
16+
FULL := $(shell bin/get_version.sh --full)
1617

1718
CFG_DIR := $(PREFIX)/etc
1819
BIN_DIR := $(PREFIX)/usr/bin
1920
MAN_DIR := $(PREFIX)/usr/share/man
20-
TMP_DIR := /tmp/lcov-tmp.$(shell echo $$$$)
21-
FILES := $(wildcard bin/*) $(wildcard man/*) README CHANGES Makefile \
21+
TMP_DIR := $(shell mktemp -d)
22+
FILES := $(wildcard bin/*) $(wildcard man/*) README Makefile \
2223
$(wildcard rpm/*) lcovrc
2324

2425
.PHONY: all info clean install uninstall rpms
@@ -49,17 +50,17 @@ install:
4950
bin/install.sh man/gendesc.1 $(MAN_DIR)/man1/gendesc.1 -m 644
5051
bin/install.sh man/lcovrc.5 $(MAN_DIR)/man5/lcovrc.5 -m 644
5152
bin/install.sh lcovrc $(CFG_DIR)/lcovrc -m 644
52-
bin/updateversion.pl $(BIN_DIR)/lcov $(VERSION) $(RELEASE)
53-
bin/updateversion.pl $(BIN_DIR)/genhtml $(VERSION) $(RELEASE)
54-
bin/updateversion.pl $(BIN_DIR)/geninfo $(VERSION) $(RELEASE)
55-
bin/updateversion.pl $(BIN_DIR)/genpng $(VERSION) $(RELEASE)
56-
bin/updateversion.pl $(BIN_DIR)/gendesc $(VERSION) $(RELEASE)
57-
bin/updateversion.pl $(MAN_DIR)/man1/lcov.1 $(VERSION) $(RELEASE)
58-
bin/updateversion.pl $(MAN_DIR)/man1/genhtml.1 $(VERSION) $(RELEASE)
59-
bin/updateversion.pl $(MAN_DIR)/man1/geninfo.1 $(VERSION) $(RELEASE)
60-
bin/updateversion.pl $(MAN_DIR)/man1/genpng.1 $(VERSION) $(RELEASE)
61-
bin/updateversion.pl $(MAN_DIR)/man1/gendesc.1 $(VERSION) $(RELEASE)
62-
bin/updateversion.pl $(MAN_DIR)/man5/lcovrc.5 $(VERSION) $(RELEASE)
53+
bin/updateversion.pl $(BIN_DIR)/lcov $(VERSION) $(RELEASE) $(FULL)
54+
bin/updateversion.pl $(BIN_DIR)/genhtml $(VERSION) $(RELEASE) $(FULL)
55+
bin/updateversion.pl $(BIN_DIR)/geninfo $(VERSION) $(RELEASE) $(FULL)
56+
bin/updateversion.pl $(BIN_DIR)/genpng $(VERSION) $(RELEASE) $(FULL)
57+
bin/updateversion.pl $(BIN_DIR)/gendesc $(VERSION) $(RELEASE) $(FULL)
58+
bin/updateversion.pl $(MAN_DIR)/man1/lcov.1 $(VERSION) $(RELEASE) $(FULL)
59+
bin/updateversion.pl $(MAN_DIR)/man1/genhtml.1 $(VERSION) $(RELEASE) $(FULL)
60+
bin/updateversion.pl $(MAN_DIR)/man1/geninfo.1 $(VERSION) $(RELEASE) $(FULL)
61+
bin/updateversion.pl $(MAN_DIR)/man1/genpng.1 $(VERSION) $(RELEASE) $(FULL)
62+
bin/updateversion.pl $(MAN_DIR)/man1/gendesc.1 $(VERSION) $(RELEASE) $(FULL)
63+
bin/updateversion.pl $(MAN_DIR)/man5/lcovrc.5 $(VERSION) $(RELEASE) $(FULL)
6364

6465
uninstall:
6566
bin/install.sh --uninstall bin/lcov $(BIN_DIR)/lcov
@@ -79,12 +80,12 @@ dist: lcov-$(VERSION).tar.gz lcov-$(VERSION)-$(RELEASE).noarch.rpm \
7980
lcov-$(VERSION)-$(RELEASE).src.rpm
8081

8182
lcov-$(VERSION).tar.gz: $(FILES)
82-
mkdir $(TMP_DIR)
8383
mkdir $(TMP_DIR)/lcov-$(VERSION)
8484
cp -r * $(TMP_DIR)/lcov-$(VERSION)
8585
bin/copy_dates.sh . $(TMP_DIR)/lcov-$(VERSION)
8686
make -C $(TMP_DIR)/lcov-$(VERSION) clean
87-
bin/updateversion.pl $(TMP_DIR)/lcov-$(VERSION) $(VERSION) $(RELEASE)
87+
bin/updateversion.pl $(TMP_DIR)/lcov-$(VERSION) $(VERSION) $(RELEASE) $(FULL)
88+
bin/get_changes.sh > $(TMP_DIR)/lcov-$(VERSION)/CHANGES
8889
cd $(TMP_DIR) ; \
8990
tar cfz $(TMP_DIR)/lcov-$(VERSION).tar.gz lcov-$(VERSION)
9091
mv $(TMP_DIR)/lcov-$(VERSION).tar.gz .

README

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-------------------------------------------------
22
- README file for the LTP GCOV extension (LCOV) -
3-
- Last changes: 2014-05-23 -
3+
- Last changes: 2014-06-18 -
44
-------------------------------------------------
55

66
Description

bin/gendesc

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use Cwd qw/abs_path/;
4343

4444
# Constants
4545
our $tool_dir = abs_path(dirname($0));
46-
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --version`;
46+
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --full`;
4747
our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php";
4848
our $tool_name = basename($0);
4949

bin/genhtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ use Cwd qw/abs_path/;
7575
# Global constants
7676
our $title = "LCOV - code coverage report";
7777
our $tool_dir = abs_path(dirname($0));
78-
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --version`;
78+
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --full`;
7979
our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php";
8080
our $tool_name = basename($0);
8181

bin/geninfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if( $^O eq "msys" )
6363

6464
# Constants
6565
our $tool_dir = abs_path(dirname($0));
66-
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --version`;
66+
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --full`;
6767
our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php";
6868
our $gcov_tool = "gcov";
6969
our $tool_name = basename($0);

bin/genpng

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use Cwd qw/abs_path/;
3737

3838
# Constants
3939
our $tool_dir = abs_path(dirname($0));
40-
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --version`;
40+
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --full`;
4141
our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php";
4242
our $tool_name = basename($0);
4343

bin/get_changes.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
#
3+
# Usage: get_changes.sh
4+
#
5+
# Print lcov change log information as provided by Git
6+
7+
TOOLDIR=$(cd $(dirname $0) ; pwd)
8+
9+
cd $TOOLDIR
10+
11+
if ! git --no-pager log --no-merges --decorate=short --color=never 2>/dev/null ; then
12+
cat "$TOOLDIR/../CHANGES" 2>/dev/null
13+
fi

bin/get_version.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Usage: get_version.sh --version|--release
3+
# Usage: get_version.sh --version|--release|--full
44
#
55
# Print lcov version or release information as provided by Git, .version
66
# or a fallback.
@@ -15,6 +15,7 @@ if [ -z "$GITVER" ] ; then
1515
fi
1616
else
1717
# Get version information from git
18+
FULL=${GITVER:1}
1819
VERSION=${GITVER%%-*}
1920
VERSION=${VERSION:1}
2021
if [ "${GITVER#*-}" != "$GITVER" ] ; then
@@ -24,8 +25,10 @@ else
2425
fi
2526

2627
# Fallback
27-
[ -z "$VERSION" ] && VERSION=1.0
28-
[ -z "$RELEASE" ] && RELEASE=1
28+
[ -z "$VERSION" ] && VERSION="1.0"
29+
[ -z "$RELEASE" ] && RELEASE="1"
30+
[ -z "$FULL" ] && FULL="$VERSION"
2931

30-
[ "$1" == "--version" ] && echo -n $VERSION
31-
[ "$1" == "--release" ] && echo -n $RELEASE
32+
[ "$1" == "--version" ] && echo -n "$VERSION"
33+
[ "$1" == "--release" ] && echo -n "$RELEASE"
34+
[ "$1" == "--full" ] && echo -n "$FULL"

bin/lcov

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use Cwd qw /abs_path getcwd/;
7272

7373
# Global constants
7474
our $tool_dir = abs_path(dirname($0));
75-
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --version`;
75+
our $lcov_version = 'LCOV version '.`$tool_dir/get_version.sh --full`;
7676
our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php";
7777
our $tool_name = basename($0);
7878

bin/updateversion.pl

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
our $directory = $ARGV[0];
1515
our $version = $ARGV[1];
1616
our $release = $ARGV[2];
17+
our $full = $ARGV[3];
1718

1819
our @man_pages = ("man/gendesc.1", "man/genhtml.1", "man/geninfo.1",
1920
"man/genpng.1", "man/lcov.1", "man/lcovrc.5");
@@ -23,7 +24,7 @@
2324
our @spec_files = ("rpm/lcov.spec");
2425

2526
if (!defined($directory) || !defined($version) || !defined($release)) {
26-
die("Usage: $0 DIRECTORY|FILE VERSION RELEASE\n");
27+
die("Usage: $0 DIRECTORY|FILE VERSION RELEASE FULL_VERSION\n");
2728
}
2829

2930
# Determine mode of operation
@@ -127,7 +128,7 @@ ($)
127128
open(OUT, ">$filename.new") ||
128129
die("Error: cannot create $filename.new\n");
129130
while (<IN>) {
130-
s/^(our\s+\$lcov_version\s*=).*$/$1 "LCOV version $version";/g;
131+
s/^(our\s+\$lcov_version\s*=).*$/$1 "LCOV version $full";/g;
131132
print(OUT $_);
132133
}
133134
close(OUT);
@@ -187,5 +188,6 @@ ($)
187188
open($fd, ">", $filename) or die("Error: cannot write $filename: $!\n");
188189
print($fd "VERSION=$version\n");
189190
print($fd "RELEASE=$release\n");
191+
print($fd "FULL=$full\n");
190192
close($fd);
191193
}

man/gendesc.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH gendesc 1 "LCOV 1.11" 2014\-05\-23 "User Manuals"
1+
.TH gendesc 1 "LCOV 1.12" 2014\-06\-10 "User Manuals"
22
.SH NAME
33
gendesc \- Generate a test case description file
44
.SH SYNOPSIS

man/genhtml.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH genhtml 1 "LCOV 1.11" 2014\-05\-23 "User Manuals"
1+
.TH genhtml 1 "LCOV 1.12" 2014\-09\-26 "User Manuals"
22
.SH NAME
33
genhtml \- Generate HTML view from LCOV coverage data files
44
.SH SYNOPSIS

man/geninfo.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH geninfo 1 "LCOV 1.11" 2014\-05\-23 "User Manuals"
1+
.TH geninfo 1 "LCOV 1.12" 2015\-04\-22 "User Manuals"
22
.SH NAME
33
geninfo \- Generate tracefiles from .da files
44
.SH SYNOPSIS

man/genpng.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH genpng 1 "LCOV 1.11" 2014\-05\-23 "User Manuals"
1+
.TH genpng 1 "LCOV 1.12" 2014\-06\-10 "User Manuals"
22
.SH NAME
33
genpng \- Generate an overview image from a source file
44
.SH SYNOPSIS

man/lcov.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH lcov 1 "LCOV 1.11" 2014\-05\-23 "User Manuals"
1+
.TH lcov 1 "LCOV 1.12" 2014\-06\-10 "User Manuals"
22
.SH NAME
33
lcov \- a graphical GCOV front\-end
44
.SH SYNOPSIS

man/lcovrc.5

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH lcovrc 5 "LCOV 1.11" 2014\-05\-23 "User Manuals"
1+
.TH lcovrc 5 "LCOV 1.12" 2015\-04\-22 "User Manuals"
22

33
.SH NAME
44
lcovrc \- lcov configuration file

rpm/lcov.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Summary: A graphical GCOV front-end
22
Name: lcov
3-
Version: 1.11
3+
Version: 1.12
44
Release: 1
55
License: GPL
66
Group: Development/Tools

0 commit comments

Comments
 (0)