diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-12-18 13:28:35 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-12-18 13:28:35 +0000 |
commit | 709439144118cdc3bfd83a3cfee0f545203abc22 (patch) | |
tree | 20ebdf3c4fc73b1e8c2b981d7d834263ae9fc260 | |
parent | aa061f24488b19b77307fc21f137d7338836bee8 (diff) | |
parent | d3ba9184ae4a51b26d0b441baf1f71fadb130b14 (diff) | |
download | perl-709439144118cdc3bfd83a3cfee0f545203abc22.tar.gz |
Integrate ansi @364,@366 into mainline.
p4raw-link: @366 on //depot/ansiperl: d3ba9184ae4a51b26d0b441baf1f71fadb130b14
p4raw-link: @364 on //depot/ansiperl: 1b171b8dc5d8ea8bdfc47634b7dd4589627bd142
p4raw-id: //depot/perl@379
-rw-r--r-- | lib/ExtUtils/MakeMaker.pm | 40 | ||||
-rw-r--r-- | miniperlmain.c | 2 | ||||
-rw-r--r-- | perl.h | 1 |
3 files changed, 42 insertions, 1 deletions
diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 5511e3d1e4..f3b843f6f2 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -537,6 +537,29 @@ END $self; } +sub WriteEmptyMakefile { + if (-f 'Makefile.old') { + chmod 0666, 'Makefile.old'; + unlink 'Makefile.old' or warn "unlink Makefile.old: $!"; + } + rename 'Makefile', 'Makefile.old' or warn "rename Makefile Makefile.old: $!" + if -f 'Makefile'; + open MF, '> Makefile' or die "open Makefile for write: $!"; + print MF <<'EOP'; +all: + +clean: + +install: + +makemakerdflt: + +test: + +EOP + close MF or die "close Makefile for write: $!"; +} + sub check_manifest { print STDOUT "Checking if your kit is complete...\n"; require ExtUtils::Manifest; @@ -1858,6 +1881,23 @@ An example: WriteMakefile( 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" }) +=head2 Disabling an extension + +If some events detected in F<Makefile.PL> imply that there is no way +to create the Module, but this is a normal state of things, then you +can create a F<Makefile> which does nothing, but succeeds on all the +"usual" build targets. To do so, use + + ExtUtils::MakeMaker::WriteEmptyMakefile(); + +instead of WriteMakefile(). + +This may be useful if other modules expect this module to be I<built> +OK, as opposed to I<work> OK (say, this system-dependent module builds +in a subdirectory of some other distribution, or is listed as a +dependency in a CPAN::Bundle, but the functionality is supported by +different means on the current architecture). + =head1 SEE ALSO ExtUtils::MM_Unix, ExtUtils::Manifest, ExtUtils::testlib, diff --git a/miniperlmain.c b/miniperlmain.c index b6c5c65b4d..190c7fb17b 100644 --- a/miniperlmain.c +++ b/miniperlmain.c @@ -32,7 +32,7 @@ char **env; #include "perlvars.h" #undef PERLVAR #undef PERLVARI -#undef PERLVARC +#undef PERLVARIC #endif PERL_SYS_INIT(&argc,&argv); @@ -1714,6 +1714,7 @@ typedef struct perl_thread *Thread; #undef PERLVAR #undef PERLVARI +#undef PERLVARIC #if defined(HASATTRIBUTE) && defined(WIN32) /* |