Commit 405053de2c6f515e6114f9a13f90110ef5aff6b1

Authored by Georg Hopp
1 parent eb25d157

add target to create dist file

Showing 3 changed files with 18 additions and 2 deletions
  1 +Georg Hopp <georg@steffers.org>
@@ -21,7 +21,16 @@ DESTDIR ?= @@ -21,7 +21,16 @@ DESTDIR ?=
21 21
22 export PREFIX DESTDIR 22 export PREFIX DESTDIR
23 23
24 -PROGRAM := accountmanager.sh 24 +PROGRAM = accountmanager.sh
  25 +
  26 +DIST_FILES = doc/Makefile \
  27 + doc/accountmanager.1 \
  28 + $(PROGRAM) \
  29 + Makefile \
  30 + README.md \
  31 + LICENSE \
  32 + VERSION \
  33 + AUTHORS
25 34
26 all: doc 35 all: doc
27 36
@@ -29,7 +38,12 @@ README_new.md: doc/accountmanager.1 @@ -29,7 +38,12 @@ README_new.md: doc/accountmanager.1
29 groff -D utf8 -mandoc -Thtml "$<" |\ 38 groff -D utf8 -mandoc -Thtml "$<" |\
30 pandoc -f html -t markdown_strict >"$@" 39 pandoc -f html -t markdown_strict >"$@"
31 40
32 -.PHONY: clean install doc 41 +.PHONY: clean install doc dist
  42 +
  43 +dist: ARCHIVE_NAME = $(basename $(PROGRAM))-`cat VERSION`
  44 +dist: clean $(DIST_FILES)
  45 + tar cvf - --xform="s/^/$(ARCHIVE_NAME)\//" $(DIST_FILES) | \
  46 + bzip2 -9 -c >$(ARCHIVE_NAME).tar.bz2
33 47
34 doc: 48 doc:
35 make -C doc 49 make -C doc
  1 +1.0
Please register or login to post a comment