使用例如生成源代码后的清理策略.吉特

编程入门 行业动态 更新时间:2024-10-24 06:25:16
本文介绍了使用例如生成源代码后的清理策略.吉特的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我(大多数情况下)使用git从其源代码下载并编译各种项目,将我的源代码保留在/usr/local/src中,并将二进制文件安装在/usr/local/bin中.

I (mostly) use git to download and compile various projects from their source code, keeping my source in /usr/local/src and installing the binaries in /usr/local/bin.

通常在./configure && make && make install之后,按照构建过程进行操作,剩下很多杂物,最终成为本地git存储库中的新"文件.

Following the building procedure, usually with ./configure && make && make install, I'm left with a lot of cruft that ends up as 'new' files in my local git repository.

据我所知,make clean,make distclean以及可能还有(?)./configure clean都是可以考虑的过程,目的是丢弃大多数剩余的文件.但是在特定情况下(请参见下面的示例),我一无所知才能保持清洁",例如在安装之前……

To my understanding, make clean, make distclean and possibly also (?) ./configure clean are thinkable procedures in order to trash most leftover files. But in specific scenarios (see example below) I'm left clueless what thing to do in order to "stay clean", such as I was prior to the installation...

最近的示例–通过 http:/安装jscoverage(通过 git svn ) /svn.siliconforks/jscoverage/trunk jscoverage:

A recent example – installing jscoverage (via git svn) from svn.siliconforks/jscoverage/trunk jscoverage:

该项目的构建说明提示我使用 ./bootstrap.sh && make && make install.在这种情况下,编译和安装完成后,我尝试了所有上述清理命令(随机),但是并没有摆脱所有问题.

The building instructions for this project prompted me to use ./bootstrap.sh && make && make install. In this case, after compiling and installing was finished, I tried all of the aforementioned cleanup commands (by random), but didn't manage to get rid of everything.

总结一下我的问题:是否有我没有掌握的全能,卓越的清洁策略?在典型的工作流程中,使用git之类的VCS时,如何处理此清理问题:1.)下载– 2.)构建– 3.)从上游存储库提取更新– 4.)再次构建–依此类推?

To wrap my question up: Is there any all-mighty, superior cleaning strategy that I haven't grasped? How do you approach this cleanup issue when using a VCS such as git, in a typical workflow where you 1.) download – 2.) build – 3.) pull updates from upstream repository – 4.) build once again – and so forth?

推荐答案

还有git clean(从工作树中删除未跟踪的文件").这是一个简单的命令,命令行选项相对较少.请参见 git-clean手册页.

There is also git clean ("Remove untracked files from the working tree"). It's a simple command with relatively few command line options. See the git-clean man page.

更多推荐

使用例如生成源代码后的清理策略.吉特

本文发布于:2023-11-12 04:30:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580515.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:源代码   策略

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!