diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2024-03-12 21:51:37 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2024-03-12 21:51:37 -0700 |
commit | 80ac76208eade31ad0df6b347481049c20608a39 (patch) | |
tree | d2e87432153326d58d54189c3ca41e04add7b35e /Makefile | |
parent | build: add simple install target (diff) | |
download | fifo-cronolog-master.tar.gz fifo-cronolog-master.tar.bz2 fifo-cronolog-master.zip |
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -8,6 +8,14 @@ BINDIR = /usr/sbin/ SYSTEMD_TARGET = /usr/lib/systemd/system/ SYSTEMD_UNIT = systemd/fifo-cronolog@.service +VERSION = $(shell awk -F'"' '/#define VERSION/{print $$2}' $(SRC) ) +DISTFILE_EXT = tar.gz +DISTFILE = $(BIN)-$(VERSION).$(DISTFILE_EXT) + +dist: + if test -e $(DISTFILE) ; then echo "$(DISTFILE) already exists" ; exit 1 ; fi + git archive --format $(DISTFILE_EXT) --prefix $(BIN)-$(VERSION)/ v$(VERSION) >$(DISTFILE).tmp && mv $(DISTFILE).tmp $(DISTFILE) + all: $(BIN) $(BIN): $(OBJ) |