dmake在安装新模块时实际上在做什么? [英] What is dmake actually doing when installing a new module?

查看:71
本文介绍了dmake在安装新模块时实际上在做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过很多努力,我只是设法安装了perl/Tk模块.我意识到我不了解dmake或make etc的实际作用.

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.

我正在使用安装在C:\ strawberry的Strawberry Perl.

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

Fisrt我将模块解压缩到另一个目录,并运行了perl makefile.pl,效果很好.然后我尝试了不起作用的dmake.我想这对于知道这是如何工作的人来说是显而易见的.

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.

当我将模块放置在C:\ strawberry的子目录中时,我可以运行perl makefile.pl,dmake,dmake test和dmake install.

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

我的猜测是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?

推荐答案

当您看到Makefile.PL文件时,表示安装系统的模块是

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

EU :: MM是安装Perl模块的经典系统,可追溯到CPAN成立之初.它依赖于这样一个事实,程序make是一种通用且功能强大的依赖项跟踪工具,几乎在每个unix系统上都可用,并且依赖于各种unixy模式和行为.

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是模块的作者维护的Perl脚本.它从Perl本身读取有关系统的信息,并使用该信息来创建Makefile.此Makefile指示make要执行的动作.有关make的更多信息,请查看关于Make的Wikipedia页面.但是,从本质上讲,make的作用是查看规则,该规则告诉它要制作"哪些文件.它以递归方式查看创建目标"的所有规则(例如,当您键入make install时,安装"为目标),然后遵循它们,直到(a)它到达目标或(b)爆炸得很厉害.我们都希望(a),但是(b)也经常如此. :)

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. :)

不幸的是,在Windows-land上,我们没有make.还是编译器.通常,无论如何.

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

dmake是一个make程序,恰好在Windows上运行良好. Strawberry Perl将在Windows上的类Unix环境中实际构建所需的所有内容打包到一个方便的软件包中,从而使您实际上可以完成的工作.

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.

这篇关于dmake在安装新模块时实际上在做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆