summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/scons/asn1.py23
-rw-r--r--source4/build/scons/et.py18
-rw-r--r--source4/build/scons/pidl.py4
-rw-r--r--source4/build/scons/pkgconfig.py13
-rw-r--r--source4/build/smb_build/makefile.pm6
5 files changed, 34 insertions, 30 deletions
diff --git a/source4/build/scons/asn1.py b/source4/build/scons/asn1.py
index 078ac74a55..f0068e20dd 100644
--- a/source4/build/scons/asn1.py
+++ b/source4/build/scons/asn1.py
@@ -5,22 +5,29 @@ Tool-specific initialization for ASN1
"""
import SCons.Defaults
-import SCons.Scanner.ASN1
import SCons.Util
+import re
-asn1_scanner = SCons.Scanner.ASN1.ASN1Scan()
+output_re = re.compile(r'^([A-Za-z0-9_-]+)[ \t]*::=', re.M)
+
+def asn1_emitter(target,source,env):
+ targets = []
+ for s in source:
+ node = env.File(s)
+ contents = node.get_contents()
+ for j in output_re.findall(contents):
+ targets.append(str(node.get_dir()) + '/asn1_' + j + '.c')
+ return targets, source
asn1_builder = SCons.Builder.Builder(action='$ASN1COM',
src_suffix = '.asn1',
suffix='.c',
- scanner = asn1_scanner)
+ emitter = asn1_emitter)
def generate(env):
- env['ASN1'] = 'FIXME'
- env['PROTOCOM'] = '$ASN1 $SOURCE'
+ env['ASN1'] = './bin/asn1_compile'
+ env['ASN1COM'] = '$ASN1 $SOURCE'
env['BUILDERS']['ASN1'] = asn1_builder
def exists(env):
- return env.Detect('FIXME')
-
-
+ return env.Detect('asn1_compile')
diff --git a/source4/build/scons/et.py b/source4/build/scons/et.py
index ea251cd142..2864b32957 100644
--- a/source4/build/scons/et.py
+++ b/source4/build/scons/et.py
@@ -13,21 +13,9 @@ et_builder = SCons.Builder.Builder(action='$ETCOM',
suffix='.c')
def generate(env):
- env['ET'] = env.Detect('et_compile')
+ env['ET'] = './bin/compile_et'
env['ETCOM'] = '$ET $SOURCE'
- env['BUILDERS']['ET'] = et_builder
+ env['BUILDERS']['ErrorTable'] = et_builder
def exists(env):
- return env.Detect(['et_compile'])
-
-def generate(env):
- """Add Builders and construction variables for lex to an Environment."""
- c_file, cxx_file = SCons.Tool.createCFileBuilders(env)
-
- c_file.add_action('.l', SCons.Defaults.LexAction)
- cxx_file.add_action('.ll', SCons.Defaults.LexAction)
-
- env['LEX'] = env.Detect('flex') or 'lex'
- env['LEXFLAGS'] = SCons.Util.CLVar('')
- env['LEXCOM'] = '$LEX $LEXFLAGS -t $SOURCES > $TARGET'
-
+ return env.Detect(['./bin/compile_et'])
diff --git a/source4/build/scons/pidl.py b/source4/build/scons/pidl.py
index 6bddea3ee4..68a2c2040e 100644
--- a/source4/build/scons/pidl.py
+++ b/source4/build/scons/pidl.py
@@ -5,10 +5,10 @@ Tool-specific initialization for pidl (Perl-based IDL compiler)
"""
import SCons.Defaults
-import SCons.Scanner.IDL
import SCons.Util
+import SCons.Scanner
-idl_scanner = SCons.Scanner.IDL.IDLScan()
+idl_scanner = SCons.Scanner.ClassicCPP("PIDLScan", '.idl', 'CPPPATH', r'depends\(([^,]+),+\)', SCons.Node.FS.default_fs)
pidl_builder = SCons.Builder.Builder(action='$PIDLCOM',
src_suffix = '.idl',
diff --git a/source4/build/scons/pkgconfig.py b/source4/build/scons/pkgconfig.py
new file mode 100644
index 0000000000..6a0c82fd35
--- /dev/null
+++ b/source4/build/scons/pkgconfig.py
@@ -0,0 +1,13 @@
+# Based on the examples from the scons wiki
+
+def CheckPKGConfig(context, version):
+ context.Message('Checking for pkg-config... ')
+ ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
+ context.Result(ret)
+ return ret
+
+def CheckPackage(context, name):
+ context.Message('Checking for %s... ' % name)
+ ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
+ context.Result(ret)
+ return ret
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 36183f210f..fdba441f63 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -62,16 +62,12 @@ INSTALLPERMS = 0755
CONFIGFILE = $(CONFIGDIR)/smb.conf
LMHOSTSFILE = $(CONFIGDIR)/lmhosts
-# This is where smbpasswd et al go
-SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
-
PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\" \
-DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
-DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DLIBDIR=\"$(LIBDIR)\" \
-DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
-DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
- -DSWATDIR=\"$(SWATDIR)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
- -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
+ -DSWATDIR=\"$(SWATDIR)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
__EOD__
return $output;