1991-10-31 08:08:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
The Sanitization Process
|
|
|
|
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
|
|
|
To sanitize a directory or subtree, foo:
|
|
|
|
|
|
|
|
cd foo ; /usr/unsupported/bin/Sanitize
|
|
|
|
|
|
|
|
and you should be left with source code free of any distribution
|
|
|
|
restrictions.
|
|
|
|
|
|
|
|
|
|
|
|
Configuration:
|
|
|
|
|
|
|
|
Each directory to be kept in a release should have a .Sanitize file in
|
|
|
|
cvs. See devo/.Sanitize for a more or less self describing template.
|
|
|
|
|
1994-03-25 00:25:47 +08:00
|
|
|
All files should be listed in "Things-to-keep:" or "Things-to-lose:"
|
|
|
|
(or dealt with via keep_these_too and lose_these_too, see below). If
|
|
|
|
a file is not listed, it is removed, but a warning is printed.
|
1991-10-31 08:08:52 +08:00
|
|
|
Directories that are kept will have Sanitize called on their own
|
|
|
|
.Sanitize files.
|
|
|
|
|
|
|
|
The "Do-first:" section of .Sanitize should be a shell script
|
|
|
|
fragment. It will be sourced by the Sanitize shell script after
|
|
|
|
verifying that the .Sanitize file looks reasonable but before taking
|
|
|
|
any other action. The arguments to Sanitize are passed to this
|
|
|
|
fragment so that you can take conditional action. For an example of
|
1994-03-24 07:52:06 +08:00
|
|
|
its use, see devo/gcc/config/.Sanitize.
|
1991-10-31 08:08:52 +08:00
|
|
|
|
|
|
|
If the "Do-first:" section sets the local shell variable
|
|
|
|
"keep_these_too", the files and/or directories listed there will be
|
1994-03-25 00:25:47 +08:00
|
|
|
kept in addition to any files listed in "Things-to-keep:". If it sets
|
|
|
|
"lose_these_too", those files and/or directories will be removed in
|
|
|
|
addition to any files listed in "Things-to-lose:". For an example of
|
|
|
|
its use, see devo/gcc/config/.Sanitize.
|
1991-10-31 08:08:52 +08:00
|
|
|
|
|
|
|
The "Do-last:" section of .Sanitize should be a shell script fragment.
|
|
|
|
It will be sourced by Sanitize after all other action is taken for
|
|
|
|
this directory. This section is intended to be used to strip code out
|
|
|
|
of source files. For an example of grep'ing out specific lines, see
|
|
|
|
devo/include/.Sanitize. For an example of sed'ing out sections of
|
|
|
|
code, see devo/gas/config/.Sanitize.
|
|
|
|
|
|
|
|
Command line options are extremely free form. The Sanitize script
|
|
|
|
itself only knows about keep-cvs. All arguments to Sanitize are
|
|
|
|
passed to the "Do-first:" and "Do-last:" fragments. Feel free to add
|
|
|
|
new options as you see fit so long as you list them here.
|
|
|
|
|
|
|
|
Defined options:
|
|
|
|
|
|
|
|
keep-cvs avoids removing CVS.adm directories. This option is
|
|
|
|
actually recognized and handled by the Sanitize shell
|
|
|
|
script.
|
|
|
|
|
1994-03-24 07:52:06 +08:00
|
|
|
keep-cygnus avoids removing Cygnus-only bits.
|
1991-10-31 08:08:52 +08:00
|
|
|
keep-v9 avoids removing the v9 stuff.
|
|
|
|
keep-life avoids removing the life stuff.
|
|
|
|
keep-cri avoids removing the cray research inc changes to emacs.
|
1994-03-24 07:52:06 +08:00
|
|
|
keep-chill avoids removing CHILL support.
|
|
|
|
keep-mpw avoids removing MPW host support.
|
|
|
|
keep-gm avoids removing GM-specific stuff.
|
|
|
|
|
1991-10-31 08:08:52 +08:00
|
|
|
for-intel builds a distribution in the style that Intel likes.
|
|
|
|
for-fsf builds a distribution in the style that the FSF likes.
|
|
|
|
|
|
|
|
test instead of removing dirty files, cache them away in a
|
|
|
|
.Recover directory
|
|
|
|
recover intended to undo the effects of a "Sanitize test".
|