]> git.puffer.fish Git - mirror/frr.git/commitdiff
build: non-recursive ripd & ripngd
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 2 Aug 2017 07:46:45 +0000 (09:46 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 4 Aug 2017 09:09:50 +0000 (11:09 +0200)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Makefile.am
configure.ac
ripd/.gitignore
ripd/Makefile [new file with mode: 0644]
ripd/Makefile.am [deleted file]
ripd/subdir.am [new file with mode: 0644]
ripngd/.gitignore
ripngd/Makefile [new file with mode: 0644]
ripngd/Makefile.am [deleted file]
ripngd/subdir.am [new file with mode: 0644]

index 7cfe4a97e3ca632535f6f238a9263c08a9df88f6..5c4c9139d6ed64fe8849b8e90415d09d74ddfa7a 100644 (file)
@@ -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 \
index 6b5cd19a5f5bcad7b0c585cfda03aa377e1aeeb8..243b18d0f9e0952abf127360010c2fb8fe839ddf 100755 (executable)
@@ -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=""
@@ -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="";;
@@ -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)
@@ -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
index 9bcfb635e58e40d527e4a4affe9d82bfb5703564..177250ca6108989feb9094b2374f9a956e85ba15 100644 (file)
@@ -1,4 +1,4 @@
-Makefile
+!Makefile
 Makefile.in
 *.o
 ripd
diff --git a/ripd/Makefile b/ripd/Makefile
new file mode 100644 (file)
index 0000000..2d6f838
--- /dev/null
@@ -0,0 +1,10 @@
+all: ALWAYS
+       @$(MAKE) -s -C .. ripd/ripd
+%: ALWAYS
+       @$(MAKE) -s -C .. ripd/$@
+
+Makefile:
+       #nothing
+ALWAYS:
+.PHONY: ALWAYS makefiles
+.SUFFIXES:
diff --git a/ripd/Makefile.am b/ripd/Makefile.am
deleted file mode 100644 (file)
index 9c034f0..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-## Process this file with automake to produce Makefile.in.
-
-AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
-DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
-INSTALL_SDATA=@INSTALL@ -m 600
-
-AM_CFLAGS = $(WERROR)
-
-noinst_LIBRARIES = librip.a
-module_LTLIBRARIES =
-sbin_PROGRAMS = ripd
-
-librip_a_SOURCES = \
-       rip_memory.c \
-       ripd.c rip_zebra.c rip_interface.c rip_debug.c \
-       rip_routemap.c rip_peer.c rip_offset.c
-
-noinst_HEADERS = \
-       rip_memory.h \
-       ripd.h rip_debug.h rip_interface.h
-
-ripd_SOURCES = \
-       rip_main.c $(librip_a_SOURCES)
-
-ripd_LDADD = ../lib/libfrr.la @LIBCAP@
-
-if SNMP
-module_LTLIBRARIES += ripd_snmp.la
-endif
-ripd_snmp_la_SOURCES = rip_snmp.c
-ripd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
-ripd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
-ripd_snmp_la_LIBADD = ../lib/libfrrsnmp.la
-
-examplesdir = $(exampledir)
-dist_examples_DATA = ripd.conf.sample
-
-EXTRA_DIST = RIPv2-MIB.txt
-
diff --git a/ripd/subdir.am b/ripd/subdir.am
new file mode 100644 (file)
index 0000000..7a8f218
--- /dev/null
@@ -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
index e871fae3ed6d740e330ea37f44e9961a3addf3f3..213384d139312c317649d738960bfb0a02e7c51e 100644 (file)
@@ -1,4 +1,4 @@
-Makefile
+!Makefile
 Makefile.in
 *.o
 ripngd
diff --git a/ripngd/Makefile b/ripngd/Makefile
new file mode 100644 (file)
index 0000000..5b76bb2
--- /dev/null
@@ -0,0 +1,10 @@
+all: ALWAYS
+       @$(MAKE) -s -C .. ripngd/ripngd
+%: ALWAYS
+       @$(MAKE) -s -C .. ripngd/$@
+
+Makefile:
+       #nothing
+ALWAYS:
+.PHONY: ALWAYS makefiles
+.SUFFIXES:
diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am
deleted file mode 100644 (file)
index 3a4be99..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-## Process this file with automake to produce Makefile.in.
-
-AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
-DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
-INSTALL_SDATA=@INSTALL@ -m 600
-
-AM_CFLAGS = $(WERROR)
-
-noinst_LIBRARIES = libripng.a
-sbin_PROGRAMS = ripngd
-
-libripng_a_SOURCES = \
-       ripng_memory.c \
-       ripng_interface.c ripngd.c ripng_zebra.c ripng_route.c ripng_debug.c \
-       ripng_routemap.c ripng_offset.c ripng_peer.c ripng_nexthop.c
-
-noinst_HEADERS = \
-       ripng_memory.h \
-       ripng_debug.h ripng_route.h ripngd.h ripng_nexthop.h
-
-ripngd_SOURCES = \
-       ripng_main.c $(libripng_a_SOURCES)
-
-ripngd_LDADD = ../lib/libfrr.la @LIBCAP@
-
-examplesdir = $(exampledir)
-dist_examples_DATA = ripngd.conf.sample
-
diff --git a/ripngd/subdir.am b/ripngd/subdir.am
new file mode 100644 (file)
index 0000000..1f7ff09
--- /dev/null
@@ -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