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 <[email protected]>
1 parent 1ad4f77 commit de33f51

18 files changed

+54
-586
lines changed

CHANGES

Lines changed: 0 additions & 551 deletions
This file was deleted.

Makefile

Lines changed: 16 additions & 15 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 13 additions & 0 deletions
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

Lines changed: 8 additions & 5 deletions
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)