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.
25 ## Contents management by FCM version 0.1.
27 ## Please use GNU Make with this makefile.
34 include $(TOP_DIR
)/Makefile.cnf
38 include $(TOP_DIR
)/Makefile.inc
40 include $(TOP_DIR
)/clisp.inc
42 include $(TOP_DIR
)/version.inc
45 SUBDIRS
:= termio src share doc demos
46 DIST_NAME
:= $(PROJECT
)-$(SHORT_VERSION
)
47 TARBALL
:= $(DIST_NAME
).
tar.gz
48 SIGNATURE
:= $(TARBALL
).asc
51 $(MAKE
) gen TARGET
=all
54 all-formats
dvi ps ref all-formats-ref dvi-ref ps-ref
:
57 # Needed because we have an INSTALL file which fucks up the gen mechanism
58 # (remember that Mac OSX is case-insensitive).
60 $(MAKE
) gen TARGET
=install
63 $(MAKE
) gen TARGET
=uninstall
67 $(MAKE
) gen TARGET
=clean
69 # #### NOTE: be sure to propagate to the subdirs first, otherwise, version.inc
70 # will keep on being reconstructed.
72 $(MAKE
) gen TARGET
=distclean
76 -rm *.
tar.gz
*.
tar.gz.asc
78 -rm -fr
$($(LISP
)_BINLOC
)-*
79 -rm -fr
"${HOME}"/.cache
/common-lisp
/$($(LISP
)_CACHE
)-*"`pwd`"
82 git tag
-a
-m
'Version $(LONG_VERSION)' 'version-$(SHORT_VERSION)'
89 -install -m
644 $(TARBALL
) "$(W3DIR)/attic/"
90 -install -m
644 $(SIGNATURE
) "$(W3DIR)/attic/"
92 <? lref (\"$(PROJECT)/attic/$(PROJECT)-$(SHORT_VERSION).tar.gz\", \
93 contents (\"Dernière version\", \"Latest version\")); ?> \
95 <? lref (\"$(PROJECT)/attic/$(PROJECT)-$(SHORT_VERSION).tar.gz.asc\", \
96 contents (\"Signature GPG\", \"GPG Signature\")); ?>" \
97 > "$(W3DIR)/latest.txt"
98 chmod
644 "$(W3DIR)/latest.txt"
99 git push
--tags "$(W3DIR)/$(PROJECT).git" :
100 $(MAKE
) gen TARGET
=install-www
102 && ln
-fs attic
/$(TARBALL
) latest.
tar.gz \
103 && ln
-fs attic
/$(SIGNATURE
) latest.
tar.gz.asc
109 @for i in
$(SUBDIRS
) ; do \
110 echo
"making $(TARGET) in $${i} ..." ; \
111 ( cd
$${i} && $(MAKE
) $(TARGET
) ) ; \
114 INSTALL
: doc
/$(PROJECT
)-user.
info
115 info --file
=.
/doc
/$(PROJECT
)-user.
info \
118 -n
'Non-ANSI Features' \
119 -n
'Supported Platforms' \
121 perl
-pi
-e
's/^File:.*\n//g' $@
123 doc
/$(PROJECT
)-user.
info:
124 cd doc
&& $(MAKE
) $(PROJECT
)-user.
info
127 git archive
--format
=tar --prefix=$(DIST_NAME
)/ \
128 --worktree-attributes HEAD \
131 $(SIGNATURE
): $(TARBALL
)
135 $(MAKE
) gen TARGET
=$@
138 all-formats
dvi ps ref all-formats-ref dvi-ref ps-ref \
139 install install-ref
uninstall \
141 tag
tar gpg
dist install-www \
146 ### Makefile ends here