Changeset 11842 in project


Ignore:
Timestamp:
09/01/08 09:11:02 (12 years ago)
Author:
felix winkelmann
Message:

letrec is a core form now [to fix problem reported by Jim]

Location:
chicken/branches/hygienic
Files:
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/TODO

    r11776 r11842  
    1313** compiler
    1414*** pre-optimization
    15 *** changes call-sites and makes them invalid for later pre-optimization
     15**** changes call-sites and makes them invalid for later pre-optimization
    1616
    1717** macros
     
    4949** import-for-syntax imports value bindings into import-env
    5050   should actually be a distinct meta-import-env.
    51 *** does it work at all?
     51   (does it work at all?)
    5252** curried define performs expansion in empty se - problem?
    5353   (as comment in expand.scm indicated (##sys#register-export))
     
    6161*** should cache extension-info
    6262*** handle connection failure by allowing alternative sites
    63 *** with "-r", delete output dir on failure
    6463** write manual chapters
    65 *** remove "manual/chicken-setup", fix links
    66 *** add "manual/extensions"
    67 *** document new .meta entries
    68     depends, test-depends
    6964** remove all remnants of chicken-setup
    7065
    7166* documentation
    7267** document ("HI/LO") expander (-> wiki, internals)
     68** Complete "Extensions" chapter
     69*** using other transports
     70** document new .meta entries
     71   depends, test-depends
    7372
    7473* build
     
    8584* compiler
    8685** warn if encountering global ref or assignment to "unquote[-splicing]"
    87 
    88 * eggs to be removed
    89 ** syntax-case
    90 *** sxml-match, others ...
    91 ** codewalk
    92 *** modules, crunch
    93 ** syntactic-closures
    94 ** simple-macros
    95 ** alexpander
  • chicken/branches/hygienic/batch-driver.scm

    r11766 r11842  
    580580                              (print-db "final-analysis" '|8| db i)
    581581                              (when (and ##sys#warnings-enabled (> (- (cputime) start-time) funny-message-timeout))
    582                                 (display "(do not worry - still compiling...)\n") )
     582                                (display "(don't worry - still compiling...)\n") )
    583583                              (when a-only (exit 0))
    584584                              (print-node "closure-converted" '|9| node3)
  • chicken/branches/hygienic/compiler.scm

    r11766 r11842  
    8181; (quote <exp>)
    8282; (if <exp> <exp> [<exp>])
     83; ([##core#]let <variable> ({(<variable> <exp>)}) <body>)
    8384; ([##core#]let ({(<variable> <exp>)}) <body>)
     85; ([##core#]letrec ({(<variable> <exp>)}) <body>)
    8486; (##core#let-location <symbol> <type> [<init>] <exp>)
    8587; ([##core#]lambda <variable> <body>)
     
    630632                             ,(walk (##sys#canonicalize-body (cddr x) se2)
    631633                                    se2 dest) ) ) )
     634
     635                         ((letrec ##core#letrec)
     636                          (##sys#check-syntax 'letrec x '(_ #((symbol _) 0) . #(_ 1)))
     637                          (let ((bindings (cadr x))
     638                                (body (cddr x)) )
     639                            (walk
     640                             `(##core#let
     641                               ,(##sys#map (lambda (b)
     642                                             (list (car b) '(##core#undefined)))
     643                                           bindings)
     644                               ,@(##sys#map (lambda (b)
     645                                              `(##core#set! ,(car b) ,(cadr b)))
     646                                            bindings)
     647                               (##core#let () ,@body) )
     648                             se dest)))
    632649
    633650                        ((lambda ##core#lambda)
  • chicken/branches/hygienic/eval.scm

    r11766 r11842  
    474474                                       (##sys#setslot v2 i (##core#app (##sys#slot vlist 0) v)) )
    475475                                     (##core#app body (cons v2 v)) ) ) ) ] ) ) ]
     476
     477                         ((letrec ##core#letrec)
     478                          (##sys#check-syntax 'letrec x '(_ #((symbol _) 0) . #(_ 1)))
     479                          (let ((bindings (cadr x))
     480                                (body (cddr x)) )
     481                            (compile
     482                             `(##core#let
     483                               ,(##sys#map (lambda (b)
     484                                             (list (car b) '(##core#undefined)))
     485                                           bindings)
     486                               ,@(##sys#map (lambda (b)
     487                                              `(##core#set! ,(car b) ,(cadr b)))
     488                                            bindings)
     489                               (##core#let () ,@body) )
     490                             e h tf cntr se)))
    476491
    477492                         [(lambda ##core#lambda)
  • chicken/branches/hygienic/expand.scm

    r11741 r11842  
    224224                                (values
    225225                                 `(##core#app
    226                                    (,(macro-alias 'letrec dse) ;*** correct to use dse?
     226                                   (##core#letrec
    227227                                    ([,bindings (##core#loop-lambda ,(map (lambda (b) (car b)) bs) ,@(cddr body))])
    228228                                    ,bindings)
     
    281281;;; User-level macroexpansion
    282282
    283 (define (##sys#expand exp #!optional (me (##sys#current-environment)))
     283(define (##sys#expand exp #!optional (se (##sys#current-environment)))
    284284  (let loop ((exp exp))
    285     (let-values (((exp2 m) (##sys#expand-0 exp me)))
     285    (let-values (((exp2 m) (##sys#expand-0 exp se)))
    286286      (if m
    287287          (loop exp2)
     
    10131013
    10141014(##sys#extend-macro-environment
    1015  'letrec
    1016  '()
    1017  (##sys#er-transformer
    1018   (lambda (form r c)
    1019     (##sys#check-syntax 'letrec form '(_ #((symbol _) 0) . #(_ 1)))
    1020     (let ((bindings (cadr form))
    1021           (body (cddr form))
    1022           (%let (r 'let)) )
    1023       `(,%let ,(##sys#map (lambda (b) (list (car b) '(##core#undefined))) bindings)
    1024               ,@(##sys#map (lambda (b) `(##core#set! ,(car b) ,(cadr b))) bindings)
    1025               (,%let () ,@body) ) ) ) ) )
    1026 
    1027 (##sys#extend-macro-environment
    10281015 'do
    10291016 '()
  • chicken/branches/hygienic/manual/Data representation

    r6691 r11842  
    113113For more information see the header file {{chicken.h}}.
    114114
    115 Previous: [[chicken-setup]]
     115Previous: [[Extensions]]
    116116
    117117Next: [[Bugs and limitations]]
  • chicken/branches/hygienic/manual/Extensions

    r11840 r11842  
    22[[toc:]]
    33
    4 == chicken-setup
     4== Extensions
    55
    66=== Extension libraries
     
    1818are usually libraries.
    1919
    20 {{chicken-setup}} will download the source code for extension
    21 automatically from the canonical server at
    22 [[http://www.call-with-current-continuation.org/eggs]] if the
    23 requested egg does not exist in the current directory. Various
    24 command-line options exist for customizing the process and/or
    25 retrieving the egg from other locations or in other formats.
     20Extensions are technically nothing but dynamically loadable compiled
     21files with added meta-data that describes dependencies to other
     22extensions, version information and things like the author/maintainer
     23of the extension. Three tools provide an easy to use interface for
     24installing extensions, removing them and querying the current
     25status of installed extensions.
    2626
    2727
    2828=== Installing extensions
    2929
    30 To install an extension library, run the {{chicken-setup}} program
     30To install an extension library, run the {{chicken-install}} program
    3131with the extension name as argument. The extension archive is
    3232downloaded, its contents extracted and the contained ''setup'' script
    3333is executed. This setup script is a normal Scheme source file, which
    34 will be interpreted by {{chicken-setup}}. The complete language
     34will be interpreted by {{chicken-install}}. The complete language
    3535supported by {{csi}} is available, and the library units {{srfi-1
    3636regex utils posix tcp}} are loaded. Additional libraries can be loaded
     
    4141be installed by invoking one of the procedures {{install-extension}},
    4242{{install-program}} or {{install-script}}.  These procedures will copy
    43 a number of given files into the extension repository or in the path
    44 where the CHICKEN executables are located (in the case of executable
    45 programs or scripts). Additionally the list of installed files, and
    46 user-defined metadata is stored in the repository.
    47 
    48 If no extension name is given on the command-line, and if none of the
    49 options {{-list}}, {{-version}}, {{-repository}} (without argument),
    50 {{-program-path}} (without argument), {{-fetch}}, {{-fetch-tree}} or
    51 {{-docindex}} is given, then all {{.setup}} scripts in the current
    52 directory are processed.
     43a number of given files into the local extension repository or in the
     44path where the CHICKEN executables are located (in the case of
     45executable programs or scripts). Additionally the list of installed
     46files, and user-defined metadata is stored in the repository.
     47
     48If no extension name is given on the command-line, then all {{.setup}}
     49scripts in the current directory are processed, in the order given
     50on the command line.
    5351
    5452==== Installing extensions that use libraries
    5553
    56 Sometimes an extension requires a C library to compile. Compilation can fail when your system has this library in a nonstandard location. Luckily, normally Chicken searches in the default locations {{/usr}} and {{/usr/local}}, and in the prefix where Chicken itself was installed. Sometimes this is not enough, so you'll need to supply chicken-setup with some extra hints to the C compiler/linker. Here's an example:
    57 
    58   chicken-setup -c '-I/usr/pkg/include/mysql' -c '-L/usr/pkg/lib/mysql' -c '-L -R/usr/pkg/lib/mysql' mysql
    59 
    60 This installs the mysql egg with the extra compiler options -I and -L to set the include path and the library search path. The second -L switch passes the -R option directly to the linker, which causes the library path to get hardcoded into the resulting extension file (for systems that do not use ld.so.conf).
     54Sometimes an extension requires a C library to compile. Compilation
     55can fail when your system has this library in a nonstandard
     56location. Luckily, normally Chicken searches in the default locations
     57{{/usr}} and {{/usr/local}}, and in the prefix where Chicken itself
     58was installed. Sometimes this is not enough, so you'll need to supply
     59{{chicken-install}} with some extra hints to the C compiler/linker. Here's
     60an example:
     61
     62  CSC_OPTIONS='-I/usr/pkg/include/mysql -L/usr/pkg/lib/mysql -L -R/usr/pkg/lib/mysql' chicken-install mysql
     63
     64This installs the mysql egg with the extra compiler options -I and -L
     65to set the include path and the library search path. The second -L
     66switch passes the -R option directly to the linker, which causes the
     67library path to get hardcoded into the resulting extension file (for
     68systems that do not use {{ld.so.conf}}).
    6169
    6270=== Creating extensions
     
    111119Specifies version string.
    112120
    113 ===== documentation
    114 
    115  [extension property] (documentation FILENAME)
    116 
    117 The filename of a HTML document containing extension-specific documentation.
    118 This file should be given in the file-list passed to {{install-extension}} and
    119 a link to it will be automatically included in the index page (accessible via
    120 {{chicken-setup -docindex}}).
    121 
    122 ===== examples
    123 
    124  [extension property] (examples FILENAME ...)
    125 
    126 Copies the given files into the examples directory, which is usually
    127 {{$prefix/share/chicken/examples}}
    128 or {{(make-pathname (chicken-home) "examples")}}).
    129 
    130 Note that the files listed in this property should not be listed in the normal
    131 list of files to install passed to {{install-extension}}. This is the only
    132 exception - other files that are installed in the repository must be given
    133 in the file list.
    134 
    135 ===== exports
    136 
    137  [extension property] (exports EXPORT ...)
    138 
    139 Add export-information to the generated extension-information. {{EXPORT}} may be
    140 a symbol naming an exported toplevel variable or a string designating a file with
    141 exported variables, as generated by the {{-emit-exports}} option or the
    142 {{emit-exports}} declaration specifier.
    143 
    144121===== static
    145122
     
    182159Runs the shell command {{FORM}}, which is wrapped in an implicit {{quasiquote}}.
    183160{{(run (csc ...))}} is treated specially and passes {{-v}} (if {{-verbose}} has been given
    184 to {{chicken-setup}}) and {{-feature compiling-extension}} options to the compiler.
     161to {{chicken-install}}) and {{-feature compiling-extension}} options to the compiler.
    185162
    186163==== compile
     
    292269Contains the path of the directory where {{chicken-setup}} was invoked.
    293270
    294 ==== setup-build-directory
    295 
    296  [parameter] (setup-build-directory [PATH])
    297 
    298 Contains the path of the directory where the extension is built. This is not necessarily identical
    299 to {{setup-root-directory}}.
    300 
    301 
    302 ==== setup-verbose-flag
    303 
    304  [parameter] (setup-verbose-flag [BOOL])
    305 
    306 Reflects the setting of the {{-verbose}} option, i.e. is {{#t}}, if {{-verbose}} was
    307 given.
    308 
    309271
    310272==== setup-install-flag
     
    312274 [parameter] (setup-install-flag [BOOL])
    313275
    314 Reflects the setting of the {{--no-install}} option, i.e. is {{#f}}, if {{-no-install}} was
    315 given.
     276Reflects the setting of the {{-no-install}} option, i.e. is {{#f}}, if {{-no-install}} was
     277given to {{chicken-install}}.
    316278
    317279==== required-chicken-version
     
    377339</enscript>
    378340
     341Lastly, we need a file {{hello.meta}} defining a minimal set of properties:
     342
     343<enscript highlight=scheme>
     344;;;; hello.meta
     345
     346((author "Me")
     347 (synopsis "A cool hello-world library")
     348 (license "GPLv3")
     349 (files "hello.scm" "hello.setup"))
     350</enscript>
     351
    379352After entering
    380353
    381  $ chicken-setup hello
     354 $ chicken-install
    382355
    383356at the shell prompt (and in the same directory where the two files
     
    385358loadable library. If the compilation succeeds, {{hello.so}} will
    386359be stored in the repository, together with a file named
    387 {{hello.setup-info}} containing an a-list with metadata.
    388 If no extension name is given to {{chicken-setup}}, it will simply
    389 execute the first file with the {{.setup}} extension it can find.
     360{{hello.setup-info}} containing an a-list with metadata (what
     361you stored above in {{hello.meta}}).
     362If no extension name is given to {{chicken-install}}, it will simply
     363execute the any files with the {{.setup}} extension it can find.
    390364
    391365Use it like any other CHICKEN extension:
     
    393367 $ csi -q
    394368 #;1> (require-extension hello)
    395  ; loading /usr/local/lib/chicken/1/hello.so ...
     369 ; loading /usr/local/lib/chicken/4/hello.so ...
    396370 #;2> (hello "me")
    397371 Hello, me!
     
    417391</enscript>
    418392
    419 To use it, just run {{chicken-setup}} in the same directory:
    420 
    421  $ chicken-setup
     393<enscript highlight=scheme>
     394;;;; hello2.meta
     395
     396((author "Me")
     397 (synopsis "A cool hello-world application")
     398 (license "proprietary")
     399 (files "hello.scm" "hello.setup"))
     400</enscript>
     401
     402To use it, just run {{chicken-install}} in the same directory:
     403
     404 $ chicken-install
    422405
    423406(Here we omit the extension name)
     
    426409the other CHICKEN tools (like {{chicken}}, {{csi}}, etc.), which will
    427410normally be {{/usr/local/bin}}.  Note that you need write-permissions
    428 for those locations and may have to run {{chicken-setup}} with
    429 administrative rights.
    430 
    431 Uninstallation is just as easy:
    432 
    433  $ chicken-setup -uninstall hello2
    434 
    435 {{chicken-setup}} provides a {{make}} macro, so build operations can
    436 be of arbitrary complexity. When running {{chicken-setup}} with an
    437 argument {{NAME}}, for which no associated file {{NAME.setup}},
    438 {{NAME.egg}} or {{NAME.scm}} exists will ask you to download the
    439 extension via HTTP from the default URL
    440 [[http://www.call-with-current-continuation.org/eggs]]. You can use
    441 the {{-host}} option to specify an alternative source
    442 location. Extensions that are required to compile and/or use the
    443 requested extension are downloaded and installed automatically.
    444 
    445 If the given extension name contains a path prefix and the {{-host}}
    446 option is given, then {{chicken-setup}} can also download and install
    447 eggs from an arbitrary HTTP server. Alternatively you can pass a full
    448 URL (including the {{http://}} prefix. Note that no dependency checks
    449 are done when downloading eggs directly with the URL syntax.
    450 
    451 Finally a somewhat more complex example: We want to package a syntax
    452 extension with additional support code that is to be loaded at
    453 run-time of any Scheme code that uses that extension. We create a
    454 ''glass'' lambda, a procedure with free variables that can be
    455 manipulated from outside:
    456 
    457 <enscript highlight=scheme>
    458 ;;;; glass.scm
    459 
    460 (define-macro (glass-lambda llist vars . body)
    461   ;; Low-level macros are fun!
    462   (let ([lvar (gensym)]
    463         [svar (gensym)]
    464         [x (gensym)]
    465         [y (gensym)]
    466         [yn (gensym)] )
    467     `(let ,(map (lambda (v) (list v #f)) vars)
    468        (define (,svar ,x . ,y)
    469          (let* ([,yn (pair? ,y)]
    470                 [,y (and ,yn (car ,y))] )
    471            (case ,x
    472              ,@(map (lambda (v)
    473                       `([,v] (if ,yn
    474                                  (set! ,v ,y)
    475                                  ,v) ) )
    476                     vars)
    477              (else (error "variable not found" ,x)) ) ) )
    478        (define ,lvar (lambda ,llist ,@body))
    479        (extend-procedure ,lvar ,svar) ) ) )
    480 </enscript>
    481 
    482 Here some support code that needs to be loaded at runtime:
    483 
    484 <enscript highlight=scheme>
    485 ;;;; glass-support.scm
    486 
    487 (require-extension lolevel)
    488 
    489 (define glass-lambda-accessor procedure-data)
    490 (define (glass-lambda-ref gl v) ((procedure-data gl) v))
    491 (define (glass-lambda-set! gl v x) ((procedure-data gl) v x))
    492 </enscript>
    493 
    494 The setup script looks like this:
    495 
    496 <enscript highlight=scheme>
    497 (compile -s glass-support.scm)
    498 
    499 (install-extension
    500   'glass
    501   '("glass.scm" "glass-support.so")
    502   '((syntax) (require-at-runtime glass-support)) )
    503 </enscript>
    504 
    505 The invocation of {{install-extension}} provides the files that are to
    506 be copied into the extension repository, and a metadata list that
    507 specifies that the extension {{glass}} is a syntax extension and that,
    508 if it is declared to be used by other code (with the
    509 {{require-extension}} form), then client
    510 code should perform an implicit {{(require 'glass-support)}} at
    511 startup.
    512 
    513 This can be conveniently packaged as an ''egg'':
    514 
    515  $ tar cfz glass.egg glass.setup glass.scm glass-support.scm
    516 
    517 And now we use it:
    518 
    519  $ chicken-setup glass
    520  $ csi -quiet
    521  #;1> (require-extension glass)
    522  ; loading /usr/local/lib/chicken/1/glass.scm ...
    523  ; loading /usr/local/lib/chicken/1/glass-support.so ...
    524  #;2> (define foo (glass-lambda (x) (y) (+ x y)))
    525  #;3> (glass-lambda-set! foo 'y 99)
    526  #;4> (foo 33)
    527  132
    528 === chicken-setup reference
     411for those locations and may have to run {{chicken-install}} with
     412administrative rights or use the {{-sudo}} option.
     413
     414De-installation is just as easy - use the {{chicken-uninstall}}
     415program to remove one or more extensions from the local repository:
     416
     417 $ chicken-uninstall hello2
     418
     419When running {{chicken-install}} with an argument {{NAME}}, for which
     420no associated {{.setup}} file exists, then it will try to download the
     421extension via HTTP from the CHICKEN code repository at
     422[[http://chicken.wiki.br/svn/chicken-eggs/]]. Extensions that are
     423required to compile and/or use the requested extension are downloaded
     424and installed automatically.
     425
     426To query the list of currently installed extensions, use
     427{{chicken-status}}. It can list what extensions are installed and
     428what files belong to a particular installed extension.
     429
     430
     431=== chicken-install reference
    529432
    530433Available options:
    531434
    532 ; {{-h  -help}} : Show usage information and exit.
    533 ; {{-V  -version}} : Display version and exit.
    534 ; {{-R  -repository [PATHNAME]}} : When used without an argument, the path of the extension repository is displayed on standard output. When given an argument, the repository pathname (and the {{repository-path}} parameter) will be set to {{PATHNAME}} for all subsequent operations. The default repository path is the installation library directory (usually {{/usr/local/lib/chicken}}), or (if set) the directory given in the environment variable {{CHICKEN_REPOSITORY}}. {{PATHNAME}} should be an absolute pathname.
    535 ; {{-P  -program-path [PATHNAME]}} : When used without an argument, the path for executables is displayed on standard output. When given an argument, the program path for installing executables and scripts will be set to {{PATHNAME}} for all subsequent operations. {{PATHNAME}} should be an absolute pathname.
    536 ; {{-h  -host HOSTNAME[:PORT]}} : Specifies alternative host for downloading extensions, optionally with a TCP port number (which defaults to 80).
    537 ; {{-u  -uninstall EXTENSION}} : Removes all files that were installed for {{EXTENSION}} from the file-system, together with any metadata that has been stored.
    538 ; {{-l  -list [NAME ...]}} : List all installed extensions or show extension information.
    539 ; {{-r  -run FILENAME}} : Load and execute given file.
    540 ; {{-s  -script FILENAME}} :Executes the given Scheme source file with all remaining arguments and exit. The ''she-bang'' shell script header is recognized, so you can write Scheme scripts that use {{chicken-setup}} just as with {{csi}}.
    541 ; {{-e  -eval EXPRESSION}} : Evaluates the given expression(s)
    542 ; {{-v  -verbose}} : Display additional debug information
    543 ; {{-k  -keep}} : Keep temporary files and directories
    544 ; {{-c  -csc-option OPTION}} : Passes {{OPTION}} as an extra argument to invocations of the compiler-driver ({{csc}}); this works only if {{csc}} is invoked as {{(run (csc ...))}}
    545 ; {{-d  -dont-ask}} : Do not ask the user before trying to download required extensions
    546 ; {{-n  -no-install}} : Do not install generated binaries and/or support files; any invocations of {{install-program}}, {{install-extension}} or {{install-script}} will be be no-ops
    547 ; {{-i  -docindex}} : Displays the path to the index-page of any installed extension-documentation; if the index page does not exist, it is created
    548 ; {{-t  -test EXTENSION ...}} : return success if all given extensions are installed
    549 ; {{-ls EXTENSION}} : List installed files for extension
    550 ; {{-fetch-tree}} : Download and print the repository catalog
    551 ; {{-create-tree DIRECTORY}} : Create a fresh, minimal repository catalog and writes it to stdout
    552 ; {{-t  -test}} : If the extension sources contain a directory named {{tests}} and this directory includes a file named {{run.scm}} then this file is executed (with {{tests}} being the current working directory)
    553 ; {{-tree FILENAME}} : Download and show the repository catalog
    554 ; {{-svn URL}} : Fetch extension from [[http://subversion.tigris.org|Subversion]] repository
    555 ; {{-revision REV}} : Specifies SVN revision to check out
    556 ; {{-local PATHNAME}} : Fetch extension from local file
    557 ; {{-install-prefix PATHNAME}} : Specify alternative installation prefix (for packaging)
    558 ; {{-host-extension}} : Compile extension in "host" mode (sets the parameter {{host-extension}} to {{#f}})
    559 ; {{-build-prefix PATHNAME}} : Location where chicken-setup will create egg build directories  (default: the value of environment variable CHICKEN_TMPDIR, or {{/tmp/chicken-{MAJOR-VERSION-build-{USER}}}})
    560 ; {{-download-path PATHNAME}} : Location where chicken-setup will save downloaded files  (default: {{build-prefix/downloads}})
    561 ; {{--}} : Ignore all following arguments
    562 
    563 Note that the options are processed exactly in the order in which they appear in the command-line.
    564 
    565 
    566 === Windows notes
    567 
    568 {{chicken-setup}} works on Windows, when compiled with Visual C++, but
    569 depends on the {{tar}} and {{gunzip}} tools to extract the contents of
    570 an egg. The best way is to download an egg either manually (or with
    571 {{chicken-setup -fetch}}) and extract its contents with a separate
    572 program (like {{winzip}}). the {{CHICKEN_REPOSITORY}} environment
    573 variable has to be set to a
    574 directory where your compiled extensions should be located.
    575 
    576 The {{.setup}} scripts will not always work under Windows, and the
    577 extensions may require libraries that are not provided for Windows or
    578 work differently. Under these circumstances it is recommended to
    579 perform the required steps to build an extension manually.
    580 
    581 The required UNIX tools are also available as Windows binaries.
    582 Google or ask on the CHICKEN mailing list if you need help locating
    583 them.
     435; {{-h   -help}} : show this message and exit
     436; {{-v   -version}} : show version and exit
     437; {{-force}} : don't ask, install even if versions don't match
     438; {{-k   -keep}} : keep temporary files
     439; {{-l   -location LOCATION}} : install from given location instead of default
     440; {{-t   -transport TRANSPORT}} : use given transport instead of default
     441; {{-s   -sudo}} : use {{sudo(1)}} for installing or removing files
     442; {{-r   -retrieve}} : only retrieve egg into current directory, don't install
     443; {{-n   -no-install}} : do not install, just build (implies {{-keep}})
     444; {{-p   -prefix PREFIX}} : change installation prefix to {{PREFIX}}
     445; {{-host-extension}} : when cross-compiling, compile extension for host
     446; {{-test}} : run included test-cases, if available
     447; {{-username USER}} : set username for transports that require this
     448; {{-password PASS}} : set password for transports that require this
     449
     450=== chicken-uninstall references
     451
     452; {{-h   -help}} : show usage information and exit
     453; {{-v   -version}} : show version and exit
     454; {{-force}} : don't ask, delete whatever matches
     455; {{-s   -sudo}} : use {{sudo(1)}} for deleting files
     456
     457
     458=== chicken-status references
     459
     460; {{-h   -help}} : show usage information and exit
     461; {{-v   -version}} : show version and exit
     462; {{-f   -files}} : list installed files
    584463
    585464
     
    587466
    588467When extensions are downloaded and installed one is executing code
    589 from potentially compromised systems. This applies also when {{chicken-setup}}
    590 executes system tests for required extensions. As the code has been
    591 retrieved over the network effectively untrusted code is going to be
    592 evaluated. When {{chicken-setup}} is run as ''root'' the whole system
    593 is at the mercy of the build instructions (note that this is also
    594 the case every time you install software via {{sudo make install}}, so this
    595 is not specific to the CHICKEN extension mechanism).
    596 
    597 Security-conscious users should never run {{chicken-setup}} as root.
     468from potentially compromised systems. This applies also when
     469{{chicken-install}} executes system tests for required extensions. As
     470the code has been retrieved over the network effectively untrusted
     471code is going to be evaluated. When {{chicken-install}} is run as
     472''root'' the whole system is at the mercy of the build instructions
     473(note that this is also the case every time you install software via
     474{{sudo make install}}, so this is not specific to the CHICKEN
     475extension mechanism).
     476
     477Security-conscious users should never run {{chicken-install}} as root.
    598478A simple remedy is to set the environment variable {{CHICKEN_REPOSITORY}},
    599479which will transparently place the repository at an arbitrary user-selected
    600480location. Alternatively obtain write/execute access to the default location
    601481of the repository (usually {{/usr/local/lib/chicken}}) to avoid running
    602 as root.
     482as root. {{chicken-install}} also provides a {{-sudo}} option to perform
     483the last installation steps as root user, but do building and other
     484.setup script processing as normal.
    603485
    604486
    605487=== Other modes of installation
     488
     489********************************************************************************Ü
    606490
    607491It is possible to install extensions directly from a
     
    638522 % chicken-setup -local /opt/eggs -tree ~/my-repository-file opengl
    639523
     524********************************************************************************
    640525
    641526=== Linking extensions statically
    642527
    643 The compiler and [[chicken-setup]] support statically linked
     528The compiler and {{chicken-install}} support statically linked
    644529eggs. The general approach is to generate an object file or static
    645530library (in addition to the usual
     
    659544
    660545Note the use of the {{-unit}} option in the second compilation step: static
    661 linking must use static library units. {{chicken-setup}} will perform
     546linking must use static library units. {{chicken-install}} will perform
    662547platform-dependent file-extension translation for the file list, but does currently
    663548not do that for the {{static}} extension property.
  • chicken/branches/hygienic/manual/Interface to external functions and variables

    r5945 r11842  
    1313Previous: [[Supported language]]
    1414
    15 Next: [[chicken-setup]]
     15Next: [[Extensions]]
  • chicken/branches/hygienic/manual/The User's Manual

    r10531 r11842  
    1717; [[Interface to external functions and variables]] : Accessing C and C++ code and data.
    1818
    19 ; [[chicken-setup]] : Packaging and installing extension libraries.
     19; [[Extensions]] : Packaging and installing extension libraries.
    2020
    2121; [[Data representation]] : How Scheme data is internally represented.
Note: See TracChangeset for help on using the changeset viewer.