Demo renamings.
[clon.git] / Makefile
blobddc81548eb2240537dac94474dfa0fe59827c576
1 ### Makefile --- Toplevel directory
3 ## Copyright (C) 2010 Didier Verna
5 ## Author: Didier Verna <didier@lrde.epita.fr>
6 ## Maintainer: Didier Verna <didier@lrde.epita.fr>
7 ## Created: Sun May 31 17:13:07 2009
8 ## Last Revision: Sat Sep 25 18:58:06 2010
10 ## This file is part of CLon
12 ## Clon is free software; you can redistribute it and/or modify
13 ## it under the terms of the GNU General Public License version 3,
14 ## as published by the Free Software Foundation.
16 ## Clon is distributed in the hope that it will be useful,
17 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ## GNU General Public License for more details.
21 ## You should have received a copy of the GNU General Public License
22 ## along with this program; if not, write to the Free Software
23 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 ### Commentary:
28 ## Contents management by FCM version 0.1.
30 ## Please use GNU Make with this makefile.
33 ### Code:
35 TOP_DIR := .
37 include Makefile.cnf
39 all:
40 $(MAKE) gen TARGET=all
42 include Makefile.inc
43 include version.inc
45 SUBDIRS := src sbcl \
46 share doc \
47 demos
48 SYSTEMS_DIR := $(SHARE)/common-lisp/systems
49 ASDF_FILE := com.dvlsoft.clon.asd
51 DIST_NAME := clon-$(SHORT_VERSION)
52 TARBALL := $(DIST_NAME).tar.gz
53 SIGNATURE := $(TARBALL).asc
56 demos: # needed because we have a demos/ directory which fucks up the target.
57 cd demos && $(MAKE) demos
59 install-system:
60 ln -fs "`pwd`/$(ASDF_FILE)" "$(SYSTEMS_DIR)/"
62 uninstall:
63 -rm -f "$(SYSTEMS_DIR)/$(ASDF_FILE)"
64 $(MAKE) gen TARGET=uninstall
66 clean:
67 -rm *~
68 $(MAKE) gen TARGET=clean
70 # #### NOTE: be sure to propagate to the subdirs first, otherwise, version.inc
71 # will keep on being reconstructed.
72 distclean: clean
73 $(MAKE) gen TARGET=distclean
74 -rm *.tar.gz *.tar.gz.asc
75 -rm -fr version.inc
76 -rm -fr sbcl-* # for ASDF Binary Locations
77 -rm -fr "${HOME}"/.cache/common-lisp/sbcl-*"`pwd`" # for ASDF 2
79 tag:
80 git tag -a -m 'Version $(LONG_VERSION)' 'version-$(SHORT_VERSION)'
82 tar: $(TARBALL)
83 gpg: $(SIGNATURE)
84 dist: tar gpg
86 install-www: dist
87 -install -m 644 $(TARBALL) "$(W3DIR)/attic/"
88 -install -m 644 $(SIGNATURE) "$(W3DIR)/attic/"
89 echo "\
90 <? lref (\"clon/attic/clon-$(SHORT_VERSION).tar.gz\", \
91 contents (\"Dernière version\", \"Latest version\")); ?> \
92 | \
93 <? lref (\"clon/attic/clon-$(SHORT_VERSION).tar.gz.asc\", \
94 contents (\"Signature GPG\", \"GPG Signature\")); ?>" \
95 > "$(W3DIR)/latest.txt"
96 chmod 644 "$(W3DIR)/latest.txt"
97 git push --mirror "$(W3DIR)/clon.git"
98 $(MAKE) gen TARGET=install-www
99 cd "$(W3DIR)" \
100 && ln -fs attic/$(TARBALL) latest.tar.gz \
101 && ln -fs attic/$(SIGNATURE) latest.tar.gz.asc
103 gen:
104 @for i in $(SUBDIRS) ; do \
105 echo "making $(TARGET) in $${i} ..." ; \
106 ( cd $${i} && $(MAKE) $(TARGET) ) ; \
107 done
109 $(TARBALL):
110 git archive --format=tar --prefix=$(DIST_NAME)/ \
111 --worktree-attributes HEAD \
112 | gzip -c > $@
114 $(SIGNATURE): $(TARBALL)
115 gpg -b -a $<
117 .DEFAULT:
118 $(MAKE) gen TARGET=$@
120 .PHONY: all demos \
121 install-system \
122 uninstall \
123 clean distclean \
124 tag tar gpg dist \
125 install-www \
129 ### Makefile ends here