X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FMakeMaker.pm;h=168c98d7f2c66bccbc6f688fccd6af9f67c4f6c7;hb=26ca90b622247714396690e385249f8ca1417aa0;hp=5511e3d1e470cf6a37f59c99c382956bbc1b4cb2;hpb=8490252049bf42d3d2f75d89178a8682bf22ba74;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 5511e3d..168c98d 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -235,6 +235,7 @@ sub full_setup { @Attrib_help = qw/ + AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION LICENSE_HREF CAPI C CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS EXE_FILES EXCLUDE_EXT INCLUDE_EXT NO_VC FIRST_MAKEFILE FULLPERL H INC INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLMAN1DIR @@ -278,7 +279,7 @@ sub full_setup { c_o xs_c xs_o top_targets linkext dlsyms dynamic dynamic_bs dynamic_lib static static_lib manifypods processPL installbin subdirs clean realclean dist_basics dist_core dist_dir dist_test dist_ci - install force perldepend makefile staticmake test + install force perldepend makefile staticmake test ppd ); # loses section ordering @@ -307,7 +308,7 @@ sub full_setup { @Get_from_Config = qw( ar cc cccdlflags ccdlflags dlext dlsrc ld lddlflags ldflags libc - lib_ext obj_ext ranlib sitelibexp sitearchexp so exe_ext + lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so exe_ext ); my $item; @@ -381,8 +382,9 @@ sub ExtUtils::MakeMaker::new { eval $eval; if ($@){ warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not found"; - } else { - delete $self->{PREREQ_PM}{$prereq}; +# mjn +# } else { +# delete $self->{PREREQ_PM}{$prereq}; } } # if (@unsatisfied){ @@ -537,6 +539,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; @@ -1515,15 +1540,14 @@ Hashref of .pm files and *.pl files to be installed. e.g. {'name_of_file.pm' => '$(INST_LIBDIR)/install_as.pm'} -By default this will include *.pm and *.pl. If a lib directory -exists and is not listed in DIR (above) then any *.pm and *.pl files -it contains will also be included by default. Defining PM in the +By default this will include *.pm and *.pl and the files found in +the PMLIBDIRS directories. Defining PM in the Makefile.PL will override PMLIBDIRS. =item PMLIBDIRS Ref to array of subdirectories containing library files. Defaults to -[ 'lib', $(BASEEXT) ]. The directories will be scanned and any files +[ 'lib', $(BASEEXT) ]. The directories will be scanned and I files they contain will be installed in the corresponding location in the library. A libscan() method can be used to alter the behaviour. Defining PM in the Makefile.PL will override PMLIBDIRS. @@ -1858,6 +1882,23 @@ An example: WriteMakefile( 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" }) +=head2 Disabling an extension + +If some events detected in F imply that there is no way +to create the Module, but this is a normal state of things, then you +can create a F 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 +OK, as opposed to I 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,