{
foreach my $template ("$tmp/config.hin", @config_templates)
{
- my $in = new Autom4te::XFile ($template, "<");
-
- while ($_ = $in->getline)
+ if ($template =~ /["#\$&'()*;<>?[\\\^`|]/)
+ {
+ msg 'syntax', "warning: header template has shell metacharacters: $template";
+ }
+ elsif (! -r $template)
+ {
+ msg 'syntax', "warning: cannot read $template: $!";
+ }
+ else
{
- my ($sym) = /^\#\s*\w+\s+(\w+)/
- or next;
- delete $symbol{$sym};
+ my $in = new Autom4te::XFile ($template, "<");
+
+ while ($_ = $in->getline)
+ {
+ my ($sym) = /^\#\s*\w+\s+(\w+)/
+ or next;
+ delete $symbol{$sym};
+ }
}
}
Doing this allows you to keep your file names acceptable to
DOS variants, or
to prepend and/or append boilerplate to the file.
+
+The @var{file} names should not contain shell metacharacters.
+@xref{Special Chars in Variables}.
@end defmac
blank-or-newline-separated list @var{header} containing C preprocessor
@code{#define} statements, and replace @samp{@@DEFS@@} in generated
files with @option{-DHAVE_CONFIG_H} instead of the value of @code{DEFS}.
-The usual name for @var{header} is @file{config.h}.
+The usual name for @var{header} is @file{config.h};
+@var{header} should not contain shell metacharacters.
+@xref{Special Chars in Variables}.
If @var{header} already exists and its contents are identical to what
@code{AC_OUTPUT} would put in it, it is left alone. Doing this allows
from @command{configure}. Associate the commands with @var{tag}.
Since typically the @var{cmds} create a file, @var{tag} should
naturally be the name of that file. If needed, the directory hosting
-@var{tag} is created. This macro is one of the instantiating macros;
+@var{tag} is created. The @var{tag} should not contain shell
+metacharacters. @xref{Special Chars in Variables}.
+This macro is one of the instantiating macros;
see @ref{Configuration Actions}.
Here is an unrealistic example:
the corresponding link name @var{dest}. Makes a symbolic link if
possible, otherwise a hard link if possible, otherwise a copy. The
@var{dest} and @var{source} names should be relative to the top level
-source or build directory. This macro is one of the instantiating
+source or build directory, and should not contain shell metacharacters.
+@xref{Special Chars in Variables}.
+
+This macro is one of the instantiating
macros; see @ref{Configuration Actions}.
For example, this call: