summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/wafsamba.py8
-rw-r--r--source4/heimdal_build/wscript_build8
2 files changed, 14 insertions, 2 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index e7ea4d3117..acb8845295 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -402,19 +402,23 @@ Build.BuildContext.SAMBA_SUBSYSTEM = SAMBA_SUBSYSTEM
def SAMBA_GENERATOR(bld, name, rule, source, target,
- group='build_source'):
+ group='build_source', enabled=True):
'''A generic source generator target'''
if not SET_TARGET_TYPE(bld, name, 'GENERATOR'):
return
+ if not enabled:
+ return False
+
bld.SET_BUILD_GROUP(group)
bld(
rule=rule,
source=source,
target=target,
before='cc',
- ext_out='.c')
+ ext_out='.c',
+ name=name)
Build.BuildContext.SAMBA_GENERATOR = SAMBA_GENERATOR
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index b67371b74d..66c9b39ebe 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -251,6 +251,14 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_GSSAPI',
)
+bld.SAMBA_GENERATOR(
+ name="HEIMDAL_IFADDRS_H",
+ rule="ln -f ${SRC} ${TGT}",
+ source = 'ifaddrs.hin',
+ target = 'ifaddrs.h',
+ enabled = not bld.CONFIG_SET('HAVE_IFADDRS_H')
+ )
+
bld.SAMBA_SUBSYSTEM('HEIMDAL_KRB5',
bld.SUBDIR('../heimdal/lib/krb5/',
'''acache.c add_et_list.c