diff --git a/build/lmake b/build/lmake
index 141056129791725196a3487d6909563f76bf0d7b..fd99ce89d17adf8afa6fe81fbfc0503b2bddd052 100755
--- a/build/lmake
+++ b/build/lmake
@@ -397,6 +397,9 @@ depend_kernel()
     echo "Making depend in $PWD..."
     $MAKE "$MAKE_CC" mrproper || fatal 1 "Error running make mrproper"
     rm -f rpm-release
+    # remove localversion-* files to avoid kernel release string 
+    # srewing up by the top-level Makefile
+    rm -f localversion-*
     cp "$CONFIG_FILE" .config
     local UPDATE_OLDCONFIG=
     for oc in oldconfig_nonint silentoldconfig oldconfig ; do