build: fixed ifaddrs.h for heimdal (from template)
authorAndrew Tridgell <tridge@samba.org>
Sun, 21 Mar 2010 02:13:53 +0000 (22:13 -0400)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:58 +0000 (20:26 +1000)
buildtools/wafsamba/wafsamba.py
source4/heimdal_build/wscript_build

index e7ea4d31170527f5852ca5dc572db66cc153a1f1..acb88452953d2987a2b90dda73c5bcb5f4e13588 100644 (file)
@@ -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
 
 
index b67371b74d99baf5635a36e9a45b0a045f356ee7..66c9b39ebe21d083b1d6452b888c5019028dea41 100644 (file)
@@ -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