# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-SConscript(glob.glob("*/SConscript"))
-
SENFSCons.AllIncludesHH(env, exclude = ['PPI.hh'])
-
-sources, tests, includes = SENFSCons.Glob(env, subdirs=[ 'detail' ])
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-
-SENFSCons.Doxygen(env, extra_sources=[
- env.Dia2Png('scenario.dia'),
- env.Dia2Png('classes.dia'),
- env.Dia2Png('ratestuffer.dia'),
+SENFSCons.AutoRules(env, subdirs=['detail'], doc_extra_sources=[
+ env.Dia2Png('scenario.dia'),
+ env.Dia2Png('classes.dia'),
+ env.Dia2Png('ratestuffer.dia'),
])
-
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env)
-
-objects = env.Object(sources)
-cobject = env.CombinedObject('80211Bundle', objects)
-env.Default(cobject)
-env.Append(ALLOBJECTS = objects)
-env.Append(PACKET_BUNDLES = cobject)
-env.BoostUnitTest('test', tests + cobject)
-
-env.Install('$OBJINSTALLDIR', cobject)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
-
-SConscript(glob.glob("*/SConscript"))
+SENFSCons.AutoPacketBundle(env, '80211Bundle')
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env)
-
-objects = env.Object(sources)
-cobject = env.CombinedObject('80221Bundle', objects)
-env.Default(cobject)
-env.Append(ALLOBJECTS = objects)
-env.Append(PACKET_BUNDLES = cobject)
-env.BoostUnitTest('test', tests + cobject)
-
-env.Install('$OBJINSTALLDIR', cobject)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
-
-SConscript(glob.glob("*/SConscript"))
+SENFSCons.AutoPacketBundle(env, '80221Bundle')
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env)
-
-objects = env.Object(sources)
-cobject = env.CombinedObject('DefaultBundle', objects)
-env.Default(cobject)
-env.Append(ALLOBJECTS = objects)
-env.Append(PACKET_BUNDLES = cobject)
-env.BoostUnitTest('test', tests + cobject)
-
-env.Install('$OBJINSTALLDIR', cobject)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
-
-SConscript(glob.glob("*/SConscript"))
+SENFSCons.AutoPacketBundle(env, 'DefaultBundle')
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-env.BoostUnitTest('test', glob.glob("*.test.cc"))
+SENFSCons.AutoRules(env)
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env)
-
-objects = env.Object(sources)
-cobject = env.CombinedObject('MPEGDVBBundle', objects)
-env.Default(cobject)
-env.Append(ALLOBJECTS = objects)
-env.Append(PACKET_BUNDLES = cobject)
-env.BoostUnitTest('test', tests + cobject)
-
-env.Install('$OBJINSTALLDIR', cobject)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoPacketBundle(env, 'MPEGDVBBundle')
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-
-SENFSCons.Doxygen(env, extra_sources = [
+SENFSCons.AutoRules(env, doc_extra_sources = [
env.Dia2Png("structure.dia"),
env.Dia2Png("80221Bundle/TLV.dia"),
env.PkgDraw("MPEGDVBBundle/DTCPPacket.hh"),
env.PkgDraw("MPEGDVBBundle/TransportPacket.hh"),
])
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
-
-SConscript(glob.glob("*/SConscript"))
-
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-SENFSCons.Doxygen(env)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-SConscript(glob.glob("*/SConscript"))
-
SENFSCons.AllIncludesHH(env, exclude=['DVB.hh'])
-
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
###########################################################################
-SConscript(glob.glob("*/SConscript"))
-
SENFSCons.AllIncludesHH(env, exclude=['INet.hh'])
-
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-SConscript(glob.glob("*/SConscript"))
-
SENFSCons.AllIncludesHH(env, exclude=['Raw.hh'])
-
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-SConscript(glob.glob("*/SConscript"))
-
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-SConscript(glob.glob("*/SConscript"))
-
SENFSCons.AllIncludesHH(env, exclude=['UN.hh'])
-
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-SConscript(glob.glob("*/SConscript"))
-
SENFSCons.AllIncludesHH(env, exclude=['Socket.hh'])
-
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-SENFSCons.Doxygen(env, extra_sources = [
+SENFSCons.AutoRules(env, doc_extra_sources = [
env.Dia2Png('SocketLibrary-classes.dia'),
env.Dia2Png('FhHierarchy.dia'),
env.Dia2Png('SocketPolicy.dia'),
env.Dia2Png('Protocols.dia'),
env.Dia2Png('Handle.dia'),
])
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env, exclude=['testServer.cc'])
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-SENFSCons.Doxygen(env)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env, exclude=['testServer.cc'])
env.Program('testServer', ['testServer.cc'])
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-SENFSCons.Doxygen(env)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
# -*- python -*-
Import('env')
-import SENFSCons, glob
+import SENFSCons
###########################################################################
SENFSCons.AllIncludesHH(env, exclude=['Logger.hh','SenfLog.hh'])
-
-sources, tests, includes = SENFSCons.Glob(env)
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-SENFSCons.Doxygen(env)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env)
# -*- python -*-
Import('env')
-import SENFSCons, glob, os.path
+import SENFSCons
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env, subdirs=[ 'impl' ])
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-SENFSCons.Doxygen(env)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
-
-SConscript(glob.glob("*/SConscript"))
+SENFSCons.AutoRules(env, subdirs=['impl'])
###########################################################################
-sources, tests, includes = SENFSCons.Glob(env, exclude=[ 'telnetServer.cc'])
-
-env.Append(ALLOBJECTS = env.Object(sources))
-env.BoostUnitTest('test', tests)
-SENFSCons.Doxygen(env)
-env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+SENFSCons.AutoRules(env, exclude=[ 'telnetServer.cc'])
env.Program('telnetServer', ['telnetServer.cc'])
file(target.abspath,"w").write("".join([ '#include "%s"\n' % f
for f in headers ]))
env.Clean('all', target)
+
+###########################################################################
+# The following functions serve as simple macros for most SConscript files
+#
+# If you need to customize these rules, copy-and-paste the code into the
+# SConscript file and adjust at will (don't to forget to replace the
+# parameters with their actual value. Parameters are marked with ((name)) )
+
+def AutoRules(env, exclude=[], subdirs=[], doc_extra_sources = []):
+ import SENFSCons, glob, os.path
+
+ sources, tests, includes = SENFSCons.Glob(env, exclude=((exclude)), subdirs=((subdirs)) )
+ subscripts = glob.glob("*/SConscript")
+
+ if sources : env.Append(ALLOBJECTS = env.Object(sources))
+ if tests : env.BoostUnitTest('test', tests)
+ if includes : env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+ if os.path.exists("Doxyfile") : SENFSCons.Doxygen(env, extra_sources=((doc_extra_sources)) )
+ if subscripts : SConscript(glob.glob("*/SConscript"))
+
+
+def AutoPacketBundle(env, name, exclude=[], subdirs=[], doc_extra_sources=[]):
+ import SENFSCons, glob, os.path
+
+ sources, tests, includes = SENFSCons.Glob(env, exclude=((exclude)), subdirs=((subdirs)) )
+ subscripts = glob.glob("*/SConscript")
+
+ objects = env.Object(sources)
+ cobject = env.CombinedObject(name, objects)
+
+ env.Default(cobject)
+ env.Append(ALLOBJECTS = objects, PACKET_BUNDLES = cobject)
+ env.Install('$OBJINSTALLDIR', cobject)
+
+ if tests : env.BoostUnitTest('test', tests + cobject)
+ if includes : env.InstallSubdir('$INCLUDEINSTALLDIR', includes)
+ if os.path.exists("Doxyfile") : SENFSCons.Doxygen(env, extra_sources=((doc_extra_sources)) )
+ if subscripts : SConscript(glob.glob("*/SConscript"))