Makefile.am: only build examples if documentation is also built
diff --git a/Makefile.am b/Makefile.am
index a31301c..120c6d8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,10 +26,10 @@
 	windows/test-parser/test-parser.vcproj				\
 	windows/test-tree/test-tree.vcproj windows/libtasn14win.mk
 
-SUBDIRS = gl lib src examples tests
+SUBDIRS = gl lib src tests
 
 if ENABLE_DOC
-SUBDIRS += doc
+SUBDIRS += doc examples
 endif
 
 ACLOCAL_AMFLAGS = -I m4 -I gl/m4 -I lib/glm4