Fix image conversion
g0dil [Tue, 17 Oct 2006 07:37:35 +0000 (07:37 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@144 270642c3-0616-0410-b53a-bc976706d245

Packets/SConscript
satscons/Doxygen.py
satscons/SatSCons.py
satscons/imgconvert.mak [moved from Packets/imgconvert.mak with 100% similarity]

index 1f55872..555482b 100644 (file)
@@ -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" ])
     
index 975bbe0..b954832 100644 (file)
@@ -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
index 2d41598..b14b2ac 100644 (file)
@@ -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