diff --git a/buildPkg.R b/buildPkg.R
index c5d924b062793576818e18e8a2dfc25ea1488e77..785333db8a80f615dbbfc5d91657206bc1fb3542 100644
--- a/buildPkg.R
+++ b/buildPkg.R
@@ -39,6 +39,12 @@ build(manual = TRUE, vignettes = FALSE)
 # build the binary version for windows (not used)
 # build_win()
 
+##----------------------------------------------------------------------
+## Generate the README.md.
+
+library(knitr)
+knit(input="README.Rmd")
+
 ##----------------------------------------------------------------------
 ## Examples.