0

Here I have attached my batch file.Doxyfile_HV is my config file and in that I only need to change PROJECT_NUMBER. But this doesn't work for me.

 @echo off 
 setLocal enabledelayedexpansion

 ( type Doxyfile_HV & echo PROJECT_NUMBER=1.1.1 ) | doxygen.exe -

 doxygen Doxyfile_HV
 hhc "%CD%"\html\index.hhp"
Meera
  • 57
  • 2
  • 11

1 Answers1

0

You can either change the values in your Doxyfile or invoke doxygen with extra parameters as described in the manual in the paragraph Can I configure doxygen from the command line?:

Can I configure doxygen from the command line?

Not via command line options, but doxygen can read from stdin, so you can pipe things through it. Here's an example how to override an option in a configuration file from the command line (assuming a UNIX like environment):

( cat Doxyfile ; echo "PROJECT_NUMBER=1.0" ) | doxygen -

For Windows the following would do the same:

( type Doxyfile & echo PROJECT_NUMBER=1.0 ) | doxygen.exe -

If multiple options with the same name are specified then doxygen will use the last one. To append to an existing option you can use the += operator.

albert
  • 8,285
  • 3
  • 19
  • 32
  • I am a newbie. I tried this solution but this doesn't work for me. will you please elaborate step by step. Suppose I have a config file named with doxyfile_new and I only need to change PROJECT_NUMBER not any other parameters. – Meera Apr 25 '18 at 07:33
  • Explain what you tried and show error messages you got. – albert Apr 25 '18 at 07:34
  • In the quoted text of the answer you probably only have to substitute the `Doxyfile` with `doxyfile_new` (in the cat / type line depending on your OS) and use the right value for the `PROJECT_NUMBER`. – albert Apr 25 '18 at 07:52
  • Here I have attached my batch file.Doxyfile_HV is my config file and in that I only need to change PROJECT_NUMBER. But this doesn't work for me. @echo off setLocal enabledelayedexpansion ( type Doxyfile_HV & echo PROJECT_NUMBER=1.1.1 ) | doxygen.exe - doxygen Doxyfile_HV hhc "%CD%"\html\index.hhp" – Meera Apr 25 '18 at 09:46
  • Due to the comment format it is a bit hard to read, please paste the example into the original question. as far as I can see you call doxygen twice, but the one time is sufficient, but here it should, probably, not read `Doxyfile` but `Doxyfile_HV`. The `(type...)` does not change the `Doxyfile` but just feeds it to doxygen with just the `PROJECT_NUMBER` changed. – albert Apr 25 '18 at 09:48
  • I have edited my original question, please go through that – Meera Apr 25 '18 at 09:55