build: added generation of version.h
authorAndrew Tridgell <tridge@samba.org>
Sat, 6 Mar 2010 23:59:01 +0000 (10:59 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:40 +0000 (20:26 +1000)
buildtools/wafsamba/samba_patterns.py
source4/wscript_build

index 868aa2874e7ed352e2a946c1dbedbe2508c3e958..ef89db69a667e8f7292af064879c4c469c7d28b2 100644 (file)
@@ -21,3 +21,16 @@ def process_et(self, node):
     self.create_task('et', node, [c_node, h_node])
     self.allnodes.append(c_node)
 
+
+
+def SAMBA_MKVERSION(bld, target):
+    '''generate the version.h header for Samba'''
+    bld.SET_BUILD_GROUP('setup')
+    t = bld(rule="${SRC} ${TGT}",
+            source= [ "script/mkversion.sh", 'VERSION' ],
+            target=target,
+            before="cc")
+    # force this rule to be constructed now
+    t.post()
+Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION
+
index 04fef67927cf7eb5c647938a48f474b4373b0bc7..831c3dcef7f1f5c9c37bac798187bb06682766e7 100644 (file)
@@ -9,6 +9,8 @@ bld.env.TOPDIR = os.path.normpath(os.path.join(os.environ.get('PWD'), srcdir))
 # building the C from ASN1 and IDL, and finally the main build process
 bld.SETUP_BUILD_GROUPS()
 
+bld.SAMBA_MKVERSION('version.h')
+
 bld.ENABLE_MAGIC_ORDERING()
 
 bld.PREDECLARE('LIBNDR', 'LIBRARY')