diff --git a/docs/users_guide/ghc.mk b/docs/users_guide/ghc.mk
index 4c8dc1b5077d383adc0b9a2bb88cc0395db01682..9cb7172a343fbc617206a769510073a28c8f0db7 100644
--- a/docs/users_guide/ghc.mk
+++ b/docs/users_guide/ghc.mk
@@ -26,6 +26,14 @@ $(eval $(call docbook,docs/users_guide,users_guide))
 build_ug_book = docs/users_guide/ug-book.xml
 src_ug_book  = $(dir $(realpath $(dir $(build_ug_book))/ug-book.xml.in))ug-book.xml
 
+html_docs/users_guide : docs/users_guide/users_guide/prof_scc.png
+
+docs/users_guide/users_guide/prof_scc.png : \
+		docs/users_guide/prof_scc.png \
+		docs/users_guide/users_guide/index.html
+	$(CP) $< $@
+# dep. on d/u/u/index.html is to make sure that the d/u/u dir is created first
+
 ifneq "$(build_ug_book)" "$(src_ug_book)"
 $(src_ug_book) : $(build_ug_book)
 	"$(CP)" $< $@
diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml
index 0138e57d818d217e16b95f30fef6a9985841fa46..4d6e835c251cca44349f635528c2ca99c7590782 100644
--- a/docs/users_guide/profiling.xml
+++ b/docs/users_guide/profiling.xml
@@ -280,7 +280,7 @@ main = do let xs = {-# SCC "X" #-} [1..1000000]
 
       <para>which gives this heap profile when run:</para>
 
-      <imagedata fileref="prof_scc"/>
+      <imagedata fileref="prof_scc.png"/>
 
     </sect2>