On Tue, Aug 22, 2017 at 8:23 AM, <
doxygen-users-requ...@lists.sourceforge.net> wrote:
>
> Date: Mon, 21 Aug 2017 16:49:52 +0200
> From: Stefan Ludewig <stefan.lude...@exitgames.com>
> Subject: Re: [Doxygen-users] set PROJECT_NUMBER to the value of a
>         #define from a header file
>
> Your solution is exactly what I had in mind as a backup solution if I could
> not find a bulit-in solution, as it involves additional tools ? you run a
> makefile to set the project version, which means, it won?t work in the case
> that one starts doxygen directly without involving that makefile. I was
> looking for a solution that does not have this restriction.
>

Another option would be to maintain the project version in the doxyfile and
have the build procedure read the version from the doxyfile.

Something like:

#!/usr/bin/env perl
while (<>)
{
    if (/PROJECT_NUMBER\s*=\s*(\d+)([.](\d+)([.](\d+)))/)
    {
        print "#define MAJOR_VERSION $1\n";
        print "#define MINOR_VERSION $3\n";
        print "#define TINY_VERSION $5\n";
    }
}

Then in your build/make script:

readversion <doxyfile >version.h
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to