1 ;;; load-path.el --- Used for compiling Emacs lisp files
8 ;; Copyright (C) 1997-2007 Jari Aalto
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2 of
13 ;; the License, or (at your option) any later version.
15 ;; This program is distributed in the hope that it will be
16 ;; useful, but WITHOUT ANY WARRANTY; without even the implied
17 ;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 ;; PURPOSE. See the GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public
21 ;; License along with program; see the file COPYING. If not,
22 ;; write to the Free Software Foundation, Inc., 51 Franklin
23 ;; Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 ;; Visit <http://www.gnu.org/copyleft/gpl.html> for more information
29 ;; This file part of the Tiny Tools Kit for Emacs: collection of
32 ;; Before compiling, this file is included via -l FILE switch and it
33 ;; defines correct load path in order to find the files that are needed
34 ;; in compilation. If your private directory is not in ~/elisp or
35 ;; ~/lisp then add new path to the place shown below.
40 (setq debug-on-error nil) ;; Must be like this in batch byte compile
42 (autoload 'ti::package-autoload-create-on-file "tinylib")
43 (autoload 'ti::package-autoload-loaddefs-build-recursive "tinylib")
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
48 ;; PLEASE CONFIFURE THIS `dolist' to include paths in your system
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56 ;; Define any new path HERE. It won't matter if you
57 ;; define non-exiting paths, they are stripped away.
59 ;; some users prefer the directory called ~/lisp istead of
60 ;; ~/elisp (Emacs Lisp)
65 ;; Unix: Posisbly the best is to have
66 ;; this directory to be a symbolic link to latest distribution
68 ;; Win32: Symbolic links don't work, change this to the absolute
69 ;; path of the kit location directories.
73 "~/elisp/tiny/lisp/tiny"
74 "~/elisp/tiny/lisp/other"
76 ;; Any other directories that you have in you ~/elips or
78 "/usr/share/site-lisp"
79 "/usr/share/site-lisp/net"
81 ;; The best way to keep up with the development is to
82 ;; use CVS. See BBDB and Gnus sites for CVS.
84 "/usr/share/site-lisp/net/cvs-packages"
85 "/usr/share/site-lisp/net/cvs-packages/bbdb/lisp"
86 "/usr/share/site-lisp/net/cvs-packages/gnus/lisp"
88 ;; Any other directories that you have in you ~/elips or
89 ;; site wide /usr/share/site-lisp or under /opt hierarchy
92 "~/elisp/bbdb/lisp" ;usually symbolic link to latest
98 (when (file-exists-p path)
99 (pushnew (expand-file-name path) load-path :test 'string=)))
101 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
104 ;; LOAD PATH self-check
107 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
109 ;;; ----------------------------------------------------------------------
111 (defun tiny-tmp-load-path-print (&optional function eval)
112 "Print `load-path' using `function'.
113 Default is `message'. Eval optional EVAL."
117 (dolist (path load-path)
119 (funcall function " %d %s" i path)
120 (message " %d %s" i path))
124 ;; Remove comment if you want to see the load path
125 ;; before compiling starts. The printed path (order) may give a clue
126 ;; why compile might have failed.
128 ;; (tiny-tmp-load-path-print)
130 ;; Check that load-path is in order
131 (let ((path (locate-library "tinylibm")))
133 nil ;; (message "FOUND: %s" path)
134 (tiny-tmp-load-path-print)
137 ** Can't find library [tinylibm]. Please update
138 file [load-path.el] which sets up load-path for compilation purposes."))))
140 ;;; load-path.el ends here