From efc000a1f20f0978112c25b7be8232638cb5b2fb Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sun, 16 Jul 2023 14:31:13 +1200 Subject: [PATCH] Only set the variables that need git if .git directory is present. This will shield trying to set those if the Makefile is being used from a release tarball. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 77300f1..f74eddc 100755 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ package=mythtv-status releases=sid release=sid +# These variables are used by Andrew in a git checkout for packaging and releasing. +ifneq ("$(wildcard .git)", "") build=dpkg-buildpackage -rfakeroot -i'(.git|.gitignore|testing)*' -I.git -I.gitignore -Itesting -tc -kC603FC4E600F1CECD1C8D97C4B53D931E4D3E863 --changes-option=-S --changes-option=-sa ifeq ($(version),) version=$(shell git tag -l | grep '^[0-9]' | sort -t"." -k 1,1 -k 2,2 -k 3,3 -n | tail -1) @@ -21,6 +23,7 @@ tarball_dir=../$(package)_tarballs DEBS=$(foreach release, $(releases), ../build/$(release)/$(deb)) RELEASE_FILES=$(orig_tarball) ../build/tarball/mythtv-status-${version}.tar.gz $(DEBS) +endif TEST_VERBOSE=0 TEST_FILES=t/*.t @@ -79,7 +82,6 @@ install: test: PERL_DL_NONLAZY=1 perl "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES) - clean: @rm -rf build -- 2.30.2