]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Only set the variables that need git if .git directory is present.
authorAndrew Ruthven <andrew@etc.gen.nz>
Sun, 16 Jul 2023 02:31:13 +0000 (14:31 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Sun, 16 Jul 2023 04:17:12 +0000 (16:17 +1200)
This will shield trying to set those if the Makefile is being used from a
release tarball.

Makefile

index 77300f15a1c17e1c8efac0efc827f068b3f2a629..f74eddc4eb2d26e520804cf03422bf34349ef604 100755 (executable)
--- 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