【问题标题】:Is it possible to not-install docs with ExeUtils::MakeMaker?是否可以不使用 ExeUtils::MakeMaker 安装文档?
【发布时间】:2020-07-18 15:23:28
【问题描述】:

我正在研究使用 Docker 和 Alpine 设置 Perl 微服务。默认情况下,Alpine 的约定不受文档/手册页的影响。

如果我的Makefile.PL 使用ExeUtils::MakeMaker,有没有办法不安装文档?

【问题讨论】:

    标签: docker perl makefile manpage build-system


    【解决方案1】:

    你可以看到可用的目标

    perl Makefile.PL
    grep -i phony ./Makefile
    

    他们是

    all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir pure_all subdirs clean_subdirs makemakerdflt manifypods realclean_subdirs subdirs_dynamic subdirs_pure_nolink subdirs_static subdirs-test_dynamic subdirs-test_static test_dynamic test_static

    似乎所有这些选项都与安装调用 manifypods 并安装 POD 文件有关。

    我认为您能做的最好的事情就是在之后删除 pod 文件并清除手册页。我通过在我的 Docker 的 RUN 行中添加类似这样的内容来全面清理,

    && cpanm --installdeps .
    && perl Makefile.PL
    && make
    && make install
    && make distclean
    && rm -rfv ~/.cpanm /usr/local/share/man \
    && find /usr/share/perl5/ -name '*.pod' -delete
    

    【讨论】:

    • 相关:Where does CPAN install modules?。我想知道如果您为目录指定一个空字符串会发生什么(例如通过将INSTALLMAN1DIR= INSTALLMAN3DIR= 传递给Makefile.PL
    猜你喜欢
    • 2019-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-17
    • 1970-01-01
    • 2014-02-25
    • 1970-01-01
    相关资源
    最近更新 更多