Do Doxygen config files support variables? - doxygen

For instance I set the source code path as c:\code\testapp\src. Is this then available as a var I can use - for instance so I can spit out a tag file in a location relative to this, not relative to the working dir of doxygen? I think I'm looking for something like how Ant defines vars for just about everything and these can be re-used; does Doxygen have special vars for any of the config values?
I'm thinking like $PROJECT-NAME or %VERSION% or whatever...

You can use environment variables in the configuration file; the syntax is the same as in a makefile, i.e. $(VAR_NAME)

I am not sure, but I have seen people use variables as part of their build process. For example the lemon graph library uses cmake, sets a variable for the absolute file path in cmake and the doxygen config file includes variables such as #abs_top_srcdir#. Through the build process these variables are replaced with the relevant text.

Related

Create a coffeescript to access config.ini file

i am trying to use config.ini in an existing coffeescript.
this is my config.ini
[env]
RUNNING_ENV = 'dev'
[dev]
security="no"
priority="P2"
[prod]
security="yes"
priority="P1"
Please assist me on creating a coffee file which can read these config data . I am a python deeveloper and i am new to coffee script
config.ini aren't usually used in node projects.
There are packages (like ini-config) which can parse a config.ini file and make it's values accessible in your code.
Instead I would just use environment variables which are automatically accessible under process.env in a node (in this case written in coffeescript) project.
You might like to use the dot-env package which is a common way of organising environment variables. Here is a good blog post on the topic.

Marking files as config files in CPack

When creating RPM packages: How do I tell CPack to treat a file as config file so it won't get overridden when updating the RPM?
The %config directive is used in rpm-spec for that case. Is there something like this in CPack?
As of now, files specified with an absolute path will get marked with %config, files with a relative path are marked as 'normal' files.
A quick look at what appears to be the CPack documentation doesn't show me anything that looks like it is directly relevant or helpful here.
However, if you are using a new enough version of CMake (2.8.1+ it looks like) or apply the patch yourself it looks like you can manually specify the spec file to build by using CPACK_RPM_USER_BINARY_SPECFILE.

Run Doxygen only on select files / modules?

Recently I started writing some doxygen docs in an existing project which already has quite a lot of doxygen comments.
Since I'm learning a bit - I like to iterate with making edits and generating docs, since doc generation is quite slow - 3-5min. This becomes un-workable.
I managed by deleting most of the files in the source tree so doxy only found the ones I was editing but this is really a horrible solution and not something I'd want to do frequently.
Is there a way (command line arg or env variable for eg) - to limit which files/modules are used for generating docs - so rebuilding docs can be done much faster?
Yes, you can customize Doxygen's behavior from either the command-line or via environment variables. For example, if you only want to include one file (include/somefile.h), you could execute Doxygen like:
( cat Doxyfile ; echo "INPUT=include/somefile.h" ) | doxygen -
see the Doxygen FAQ's "Can I configure doxygen from the command line?" for more details on customizing behavior from the command line.
Alternatively, if you want to use environment variables, you could use specify something like the following in your configuration file:
INPUT = $(FILE)
Doxygen performs environment variable substitution on its configuration files, allowing you to specify which file(s) should be acted on using:
export FILE=include/somefile.h
doxygen Doxyfile
See Doxygen Configuration for details on using environment variables in configuration files.

Relative files paths in doxygen-generated documentation

I am using Doxygen 1.7.4 for Windows.
In the File List page of generated documentation I'd like to see relative paths.
I have set FULL_PATH_NAMES = YES, to have something more, than just filename without path, but this gives full, absolute paths.
I want only paths relative to project directory. I know, that I can use STRIP_FROM_PATH but I have problem with wildcards. I need that kind of path-stripping, because this project is made on multiple PCs (as git repo), so paths can be different.
Is it possible to use wildcards for this setting, or do I have to set doxyfile for each workstation with part of absolute path to strip?
Edit:
I've found something like what I need on the doxygen website: STRIP_FROM_PATH = $(QTDIR)/
Maybe it is possible to use one of doxyfile's variables?
I'm not sure about Windows, but on Linux and OS X I can produce outputs in the file list like
src/Utils.cpp [code]
src/Utils.h [code]
src/VectorMath.h [code]
test/src/test.cpp [code]
By setting FULL_PATH_NAMES to YES and STRIP_FROM_PATH to ../.. (i.e. the directory path of project's root which is two directories up from where I'm building the docs). You may need to swap the directory separator to the windows one.
You'll also need to watch out that you update the Doxyfile if you move the docs around.

Specifying relative paths in SPSS 18

In SPSS 11 it was possible to specify relative paths. Example:
FILE HANDLE myfile='..\..\data\current.txt' /LRECL=533.
DATA LIST FILE=myfile /
...
This worked because apparently, SPSS 11 set the working folder to the path where the source .SPS file is saved. It seems that SPSS 18 always sets it's working folder to the installation folder of SPSS itself. Which is not at all the same thing.
Is there an option to change this behaviour? Or am I stuck with changing everything to absolute filenames?
Instead of a relative path, you could define a directory path and use it inside other file handle declarations to save typing:
FILE HANDLE directoryPath /NAME='C:\Directory\Path\' .
FILE HANDLE myFile /NAME='directoryPath/fileName.xyz' .
GET FILE='myFile' .
This will get the file: C:\Directory\Path\fileName.xyz.
The direction of the slashes may be important.
(Works in version 17)
If you use the INSERT command to run an sps file, it has an option to change the working directory to that location.
You could use the HOST command to SUBST a drive letter (on PCs) and reference everything through that.
You could define a FILE HANDLE to the common root location and use that in file references.
You could use Python programmability to find the path to the active syntax window and issue an SPSS CD command to set the backend working directory appropriately.
HTH,
Jon Peck
With Python, you can get the full path of the current syntax window (or any other one) and get its path. Using that you can issue an SPSS cd command to change the backend working directory accordingly.
If you define an environment variable, though, you can use that in file specifications within SPSS.
p.s. SPSS has an extensive set of apis and helper modules for Python (as well as for R and .NET languages). You can get information about this from SPSS Developer Central, www.spss.com/devcentral. All the language extensions are free once you have the base SPSS Statistics product.
Regards,
Jon Peck
Or use "CD" command to change your default working directory. See also:
http://www.spss-tutorials.com/change-your-working-directory/
For example, if your default directory is C:\project, then GET FILE 'data\data_file.sav'. will open data_file.sav from C:\project\data.
And then, a few minutes later, i came across this little python script from jignesh-sutar (see here: SPSS syntax - use path of the file.
With his python code you can use the path of the syntax file as starting point for all the paths in your syntax.