1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: System loading functions
6 ;;; --------------------------------------------------------------------------
8 ;;; (C) 2005 Philippe Brochard <hocwp@free.fr>
10 ;;; This program is free software; you can redistribute it and/or modify
11 ;;; it under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or
13 ;;; (at your option) any later version.
15 ;;; This program is distributed in the hope that it will be useful,
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with this program; if not, write to the Free Software
22 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 ;;; --------------------------------------------------------------------------
27 ;;; Customization part
29 (pushnew :clfswm-compile
*features
*)
30 (pushnew :clfswm-run
*features
*)
31 (pushnew :clfswm-build-image
*features
*)
33 ;;(pushnew :clfswm-install *features*)
35 ;;;;;; Uncomment lines above to build the default documentation.
36 ;;(pushnew :clfswm-build-doc *features*)
38 ;;;;; Uncomment the line below if you want to see all ignored X errors
39 ;;(pushnew :xlib-debug *features*)
41 ;;;;; Uncomment the line below if you want to see all event debug messages
42 ;;(pushnew :event-debug *features*)
45 (defparameter *binary-name
* "clfswm")
47 (defparameter *install-prefix
* "/tmp/usr/local")
49 (defun with-prefix (&rest place
)
50 (apply #'concatenate
'string
*install-prefix
* place
))
52 (defparameter *install-bin
* (with-prefix "/bin/"))
53 (defparameter *install-contrib
* (with-prefix "/lib/clfswm/"))
54 (defparameter *install-doc
* (with-prefix "/share/doc/clfswm/"))
55 (defparameter *install-man
* (with-prefix "/share/man/man1/"))
59 #+:CMU
(setf ext
:*gc-verbose
* nil
)
72 #+(or :SBCL
:CMUCL
:CCL
:ECL
)
76 (load "contrib/asdf.lisp")
82 ;;; Loading clisp dynamic module. This part needs clisp >= 2.50
83 ;;#+(AND CLISP (not CLX))
84 ;;(when (fboundp 'require)
85 ;; (require "clx.lisp"))
91 (asdf:oos
'asdf
:load-op
:clfswm
)
94 ;;;-------------------------
96 ;;;-------------------------
97 #+(or :clfswm-run
:clfswm-build-doc
:clfswm-build-image
)
102 (main :read-conf-file-p t
))
105 ;;;-------------------------
106 ;;; Building documentation
107 ;;;-------------------------
111 ;;;-----------------------
112 ;;; Building image part
113 ;;;-----------------------
114 #+:clfswm-build-image
115 (build-lisp-image "clfswm")
117 ;;;-----------------------
118 ;;; Installation part
119 ;;;-----------------------
121 (in-package :cl-user
)
127 (load (compile-file "src/tools.lisp"))
130 (defun check-directory (dir)
131 (format t
"Checking ~A~%" dir
)
132 (ensure-directories-exist dir
:verbose t
))
136 (defun move-file (file where
)
137 (format t
"cp -R ~A ~A~%" file where
)
138 (tools:fdo-shell
"cp -R ~A ~A" file where
))
144 (check-directory *install-prefix
*)
145 (check-directory *install-bin
*)
146 (check-directory *install-contrib
*)
147 (check-directory *install-doc
*)
148 (check-directory *install-man
*)
149 (move-file *binary-name
* *install-bin
*)
150 (move-file "contrib/*" *install-contrib
*)
151 (move-file "doc/*" *install-doc
*)
152 (move-file "clfswm.1" *install-man
*)
153 (format t
"Please, adjust *contrib-dir* variable to ~A in your configuration file.~%" *install-contrib
*)
154 (format t
"Something like: (setf *contrib-dir* ~S)~%" *install-contrib
*)
156 (tools:fdo-shell
"rm -f ~A/clfswm.1.gz && gzip ~A/clfswm.1" *install-man
* *install-man
*)