views:

35

answers:

1

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

+1  A: 

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.

Robert Gould