1*4882a593SmuzhiyunFrom b89b8475a5b2f9444c32f7d254b35968da3c8a23 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: "Yann E. MORIN" <yann.morin.1998@free.fr> 3*4882a593SmuzhiyunDate: Fri, 29 Sep 2017 18:03:51 +0200 4*4882a593SmuzhiyunSubject: [PATCH] build: make it possible to disable the build of the 5*4882a593Smuzhiyun documentation 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunWhen targetting embedded evices, the documentation is not needed. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunBuilding the documentation default to whether the program is built. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunSigned-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> 12*4882a593SmuzhiyunCc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 13*4882a593Smuzhiyun--- 14*4882a593Smuzhiyun Makefile.am | 8 +++++++- 15*4882a593Smuzhiyun configure.ac | 6 ++++++ 16*4882a593Smuzhiyun 2 files changed, 13 insertions(+), 1 deletion(-) 17*4882a593Smuzhiyun 18*4882a593Smuzhiyundiff --git a/Makefile.am b/Makefile.am 19*4882a593Smuzhiyunindex fce30b2..ee75b64 100644 20*4882a593Smuzhiyun--- a/Makefile.am 21*4882a593Smuzhiyun+++ b/Makefile.am 22*4882a593Smuzhiyun@@ -41,9 +41,15 @@ EXTRA_DIST = \ 23*4882a593Smuzhiyun .indent.pro \ 24*4882a593Smuzhiyun autogen.sh 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun+MAYBE_SUBDIRS = 27*4882a593Smuzhiyun+ 28*4882a593Smuzhiyun+if ENABLE_DOC 29*4882a593Smuzhiyun+MAYBE_SUBDIRS += doc 30*4882a593Smuzhiyun+endif 31*4882a593Smuzhiyun+ 32*4882a593Smuzhiyun SUBDIRS = \ 33*4882a593Smuzhiyun src \ 34*4882a593Smuzhiyun- doc \ 35*4882a593Smuzhiyun+ $(MAYBE_SUBDIRS) \ 36*4882a593Smuzhiyun examples \ 37*4882a593Smuzhiyun po \ 38*4882a593Smuzhiyun tests \ 39*4882a593Smuzhiyundiff --git a/configure.ac b/configure.ac 40*4882a593Smuzhiyunindex c54e98f..b3ae450 100644 41*4882a593Smuzhiyun--- a/configure.ac 42*4882a593Smuzhiyun+++ b/configure.ac 43*4882a593Smuzhiyun@@ -80,6 +80,12 @@ AC_ARG_ENABLE([program], 44*4882a593Smuzhiyun [], [enable_program=yes]) 45*4882a593Smuzhiyun AM_CONDITIONAL([ENABLE_PROGRAM], [test "x$enable_program" = xyes]) 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun+AC_ARG_ENABLE([doc], 48*4882a593Smuzhiyun+ [AS_HELP_STRING([--disable-doc], 49*4882a593Smuzhiyun+ [do not build the documentation])], 50*4882a593Smuzhiyun+ [], [enable_doc=${enable_program}]) 51*4882a593Smuzhiyun+AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = xyes -a "x$enable_program" = xyes]) 52*4882a593Smuzhiyun+ 53*4882a593Smuzhiyun # --disable-bootstrap is intended only to workaround problems with bootstrap 54*4882a593Smuzhiyun # (e.g. when cross-compiling flex or when bootstrapping has bugs). 55*4882a593Smuzhiyun # Ideally we should be able to bootstrap even when cross-compiling. 56*4882a593Smuzhiyun-- 57*4882a593Smuzhiyun2.11.0 58*4882a593Smuzhiyun 59