EXTRA_DIST=
sphinxbuilddir=$(builddir)/_build
+# list of api files that are used to generate api.rst
+api_files1=$(shell cat api-files.txt)
+api_files=$(foreach af,$(api_files1), $(srcdir)/$(af))
+
if GENERATE_DOCS
sphinxopts=
mes_files1=$(shell cat mes-files.txt)
mes_files=$(foreach mf,$(mes_files1), $(top_srcdir)/$(mf))
-
-# list of api files that are used to generate api.rst
-api_files1=$(shell cat api-files.txt)
-api_files=$(foreach af,$(api_files1), $(srcdir)/$(af))
-
EXTRA_DIST+=mes-files.txt
EXTRA_DIST+=api-files.txt
EXTRA_DIST+=$(api_files)