目录下的 Makefile 和 Files

标签 makefile

我在一个目录下有 Makefile,目录中有很多 .pm(perl 文件)
我想在这个目录级别添加 makefile,它执行 perl 文件语法检查。
基本上我想补充:

perl -c <filename>

如何在没有硬编码的情况下自动获取该目录中的文件列表。

最佳答案

以下在 GNU makefile(Linux 和 Windows)中对我有用

ALL_PM_FILES = $(wildcard *.pm)

然后对它们运行 for/foreach 循环。

关于目录下的 Makefile 和 Files,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1460112/

相关文章:

c - 制作 : Circular mysh <- mysh dependency dropped

c++ - KDE 应用程序在 'make install' 之后无法安装

c++ - 制作目标和依赖名称格式

c - i386 GNU ld : file not recognized: File format not recognized

makefile - 如何让我的应用程序独立于其位置链接库?

makefile - @、- 和 + 作为 Make 中配方行的前缀有什么作用?

debugging - 如何在 NDK-build Android.mk 文件中使用 echo o print 打印 var 来调试编译?

c++ - 找不到 -lboost_system 的库

c++ - 如何将 pkg-config 添加到 Makefile?

c - 如何在 C 中通过 make 更改宏定义