Raymond Toy pushed to branch master at cmucl / cmucl
Commits: 28f24fa8 by Raymond Toy at 2024-12-16T16:11:03+00:00 Fix #360: Add default-site-init file
- - - - - adac84ea by Raymond Toy at 2024-12-16T16:11:07+00:00 Merge branch 'issue-360-add-site-init' into 'master'
Fix #360: Add default-site-init file
Closes #360
See merge request cmucl/cmucl!257 - - - - -
4 changed files:
- bin/make-main-dist.sh - bin/run-unit-tests.sh - src/code/generic-site.lisp → src/code/default-site-init.lisp - src/code/save.lisp
Changes:
===================================== bin/make-main-dist.sh ===================================== @@ -148,7 +148,7 @@ install ${GROUP} ${OWNER} -m 0755 src/tools/load-foreign.csh src/tools/config \ $DESTDIR/lib/cmucl/lib/ install ${GROUP} ${OWNER} -m 0644 src/tools/config.lisp \ $DESTDIR/lib/cmucl/lib/ -install ${GROUP} ${OWNER} -m 0644 src/code/generic-site.lisp \ +install ${GROUP} ${OWNER} -m 0644 src/code/default-site-init.lisp \ $DESTDIR/lib/cmucl/lib/ install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/lisp.nm $TARGET/lisp/lisp.map \ $TARGET/lisp/internals.h $TARGET/lisp/internals.inc $DESTDIR/lib/cmucl/
===================================== bin/run-unit-tests.sh ===================================== @@ -54,7 +54,7 @@ trap cleanup EXIT
if [ $# -eq 0 ]; then # No args so run all the tests - $LISP -noinit -load tests/run-tests.lisp -eval '(cmucl-test-runner:run-all-tests)' + $LISP -nositeinit -noinit -load tests/run-tests.lisp -eval '(cmucl-test-runner:run-all-tests)' else # Run selected files. Convert each file name to uppercase and append "-TESTS" result="" @@ -63,6 +63,6 @@ else new=`echo $f | tr '[a-z]' '[A-Z]'` result="$result ""$new-TESTS" done - $LISP -noinit -load tests/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))" + $LISP -nositeinit -noinit -load tests/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))" fi
===================================== src/code/generic-site.lisp → src/code/default-site-init.lisp ===================================== @@ -5,28 +5,20 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: src/code/generic-site.lisp $") + "$Header: src/code/default-site-init.lisp $") ;;; ;;; ********************************************************************** ;;; -;;; This file is installed as "library:site-init" in binary -;;; distributions of CMUCL. +;;; This is the default site init file and should be installed as +;;; "library:default-site-init". This file is used only if +;;; "library:site-init" does not exist. + ;;; (in-package "SYSTEM")
;;; Put your site name here... -(setq *short-site-name* "Unknown") -(setq *long-site-name* "Site name not initialized") - -;;; We would appreciate it if each site establishes a local maintainer who can -;;; filter bug reports from novice users to make sure that they really have -;;; found a bug. Fill in the maintainer's address here.. -(when *herald-items* - (rplaca - (cdr (member :bugs *herald-items*)) - '("Send questions and bug reports to your local CMUCL maintainer, " terpri - "or see http://www.cmucl.org/support.html." terpri - "Loaded subsystems:" terpri))) +;; (setq *short-site-name* "Unknown") +;; (setq *long-site-name* "Site name not initialized")
;;; If you have sources installed on your system, un-comment the following form ;;; and change it to point to the source location. This will allow the Hemlock @@ -47,14 +39,6 @@ ;;; ;;; If your sources are located somewhere else, change this ;;; accordingly. -#| (setf (search-list "target:") - (list - (namestring - (make-pathname - :directory (pathname-directory - (merge-pathnames (make-pathname - :directory '(:relative :up :up - :up "src")) - (pathname lisp::*cmucl-core-path*))))))) -|# + '("library:../src/")) +
===================================== src/code/save.lisp ===================================== @@ -348,7 +348,8 @@ (when (and site-init (not (and process-command-line (find-switch "nositeinit")))) - (load site-init :if-does-not-exist nil :verbose nil)) + (or (load site-init :if-does-not-exist nil :verbose nil) + (load "library:default-site-init" :if-does-not-exist nil :verbose nil))) (when (and process-command-line (find-switch "edit")) (setf *editor-lisp-p* t)) (when (and load-init-file
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/f1f5768dd9f9d3d63f54e90...