r1759: *** 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.11 2002/04/07 08:48:54 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 PKG=clsql
17
18 .PHONY: all libs clean distclean dist-doc tagcvs dist
19
20 SUBDIRS=interfaces/mysql interfaces/clsql-uffi
21 .PHONY: subdirs $(SUBDIRS)
22
23 all: $(SUBDIRS)
24
25 $(SUBDIRS):
26         $(MAKE) -C $@
27
28 clean:
29         @rm -f $(PKG)-*.tar.gz $(PKG)-*.zip
30         @find . -type d -name .bin |xargs rm -rf 
31         @find . -type f -name "#*" -or -name \*~ -exec rm {} \;
32         $(MAKE) -C doc $@
33         @for i in $(SUBDIRS) ; do $(MAKE) -C $$i $@ ; done
34
35 distclean: clean
36
37 dist-doc:
38         $(MAKE) -C doc $@
39
40 VERSION=$(shell cat VERSION)
41 DISTDIR=$(PKG)-$(VERSION)
42 DIST_TARBALL=$(DISTDIR).tar.gz
43 DIST_ZIP=$(DISTDIR).zip
44 SOURCE_FILES=interfaces sql cmucl-compat doc test-suite Makefile VERSION \
45         COPYING.CLSQL COPYING.MaiSQL README INSTALL ChangeLog NEWS TODO \
46         set-logical.cl clsql-uffi.system \
47         clsql.system clsql-aodbc.system clsql-mysql.system \
48         clsql-postgresql.system clsql-postgresql-socket.system
49
50 VERSION_UNDERSCORE=$(shell cat VERSION | tr . _)
51 TAG=dist_$(VERSION_UNDERSCORE)
52
53 tagcvs:
54         cvs -q rtag -d $(TAG) $(PKG)
55         cvs -q tag -F $(TAG)
56
57 dist: distclean dist-doc tagcvs
58         @rm -fr $(DISTDIR) $(DIST_TARBALL) $(DIST_ZIP)
59         @mkdir $(DISTDIR)
60         @cp -a $(SOURCE_FILES) $(DISTDIR)
61         @find $(DISTDIR) -type d -name CVS | xargs rm -r
62         @find $(DISTDIR) -type f -name .cvsignore -exec rm {} \;
63         @find $(DISTDIR) -type f -and -name \*.tex -or -name \*.aux -or \
64                  -name \*.log -or -name \*.out -or -name \*.dvi -or \
65                  -name \*~ -or -name \*.ps -or -name test.config | xargs rm -f
66         @tar czf $(DIST_TARBALL) $(DISTDIR)
67         @find $(DISTDIR) -type f -name \*.cl -or -name \*.list -or \
68                 -name \*.system -or -name Makefile -or -name ChangeLog -or \
69                 -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL \
70                 -or -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog \
71                 | xargs unix2dos -q
72         @zip -rq $(DIST_ZIP) $(DISTDIR)
73         @rm -r $(DISTDIR)