diff --git a/make.sh b/make.sh
index 4a9dd3cb6..909d4a4de 100755
--- a/make.sh
+++ b/make.sh
@@ -1895,6 +1895,41 @@ downloadsrc)
 	fi
 	cd - >/dev/null 2>&1
 	;;
+format-rootfile)
+	if [ ! -f $2 ]; then
+		echo -n "'$2' is not a regular file"
+		beautify message FAIL
+		exit 1
+	fi
+
+	ROOTFILE_TO_FORMAT="$2"
+
+	# Remove all .so files in /usr/lib
+	sed -i '/^\+usr\/lib\/.*\.so$/s/+/#/g' "$ROOTFILE_TO_FORMAT"
+
+	# Remove all .a files in /usr/lib
+	sed -i '/^\+usr\/lib\/.*\.a$/s/+/#/g' "$ROOTFILE_TO_FORMAT"
+
+
+	# Remove all .la files in /usr/lib
+	sed -i '/^\+usr\/lib\/.*\.la$/s/+/#/g' "$ROOTFILE_TO_FORMAT"
+
+	# Remove all .hpp files in /usr/include
+	sed -i '/^\+usr\/include\/.*\.hpp$/s/+/#/g' "$ROOTFILE_TO_FORMAT"
+
+	# Remove all .h files in /usr/include
+	sed -i '/^\+usr\/include\/.*\.h$/s/+/#/g' "$ROOTFILE_TO_FORMAT"
+
+	# Remove all .ipp files in /usr/include
+	sed -i '/^\+usr\/include\/.*\.ipp$/s/+/#/g' "$ROOTFILE_TO_FORMAT"
+
+	# Remove all .m4 files in /usr/share/aclocal
+	sed -i '/^\+usr\/share\/aclocal\/.*\.h$/s/+/#/g' "$ROOTFILE_TO_FORMAT"
+
+	# Remove all lines starting with -
+	sed -i '/^-.*$/d' "$ROOTFILE_TO_FORMAT"
+
+;;
 toolchain)
 	# Clear screen
 	${INTERACTIVE} && clear
@@ -1990,7 +2025,7 @@ find-dependencies)
 	exec "${BASEDIR}/tools/find-dependencies" "${BASEDIR}/build" "$@"
 	;;
 *)
-	echo "Usage: $0 {build|changelog|clean|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors|find-dependencies}"
+	echo "Usage: $0 {build|changelog|clean|format-rootfile|gettoolchain|downloadsrc|shell|sync|toolchain|update-contributors|find-dependencies}"
 	cat doc/make.sh-usage
 	;;
 esac
