diff --git a/.gitignore b/.gitignore index f66bd5b09..bc696a9a2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ optcache Makefile.in build/* -bin/* +target/* autom4te.cache/* scripts/* configure diff --git a/SConstruct b/SConstruct index 958ba3328..465abdee7 100644 --- a/SConstruct +++ b/SConstruct @@ -26,9 +26,9 @@ OPTIONSCACHEFILE = 'optcache' CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' -BINDIR = 'bin' -LIBDIR = '.libs' -PLUGDIR = '.libs' +TARDIR = 'target' +LIBDIR = 'modules' +PLUGDIR = 'modules' TESTDIR = 'tests' ICONDIR = 'icons' VERSION = '0.1+pre.01' @@ -76,7 +76,7 @@ def setupBasicEnvironment(): env.Append ( SHCCCOM=' -std=gnu99') # workaround for a bug: CCCOM currently doesn't honour CFLAGS, only CCFLAGS env.Replace( VERSION=VERSION , SRCDIR=SRCDIR - , BINDIR=BINDIR + , TARDIR=TARDIR , LIBDIR=LIBDIR , PLUGDIR=PLUGDIR , ICONDIR=ICONDIR @@ -96,8 +96,8 @@ def setupBasicEnvironment(): appendVal(env,'DEBUG', 'CCFLAGS', val=' -ggdb') # setup search path for Lumiera plugins - appendCppDefine(env,'PKGLIBDIR','LUMIERA_PLUGIN_PATH=\\"$PKGLIBDIR/:./.libs\\"' - ,'LUMIERA_PLUGIN_PATH=\\"$DESTDIR/lib/lumiera/:./.libs\\"') + appendCppDefine(env,'PKGLIBDIR','LUMIERA_PLUGIN_PATH=\\"$PKGLIBDIR/:./modules\\"' + ,'LUMIERA_PLUGIN_PATH=\\"$DESTDIR/lib/lumiera/:./modules\\"') appendCppDefine(env,'PKGDATADIR','LUMIERA_CONFIG_PATH=\\"$PKGLIBDIR/:.\\"' ,'LUMIERA_CONFIG_PATH=\\"$DESTDIR/share/lumiera/:.\\"') @@ -344,7 +344,7 @@ def defineBuildTargets(env, artifacts): core = lLib+lApp+lBack+lProc - artifacts['lumiera'] = env.LumieraExe('$BINDIR/lumiera', ['$SRCDIR/lumiera/main.cpp'], LIBS=core) + artifacts['lumiera'] = env.LumieraExe('$TARDIR/lumiera', ['$SRCDIR/lumiera/main.cpp'], LIBS=core) artifacts['corelib'] = lLib+lApp artifacts['support'] = lLib @@ -368,7 +368,7 @@ def defineBuildTargets(env, artifacts): objgui = srcSubtree(envGtk,'$SRCDIR/gui') guimodule = envGtk.LoadableModule('$LIBDIR/gtk_gui', objgui, SHLIBPREFIX='', SHLIBSUFFIX='.lum') artifacts['gui'] = ( guimodule - + env.Install('$BINDIR', env.Glob('$SRCDIR/gui/*.rc')) + + env.Install('$TARDIR', env.Glob('$SRCDIR/gui/*.rc')) + artifacts['icons'] ) diff --git a/admin/scons/Buildhelper.py b/admin/scons/Buildhelper.py index f8e349a5e..f781aa730 100644 --- a/admin/scons/Buildhelper.py +++ b/admin/scons/Buildhelper.py @@ -203,11 +203,11 @@ def RegisterIcon_Builder(env): """ import render_icon as renderer # load Joel's python script for invoking the rsvg-convert (SVG render) - renderer.rsvgPath = env.subst("$BINDIR/rsvg-convert") + renderer.rsvgPath = env.subst("$TARDIR/rsvg-convert") def invokeRenderer(target, source, env): source = str(source[0]) - targetdir = env.subst("$BINDIR") + targetdir = env.subst("$TARDIR") renderer.main([source,targetdir]) return 0 @@ -216,12 +216,12 @@ def RegisterIcon_Builder(env): source = str(source[0]) targetdir = os.path.basename(str(target[0])) targetfiles = renderer.getTargetNames(source) # parse SVG - return (["$BINDIR/%s" % name for name in targetfiles], source) + return (["$TARDIR/%s" % name for name in targetfiles], source) def IconCopy(env, source): """Copy icon to corresponding icon dir. """ subdir = getDirname(source) - return env.Install("$BINDIR/%s" % subdir, source) + return env.Install("$TARDIR/%s" % subdir, source) buildIcon = env.Builder( action = Action(invokeRenderer, "rendering Icon: $SOURCE --> $TARGETS") diff --git a/admin/scons/LumieraEnvironment.py b/admin/scons/LumieraEnvironment.py index 6f2f188b3..e7f4e7076 100644 --- a/admin/scons/LumieraEnvironment.py +++ b/admin/scons/LumieraEnvironment.py @@ -83,12 +83,12 @@ class LumieraEnvironment(Environment): def LumieraLibrary (self, *args,**kw): - """ add some tweaks missing in SCons 1.0 - like proper handling for SONAME + """ augments the built-in SharedLibrary() builder to add + some tweaks missing in SCons 1.0, like setting a SONAME proper + instead of just passing the relative pathname to the linker """ - print "hurgha" if 'soname' in kw: - soname = self.subst(kw['soname']) + soname = self.subst(kw['soname']) # explicitely defined by user else: if len(args) > 0: pathname = args[0] @@ -96,30 +96,28 @@ class LumieraEnvironment(Environment): pathname = kw['target'] else: raise SyntaxError("Library builder requires target spec. Arguments: %s %s" % (args,kw)) - print "SharedLib: path=%s" % pathname (dirprefix, libname) = path.split(pathname) if not libname: raise ValueError("Library name missing. Only got a directory: "+pathname) + libname = "${SHLIBPREFIX}%s$SHLIBSUFFIX" % libname - print "name = "+libname - soname = self.subst(libname) - print "konstruierter name "+soname + soname = self.subst(libname) # else: use the library filename as DT_SONAME assert soname subEnv = self.Clone() subEnv.Append(LINKFLAGS = "-Wl,-soname="+soname ) libBuilder = self.get_builder('SharedLibrary') - print "libBuilder=%s" % libBuilder - print "args = %s, kw = %s" % (args,kw) - return libBuilder(subEnv, *args,**kw); + return libBuilder(subEnv, *args,**kw); # invoke the predefined builder on the augmented environment def LumieraExe (self, *args,**kw): - """ add handling for rpath with $ORIGIN + """ augments the built-in Program() builder to add a fixed rpath based on $ORIGIN + That is: after searching LD_LIBRARY_PATH, but before the standard linker search, + the directory relative to the position of the executable ($ORIGIN) is searched. + This search path is active not only for the executable, but for all libraries + it is linked with """ - print "progrom" - subEnv = self.Clone() subEnv.Append( LINKFLAGS = "-Wl,-rpath=\\$$ORIGIN/$LIBDIR,--enable-new-dtags" ) diff --git a/bin/.libs b/bin/.libs deleted file mode 120000 index 2e321a8e9..000000000 --- a/bin/.libs +++ /dev/null @@ -1 +0,0 @@ -../.libs \ No newline at end of file diff --git a/bin/DIR_INFO b/bin/DIR_INFO deleted file mode 100644 index 9dafe61c3..000000000 --- a/bin/DIR_INFO +++ /dev/null @@ -1 +0,0 @@ -Lumiera executable(s) and libraries will be built here diff --git a/modules b/modules new file mode 120000 index 000000000..eb149d644 --- /dev/null +++ b/modules @@ -0,0 +1 @@ +target/modules \ No newline at end of file diff --git a/src/common/dummy-func.cpp b/src/common/dummy-func.cpp index 08b7f69a0..b6250ee75 100644 --- a/src/common/dummy-func.cpp +++ b/src/common/dummy-func.cpp @@ -15,7 +15,7 @@ namespace lumiera { - const char * const GUI_MODULE_NAME = ".libs/gtk_gui.lum"; + const char * const GUI_MODULE_NAME = "modules/gtk_gui.lum"; typedef void (*VoidFunc)(void); diff --git a/src/tool/SConscript b/src/tool/SConscript index 0930ffbe3..725248ca8 100644 --- a/src/tool/SConscript +++ b/src/tool/SConscript @@ -12,12 +12,12 @@ envSvg.mergeConf(['librsvg-2.0']) envSvg.Append(LIBS=support_lib) -luidgen = env.LumieraExe('#$BINDIR/luidgen', 'luidgen.c', LIBS=support_lib) ## for generating Lumiera-UIDs -rsvg = envSvg.LumieraExe('#$BINDIR/rsvg-convert','rsvg-convert.c') ## for rendering SVG icons (uses librsvg) +luidgen = env.LumieraExe('#$TARDIR/luidgen', 'luidgen.c', LIBS=support_lib) ## for generating Lumiera-UIDs +rsvg = envSvg.LumieraExe('#$TARDIR/rsvg-convert','rsvg-convert.c') ## for rendering SVG icons (uses librsvg) # build additional test and administrative tools.... -artifacts['tools'] = [ env.LumieraExe('#$BINDIR/hello-world','hello.c') #### hello world (checks C build) - + env.LumieraExe('#$BINDIR/try', 'try.cpp') #### to try out some feature... +artifacts['tools'] = [ env.LumieraExe('#$TARDIR/hello-world','hello.c') #### hello world (checks C build) + + env.LumieraExe('#$TARDIR/try', 'try.cpp') #### to try out some feature... # + luidgen + rsvg ] diff --git a/target/DIR_INFO b/target/DIR_INFO new file mode 100644 index 000000000..8764b3989 --- /dev/null +++ b/target/DIR_INFO @@ -0,0 +1 @@ +Lumiera program package tree, holding executable(s) and libraries to be built diff --git a/target/modules/DIR_INFO b/target/modules/DIR_INFO new file mode 100644 index 000000000..ffdc4efcb --- /dev/null +++ b/target/modules/DIR_INFO @@ -0,0 +1 @@ +Lumiera subsystems and other dynamically loadable application components diff --git a/tests/SConscript b/tests/SConscript index 8dcfe4bf3..b9e204676 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -35,7 +35,7 @@ def testExecutable(env,tree, exeName=None, obj=None): obj = srcSubtree(env,tree, isShared=False) # use all sourcefiles found in subtree if not exeName: exeName = 'test-%s' % tree - return env.LumieraExe('#$BINDIR/'+exeName, obj + core) + return env.LumieraExe('#$TARDIR/'+exeName, obj + core) def testCollection(env,dir): @@ -44,7 +44,7 @@ def testCollection(env,dir): """ srcpatt = ['test-*.c'] exeName = lambda p: path.basename(path.splitext(p)[0]) - buildIt = lambda p: env.LumieraExe("#$BINDIR/"+exeName(p), [p] + core) + buildIt = lambda p: env.LumieraExe("#$TARDIR/"+exeName(p), [p] + core) return [buildIt(f) for f in scanSubtree(dir,srcpatt)] @@ -67,7 +67,7 @@ artifacts['testsuite'] = ts = ( [ testExecutable(env, dir) for dir in ['bugs'] ] # for creating a Valgrind-Suppression file -vgsuppr = env.LumieraExe('#$BINDIR/vgsuppression','tool/vgsuppression.c', LIBS=core) ## for suppressing false valgrind alarms +vgsuppr = env.LumieraExe('#$TARDIR/vgsuppression','tool/vgsuppression.c', LIBS=core) ## for suppressing false valgrind alarms artifacts['tools'] += [vgsuppr] Depends(ts,vgsuppr) @@ -103,10 +103,10 @@ if testsuites: testEnv['ENV']['TEST_CONF'] = env.File("test.conf").abspath -testDir = env.Dir('#$BINDIR') +testDir = env.Dir('#$TARDIR') runTest = env.File("test.sh").abspath -runTs = testEnv.Command('#$BINDIR/,testlog', ts, runTest, chdir=testDir) +runTs = testEnv.Command('#$TARDIR/,testlog', ts, runTest, chdir=testDir)