Commit 4625921e authored by Pascal Bourguignon's avatar Pascal Bourguignon

First checkin.

parents
#******************************************************************************
#FILE: $(COMMON)/Makefile
#LANGUAGE: make
#SYSTEM: UNIX
#USER-INTERFACE: None
#DESCRIPTION
# This Makefile tells how to compile the lisp libraries.
#
# Input variables are:
#
# $(MAKEDIR) where the makefiles are located.
#
# $(PREFIX) where the libraries are installed.
# It will be created a subdirectory in this
# $(PREFIX) for each library compiled by
# this makefile.
#
# Output:
#
# $(PREFIX)/bin/$(PROGRAM) the executables.
# $(PREFIX)/lib/$(MODULE)/interfaces/ the interface of the module,
# $(PREFIX)/lib/$(MODULE)/documentation/ the documentation of the module,
# $(PREFIX)/lib/$(MODULE)/libraries/ the libraries of the module.
#
#AUTHORS
# <PJB> Pascal J. Bourguignon
#MODIFICATIONS
# 2001-06-19 <PJB> Reorganized and simplified.
#LEGAL
# Copyright Pascal J. Bourguignon 1992 - 2003
#
# This script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#******************************************************************************
TARGET := $(shell uname)
PREFIX := /usr/local
MAKEDIR := $(HOME)/src/public/common/makedir
MODULES = common-lisp clext clisp sbcl susv3 clmisc
all:install-clisp lisp-clean
#include $(MAKEDIR)/project
help::
@echo ""
@echo "Some targets:"
@echo " make lisp # make and install all the subprojects"
@echo " make lisp-clean # clean, make and install all the subprojects"
@echo " make install-clisp # make and install the clisp subprojects"
@echo " make tags # make the TAGS"
@echo ""
vars variables:
@echo "Input variables are:"
@echo " TARGET ($(TARGET))"
@echo " MAKEDIR ($(MAKEDIR))"
@echo " PREFIX ($(PREFIX))"
@echo ""
@echo "They can be changed passing them as make argument:"
@echo " make TARGET=new-target MAKEDIR=/make/dir PREFIX=/usr/local install"
install-clisp:
make PREFIX=$(PREFIX) \
COMMON=`pwd` \
MAKEDIR=`pwd`/makedir \
-C common-lisp clisp install
make PREFIX=$(PREFIX) \
COMMON=`pwd` \
MAKEDIR=`pwd`/makedir \
-C clisp clisp install
make PREFIX=$(PREFIX) \
COMMON=`pwd` \
MAKEDIR=`pwd`/makedir \
-C susv3 clisp install
m1:
make PREFIX=$(HOME)/install \
COMMON=`pwd` \
MAKEDIR=`pwd`/makedir \
cvsclean depend install
m1i:
make PREFIX=$(HOME)/install \
COMMON=`pwd` \
MAKEDIR=`pwd`/makedir \
install
m2:
make PREFIX=/local \
COMMON=`pwd` \
MAKEDIR=`pwd`/makedir \
cvsclean depend install
etags tags:
find $$(pwd) \( -name \*.lisp \
-o -name \*.[hc] \
-o -name \*.hh -o -name \*.cc \
\) -print | etags -
CLEAN=clean-install clean
C=clisp
S=sbcl
U=cmucl
A=allegro
ALL=$(C) $(S)
MM=$(MAKE) $(MFLAGS)
clean:
$(MM) -C common-lisp $(CLEAN)
$(MM) -C clext $(CLEAN)
$(MM) -C clmisc $(CLEAN)
$(MM) -C sbcl $(CLEAN)
$(MM) -C clisp $(CLEAN)
$(MM) -C susv3 $(CLEAN)
lisp-clean:
$(MM) -C common-lisp $(CLEAN) $(ALL) install
$(MM) -C clext $(CLEAN) $(ALL) install
$(MM) -C clmisc $(CLEAN) $(ALL) install
$(MM) -C sbcl $(CLEAN) $(S) install
$(MM) -C clisp $(CLEAN) $(C) install
$(MM) -C susv3 $(CLEAN) $(C) install
lisp:
$(MM) -C common-lisp $(ALL) install
$(MM) -C clext $(ALL) install
$(MM) -C clmisc $(ALL) install
$(MM) -C sbcl $(S) install
$(MM) -C clisp $(C) install
$(MM) -C susv3 $(C) install
install:
$(MM) -C common-lisp install
$(MM) -C clext install
$(MM) -C clmisc install
$(MM) -C sbcl install
$(MM) -C clisp install
$(MM) -C susv3 install
#### Makefile -- -- ####
common-lisp Pure COMMON-LISP packages: should be compilable/executable in
any Common-Lisp implementation.
clext Common Lisp Extensions.
clmisc Miscellaneous Common Lisp packages.
clisp clisp specific packages.
sbcl sbcl specific packages.
susv3 POSIX API.
# Boring file regexps:
\.hi$
\.o$
\.o\.cmd$
# *.ko files aren't boring by default because they might
# be Korean translations rather than kernel modules.
# \.ko$
\.ko\.cmd$
\.mod\.c$
(^|/)\.tmp_versions($|/)
(^|/)CVS($|/)
(^|/)RCS($|/)
~$
#(^|/)\.[^/]
(^|/)_darcs($|/)
(^|/)semantic.cache($|/)
(^|/)OBJ-
\.bak$
\.BAK$
\.orig$
(^|/)vssver\.scc$
\.swp$
\.so$
(^|/)MT($|/)
(^|/)\{arch\}($|/)
(^|/).arch-ids($|/)
(^|/),
\.class$
\.prof$
(^|/)\.DS_Store$
(^|/)BitKeeper($|/)
(^|/)ChangeSet($|/)
(^|/)\.svn($|/)
\.py[co]$
\#
\.cvsignore$
(^|/)Thumbs\.db$
(^|/)autom4te\.cache($|/)
This diff is collapsed.
major=1
minor=0
compilation=3
;;;; -*- coding:utf-8 -*-
;; ----------------------------------------------------------------------
;; -- CMU-AI -- AIMA: Artificial Inteligence - A Modern Approach --
;; ----------------------------------------------------------------
(LOAD "cmu-ai:bookcode;aima;aima")
(AIMA-LOAD 'ALL)
(DEFUN COMPILE-AIMA ()
(AIMA-COMPILE)
(TEST 'ALL))
;;;; aima.lisp -- 2003-05-02 08:02:18 -- pascal ;;;;
;;;; -*- coding:utf-8 -*-
;;;;****************************************************************************
;;;;FILE: asdf.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; Loads ASDF.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal Bourguignon <pjb@informatimago.com>
;;;;MODIFICATIONS
;;;; 2005-05-05 <PJB> Merged changes.
;;;; 2005-01-21 <PJB> Added scanning of PACKAGES: for ASD files.
;;;; 2003-06-05 <PJB> Created.
;;;;BUGS
;;;;LEGAL
;;;; GPL
;;;;
;;;; Copyright Pascal Bourguignon 2003 - 2005.
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public License
;;;; as published by the Free Software Foundation; either version
;;;; 2 of the License, or (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be
;;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;; PURPOSE. See the GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public
;;;; License along with this program; if not, write to the Free
;;;; Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;****************************************************************************
(in-package "COMMON-LISP-USER")
;; (LOAD "CCLAN:ASDF;ASDF.LISP")
;; (LOAD "CCLAN:CCLAN-GET;PACKAGE.LISP")
;; (LOAD "CCLAN:CCLAN-GET;CCLAN-GET.ASD")
;; (handler-case (ASDF:OPERATE 'ASDF:load-OP :CCLAN-GET)
;; (error () (ASDF:OPERATE 'ASDF:compile-OP :CCLAN-GET)))
(LOAD "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
;;(LOAD "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF-INSTALL.LISP")
(in-package "COM.INFORMATIMAGO.PJB")
(defparameter *original-asdf-registry* ASDF:*CENTRAL-REGISTRY*)
(defun asdf-rescan-packages ()
(when *load-verbose*
(format *trace-output* "~&;; Scanning ASDF packages...~%"))
(prog1
(SORT
(DELETE-DUPLICATES
(MAPCAR
(LAMBDA (P) (MAKE-PATHNAME :NAME NIL :TYPE NIL :VERSION NIL :DEFAULTS P))
(DIRECTORY "PACKAGES:**;*.ASD"))
:test (function equal))
(LAMBDA (A B) (if (= (length a) (length b))
(string< a b)
(< (length a) (length b))))
:key (function namestring))
(when *load-verbose*
(format *trace-output* "~&;; Done.~%"))))
(defun update-asdf-registry ()
(setf ASDF:*CENTRAL-REGISTRY*
(nconc (asdf-rescan-packages)
;;(list CCLAN-GET::*CCLAN-ASDF-REGISTRY*)
*original-asdf-registry*)))
(EXPORT 'UPDATE-ASDF-REGISTRY)
(update-asdf-registry)
(in-package "COMMON-LISP-USER")
(asdf:operate 'asdf:load-op :asdf-install)
(format t
"~2%Push on ASDF:*CENTRAL-REGISTRY* directories where .asd files are ~
to be found.~@
Use: (asdf:operate 'asdf:load-op ,system-name)~@
~& (asdf-install:install ,system-name)~@
~2%")
;;;; asdf.lisp -- -- ;;;;
;;;; -*- coding:utf-8 -*-
;;;;****************************************************************************
;;;;FILE: cclan.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; Loads CCLAN.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal Bourguignon <pjb@informatimago.com>
;;;;MODIFICATIONS
;;;; 2003-06-05 <PJB> Created.
;;;;BUGS
;;;;LEGAL
;;;; GPL
;;;;
;;;; Copyright Pascal Bourguignon 2003 - 2003
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public License
;;;; as published by the Free Software Foundation; either version
;;;; 2 of the License, or (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be
;;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;; PURPOSE. See the GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public
;;;; License along with this program; if not, write to the Free
;;;; Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;****************************************************************************
(LOAD "CCLAN:ASDF;ASDF.LISP")
(LOAD "CCLAN:CCLAN-GET;PACKAGE.LISP")
(LOAD "CCLAN:CCLAN-GET;CCLAN-GET.ASD")
(ASDF:OPERATE 'ASDF:LOAD-OP :CCLAN-GET)
(SETF CCLAN-GET::*CCLAN-TARBALL-DIRECTORY* "SHARE-LISP:CCLAN;TARBALL;"
CCLAN-GET::*CCLAN-SOURCE-DIRECTORY* "SHARE-LISP:CCLAN;SOURCE;"
CCLAN-GET::*CCLAN-ASDF-REGISTRY* "SHARE-LISP:CCLAN;REGISTRY;")
(PUSH CCLAN-GET::*CCLAN-ASDF-REGISTRY* ASDF:*CENTRAL-REGISTRY*)
(format t "Push on ASDF:*CENTRAL-REGISTRY* directories where .asd files are ~
to be found.~%")
;;;; cclan.lisp -- -- ;;;;
;;;; -*- coding:utf-8 -*-
;;;;****************************************************************************
;;;;FILE: cl-pdf.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; Loads com.fractalconcept.cl-pdf
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal Bourguignon <pjb@informatimago.com>
;;;;MODIFICATIONS
;;;; 2004-10-05 <PJB> Created.
;;;;BUGS
;;;;LEGAL
;;;; GPL
;;;;
;;;; Copyright Pascal Bourguignon 2004 - 2004
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public License
;;;; as published by the Free Software Foundation; either version
;;;; 2 of the License, or (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be
;;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;; PURPOSE. See the GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public
;;;; License along with this program; if not, write to the Free
;;;; Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;****************************************************************************
(LOAD "LOADERS:ASDF")
(PUSHNEW "PACKAGES:COM;FRACTALCONCEPT;CL-PDF;" ASDF:*CENTRAL-REGISTRY*)
(ASDF:OPERATE 'ASDF:LOAD-OP :CL-PDF)
;;;; cl-pdf.lisp -- -- ;;;;
;;;; -*- coding:utf-8 -*-
;;;;****************************************************************************
;;;;FILE: cliki.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; Loads cliki under sbcl.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal Bourguignon <pjb@informatimago.com>
;;;;MODIFICATIONS
;;;; 2004-12-25 <PJB> Created.
;;;;BUGS
;;;;LEGAL
;;;; GPL
;;;;
;;;; Copyright Pascal Bourguignon 2004 - 2004
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public License
;;;; as published by the Free Software Foundation; either version
;;;; 2 of the License, or (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be
;;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;; PURPOSE. See the GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public
;;;; License along with this program; if not, write to the Free
;;;; Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;****************************************************************************
(if (string= (lisp-implementation-type) "SBCL")
(SB-EXT:WITHOUT-PACKAGE-LOCKS (require 'cliki))
(format t "~&cliki works only on SBCL~%"))
;;;; -*- coding:utf-8 -*-
;; ----------------------------------------------------------------------
;; CLOCC -- Compiling the CLOCC --
;; -------------------------------
(DEFPARAMETER *CLOCC-ROOT*
(namestring
(translate-logical-pathname "PACKAGES:NET;SOURCEFORGE;CLOCC;CLOCC;")))
(LOAD "CLOCC:CLOCC")
(LOAD "CLOCC:SRC;DEFSYSTEM;DEFSYSTEM")
(LOAD "CLOCC:SRC;CLLIB;BASE")
(DEFUN COMPILE-CLOCC ()
(LOAD (compile-file "CLOCC:CLOCC"))
(LOAD (compile-file "CLOCC:SRC;DEFSYSTEM;DEFSYSTEM"))
;; * compile some systems
(SETQ MK::*CENTRAL-REGISTRY*
(NCONC
;; select the systems you want to use
(MAPCAR (LAMBDA (SYSSUB)
(TRANSLATE-LOGICAL-PATHNAME
(CONCATENATE 'STRING "CLOCC:SRC;" SYSSUB)))
'("CLLIB;"
"EXT;QUEUES;"
"EXT;UNION-FIND;"
"GUI;CLX;"
"GUI;CLUE;"
"F2CL;PACKAGES;" "F2CL;"
"PORT;"
"PORT;CONFIGURATION;"
"PORT;ENVIRONMENT;"
"PORT;SHELL;"
"TOOLS;METERING;"
"TOOLS;CLUNIT;"
"SCREAMER;"
"SCREAMER;"
))
MK::*CENTRAL-REGISTRY*))
(MK:OOS "cllib" :COMPILE)
(MK:OOS "f2cl" :COMPILE));;COMPILE-CLOCC
;; ----------------------------------------------------------------------
;; -- CLOCC -- FORTRAN to LISP translator --
;; -----------------------------------------
(DEFVAR *EXT*
#+CLISP ".fas"
#+CMUCL ".x86f"
#+SBCL ".fasl"
#+ALLEGRO ".fasl"
#+VMS ".fas"
#+LUCID ".sbin")
(DEFVAR *F2CL_DIR* "CLOCC:CLOCC;SRC;F2CL;SRC;")
(DEFUN LOAD-F2CL-MODULE (X)
(LOAD (CONCATENATE 'STRING *F2CL_DIR* X *EXT*) :PRINT NIL :VERBOSE NIL)) ;;LOAD-F2CL-MODULE
(DEFUN LOAD-F2CL ()
(LOAD-F2CL-MODULE "f2cl0" )
(LOAD-F2CL-MODULE "f2cl1" )
(LOAD-F2CL-MODULE "f2cl2" )
(LOAD-F2CL-MODULE "f2cl3" )
(LOAD-F2CL-MODULE "f2cl4" )
(LOAD-F2CL-MODULE "f2cl5" )
(LOAD-F2CL-MODULE "f2cl6" )
(LOAD-F2CL-MODULE "f2cl7" )
(LOAD-F2CL-MODULE "macros" )
(FORMAT T "~&The f2cl software has been loaded.~%"));;LOAD-F2CL
(format t "Push on MK::*CENTRAL-REGISTRY* directories where .system files are ~
to be found.~%")
(push "clocc:src;port;" MK::*CENTRAL-REGISTRY*)
;;;; clocc.lisp -- -- ;;;;
;;;; -*- coding:utf-8 -*-
(IN-PACKAGE "COMMON-LISP-USER")
#+SBCL (PROGN
(LOAD "db-sockets")
(PUSHNEW :DB-SOCKETS *FEATURES*) )
#+CLISP (DEFPARAMETER SAVED-WOFPC CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*)
#+CLISP (SETQ CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION* NIL)
(LET ((HOME (OR #+SBCL (SB-EXT:POSIX-GETENV "HOME")
#+CLISP (EXT:GETENV "HOME")
"/home/pascal")))
(SETF (LOGICAL-PATHNAME-TRANSLATIONS "HOME")
(LIST
(LIST "**;*.*" (CONCATENATE 'STRING HOME "/**/*.*"))
(LIST ";**;*.*" (CONCATENATE 'STRING HOME "/**/*.*")))))
(PUSHNEW :CLX-DEBUGGING *FEATURES*)
(DEFPARAMETER *CLX-SOURCES*
'(
;; First load port:
"clocc:clocc;src;port;ext"
"clocc:clocc;src;port;gray"
"clocc:clocc;src;port;path"
"clocc:clocc;src;port;sys"
"clocc:clocc;src;port;net"
"clocc:clocc;src;port;proc"
;; Then split-sequence
"clocc:clocc;src;defsystem-4;src;utilities;split-sequence"
;; Then load the true system:
"clocc:clocc;src;gui;clx;package"
"clocc:clocc;src;gui;clx;depdefs"
"clocc:clocc;src;gui;clx;clx"
"clocc:clocc;src;gui;clx;dependent"
"clocc:clocc;src;gui;clx;macros" ; these are just macros
"clocc:clocc;src;gui;clx;bufmac" ; these are just macros
"clocc:clocc;src;gui;clx;buffer"
"clocc:clocc;src;gui;clx;display"
"clocc:clocc;src;gui;clx;gcontext"
"clocc:clocc;src;gui;clx;input"
"clocc:clocc;src;gui;clx;requests"
"clocc:clocc;src;gui;clx;fonts"
"clocc:clocc;src;gui;clx;graphics"
"clocc:clocc;src;gui;clx;text"
"clocc:clocc;src;gui;clx;attributes"
"clocc:clocc;src;gui;clx;translate"
"clocc:clocc;src;gui;clx;keysyms"
"clocc:clocc;src;gui;clx;manager"
"clocc:clocc;src;gui;clx;image"
"clocc:clocc;src;gui;clx;resource"
"clocc:clocc;src;gui;clx;shape"
;; Then hello world!
"clocc:clocc;src;gui;clx;demo;hello"
))
(DOLIST (FILE *CLX-SOURCES*) (LOAD FILE))
#+CLISP (SETQ CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION* SAVED-WOFPC)
(DEFUN COMPILE-CLX ()
(DOLIST (FILE *CLX-SOURCES*)
(format t "Compiling ~A~%" file)
(LOAD (COMPILE-FILE FILE))))
(DEFUN TEST-CLX ()
(XLIB::HELLO-WORLD ""))
(LOAD "PACKAGE:CLX-DEMOS;QIX.LISP")
(LOAD "PACKAGE:CLX-DEMOS;SOKOBAN.LISP")
;; note: sokoban only works with clisp clx for it needs xpm extension.
;; With common-lisp-controller: (please note that the patches included in
;; the clocc-port subdirectory have not yet been send upstream, so the
;; cvs and cclan version won't do)
;; Put the source in for example ~/common-lisp/src/clx and add the
;; following to your startup script ( ~/.sbclrc or ~/.cmucl-init.lisp)
;; |;;; -*- Mode: Lisp; Package: USER; Base: 10; Syntax: Common-Lisp -*-
;; |
;; |(load "/etc/sbclrc")
;; |
;; |(format t "Hello Peter!~%")
;; |
;; |(common-lisp-controller:add-project-directory
;; | #p"/home/pvaneynd/common-lisp/src/"