Working dist target.

This commit is contained in:
sperber 2003-04-22 12:47:27 +00:00
parent 0bbb13664e
commit bd22ae282b
1 changed files with 37 additions and 41 deletions

View File

@ -1,47 +1,43 @@
SHELL = /bin/sh SHELL = /bin/sh
version_id = 1.0 version_id = 2.0
TEMPDIR = /tmp distname = sunet-$(version_id)
sunet_files = Readme \ distdir = /tmp
cgi-script.scm \
cgi-server.scm \ DISTFILES = COPYING README \
conditionals.scm \ Makefile packages.scm \
crlf-io.scm \ start-web-server \
htmlout.scm \ httpd/*.scm ftpd/*.scm lib/*.scm \
http-top.scm \ doc/man.pdf doc/html \
httpd/access-control.scm \ doc/latex/*.tex doc/latex/*.sty doc/latex/*.t2p doc/latex/*.hdir
httpd/core.scm \
httpd/error.scm \ sunet-$(version_id).tar.gz:
httpd/handlers.scm \
info-gateway.scm \ .PHONY: dist
rman-gateway.scm \
modules.scm \ dist:
parse-forms.scm \ cd doc/latex && $(MAKE) html
program-modules.scm \ cd doc/latex && $(MAKE) man.pdf && cp -p man.pdf ..
rfc822.scm \ distname=$(distname) && \
scheme-program-server.scm \ distfile=$(distdir)/$$distname.tar.gz && \
server.scm \ if [ -d $(distdir) ] && \
seval.scm \ [ -w $$distfile -o -w $(distdir) ]; then \
smtp.scm \ rm -f $$distname && \
stringhax.scm \ ln -s . $$distname && \
su-httpd.txt \ files='' && \
toothless.scm \ for i in $(DISTFILES); do \
uri.scm \ if [ "$$i" != "c/sysdep.h" ]; then \
url.scm files="$$files $$distname/$$i"; \
fi \
done && \
tar --exclude CVS -cf - $$files | \
gzip --best >$$distfile && \
rm $$distname; \
else \
echo "Can't write $$distfile" >&2; \
exit 1; \
fi
sunet-$(version_id).tar.gz: $(sunet_files)
sunet_root=`pwd`; \
mkdir $(TEMPDIR)/sunet-$(version_id); \
cp $(sunet_files) $(TEMPDIR)/sunet-$(version_id); \
cd $(TEMPDIR); \
tar czf sunet-$(version_id).tar.gz sunet-$(version_id); \
mv sunet-$(version_id).tar.gz $$sunet_root; \
rm -rf sunet-$(version_id)
.PHONY: tags
tags:
find . -name "*.scm" | etags -