.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "GUARDS 1" .TH GUARDS 1 2024-04-18 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME guards \- select from a list of files guarded by conditions .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fIguards\fR [\-\-prefix=\fIdir\fR] [\-\-path=\fIdir1:dir2:...\fR] [\-\-default=<0|1>] [\-\-check|\-\-list] [\-\-invert\-match] [\-\-with\-guards] [\-\-config=] \&\fIsymbol\fR ... .SH DESCRIPTION .IX Header "DESCRIPTION" The script reads a configuration file that may contain so-called guards, file names, and comments, and writes those file names that satisfy all guards to standard output. The script takes a list of symbols as its arguments. Each line in the configuration file is processed separately. Lines may start with a number of guards. The following guards are defined: .Sp .RS 4 +\fIxxx\fR Include the file(s) on this line if the symbol \fIxxx\fR is defined. .Sp \&\-\fIxxx\fR Exclude the file(s) on this line if the symbol \fIxxx\fR is defined. .Sp +!\fIxxx\fR Include the file(s) on this line if the symbol \fIxxx\fR is not defined. .Sp \&\-!\fIxxx\fR Exclude the file(s) on this line if the symbol \fIxxx\fR is not defined. .Sp \&\- Exclude this file. Used to avoid spurious \fI\-\-check\fR messages. .RE .PP The guards are processed left to right. The last guard that matches determines if the file is included. If no guard is specified, the \fI\-\-default\fR setting determines if the file is included. .PP If no configuration file is specified, the script reads from standard input. .PP The \fI\-\-check\fR option is used to compare the specification file against the file system. If files are referenced in the specification that do not exist, or if files are not enlisted in the specification file warnings are printed. The \&\fI\-\-path\fR option can be used to specify which directory or directories to scan. Multiple directories are separated by a colon (\f(CW\*(C`:\*(C'\fR) character. The \&\fI\-\-prefix\fR option specifies the location of the files. Alternatively, the \&\fI\-\-path=@\fR syntax can be used to specify a file from which the file names will be read. .PP Use \fI\-\-list\fR to list all files independent of any rules. Use \fI\-\-invert\-match\fR to list only the excluded patches. Use \fI\-\-with\-guards\fR to also include all inclusion and exclusion rules. .SH AUTHOR .IX Header "AUTHOR" Andreas Gruenbacher , SUSE Labs