Skip to content
Snippets Groups Projects
Commit dad6a3a5 authored by g0dil's avatar g0dil
Browse files

Fix image conversion

parent 063bb00f
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,6 @@ import SatSCons
sources = SatSCons.GlobSources()
SatSCons.StandardTargets(env)
SatSCons.Lib(env, 'Packets', sources)
env.AddPreAction(
SatSCons.Doxygen(env,sources),
env.Action("make -f imgconvert.mak structure.png"))
SatSCons.Lib(env, 'Packets', sources, )
SatSCons.Doxygen(env,sources, image = [ "structure.dia" ])
......@@ -8,17 +8,19 @@ def replace_ext(n,ext):
return base+ext
def Doxygen(env, target, source, image=[]):
global __file__
path, name = os.path.split(str(target))
stamp = os.path.join(path, '.'+name+'.stamp')
dir = env.Dir(target)
mak = os.path.join(os.path.split(__file__)[0],'imgconvert.mak')
env.Depends(dir,
[ env.Command(os.path.splitext(img)[0]+".png", img,
[ 'TERM=dumb make -f imgconvert.mak $TARGET' ])
[ 'TERM=dumb make -f %s $TARGET' % mak ])
for img in image ] +
[ env.Command(stamp, source,
[ 'cd $TARGET.dir && $DOXYGENCOM',
'cd $TARGET.dir/doc/html && (sed -ne \'1,/<table>/p\' <annotated.html && grep -F \'<tr>\' <annotated.html | sort -ft\'>\' -k4 && sed -ne \'/<\\/table>/,$$p\' <annotated.html) >annotated.html.new && mv annotated.html.new annotated.html',
'touch $TARGET' ],
# 'cd $TARGET.dir/doc/html && (sed -ne \'1,/<table>/p\' <annotated.html && grep -F \'<tr>\' <annotated.html | sort -ft\'>\' -k4 && sed -ne \'/<\\/table>/,$$p\' <annotated.html) >annotated.html.new && mv annotated.html.new annotated.html',
"touch $TARGET" ],
source_scanner = SCons.Defaults.ObjSourceScan) ])
env.Clean(stamp, dir)
return dir
......
......@@ -139,14 +139,15 @@ def Objects(env, sources, testSources = None, LIBS = []):
return objects
def Doxygen(env, sources, testSources = None):
def Doxygen(env, sources, testSources = None, image = []):
if type(sources) == type(()):
testSources = sources[1]
sources = sources[0]
doc = env.Doxygen(
target = 'doc',
source = sources )
source = sources,
image = image)
env.Alias('all_docs', doc)
return doc
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment