You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/starpu/files/starpu-1.0.1-no-examples.patch

95 lines
2.8 KiB

Do not build examples if user did not ask for it
bicatali@gentoo.org
--- Makefile.am.orig 2012-05-29 23:16:20.000000000 +0100
+++ Makefile.am 2012-05-30 00:57:47.000000000 +0100
@@ -28,7 +28,9 @@
SUBDIRS += socl
endif
+if BUILD_EXAMPLES
SUBDIRS += examples
+endif
if BUILD_GCC_PLUGIN
SUBDIRS += gcc-plugin
--- gcc-plugin/Makefile.am.orig 2012-05-29 23:16:20.000000000 +0100
+++ gcc-plugin/Makefile.am 2012-05-30 00:59:39.000000000 +0100
@@ -13,7 +13,10 @@
#
# See the GNU Lesser General Public License in COPYING.LGPL for more details.
-SUBDIRS = src tests examples
+SUBDIRS = src tests
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
EXTRA_DIST = COPYING README ChangeLog
--- configure.ac.orig 2012-05-29 23:30:19.000000000 +0100
+++ configure.ac 2012-05-30 01:17:48.000000000 +0100
@@ -1312,6 +1312,11 @@
# #
###############################################################################
+AC_ARG_ENABLE(build-examples, [AS_HELP_STRING([--enable-build-examples],
+ [enable building of examples])],
+ enable_build_examples=$enableval, enable_build_examples=no)
+# check stuff for examples (todo)
+AM_CONDITIONAL(BUILD_EXAMPLES, [test x$enable_build_examples != xno])
AC_ARG_ENABLE(opengl-render, [AS_HELP_STRING([--enable-opengl-render],
[enable OpenGL rendering of some examples])],
enable_opengl_render=$enableval, enable_opengl_render=no)
@@ -1434,6 +1439,11 @@
if test x$use_system_blas = xyes; then
AC_DEFINE(STARPU_SYSTEM_BLAS, [1], [use refblas library])
blas_lib=system
+ elif test x"$BLAS_LIBS" != x; then
+ AC_DEFINE(STARPU_SYSTEM_BLAS, [1], [use user defined library])
+ STARPU_BLAS_LDFLAGS="$BLAS_LIBS"
+ AC_SUBST(STARPU_BLAS_LDFLAGS)
+ blas_lib=system
else
blas_lib=none
fi
--- mpi/Makefile.a.origm 2012-05-29 23:16:20.000000000 +0100
+++ mpi/Makefile.am 2012-05-30 01:20:49.000000000 +0100
@@ -94,7 +94,7 @@
###################
# Stencil example #
###################
-
+if BUILD_EXAMPLES
examplebin_PROGRAMS += \
examples/stencil/stencil5
@@ -202,7 +202,7 @@
check_PROGRAMS += \
examples/reduction/mpi_reduction
-
+endif
########################
# Unit testcases #
########################
--- starpufft/Makefile.am.orig 2012-05-29 23:16:20.000000000 +0100
+++ starpufft/Makefile.am 2012-05-30 01:23:40.000000000 +0100
@@ -67,10 +67,13 @@
endif
examplebindir = $(libdir)/starpu/examples/starpufft
-examplebin_PROGRAMS = \
+
+examplebin_PROGRAMS =
+if BUILD_EXAMPLES
+examplebin_PROGRAMS += \
examples/testf \
examples/test
-
+endif
check_PROGRAMS = examples/testf
examples_testf_LDADD = libstarpufft-@STARPU_EFFECTIVE_VERSION@.la $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(FFTWF_LIBS)