From 3b17f253f90c3a9a3ea8998925ca852d8f485a81 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 9 Jun 2007 01:22:56 +0000 Subject: [PATCH] Rationalize arrangement of library directory. Rename "options" to "runtime"; move contents of "edwin/autoload" and "edwin/etc" to "edwin" and eliminate those now-empty directories; and eliminate "SRC" by moving its contents into "edwin" and "runtime". --- v7/src/Makefile.in | 9 ++++----- v7/src/Setup.sh | 13 +++---------- v7/src/edwin/Makefile-fragment | 12 +++--------- v7/src/edwin/paths.scm | 13 ++++++------- v7/src/runtime/Makefile-fragment | 14 +++++--------- v7/src/runtime/infutl.scm | 17 +++++++---------- v7/src/runtime/option.scm | 17 +++++++---------- v7/src/runtime/optiondb.scm | 4 ++-- 8 files changed, 37 insertions(+), 62 deletions(-) diff --git a/v7/src/Makefile.in b/v7/src/Makefile.in index f9b0de749..0f0a44146 100644 --- a/v7/src/Makefile.in +++ b/v7/src/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.41 2007/06/08 06:03:32 cph Exp $ +# $Id: Makefile.in,v 1.42 2007/06/09 01:22:11 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -68,7 +68,7 @@ SUBDIRS = $(INSTALLED_SUBDIRS) 6001 compiler rcs win32 xdoc INSTALLED_SUBDIRS = microcode runtime $(LIARC_BUNDLES) AUXDIR = @AUXDIR@ -EDETC = $(AUXDIR)/edwin/etc +EDDIR = $(AUXDIR)/edwin all: @ALL_TARGET@ @@ -166,9 +166,8 @@ install-standard: install-auxdir-top echo "Making $@ in $${SUBDIR}";\ (cd $${SUBDIR}; $(MAKE) install) || exit 1;\ done - - $(mkinstalldirs) $(DESTDIR)$(EDETC) - $(INSTALL_DATA) $(top_srcdir)/etc/TUTORIAL $(DESTDIR)$(EDETC)/. + $(mkinstalldirs) $(DESTDIR)$(EDDIR) + $(INSTALL_DATA) $(top_srcdir)/etc/TUTORIAL $(DESTDIR)$(EDDIR)/. install-auxdir-top: $(mkinstalldirs) $(DESTDIR)$(AUXDIR) diff --git a/v7/src/Setup.sh b/v7/src/Setup.sh index 5f6cf26bc..22b74aba3 100755 --- a/v7/src/Setup.sh +++ b/v7/src/Setup.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: Setup.sh,v 1.26 2007/06/06 19:42:38 cph Exp $ +# $Id: Setup.sh,v 1.27 2007/06/09 01:22:18 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -41,19 +41,12 @@ OTHER_SUBDIRS="6001 compiler runtime win32 xdoc microcode" # lib maybe_mkdir lib maybe_mkdir lib/lib -maybe_link lib/SRC .. +maybe_link lib/edwin ../edwin maybe_link lib/include ../microcode maybe_link lib/optiondb.scm ../etc/optiondb.scm -maybe_link lib/options ../runtime +maybe_link lib/runtime ../runtime maybe_link lib/utabmd.bin ../microcode/utabmd.bin -# lib/edwin -maybe_mkdir lib/edwin -maybe_mkdir lib/edwin/etc -maybe_link lib/edwin/etc/TUTORIAL ../../../etc/TUTORIAL -maybe_link lib/edwin/etc/mime.types ../../../etc/mime.types -maybe_link lib/edwin/autoload ../../edwin - for SUBDIR in ${INSTALLED_SUBDIRS} ${OTHER_SUBDIRS}; do echo "setting up ${SUBDIR}" maybe_link ${SUBDIR}/Setup.sh ../etc/Setup.sh diff --git a/v7/src/edwin/Makefile-fragment b/v7/src/edwin/Makefile-fragment index 38b5e2fbf..93c81cb09 100644 --- a/v7/src/edwin/Makefile-fragment +++ b/v7/src/edwin/Makefile-fragment @@ -1,19 +1,13 @@ EDDIR = $(AUXDIR)/edwin -EODIR = $(EDDIR)/autoload EDOPTS = debian-changelog eystep lisppaste manual midas nntp paredit pasmod \ print pwedit pwparse snr sort techinfo telnet tximod verilog vhdl \ webster install: - $(mkinstalldirs) $(DESTDIR)$(AUXDIR)/SRC/edwin + rm -rf $(DESTDIR)$(EDDIR) $(mkinstalldirs) $(DESTDIR)$(EDDIR) - $(INSTALL_DATA) *.bci $(DESTDIR)$(AUXDIR)/SRC/edwin/. - - rm -rf $(DESTDIR)$(EODIR) - $(mkinstalldirs) $(DESTDIR)$(EODIR) + $(INSTALL_DATA) *.bci $(DESTDIR)$(EDDIR)/. @for F in $(EDOPTS); do \ - CMD="$(INSTALL_COM) $${F}.com $(DESTDIR)$(EODIR)/.";\ - echo "$${CMD}"; eval "$${CMD}";\ - CMD="(cd $(DESTDIR)$(EODIR);$(LN_S) ../../SRC/edwin/$${F}.bci .)";\ + CMD="$(INSTALL_COM) $${F}.com $(DESTDIR)$(EDDIR)/.";\ echo "$${CMD}"; eval "$${CMD}";\ done diff --git a/v7/src/edwin/paths.scm b/v7/src/edwin/paths.scm index 51d62c18f..1799a9729 100644 --- a/v7/src/edwin/paths.scm +++ b/v7/src/edwin/paths.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: paths.scm,v 1.20 2007/01/05 21:19:24 cph Exp $ +$Id: paths.scm,v 1.21 2007/06/09 01:22:31 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -29,23 +29,22 @@ USA. (declare (usual-integrations)) -(define (edwin-library-directory-pathname envvar name required?) +(define (edwin-library-directory-pathname envvar required?) (let ((envval (get-environment-variable envvar))) (if envval (pathname-as-directory (merge-pathnames envval)) - (or (system-library-directory-pathname - (merge-pathnames name (pathname-as-directory "edwin"))) + (or (system-library-directory-pathname "edwin") (and required? (error "Can't find edwin library directory:" name)))))) (define (edwin-binary-directory) - (edwin-library-directory-pathname "EDWIN_BINARY_DIRECTORY" "autoload" #t)) + (edwin-library-directory-pathname "EDWIN_BINARY_DIRECTORY" #t)) (define (edwin-info-directory) - (edwin-library-directory-pathname "EDWIN_INFO_DIRECTORY" "info" #f)) + (edwin-library-directory-pathname "EDWIN_INFO_DIRECTORY" #f)) (define (edwin-etc-directory) - (edwin-library-directory-pathname "EDWIN_ETC_DIRECTORY" "etc" #t)) + (edwin-library-directory-pathname "EDWIN_ETC_DIRECTORY" #t)) (define (edwin-etc-pathname filename) (let ((pathname (merge-pathnames filename (edwin-etc-directory)))) diff --git a/v7/src/runtime/Makefile-fragment b/v7/src/runtime/Makefile-fragment index 51431883f..660e08fe3 100644 --- a/v7/src/runtime/Makefile-fragment +++ b/v7/src/runtime/Makefile-fragment @@ -1,16 +1,12 @@ -RODIR = $(AUXDIR)/options +RUNDIR = $(AUXDIR)/runtime RUNOPTS = chrsyn cpress format gdbm hashtb krypt mime-codec numint optiondb \ ordvec pgsql process rbtree regexp rexp rgxcmp syncproc wttree ystep install: - $(mkinstalldirs) $(DESTDIR)$(AUXDIR)/SRC/runtime - $(INSTALL_DATA) *.bci $(DESTDIR)$(AUXDIR)/SRC/runtime/. - - rm -rf $(DESTDIR)$(RODIR) - $(mkinstalldirs) $(DESTDIR)$(RODIR) + rm -rf $(DESTDIR)$(RUNDIR) + $(mkinstalldirs) $(DESTDIR)$(RUNDIR) + $(INSTALL_DATA) *.bci $(DESTDIR)$(RUNDIR)/. @for F in $(RUNOPTS); do \ - CMD="$(INSTALL_COM) $${F}.com $(DESTDIR)$(RODIR)/.";\ - echo "$${CMD}"; eval "$${CMD}";\ - CMD="(cd $(DESTDIR)$(RODIR); $(LN_S) ../SRC/runtime/$${F}.bci .)";\ + CMD="$(INSTALL_COM) $${F}.com $(DESTDIR)$(RUNDIR)/.";\ echo "$${CMD}"; eval "$${CMD}";\ done diff --git a/v7/src/runtime/infutl.scm b/v7/src/runtime/infutl.scm index 78969a0b9..8d194f7ef 100644 --- a/v7/src/runtime/infutl.scm +++ b/v7/src/runtime/infutl.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: infutl.scm,v 1.72 2007/01/05 21:19:28 cph Exp $ +$Id: infutl.scm,v 1.73 2007/06/09 01:22:38 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -291,15 +291,12 @@ USA. (->namestring (canonicalize-debug-info-pathname filename))) (define (canonicalize-debug-info-pathname pathname) - (if (pathname-absolute? pathname) - pathname - (merge-pathnames - pathname - (let ((value - (get-environment-variable "MITSCHEME_INF_DIRECTORY"))) - (if value - (pathname-as-directory value) - (system-library-directory-pathname "SRC")))))) + (merge-pathnames + pathname + (let ((value (get-environment-variable "MITSCHEME_INF_DIRECTORY"))) + (if value + (pathname-as-directory value) + (system-library-directory-pathname))))) (define-integrable (dbg-block/layout-first-offset block) (let ((layout (dbg-block/layout block))) diff --git a/v7/src/runtime/option.scm b/v7/src/runtime/option.scm index f6d6d44a8..183901cba 100644 --- a/v7/src/runtime/option.scm +++ b/v7/src/runtime/option.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: option.scm,v 14.56 2007/06/06 19:42:42 cph Exp $ +$Id: option.scm,v 14.57 2007/06/09 01:22:56 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -83,10 +83,8 @@ USA. (standard-load-options))) (define (standard-load-options) - (or (library-file? "runtime/optiondb") ; for C back end - (library-file? "options/optiondb") - (error "Cannot locate a load-option database") - "optiondb")) + (or (library-file? "runtime/optiondb") + (error "Cannot locate a load-option database."))) (define (library-file? library-internal-path) (confirm-pathname (system-library-pathname library-internal-path #f))) @@ -106,7 +104,8 @@ USA. (define (standard-option-loader package-name init-expression . files) (lambda () (let ((environment (package/environment (find-package package-name))) - (runtime (pathname-as-directory "runtime"))) + (runtime (pathname-as-directory "runtime")) + (rundir (system-library-directory-pathname "runtime" #t))) (for-each (lambda (file) (let ((file (force* file))) @@ -115,10 +114,8 @@ USA. (purify obj) (scode-eval obj environment))) (else - (let* ((options - (system-library-directory-pathname "options" #t)) - (pathname (merge-pathnames file options))) - (with-directory-rewriting-rule options runtime + (let ((pathname (merge-pathnames file rundir))) + (with-directory-rewriting-rule rundir runtime (lambda () (with-working-directory-pathname (directory-pathname pathname) diff --git a/v7/src/runtime/optiondb.scm b/v7/src/runtime/optiondb.scm index e4ee7230a..a80799fad 100644 --- a/v7/src/runtime/optiondb.scm +++ b/v7/src/runtime/optiondb.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: optiondb.scm,v 1.19 2007/01/05 21:19:28 cph Exp $ +$Id: optiondb.scm,v 1.20 2007/06/09 01:22:50 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -42,7 +42,7 @@ USA. ;; ;; (STANDARD-OPTION-LOADER 'PACKAGE-NAME 'EXPR file file ...) ;; Creates a loader that loads the files (strings relative to -;; $MITSCHEME_LIBRARY_PATH/options) into the environment of the +;; $MITSCHEME_LIBRARY_PATH/runtime/) into the environment of the ;; package named PACKAGE-NAME, and then evaluates EXPR in that load ;; environment. If EXPR is #F of course evaluating it has no effect. ;; -- 2.25.1