~ chicken-core (chicken-5) de4c02c94a702ec2fbdf43c089759a44ed6750a3
commit de4c02c94a702ec2fbdf43c089759a44ed6750a3 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Thu Feb 11 09:38:09 2010 +0100 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Thu Feb 11 09:38:09 2010 +0100 introduced C_INSTALL_PREFIX, csi report prints some paths diff --git a/Makefile.mingw b/Makefile.mingw index a1b11c51..09d609fc 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -144,6 +144,9 @@ chicken-defaults.h: echo #ifndef C_INSTALL_LDFLAGS >>$@ echo # define C_INSTALL_LDFLAGS "$(LINKER_OPTIONS) $(LINKER_OPTIMIZATION_OPTIONS)" >>$@ echo #endif >>$@ + echo #ifndef C_INSTALL_PREFIX >>$@ + echo # define C_INSTALL_PREFIX "$(PREFIX)" >>$@ + echo #endif >>$@ echo #ifndef C_INSTALL_SHARE_HOME >>$@ echo # define C_INSTALL_SHARE_HOME "$(DATADIR)" >>$@ echo #endif >>$@ diff --git a/csi.scm b/csi.scm index cc83ebe5..9fc0d55e 100644 --- a/csi.scm +++ b/csi.scm @@ -381,7 +381,10 @@ EOF (chop chop) (sort sort) (with-output-to-port with-output-to-port) - (current-output-port current-output-port) ) + (current-output-port current-output-port) + (prefix + (or (get-environment-variable "CHICKEN_PREFIX") + (foreign-value "C_INSTALL_PREFIX" c-string) ) )) (lambda port (with-output-to-port (if (pair? port) (car port) (current-output-port)) (lambda () @@ -403,6 +406,8 @@ EOF Software type: \t~A~%~ Software version:\t~A~%~ Build platform: \t~A~%~ + Installation prefix:\t~A~%~ + Extension path: \t~A~%~ Include path: \t~A~%~ Symbol-table load:\t~S~% ~ Avg bucket length:\t~S~% ~ @@ -414,6 +419,8 @@ EOF (software-type) (software-version) (build-platform) + prefix + (repository-path) ##sys#include-pathnames (shorten (vector-ref sinfo 0)) (shorten (vector-ref sinfo 1)) diff --git a/defaults.make b/defaults.make index 3f5fc952..2447cd1d 100644 --- a/defaults.make +++ b/defaults.make @@ -371,6 +371,9 @@ chicken-defaults.h: echo "#ifndef C_INSTALL_LDFLAGS" >>$@ echo "# define C_INSTALL_LDFLAGS \"$(LINKER_OPTIONS) $(LINKER_OPTIMIZATION_OPTIONS)\"" >>$@ echo "#endif" >>$@ + echo "#ifndef C_INSTALL_PREFIX" >>$@ + echo "# define C_INSTALL_PREFIX \"$(PREFIX)\"" >>$@ + echo "#endif" >>$@ echo "#ifndef C_INSTALL_SHARE_HOME" >>$@ echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@ echo "#endif" >>$@ diff --git a/rules.make b/rules.make index 9ec63d8f..10b9c01a 100644 --- a/rules.make +++ b/rules.make @@ -878,8 +878,6 @@ ifneq ($(POSTINSTALL_PROGRAM),true) $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) "$(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_UNINSTALL_PROGRAM)" $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) "$(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_STATUS_PROGRAM)" endif -# this might be left over from older version and will break `chicken-install -update-db' - -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(IEGGDIR)$(SEP)compiler.import.so" ifneq ($(CROSS_CHICKEN),1) ifeq ($(DESTDIR),) -$(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_INSTALL_PROGRAM) -update-db diff --git a/setup-api.scm b/setup-api.scm index 84ff085f..24cc1e48 100644 --- a/setup-api.scm +++ b/setup-api.scm @@ -44,7 +44,8 @@ host-extension install-extension install-program install-script setup-verbose-mode setup-install-mode - installation-prefix chicken-prefix + installation-prefix + chicken-prefix ;XXX remove at some stage from exports find-library find-header program-path remove-file* patch yes-or-no? abort-setup @@ -97,12 +98,9 @@ (make-pathname p "bin") ) (foreign-value "C_INSTALL_BIN_HOME" c-string) ) ) -(define chicken-prefix +(define chicken-prefix (or (get-environment-variable "CHICKEN_PREFIX") - (let ((m (string-match "(.*)/bin/?" *chicken-bin-path*))) - (if m - (cadr m) - "/usr/local") ) ) ) + (foreign-value "C_INSTALL_PREFIX" c-string))) (define (shellpath str) (qs (normalize-pathname str)))Trap