Add "make tarball"

pull/16/head
Dave Vasilevsky 12 years ago
parent 745b624361
commit 0f2fe4f601

1
.gitattributes vendored

@ -1 +1,2 @@
.gitignore export-ignore .gitignore export-ignore
.gitattributes export-ignore

2
.gitignore vendored

@ -1,5 +1,7 @@
pixz pixz
pixz.1 pixz.1
dist
pixz-*.tgz
*.o *.o

@ -1,4 +1,6 @@
VERSION = 1.0 VERSION = 1.0
DISTNAME = pixz-$(VERSION)
TARBALL = $(DISTNAME).tgz
ifneq ($(shell gcc -v 2>&1 | grep 'Apple Inc'),) ifneq ($(shell gcc -v 2>&1 | grep 'Apple Inc'),)
APPLE=1 APPLE=1
@ -35,12 +37,20 @@ $(PROGS): %: %.o $(COMMON)
$(LD) $@ $^ $(LIBADD) $(LD) $@ $^ $(LIBADD)
clean: clean:
rm -f *.o $(PROGS) $(MANPAGE) rm -rf *.o $(PROGS) $(MANPAGE) dist
$(MANPAGE): pixz.1.asciidoc $(MANPAGE): pixz.1.asciidoc
a2x -a manversion=$(VERSION) -f manpage $< a2x -a manversion=$(VERSION) -f manpage $<
dist: $(MANPAGE) dist:
rm -rf dist
mkdir -p dist
git archive --prefix=$(DISTNAME)/ --format=tar HEAD | tar -x -C dist
.PHONY: all clean dist $(TARBALL): $(MANPAGE) dist
cp pixz.1 dist/$(DISTNAME)/
tar -cf $(TARBALL) -C dist $(DISTNAME)
tarball: $(TARBALL)
.PHONY: all clean tarball dist

Loading…
Cancel
Save