📄 extutils::mm_any.3
字号:
\fIdir_target\fR.IX Subsection "dir_target".PP.Vb 1\& my $make_frag = $mm\->dir_target(@directories);.Ve.PPGenerates targets to create the specified directories and set itspermission to 0755..PPBecause depending on a directory to just ensure it exists doesn't worktoo well (the modified time changes too often) \fIdir_target()\fR creates a\&.exists file in the created directory. It is this you should depend on.For portability purposes you should use the $(\s-1DIRFILESEP\s0) macro ratherthan a '/' to seperate the directory from the file..PP.Vb 1\& yourdirectory$(DIRFILESEP).exists.Ve.PP\fIdistdir\fR.IX Subsection "distdir".PPDefines the scratch directory target that will hold the distributionbefore tar-ing (or shar-ing)..PP\fIdist_test\fR.IX Subsection "dist_test".PPDefines a target that produces the distribution in thescratchdirectory, and runs 'perl Makefile.PL; make ;make test' in thatsubdirectory..PP\fIdynamic (o)\fR.IX Subsection "dynamic (o)".PPDefines the dynamic target..PP\fImakemakerdflt_target\fR.IX Subsection "makemakerdflt_target".PP.Vb 1\& my $make_frag = $mm\->makemakerdflt_target.Ve.PPReturns a make fragment with the makemakerdeflt_target specified.This target is the first target in the Makefile, is the default targetand simply points off to 'all' just in case any make variant getsconfused or something gets snuck in before the real 'all' target..PP\fImanifypods_target\fR.IX Subsection "manifypods_target".PP.Vb 1\& my $manifypods_target = $self\->manifypods_target;.Ve.PPGenerates the manifypods target. This target generates man pages fromall \s-1POD\s0 files in \s-1MAN1PODS\s0 and \s-1MAN3PODS\s0..PP\fImetafile_target\fR.IX Subsection "metafile_target".PP.Vb 1\& my $target = $mm\->metafile_target;.Ve.PPGenerate the metafile target..PPWrites the file \s-1META\s0.yml \s-1YAML\s0 encoded meta-data about the module inthe distdir. The format follows Module::Build's as closely aspossible..PP\fIdistmeta_target\fR.IX Subsection "distmeta_target".PP.Vb 1\& my $make_frag = $mm\->distmeta_target;.Ve.PPGenerates the distmeta target to add \s-1META\s0.yml to the \s-1MANIFEST\s0 in thedistdir..PP\fIrealclean (o)\fR.IX Subsection "realclean (o)".PPDefines the realclean target..PP\fIrealclean_subdirs_target\fR.IX Subsection "realclean_subdirs_target".PP.Vb 1\& my $make_frag = $MM\->realclean_subdirs_target;.Ve.PPReturns the realclean_subdirs target. This is used by the realcleantarget to call realclean on any subdirectories which contain Makefiles..PP\fIsignature_target\fR.IX Subsection "signature_target".PP.Vb 1\& my $target = $mm\->signature_target;.Ve.PPGenerate the signature target..PPWrites the file \s-1SIGNATURE\s0 with \*(L"cpansign \-s\*(R"..PP\fIdistsignature_target\fR.IX Subsection "distsignature_target".PP.Vb 1\& my $make_frag = $mm\->distsignature_target;.Ve.PPGenerates the distsignature target to add \s-1SIGNATURE\s0 to the \s-1MANIFEST\s0 in thedistdir..PP\fIspecial_targets\fR.IX Subsection "special_targets".PP.Vb 1\& my $make_frag = $mm\->special_targets.Ve.PPReturns a make fragment containing any targets which have specialmeaning to make. For example, .SUFFIXES and .PHONY..Sh "Init methods".IX Subsection "Init methods"Methods which help initialize the MakeMaker object and macros..PP\fIinit_ABSTRACT\fR.IX Subsection "init_ABSTRACT".PP.Vb 1\& $mm\->init_ABSTRACT.Ve.PP\fIinit_INST\fR.IX Subsection "init_INST".PP.Vb 1\& $mm\->init_INST;.Ve.PPCalled by init_main. Sets up all INST_* variables except those relatedto \s-1XS\s0 code. Those are handled in init_xs..PP\fIinit_INSTALL\fR.IX Subsection "init_INSTALL".PP.Vb 1\& $mm\->init_INSTALL;.Ve.PPCalled by init_main. Sets up all INSTALL_* variables (except\&\s-1INSTALLDIRS\s0) and *PREFIX..PP\fIinit_INSTALL_from_PREFIX\fR.IX Subsection "init_INSTALL_from_PREFIX".PP.Vb 1\& $mm\->init_INSTALL_from_PREFIX;.Ve.PP\fIinit_from_INSTALL_BASE\fR.IX Subsection "init_from_INSTALL_BASE".PP.Vb 1\& $mm\->init_from_INSTALL_BASE.Ve.PP\fIinit_VERSION \fIAbstract\fI\fR.IX Subsection "init_VERSION Abstract".PP.Vb 1\& $mm\->init_VERSION.Ve.PPInitialize macros representing versions of MakeMaker and other tools.PP\&\s-1MAKEMAKER:\s0 path to the MakeMaker module..PP\&\s-1MM_VERSION:\s0 ExtUtils::MakeMaker Version.PP\&\s-1MM_REVISION:\s0 ExtUtils::MakeMaker version control revision (for backwards compat).PP\&\s-1VERSION:\s0 version of your module.PP\&\s-1VERSION_MACRO:\s0 which macro represents the version (usually '\s-1VERSION\s0').PP\&\s-1VERSION_SYM:\s0 like version but safe for use as an \s-1RCS\s0 revision number.PP\&\s-1DEFINE_VERSION:\s0 \-D line to set the module version when compiling.PP\&\s-1XS_VERSION:\s0 version in your .xs file. Defaults to $(\s-1VERSION\s0).PP\&\s-1XS_VERSION_MACRO:\s0 which macro represents the \s-1XS\s0 version..PP\&\s-1XS_DEFINE_VERSION:\s0 \-D line to set the xs version when compiling..PPCalled by init_main..PP\fIinit_others \fIAbstract\fI\fR.IX Subsection "init_others Abstract".PP.Vb 1\& $MM\->init_others();.Ve.PPInitializes the macro definitions used by \fItools_other()\fR and places themin the \f(CW$MM\fR object..PPIf there is no description, its the same as the parameter to\&\fIWriteMakefile()\fR documented in ExtUtils::MakeMaker..PPDefines at least these macros..PP.Vb 1\& Macro Description\&\& NOOP Do nothing\& NOECHO Tell make not to display the command itself\&\& MAKEFILE\& FIRST_MAKEFILE\& MAKEFILE_OLD\& MAKE_APERL_FILE File used by MAKE_APERL\&\& SHELL Program used to run shell commands\&\& ECHO Print text adding a newline on the end\& RM_F Remove a file \& RM_RF Remove a directory \& TOUCH Update a file\*(Aqs timestamp \& TEST_F Test for a file\*(Aqs existence \& CP Copy a file \& MV Move a file \& CHMOD Change permissions on a \& file\&\& UMASK_NULL Nullify umask\& DEV_NULL Suppress all command output.Ve.PP\fIinit_DIRFILESEP \fIAbstract\fI\fR.IX Subsection "init_DIRFILESEP Abstract".PP.Vb 2\& $MM\->init_DIRFILESEP;\& my $dirfilesep = $MM\->{DIRFILESEP};.Ve.PPInitializes the \s-1DIRFILESEP\s0 macro which is the seperator between thedirectory and filename in a filepath. ie. / on Unix, \e on Win32 andnothing on \s-1VMS\s0..PPFor example:.PP.Vb 2\& # instead of $(INST_ARCHAUTODIR)/extralibs.ld\& $(INST_ARCHAUTODIR)$(DIRFILESEP)extralibs.ld.Ve.PPSomething of a hack but it prevents a lot of code duplication betweenMM_* variants..PPDo not use this as a seperator between directories. Some operatingsystems use different seperators between subdirectories as betweendirectories and filenames (for example: VOLUME:[dir1.dir2]file on \s-1VMS\s0)..PP\fIinit_linker \fIAbstract\fI\fR.IX Subsection "init_linker Abstract".PP.Vb 1\& $mm\->init_linker;.Ve.PPInitialize macros which have to do with linking..PP\&\s-1PERL_ARCHIVE:\s0 path to libperl.a equivalent to be linked to dynamicextensions..PP\&\s-1PERL_ARCHIVE_AFTER:\s0 path to a library which should be put on thelinker command line \fIafter\fR the external libraries to be linked todynamic extensions. This may be needed if the linker is one-pass, andPerl includes some overrides for C \s-1RTL\s0 functions, such as \fImalloc()\fR..PP\&\s-1EXPORT_LIST:\s0 name of a file that is passed to linker to define symbolsto be exported..PPSome OSes do not need these in which case leave it blank..PP\fIinit_platform\fR.IX Subsection "init_platform".PP.Vb 1\& $mm\->init_platform.Ve.PPInitialize any macros which are for platform specific use only..PPA typical one is the version number of your \s-1OS\s0 specific mocule.(ie. MM_Unix_VERSION or \s-1MM_VMS_VERSION\s0)..PP\fIinit_MAKE\fR.IX Subsection "init_MAKE".PP.Vb 1\& $mm\->init_MAKE.Ve.PPInitialize \s-1MAKE\s0 from either a \s-1MAKE\s0 environment variable or \f(CW$Config\fR{make}..Sh "Tools".IX Subsection "Tools"A grab bag of methods to generate specific macros and commands..PP\fImanifypods\fR.IX Subsection "manifypods".PPDefines targets and routines to translate the pods into manpages andput them into the INST_* directories..PP\fIPOD2MAN_macro\fR.IX Subsection "POD2MAN_macro".PP.Vb 1\& my $pod2man_macro = $self\->POD2MAN_macro.Ve.PPReturns a definition for the \s-1POD2MAN\s0 macro. This is a programwhich emulates the pod2man utility. You can add more switches to thecommand by simply appending them on the macro..PPTypical usage:.PP.Vb 1\& $(POD2MAN) \-\-section=3 \-\-perm_rw=$(PERM_RW) podfile1 man_page1 ....Ve.PP\fItest_via_harness\fR.IX Subsection "test_via_harness".PP.Vb 1\& my $command = $mm\->test_via_harness($perl, $tests);.Ve.PPReturns a \f(CW$command\fR line which runs the given set of \f(CW$tests\fR withTest::Harness and the given \f(CW$perl\fR..PPUsed on the t/*.t files..PP\fItest_via_script\fR.IX Subsection "test_via_script".PP.Vb 1\& my $command = $mm\->test_via_script($perl, $script);.Ve.PPReturns a \f(CW$command\fR line which just runs a single test withoutTest::Harness. No checks are done on the results, they're justprinted..PPUsed for test.pl, since they don't always follow Test::Harnessformatting..PP\fItool_autosplit\fR.IX Subsection "tool_autosplit".PPDefines a simple perl call that runs autosplit. May be deprecated bypm_to_blib soon..Sh "File::Spec wrappers".IX Subsection "File::Spec wrappers"ExtUtils::MM_Any is a subclass of File::Spec. The methods noted hereoverride File::Spec..PP\fIcatfile\fR.IX Subsection "catfile".PPFile::Spec <= 0.83 has a bug where the file part of catfile is notcanonicalized. This override fixes that bug..Sh "Misc".IX Subsection "Misc"Methods I can't really figure out where they should go yet..PP\fIfind_tests\fR.IX Subsection "find_tests".PP.Vb 1\& my $test = $mm\->find_tests;.Ve.PPReturns a string suitable for feeding to the shell to return alltests in t/*.t..PP\fIextra_clean_files\fR.IX Subsection "extra_clean_files".PP.Vb 1\& my @files_to_clean = $MM\->extra_clean_files;.Ve.PPReturns a list of \s-1OS\s0 specific files to be removed in the clean target inaddition to the usual set..PP\fIinstallvars\fR.IX Subsection "installvars".PP.Vb 1\& my @installvars = $mm\->installvars;.Ve.PPA list of all the INSTALL* variables without the \s-1INSTALL\s0 prefix. Usefulfor iteration or building related variable sets..PP\fIlibscan\fR.IX Subsection "libscan".PP.Vb 1\& my $wanted = $self\->libscan($path);.Ve.PPTakes a path to a file or dir and returns an empty string if we don'twant to include this file in the library. Otherwise it returns thethe \f(CW$path\fR unchanged..PPMainly used to exclude version control administrative directories frominstallation..PP\fIplatform_constants\fR.IX Subsection "platform_constants".PP.Vb 1\& my $make_frag = $mm\->platform_constants.Ve.PPReturns a make fragment defining all the macros initialized in\&\fIinit_platform()\fR rather than put them in \fIconstants()\fR..SH "AUTHOR".IX Header "AUTHOR"Michael G Schwern <schwern@pobox.com> and the denizens ofmakemaker@perl.org with code from ExtUtils::MM_Unix andExtUtils::MM_Win32.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -