[Git][videolan/libdvbpsi][master] Added a configure switch to enable/disable examples build

Jean-Paul Saman <[email protected]> Fri, 07 Dec 2018 13:04:18 +0100
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <[email protected]>
--===============2884261511855737524==
Content-Type: multipart/alternative;
 boundary="--==_mimepart_5c0a61c21165_c0a3fbe5428a8a03656f8";
 charset=UTF-8
Content-Transfer-Encoding: 7bit


----==_mimepart_5c0a61c21165_c0a3fbe5428a8a03656f8
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

Jean-Paul Saman pushed to branch master at VideoLAN / libdvbpsi


Commits:
5700ed2f by Konstantin Pavlov at 2018-11-30T17:29:05Z
Added a configure switch to enable/disable examples build

- - - - -


2 changed files:

- Makefile.am
- configure.ac


Changes:

=====================================
Makefile.am
=====================================
@@ -2,7 +2,12 @@
 
 ACLOCAL_AMFLAGS=-I m4
 
-SUBDIRS = src examples misc
+SUBDIRS = src
+
+if BUILD_EXAMPLES
+SUBDIRS += examples misc
+endif
+
 DIST_SUBDIRS = $(SUBDIRS) doc
 
 EXTRA_DIST = libdvbpsi.spec libdvbpsi.spec.in libdvbpsi.pc.in bootstrap
@@ -15,9 +20,6 @@ doc-dummy:
 doc: doc-dummy
 	$(MAKE) -C doc doc
 
-test_dr.c:
-	$(MAKE) -C misc test_dr.c
-
 changelog:
 	cvs2cl --utc --hide-filenames --no-wrap -w --stdout -g -z9 | \
 	  sed -e 's/^[^0-9]/ /' -e 's/^  *$$//' -e 's/^ \* 	/ /g' | \
@@ -30,5 +32,10 @@ dist-checksum: $(DIST_ARCHIVES)
 	  sha256sum $$sum > $$sum.sha256; \
 	done
 
+if BUILD_EXAMPLES
+test_dr.c:
+	$(MAKE) -C misc test_dr.c
+
 generate-header_dr:
 	misc/gen_dr_h.sh > src/descriptors/dr.h
+endif


=====================================
configure.ac
=====================================
@@ -145,6 +145,16 @@ if test "${ac_cv_asprintf}" != "no"; then
     AC_DEFINE(HAVE_ASPRINTF, 1, [Support for asprintf() and vasprintf()])
 fi
 
+# dnl Whether or not build examples
+AC_ARG_ENABLE([examples],
+  [AS_HELP_STRING([--enable-examples],
+  [build examples (default is yes)])],
+  [build_examples=$enableval],
+  [build_examples=yes])
+
+dnl use examples
+AM_CONDITIONAL([BUILD_EXAMPLES], [ test $build_examples = "yes" ])
+
 dnl
 dnl Generate Makefiles and other output files
 dnl
@@ -166,4 +176,5 @@ release               : ${release}
 compatibility old api : ${compat}
 compile flags         : ${CFLAGS}
 build for             : ${SYS}
+build examples        : ${build_examples}
 "



View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/commit/5700ed2f2311b3477706bac2fd030b2855720e68

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvbpsi/commit/5700ed2f2311b3477706bac2fd030b2855720e68
You're receiving this email because of your account on code.videolan.org.

----==_mimepart_5c0a61c21165_c0a3fbe5428a8a03656f8--

--===============2884261511855737524==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGliZHZicHNp
LWRldmVsIG1haWxpbmcgbGlzdApsaWJkdmJwc2ktZGV2ZWxAdmlkZW9sYW4ub3JnCmh0dHBzOi8v
bWFpbG1hbi52aWRlb2xhbi5vcmcvbGlzdGluZm8vbGliZHZicHNpLWRldmVsCg==

--===============2884261511855737524==--