build: put config.h in top dir by default
authorAndrew Tridgell <tridge@samba.org>
Mon, 22 Feb 2010 21:30:28 +0000 (08:30 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:35 +0000 (20:26 +1000)
lib/replace/wafsamba.py

index 96e8e7645debfd201f5c854a2b30502a93c7519a..7796dc25bfa69bae2b1f4b23d03f12203f8695d0 100644 (file)
@@ -51,8 +51,12 @@ def CHECK_FUNCS_IN(conf, list, library):
 #################################################
 # write out config.h in the right directory
 @conf
-def SAMBA_CONFIG_H(conf, path='config.h'):
-    if os.path.normpath(conf.curdir) == os.path.normpath(os.environ.get('PWD')):
+def SAMBA_CONFIG_H(conf, path=None):
+    if os.path.normpath(conf.curdir) != os.path.normpath(os.environ.get('PWD')):
+        return
+    if path is None:
+        conf.write_config_header('config.h', top=True)
+    else:
         conf.write_config_header(path)