diff --git a/samples/makefile.bcc b/samples/makefile.bcc
index cfa4b5ec8b..50733181a0 100644
--- a/samples/makefile.bcc
+++ b/samples/makefile.bcc
@@ -65,7 +65,7 @@ __propgrid___depname = propgrid
!if "$(USE_RIBBON)" == "1"
__ribbon___depname = ribbon
!endif
-!if "$(USE_HTML)" == "1"
+!if "$(USE_HTML)" == "1" && "$(USE_RICHTEXT)" == "1"
__richtext___depname = richtext
!endif
!if "$(USE_MEDIA)" == "1"
@@ -743,7 +743,7 @@ ribbon:
@del ribbon.bat
!endif
-!if "$(USE_HTML)" == "1"
+!if "$(USE_HTML)" == "1" && "$(USE_RICHTEXT)" == "1"
richtext:
@echo cd richtext >richtext.bat
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >>richtext.bat
diff --git a/samples/makefile.gcc b/samples/makefile.gcc
index 61dca8f853..5e025033b7 100644
--- a/samples/makefile.gcc
+++ b/samples/makefile.gcc
@@ -59,8 +59,10 @@ ifeq ($(USE_RIBBON),1)
__ribbon___depname = ribbon
endif
ifeq ($(USE_HTML),1)
+ifeq ($(USE_RICHTEXT),1)
__richtext___depname = richtext
endif
+endif
ifeq ($(USE_MEDIA),1)
__splash___depname = splash
endif
@@ -336,9 +338,11 @@ ribbon:
endif
ifeq ($(USE_HTML),1)
+ifeq ($(USE_RICHTEXT),1)
richtext:
$(MAKE) -C richtext -f makefile.gcc $(MAKEARGS) all
endif
+endif
sashtest:
$(MAKE) -C sashtest -f makefile.gcc $(MAKEARGS) all
diff --git a/samples/makefile.vc b/samples/makefile.vc
index ec579b6054..0ed48b37d9 100644
--- a/samples/makefile.vc
+++ b/samples/makefile.vc
@@ -56,7 +56,7 @@ __propgrid___depname = sub_propgrid
!if "$(USE_RIBBON)" == "1"
__ribbon___depname = sub_ribbon
!endif
-!if "$(USE_HTML)" == "1"
+!if "$(USE_HTML)" == "1" && "$(USE_RICHTEXT)" == "1"
__richtext___depname = sub_richtext
!endif
!if "$(USE_MEDIA)" == "1"
@@ -606,7 +606,7 @@ sub_ribbon:
cd "$(MAKEDIR)"
!endif
-!if "$(USE_HTML)" == "1"
+!if "$(USE_HTML)" == "1" && "$(USE_RICHTEXT)" == "1"
sub_richtext:
cd richtext
$(MAKE) -f makefile.vc $(MAKEARGS) all
diff --git a/samples/samples.bkl b/samples/samples.bkl
index a2b44759b5..7cb2e0c249 100644
--- a/samples/samples.bkl
+++ b/samples/samples.bkl
@@ -65,7 +65,7 @@
-
+