Re: [Doxygen-users] generic variable for output directory
Brought to you by:
dimitri
|
From: Martin J. <mar...@is...> - 2008-07-02 07:19:58
|
On 02.07.2008 08:56, Peter Schöll wrote: > as far as doxygen supports to evaluate environment variables within its config file, I'd recommend to write > OUTPUT_DIRECTORY="$(ENV1)/$(ENV2)" > in Doxyfile itself. > I agree that this is the best, most straight-forward way of changing Doxygen parameters if you can use the same environment variable names for passing the information to Doxygen in every run. >> My objective is to pass path info (which may be changed during the course >> of >> project) through command line. >> Does this mean that you want to set a different OUTPUT_DIRECTORY for every Doxygen run? If yes, then you should set an environment variable to the desired directory and assign this environment variable to OUTPUT_DIRECTORY in the Doxyfile as Peter Schöll suggested. >> I tired to pass env variable using the process mentioned in the #17 but it >> gave an error as illegal variable. >> Where did the error message come from? The shell? Doxygen? >> ( cat Doxyfile ; echo "OUTPUT_DIRECTORY = $(ENV1)/$ENV2/)" ) | doxygen >> Did you forget the dash argument to Doxygen? Besides, this line will not produce the desired effect on modern Unix shells because $(ENV1) is a modern variant of `ENV1`, i.e. the shell will try to execute a command called ENV1 and replace $(ENV1) with its output. This is probably the reason for the error you experienced. As said above you should simply use ENV1 and ENV2 directly in the Doxyfile. If for any reason you have to use different environment variable names for different Doyxgen runs you could either use (cat Doxyfile; echo "OUTPUT_DIRECTORY=\"$ENV1/$ENV2\"") | doxygen - or (cat Doxyfile; echo 'OUTPUT_DIRECTORY="$(ENV1)/$(ENV2)"') | doxygen - In the first case, the shell itself substitutes the values of ENV1 and ENV2, whereas in the second case Doxygen does this. Regards Martin Jerabek |