【发布时间】:2012-06-10 21:50:27
【问题描述】:
我对苹果和 osx 还很陌生。我从应用商店安装了 xcode,现在我的文件系统中有一个 make-executable:
192:~ herbert$ locate make | grep bin
/Applications/Xcode.app/Contents/Developer/usr/bin/gnumake
/Applications/Xcode.app/Contents/Developer/usr/bin/make
/opt/X11/bin/gccmakedep
/opt/X11/bin/makedepend
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/cross/m68k-elf-binutils/files/binutils-makeinfo-check.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/cross/mipsel-linux-binutils/files/300-001_ld_makefile_patch.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libinchi-1/files/patch-INCHI-1-API_INCHI_API_gcc_so_makefile-makefile.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/indi/files/patch-libindi.pc.cmake.diff
/usr/X11/bin/gccmakedep
/usr/X11/bin/makedepend
/usr/bin/makeinfo
/usr/sbin/makedbm
192:~ herbert$
不幸的是,它不在我的道路上。由于将 /Application/Xcode.app/Content/Developer/usr/bin/ 附加到我的路径将是一个选项,这似乎是不应该做的事情。我可以以某种方式将它安装到 /usr/... 或 /opt/local/... 吗?
192:~ herbert$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
192:~ herbert$
【问题讨论】:
-
您不想将 Xcode 的工具链链接或复制到 /opt/local、/usr 或其他任何地方。如果你想使用不同的工具链,你可以使用 MacPorts 来获取不同版本的 make、gcc 等。但如果你想使用 Xcode 工具链(你可能会这样做),请使用 Apple 的安装程序为此。
-
另外,您永远不想在 /opt/local 中放入任何不属于 MacPorts 的内容,否则您会严重混淆 MacPorts。
-
@abarnert,谢谢。我之所以问是因为我已经认为 cp 和 ln 命令将是一个不好的方法。我从 mac-store 安装了 XCode,在 macports 工作之前,它需要 make 并且可能是 gcc,所以我不能使用 macports 安装 xcode ;) 无论如何,我想如果我安装了它,我需要仔细检查 om正确地,再次安装它,或检查 xcode 的 GUI 中的设置(您在答案中提到)。
标签: xcode macos path makefile installation