Hi!

This patch removes the internal procedure "chicken-prefix" in eval.scm,
and thus any support for the CHICKEN_PREFIX environment variable.
Also, some old refrences to CHICKEN_INSTALL_PREFIX have been removed
from the documentation.


felix

From 00ed94a099f25e20b141a1e54f5fa0548e174517 Mon Sep 17 00:00:00 2001
From: felix <[email protected]>
Date: Sat, 29 Apr 2017 12:24:30 +0200
Subject: [PATCH] drop chicken-prefix

---
 chicken-status.mdoc    |    9 +--------
 chicken-uninstall.mdoc |    9 +--------
 chicken.mdoc           |    4 +---
 csc.mdoc               |    6 +-----
 csi.mdoc               |    6 +-----
 csi.scm                |    4 +---
 eval.scm               |   21 +--------------------
 manual/Unit eval       |    3 ---
 8 files changed, 7 insertions(+), 55 deletions(-)

diff --git a/chicken-status.mdoc b/chicken-status.mdoc
index 509a80b..ecac162 100644
--- a/chicken-status.mdoc
+++ b/chicken-status.mdoc
@@ -68,14 +68,7 @@ show version and exit
 .Sh ENVIRONMENT
 Following environment variables change the behaviour of
 .Nm
-.Bl -tag -width CHICKEN_INSTALL_PREFIX
-.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_PREFIX
-An alternative installation prefix that will be prepended to extension
-installation paths if specified.
+.Bl -tag -width CHICKEN_INSTALL_REPOSITORY
 .It Ev CHICKEN_REPOSITORY_PATH
 One or more directories holding extension libraries, defaults to the
 installation repository.
diff --git a/chicken-uninstall.mdoc b/chicken-uninstall.mdoc
index 6a49a39..a454367 100644
--- a/chicken-uninstall.mdoc
+++ b/chicken-uninstall.mdoc
@@ -67,14 +67,7 @@ show version and exit
 .Sh ENVIRONMENT
 Following environment variables change the behaviour of
 .Nm
-.Bl -tag -width CHICKEN_INSTALL_PREFIX
-.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_PREFIX
-An alternative installation prefix that will be prepended to extension
-installation paths if specified.
+.Bl -tag -width CHICKEN_INSTALL_REPOSITORY
 .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 a9adfd0..ad26ac2 100644
--- a/chicken.mdoc
+++ b/chicken.mdoc
@@ -244,9 +244,7 @@ prefer the current directory when locating extensions
 .Sh ENVIRONMENT
 Following environment variables change the behaviour of
 .Nm
-.Bl -tag -width CHICKEN_INSTALL_PREFIX
-.It Ev CHICKEN_PREFIX
-Is used as a prefix directory for support files, include-files and libraries.
+.Bl -tag -width CHICKEN_INCLUDE_PATH
 .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 c668f81..e8a0c6f 100644
--- a/csc.mdoc
+++ b/csc.mdoc
@@ -351,14 +351,10 @@ is the same as
 .Sh ENVIRONMENT
 Following environment variables change the behaviour of
 .Nm
-.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 571e076..fe49ad4 100644
--- a/csi.mdoc
+++ b/csi.mdoc
@@ -107,15 +107,11 @@ ignore all following options
 .Sh ENVIRONMENT
 Following environment variables change the behaviour of
 .Nm
-.Bl -tag -width CHICKEN_INSTALL_PREFIX
+.Bl -tag -width CHICKEN_INCLUDE_PATH
 .It Ev CHICKEN_INCLUDE_PATH
 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 installation time prefix given
-when configuring the system.
 .It Ev CSI_OPTIONS
 When set to a string of command-line options, then the options are passed implicitly
 to every direct or indirect invocation of
diff --git a/csi.scm b/csi.scm
index ad9583b..3776fe2 100644
--- a/csi.scm
+++ b/csi.scm
@@ -440,9 +440,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/eval.scm b/eval.scm
index 7408914..f368586 100644
--- a/eval.scm
+++ b/eval.scm
@@ -102,7 +102,6 @@
 (define-constant environment-table-size 301)
 (define-constant source-file-extension ".scm")
 (define-constant setup-file-extension "egg-info")
-(define-constant prefix-environment-variable "CHICKEN_PREFIX")
 (define-constant windows-object-file-extension ".obj")
 (define-constant unix-object-file-extension ".o")
 (define-constant loadable-file-extension ".so")
@@ -133,15 +132,6 @@
     ((cygwin) cygwin-default-dynamic-load-libraries)
     (else `(,(string-append "lib" install-lib-name)))))
 
-(define chicken-prefix
-  (let ((prefix (and-let* ((p (get-environment-variable prefix-environment-variable)))
-		  (##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) ) ) ) )
-
 
 ;;; Library registration (used for code loading):
 
@@ -154,8 +144,7 @@
 
 ;;; System settings
 
-(define (chicken-home)
-  (or (chicken-prefix "share/chicken") installation-home))
+(define (chicken-home) installation-home)
 
 
 ;;; Lo-level hashtable support:
@@ -1196,20 +1185,12 @@
   (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 ##sys#repository-path repository-path)
diff --git a/manual/Unit eval b/manual/Unit eval
index 79e0f07..e00964a 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
-- 
1.7.9.5

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to