This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: -Os for Darwin why?
[perl5.git] / keywords.pl
index 00c067c..c804620 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 
-unlink "keywords.h";
+require 'regen.pl';
+safer_unlink ("keywords.h");
 open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n";
 select KW;
 
@@ -13,6 +14,9 @@ print <<EOM;
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
  *
+ * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
+ *  This file is built by keywords.pl from its data.  Any changes made here
+ *  will be lost!
  */
 EOM
 
@@ -27,6 +31,8 @@ while (<DATA>) {
     print &tab(5, "#define KEY_$keyword"), $keynum++, "\n";
 }
 
+close KW or die "Error closing keywords.h: $!";
+
 ###########################################################################
 sub tab {
     local($l, $t) = @_;
@@ -90,6 +96,7 @@ endpwent
 endservent
 eof
 eq
+err
 eval
 exec
 exists