espeakup/Makefile
William Hubbs 4d2f76d6e1 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.
2008-08-10 12:59:27 -05:00

41 lines
741 B
Makefile

CC = cc
INSTALL = /usr/bin/install
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
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(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)