Document CLISP's ffi option.
[clon.git] / Makefile
blob5d05f17351ba10a78080baa4b3c430556d07fe64
1 ### Makefile --- Toplevel directory
3 ## Copyright (C) 2010, 2011, 2012 Didier Verna.
5 ## Author: Didier Verna <didier@lrde.epita.fr>
6 ## Maintainer: Didier Verna <didier@lrde.epita.fr>
8 ## This file is part of CLon
10 ## Permission to use, copy, modify, and distribute this software for any
11 ## purpose with or without fee is hereby granted, provided that the above
12 ## copyright notice and this permission notice appear in all copies.
14 ## THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 ## WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 ## MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 ## ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 ## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 ## ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 ## OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 ### Commentary:
25 ## Contents management by FCM version 0.1.
27 ## Please use GNU Make with this makefile.
30 ### Code:
32 TOP_DIR := .
34 include Makefile.cnf
36 hack: all
38 include Makefile.inc
39 include version.inc
42 SUBDIRS := src sbcl clisp share doc demos
43 DIST_NAME := $(PROJECT)-$(SHORT_VERSION)
44 TARBALL := $(DIST_NAME).tar.gz
45 SIGNATURE := $(TARBALL).asc
47 all:
48 $(MAKE) gen TARGET=all
49 $(MAKE) INSTALL
51 all-formats dvi ps ref all-formats-ref dvi-ref ps-ref:
52 cd doc && $(MAKE) $@
54 # Needed because we have an INSTALL file which fucks up the gen mechanism
55 # (remember that Mac OSX is case-insensitive).
56 install:
57 $(MAKE) gen TARGET=install
59 uninstall:
60 $(MAKE) gen TARGET=uninstall
62 clean:
63 -rm *~
64 $(MAKE) gen TARGET=clean
66 # #### NOTE: be sure to propagate to the subdirs first, otherwise, version.inc
67 # will keep on being reconstructed.
68 distclean: clean
69 $(MAKE) gen TARGET=distclean
70 -rm *.tar.gz *.tar.gz.asc
71 -rm -fr version.inc
72 -rm -fr $($(LISP)_BINLOC)-*
73 -rm -fr "${HOME}"/.cache/common-lisp/$($(LISP)_CACHE)-*"`pwd`"
75 tag:
76 git tag -a -m 'Version $(LONG_VERSION)' 'version-$(SHORT_VERSION)'
78 tar: $(TARBALL)
79 gpg: $(SIGNATURE)
80 dist: tar gpg
82 install-www: dist
83 -install -m 644 $(TARBALL) "$(W3DIR)/attic/"
84 -install -m 644 $(SIGNATURE) "$(W3DIR)/attic/"
85 echo "\
86 <? lref (\"$(PROJECT)/attic/$(PROJECT)-$(SHORT_VERSION).tar.gz\", \
87 contents (\"Dernière version\", \"Latest version\")); ?> \
88 | \
89 <? lref (\"$(PROJECT)/attic/$(PROJECT)-$(SHORT_VERSION).tar.gz.asc\", \
90 contents (\"Signature GPG\", \"GPG Signature\")); ?>" \
91 > "$(W3DIR)/latest.txt"
92 chmod 644 "$(W3DIR)/latest.txt"
93 git push --tags "$(W3DIR)/$(PROJECT).git" :
94 $(MAKE) gen TARGET=install-www
95 cd "$(W3DIR)" \
96 && ln -fs attic/$(TARBALL) latest.tar.gz \
97 && ln -fs attic/$(SIGNATURE) latest.tar.gz.asc
99 update-version:
100 cd doc && $(MAKE) $@
102 gen:
103 @for i in $(SUBDIRS) ; do \
104 echo "making $(TARGET) in $${i} ..." ; \
105 ( cd $${i} && $(MAKE) $(TARGET) ) ; \
106 done
108 INSTALL: doc/$(PROJECT)-user.info
109 info --file=./doc/$(PROJECT)-user.info \
110 -n Installation \
111 -n Configuration \
112 -n 'Non-ANSI Features' \
113 -n 'Supported Platforms' \
114 --output=$@
115 perl -pi -e 's/^File:.*\n//g' $@
117 doc/$(PROJECT)-user.info:
118 cd doc && $(MAKE) $(PROJECT)-user.info
120 $(TARBALL):
121 git archive --format=tar --prefix=$(DIST_NAME)/ \
122 --worktree-attributes HEAD \
123 | gzip -c > $@
125 $(SIGNATURE): $(TARBALL)
126 gpg -b -a $<
128 .DEFAULT:
129 $(MAKE) gen TARGET=$@
131 .PHONY: hack all \
132 all-formats dvi ps ref all-formats-ref dvi-ref ps-ref \
133 install install-ref uninstall \
134 clean distclean \
135 tag tar gpg dist install-www \
136 update-version \
140 ### Makefile ends here