diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,5 @@ - *.o fifo-cronolog +*.tgz +*.tar.gz +*.tar @@ -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) |