Changeset 12247 in project


Ignore:
Timestamp:
10/22/08 10:49:53 (12 years ago)
Author:
felix winkelmann
Message:

added missing documentation; -init option for chicken-install; added missing chicken-home to chicken.import.scm

Location:
chicken/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/TODO

    r12227 r12247  
    3636* branches
    3737** merge cmi branch and announce changes
     38** test irregular branch
    3839
    3940* expander
     
    8384*** use HTTP_PROXY env. var
    8485*** handle redirects in http-fetch
    85 *** connect timeout and alternative download location
    86 ** chicken-install
    87 *** should cache extension-info
    88     necessary?
    89 ** funky: allow CHICKEN_REPOSITORY to be a list and try in order
    90 *** special name to refer to default repo
    9186
    9287* library
  • chicken/trunk/chicken-install.1

    r11776 r12247  
    3636.B \-force
    3737Do not ask when versions don't match, continue with the installation instead.
     38
     39.TP
     40.BI \-i,\ \-init\ DIRECTORY
     41Initialize empty alternative repository.
    3842
    3943.TP
  • chicken/trunk/chicken-install.scm

    r12227 r12247  
    3030
    3131
    32 #+(not csi)
    3332(foreign-declare #<<EOF
    3433#ifndef C_INSTALL_BIN_HOME
     
    4544  (import setup-utils setup-download)
    4645 
    47   #+(not csi) (import foreign)
     46  (import foreign)
     47
     48  (define +default-repository-files+
     49    '("setup-api.so" "setup-api.import.so"
     50      "setup-utils.so" "setup-utils.import.so"
     51      "setup-download.so" "setup-download.import.so"
     52      "chicken.import.so"
     53      "lolevel.import.so"
     54      "srfi-1.import.so"
     55      "srfi-4.import.so"
     56      "data-structures.import.so"
     57      "ports.import.so"
     58      "files.import.so"
     59      "posix.import.so"
     60      "srfi-13.import.so"
     61      "srfi-69.import.so"
     62      "extras.import.so"
     63      "regex.import.so"
     64      "srfi-14.import.so"
     65      "tcp.import.so"
     66      "foreign.import.so"
     67      "scheme.import.so"
     68      "srfi-18.import.so"
     69      "utils.import.so"
     70      "csi.import.so"))
    4871
    4972  (define *program-path*
    5073    (or (and-let* ((p (getenv "CHICKEN_PREFIX")))
    5174          (make-pathname p "bin") )
    52         (cond-expand
    53          (csi (make-pathname (current-directory) "bin"))                        ; just for debugging
    54          (else (foreign-value "C_INSTALL_BIN_HOME" c-string) ) )) )
     75        (foreign-value "C_INSTALL_BIN_HOME" c-string) ) )
    5576
    5677  (define *keep* #f)
     
    6990
    7091  (define (load-defaults)
    71     (let ((deff (make-pathname (repository-path) "setup.defaults")))
     92    (let ((deff (make-pathname (chicken-home) "setup.defaults")))
    7293      (cond ((not (file-exists? deff)) '())
    7394            (else
     
    79100          (cdr d))
    80101        '()))
     102
     103  (define (init-repository dir)
     104    (let ((src (repository-path))
     105          (copy (if (or (feature? 'mingw32) (feature? 'msvc))
     106                    "copy"
     107                    "cp -r")))
     108      (print "copying required files to " dir " ...")
     109      (for-each
     110       (lambda (f)
     111         (system* "~a ~a ~a" copy (make-pathname src f) dir))
     112       +default-repository-files+)))
    81113
    82114  (define (ext-version x)
     
    274306       -username USER           set username for transports that require this
    275307       -password PASS           set password for transports that require this
     308  -i   -init DIRECTORY          initialize empty alternative repository
    276309EOF
    277310);|
    278311    (exit code))
    279312
    280   (define *short-options* '(#\h #\k #\l #\t #\s #\p #\r #\n #\v))
     313  (define *short-options* '(#\h #\k #\l #\t #\s #\p #\r #\n #\v #\i))
    281314
    282315  (define (main args)
     
    337370                        (print (chicken-version))
    338371                        (exit 0))
     372                       ((or (string=? arg "-i") (string=? arg "-init"))
     373                        (unless (pair? (cdr args)) (usage 1))
     374                        (init-repository (cadr args))
     375                        (exit 0))
    339376                       ((string=? "-test" arg)
    340377                        (set! *run-tests* #t)
  • chicken/trunk/chicken.import.scm

    r12130 r12247  
    178178         extension-information
    179179         repository-path
     180         chicken-home
    180181         with-exception-handler
    181182         strip-syntax)
  • chicken/trunk/eval.scm

    r12215 r12247  
    143143;;; System settings
    144144
    145 (define chicken-home
    146   (let ([getenv getenv])
    147     (lambda ()
    148       (or (##sys#chicken-prefix "share/chicken")
    149           installation-home) ) ) )
     145(define (chicken-home)
     146  (or (##sys#chicken-prefix "share/chicken")
     147      installation-home) )
    150148
    151149
     
    14701468      (or (test fname)
    14711469          (let loop ((paths (if repo
    1472                                 (##sys#append ##sys#include-pathnames (list (##sys#repository-path)))
     1470                                (##sys#append
     1471                                 ##sys#include-pathnames
     1472                                 (list (##sys#repository-path)))
    14731473                                ##sys#include-pathnames) ) )
    14741474            (cond ((eq? paths '()) fname)
  • chicken/trunk/manual/Extensions

    r12217 r12247  
    449449; {{-username USER}} : set username for transports that require this
    450450; {{-password PASS}} : set password for transports that require this
     451; {{-i   -init DIRECTORY}} : initialize empty alternative repository
     452
    451453
    452454=== chicken-uninstall references
     
    478480
    479481Security-conscious users should never run {{chicken-install}} as root.
    480 A simple remedy is to set the environment variable {{CHICKEN_REPOSITORY}},
    481 which will transparently place the repository at an arbitrary user-selected
    482 location. Alternatively obtain write/execute access to the default location
    483 of the repository (usually {{/usr/local/lib/chicken}}) to avoid running
    484 as root. {{chicken-install}} also provides a {{-sudo}} option to perform
     482A simple remedy is to set the environment variable
     483{{CHICKEN_REPOSITORY}}, which will transparently place the repository
     484at an arbitrary user-selected location (don't forget to initialize it
     485first with {{chicken-install -init <directory>}}).  Alternatively
     486obtain write/execute access to the default location of the repository
     487(usually {{/usr/local/lib/chicken}}) to avoid running as
     488root. {{chicken-install}} also provides a {{-sudo}} option to perform
    485489the last installation steps as root user, but do building and other
    486490.setup script processing as normal.
     
    499503; {{local}} : use sources from the local filesystem and build directly in the source directory
    500504
    501 The {{-location}} option specifies where to look for the source repository
    502 and names a web URL, a subversion repository URL or a filesystem path,
    503 respectively.
     505The {{-location}} option specifies where to look for the source
     506repository and names a web URL, a subversion repository URL or a
     507filesystem path, respectively. A list of locations to try when
     508retrieving extensions is stored in the file {{setup.defaults}}
     509(usually installed in {{/usr/local/share/chicken}}). For {{http}}
     510transports, {{chicken-install}} will detect networking timeouts and
     511try alternative locations, as listed in the file.
    504512
    505513Dependency information, which is necessary to ensure required
  • chicken/trunk/rules.make

    r12227 r12247  
    10791079
    10801080install-setup-files:
    1081         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)setup.defaults $(DESTDIR)$(IEGGDIR)
     1081        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)setup.defaults $(DESTDIR)$(IDATADIR)
    10821082        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) setup-api.so $(DESTDIR)$(IEGGDIR)
    10831083        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) setup-download.so $(DESTDIR)$(IEGGDIR)
  • chicken/trunk/scripts/xhere

    r12227 r12247  
    11#!/bin/sh
    22prg=$1
     3here="`pwd`"
    34shift
    4 LD_LIBRARY_PATH=$PWD DYLD_LIBRARY_PATH=$PWD PATH=.:$PATH ./$prg "$@"
     5LD_LIBRARY_PATH=$here DYLD_LIBRARY_PATH=$here PATH=.:$PATH exec ./$prg "$@"
Note: See TracChangeset for help on using the changeset viewer.