Export PATH to build environment
[senf.git] / SConstruct
index bc2e7a3..51008c1 100644 (file)
@@ -137,11 +137,12 @@ env.Append(
            'LOGNAME' : logname, # needed by the debian build scripts
            'CONCURRENCY_LEVEL' : env.GetOption('num_jobs') or "1",
            'SCONS' : 1,
+           'PATH' : os.environ.get('PATH')
          },
    LOCAL_CONFIG_FILES = [ 'Doxyfile.local', 'SConfig', 'local_config.hh' ],
    CONFIG_FILES_OPTS = configFilesOpts,
    CLEAN_PATTERNS = [ '*~', '#*#', '*.pyc', 'semantic.cache', '.sconsign', '.sconsign.dblite' ],
-   BUILDPACKAGE_COMMAND = "dpkg-buildpackage -us -uc -rfakeroot -I.svn $CONFIG_FILES_OPTS",
+   BUILDPACKAGE_COMMAND = "dpkg-buildpackage -us -uc -rfakeroot -I.svn -I_templates $CONFIG_FILES_OPTS",
    TOP_INCLUDES = [ 'Packets', 'PPI', 'Scheduler', 'Socket', 'Utils',
                     'config.hh', 'local_config.hh' ],
 )
@@ -153,7 +154,8 @@ env.SetDefault(
 Export('env')
 
 # Create Doxyfile.local otherwise doxygen will barf on this non-existent file
-if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"):
+# Create it even when cleaning, to silence the doxygen builder warnings
+if not os.path.exists("Doxyfile.local"):
     Execute(Touch("Doxyfile.local"))
 
 # Create local_config.h
@@ -214,7 +216,8 @@ env.Clean('all', [ os.path.join(path,f)
 PhonyTarget(env, 'deb', [
     checkLocalConf,
     updateRevision,
-    "$BUILDPACKAGE_COMMAND -tc",
+    "$BUILDPACKAGE_COMMAND",
+    "fakeroot ./debian/rules debclean"
 ])
 
 PhonyTarget(env, 'debsrc', [