~ chicken-core (chicken-5) e4f7c82f9306b7420599d447b7ff41bf71ef0877
commit e4f7c82f9306b7420599d447b7ff41bf71ef0877 Author: felix <felix@y.(none)> AuthorDate: Sun Feb 21 17:44:21 2010 +0100 Commit: felix <felix@y.(none)> CommitDate: Sun Feb 21 17:44:21 2010 +0100 started doc; various fixes diff --git a/chicken.h b/chicken.h index 3b1989e0..d3c25076 100644 --- a/chicken.h +++ b/chicken.h @@ -664,11 +664,7 @@ typedef unsigned __int64 uint64_t; # define C_SOFTWARE_VERSION "unknown" #endif -#ifdef C_XXXBSD -# define C_MAX_PATH PATH_MAX -#else -# define C_MAX_PATH MAX_PATH -#endif +#define C_MAX_PATH PATH_MAX /* Types: */ diff --git a/csc.scm b/csc.scm index 9152b950..cba1d4bf 100644 --- a/csc.scm +++ b/csc.scm @@ -55,6 +55,7 @@ (define-foreign-variable CHICKEN_PROGRAM c-string "C_CHICKEN_PROGRAM") (define-foreign-variable CSC_PROGRAM c-string "C_CSC_PROGRAM") (define-foreign-variable WINDOWS_SHELL bool "C_WINDOWS_SHELL") +(define-foreign-variable BINARY_VERSION int "C_BINARY_VERSION") ;;; Parameters: @@ -290,10 +291,10 @@ (define (usage) (let ((csc CSC_PROGRAM)) - (printf #<<EOF -Usage: ~a FILENAME | OPTION ... + (print #<#EOF +Usage: #{csc} FILENAME | OPTION ... - `~a' is a driver program for the CHICKEN compiler. Files given on the + `#{csc}' is a driver program for the CHICKEN compiler. Files given on the command line are translated, compiled or linked as needed. FILENAME is a Scheme source file name with optional extension or a @@ -482,10 +483,10 @@ Usage: ~a FILENAME | OPTION ... -v -k -fixnum-arithmetic -optimize The contents of the environment variable CSC_OPTIONS are implicitly passed to - every invocation of `~a'. + every invocation of `#{csc}'. EOF - csc csc csc) ) ) + ) ) ) ;;; Parse arguments: @@ -874,7 +875,7 @@ EOF (unless (directory-exists? targetdir) (when verbose (print "mkdir " targetdir) - (create-directory targetdir))) + (create-directory targetdir))) ) (command (string-intersperse (cons* (cond (cpp-mode c++-linker) @@ -924,7 +925,7 @@ EOF "libchicken") (cond (osx "dylib") (win "dll") - (else "so"))))) + (else (conc "so." BINARY_VERSION)))))) (copy-files lib targetdir))) (define (copy-files from to) diff --git a/manual/Data representation b/manual/Data representation index 75fd994a..fcbf0772 100644 --- a/manual/Data representation +++ b/manual/Data representation @@ -1,3 +1,4 @@ +[[toc:]] [[tags: manual]] == Data representation @@ -125,6 +126,6 @@ For more information see the header file {{chicken.h}}. --- -Previous: [[Extensions]] +Previous: [[Deployment]] Next: [[Bugs and limitations]] diff --git a/manual/Deployment b/manual/Deployment new file mode 100644 index 00000000..811e0de2 --- /dev/null +++ b/manual/Deployment @@ -0,0 +1,67 @@ +[[tags: manual]] +[[toc:]] + + +== Deployment + +CHICKEN generates fully native binaries that can be distributed like +normal C/C++ programs. There are various methods of deployment, +depending on platform, linkage, external dependencies and wether +the application should be built from sources or precompiled and +whether the CHICKEN runtime-libraries are expected on the destination +system or if the application should be completely self-contained. + +=== Simple executables + +The simplest form of deployment is the single executable. The runtime +libraries ({{libchicken.so}} or {{libchicken.dll}} is required for these +programs to run, unless you link your application statically: + + % csc myprogram.scm + % ldd myprogram # on linux + linux-gate.so.1 => (0xb805c000) + libchicken.so.5 => /home/felix/chicken/core/lib/libchicken.so.5 (0xb7c22000) + libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7bec000) + libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7be7000) + libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7a84000) + /lib/ld-linux.so.2 (0xb805d000) + +... + +=== Libraries + +... + +=== Self contained applications + +... + +==== Platform-specific notes + +... + +===== Linux + +... + +===== Windows + +... + +===== MacOS X + +... + +===== Other UNIX flavors + +... + +=== Deploying source code + +... + + +--- +Previous: [[Extensions]] + +Next: [[Data representation]] diff --git a/manual/Extensions b/manual/Extensions index 367dab58..5b28f650 100644 --- a/manual/Extensions +++ b/manual/Extensions @@ -571,4 +571,4 @@ mailing list. --- Previous: [[Interface to external functions and variables]] -Next: [[Data representation]] +Next: [[Deployment]] diff --git a/manual/The User's Manual b/manual/The User's Manual index a3d2b167..9e382307 100644 --- a/manual/The User's Manual +++ b/manual/The User's Manual @@ -14,7 +14,7 @@ This is the manual for Chicken Scheme, version 4.3.5 ; [[Using the compiler]] : Explains how to use CHICKEN to compile programs and execute them. -; [[Using the interpreter]] : Invocation and usage of {{csi}}, the CHICKEN interpreter +; [[Using the interpreter]] : Invocation and usage of {{csi}}, the CHICKEN interpreter. ; [[Supported language]] : The language implemented by CHICKEN (deviations from the standard and extensions). @@ -22,6 +22,8 @@ This is the manual for Chicken Scheme, version 4.3.5 ; [[Extensions]] : Packaging and installing extension libraries. +; [[Deployment]] : Deploying programs developed with CHICKEN. + ; [[Data representation]] : How Scheme data is internally represented. ; [[Bugs and limitations]] : Things that do not work yet. diff --git a/setup-api.scm b/setup-api.scm index 85e8e03e..59b5de79 100644 --- a/setup-api.scm +++ b/setup-api.scm @@ -578,9 +578,11 @@ (define (repo-path #!optional ddir?) (let ((p (if ddir? - (make-pathname - (installation-prefix) - (sprintf "lib/chicken/~a" (##sys#fudge 42))) + (if (deployment-mode) + (installation-prefix) + (make-pathname + (installation-prefix) + (sprintf "lib/chicken/~a" (##sys#fudge 42)))) (repository-path))) ) (ensure-directory p) p) )Trap