Makefile 中的递归...还有其他解决方案吗?
我想要做的是压缩某个文件夹下所有子文件夹中的所有css。
例如,我有
/resources/css/
/resources/css/parent.css
/resources/css/child.css
/resources/css/import/import.css
这样的东西......(上面只是一个例子,文件名在现实世界中没有使用)。
因此,我尝试在 Makefile 中搜索递归。但似乎这不是推荐的方法,但后来被告知使用“include”并在每个子文件夹下都有 Makefile,并且最父级的 Makefile 应该调用子文件夹的 Makefile。
但!我不喜欢这种做法。我不想为每个子文件夹创建 Makefile。
还有其他方法可以处理这种情况吗?任何其他工具建议,我愿意学习和尝试。
我只想执行一个简单的命令来压缩我的文件夹下的所有 css。 (甚至是js)。 谢谢!
What I want to do is to compress all css in all subfolders under a certain folder.
for example, I have
/resources/css/
/resources/css/parent.css
/resources/css/child.css
/resources/css/import/import.css
something like this... (above is just an example, file names are not being used in real-world).
So, I tried searching for doing recursion in Makefile. But seems like it's not a recommended way, but then was told to use "include" and have Makefile under each sub-folders and the most parent Makefile should call sub-folder's Makefile.
But! I don't like this way of doing. I don't want to create Makefile for every sub-folder.
Is there a other way to handle this case? Any other tool suggestions, I'm willing to learn and try out.
I just want to do simple one command to compress all the css under my folder. (even js).
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在你的 Makefile 中,
In your Makefile,