summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4891112..98e9bc3 100644
--- a/Makefile
+++ b/Makefile
@@ -47,10 +47,15 @@ uninstall:
.PHONY: all build tarball clean
+ifneq ($(wildcard Cargo.toml),)
VERSION := $(shell cargo metadata --format-version=1 --no-deps \
| jq -r '.packages[0].version')
+endif
+
+ifneq ($(wildcard .git),)
SOURCE_DATE_EPOCH := $(shell git log -1 --format=%ct)
export SOURCE_DATE_EPOCH
+endif
all: build