r1752: added cvs tagging for distributions
[uffi.git] / Makefile
1 # FILE IDENTIFICATION
2
3 #  Name:         Makefile
4 #  Purpose:      Makefile for the uffi package
5 #  Programer:    Kevin M. Rosenberg, M.D.
6 #  Date Started: Mar 2002
7 #
8 #  CVS Id:   $Id: Makefile,v 1.32 2002/04/07 03:57:54 kevin Exp $
9 #
10 # This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
11 #
12 # UFFI users are granted the rights to distribute and use this software
13 # as governed by the terms of the Lisp Lesser GNU Public License
14 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15
16 PKG=uffi
17
18 all: 
19
20 clean:
21         @rm -f $(PKG)-*.tar.gz $(PKG)-*.zip
22         @find . -type d -name .bin |xargs rm -rf 
23         @find . -type f -name \*.a -or -name \*.so |xargs rm -rf 
24
25 realclean: clean
26         @find . -type f -name "#*" -or -name \*~ -exec rm {} \;
27
28 docs:
29         @(cd doc; make dist-doc)
30
31 VERSION=$(shell cat VERSION)
32 DISTDIR=$(PKG)-$(VERSION)
33 DIST_TARBALL=$(DISTDIR).tar.gz
34 DIST_ZIP=$(DISTDIR).zip
35 SOURCE_FILES=src doc examples Makefile uffi.system COPYRIGHT README TODO \
36          INSTALL uffi.lsm ChangeLog NEWS test-examples.cl set-logical.cl \
37
38 VERSION_UNDERSCORE=$(shell cat VERSION | tr . _)
39 TAG=dist_$(VERSION_UNDERSCORE)
40
41 tagcvs:
42         cvs -q rtag -d $(TAG) $(PKG)
43         cvs -q tag -F $(TAG)
44
45 dist: realclean docs tagcvs
46         @rm -rf $(DISTDIR) $(DIST_TARBALL) $(DIST_ZIP)
47         @mkdir $(DISTDIR)
48         @cp -a $(SOURCE_FILES) $(DISTDIR)
49         @find $(DISTDIR) -type d -name CVS |xargs rm -rf
50         @find $(DISTDIR) -type f -name .cvsignore -exec rm {} \;
51         @find $(DISTDIR)/doc -type f -name \*.tex -or -name \*.aux -or \
52                  -name \*.log -or -name \*.out -or -name \*.dvi -or \
53                  -name \*~ -or -name \*.ps -exec rm {} \;
54         @tar czf $(DIST_TARBALL) $(DISTDIR)
55         @find $(DISTDIR) -type f -and -name \*.cl -or -name \*.list -or \
56                 -name \*.system -or -name Makefile -or -name ChangeLog -or \
57                 -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL \
58                 -or -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog \
59                 | xargs unix2dos -q
60         @zip -rq $(DIST_ZIP) $(DISTDIR)
61         @rm -r $(DISTDIR)
62