From: g0dil Date: Tue, 17 Oct 2006 07:37:35 +0000 (+0000) Subject: Fix image conversion X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=7aac6125d22bca61c277b334e9b9f6c1357b9266;p=senf.git Fix image conversion git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@144 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/SConscript b/Packets/SConscript index 1f55872..555482b 100644 --- a/Packets/SConscript +++ b/Packets/SConscript @@ -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" ]) diff --git a/satscons/Doxygen.py b/satscons/Doxygen.py index 975bbe0..b954832 100644 --- a/satscons/Doxygen.py +++ b/satscons/Doxygen.py @@ -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,//p\' \' \' -k4 && sed -ne \'/<\\/table>/,$$p\' annotated.html.new && mv annotated.html.new annotated.html', - 'touch $TARGET' ], + # 'cd $TARGET.dir/doc/html && (sed -ne \'1,/
/p\' \' \' -k4 && sed -ne \'/<\\/table>/,$$p\' annotated.html.new && mv annotated.html.new annotated.html', + "touch $TARGET" ], source_scanner = SCons.Defaults.ObjSourceScan) ]) env.Clean(stamp, dir) return dir diff --git a/satscons/SatSCons.py b/satscons/SatSCons.py index 2d41598..b14b2ac 100644 --- a/satscons/SatSCons.py +++ b/satscons/SatSCons.py @@ -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 diff --git a/Packets/imgconvert.mak b/satscons/imgconvert.mak similarity index 100% rename from Packets/imgconvert.mak rename to satscons/imgconvert.mak