Skip to content

Commit 6614e46

Browse files
committed
Fix release/rpm targets
Signed-off-by: Henry Cox <[email protected]>
1 parent 1162c01 commit 6614e46

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

Makefile

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ SHARE_INST_DIR := $(DESTDIR)$(SHARE_DIR)
6060
SCRIPT_INST_DIR := $(SHARE_INST_DIR)/support-scripts
6161

6262
TMP_DIR := $(shell mktemp -d)
63-
FILES := $(wildcard bin/*) $(wildcard man/*) README Makefile \
64-
$(wildcard rpm/*) lcovrc
63+
FILES := README Makefile lcovrc \
64+
$(wildcard bin/*) $(wildcard example/*) $(wildcard lib/*) \
65+
$(wildcard man/*) $(wildcard rpm/*) $(wildcard scripts/*)
66+
DIST_CONTENT := CONTRIBUTING COPYING README Makefile lcovrc \
67+
bin example lib man rpm scripts tests
6568

6669
EXES = lcov genhtml geninfo genpng gendesc perl2lcov py2lcov
6770
# there may be both public and non-public user scripts - so lets not show
@@ -103,8 +106,8 @@ info:
103106

104107
clean:
105108
$(call echocmd," CLEAN lcov")
106-
rm -f lcov-*.tar.gz
107-
rm -f lcov-*.rpm
109+
$(RM) -f lcov-*.tar.gz lcov-*.rpm
110+
$(RM) -rf ./bin/__pycache__
108111
$(MAKE) -C example -s clean
109112
$(MAKE) -C tests -s clean
110113
find . -name '*.tdy' -o -name '*.orig' | xargs rm -f
@@ -192,18 +195,18 @@ dist: lcov-$(VERSION).tar.gz lcov-$(VERSION)-$(RELEASE).noarch.rpm \
192195

193196
lcov-$(VERSION).tar.gz: $(FILES)
194197
$(call echocmd," DIST lcov-$(VERSION).tar.gz")
198+
$(RM) -rf $(TMP_DIR)/lcov-$(VERSION)
195199
mkdir -p $(TMP_DIR)/lcov-$(VERSION)
196-
cp -r . $(TMP_DIR)/lcov-$(VERSION)
197-
rm -rf $(TMP_DIR)/lcov-$(VERSION)/.git
198-
bin/copy_dates.sh . $(TMP_DIR)/lcov-$(VERSION)
200+
cp -r $(DIST_CONTENT) $(TMP_DIR)/lcov-$(VERSION)
201+
./bin/copy_dates.sh . $(TMP_DIR)/lcov-$(VERSION)
199202
$(MAKE) -s -C $(TMP_DIR)/lcov-$(VERSION) clean >/dev/null
200203
cd $(TMP_DIR)/lcov-$(VERSION) ; \
201204
$(FIX) --version $(VERSION) --release $(RELEASE) \
202205
--verfile .version --fixver --fixdate \
203206
$(patsubst %,bin/%,$(EXES)) $(patsubst %,scripts/%,$(SCRIPTS)) \
204207
$(patsubst %,lib/%,$(LIBS)) \
205208
$(patsubst %,man/%,$(notdir $(MANPAGES))) README rpm/lcov.spec
206-
bin/get_changes.sh > $(TMP_DIR)/lcov-$(VERSION)/CHANGES
209+
./bin/get_changes.sh > $(TMP_DIR)/lcov-$(VERSION)/CHANGES || true
207210
cd $(TMP_DIR) ; \
208211
tar cfz $(TMP_DIR)/lcov-$(VERSION).tar.gz lcov-$(VERSION) \
209212
--owner root --group root
@@ -255,7 +258,7 @@ check:
255258
echo "*** Run once, force parallel ***" ; \
256259
LCOV_FORCE_PARALLEL=1 $(MAKE) -s -C tests check LCOV_HOME=`pwd` ; \
257260
echo "*** Run again, no force ***" ; \
258-
fi
261+
fi
259262
@$(MAKE) -s -C tests check LCOV_HOME=`pwd`
260263
@if [ "x$(COVERAGE)" != 'x' ] ; then \
261264
$(MAKE) -s -C tests report ; \

0 commit comments

Comments
 (0)