Merge branch 'enable-examples-switch' into 'stable-1.7'

Enable examples switch

See merge request etherlab.org/ethercat!198
This commit is contained in:
Florian Pose
2026-06-22 09:22:36 +02:00
2 changed files with 36 additions and 1 deletions
+5 -1
View File
@@ -21,7 +21,11 @@
#
#-----------------------------------------------------------------------------
obj-m := examples/ master/ devices/
obj-m := master/ devices/
ifeq (@ENABLE_EXAMPLES@,1)
obj-m += examples/
endif
ifeq (@ENABLE_TTY@,1)
obj-m += tty/
+31
View File
@@ -1209,6 +1209,37 @@ fi
AM_CONDITIONAL(ENABLE_FAKEUSERLIB, test "x$fakeuserlib" = "x1")
#-----------------------------------------------------------------------------
# example programs
#-----------------------------------------------------------------------------
AC_MSG_CHECKING([whether to build the examples])
AC_ARG_ENABLE([examples],
AS_HELP_STRING([--enable-examples],
[Generation of example modules (default: yes)]),
[
case "${enableval}" in
yes) examples=1
;;
no) examples=0
;;
*) AC_MSG_ERROR([Invalid value for --enable-examples])
;;
esac
],
[examples=1]
)
if test "x${examples}" = "x1"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AM_CONDITIONAL(ENABLE_EXAMPLES, test "x$examples" = "x1")
AC_SUBST(ENABLE_EXAMPLES,[$examples])
#-----------------------------------------------------------------------------
# TTY driver
#-----------------------------------------------------------------------------