What is dmake actually doing when installing a new module?
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 开发者_Python百科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?
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.
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.
精彩评论