build: moved main autoproto rule into samba_autoproto.py
authorAndrew Tridgell <tridge@samba.org>
Sat, 6 Mar 2010 23:26:46 +0000 (10:26 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:40 +0000 (20:26 +1000)
buildtools/wafsamba/samba_autoproto.py
buildtools/wafsamba/wafsamba.py
source4/heimdal_build/wscript_build

index 4d213feaadc10a5951aa9cb7b1c0f2d76912c177..ab21a1e1a7511d1b6b1fda6ae7609288a83cbed9 100644 (file)
@@ -21,9 +21,14 @@ Build.BuildContext.HEIMDAL_AUTOPROTO_PRIVATE = HEIMDAL_AUTOPROTO_PRIVATE
 
 # rule for samba prototype generation
 def SAMBA_AUTOPROTO(bld, header, source):
-    print "TODO: add samba autoproto rule"
-    return
+    bld.SET_BUILD_GROUP('prototypes')
+    bld(
+        source = source,
+        target = header,
+        ext_out='.c',
+        rule = '../script/mkproto.pl --srcdir=.. --builddir=. --public=/dev/null --private=${TGT} ${SRC}'
+        )
+    print "Added AUTOPROTO target %s" % header
 Build.BuildContext.SAMBA_AUTOPROTO = SAMBA_AUTOPROTO
 
 
-
index 015db06fd45e97eca04bd2afc16bd21481375a28..7686a891b222f4fad88ed8ded9e8c863f27281f6 100644 (file)
@@ -336,22 +336,6 @@ def SAMBA_ERRTABLE(bld, name, source,
     )
 Build.BuildContext.SAMBA_ERRTABLE = SAMBA_ERRTABLE
 
-
-
-
-################################################################
-# build a C prototype file automatically
-def AUTOPROTO(bld, header, source):
-    if header is not None:
-        bld.SET_BUILD_GROUP('prototypes')
-        bld(
-            source = source,
-            target = header,
-            rule = '../script/mkproto.pl --srcdir=.. --builddir=. --public=/dev/null --private=${TGT} ${SRC}'
-            )
-Build.BuildContext.AUTOPROTO = AUTOPROTO
-
-
 #################################################################
 # define a Samba module.
 def SAMBA_MODULE(bld, modname, source,
index c684e9ac04e898fcdb4ae841ccc29c54e0409f1c..e539bb7620b2a95d072da3016268752c43df6b33 100644 (file)
@@ -546,5 +546,6 @@ HEIMDAL_HEIM_ASN1_DER_SOURCE = '''
 
 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-protos.h',
                       HEIMDAL_HEIM_ASN1_DER_SOURCE,
+                      group = 'build_compilers',
                       options="-q -P comment -o")