Build tarball with top-level directory (code stolen from SUnet)
This commit is contained in:
parent
f40d245325
commit
4a557891da
61
Makefile
61
Makefile
|
@ -1,25 +1,48 @@
|
|||
SHELL = /bin/sh
|
||||
|
||||
PKGNAME=scsh-expect
|
||||
RELEASE=0.1
|
||||
|
||||
TARBALL=$(PKGNAME)-$(RELEASE).tar.gz
|
||||
distname=$(PKGNAME)-$(RELEASE)
|
||||
|
||||
FILES=./README \
|
||||
./INSTALL \
|
||||
./COPYING \
|
||||
./AUTHORS \
|
||||
./pkg-def.scm \
|
||||
./scheme/interact.scm \
|
||||
./scheme/expect.scm \
|
||||
./scheme/chat.scm \
|
||||
./scheme/packages.scm \
|
||||
./scheme/tty-utils.scm \
|
||||
./doc/chat.doc \
|
||||
./doc/expect.doc \
|
||||
./examples/timed-choice.scm \
|
||||
./examples/ssh-same-path.scm \
|
||||
./examples/ping-and-mail.scm \
|
||||
distdir = /tmp
|
||||
|
||||
tarball: $(TARBALL)
|
||||
DISTFILES=README \
|
||||
INSTALL \
|
||||
COPYING \
|
||||
AUTHORS \
|
||||
pkg-def.scm \
|
||||
scheme/interact.scm \
|
||||
scheme/expect.scm \
|
||||
scheme/chat.scm \
|
||||
scheme/packages.scm \
|
||||
scheme/tty-utils.scm \
|
||||
doc/chat.doc \
|
||||
doc/expect.doc \
|
||||
examples/timed-choice.scm \
|
||||
examples/ssh-same-path.scm \
|
||||
examples/ping-and-mail.scm \
|
||||
|
||||
.PHONY: dist
|
||||
|
||||
dist:
|
||||
distname=$(distname) && \
|
||||
distfile=$(distdir)/$$distname.tar.gz && \
|
||||
if [ -d $(distdir) ] && \
|
||||
[ -w $$distfile -o -w $(distdir) ]; then \
|
||||
rm -f $$distname && \
|
||||
ln -s . $$distname && \
|
||||
files='' && \
|
||||
for i in $(DISTFILES); do \
|
||||
if [ "$$i" != "c/sysdep.h" ]; then \
|
||||
files="$$files $$distname/$$i"; \
|
||||
fi \
|
||||
done && \
|
||||
tar --exclude .cvsignore --exclude CVS -cf - $$files | \
|
||||
gzip --best >$$distfile && \
|
||||
rm $$distname; \
|
||||
else \
|
||||
echo "Can't write $$distfile" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
$(TARBALL): $(FILES)
|
||||
tar zcf $(TARBALL) $(FILES)
|
||||
|
|
Loading…
Reference in New Issue