Re: [Doxygen-users] Adding Custom Commands to execute Shell Scripts
Brought to you by:
dimitri
From: Adam N. <a.n...@sh...> - 2010-07-18 11:29:00
|
>> Couldn't you use INPUT_FILTER to write a parser that runs these \shell >> commands instead? > > that means we would need to run a lexer and figure out the comments, > and then parse the language tags. do you know of such a script? a > \shell tag is so much easier and natural. Depends how flexible you need it to be. Unless you want to run hundreds of different shell commands you could just replace it with some generic tokens like $OUTPUT_GOES_HERE and then use sed or something in INPUT_FILTER to do a search and replace with the output of some predefined commands. The advantage there being if you change one of the programs that generates the output, you only need to update your INPUT_FILTER script rather than hundreds of \shell commands scattered throughout the docs/code. > i'm not sure why we are talking about 'platform independent' > documentation generation when clearly doxygen is filled with many > interesting features that execute shell commands at a user's demand, > like the INPUT_FILTER configuration. Executing shell commands isn't a problem, but shell scripts usually run external programs and these can be configured differently on different systems. That's why autoconf and other build environments have tests to make sure programs exist, are the correct versions, etc. I would imagine that in an ideal world INPUT_FILTER would call a local script which has been generated as part of the configure process. > anyway, the information we put in > our doxygen comments and how we generate the actual documentation > heavily depends on our environment, even though our project is > platform independent... Hope your documentation generation procedure is well documented then ;-) > as my original email said, all doxygen has to do is pass the "progname > args" to the portable_system function. Well if it's that simple I'm sure a patch would be cheerfully accepted :-) Cheers, Adam. |