Changeset 34767 in webkit for trunk/JavaScriptCore/pcre/dftables
- Timestamp:
- Jun 24, 2008, 7:33:32 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/pcre/dftables
r31030 r34767 48 48 use File::Spec; 49 49 use File::Temp; 50 use Getopt::Long; 50 51 51 52 sub readHeaderValues(); … … 53 54 my %pcre_internal; 54 55 55 if (scalar(@ARGV) !=1) {56 print STDERR "Usage: ", basename($0), " output-file\n";56 if (scalar(@ARGV) < 1) { 57 print STDERR "Usage: ", basename($0), " [--preprocessor=program] output-file\n"; 57 58 exit 1; 58 59 } 59 60 60 my $outputFile = shift @ARGV; 61 my $outputFile; 62 my $preprocessor; 63 GetOptions('preprocessor=s' => \$preprocessor); 64 if (not $preprocessor) { 65 $preprocessor = "cpp"; 66 } 67 68 $outputFile = $ARGV[0]; 69 die('Must specify output file.') unless defined($outputFile); 61 70 62 71 readHeaderValues(); … … 233 242 234 243 my $headerPath = File::Spec->catfile(dirname($0), "pcre_internal.h"); 235 244 236 245 my $fh = new File::Temp( 237 246 DIR => ($ENV{'TMPDIR'} || "/tmp"), … … 256 265 close($fh); 257 266 258 open(CPP, " cpp\"$tempFile\" |") or die "$!";267 open(CPP, "$preprocessor \"$tempFile\" |") or die "$!"; 259 268 my $content = <CPP>; 260 269 close(CPP); 261 270 262 271 eval $content; 263 272 die "$@" if $@;
Note:
See TracChangeset
for help on using the changeset viewer.