Thursday, June 26, 2008

Make for Windows Perl Scripts

Perl is a great scripting language for automating tasks. But unlike Linux, Windows lacks a make utility for compiling PERL modules.

You can download Nmake15.exe from http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084

I found help on compling perl modules using nmake at http://johnbokma.com/perl/make-for-windows.html

Copy both the NMAKE.EXE and the NMAKE.ERR file to your Perl bin directory, normally C:\Perl\bin.

The uncompiled perl module should come with a file called Makefile.pl
Just open a command prompt in the directory where you have the uncompiled module and the Makefile.pl file and run the following commands:

1. run the command: perl Makefile.pl
2. run the command: nmake
3. run the command: nmake test
4. run the command: nmake install

If you get an error like "nmake is not recognized as an internal or external command", make sure you have the C:\perl\bin directory in your path.

No comments: