原文地址: http://johnbokma.com/perl/make-for-windows.html
心血來潮,就隨便翻譯以下,僅供自娛自樂.
If a Perl module is not available for the ActiveState version of Perl (ActivePerl), you might be able to download it from the Comprehensive Perl Archive Network (CPAN), and try to build and install it on Microsoft Windows.
如果一個Perl模組在ActiveState版本的Perl(ActivePerl)中找不到,你也許可以從CPAN上下載它,然後試著編譯(構建)並安裝到MS Windows.
A frequently asked question: "Where can I find make for Windows?". The answer is: "Download and use NMake".
一個經常被提及的問題:"從那裡能找到Windows下的make(一種編譯命令/工具)". 答案是:"下載並使用NMake".
Downloading NMake
Since Microsoft Windows hasn't in it's default install a make program needed to build the Perl modules, you have to download NMake 1.5 from the Microsoft Knowledge Base, article 132084 page.
因為MS Windows在預設安裝時沒有內建用於編譯Perl模組的make程式,你必須從下面這個網頁上下載NMakeMicrosoft Knowledge Base, article 132084.
Installing NMake
Run the downloaded file (exe) to extract it. Copy both the NMAKE.EXE and the NMAKE.ERR file to your Perl bin directory, normally C:/Perl/bin. Make sure that you copy the NMAKE.ERR file as well.
運行下載下來的檔案來釋放nmake.複製NMAKE.EXE 和NMAKE.ERR到你的Perl bin目錄,通常C:/Perl/bin. 確定你同時拷貝了NMAKE.ERR檔案.
Example of an NMake session
Normally building Perl modules and installing them consist of the following steps:
通常編譯Perl模組並安裝他們由以下幾個步驟:
- perl Makefile.pl
- make
- make test
- make install
Just replace make with nmake, and in many cases this will result in a working module (or modules) installed in the proper location(s).
只要把make替換成nmake,並且在大多數情況下這將把一個可用模組(或幾個可用模組)安裝到適當的地方(s).
下面的就省略不翻譯了.
Below follows an example of building the Net-Google Perl module, and installing it. See Net-Google with ActiveState Perl for more information.
perl Makefile.PLChecking if your kit is complete...Looks goodWriting Makefile for Net::GooglenmakeMicrosoft (R) Program Maintenance Utility Version 1.50Copyright (c) Microsoft Corp 1988-94. All rights reserved.cp lib/Net/Google/Search.pm blib/lib/Net/Google/Search.pmcp lib/Net/Google.pm blib/lib/Net/Google.pmcp lib/Net/Google/tool.pm blib/lib/Net/Google/tool.pmcp lib/Net/Google/Spelling.pm blib/lib/Net/Google/Spelling.pmcp lib/Net/Google/Cache.pm blib/lib/Net/Google/Cache.pmcp lib/Net/Google/Services/GoogleSearch.wsdl blib/lib/Net/Google/Services/GoogleSearch.wsdlcp lib/Net/Google/Service.pm blib/lib/Net/Google/Service.pmcp lib/Net/Google/Response.pm blib/lib/Net/Google/Response.pmnmake testMicrosoft (R) Program Maintenance Utility Version 1.50Copyright (c) Microsoft Corp 1988-94. All rights reserved. C:/Perl/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/000-key.t t/001-search.t t/002-spelling.t t/003-cache.t t/000-key.........## The Google API web service requires that you provide create aGoogle Account and obtain a license key# This key is then passed with each request you make to the Google servers.# If you do not already have a Google Account, you can sign up for one here:# http://www.google.com/apis/## Please enter your Google API key:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXt/000-key.........okt/001-search......okt/002-spelling....okt/003-cache.......okAll tests successful.Files=4, Tests=18, 103 wallclock secs ( 0.00 cusr + 0.00 csys =0.00 CPU)nmake installMicrosoft (R) Program Maintenance Utility Version 1.50Copyright (c) Microsoft Corp 1988-94. All rights reserved.Installing C:/Perl/site/lib/Net/Google.pmInstalling C:/Perl/site/lib/Net/Google/Cache.pmInstalling C:/Perl/site/lib/Net/Google/Response.pmInstalling C:/Perl/site/lib/Net/Google/Search.pmInstalling C:/Perl/site/lib/Net/Google/Service.pmInstalling C:/Perl/site/lib/Net/Google/Spelling.pmInstalling C:/Perl/site/lib/Net/Google/tool.pmInstalling C:/Perl/site/lib/Net/Google/Services/GoogleSearch.wsdlAppending installation info to C:/Perl/lib/perllocal.pod