Fix distclean to correctly handle Centos
[vpp.git] / build-root / Makefile
index f8b2105..a7d8943 100644 (file)
@@ -670,7 +670,7 @@ linux_n_cpus = `grep '^processor' /proc/cpuinfo | wc -l`
 MAKE_PARALLEL_JOBS =                           \
   -j $(shell                                   \
     if [ -f /proc/cpuinfo ] ; then             \
-      expr 4 '*' $(linux_n_cpus) ;             \
+      expr 2 '*' $(linux_n_cpus) ;             \
     else                                       \
       echo 1 ;                                 \
     fi)
@@ -1175,8 +1175,9 @@ distclean:
        rm -rf $(MU_BUILD_ROOT_DIR)/$(IMAGES_PREFIX)*
        rm -rf $(TOOL_INSTALL_DIR)
        rm -rf $(MU_BUILD_ROOT_DIR)/*.deb
+       rm -rf $(MU_BUILD_ROOT_DIR)/*.rpm
        rm -rf $(MU_BUILD_ROOT_DIR)/*.changes
-       (cd $(MU_BUILD_ROOT_DIR)/deb/;debian/rules clean)
+       if [ -e /usr/bin/dh ];then (cd $(MU_BUILD_ROOT_DIR)/deb/;debian/rules clean); fi
        rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.install
        rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.dkms
        rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/changelog