define-relative-directoryModule Manager Facilitydescribe-moduledefine-root-directoryGoTo Top

define-root-directory   name directory-specification &rest subdirectories[Function]

Purpose
Define a root directory.

Package   :module-manager

Module   :module-manager

Arguments and values

name     A keyword symbol naming the root directory or a list containing the keyword-symbol name and, optionally, an application-version-identifier string
directory-specification     One of the following:

subdirectories     One or more strings specifying, in order, subdirectories from directory-specification to the root directory. (The keyword :up or :back can also be supplied in addition to any of these strings, indicating to go upward one semantic or syntactic level of directory structure, respectively.)

Description
Root and relative directory definitions are used to isolate file-system details from module definitions. Root directories specify a fixed anchor directory for a tree of relative directory definitions. If the root directory is redefined to a new location, all relative directories beneath it are updated automatically.

Note: When a root directory is used as the directory-specification for a new root directory, the new root-directory location will not be changed if the location of the source root directory is changed.

When an application-version-identifier string is supplied in name, it is concatenated to the standard <platform-dir> compiled-directory name for all compiled module files that are defined relative to this root-directory.

The documentation string associated with a root directory can be accessed and set by using Common Lisp's documentation generic function with the directory's name and the doc-type directory.

See also
    define-relative-directory
    get-directory
    get-root-directory
    show-defined-directories
    with-system-name

Examples
Define a root directory named :my-app-root:

  (define-root-directory :my-app-root 
    "The installation directory for My App"
    (make-pathname :directory "~/my-app"))
Define a root directory named :my-app-root to be the directory containing the file containing the define-root-directory form:
  (define-root-directory :my-app-root 
    "The installation directory for My App"
    *load-truename*)
Define a root directory named :my-app-root to be the directory containing the file containing the define-root-directory form, but if the :my-app-preprelease feature is present, place the compiled files in a separate “beta” compile tree:
  (define-root-directory '(:my-app-root #+my-app-prerelease "beta")
    "The installation directory for My App"
    *load-truename*)

Retrieve and then modify the documentation string of the root directory named :my-app-root:

  > (documentation ':my-app-root 'directory)
  "The installation directory for My App"
  > (setf (documentation ':my-app-root 'directory) 
     "The installation directory for my way cool application")
  "The installation directory for my way cool application"
  > (documentation ':my-app-root 'directory)
  "The installation directory for my way cool application"
  >


The GBBopen Project


define-relative-directoryModule Manager Facilitydescribe-moduledefine-root-directoryGoTo Top