diff options
author | Tim Potter <tpot@samba.org> | 2005-09-30 07:30:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:14 -0500 |
commit | cc8af00a93aa16c61a3446c76caf0d2b174b3017 (patch) | |
tree | 37370859db69d6809f4845a8ec382b636b30e6b2 /source4/SConstruct | |
parent | 6566c9dffeb53f0e9c5fa2435883043c852987fb (diff) | |
download | samba-cc8af00a93aa16c61a3446c76caf0d2b174b3017.tar.gz samba-cc8af00a93aa16c61a3446c76caf0d2b174b3017.tar.bz2 samba-cc8af00a93aa16c61a3446c76caf0d2b174b3017.zip |
r10646: Hey Jelmer what do you think of this? The SConscript for the libcli
directory now looks like the config.mk file but with different
punctuation.
The only weird bit is that it creates a proto.h file for each subsystem.
(This used to be commit 09d4abecb01fa9159243cfcb33051092f92cef3b)
Diffstat (limited to 'source4/SConstruct')
-rw-r--r-- | source4/SConstruct | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/source4/SConstruct b/source4/SConstruct index 4fd59b7d50..5fc12c9695 100644 --- a/source4/SConstruct +++ b/source4/SConstruct @@ -5,6 +5,8 @@ # eventually replace this system. # # Copyright (C) 2005 Jelmer Vernooij <jelmer@samba.org> +# Copyright (C) 2005 Tim Potter <tpot@samba.org> +# # Published under the GNU GPL # # TODO: @@ -22,7 +24,34 @@ opts.AddOptions( BoolOption('configure','run configure checks', False), ) -hostenv = Environment( +class SambaEnvironment(Environment): + def Subsystem(self, target, source, **kwargs): + """Create a Samba subsystem, basically a static library. + + By default a prototype file for the subsystem is created, + unless the keyword argument 'noproto' is present. A variable + corresponding to the target name is exported, unless the + keyword argument 'noexport' is present.""" + + # Generate prototype file for subsystem + + if not kwargs.has_key('noproto'): + self.proto_headers += self.CProtoHeader( + '%s_proto.h' % target, [str(x) for x in source]) + + # Maketh the library + + result = self.Library(target, source, **kwargs) + + # Export library symbol + + if not kwargs.has_key('noexport'): + locals()[target] = result # Eww + Export(target) + + return result + +hostenv = SambaEnvironment( toolpath=['build/scons','.'], tools=['default','pidl','proto','et','asn1','samba'], options=opts, |