summaryrefslogtreecommitdiff
path: root/source4/heimdal_build/wscript_build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-01-01 01:25:10 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-01-01 04:00:03 +0100
commit3febaed9ba9e02ba43259023c4e8255e53c0ad85 (patch)
tree546152e558b5d93e054cab36ec0617ebfe3f01dd /source4/heimdal_build/wscript_build
parent5792fa90ace06f736661d9924ec9a75c3a0a9771 (diff)
downloadsamba-3febaed9ba9e02ba43259023c4e8255e53c0ad85.tar.gz
samba-3febaed9ba9e02ba43259023c4e8255e53c0ad85.tar.bz2
samba-3febaed9ba9e02ba43259023c4e8255e53c0ad85.zip
heimdal_build: Look for asn1_compile (but by default, don't use it).
Diffstat (limited to 'source4/heimdal_build/wscript_build')
-rw-r--r--source4/heimdal_build/wscript_build15
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index dae6786cd7..c71e22494b 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -53,13 +53,17 @@ def HEIMDAL_ASN1(name, source,
# source file. Note that in the case of a option_file, we have more than
# one source file
cd_rule = 'cd "${TGT[0].parent.abspath(env)}"'
- asn1_rule = cd_rule + ' && "${BLDBIN}/asn1_compile" ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}'
+ asn1_rule = cd_rule + ' && "${ASN1_COMPILE}" ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}'
source = to_list(source)
if option_file is not None:
source.append(option_file)
+ deps = ''
+ if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
+ deps = 'asn1_compile'
+
t = bld(rule=asn1_rule,
ext_out = '.x',
before = 'cc',
@@ -67,7 +71,7 @@ def HEIMDAL_ASN1(name, source,
shell = True,
source = source,
target = out_files,
- depends_on = 'asn1_compile',
+ depends_on = deps,
name=name + '_ASN1')
t.env.ASN1NAME = asn1name
@@ -861,8 +865,10 @@ HEIMDAL_SUBSYSTEM('HEIMDAL_VERS',
group='build_compilers',
deps='roken replace')
-# here is the asn1 compiler build rule
-HEIMDAL_BINARY('asn1_compile',
+
+if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
+ # here is the asn1 compiler build rule
+ HEIMDAL_BINARY('asn1_compile',
'lib/asn1/main.c lib/asn1/gen.c lib/asn1/gen_copy.c lib/asn1/gen_decode.c lib/asn1/gen_encode.c lib/asn1/gen_free.c lib/asn1/gen_glue.c lib/asn1/gen_length.c lib/asn1/gen_seq.c lib/asn1/gen_template.c lib/asn1/hash.c lib/asn1/symbol.c lib/asn1/asn1parse.c lib/asn1/lex.c',
use_hostcc=True,
use_global_deps=False,
@@ -872,6 +878,7 @@ HEIMDAL_BINARY('asn1_compile',
deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
install=False
)
+ bld.env['ASN1_COMPILE'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'asn1_compile')
if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):