Skip to content

Commit

Permalink
build: make mgmtd test client build conditional
Browse files Browse the repository at this point in the history
We don't want to build it by default and include it into FRR packages.

Signed-off-by: Igor Ryzhov <[email protected]>
  • Loading branch information
idryzhov committed Jan 30, 2024
1 parent 38ce22d commit a55d37f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,8 @@ AC_ARG_ENABLE([mgmtd],
AS_HELP_STRING([--disable-mgmtd], [do not build mgmtd]))
AC_ARG_ENABLE([mgmtd_local_validations],
AS_HELP_STRING([--enable-mgmtd-local-validations], [dev: unimplemented local validation]))
AC_ARG_ENABLE([mgmtd_test_be_client],
AS_HELP_STRING([--enable-mgmtd-test-be-client], [build test backend client]))
AC_ARG_ENABLE([ripd],
AS_HELP_STRING([--disable-ripd], [do not build ripd]))
AC_ARG_ENABLE([ripngd],
Expand Down Expand Up @@ -1811,6 +1813,10 @@ AS_IF([test "$enable_mgmtd" != "no"], [
])
])

AS_IF([test "$enable_mgmtd_test_be_client" = "yes"], [
AC_DEFINE([HAVE_MGMTD_TESTC], [1], [mgmtd_testc])
])

AS_IF([test "$enable_ripd" != "no"], [
AC_DEFINE([HAVE_RIPD], [1], [ripd])
])
Expand Down Expand Up @@ -2772,6 +2778,7 @@ AM_CONDITIONAL([VTYSH], [test "$VTYSH" = "vtysh"])
AM_CONDITIONAL([ZEBRA], [test "$enable_zebra" != "no"])
AM_CONDITIONAL([BGPD], [test "$enable_bgpd" != "no"])
AM_CONDITIONAL([MGMTD], [test "$enable_mgmtd" != "no"])
AM_CONDITIONAL([MGMTD_TESTC], [test "$enable_mgmtd_test_be_client" = "yes"])
AM_CONDITIONAL([RIPD], [test "$enable_ripd" != "no"])
AM_CONDITIONAL([OSPFD], [test "$enable_ospfd" != "no"])
AM_CONDITIONAL([LDPD], [test "$enable_ldpd" != "no"])
Expand Down
5 changes: 4 additions & 1 deletion mgmtd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ noinst_HEADERS += \
zebra/zebra_cli.h \
# end

sbin_PROGRAMS += mgmtd/mgmtd mgmtd/mgmtd_testc
sbin_PROGRAMS += mgmtd/mgmtd

if MGMTD_TESTC
sbin_PROGRAMS += mgmtd/mgmtd_testc
mgmtd_mgmtd_testc_SOURCES = mgmtd/mgmt_testc.c
mgmtd_mgmtd_testc_LDADD = lib/libfrr.la
endif

mgmtd_mgmtd_SOURCES = \
mgmtd/mgmt_main.c \
Expand Down

0 comments on commit a55d37f

Please sign in to comment.