This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Note that the warnings categories are documented
[perl5.git] / regen / uconfig_h.pl
CommitLineData
d0817dbe
NC
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
11use strict;
12use Config;
3d7c117d 13require './regen/regen_lib.pl';
d0817dbe
NC
14
15my ($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;
20safer_unlink($uconfig_h_new);
21
22my $command = 'sh ./config_h.SH';
23system $command and die "`$command` failed, \$?=$?";
24
73437b64 25my $fh = open_new($uconfig_h, '>>');
d0817dbe 26
515c3fe0 27read_only_bottom_close_and_rename($fh, [$ENV{CONFIG_SH}, 'config_h.SH']);