Move PkgDraw tool dependencies to site_scons/lib
g0dil [Wed, 2 Sep 2009 08:06:26 +0000 (08:06 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1368 270642c3-0616-0410-b53a-bc976706d245

SConstruct
doclib/SConscript
site_scons/lib/bytefield.sty [moved from doclib/bytefield.sty with 100% similarity]
site_scons/lib/pkgdraw [moved from doclib/pkgdraw with 99% similarity]
site_scons/lib/textogif [moved from doclib/textogif with 100% similarity]
site_scons/site_tools/PkgDraw.py

index 7eb0637..d498ef0 100644 (file)
@@ -43,10 +43,6 @@ fixlinks     Fix broken links in doxygen documentation
 valgrind     Run all tests under valgrind/memcheck
 """)
 
-env.Replace(
-   PKGDRAW                = 'doclib/pkgdraw',
-)
-
 env.Append(
    ENV                    = { 'PATH' : os.environ.get('PATH') },
    CLEAN_PATTERNS         = [ '*~', '#*#', '*.pyc', 'semantic.cache', '.sconsign*' ],
index 9a941ee..bb42822 100644 (file)
@@ -261,7 +261,6 @@ env.Replace(
 
 env.Append( ENV = {
     'TODAY' : str(datetime.date.today()),
-    'TEXINPUTS' : os.environ.get('TEXINPUTS',env.Dir('#/doclib').abspath + ':'),
     'DOXYGEN' : str(env.File(env['DOXYGEN'])),
 })
 
similarity index 99%
rename from doclib/pkgdraw
rename to site_scons/lib/pkgdraw
index 895330f..6c3bdcf 100755 (executable)
@@ -493,6 +493,7 @@ for name in names:
 texf.write(TEX_FOOTER)
 texf.close()
 
+os.environ['TEXINPUTS'] =  "%s:%s" % (os.environ.get('TEXINPUTS',''), os.path.abspath(basedir))
 if os.system("cd %s; %s/textogif -png -dpi 80 -res 0.25 fields >pkgdraw.log 2>&1"
              % (tmpdir, basedir)) != 0:
     sys.stderr.write("Conversion failed. See %s\n" % tmpdir)
similarity index 100%
rename from doclib/textogif
rename to site_scons/lib/textogif
index 4192706..071f3c0 100644 (file)
@@ -1,6 +1,8 @@
-import os
+import os, os.path
 import SCons.Builder, SCons.Action
 
+libdir = os.path.join(os.path.dirname(os.path.dirname(__file__)),'lib')
+
 PkgDraw = SCons.Builder.Builder(
     suffix = ".png",
     src_suffix = ".hh",
@@ -9,7 +11,7 @@ PkgDraw = SCons.Builder.Builder(
 
 def generate(env):
     env['BUILDERS']['PkgDraw'] = PkgDraw
-    env['PKGDRAW'] = "pkgdraw"
+    env['PKGDRAW'] = "%s/pkgdraw" % libdir
     env['PKGDRAWCOM'] = "$PKGDRAW $SOURCE $TARGET $PKGDRAWPACKETS -- $CPPFLAGS $_CPPINCFLAGS $_CPPDEFFLAGS"
     env['PKGDRAWPACKETS'] = ''