removed makedist

The functionality to create a tarball has been moved into the makefile.
Now it is possible to create a tarball by doing:
make tarball - creates a tarball of the llast tagged version.
make TAG=gittag tarball creates a tarball based on the tag that is given to it.
This commit is contained in:
William Hubbs 2008-08-10 12:59:27 -05:00
commit 4d2f76d6e1
2 changed files with 24 additions and 22 deletions

View file

@ -1,12 +1,26 @@
CC = cc
INSTALL = /usr/bin/install
RM = /bin/rm
RM = /bin/rm -f
PREFIX = /usr
BINDIR = $(PREFIX)/bin
LDLIBS = -lespeak
SRCS = \
espeakup.c
OBJS = $(SRCS:.c=.o)
ifeq ("$(origin TAG)", "command line")
TIMESTAMP := _p$(shell date +%Y%m%d)
endif
VERSION := $(shell grep 'Version.*=' espeakup.c | sed 's/.*"\(.*\)";/\1/')
TAG := v$(VERSION)
TARPREFIX := espeakup-$(VERSION)
TARFILE := $(TARPREFIX)$(TIMESTAMP).tar
all: espeakup
install: espeakup
@ -14,5 +28,14 @@ install: espeakup
$(INSTALL) -m 0755 $< $(DESTDIR)$(BINDIR)
clean:
$(RM) $(OBJS)
distclean: clean
$(RM) espeakup
espeakup: $(OBJS)
tarball:
git archive --format=tar --prefix=$(TARPREFIX)/ $(TAG) > $(TARFILE)
tar f $(TARFILE) --delete $(TARPREFIX)/.gitignore
bzip2 $(TARFILE)

View file

@ -1,21 +0,0 @@
#!/bin/bash
# Makes a tarball release
ver=$(grep "const char.*Version" espeakup.c)
ver=${ver%\"*}
ver=${ver#*\"}
PREFIX=espeakup-${ver}
REL=${1:-v${ver}}
TIMESTAMP=
if [ "$REL" != "v${ver}" ]; then
TIMESTAMP="_p`date +%Y%m%d`"
fi
TARFILE=${PREFIX}${TIMESTAMP}.tar
git archive --format=tar --prefix=${PREFIX}/ $REL > ${TARFILE}
tar f ${TARFILE} --delete ${PREFIX}/.gitignore --delete ${PREFIX}/makedist
bzip2 ${TARFILE}
echo Produced ${TARFILE}*