MakeMaker:make test 与 make dist
假设我使用 module-starter
创建了一个目录,并编写了几个附加模块和测试。
然后,make test
将在 lib/
中的所有 模块上运行 t/
中的所有 测试>,但是 make dist
只会将 MANIFEST
中提到的文件打包到 tar.gz 中。
所以我最近因为运行 make test && 而被烧伤了。 make dist
仍然得到一个损坏的包。
我的问题是:我是否遗漏了某些内容,或者这可以报告为 MakeMaker 中的小错误? (Makefile.PL 似乎依赖于哪个)。
Let's say I've created a directory using module-starter
, and written several additional modules and tests since.
make test
would then run all tests in t/
on all modules in lib/
, however make dist
will only pack files mentioned in MANIFEST
into tar.gz.
So I got burnt recently by running make test && make dist
and still getting a broken package.
My question is: am I missing something, or this can be reported as a minor bug in MakeMaker? (Which Makefile.PL seems to rely upon).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
make disttest
它将从 MANIFEST 创建一个分发目录(相当于make distdir
)并在其中运行make test
。这可以保证您运行的文件与将要发布的文件相同。作为发布的一部分,我还重建了 MANIFEST,这需要使 MANIFEST.SKIP 保持最新。
总而言之,我的基本发布脚本是:
You can use
make disttest
which will create a distribution directory from the MANIFEST (equivalent tomake distdir
) and runmake test
in that. This guarantees you're running against the same files as will be shipped.I also rebuild my MANIFEST as part of making a release, which requires keeping your MANIFEST.SKIP up to date.
All in all, my basic release script is:
在发布软件包之前运行
make distcheck
。这将警告您MANIFEST
中可能缺少的任何内容。某些模块在构建过程中生成文件(包括在
lib/
下),因此MANIFEST
中缺少的文件不一定会导致make dist
失败。Run
make distcheck
before you release your package. This will warn you about anything potentially missing from yourMANIFEST
.Some modules generate files during the build process (including under
lib/
), so files missing in theMANIFEST
shouldn't necessarily causemake dist
to fail.