r1745: *** empty log message ***
[clsql.git] / Makefile
1 # FILE IDENTIFICATION
2
3 #  Name:         Makefile
4 #  Purpose:      Makefile for the CLSQL package
5 #  Programer:    Kevin M. Rosenberg
6 #  Date Started: Mar 2002
7 #
8 #  CVS Id:   $Id: Makefile,v 1.6 2002/04/06 19:54:14 kevin Exp $
9 #
10 # This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
11 #
12 # CLSQL 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 PACKAGE=clsql
17
18 all: libs
19
20 libs:
21         (cd interfaces/mysql; make)
22         (cd interfaces/clsql-uffi; make)
23
24 clean:
25         @rm -f $(PACKAGE)-*.tar.gz $(PACKAGE)-*.zip
26         @find . -type d -name .bin |xargs rm -rf 
27         @find . -type f -name \*.a -or -name \*.so |xargs rm -rf 
28
29 realclean: clean
30         @find . -type f -name \*~ -exec rm {} \;
31         @find . -type f -name "#*#" -exec rm {} \;
32
33 docs:
34         @(cd doc; make dist-doc)
35
36 VERSION=$(shell cat VERSION)
37 DISTDIR=$(PACKAGE)-$(VERSION)
38 DIST_TARBALL=$(DISTDIR).tar.gz
39 DIST_ZIP=$(DISTDIR).zip
40 SOURCE_FILES=interfaces sql cmucl-compat doc test-suite Makefile VERSION \
41         COPYING.CLSQL COPYING.MaiSQL README INSTALL ChangeLog NEWS TODO \
42         set-logical.cl clsql-uffi.system \
43         clsql.system clsql-aodbc.system clsql-mysql.system \
44         clsql-postgresql.system clsql-postgresql-socket.system
45
46 dist: realclean docs
47         @rm -fr $(DISTDIR) $(DIST_TARBALL) $(DIST_ZIP)
48         @mkdir $(DISTDIR)
49         @cp -a $(SOURCE_FILES) $(DISTDIR)
50         @find $(DISTDIR) -type d -name CVS | xargs rm -r
51         @find $(DISTDIR) -type f -name .cvsignore -exec rm {} \;
52         @find $(DISTDIR) -type f -and -name \*.tex -or -name \*.aux -or \
53                  -name \*.log -or -name \*.out -or -name \*.dvi -or \
54                  -name \*~ -or -name \*.ps -or -name test.config | xargs rm -f
55         @tar czf $(DIST_TARBALL) $(DISTDIR)
56         @find $(DISTDIR) -type f -name \*.cl -or -name \*.list -or \
57                 -name \*.system -or -name Makefile -or -name ChangeLog -or \
58                 -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL \
59                 -or -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog \
60                 | xargs unix2dos -q
61         @zip -rq $(DIST_ZIP) $(DISTDIR)
62         @rm -r $(DISTDIR)