From: Charles Lane Date: Wed, 7 Nov 2001 09:23:28 +0000 (-0500) Subject: vms/gen_shrfls.pl more general config.sh parsing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac25e0e7a2e75fb7e53fc4dc4ebe4a9553c700b9;p=p5sagit%2Fp5-mst-13.2.git vms/gen_shrfls.pl more general config.sh parsing Message-Id: <011107092325.11726@DUPHY4.Physics.Drexel.Edu> (Also i seems that an unrelated experimental patch to lib/ExtUtils/MM_Unix.pm was accidentally included.) p4raw-id: //depot/perl@12883 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index e6c6766..8b236fc 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -397,6 +397,9 @@ sub cflags { $pollute = '$(PERL_MALLOC_DEF)'; } + $self->{CCFLAGS} =~ s/([()])/\\$1/g; + $self->{OPTIMIZE} =~ s/([()])/\\$1/g; + return $self->{CFLAGS} = qq{ CCFLAGS = $self->{CCFLAGS} OPTIMIZE = $self->{OPTIMIZE} @@ -502,6 +505,7 @@ sub const_config { foreach $m (@{$self->{CONFIG}}){ # SITE*EXP macros are defined in &constants; avoid duplicates here next if $once_only{$m} or $m eq 'sitelibexp' or $m eq 'sitearchexp'; + $self->{uc $m} =~ s/([()])/\\$1/g; push @m, "\U$m\E = ".$self->{uc $m}."\n"; $once_only{$m} = 1; } diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index d393b0f..a0ade7e 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -75,13 +75,13 @@ if ($docc) { $config = $dir . "config.sh"; open CONFIG, "< $config"; while() { - $use_threads++ if /usethreads='define'/; - $use_mymalloc++ if /usemymalloc='Y'/; - $care_about_case++ if /d_vms_case_sensitive_symbols='define'/; - $debugging_enabled++ if /usedebugging_perl='Y'/; - $hide_mymalloc++ if /embedmymalloc='Y'/; + $use_threads++ if /usethreads='(define|yes|true|t|y|1)'/i; + $use_mymalloc++ if /usemymalloc='(define|yes|true|t|y1)'/i; + $care_about_case++ if /d_vms_case_sensitive_symbols='(define|yes|true|t|y|1)'/i; + $debugging_enabled++ if /usedebugging_perl='(define|yes|true|t|y|1)'/i; + $hide_mymalloc++ if /embedmymalloc='(define|yes|true|t|y|1)'/i; $isgcc++ if /gccversion='[^']/; - $use_perlio++ if /useperlio='define'/; + $use_perlio++ if /useperlio='(define|yes|true|t|y|1)'/i; } close CONFIG;