自动工具:如何清除由"./configure"创建的文件.在lighttpd项目中? [英] Autotools: how to cleanup files created by "./configure" in lighttpd project?

查看:252
本文介绍了自动工具:如何清除由"./configure"创建的文件.在lighttpd项目中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为嵌入式Linux项目尝试lighttpd.我得到了最新的源代码包,并开始编写一个主要的Makefile,其中封装了所有configure,compile,install(用于测试)等内容.

I'm trying out lighttpd for an embedded Linux project. I got the latest source package and started writing a master Makefile encapsulating all configure, compile, install (for testing) etc stuff.

反之亦然,我想清理每一步.清除之后,将不再有任何生成的文件.这对于重复测试很重要.

And vice-versa, I want to cleanup every step. After the cleanup there should be no generated files anymore. This is important for repetitive testing.

我想知道是否有一种方法可以完全清除./configure生成的内容吗?我对autotools不太了解.

I wonder if there is a way to do a complete cleanup of what ./configure generated? I'm not familiar with autotools in details.

有任何提示吗?

推荐答案

为此,我个人真的会使用源代码控制软件的功能(您应该使用一个).这将使清理独立于您的构建过程.参见例如 svn-cleanup git clean.

I personally would really use the features of a source control software (you should use one) for this. This would cleanup make independent of your build process. See e.g. svn-cleanup or git clean.

尽管如此,automake允许在删除哪些文件时进行一些调整.但是,对于可以自动删除自动工具生成的哪些文件,这具有(有意?)内置的限制.看看 MOSTLYCLEANFILES,CLEANFILES,DISTCLEANFILES和MAINTAINERCLEANFILES的定义并调整您的Makefile.am.有了它们,您可以使用

Nevertheless, automake allows some tweaking when to remove which files. This has (intentionally?) built-in limitations on what files generated by autotools can be remove this way though. Have a look at the definitions for MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, and MAINTAINERCLEANFILES and adjust your Makefile.am's. With them you can remove a lot of stuff with

make mostlyclean
make clean
make distclean
make maintainer-clean

您将无法删除例如Makefile.deps/这样.

You won't be able to remove e.g. Makefile or .deps/ this way.

关于make clean的可靠性,如果您坚持干净地指定文件并远离手动干预,则它应该工作100%".否则扩展清理规则.

As for the reliability of make clean it should "work 100%" if you stick to cleanly specifying your files and stay away from manual intervention. Otherwise extend the cleanup rules.

这篇关于自动工具:如何清除由"./configure"创建的文件.在lighttpd项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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