Changeset 20916 in project


Ignore:
Timestamp:
10/21/10 01:04:29 (8 years ago)
Author:
kon
Message:

setup-helper has more API docu. directory-utils had deprecated routine & minor doc chgs..

Location:
wiki/eggref/4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/directory-utils

    r19761 r20916  
    5757recursive value from {{IDENTITY}}. Returns the final value.
    5858
    59 ''Note'' that only the {{filename}} is passed and not the complete {{pathname}}.
     59''Note'' that only the {{filename}} is passed and not the complete
     60{{pathname}}. The {{"."}} and {{".."}} filenames are not supplied no matter the
     61{{DOTFILES?}} setting.
    6062
    6163{{FUNCTION}} is a {{(procedure (filename *) *)}}.
     
    6466are included in the fold. Default is {{#f}}.
    6567
    66 === create-directory/parents
    67 
    68 <procedure>(create-directory/parents DIRECTORY)</procedure>
    69 
    70 Ensures the directory pathname DIRECTORY exists.
    71 
    72 Like the *NIX `"mkdir -p DIRECTORY" command.
     68On a '''Windows''' platform hidden files have a {{hidden}} attribute so this
     69routine is rather '''*nix''' centric.
    7370
    7471=== create-pathname-directory
     
    7875Ensures the directory component of PATHNAME exist.
    7976
    80 Like the *NIX `"mkdir -p `dirname PATHNAME`" command.
     77Like the '''*nix''' `"mkdir -p `dirname PATHNAME`" command.
    8178
    8279=== make-program-filename
     
    8683Returns the platform specific form of an executable command filename.
    8784
    88 On Windows the exe extension is added unless an extension is already present. Does nothing on other platforms.
     85On '''Windows''' the {{"exe"}} extension is added unless an extension is already
     86present. Does nothing otherwise.
    8987
    9088=== make-shell-filename
     
    9492Returns the platform specific form of a shell command filename.
    9593
    96 On Windows the bat extension is added unless an extension is already present. On *NIX platforms adds .sh.
     94On '''Windows''' the {{"bat"}} extension is added unless an extension is already present.
     95Otherwise conditionally adds the {{"sh"}} extension.
    9796
    9897=== file-exists/directory?
     
    110109<procedure>(find-file-pathnames FILENAME [DIRECTORY | DIRECTORY-LIST] ...)</procedure>
    111110
    112 Returns a list of all pathnames found for FILENAME in the supplied directory/directories, or #f when not found.
     111Returns a list of all pathnames found for FILENAME in the supplied
     112directory/directories, or #f when not found.
    113113
    114114The list of pathnames is in the same relative order as that of the directory parameter(s).
     
    118118<procedure>(find-program-pathnames COMMAND-NAME [DIRECTORY | DIRECTORY-LIST] ...)</procedure>
    119119
    120 Returns a list of all pathnames found for COMMAND-NAME in the supplied directory/directories, or #f when not found.
     120Returns a list of all pathnames found for COMMAND-NAME in the supplied
     121directory/directories, or #f when not found.
    121122
    122123Uses make-program-filename to make a filename.
    123124
    124 On Windows also uses make-shell-filename to make a filename.
     125On '''Windows''' also uses make-shell-filename to make a filename.
    125126
    126127Does not ensure that the file is executable!
     
    130131<procedure>(which-command-pathnames COMMAND-NAME [ENVIRONMENT-VARIABLE])</procedure>
    131132
    132 Returns the pathnames of COMMAND-NAME in the ENVIRONMENT-VARIABLE where the file exists, or #f when nothing found.
     133Returns the pathnames of COMMAND-NAME in the ENVIRONMENT-VARIABLE where the
     134file exists, or #f when nothing found.
    133135
    134136The default ENVIRONMENT-VARIABLE is "PATH".
    135137
    136 Uses the platform specific "PATH" environment variable element separator - a ';' for Windows, & a ':' otherwise.
     138Uses the platform specific "PATH" environment variable element separator - a
     139{{#\;}} for '''Windows''', and a {{#\:}} otherwise.
    137140
    138141=== which-command-pathname
     
    142145Same as which-command-pathnames but returns the first pathname only.
    143146
    144 Like the *NIX "which COMMAND-NAME" command.
     147Like the '''*nix''' `which COMMAND-NAME` command.
    145148
    146149=== remove-dotfiles
     
    185188== Version history
    186189
     190; 1.0.2 : Deprecated {{create-directory/parents}}.
     191; 1.0.1 :
    187192; 1.0.0 : Hello
    188193
  • wiki/eggref/4/setup-helper

    r20265 r20916  
    6767{{PATHNAME}} is as {{(make-pathname DIRECTORY FILE [EXTENSION])}}.
    6868
     69{{INSTALL-REPOSITORY}} is the ''installation'' Chicken repository directory.
     70
     71{{INSTALL-HOME}} is the ''installation'' Chicken home directory.
     72
     73==== CHICKEN-SOURCE-EXTENSION
     74==== CHICKEN-IMPORT-EXTENSION
     75==== CHICKEN-INLINE-EXTENSION
     76==== HTML-EXTENSION
     77==== STATIC-ARCHIVE-EXTENSION
     78==== OBJECT-BINARY-EXTENSION
     79==== EXECUTABLE-EXTENSION
     80
     81Constants suitable for use as the {{EXT}} argument to {{make-pathname}}.
     82
     83==== DIRECTORY-SEPARATOR
     84
     85The platform specific directory separator {{string}}. A constant.
     86
     87==== installation-chicken-home
     88
     89<procedure>(installation-chicken-home) => string</procedure>
     90
     91Returns the {{INSTALL-HOME}}.
     92
     93==== installation-repository-home
     94
     95<procedure>(installation-repository-path) => string</procedure>
     96
     97Returns the {{INSTALL-REPOSITORY}}.
     98
     99==== directory-separator?
     100
     101<procedure>(directory-separator? X) => boolean</procedure>
     102
     103Is {{X}} a directory separator?
     104
     105{{X}} is a {{string}}, {{character}}, or {{symbol}}.
     106
    69107==== filename
    70108
    71109<procedure>(filename FILE [EXTENSION]) => string</procedure>
    72110
    73 Returns an filename for {{FILE}} and {{EXTENSION}}.
     111Returns a filename for {{FILE}} and {{EXTENSION}}.
     112
     113==== make-directory-name
     114
     115<procedure>(make-directory-name DIRECTORY) => string</procedure>
     116
     117Returns a dirname, ensuring no trailing directory separator.
     118
     119{{DIRECTORY}} is a {{string}}, {{symbol}}, or a {{list}}.
    74120
    75121==== document-filename
     
    142188Returns a platform-specific executable filename for {{FILE}}.
    143189
     190==== make-home-pathname
     191
     192<procedure>(make-home-pathname FILE) => string</procedure>
     193
     194Returns a pathname for {{FILE}} in the {{INSTALL-HOME}}.
     195
    144196==== make-repository-pathname
    145197
    146198<procedure>(make-repository-pathname FILE) => string</procedure>
    147199
    148 Returns a pathname for {{FILE}} in the ''{{(chicken-repository)}}''.
     200Returns a pathname for {{FILE}} in the {{INSTALL-REPOSITORY}}.
     201
     202==== srfi-29-bundles-home
     203
     204<procedure>(srfi-29-bundles-home) => string</procedure>
     205
     206Returns the root dirname for SRFI 29 bundles.
     207
     208Please see the [[srfi-29]] extension documentation.
     209
     210==== make-srfi-29-bundle-directory-name
     211
     212<procedure>(make-srfi-29-bundle-directory-name SPEC) => string</procedure>
     213
     214Returns the SRFI 29 bundle installation dirname for the supplied {{SPEC}}.
     215
     216{{SPEC}} is a {{list BUNDLE-SPECIFICATION-COMPONENT...}}.
     217
     218Please see the [[srfi-29]] extension documentation.
    149219
    150220
     
    154224use the {{copy-file}} setup-api routine.
    155225
    156 ==== copy-file-to-directory
    157 
    158 <procedure>(copy-file-to-directory FILENAME DIRECTORY)</procedure>
    159 
    160 Copies the local file {{FILENAME}} to the {{DIRECTORY}.
     226==== copy-file-relative
     227
     228<procedure>(copy-file-relative FILENAME DIRECTORY)</procedure>
     229
     230Copies the file {{FILENAME}} to the {{DIRECTORY}}. The {{DIRECTORY}} be
     231relative.
     232
     233==== copy-file-absolute
     234
     235<procedure>(copy-file-absolute FILENAME DIRECTORY)</procedure>
     236
     237Copies the file {{FILENAME}} to the {{DIRECTORY}}. Should the {{DIRECTORY}} be
     238relative it will be coerced to absolute (by {{copy-file}}).
    161239
    162240==== copy-to-repository
     
    170248<procedure>(copy-to-home FILENAME)</procedure>
    171249
    172 Copies the local file {{FILENAME}} to the directory ''{{(installation-prefix)}}
    173 share chicken''. This is usually the same as {{(chicken-home)}}.
    174 
    175 ==== install-in-repository
    176 
    177 <procedure>(install-in-repository FILENAME)</procedure>
    178 
    179 Like {{copy-to-repository}} but observes the ''no-install'' status.
    180 
    181 ==== install-in-home
    182 
    183 <procedure>(install-in-home FILENAME)</procedure>
    184 
    185 Like {{copy-to-home}} but observes the ''no-install'' status.
    186 
    187 
    188 === SRFI-29 Bundle Support
    189 
    190 Installation of SRFI-29 Bundles.
    191 
    192 See [[srfi-29]].
    193 
    194 ==== install-srfi-29-bundle
    195 
    196 <procedure>(install-srfi-29-bundle NAME [BUNDLE-SPECIFICATION-COMPONENT ...])</procedure>
    197 
    198 Copies the local {{srfi-29-bundle}} file to the
    199 ''srfi-29-bundle-directory''.
     250Copies the local file {{FILENAME}} to the directory ''{{(installation-prefix)
     251share chicken}}''. This is usually the same as {{(chicken-home)}}.
    200252
    201253
     
    248300the building egg directory) that are to expanded in the {{install-extension}}
    249301command files list.
     302
     303==== install-in-repository
     304
     305<procedure>(install-in-repository FILENAME)</procedure>
     306
     307Like {{copy-to-repository}} but observes the ''no-install'' status.
     308
     309==== install-in-home
     310
     311<procedure>(install-in-home FILENAME)</procedure>
     312
     313Like {{copy-to-home}} but observes the ''no-install'' status.
     314
     315==== install-srfi-29-bundle
     316
     317<procedure>(install-srfi-29-bundle NAME [BUNDLE-SPECIFICATION-COMPONENT...])</procedure>
     318
     319Copies the local SRFI 29 bundle to the {{(srfi-29-bundle-directory)}}.
     320
     321The bundle is a single file with {{NAME}} that may be at the bottom of a
     322{{BUNDLE-SPECIFICATION-COMPONENT}} hierarchy.
    250323
    251324==== install-static-extension
     
    388461== Bugs and Limitations
    389462
    390 * Static extension support is untested
    391 
    392 * Global inline support is untested
     463* Static extension support is untested.
     464
     465* Global inline support is untested.
     466
     467* This extension is not compiled.
    393468
    394469
     
    400475== Version history
    401476
     477; 1.3.0 : Deprecated {{copy-file-to-directory}}. Documented more of the exposed API.
    402478; 1.2.0 : Addd {{install-in-home}} & {{install-in-repository}}. {{install-srfi-29-bundle}} observes ''no-install'' status.
    403479; 1.1.4 : Fix for 'copy-to-home' when '(installation-prefix)' is #f. [Ivan Raikov]
Note: See TracChangeset for help on using the changeset viewer.