3 The Sanitization Process
8 To sanitize a directory or subtree, foo:
10 cd foo ; /usr/unsupported/bin/Sanitize
12 and you should be left with source code free of any distribution
18 Each directory to be kept in a release should have a .Sanitize file in
19 cvs. See devo/.Sanitize for a more or less self describing template.
21 All files should be listed in "Things-to-keep:" or "Things-to-lose:"
22 (or dealt with via keep_these_too and lose_these_too, see below). If
23 a file is not listed, it is removed, but a warning is printed.
24 Directories that are kept will have Sanitize called on their own
27 The "Do-first:" section of .Sanitize should be a shell script
28 fragment. It will be sourced by the Sanitize shell script after
29 verifying that the .Sanitize file looks reasonable but before taking
30 any other action. The arguments to Sanitize are passed to this
31 fragment so that you can take conditional action. For an example of
32 its use, see devo/gcc/config/.Sanitize.
34 If the "Do-first:" section sets the local shell variable
35 "keep_these_too", the files and/or directories listed there will be
36 kept in addition to any files listed in "Things-to-keep:". If it sets
37 "lose_these_too", those files and/or directories will be removed in
38 addition to any files listed in "Things-to-lose:". For an example of
39 its use, see devo/gcc/config/.Sanitize.
41 The "Do-last:" section of .Sanitize should be a shell script fragment.
42 It will be sourced by Sanitize after all other action is taken for
43 this directory. This section is intended to be used to strip code out
44 of source files. For an example of grep'ing out specific lines, see
45 devo/include/.Sanitize. For an example of sed'ing out sections of
46 code, see devo/gas/config/.Sanitize.
48 Command line options are extremely free form. The Sanitize script
49 itself only knows about keep-cvs. All arguments to Sanitize are
50 passed to the "Do-first:" and "Do-last:" fragments. Feel free to add
51 new options as you see fit so long as you list them here.
55 keep-cvs avoids removing CVS directories. This option is
56 actually recognized and handled by the Sanitize shell
59 keep-cygnus avoids removing Cygnus-only bits.
60 keep-v9 avoids removing the v9 stuff.
61 keep-life avoids removing the life stuff.
62 keep-cri avoids removing the cray research inc changes to emacs.
63 keep-chill avoids removing CHILL support.
64 keep-gm avoids removing GM-specific stuff.
65 keep-inet avoids removing I*Net stuff.
67 lose-gdbtk removes gdbtk stuff. This is really only needed for
70 for-intel builds a distribution in the style that Intel likes.
71 for-fsf builds a distribution in the style that the FSF likes.
73 test instead of removing dirty files, cache them away in a
75 recover intended to undo the effects of a "Sanitize test".