table of contents
other versions
- jessie 2.33-1
COOK(1) | General Commands Manual | COOK(1) |
NAME¶
cook - a file construction toolSYNOPSIS¶
cook [ option... ][ filename... ]DESCRIPTION¶
The cook program is a tool for constructing files. It is given a set of files to create, and instructions detailing how to construct them. In any non-trivial program there will be prerequisites to performing the actions necessary to creating any file, such as extraction from a source-control system. The cook program provides a mechanism to define these. When a program is being developed or maintained, the programmer will typically change one file of several which comprise the program. The cook program examines the last-modified times of the files to see when the prerequisites of a file have changed, implying that the file needs to be recreated as it is logically out of date. The cook program also provides a facility for implicit recipes, allowing users to specify how to form a file with a given suffix from a file with a different suffix. For example, to create filename.o from filename.c Options and filenames may be arbitrarily mixed on the command line; no processing is done until all options and filenames on the command line have been scanned. The cook program will attempt to create the named files from the recipes given to it. The recipes are contained in a file called Howto.cook in the current directory. This file may, in turn, include other files containing additional recipes. If no filenames are given on the command line the targets of the first recipe defined are cooked.OPTIONS¶
The valid options for cook are listed below. Any other options (words on the command line beginning with ` -') will cause a diagnostic message to be issued.- -Action
-
- -No_Action
-
- -Book filename
-
- -CAScade
-
- -No_CAScade
-
- -Continue
-
- -No_Continue
-
- -CTime
- The inode st_ctime data is used to supplement the st_mtime data when determining whether or not files have changed. This is the default. (If you have no idea what this is, don't mess with it.)
- -No_CTime
- Do not supplement st_mtime with st_ctime. This may be important when st_nlink changes at critical times, because making and breaking hard links touches st_ctime. (If you have no idea what this is, seriously, don't mess with it.)
- -Errok
-
- -No_Errok
-
- -FingerPrint
-
- -No_FingerPrint
-
- -FingerPrint_Update
- This option may be used to scan the directory tree below the current directory and update the file fingerprints. This helps when you use another tool (such as RCS or ClearCase) which alters the file but preserves the file's modification time.
- -Force
-
- -No_Force
-
- -Help
-
- -Include filename
-
- -Include_Cooked
- This option may be used to require the cooking of files named on #include-cooked and #include-cooked-nowarn include lines in cookbooks. The files named will be included, if present. If the files named need to be updated or created, this will be done, and then the cookbook re-read. This is the default.
- -No_Include_Cooked
- This option may be used to inhibit the implicit cooking of files named on #include-cooked and #include-cooked-nowarn include lines in cookbooks. The files will be included, if present, but they will not be updated or created, even if required.
- -Include_Cooked_Warning
- This option enables the warnings about derived dependencies in derived cookbooks. This is usually the default.
- -No_Include_Cooked_Warning
- This option disables the warnings about derived dependencies in derived cookbooks.
- -List
-
- -List filename
-
- -No_List
-
- -No_List filename
-
- -Meter
-
- -No_Meter
-
- -Pairs
-
- -Page-Length number
- This option may be used to set the length of the page, used when Cook needs to paginate output. Defaults to what the LINES environment variable tells it, or the terminal emulator tells it if LINES isn't set. -Page-Width number This option may be used to set the width of the page, used when Cook needs to wrap output (e.g. when it prints commends being executed). Defaults to what the COLS environment variable tells it, or the terminal emulator tells it if COLS isn't set. The maximum value for number is 32767.
- -PARallel [ number ]
This option may be used to specify the number of parallel
executions threads. The number defaults to 4 if no specific number of threads
is specified. See also the parallel_jobs variable.
Use of this option on single-processor machines needs to be done with great
care, as it can bring other processing to a complete halt. Several users doing
so simultaneously on a multi-processor machine will have a similar effect. It
is also to rapidly run out of virtual memory and temporary disk space if the
parallel tasks are complex.
- -No_PARallel
- This option may be used to specify that a single execution thread is to be used. This is the default.
- -Precious
-
- -No_Precious
-
- -Reason
-
- -No_Reason
-
- -SCript
-
- -Silent
-
- -No_Silent
-
- -STar
-
+ Reading the cookbook - Executing a collect function * Building the dependency graph # Walking the dependency graph @ Writing fingerprint files.
- -No_STar
-
- -Strip_Dot
-
- -No_Strip_Dot
-
- -SymLink-Ingredients
- The option asks that, when using a search path, that non-top-level recipe ingredients get a top-level symlink to the actual file. This is intended for brain dead tools, like GNU Autoconf, that don't grok search paths.
- -No-SymLink-Ingredients
- Do not create top level symlinks to ingredients. This is the default.
- -Tell_Position
-
- -No_Tell_Position
-
- -Touch
-
- -No_Touch
-
- -TErminal
-
- -No_TErminal
-
- -Time_Adjust
-
- -No_Time_Adjust
-
- -Web
-
- name=value
-
EXIT STATUS¶
The cook command will exit with a status of 1 on any error. The cook command will only exit with a status of 0 if there are no errors.FILES¶
The following files are used by cook:- Howto.cook
- This file contains instructions to cook for how to construct files.
- /usr/share/cook
- This directory contains "system" cookbooks for various tools and activities.
- .cook.fp
- This text file is used to remember fingerprints between invocations.
ENVIRONMENT VARIABLES¶
The following environment variables are used by cook:- COOK
- May be set to contain command-line options, changing the default behavior of cook. May be overridden by the command line.
- PAGER
- Use to paginate the output of the -Help and -VERSion options. Defaults to more(1) if not set.
- COOK_AUTOMOUNT_POINTS
A colon-separated list of directories which the
automounter may use to mount file systems. Use with extreme care, as this
distorts Cook's idea of the shape of the file system.
This feature assumes that paths below the automounter's mount directory are
echoes of paths without it. E.g. When /home is the trigger, and
/tmp_mnt/home is where the on-demand NFS mount is performed, with /home
appearing to processes to be a symlink.
This is the behavior of the Sun automounter. The AMD automounter is capable of
being configured in this way, though it is not typical of the examples in the
manual. Nor is it typical of the out-of-the-box Linux AMD configuration in
many distributions.
Defaults to ``/tmp_mnt:/a:/.automount'' if not set.
COPYRIGHT¶
cook version 2.33AUTHOR¶
Peter Miller | E-Mail: | pmiller@opensource.org.au |
/\/\* | WWW: | http://miller.emu.id.au/pmiller/ |
Cook | Reference Manual |