~ chicken-core (chicken-5) 07f9be43ba313274832a4dd7530b7b2d811cf884


commit 07f9be43ba313274832a4dd7530b7b2d811cf884
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Sat Apr 29 12:24:30 2017 +0200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Sat Apr 29 23:33:27 2017 +1200

    Drop CHICKEN_PREFIX
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/chicken-status.mdoc b/chicken-status.mdoc
index 99c1a7c3..11790ed5 100644
--- a/chicken-status.mdoc
+++ b/chicken-status.mdoc
@@ -72,10 +72,6 @@ format.
 The following environment variables change the behaviour of
 .Nm Ns :
 .Bl -tag -width CHICKEN_INSTALL_REPOSITORY
-.It Ev CHICKEN_PREFIX
-The installation prefix where CHICKEN Scheme and its support files and
-libraries are located. Defaults to the prefix given when configuring the
-system.
 .It Ev CHICKEN_INSTALL_REPOSITORY
 The path where extension libraries are installed. Defaults to the
 package library path selected during configuration
diff --git a/chicken-uninstall.mdoc b/chicken-uninstall.mdoc
index ae1edac8..b05a30e8 100644
--- a/chicken-uninstall.mdoc
+++ b/chicken-uninstall.mdoc
@@ -69,10 +69,6 @@ When cross-compiling, only uninstall target extensions.
 The following environment variables change the behaviour of
 .Nm Ns :
 .Bl -tag -width CHICKEN_INSTALL_REPOSITORY
-.It Ev CHICKEN_PREFIX
-The installation prefix where CHICKEN Scheme and its support files and
-libraries are located. Defaults to the installation time prefix given
-when configuring the system.
 .It Ev CHICKEN_INSTALL_REPOSITORY
 The path where extension libraries are installed. Defaults to the
 package library path selected during configuration
diff --git a/chicken.mdoc b/chicken.mdoc
index fff7b904..786b5ae0 100644
--- a/chicken.mdoc
+++ b/chicken.mdoc
@@ -248,8 +248,6 @@ Prefer the current directory when locating extensions.
 The following environment variables change the behaviour of
 .Nm Ns :
 .Bl -tag -width CHICKEN_INCLUDE_PATH
-.It Ev CHICKEN_PREFIX
-Is used as a prefix directory for support files, include-files and libraries.
 .It Ev CHICKEN_INCLUDE_PATH
 Contains one or more pathnames where the compiler should additionally look for
 include-files, separated by \; characters.
diff --git a/csc.mdoc b/csc.mdoc
index 4a052e1e..289525a6 100644
--- a/csc.mdoc
+++ b/csc.mdoc
@@ -352,14 +352,10 @@ is the same as
 .Sh ENVIRONMENT
 The following environment variables change the behaviour of
 .Nm Ns :
-.Bl -tag -width CHICKEN_PREFIX
+.Bl -tag -width CSC_OPTIONS
 .It Ev CSC_OPTIONS
 Can hold default options that should be passed to every invocation of
 .Nm .
-.It Ev CHICKEN_PREFIX
-The installation prefix where CHICKEN Scheme and its support files and
-libraries are located. Defaults to the installation time prefix given
-when configuring the system.
 .El
 .Sh EXIT STATUS
 .Ex -std
diff --git a/csi.mdoc b/csi.mdoc
index b8d32972..b5906685 100644
--- a/csi.mdoc
+++ b/csi.mdoc
@@ -117,10 +117,6 @@ Contains one or more pathnames where the interpreter should also look
 for include files, separated by
 .Sq \&;
 characters.
-.It Ev CHICKEN_PREFIX
-The installation prefix where CHICKEN Scheme and its support files and
-libraries are located. Defaults to the prefix given when configuring the
-system.
 .br
 Note that runtime options of the form
 .Sq \&-
diff --git a/csi.scm b/csi.scm
index a60d620b..321c418d 100644
--- a/csi.scm
+++ b/csi.scm
@@ -439,9 +439,7 @@ EOF
 	(with-output-to-port with-output-to-port)
 	(current-output-port current-output-port) 
 	(argv argv)
-	(prefix
-	 (or (get-environment-variable "CHICKEN_PREFIX")
-	     (foreign-value "C_INSTALL_PREFIX" c-string) ) ))
+	(prefix (foreign-value "C_INSTALL_PREFIX" c-string)))
     (lambda port
       (with-output-to-port (if (pair? port) (car port) (current-output-port))
 	(lambda ()
diff --git a/library.scm b/library.scm
index 84576b86..071d85dc 100644
--- a/library.scm
+++ b/library.scm
@@ -5830,38 +5830,20 @@ EOF
 (define-foreign-variable installation-home c-string "C_INSTALL_SHARE_HOME")
 (define-foreign-variable install-egg-home c-string "C_INSTALL_EGG_HOME")
 
-(define chicken-prefix
-  (let ((prefix (and-let* ((p (get-environment-variable "CHICKEN_PREFIX")))
-		  (##sys#string-append
-		   p
-		   (if (memq (string-ref p (fx- (##sys#size p) 1)) '(#\\ #\/)) "" "/")))))
-    (lambda (#!optional dir)
-      (and prefix
-	   (if dir (##sys#string-append prefix dir) prefix)))))
+(define (chicken-home) installation-home)
 
 (define repository-path
   (make-parameter
    (or (foreign-value "C_private_repository_path()" c-string)
        (get-environment-variable "CHICKEN_REPOSITORY_PATH")
-       (chicken-prefix
-	(##sys#string-append
-	 "lib/chicken/"
-	 (##sys#number->string binary-version)))
        install-egg-home)))
 
 (define installation-repository
   (make-parameter
    (or (foreign-value "C_private_repository_path()" c-string)
        (get-environment-variable "CHICKEN_INSTALL_REPOSITORY")
-       (chicken-prefix
-	(##sys#string-append
-	 "lib/chicken/"
-	 (##sys#number->string binary-version)))
        install-egg-home)))
 
-(define (chicken-home)
-  (or (chicken-prefix "share/chicken") installation-home))
-
 (define extension-information
   (let ((with-input-from-file with-input-from-file)
 	(string-append string-append)
diff --git a/manual/Unit eval b/manual/Unit eval
index 79e0f073..e00964a7 100644
--- a/manual/Unit eval	
+++ b/manual/Unit eval	
@@ -174,9 +174,6 @@ loaded, or {{#f}} otherwise.
 <procedure>(chicken-home)</procedure>
 
 Returns a string which represents the installation directory (usually {{/usr/local/share/chicken}} on UNIX-like systems).
-As a last option,
-if the environment variable {{CHICKEN_PREFIX}} is set, then {{chicken-home}} will return
-{{$CHICKEN_PREFIX/share}}.
 
 
 === Eval
Trap