From: Roger Meier Date: Sun, 26 Jan 2014 10:51:26 +0000 (+0100) Subject: THRIFT-2317 add disable option to exclude tutorial from build X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=c88d58195246069ea05106855aa567e2db32fe69;p=common%2Fthrift.git THRIFT-2317 add disable option to exclude tutorial from build --- diff --git a/Makefile.am b/Makefile.am index af25ad37..903de75d 100755 --- a/Makefile.am +++ b/Makefile.am @@ -19,13 +19,15 @@ ACLOCAL_AMFLAGS = -I ./aclocal -SUBDIRS = compiler/cpp lib tutorial +SUBDIRS = compiler/cpp lib if WITH_TESTS SUBDIRS += test endif +if WITH_TUTORIAL SUBDIRS += tutorial +endif dist-hook: find $(distdir) -type f \( -iname ".DS_Store" -or -iname "._*" -or -iname ".gitignore" \) | xargs rm -rf diff --git a/configure.ac b/configure.ac index b2577ddb..10b4779c 100755 --- a/configure.ac +++ b/configure.ac @@ -366,13 +366,26 @@ AM_CONDITIONAL(HAVE_DEIMOS_OPENSSL, [test "$have_deimos_openssl" = "yes"]) AM_CONDITIONAL(WITH_D_SSL_TESTS, [test "$with_d_ssl_tests" = "yes"]) AC_SUBST(DMD_OPENSSL_FLAGS) - +AC_ARG_ENABLE([tests], + AS_HELP_STRING([--enable-tests], [build tests [default=yes]]), + [], enable_tests=yes +) have_tests=yes -if test "$with_tests" = "no"; then +if test "$enable_tests" = "no"; then have_tests="no" fi AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"]) +AC_ARG_ENABLE([tutorial], + AS_HELP_STRING([--enable-tutorial], [build tutorial [default=yes]]), + [], enable_tutorial=yes +) +have_tutorial=yes +if test "$enable_tutorial" = "no"; then + have_tutorial="no" +fi +AM_CONDITIONAL(WITH_TUTORIAL, [test "$have_tutorial" = "yes"]) + AM_CONDITIONAL(MINGW, false) case "${host_os}" in *mingw*)