]>
Commit | Line | Data |
---|---|---|
8d91aae6 RP |
1 | |
2 | ||
3 | The Sanitization Process | |
4 | ||
5 | ||
6 | Usage: | |
7 | ||
8 | To sanitize a directory or subtree, foo: | |
9 | ||
10 | cd foo ; /usr/unsupported/bin/Sanitize | |
11 | ||
12 | and you should be left with source code free of any distribution | |
13 | restrictions. | |
14 | ||
15 | ||
16 | Configuration: | |
17 | ||
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. | |
20 | ||
21 | The default action is to remove all files and directories not | |
22 | explicitly listed in the .Sanitize file as being "Things-to-keep:". | |
23 | Directories that are kept will have Sanitize called on their own | |
24 | .Sanitize files. | |
25 | ||
26 | For other than default action, there are three hooks. | |
27 | ||
28 | The "Do-first:" section of .Sanitize should be a shell script | |
29 | fragment. It will be sourced by the Sanitize shell script after | |
30 | verifying that the .Sanitize file looks reasonable but before taking | |
31 | any other action. The arguments to Sanitize are passed to this | |
32 | fragment so that you can take conditional action. For an example of | |
33 | it's use, see devo/gcc/config/.Sanitize. | |
34 | ||
35 | If the "Do-first:" section sets the local shell variable | |
36 | "keep_these_too", the files and/or directories listed there will be | |
37 | kept in addition to any files listed in "Things-to-keep:". For an | |
38 | example of it's use, see devo/gcc/config/.Sanitize. | |
39 | ||
40 | The "Do-last:" section of .Sanitize should be a shell script fragment. | |
41 | It will be sourced by Sanitize after all other action is taken for | |
42 | this directory. This section is intended to be used to strip code out | |
43 | of source files. For an example of grep'ing out specific lines, see | |
44 | devo/include/.Sanitize. For an example of sed'ing out sections of | |
45 | code, see devo/gas/config/.Sanitize. | |
46 | ||
47 | Command line options are extremely free form. The Sanitize script | |
48 | itself only knows about keep-cvs. All arguments to Sanitize are | |
49 | passed to the "Do-first:" and "Do-last:" fragments. Feel free to add | |
50 | new options as you see fit so long as you list them here. | |
51 | ||
52 | Defined options: | |
53 | ||
54 | keep-cvs avoids removing CVS.adm directories. This option is | |
55 | actually recognized and handled by the Sanitize shell | |
56 | script. | |
57 | ||
58 | keep-v9 avoids removing the v9 stuff. | |
59 | keep-life avoids removing the life stuff. | |
60 | keep-cri avoids removing the cray research inc changes to emacs. | |
61 | for-intel builds a distribution in the style that Intel likes. | |
62 | for-fsf builds a distribution in the style that the FSF likes. | |
63 | ||
64 | test instead of removing dirty files, cache them away in a | |
65 | .Recover directory | |
66 | recover intended to undo the effects of a "Sanitize test". |