diff --git a/config.mak.uname b/config.mak.uname
index 7fd4bdf169e55b..648df18f5b2a4d 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -792,9 +792,11 @@ vcxproj:
sed -i '/^git_broken_path_fix ".*/d' git-sh-setup
git add -f $(SCRIPT_LIB) $(SCRIPTS)
+ifndef NO_PERL
# Add Perl module
$(MAKE) $(LIB_PERL_GEN)
git add -f perl/build
+endif
# Add bin-wrappers, for testing
rm -rf bin-wrappers/