Skip to content

Commit

Permalink
build: non-recursive ripd & ripngd
Browse files Browse the repository at this point in the history
Signed-off-by: David Lamparter <[email protected]>
  • Loading branch information
eqvinox committed Aug 4, 2017
1 parent 89727c8 commit 7f26911
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 86 deletions.
7 changes: 5 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ include zebra/subdir.am
include qpb/subdir.am
include fpm/subdir.am

include ripd/subdir.am
include ripngd/subdir.am

SUBDIRS = . @LIBRFP@ @RFPTEST@ \
@BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
@BGPD@ @OSPFD@ @OSPF6D@ @LDPD@ \
@ISISD@ @PIMD@ @NHRPD@ @EIGRPD@ @BABELD@ \
@WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ \
@SOLARIS@ tests tools

DIST_SUBDIRS = . bgpd ripd ripngd ospfd ospf6d ldpd \
DIST_SUBDIRS = . bgpd ospfd ospf6d ldpd \
isisd watchfrr vtysh ospfclient doc tests \
solaris pimd nhrpd eigrpd bgpd/rfp-example/librfp \
bgpd/rfp-example/rfptest tools babeld \
Expand Down
19 changes: 4 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1247,12 +1247,7 @@ else
fi
AM_CONDITIONAL(BGPD, test "x$BGPD" = "xbgpd")

if test "${enable_ripd}" = "no";then
RIPD=""
else
RIPD="ripd"
fi
AM_CONDITIONAL(RIPD, test "x$RIPD" = "xripd")
AM_CONDITIONAL(RIPD, test "${enable_ripd}" != "no")

if test "${enable_ospfd}" = "no";then
OSPFD=""
Expand Down Expand Up @@ -1309,11 +1304,7 @@ fi

AM_CONDITIONAL(OSPFCLIENT, test "x$OSPFCLIENT" = "xospfclient")

case "${enable_ripngd}" in
"no" ) RIPNGD="";;
* ) RIPNGD="ripngd";;
esac
AM_CONDITIONAL(RIPNGD, test "x$RIPNGD" = "xripngd")
AM_CONDITIONAL(RIPNGD, test "${enable_ripngd}" != "no")

case "${enable_babeld}" in
"no" ) BABELD="";;
Expand Down Expand Up @@ -1372,8 +1363,6 @@ AC_SUBST(LIBRFP)
AC_SUBST(RFPINC)
AC_SUBST(BABELD)
AC_SUBST(BGPD)
AC_SUBST(RIPD)
AC_SUBST(RIPNGD)
AC_SUBST(OSPFD)
AC_SUBST(OSPF6D)
AC_SUBST(LDPD)
Expand Down Expand Up @@ -1830,8 +1819,8 @@ AC_CACHE_VAL(ac_cv_htonl_works,
)
AC_MSG_RESULT($ac_cv_htonl_works)

AC_CONFIG_FILES([Makefile ripd/Makefile
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchfrr/Makefile
AC_CONFIG_FILES([Makefile
bgpd/Makefile ospfd/Makefile watchfrr/Makefile
ospf6d/Makefile ldpd/Makefile isisd/Makefile vtysh/Makefile
doc/Makefile ospfclient/Makefile tests/Makefile
bgpd/rfp-example/rfptest/Makefile bgpd/rfp-example/librfp/Makefile
Expand Down
2 changes: 1 addition & 1 deletion ripd/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Makefile
!Makefile
Makefile.in
*.o
ripd
Expand Down
10 changes: 10 additions & 0 deletions ripd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: ALWAYS
@$(MAKE) -s -C .. ripd/ripd
%: ALWAYS
@$(MAKE) -s -C .. ripd/$@

Makefile:
#nothing
ALWAYS:
.PHONY: ALWAYS makefiles
.SUFFIXES:
39 changes: 0 additions & 39 deletions ripd/Makefile.am

This file was deleted.

42 changes: 42 additions & 0 deletions ripd/subdir.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# ripd
#

if RIPD
noinst_LIBRARIES += ripd/librip.a
sbin_PROGRAMS += ripd/ripd
dist_examples_DATA += ripd/ripd.conf.sample
if SNMP
module_LTLIBRARIES += ripd/ripd_snmp.la
endif
endif

ripd_librip_a_SOURCES = \
ripd/rip_debug.c \
ripd/rip_interface.c \
ripd/rip_memory.c \
ripd/rip_offset.c \
ripd/rip_peer.c \
ripd/rip_routemap.c \
ripd/rip_zebra.c \
ripd/ripd.c \
# end

noinst_HEADERS += \
ripd/rip_debug.h \
ripd/rip_interface.h \
ripd/rip_memory.h \
ripd/ripd.h \
# end

ripd_ripd_LDADD = ripd/librip.a lib/libfrr.la @LIBCAP@
ripd_ripd_SOURCES = \
ripd/rip_main.c \
# end

ripd_ripd_snmp_la_SOURCES = ripd/rip_snmp.c
ripd_ripd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
ripd_ripd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
ripd_ripd_snmp_la_LIBADD = lib/libfrrsnmp.la

EXTRA_DIST += ripd/RIPv2-MIB.txt
2 changes: 1 addition & 1 deletion ripngd/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Makefile
!Makefile
Makefile.in
*.o
ripngd
Expand Down
10 changes: 10 additions & 0 deletions ripngd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: ALWAYS
@$(MAKE) -s -C .. ripngd/ripngd
%: ALWAYS
@$(MAKE) -s -C .. ripngd/$@

Makefile:
#nothing
ALWAYS:
.PHONY: ALWAYS makefiles
.SUFFIXES:
28 changes: 0 additions & 28 deletions ripngd/Makefile.am

This file was deleted.

36 changes: 36 additions & 0 deletions ripngd/subdir.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# ripngd
#

if RIPNGD
noinst_LIBRARIES += ripngd/libripng.a
sbin_PROGRAMS += ripngd/ripngd
endif

ripngd_libripng_a_SOURCES = \
ripngd/ripng_debug.c \
ripngd/ripng_interface.c \
ripngd/ripng_memory.c \
ripngd/ripng_nexthop.c \
ripngd/ripng_offset.c \
ripngd/ripng_peer.c \
ripngd/ripng_route.c \
ripngd/ripng_routemap.c \
ripngd/ripng_zebra.c \
ripngd/ripngd.c \
# end

noinst_HEADERS += \
ripngd/ripng_debug.h \
ripngd/ripng_memory.h \
ripngd/ripng_nexthop.h \
ripngd/ripng_route.h \
ripngd/ripngd.h \
# end

ripngd_ripngd_LDADD = ripngd/libripng.a lib/libfrr.la @LIBCAP@
ripngd_ripngd_SOURCES = \
ripngd/ripng_main.c \
# end

dist_examples_DATA += ripngd/ripngd.conf.sample

0 comments on commit 7f26911

Please sign in to comment.