This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: White-space only
[perl5.git] / regen / uconfig_h.pl
1 #!/usr/bin/perl -w
2 #
3 # Regenerate (overwriting only if changed):
4 #
5 #    uconfig.h
6 #
7 # from uconfig.h config_h.SH
8 #
9 # Accepts the standard regen_lib -q and -v args.
10
11 use strict;
12 use Config;
13 require 'regen/regen_lib.pl';
14
15 my ($uconfig_h, $uconfig_h_new, $config_h_sh)
16     = ('uconfig.h', 'uconfig.h-new', 'config_h.SH');
17
18 $ENV{CONFIG_SH} = 'uconfig.sh';
19 $ENV{CONFIG_H} = $uconfig_h_new;
20 safer_unlink($uconfig_h_new);
21
22 my $command = 'sh ./config_h.SH';
23 system $command and die "`$command` failed, \$?=$?";
24
25 my $fh = open_new($uconfig_h, '>>');
26
27 read_only_bottom_close_and_rename($fh, [$ENV{CONFIG_SH}, 'config_h.SH']);