[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-159-g49b287c
Philippe Brochard
pbrochard at common-lisp.net
Wed Nov 28 23:28:02 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".
The branch, master has been updated
via 49b287c2d3af757b3794fe45fb5b64dd9fa2c71d (commit)
from f47c93af277a72af7e67b8417d0bff5fc11d6436 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 49b287c2d3af757b3794fe45fb5b64dd9fa2c71d
Author: Philippe Brochard <pbrochard at common-lisp.net>
Date: Thu Nov 29 00:27:57 2012 +0100
Use a standard Makefile to load load.lisp and remove the installation part in load.lisp
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a7f333e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,52 @@
+DESTDIR=/usr/local/
+
+CLISP=$(shell which clisp)
+SBCL=$(shell which sbcl)
+CMUCL=$(shell which cmucl || which lisp)
+CCL=$(shell which ccl)
+ECL=$(shell which ecl)
+LOADTMP=load.tmp.lisp
+
+SRC=$(wildcard *.lisp src/*.lisp)
+
+all: clfswm
+
+clfswm: $(SRC)
+ @echo "Please, tweak the file load.lisp to fit your needs."
+ @if test -f "$(CLISP)"; then echo "Building with CLISP"; $(CLISP) -E iso-8859-1 $(LOADTMP); \
+ elif test -f "$(SBCL)"; then echo "Building with SBCL"; $(SBCL) --load $(LOADTMP); \
+ elif test -f "$(CMUCL)"; then echo "Building with CMUCL"; $(CMUCL) -load $(LOADTMP); \
+ elif test -f "$(CCL)"; then echo "Building with CCL"; $(CCL) --load $(LOADTMP); \
+ elif test -f "$(ECL)"; then echo "Building with ECL"; $(ECL) -load $(LOADTMP); \
+ else echo "No Lisp found. Please, install one of CLISP, SBCL, CMUCL, CCL or ECL"; \
+ fi
+
+
+
+install: clfswm
+ @echo "Installing CLFSWM in $(DESTDIR)"
+ mkdir -p $(DESTDIR)
+ mkdir -p $(DESTDIR)/bin
+ mkdir -p $(DESTDIR)/lib/clfswm
+ mkdir -p $(DESTDIR)/share/doc/clfswm
+ mkdir -p $(DESTDIR)/man/man.1
+ cp clfswm $(DESTDIR)/bin/
+ cp -R contrib/* $(DESTDIR)/lib/clfswm/
+ cp doc/* $(DESTDIR)/share/doc/clfswm/
+ cp README COPYING AUTHORS $(DESTDIR)/share/doc/clfswm/
+ cp clfswm.1 $(DESTDIR)/man/man.1/
+
+
+uninstall:
+ @echo "Uninstalling CLFSWM from $(DESTDIR)"
+ rm -f $(DESTDIR)/bin/clfswm
+ rm -rf $(DESTDIR)/lib/clfswm/*
+ rm -f $(DESTDIR)/share/doc/clfswm/*
+ rm -f $(DESTDIR)/man/man.1/clfswm.1
+ rmdir $(DESTDIR)/lib/clfswm
+ rmdir $(DESTDIR)/share/doc/clfswm
+
+
+clean:
+ rm -f clfswm
+
diff --git a/load.lisp b/load.lisp
index 900601f..ce9fbfa 100644
--- a/load.lisp
+++ b/load.lisp
@@ -51,17 +51,6 @@
(defparameter *binary-name* "clfswm")
-(defparameter *install-prefix* "/usr/local")
-
-(defun with-prefix (&rest place)
- (apply #'concatenate 'string *install-prefix* place))
-
-(defparameter *install-bin* (with-prefix "/bin/"))
-(defparameter *install-contrib* (with-prefix "/lib/clfswm/"))
-(defparameter *install-doc* (with-prefix "/share/doc/clfswm/"))
-(defparameter *install-man* (with-prefix "/share/man/man1/"))
-
-
;;;;; Uncomment the line below if you want to see all ignored X errors
;;(pushnew :xlib-debug *features*)
@@ -174,40 +163,3 @@
(progn
(cl-user::load-info "Building CLFSWM executable image")
(build-lisp-image "clfswm"))
-
-;;;-----------------------
-;;; Installation part
-;;;-----------------------
-#+:clfswm-install
-(in-package :cl-user)
-
-#+:clfswm-install
-(defun check-directory (dir)
- (format t "Checking ~A~%" dir)
- (ensure-directories-exist dir :verbose t))
-
-
-#+:clfswm-install
-(defun move-file (file where)
- (format t "cp -Rf ~A ~A~%" file where)
- (tools:do-shell-output "cp -Rf ~A ~A" file where))
-
-
-
-#+:clfswm-install
-(progn
- (load-info "Installing CLFSWM")
- (check-directory *install-prefix*)
- (check-directory *install-bin*)
- (check-directory *install-contrib*)
- (check-directory *install-doc*)
- (check-directory *install-man*)
- (move-file *binary-name* *install-bin*)
- (move-file "contrib/*" *install-contrib*)
- (move-file "doc/*" *install-doc*)
- (move-file "clfswm.1" *install-man*)
- (format t "Please, adjust *contrib-dir* variable to ~A in your configuration file.~%" *install-contrib*)
- (format t "Something like: (setf *contrib-dir* ~S)~%" *install-contrib*)
- (tools:do-shell-output "rm -f ~A/clfswm.1.gz && gzip ~A/clfswm.1" *install-man* *install-man*)
- (tools:uquit))
-
diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp
index aa530f8..73834b8 100644
--- a/src/clfswm-util.lisp
+++ b/src/clfswm-util.lisp
@@ -48,13 +48,21 @@
-(defun load-contrib (file)
- "Load a file in the contrib directory"
- (let ((truename (merge-pathnames file *contrib-dir*)))
- (format t "Loading contribution file: ~A~%" truename)
- (if (probe-file truename)
- (load truename :verbose nil)
- (format t " File not found!~%"))))
+(let ((already-warn nil))
+ (defun load-contrib (file)
+ "Load a file in the contrib directory"
+ (let ((truename (merge-pathnames file *contrib-dir*)))
+ (format t "Loading contribution file: ~A~%" truename)
+ (if (probe-file truename)
+ (load truename :verbose nil)
+ (progn
+ (format t " File not found!~%")
+ (unless already-warn
+ (setf already-warn t)
+ (format t " ~&Please, adjust the *contrib-dir* variable to the place where CLFSWM can
+find its contrib module files. For example: /usr/local/lib/clfswm/.
+Write (defparameter *contrib-dir* \"/usr/local/lib/clfswm/\") in ~A.~%"
+ (conf-file-name))))))))
(defun reload-clfswm ()
-----------------------------------------------------------------------
Summary of changes:
Makefile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
load.lisp | 48 ----------------------------------------------
src/clfswm-util.lisp | 22 ++++++++++++++------
3 files changed, 67 insertions(+), 55 deletions(-)
create mode 100644 Makefile
hooks/post-receive
--
CLFSWM - A(nother) Common Lisp FullScreen Window Manager
More information about the clfswm-cvs
mailing list