r1764: *** empty log message ***
[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.38 2002/04/07 09:25:04 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 .PHONY: all clean realclean tagcvs dist wwwdist
19
20 all: 
21
22 clean:
23         @rm -f $(PKG)-*.tar.gz $(PKG)-*.zip
24         @find . -type d -name .bin |xargs rm -rf 
25         @find . -type f -name \*.a -or -name \*.so |xargs rm -rf 
26         @find . -type f -name "#*" -or -name \*~ -exec rm {} \;
27
28 distclean: clean
29
30
31
32 VERSION=$(shell cat VERSION)
33 DISTDIR=$(PKG)-$(VERSION)
34 DIST_TARBALL=$(DISTDIR).tar.gz
35 DIST_ZIP=$(DISTDIR).zip
36 SOURCE_FILES=src doc examples Makefile uffi.system COPYRIGHT README TODO \
37          INSTALL uffi.lsm ChangeLog NEWS test-examples.cl set-logical.cl \
38
39 VERSION_UNDERSCORE=$(shell cat VERSION | tr . _)
40 TAG=dist_$(VERSION_UNDERSCORE)
41
42 tagcvs:
43         @cvs -q rtag -d $(TAG) $(PKG) > /dev/null
44         @cvs -q tag -F $(TAG) > /dev/null
45
46 dist: distclean
47         $(MAKE) -C doc $@
48         @rm -rf $(DISTDIR) $(DIST_TARBALL) $(DIST_ZIP)
49         @mkdir $(DISTDIR)
50         @cp -a $(SOURCE_FILES) $(DISTDIR)
51         @find $(DISTDIR) -type d -name CVS |xargs rm -rf
52         @find $(DISTDIR) -type f -name .cvsignore -exec rm {} \;
53         @find $(DISTDIR)/doc -type f -name \*.tex -or -name \*.aux -or \
54                  -name \*.log -or -name \*.out -or -name \*.dvi -or \
55                  -name \*~ -or -name \*.ps -exec rm {} \;
56         @tar czf $(DIST_TARBALL) $(DISTDIR)
57         @find $(DISTDIR) -type f -and -name \*.cl -or -name \*.list -or \
58                 -name \*.system -or -name Makefile -or -name ChangeLog -or \
59                 -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL \
60                 -or -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog \
61                 | xargs unix2dos -q
62         @zip -rq $(DIST_ZIP) $(DISTDIR)
63         @rm -r $(DISTDIR)
64
65 wwwdist: dist
66         ./copy