summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/wscript2
-rw-r--r--codepages/wscript_build2
-rw-r--r--lib/async_req/wscript_build2
-rw-r--r--lib/crypto/wscript_build2
-rw-r--r--lib/nss_wrapper/wscript2
-rw-r--r--lib/nss_wrapper/wscript_build2
-rw-r--r--lib/popt/wscript2
-rw-r--r--lib/replace/system/wscript_configure2
-rw-r--r--lib/replace/wscript2
-rw-r--r--lib/smbconf/wscript_build2
-rw-r--r--lib/socket_wrapper/wscript2
-rw-r--r--lib/socket_wrapper/wscript_build2
-rw-r--r--lib/subunit/python/wscript_build2
-rw-r--r--lib/talloc/wscript2
-rw-r--r--lib/tdb/wscript2
-rw-r--r--lib/tdr/wscript_build2
-rw-r--r--lib/tevent/wscript2
-rw-r--r--lib/torture/wscript_build2
-rw-r--r--lib/tsocket/wscript_build2
-rw-r--r--lib/uid_wrapper/wscript2
-rw-r--r--lib/uid_wrapper/wscript_build2
-rw-r--r--lib/util/charset/wscript_build2
-rw-r--r--lib/util/charset/wscript_configure2
-rw-r--r--lib/util/wscript_build2
-rw-r--r--lib/util/wscript_configure2
-rw-r--r--lib/zlib/wscript2
-rw-r--r--libcli/auth/wscript_build2
-rw-r--r--libcli/cldap/wscript_build2
-rw-r--r--libcli/drsuapi/wscript_build2
-rw-r--r--libcli/ldap/wscript_build2
-rw-r--r--libcli/named_pipe_auth/wscript_build2
-rw-r--r--libcli/nbt/wscript_build2
-rw-r--r--libcli/samsync/wscript_build2
-rw-r--r--libcli/security/wscript_build2
-rw-r--r--libcli/smb/wscript_build2
-rw-r--r--libgpo/wscript_build2
-rw-r--r--librpc/idl/wscript_build2
-rw-r--r--librpc/wscript_build2
-rw-r--r--nsswitch/libwbclient/wscript_build2
-rw-r--r--nsswitch/wscript_build2
-rw-r--r--nsswitch/wscript_configure2
-rw-r--r--pidl/lib/wscript_build2
-rw-r--r--pidl/wscript2
-rw-r--r--source3/build/wscript2
-rw-r--r--source3/wscript_build2
-rw-r--r--source4/auth/credentials/wscript_build2
-rw-r--r--source4/auth/gensec/wscript_build2
-rw-r--r--source4/auth/kerberos/wscript_build2
-rw-r--r--source4/auth/ntlm/wscript_build2
-rw-r--r--source4/auth/ntlmssp/wscript_build2
-rw-r--r--source4/auth/wscript_build2
-rw-r--r--source4/auth/wscript_configure2
-rw-r--r--source4/cldap_server/wscript_build2
-rw-r--r--source4/client/wscript_build2
-rw-r--r--source4/cluster/wscript_build2
-rw-r--r--source4/dsdb/samdb/ldb_modules/wscript_build2
-rw-r--r--source4/dsdb/wscript_build2
-rw-r--r--source4/dynconfig/wscript2
-rw-r--r--source4/heimdal_build/wscript_build2
-rw-r--r--source4/heimdal_build/wscript_configure2
-rw-r--r--source4/kdc/wscript_build2
-rw-r--r--source4/ldap_server/wscript_build2
-rw-r--r--source4/lib/cmdline/wscript_build2
-rw-r--r--source4/lib/com/wscript_build2
-rw-r--r--source4/lib/events/wscript_build2
-rw-r--r--source4/lib/ldb-samba/wscript_build2
-rw-r--r--source4/lib/ldb/wscript2
-rw-r--r--source4/lib/messaging/wscript_build2
-rw-r--r--source4/lib/registry/wscript_build2
-rw-r--r--source4/lib/samba3/wscript_build2
-rw-r--r--source4/lib/smbreadline/wscript_build2
-rw-r--r--source4/lib/smbreadline/wscript_configure2
-rw-r--r--source4/lib/socket/wscript_build2
-rw-r--r--source4/lib/stream/wscript_build2
-rw-r--r--source4/lib/tls/wscript2
-rw-r--r--source4/lib/wmi/wscript_build2
-rw-r--r--source4/lib/wscript_build2
-rw-r--r--source4/libcli/ldap/wscript_build2
-rw-r--r--source4/libcli/security/wscript_build2
-rw-r--r--source4/libcli/smb2/wscript_build2
-rw-r--r--source4/libcli/wbclient/wscript_build2
-rw-r--r--source4/libcli/wscript_build2
-rw-r--r--source4/libnet/wscript_build2
-rw-r--r--source4/librpc/idl/wscript_build2
-rw-r--r--source4/librpc/wscript_build2
-rw-r--r--source4/nbt_server/wscript_build2
-rw-r--r--source4/ntp_signd/wscript_build2
-rw-r--r--source4/ntptr/wscript_build2
-rw-r--r--source4/ntvfs/common/wscript_build2
-rw-r--r--source4/ntvfs/posix/wscript_build2
-rw-r--r--source4/ntvfs/sysdep/wscript_build2
-rw-r--r--source4/ntvfs/sysdep/wscript_configure2
-rw-r--r--source4/ntvfs/unixuid/wscript_build2
-rw-r--r--source4/ntvfs/wscript_build2
-rw-r--r--source4/param/wscript_build2
-rw-r--r--source4/rpc_server/wscript_build2
-rw-r--r--source4/scripting/python/samba_external/wscript_build2
-rw-r--r--source4/scripting/python/wscript2
-rw-r--r--source4/scripting/python/wscript_build2
-rw-r--r--source4/scripting/wscript_build2
-rw-r--r--source4/selftest/wscript2
-rw-r--r--source4/setup/wscript_build2
-rw-r--r--source4/smb_server/smb/wscript_build2
-rw-r--r--source4/smb_server/smb2/wscript_build2
-rw-r--r--source4/smb_server/wscript_build2
-rw-r--r--source4/smbd/wscript_build2
-rw-r--r--source4/torture/drs/wscript_build2
-rw-r--r--source4/torture/libnetapi/wscript_build2
-rw-r--r--source4/torture/libsmbclient/wscript_build2
-rw-r--r--source4/torture/local/wscript_build2
-rw-r--r--source4/torture/smb2/wscript_build2
-rw-r--r--source4/torture/winbind/wscript_build2
-rw-r--r--source4/torture/wscript_build2
-rw-r--r--source4/utils/net/wscript_build2
-rw-r--r--source4/utils/wscript_build2
-rw-r--r--source4/web_server/wscript_build2
-rw-r--r--source4/winbind/wscript_build2
-rw-r--r--source4/wrepl_server/wscript_build2
-rw-r--r--source4/wscript_build2
119 files changed, 238 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index f657b6d96a..563aa52ee0 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# this is a base set of waf rules that everything else pulls in first
import sys, wafsamba
diff --git a/codepages/wscript_build b/codepages/wscript_build
index b3eafcc8dc..416c580054 100644
--- a/codepages/wscript_build
+++ b/codepages/wscript_build
@@ -1 +1,3 @@
+#!/usr/bin/env python
+
bld.INSTALL_WILDCARD('${DATAROOTDIR}', '*.dat')
diff --git a/lib/async_req/wscript_build b/lib/async_req/wscript_build
index 201afbb145..1999a1a7ef 100644
--- a/lib/async_req/wscript_build
+++ b/lib/async_req/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/async_req/config.mk
# Please remove this notice if hand editing
diff --git a/lib/crypto/wscript_build b/lib/crypto/wscript_build
index 521cc9006a..1b6a03d32e 100644
--- a/lib/crypto/wscript_build
+++ b/lib/crypto/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('LIBCRYPTO',
source='crc32.c md5.c hmacmd5.c md4.c arcfour.c sha256.c hmacsha256.c aes.c rijndael-alg-fst.c',
deps='talloc'
diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript
index ee95e7bbd9..c6e8e0d306 100644
--- a/lib/nss_wrapper/wscript
+++ b/lib/nss_wrapper/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import Options
def set_options(opt):
diff --git a/lib/nss_wrapper/wscript_build b/lib/nss_wrapper/wscript_build
index c1e5b9c66d..f026ec615d 100644
--- a/lib/nss_wrapper/wscript_build
+++ b/lib/nss_wrapper/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/nss_wrapper/config.mk
# Please remove this notice if hand editing
diff --git a/lib/popt/wscript b/lib/popt/wscript
index af432c4d4e..88eed81c92 100644
--- a/lib/popt/wscript
+++ b/lib/popt/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import Options
def set_options(opt):
diff --git a/lib/replace/system/wscript_configure b/lib/replace/system/wscript_configure
index 410af09815..2035474b32 100644
--- a/lib/replace/system/wscript_configure
+++ b/lib/replace/system/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
conf.CHECK_HEADERS('sys/capability.h')
conf.CHECK_FUNCS('getpwnam_r getpwuid_r getpwent_r')
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 57b6e22e3f..b10db87054 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
srcdir = '../..'
blddir = 'bin'
diff --git a/lib/smbconf/wscript_build b/lib/smbconf/wscript_build
index aa8a3c676d..f47d05144f 100644
--- a/lib/smbconf/wscript_build
+++ b/lib/smbconf/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/smbconf/config.mk
# Please remove this notice if hand editing
diff --git a/lib/socket_wrapper/wscript b/lib/socket_wrapper/wscript
index edd7af69f4..f4fdff2ab9 100644
--- a/lib/socket_wrapper/wscript
+++ b/lib/socket_wrapper/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import Options
def set_options(opt):
diff --git a/lib/socket_wrapper/wscript_build b/lib/socket_wrapper/wscript_build
index f99df97866..d5ca1107a6 100644
--- a/lib/socket_wrapper/wscript_build
+++ b/lib/socket_wrapper/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('SOCKET_WRAPPER',
source='socket_wrapper.c'
)
diff --git a/lib/subunit/python/wscript_build b/lib/subunit/python/wscript_build
index a4d1bec301..7e53d17ba5 100644
--- a/lib/subunit/python/wscript_build
+++ b/lib/subunit/python/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# install out various python scripts for use by make test
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index ad2a38e9f0..33c77a8832 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
VERSION = '2.0.1'
srcdir = '../..'
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index b8927973a0..39ea7b18d2 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
VERSION='1.2.1'
srcdir = '../..'
diff --git a/lib/tdr/wscript_build b/lib/tdr/wscript_build
index 29e7e158ff..3706d21dfd 100644
--- a/lib/tdr/wscript_build
+++ b/lib/tdr/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/tdr/config.mk
# Please remove this notice if hand editing
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index 6d7414addb..1ac503e31d 100644
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
VERSION = '0.9.8'
srcdir = '../..'
diff --git a/lib/torture/wscript_build b/lib/torture/wscript_build
index fa5fd3b062..2069a92200 100644
--- a/lib/torture/wscript_build
+++ b/lib/torture/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/torture/config.mk
# Please remove this notice if hand editing
diff --git a/lib/tsocket/wscript_build b/lib/tsocket/wscript_build
index 341782d7b5..fc443e98a6 100644
--- a/lib/tsocket/wscript_build
+++ b/lib/tsocket/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/tsocket/config.mk
# Please remove this notice if hand editing
diff --git a/lib/uid_wrapper/wscript b/lib/uid_wrapper/wscript
index 2ca2af6648..0937176c1f 100644
--- a/lib/uid_wrapper/wscript
+++ b/lib/uid_wrapper/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import Options
def set_options(opt):
diff --git a/lib/uid_wrapper/wscript_build b/lib/uid_wrapper/wscript_build
index f13b3e739c..79fb6cd335 100644
--- a/lib/uid_wrapper/wscript_build
+++ b/lib/uid_wrapper/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/uid_wrapper/config.mk
# Please remove this notice if hand editing
diff --git a/lib/util/charset/wscript_build b/lib/util/charset/wscript_build
index 880c4dd9e8..c5824d8144 100644
--- a/lib/util/charset/wscript_build
+++ b/lib/util/charset/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../lib/util/charset/config.mk
# Please remove this notice if hand editing
diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
index fe99600803..274a2d7630 100644
--- a/lib/util/charset/wscript_configure
+++ b/lib/util/charset/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# rather strangely, we need to look for libiconv before checking libc
# as the external libiconv can use a macro to override iconv_open to libiconv_open
# and then we may find the wrong iconv.h later due to other packages looking
diff --git a/lib/util/wscript_build b/lib/util/wscript_build
index 0cd701dbd1..57ac729f47 100644
--- a/lib/util/wscript_build
+++ b/lib/util/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_LIBRARY('LIBSAMBA-UTIL',
source='xfile.c debug.c fault.c signal.c system.c time.c genrand.c dprintf.c util_str.c rfc1738.c substitute.c util_strlist.c util_file.c data_blob.c util.c blocking.c util_net.c fsusage.c ms_fnmatch.c mutex.c idtree.c become_daemon.c rbtree.c talloc_stack.c smb_threads.c params.c parmlist.c util_id.c',
public_deps='talloc LIBCRYPTO LIBREPLACE_NETWORK CHARSET execinfo UID_WRAPPER',
diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure
index e7a2cb64a4..8bd196f8d3 100644
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# backtrace could be in libexecinfo or in libc
conf.CHECK_FUNCS_IN('backtrace', 'execinfo', checklibc=True, headers='execinfo.h')
diff --git a/lib/zlib/wscript b/lib/zlib/wscript
index 51e4690869..306a55b5a2 100644
--- a/lib/zlib/wscript
+++ b/lib/zlib/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
def configure(conf):
conf.CHECK_HEADERS('zlib.h')
conf.CHECK_FUNCS_IN('zlibVersion', 'z')
diff --git a/libcli/auth/wscript_build b/libcli/auth/wscript_build
index f0af6df6ae..fb27bb2e0c 100644
--- a/libcli/auth/wscript_build
+++ b/libcli/auth/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('ntlm_check',
source='ntlm_check.c',
deps='LIBSAMBA-UTIL'
diff --git a/libcli/cldap/wscript_build b/libcli/cldap/wscript_build
index 5b9bcbd145..f4c0955a46 100644
--- a/libcli/cldap/wscript_build
+++ b/libcli/cldap/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../libcli/cldap/config.mk
# Please remove this notice if hand editing
diff --git a/libcli/drsuapi/wscript_build b/libcli/drsuapi/wscript_build
index 8d4878968c..2690677fc0 100644
--- a/libcli/drsuapi/wscript_build
+++ b/libcli/drsuapi/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../libcli/drsuapi/config.mk
# Please remove this notice if hand editing
diff --git a/libcli/ldap/wscript_build b/libcli/ldap/wscript_build
index 923d57f00b..61c2f40969 100644
--- a/libcli/ldap/wscript_build
+++ b/libcli/ldap/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('LIBCLI_LDAP_MESSAGE',
source='ldap_message.c',
public_deps='LIBSAMBA-ERRORS talloc ldb',
diff --git a/libcli/named_pipe_auth/wscript_build b/libcli/named_pipe_auth/wscript_build
index 146afd7e20..53d3b9d60a 100644
--- a/libcli/named_pipe_auth/wscript_build
+++ b/libcli/named_pipe_auth/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../libcli/named_pipe_auth/config.mk
# Please remove this notice if hand editing
diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build
index 979ef53f30..7da0706d95 100644
--- a/libcli/nbt/wscript_build
+++ b/libcli/nbt/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../libcli/nbt/config.mk
# Please remove this notice if hand editing
diff --git a/libcli/samsync/wscript_build b/libcli/samsync/wscript_build
index ad4f93d44f..8d1107b04b 100644
--- a/libcli/samsync/wscript_build
+++ b/libcli/samsync/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../libcli/samsync/config.mk
# Please remove this notice if hand editing
diff --git a/libcli/security/wscript_build b/libcli/security/wscript_build
index 5bf24e4786..d830be2004 100644
--- a/libcli/security/wscript_build
+++ b/libcli/security/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../libcli/security/config.mk
# Please remove this notice if hand editing
diff --git a/libcli/smb/wscript_build b/libcli/smb/wscript_build
index 0fc1df3062..aad7dd9adf 100644
--- a/libcli/smb/wscript_build
+++ b/libcli/smb/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../libcli/smb/config.mk
# Please remove this notice if hand editing
diff --git a/libgpo/wscript_build b/libgpo/wscript_build
index 0d7c3eccc0..06b037f4cf 100644
--- a/libgpo/wscript_build
+++ b/libgpo/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('LIBGPO',
source='gpo_util.c gpo_sec.c ../libgpo/gpext/gpext.c gpo_fetch.c gpo_ini.c ../source4/libgpo/ads_convenience.c ../source3/libgpo/gpo_filesync.c ../source4/libgpo/gpo_filesync.c',
deps='ldb LIBSAMBA-NET',
diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index ab0971068b..ae2883256c 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# note that we use symlink=True for the common IDL files.
# this is because the gen_ndr output is committed in git,
# and we don't want the result of a waf build to be a large
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 056c270146..1fee208397 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -1,2 +1,4 @@
+#!/usr/bin/env python
+
bld.BUILD_SUBDIR('idl')
diff --git a/nsswitch/libwbclient/wscript_build b/nsswitch/libwbclient/wscript_build
index 93892b9d59..432644624a 100644
--- a/nsswitch/libwbclient/wscript_build
+++ b/nsswitch/libwbclient/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../nsswitch/libwbclient/config.mk
# Please remove this notice if hand editing
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index 0af59358cd..760b86e01c 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../nsswitch/config.mk
# Please remove this notice if hand editing
diff --git a/nsswitch/wscript_configure b/nsswitch/wscript_configure
index 3305bbf44e..7d6ea82879 100644
--- a/nsswitch/wscript_configure
+++ b/nsswitch/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
conf.CHECK_HEADERS('nss.h nss_common.h ns_api.h')
conf.CHECK_HEADERS('security/pam_appl.h security/pam_modules.h pam/pam_modules.h', together=True)
diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
index 929cf4779b..eb5f1e0c37 100644
--- a/pidl/lib/wscript_build
+++ b/pidl/lib/wscript_build
@@ -1,2 +1,4 @@
+#!/usr/bin/env python
+
# install the pidl modules
bld.INSTALL_WILDCARD('${DATAROOTDIR}/perl5', '**/*.pm', flat=False)
diff --git a/pidl/wscript b/pidl/wscript
index 64ff63041f..fc722f87fa 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import os
def set_options(opt):
diff --git a/source3/build/wscript b/source3/build/wscript
index 67c6dc722b..a4df794f3a 100644
--- a/source3/build/wscript
+++ b/source3/build/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import Options
from dynconfig import *
diff --git a/source3/wscript_build b/source3/wscript_build
index 7da41d632e..34d7667325 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
from samba_utils import *
TDB_LIB_SRC = '''lib/util_tdb.c ../lib/util/util_tdb.c
diff --git a/source4/auth/credentials/wscript_build b/source4/auth/credentials/wscript_build
index bdd9fa529c..a6a5f75dca 100644
--- a/source4/auth/credentials/wscript_build
+++ b/source4/auth/credentials/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/auth/credentials/config.mk
# Please remove this notice if hand editing
diff --git a/source4/auth/gensec/wscript_build b/source4/auth/gensec/wscript_build
index fffc4045f7..19264d17c0 100644
--- a/source4/auth/gensec/wscript_build
+++ b/source4/auth/gensec/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_LIBRARY('gensec',
source='gensec.c socket.c',
pc_files='gensec.pc',
diff --git a/source4/auth/kerberos/wscript_build b/source4/auth/kerberos/wscript_build
index 77f9799a8b..688211ed6e 100644
--- a/source4/auth/kerberos/wscript_build
+++ b/source4/auth/kerberos/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/auth/kerberos/config.mk
# Please remove this notice if hand editing
diff --git a/source4/auth/ntlm/wscript_build b/source4/auth/ntlm/wscript_build
index 4fd12cbbb9..611d678635 100644
--- a/source4/auth/ntlm/wscript_build
+++ b/source4/auth/ntlm/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_MODULE('auth_sam_module',
source='auth_sam.c',
subsystem='auth',
diff --git a/source4/auth/ntlmssp/wscript_build b/source4/auth/ntlmssp/wscript_build
index 3fbf254515..8ead66dcdc 100644
--- a/source4/auth/ntlmssp/wscript_build
+++ b/source4/auth/ntlmssp/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/auth/ntlmssp/config.mk
# Please remove this notice if hand editing
diff --git a/source4/auth/wscript_build b/source4/auth/wscript_build
index c7dfa8943c..ce4dc7b21e 100644
--- a/source4/auth/wscript_build
+++ b/source4/auth/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/auth/config.mk
# Please remove this notice if hand editing
diff --git a/source4/auth/wscript_configure b/source4/auth/wscript_configure
index c0ca7676c3..1d26cde139 100644
--- a/source4/auth/wscript_configure
+++ b/source4/auth/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
conf.CHECK_HEADERS('security/pam_appl.h')
conf.CHECK_FUNCS_IN('pam_start', 'pam', checklibc=True)
diff --git a/source4/cldap_server/wscript_build b/source4/cldap_server/wscript_build
index 3bdf2f236d..345165611e 100644
--- a/source4/cldap_server/wscript_build
+++ b/source4/cldap_server/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/cldap_server/config.mk
# Please remove this notice if hand editing
diff --git a/source4/client/wscript_build b/source4/client/wscript_build
index 6f5df10b58..ac409619f1 100644
--- a/source4/client/wscript_build
+++ b/source4/client/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_BINARY('smbclient',
source='client.c',
installdir='BINDIR',
diff --git a/source4/cluster/wscript_build b/source4/cluster/wscript_build
index fe909bc221..01edecc885 100644
--- a/source4/cluster/wscript_build
+++ b/source4/cluster/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/cluster/config.mk
# Please remove this notice if hand editing
diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build b/source4/dsdb/samdb/ldb_modules/wscript_build
index 76503ef82b..1f464240a4 100644
--- a/source4/dsdb/samdb/ldb_modules/wscript_build
+++ b/source4/dsdb/samdb/ldb_modules/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('DSDB_MODULE_HELPERS',
source='util.c ridalloc.c',
autoproto='util_proto.h',
diff --git a/source4/dsdb/wscript_build b/source4/dsdb/wscript_build
index 0699dfdd28..99b91a89f9 100644
--- a/source4/dsdb/wscript_build
+++ b/source4/dsdb/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/dsdb/config.mk
# Please remove this notice if hand editing
diff --git a/source4/dynconfig/wscript b/source4/dynconfig/wscript
index b676069d9b..a0fc994258 100644
--- a/source4/dynconfig/wscript
+++ b/source4/dynconfig/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import string, Utils, Options
# list of directory options to offer in configure
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index 5240206e0d..6012c3c81f 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_GENERATOR(
name="HEIMDAL_ERRORLIST",
rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index d3a2cb7253..a887636803 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
conf.CHECK_TYPE('u_char', 'uint8_t')
conf.CHECK_TYPE('u_int32_t', 'uint32_t')
diff --git a/source4/kdc/wscript_build b/source4/kdc/wscript_build
index 6e35e72262..bbfc701739 100644
--- a/source4/kdc/wscript_build
+++ b/source4/kdc/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_MODULE('KDC',
source='kdc.c kpasswdd.c',
subsystem='service',
diff --git a/source4/ldap_server/wscript_build b/source4/ldap_server/wscript_build
index a92cacc716..0e56c3ee2a 100644
--- a/source4/ldap_server/wscript_build
+++ b/source4/ldap_server/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/ldap_server/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/cmdline/wscript_build b/source4/lib/cmdline/wscript_build
index 660f471bb6..4494c7d2eb 100644
--- a/source4/lib/cmdline/wscript_build
+++ b/source4/lib/cmdline/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('LIBCMDLINE_CREDENTIALS',
source='credentials.c',
autoproto='credentials.h',
diff --git a/source4/lib/com/wscript_build b/source4/lib/com/wscript_build
index d836904c16..9d962e16a5 100644
--- a/source4/lib/com/wscript_build
+++ b/source4/lib/com/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('COM',
source='tables.c rot.c main.c',
deps='LIBSAMBA-UTIL LIBSAMBA-HOSTCONFIG LIBEVENTS LIBNDR PIDL_DCOM'
diff --git a/source4/lib/events/wscript_build b/source4/lib/events/wscript_build
index 14cc9c8195..49328e8fa6 100644
--- a/source4/lib/events/wscript_build
+++ b/source4/lib/events/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/events/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/ldb-samba/wscript_build b/source4/lib/ldb-samba/wscript_build
index f0dd7b3a78..852e971a4e 100644
--- a/source4/lib/ldb-samba/wscript_build
+++ b/source4/lib/ldb-samba/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/ldb-samba/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript
index 58b3e4b93a..988f95a8cd 100644
--- a/source4/lib/ldb/wscript
+++ b/source4/lib/ldb/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
VERSION = '0.9.10'
srcdir = '../../..'
diff --git a/source4/lib/messaging/wscript_build b/source4/lib/messaging/wscript_build
index ba98321b01..203fd8e5a1 100644
--- a/source4/lib/messaging/wscript_build
+++ b/source4/lib/messaging/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/messaging/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/registry/wscript_build b/source4/lib/registry/wscript_build
index 5c1f03057d..16276674f6 100644
--- a/source4/lib/registry/wscript_build
+++ b/source4/lib/registry/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_PIDL('PIDL_REG',
source='regf.idl',
options='--header --tdr-parser')
diff --git a/source4/lib/samba3/wscript_build b/source4/lib/samba3/wscript_build
index 51a511e8e1..393f549b56 100644
--- a/source4/lib/samba3/wscript_build
+++ b/source4/lib/samba3/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/samba3/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/smbreadline/wscript_build b/source4/lib/smbreadline/wscript_build
index 15a746060c..c0aacab076 100644
--- a/source4/lib/smbreadline/wscript_build
+++ b/source4/lib/smbreadline/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
termlib=bld.env.READLINE_TERMLIB or ''
diff --git a/source4/lib/smbreadline/wscript_configure b/source4/lib/smbreadline/wscript_configure
index d89c357cec..76273ddc23 100644
--- a/source4/lib/smbreadline/wscript_configure
+++ b/source4/lib/smbreadline/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
diff --git a/source4/lib/socket/wscript_build b/source4/lib/socket/wscript_build
index 7e456a8391..fdbc96ff09 100644
--- a/source4/lib/socket/wscript_build
+++ b/source4/lib/socket/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/socket/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/stream/wscript_build b/source4/lib/stream/wscript_build
index cf7d5f2a43..6ef6d30fa8 100644
--- a/source4/lib/stream/wscript_build
+++ b/source4/lib/stream/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/stream/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/tls/wscript b/source4/lib/tls/wscript
index 020f2502fd..8b6f782028 100644
--- a/source4/lib/tls/wscript
+++ b/source4/lib/tls/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import Options
from optparse import SUPPRESS_HELP
diff --git a/source4/lib/wmi/wscript_build b/source4/lib/wmi/wscript_build
index f8f641def0..04ef860d67 100644
--- a/source4/lib/wmi/wscript_build
+++ b/source4/lib/wmi/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/wmi/config.mk
# Please remove this notice if hand editing
diff --git a/source4/lib/wscript_build b/source4/lib/wscript_build
index e2c77b25e1..51c8f4f3eb 100644
--- a/source4/lib/wscript_build
+++ b/source4/lib/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/lib/basic.mk
# Please remove this notice if hand editing
diff --git a/source4/libcli/ldap/wscript_build b/source4/libcli/ldap/wscript_build
index 3ed3627dc1..47372d713c 100644
--- a/source4/libcli/ldap/wscript_build
+++ b/source4/libcli/ldap/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('LIBCLI_LDAP',
source='ldap_client.c ldap_bind.c ldap_ildap.c ldap_controls.c',
autoproto='ldap_proto.h',
diff --git a/source4/libcli/security/wscript_build b/source4/libcli/security/wscript_build
index f2236a4a9c..22747368c2 100644
--- a/source4/libcli/security/wscript_build
+++ b/source4/libcli/security/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/libcli/security/config.mk
# Please remove this notice if hand editing
diff --git a/source4/libcli/smb2/wscript_build b/source4/libcli/smb2/wscript_build
index a7cecab377..81a2f7db7e 100644
--- a/source4/libcli/smb2/wscript_build
+++ b/source4/libcli/smb2/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/libcli/smb2/config.mk
# Please remove this notice if hand editing
diff --git a/source4/libcli/wbclient/wscript_build b/source4/libcli/wbclient/wscript_build
index 6bf5b15c6d..600a66cc9b 100644
--- a/source4/libcli/wbclient/wscript_build
+++ b/source4/libcli/wbclient/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/libcli/wbclient/config.mk
# Please remove this notice if hand editing
diff --git a/source4/libcli/wscript_build b/source4/libcli/wscript_build
index 7c4505c261..d06ab4d755 100644
--- a/source4/libcli/wscript_build
+++ b/source4/libcli/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.BUILD_SUBDIR('ldap')
bld.BUILD_SUBDIR('security')
bld.BUILD_SUBDIR('wbclient')
diff --git a/source4/libnet/wscript_build b/source4/libnet/wscript_build
index b55b7fe84f..17a2eb29c6 100644
--- a/source4/libnet/wscript_build
+++ b/source4/libnet/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/libnet/config.mk
# Please remove this notice if hand editing
diff --git a/source4/librpc/idl/wscript_build b/source4/librpc/idl/wscript_build
index 8ce4b4cefd..0fcb420cbe 100644
--- a/source4/librpc/idl/wscript_build
+++ b/source4/librpc/idl/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_PIDL_LIST('PIDL',
source='''irpc.idl nfs4acl.idl notify.idl ntp_signd.idl
opendb.idl sasl_helpers.idl server_id.idl winbind.idl
diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build
index 4a57091eb4..5328d1da2c 100644
--- a/source4/librpc/wscript_build
+++ b/source4/librpc/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.BUILD_SUBDIR('../../librpc/idl')
bld.BUILD_SUBDIR('idl')
diff --git a/source4/nbt_server/wscript_build b/source4/nbt_server/wscript_build
index d1928203c4..20c00a7067 100644
--- a/source4/nbt_server/wscript_build
+++ b/source4/nbt_server/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/nbt_server/config.mk
# Please remove this notice if hand editing
diff --git a/source4/ntp_signd/wscript_build b/source4/ntp_signd/wscript_build
index 16dec88f53..5422464429 100644
--- a/source4/ntp_signd/wscript_build
+++ b/source4/ntp_signd/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/ntp_signd/config.mk
# Please remove this notice if hand editing
diff --git a/source4/ntptr/wscript_build b/source4/ntptr/wscript_build
index 3282e8693f..7f59e5e0eb 100644
--- a/source4/ntptr/wscript_build
+++ b/source4/ntptr/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/ntptr/config.mk
# Please remove this notice if hand editing
diff --git a/source4/ntvfs/common/wscript_build b/source4/ntvfs/common/wscript_build
index 1ceb70e64e..2f7ec06774 100644
--- a/source4/ntvfs/common/wscript_build
+++ b/source4/ntvfs/common/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/ntvfs/common/config.mk
# Please remove this notice if hand editing
diff --git a/source4/ntvfs/posix/wscript_build b/source4/ntvfs/posix/wscript_build
index 070c2fb8f6..08b32980e7 100644
--- a/source4/ntvfs/posix/wscript_build
+++ b/source4/ntvfs/posix/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('pvfs_acl',
source='pvfs_acl.c',
autoproto='vfs_acl_proto.h'
diff --git a/source4/ntvfs/sysdep/wscript_build b/source4/ntvfs/sysdep/wscript_build
index eb9612936c..6f0cc521ad 100644
--- a/source4/ntvfs/sysdep/wscript_build
+++ b/source4/ntvfs/sysdep/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_MODULE('sys_notify_inotify',
source='inotify.c',
subsystem='sys_notify',
diff --git a/source4/ntvfs/sysdep/wscript_configure b/source4/ntvfs/sysdep/wscript_configure
index f1d572e527..f1e09ddd3d 100644
--- a/source4/ntvfs/sysdep/wscript_configure
+++ b/source4/ntvfs/sysdep/wscript_configure
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
conf.CHECK_HEADERS('linux/inotify.h asm/unistd.h sys/inotify.h', add_headers=False)
conf.CHECK_FUNCS('inotify_init')
diff --git a/source4/ntvfs/unixuid/wscript_build b/source4/ntvfs/unixuid/wscript_build
index c30c47e392..a40702e638 100644
--- a/source4/ntvfs/unixuid/wscript_build
+++ b/source4/ntvfs/unixuid/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/ntvfs/unixuid/config.mk
# Please remove this notice if hand editing
diff --git a/source4/ntvfs/wscript_build b/source4/ntvfs/wscript_build
index 7b4c10d8cc..a847b81c79 100644
--- a/source4/ntvfs/wscript_build
+++ b/source4/ntvfs/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/ntvfs/config.mk
# Please remove this notice if hand editing
diff --git a/source4/param/wscript_build b/source4/param/wscript_build
index 1da3b475e1..351dedfaf1 100644
--- a/source4/param/wscript_build
+++ b/source4/param/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_LIBRARY('LIBSAMBA-HOSTCONFIG',
source='loadparm.c generic.c util.c',
pc_files='samba-hostconfig.pc',
diff --git a/source4/rpc_server/wscript_build b/source4/rpc_server/wscript_build
index 841554abfc..f2808a4a23 100644
--- a/source4/rpc_server/wscript_build
+++ b/source4/rpc_server/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_SUBSYSTEM('DCERPC_COMMON',
source='common/server_info.c common/share_info.c common/forward.c',
autoproto='common/proto.h',
diff --git a/source4/scripting/python/samba_external/wscript_build b/source4/scripting/python/samba_external/wscript_build
index fcb2135e27..45e00d062a 100644
--- a/source4/scripting/python/samba_external/wscript_build
+++ b/source4/scripting/python/samba_external/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# work out what external modules need to be installed
external_list = []
try:
diff --git a/source4/scripting/python/wscript b/source4/scripting/python/wscript
index 3dd35b6a29..14e924b378 100644
--- a/source4/scripting/python/wscript
+++ b/source4/scripting/python/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
def set_options(opt):
# enable options related to building python extensions
opt.tool_options('python') # options for disabling pyc or pyo compilation
diff --git a/source4/scripting/python/wscript_build b/source4/scripting/python/wscript_build
index 6d2fe9204c..0d0fabd54e 100644
--- a/source4/scripting/python/wscript_build
+++ b/source4/scripting/python/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_PYTHON('LIBPYTHON',
source='modules.c',
public_deps='EXT_LIB_PYTHON',
diff --git a/source4/scripting/wscript_build b/source4/scripting/wscript_build
index 94928deb0e..d48f24c681 100644
--- a/source4/scripting/wscript_build
+++ b/source4/scripting/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.INSTALL_FILES('${SBINDIR}','bin/upgradeprovision bin/samba_dnsupdate',
chmod=0755, python_fixup=True, flat=True)
diff --git a/source4/selftest/wscript b/source4/selftest/wscript
index 7ecb6bab36..b588648af9 100644
--- a/source4/selftest/wscript
+++ b/source4/selftest/wscript
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# selftest main code.
import Scripting, os, Options, Utils, Environment, optparse, sys
diff --git a/source4/setup/wscript_build b/source4/setup/wscript_build
index 06ce1cccd4..ea06750aee 100644
--- a/source4/setup/wscript_build
+++ b/source4/setup/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.INSTALL_WILDCARD('${SETUPDIR}', 'ad-schema/*.txt')
bld.INSTALL_WILDCARD('${SETUPDIR}', 'display-specifiers/*.txt')
diff --git a/source4/smb_server/smb/wscript_build b/source4/smb_server/smb/wscript_build
index 522fc856bc..fc806266f3 100644
--- a/source4/smb_server/smb/wscript_build
+++ b/source4/smb_server/smb/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/smb_server/smb/config.mk
# Please remove this notice if hand editing
diff --git a/source4/smb_server/smb2/wscript_build b/source4/smb_server/smb2/wscript_build
index 698bc9c52d..5d662bfb46 100644
--- a/source4/smb_server/smb2/wscript_build
+++ b/source4/smb_server/smb2/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/smb_server/smb2/config.mk
# Please remove this notice if hand editing
diff --git a/source4/smb_server/wscript_build b/source4/smb_server/wscript_build
index 689ff94f20..ca1739accb 100644
--- a/source4/smb_server/wscript_build
+++ b/source4/smb_server/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/smb_server/config.mk
# Please remove this notice if hand editing
diff --git a/source4/smbd/wscript_build b/source4/smbd/wscript_build
index c92e85d07f..da49ddb8a4 100644
--- a/source4/smbd/wscript_build
+++ b/source4/smbd/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/smbd/config.mk
# Please remove this notice if hand editing
diff --git a/source4/torture/drs/wscript_build b/source4/torture/drs/wscript_build
index 4008ac9a41..9061015903 100644
--- a/source4/torture/drs/wscript_build
+++ b/source4/torture/drs/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/torture/drs/config.mk
# Please remove this notice if hand editing
diff --git a/source4/torture/libnetapi/wscript_build b/source4/torture/libnetapi/wscript_build
index bea5f06f9e..c1b116b95d 100644
--- a/source4/torture/libnetapi/wscript_build
+++ b/source4/torture/libnetapi/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/torture/libnetapi/config.mk
# Please remove this notice if hand editing
diff --git a/source4/torture/libsmbclient/wscript_build b/source4/torture/libsmbclient/wscript_build
index 6fd5e8d7a3..7588d37b1b 100644
--- a/source4/torture/libsmbclient/wscript_build
+++ b/source4/torture/libsmbclient/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/torture/libsmbclient/config.mk
# Please remove this notice if hand editing
diff --git a/source4/torture/local/wscript_build b/source4/torture/local/wscript_build
index 0047cfaac3..3c3c76e5c2 100644
--- a/source4/torture/local/wscript_build
+++ b/source4/torture/local/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_MODULE('TORTURE_LOCAL',
source='../../../lib/util/charset/tests/iconv.c ../../../lib/talloc/testsuite.c ../../../lib/replace/test/getifaddrs.c ../../../lib/replace/test/os2_delete.c ../../../lib/replace/test/strptime.c ../../../lib/replace/test/testsuite.c ../../lib/messaging/tests/messaging.c ../../lib/messaging/tests/irpc.c ../../librpc/tests/binding_string.c ../../../lib/util/tests/idtree.c ../../../lib/util/tests/dlinklist.c ../../lib/socket/testsuite.c ../../../lib/socket_wrapper/testsuite.c ../../../lib/nss_wrapper/testsuite.c ../../libcli/resolve/testsuite.c ../../../lib/util/tests/strlist.c ../../../lib/util/tests/parmlist.c ../../../lib/util/tests/str.c ../../../lib/util/tests/time.c ../../../lib/util/tests/asn1_tests.c ../../../lib/util/tests/data_blob.c ../../../lib/util/tests/file.c ../../../lib/util/tests/genrand.c ../../../lib/compression/testsuite.c ../../../lib/util/charset/tests/charset.c ../../libcli/security/tests/sddl.c ../../../lib/tdr/testsuite.c ../../../lib/tevent/testsuite.c ../../param/tests/share.c ../../param/tests/loadparm.c ../../auth/credentials/tests/simple.c local.c dbspeed.c torture.c ../ldb/ldb.c ../../dsdb/common/tests/dsdb_dn.c ../../dsdb/schema/tests/schema_syntax.c',
autoproto='proto.h',
diff --git a/source4/torture/smb2/wscript_build b/source4/torture/smb2/wscript_build
index 7d4f48813c..fae2ef9471 100644
--- a/source4/torture/smb2/wscript_build
+++ b/source4/torture/smb2/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/torture/smb2/config.mk
# Please remove this notice if hand editing
diff --git a/source4/torture/winbind/wscript_build b/source4/torture/winbind/wscript_build
index 4345b7bd0b..8fc4f0d3bf 100644
--- a/source4/torture/winbind/wscript_build
+++ b/source4/torture/winbind/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_MODULE('TORTURE_WINBIND',
source='winbind.c struct_based.c ../../../nsswitch/libwbclient/tests/wbclient.c',
autoproto='proto.h',
diff --git a/source4/torture/wscript_build b/source4/torture/wscript_build
index f4822a170c..aee3ff4179 100644
--- a/source4/torture/wscript_build
+++ b/source4/torture/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/torture/config.mk
# Please remove this notice if hand editing
diff --git a/source4/utils/net/wscript_build b/source4/utils/net/wscript_build
index ef31d0c3d3..9845be44cc 100644
--- a/source4/utils/net/wscript_build
+++ b/source4/utils/net/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_MODULE('net_drs',
source='drs/net_drs.c drs/net_drs_bind.c drs/net_drs_kcc.c drs/net_drs_replicate.c drs/net_drs_showrepl.c',
autoproto='drs/net_drs_proto.h',
diff --git a/source4/utils/wscript_build b/source4/utils/wscript_build
index d3ab255921..6e43425e98 100644
--- a/source4/utils/wscript_build
+++ b/source4/utils/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/utils/config.mk
# Please remove this notice if hand editing
diff --git a/source4/web_server/wscript_build b/source4/web_server/wscript_build
index 872554361e..ac2d63078e 100644
--- a/source4/web_server/wscript_build
+++ b/source4/web_server/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
bld.SAMBA_PYTHON('WEB_WSGI',
source='wsgi.c'
diff --git a/source4/winbind/wscript_build b/source4/winbind/wscript_build
index e0c44c35d1..22932b6cd1 100644
--- a/source4/winbind/wscript_build
+++ b/source4/winbind/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/winbind/config.mk
# Please remove this notice if hand editing
diff --git a/source4/wrepl_server/wscript_build b/source4/wrepl_server/wscript_build
index 4e0542b977..246e46590b 100644
--- a/source4/wrepl_server/wscript_build
+++ b/source4/wrepl_server/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# AUTOGENERATED by mktowscript.pl from ../../source4/wrepl_server/config.mk
# Please remove this notice if hand editing
diff --git a/source4/wscript_build b/source4/wscript_build
index 62b5cbaba3..90154336cd 100644
--- a/source4/wscript_build
+++ b/source4/wscript_build
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# top level waf build script for samba4
import os