从已编辑的源代码重新编译自制程序

编程入门 行业动态 更新时间:2024-10-22 08:30:43
本文介绍了从已编辑的源代码重新编译自制程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否有一种方法可以通过自制程序从已编辑的源代码进行重新编译?

Is there a way to to recompile from an edited source code via homebrew?

我对Boost的源user.hpp进行了更改,现在我想使用它重新编译Boost.我尝试了--build-from-source和--enable-bar,但是都没有用,说它已经安装了.我可以重新编译的唯一方法是通过重新安装,但这只会覆盖我更改的源代码.

I did a change on the source user.hpp of Boost which I now want to recompile Boost with. I tried --build-from-source and --enable-bar but neither works, saying that it is already installed. The only way I can recompile is by reinstall but that simply overwrites the source code I changed.

有什么主意吗?

推荐答案

第一个选项 下载压缩文件,编辑文件,然后压缩压缩文件,就像自制软件一样(名称和格式相同).

First option Download the archive, edit the files, and zip the archive as homebrew does (same name and format).

如果保留由Homebrew创建的原始文件夹结构,则可以将修改后的存档放在~/Library/Caches/Homebrew中,然后尝试brew install -f. (-f可能不是严格必需的,但SHA-1不匹配可能是必需的.)

If you kept the original folder structure created by Homebrew, you can put the modified archive in ~/Library/Caches/Homebrew and then try brew install -f. (the -f is maybe not strictly necessary but it may be need for the SHA-1 mismatch.)

有关此博客的详细信息.

第二个选项

从Homebrew Wiki中抽出,安装没有Homebrew的软件包,然后将其与brew链接.

Pulled out from the Homebrew wiki, install the package without homebrew and then link it with brew.

./configure --prefix=/usr/local/Cellar/foo/1.2 && make && make install && brew link foo

更多推荐

从已编辑的源代码重新编译自制程序

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

发布评论

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

>www.elefans.com

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