build: Do not always regenerate the version.h file
authorAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2013 23:33:19 +0000 (09:33 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 May 2013 01:57:02 +0000 (11:57 +1000)
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
buildtools/wafsamba/samba_patterns.py

index 4db5eea7d69858f72f2952bb23546c508cf2fbb8..55ed540670c176f0b0c0f8ea60f870eaab5f28e1 100644 (file)
@@ -21,11 +21,15 @@ def write_version_header(task):
 
 def SAMBA_MKVERSION(bld, target):
     '''generate the version.h header for Samba'''
+
+    # We only force waf to re-generate this file if we are installing,
+    # because only then is information not included in the deps (the
+    # git revision) included in the version.
     t = bld.SAMBA_GENERATOR('VERSION',
                             rule=write_version_header,
                             source= 'VERSION',
                             target=target,
-                            always=True)
+                            always=bld.is_install)
     t.env.is_install = bld.is_install
 Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION