Upgrade ABCL support for the MOP.
[clon.git] / Makefile.inc
blobb8ee7cd509b822f17ef645bb694f8b8402d36bb6
1 ### Makefile.inc --- Inclusion part
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.
28 ### Code:
30 PROJECT   := clon
31 PACKAGE   := com.dvlsoft.$(PROJECT)
32 ASDF_FILE := $(PACKAGE).asd
34 PERL := perl
36 SHARE := $(PREFIX)/share
38 W3DIR := $(HOME)/www/software/lisp/$(PROJECT)
41 SBCL_CACHE  := sbcl
42 SBCL_BINLOC := sbcl
43 SBCL_LOAD   := --load
44 SBCL_EVAL   := --eval
45 SBCL_DUMP   := --script
47 CMUCL_CACHE  := cmu
48 CMUCL_BINLOC := cmu
49 CMUCL_LOAD   := -load
50 CMUCL_EVAL   := -eval
51 CMUCL_DUMP   := -noinit -nositeinit $(CMUCL_LOAD)
53 CCL_CACHE  := ccl
54 CCL_BINLOC := openmcl
55 CCL_LOAD   := --load
56 CCL_EVAL   := --eval
57 CCL_DUMP   := --no-init $(CCL_LOAD)
59 ECL_CACHE  := ecl
60 ECL_BINLOC := ecl
61 ECL_LOAD   := -load
62 ECL_EVAL   := -eval
63 ECL_DUMP   := -norc $(ECL_LOAD)
65 CLISP_CACHE  := clisp
66 CLISP_BINLOC := clisp
67 CLISP_LOAD   := -i
68 CLISP_DUMP   := -norc $(CLISP_LOAD)
70 ABCL_CACHE  := abcl
71 ABCL_BINLOC := abcl
72 ABCL_LOAD   := --load
73 ABCL_EVAL   := --eval
74 ABCL_DUMP   := --batch $(ABCL_EVAL) '\
75 (progn (defvar cl-user::$(PACKAGE).configuration nil)\
76        (setf (getf cl-user::$(PACKAGE).configuration :dump) t))' \
77                $(ABCL_LOAD)
79 ACL_CACHE  := acl
80 ACL_BINLOC := acl
81 ACL_LOAD   := -L
82 ACL_EVAL   := -e
83 ACL_DUMP   := -qq $(ACL_LOAD)
85 LW_CACHE  := lw
86 LW_BINLOC := lw
87 LW_LOAD   := -load
88 LW_EVAL   := -eval
89 LW_DUMP   := -init - -siteinit - $(LW_LOAD)
92 ifeq ($(RESTRICTED),t)
93 CONFIG := '(progn (defvar cl-user::$(PACKAGE).configuration nil) \
94              (setf (getf cl-user::$(PACKAGE).configuration :restricted) t))'
95   ifeq ($(LISP),CLISP)
96 EVAL_CONFIG := $($(LISP)_LOAD) $(TOP_DIR)/.clisp.cnf
97   else
98 EVAL_CONFIG := $($(LISP)_EVAL) $(CONFIG)
99   endif
100 else
101 CONFIG :=
102 EVAL_CONFIG :=
103 endif
105 # This is a gross hack for compensating the lack of --eval option to clisp.
106 # This rule doesn't actually create any clisp.inc file, but a clisp
107 # configuration file that will be loaded with -i, and which is redone every
108 # time make is called (several times actually). This is not a clean solution
109 # but it works. Every Makefile that needs to run $(LISP) needs to include
110 # clisp.inc in order for this to work.
111 $(TOP_DIR)/clisp.inc:
112         echo $(CONFIG) > $(TOP_DIR)/.clisp.cnf
114 # The rule below duplicates what the one above does, but it's needed for
115 # makefiles that include both version.inc and clisp.inc. This is necessary
116 # because Make wants to redo things in the wrong order and hence would call
117 # clisp -i .clisp.cnf without this file having been created first.
118 $(TOP_DIR)/version.inc: $(TOP_DIR)/version.cl $(TOP_DIR)/$(ASDF_FILE)
119 ifeq ($(LISP),CLISP)
120         echo $(CONFIG) > $(TOP_DIR)/.clisp.cnf
121 endif
122         $($(LISP)_PATH) $(EVAL_CONFIG)          \
123           $($(LISP)_LOAD) $(TOP_DIR)/version.cl \
124         | tail -2 > $@
128 ### Makefile.inc ends here