r1811: *** 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.42 2002/04/28 03:52:01 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 SUBDIRS:= examples src
18 DOCSUBDIRS:=doc
19
20 include Makefile.common
21
22
23 .PHONY: all
24 all: 
25
26
27 .PHONY: distclean
28 distclean: clean
29 #       ./debian/rules clean
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 .PHONY: tagcvs
43 tagcvs:
44         @cvs -q rtag -d $(TAG) $(PKG) > /dev/null
45         @cvs -q tag -F $(TAG) > /dev/null
46
47 .PHONY: doc
48 doc:
49         $(MAKE) -C doc
50
51 .PHONY: dist
52 dist: distclean
53         $(MAKE) -C doc $@
54         @rm -rf $(DISTDIR) $(DIST_TARBALL) $(DIST_ZIP)
55         @mkdir $(DISTDIR)
56         @cp -a $(SOURCE_FILES) $(DISTDIR)
57         @find $(DISTDIR) -type d -name CVS |xargs rm -rf
58         @rm -rf $(DISTDIR)/debian
59         @find $(DISTDIR) -type f -name .cvsignore -exec rm {} \;
60         @find $(DISTDIR)/doc -type f -name \*.tex -or -name \*.aux -or \
61                  -name \*.log -or -name \*.out -or -name \*.dvi -or \
62                  -name \*~ -or -name \*.ps -exec rm {} \;
63         @tar czf $(DIST_TARBALL) $(DISTDIR)
64         @find $(DISTDIR) -type f -and -name \*.cl -or -name \*.list -or \
65                 -name \*.system -or -name Makefile -or -name ChangeLog -or \
66                 -name COPYRIGHT -or -name TODO -or -name README -or -name INSTALL \
67                 -or -name NEWS -or -name \*.sgml -or -name COPYING\* -or -name catalog \
68                 | xargs unix2dos
69         @zip -rq $(DIST_ZIP) $(DISTDIR)
70         @rm -r $(DISTDIR)
71
72 .PHONY: wwwdist
73 wwwdist: dist
74         @./copy
75
76
77 .PHONY: freeze
78 freeze:
79         @echo tagging with frozen tag
80         cvs -q rtag -d frozen uffi
81         cvs -q tag -F frozen .
82
83