[Scons-users] Why is clean now building doxygen?

Ridout, Aaron Aaron.Ridout at raymarine.com
Wed Jul 8 06:17:35 EDT 2015


Hi,
Newbie question...
In my SConstruct I had the 3 lines:

Alias('doxygen', 'Output/doxywarnings.txt')
doxygen = Command('Output/doxywarnings.txt', Glob('*.h') + Glob('*.cpp'), 'doxygen Build/doxyfile')
Clean(doxygen, Glob('Output/html/*'))

And now I want to run doxygen twice (once to generate the most HTML output it can and once to generate the most documentation warnings it can), so I added a helper function & changed the SConstruct to:

# Method to run doxygen with either maximum Warnings (opt=NO) or maximum HTML output (opt=YES)
#@param opt YES=Generate maximum HTML output, NO=Generate maximum warnings
def doxy(opt):
    import os
    os.environ['EXTRACT_ALL'] = opt
    os.environ['GENERATE_HTML'] = opt
    os.system('doxygen Build/doxyfile')

Alias('doxygen', 'Output/doxywarnings.txt')
doxygen = Command('Output/doxywarnings.txt', Glob('*.h') + Glob('*.cpp'), [doxy('YES'), doxy('NO')])
Clean(doxygen, Glob('Output/html/*'))

Now when I do a 'scons -c' while its deleting files, scons starts executing doxygen (twice) before deleting the Output/html directory tree. running clean twice solicits the same behavior! Normal 'scons' works almost expected in that doxygen runs twice, but it runs early in the build rather than towards the end of the build?
How do I get scons to only execute doxygen when not doing a clean, and near the end of the build?

Aaron


________________________________

Notice to recipient: This email is meant for only the intended recipient of the transmission, and may be a communication privileged by law, subject to export control restrictions or that otherwise contains proprietary information. If you receive this email by mistake, please notify us immediately by replying to this message and then destroy it and do not review, disclose, copy or distribute it. Thank you in advance for your cooperation.


More information about the Scons-users mailing list