diff --git a/Makefile.in b/Makefile.in
index ee373324d..67ad88145 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -386,7 +386,7 @@ toc.txt: $(HDR_FILES:index.hdr=index.hdr.in) | show-SED
@echo " SED $(em)$@$(sgr0)"
$v rm -f toc.tmp $@
# Ugly hack to set the toc initial title for the main page
- $v echo '- fish shell documentation - $FISH_BUILD_VERSION' > toc.tmp
+ $v echo '- fish shell documentation - $(FISH_BUILD_VERSION)' > toc.tmp
# The first sed command captures the page name, followed by the description
# The second sed command captures the command name \1 and the description \2, but only up to a dash
# This is to reduce the size of the TOC in the command listing on the main page