2

I just mangaged to install the perl/Tk module after much struggle. I realise I don't understand what dmake or make etc is actually doing.

I am using strawberry perl installed at C:\strawberry.

Fisrt I unpacked the module to another directory and ran perl makefile.pl which worked fine. Then I tried dmake which did not work. I guess that will be obvious to people who know how this works.

When I placed the module as a sub-directory of C:\strawberry I could run perl makefile.pl, dmake, dmake test and dmake install.

My guess is that dmake install is adding some executable files to the interpreter and to work the module must be in a subdirectory. Is there any article anywhere that explains what it is doing in detail?

Ether
  • 53,118
  • 13
  • 86
  • 159
AJ Dhaliwal
  • 661
  • 1
  • 8
  • 24
  • Oi! Kind of roundabouts, but what specifically did you have to do to get Tk installed on Strawberry Perl? – Robert P May 05 '10 at 22:40
  • Also, what version of SP and Perl were you using? – Robert P May 05 '10 at 22:43
  • 1
    ActiveState Perl is probably the best perl distro on windows. They also actively develop TCL/Tk so I'd bet the tk integration is much better. – Byron Whitlock May 05 '10 at 22:50
  • I was thinking of using ActiveState but then I wasn't sure if stuff I had written before would break. Also strawberry is opensource and I don't think ActiveState is. seems important for some reason. Strawberry Perl 5.10.0.6 Perl version 5.10.0. I downloaded the module from http://search.cpan.org/~srezic/Tk-804.028/pod/UserGuide.pod unpacked it in C:\strawberry. Opened up the command prompt, changed the directory to the module. ran perl makefile.pl,dmake,dmake test and then dmake install. Seems to have worked. – AJ Dhaliwal May 05 '10 at 23:07
  • 1
    Theres even a quote from Larry here...http://strawberryperl.com/. Surely that should settle it. – AJ Dhaliwal May 05 '10 at 23:10
  • 3
    Thanks for the version info. Note that the big reason to use Strawberry Perl over ActiveState Perl is that the CPAN module system (for the most part) actually works. Many modules don't exist in ActiveState's PPM repository, or are out of date, or they (for one reason or another) don't want to update. Tk is one of the most frustrating ones, because it *hasn't* been updated in years, and most Perl level GUI development has moved to other toolkits like Wx. – Robert P May 05 '10 at 23:24
  • 2
    So, likely, if you installed Perl with the .msi installer, you could have gone to your command prompt and issued `cpan`, then typed in `install Tk` and it would've worked for you. :) My problem derives from the fact that I *can't* use the .msi installer. :( – Robert P May 05 '10 at 23:25
  • Thanks Robert. I did try ppm and that failed. I guess I could/should try cpan next time. I installed perl so many months ago I cannot remember which installer I used. – AJ Dhaliwal May 06 '10 at 10:00

2 Answers2

5

When you see a Makefile.PL file, that means it's a module who's install system is ExtUtils::MakeMaker.

EU::MM is the classic system for installing Perl modules dating back to the dawn of CPAN. It relied on the fact that the program make--a common, and powerful dependency tracking tool--was available on almost every unix system, as well as relying on all sorts of unixy patterns and behaviors.

Makefile.PL is a Perl script that the author of the module maintains. It reads information about your system from Perl itself, and uses that to create a Makefile. This Makefile instructs make on actions to perform. For more information on make, check out The Wikipedia page on Make. Essentially though, what make does is look at rules, that tell it what files to 'make'. It recursively looks at all the rules to create the 'target' (eg, when you typed make install, 'install' was the target) and then follows them until (a) it reaches the target or (b) it explodes horribly. We all hope for (a), but (b) is often the case as well. :)

Unfortunately, in Windows-land, we don't have make. Or a compiler. Usually, anyway.

dmake is a make program that happens to run pretty well on Windows. Strawberry Perl packages up all the things you need to actually build in a unix-like environment on Windows into a convenient package, making what you just did actually possible.

Robert P
  • 15,707
  • 10
  • 68
  • 112
2

This may be taking your question too literally, but dmake has a -v option (for verbose)

dmake -v

dmake -v target

that will display information about exactly what dmake is doing during an installation.

mob
  • 117,087
  • 18
  • 149
  • 283