diff --git a/Makefile b/Makefile
index b5dfe2fa455b72c0bd029122cdc129a71cbd5d66..8dc2541bd0f7b73aa2543c968915c5231d961006 100644
--- a/Makefile
+++ b/Makefile
@@ -65,9 +65,9 @@ MARKDOWN_SRC = \
   index.md \
   CONDUCT.md \
   setup.md \
-  $(wildcard _episodes/*.md) \
+  $(sort $(wildcard _episodes/*.md)) \
   reference.md \
-  $(wildcard _extras/*.md) \
+  $(sort $(wildcard _extras/*.md)) \
   LICENSE.md
 
 # Generated lesson files in the order they appear in the navigation menu.
@@ -75,9 +75,9 @@ HTML_DST = \
   ${DST}/index.html \
   ${DST}/conduct/index.html \
   ${DST}/setup/index.html \
-  $(patsubst _episodes/%.md,${DST}/%/index.html,$(wildcard _episodes/*.md)) \
+  $(patsubst _episodes/%.md,${DST}/%/index.html,$(sort $(wildcard _episodes/*.md))) \
   ${DST}/reference/index.html \
-  $(patsubst _extras/%.md,${DST}/%/index.html,$(wildcard _extras/*.md)) \
+  $(patsubst _extras/%.md,${DST}/%/index.html,$(sort $(wildcard _extras/*.md))) \
   ${DST}/license/index.html
 
 ## lesson-md        : convert Rmarkdown files to markdown