如何确定SunStudio中的项目目录和其他环境变量?

发布于 2024-07-18 11:58:40 字数 216 浏览 4 评论 0原文

我目前正在尝试将构建后步骤添加到 SunStudio 项目的构建/制作文件中,但要继续,我需要知道项目的目录。 问题是 ${PWD} 不返回当前目录,并且我找不到任何环境变量,例如 ${PROJECTDIR} 或其他变量。

实际上,从更全面的角度来看,我的问题是我找不到任何有关 SunStudio 在构建项目时设置的环境变量的文档,因此任何包含该信息的答案都会更好。

谢谢

I'm currently trying to add a post build step to a SunStudio project's build/make file, but to continue I need to know the project's directory. Problem is ${PWD} doesn't return the current directory and I can't find any environmental variable like ${PROJECTDIR} or what not.

Actually in a more all encompassing way my problem is that I can't find ANY documentation about what environmental variables SunStudio sets when building a project, so any answer with that information would be even better.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

明明#如月 2024-07-25 11:58:40

我终于找到了解决办法。 我在 makefile 的预构建目标中放置了一个“env”命令,如下所示:

.build-pre:
     env

这显示了 SunStudio 用于构建 (=>dmake) 项目的所有环境变量,因此我了解到项目目录设置在${DMAKE_PWD} 变量。

I finally figured out a solution. I placed an "env" command in the pre-build target of my makefile like this:

.build-pre:
     env

This revealed all the environmental variables that SunStudio is using to build (=>dmake) the project, thus I learned that the project directory is set in the ${DMAKE_PWD} variable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文