build: non-recursive qpb & fpm

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-07-28 14:40:39 +02:00
parent ddfeb48652
commit 0f8b5fd5a0
11 changed files with 89 additions and 78 deletions

View File

@ -10,6 +10,7 @@ LIBCAP = @LIBCAP@
EXTRA_DIST =
BUILT_SOURCES =
CLEANFILES =
examplesdir = $(exampledir)
@ -25,14 +26,16 @@ dist_examples_DATA =
include lib/subdir.am
include zebra/subdir.am
include qpb/subdir.am
include fpm/subdir.am
SUBDIRS = . qpb fpm @LIBRFP@ @RFPTEST@ \
SUBDIRS = . @LIBRFP@ @RFPTEST@ \
@BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
@ISISD@ @PIMD@ @NHRPD@ @EIGRPD@ @BABELD@ \
@WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
redhat @SOLARIS@ tests tools snapcraft
DIST_SUBDIRS = . qpb fpm bgpd ripd ripngd ospfd ospf6d ldpd \
DIST_SUBDIRS = . bgpd ripd ripngd ospfd ospf6d ldpd \
isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
solaris pimd nhrpd eigrpd bgpd/rfp-example/librfp \
bgpd/rfp-example/rfptest tools snapcraft babeld python \

View File

@ -8,7 +8,7 @@ am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
am__v_CLIPPY_0 = @echo " CLIPPY " $@;
am__v_CLIPPY_1 =
SUFFIXES = _clippy.c
SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h
.c_clippy.c:
$(AM_V_at)$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy
$(AM_V_CLIPPY)$(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py $< > $@.tmp
@ -34,16 +34,19 @@ Q_PROTOBUF_C_CLIENT_LDOPTS=-lprotobuf-c
Q_PROTOC=protoc
Q_PROTOC_C=protoc-c
Q_PROTOBUF_CFILES = $(filter %.pb-c.c,$(SOURCES))
Q_PROTOBUF_SRCS = $(Q_PROTOBUF_CFILES) $(Q_PROTOBUF_HFILES)
# Rules
%.pb.h: %.proto
$(Q_PROTOC) $(PROTOBUF_INCLUDES) --cpp_out=$(top_srcdir) $(top_srcdir)/$(PROTOBUF_PACKAGE)/$^
.proto.pb.h:
$(Q_PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
%.pb-c.c %.pb-c.h: %.proto
$(Q_PROTOC_C) $(PROTOBUF_INCLUDES) --c_out=$(top_srcdir) $(top_srcdir)/$(PROTOBUF_PACKAGE)/$^
AM_V_PROTOC_C = $(am__v_PROTOC_C_$(V))
am__v_PROTOC_C_ = $(am__v_PROTOC_C_$(AM_DEFAULT_VERBOSITY))
am__v_PROTOC_C_0 = @echo " PROTOC_C" $@;
am__v_PROTOC_C_1 =
.proto.pb-c.c:
$(AM_V_PROTOC_C)$(Q_PROTOC_C) -I$(top_srcdir) --c_out=$(top_srcdir) $(top_srcdir)/$^
.pb-c.c.pb-c.h:
@/bin/true
#
# Information about how to link to various libraries.
@ -53,7 +56,3 @@ Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LD
Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS)
endif # HAVE_PROTOBUF
Q_CLEANFILES = $(Q_PROTOBUF_SRCS)
Q_BUILT_SRCS = $(Q_PROTOBUF_SRCS)

View File

@ -1820,7 +1820,7 @@ AC_CACHE_VAL(ac_cv_htonl_works,
)
AC_MSG_RESULT($ac_cv_htonl_works)
AC_CONFIG_FILES([Makefile qpb/Makefile ripd/Makefile
AC_CONFIG_FILES([Makefile ripd/Makefile
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchfrr/Makefile
ospf6d/Makefile ldpd/Makefile isisd/Makefile vtysh/Makefile
doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile
@ -1833,7 +1833,6 @@ AC_CONFIG_FILES([Makefile qpb/Makefile ripd/Makefile
tools/Makefile
pkgsrc/Makefile
python/Makefile
fpm/Makefile
redhat/frr.spec
snapcraft/Makefile
snapcraft/snapcraft.yaml

2
fpm/.gitignore vendored
View File

@ -1,4 +1,4 @@
Makefile
!Makefile
Makefile.in
*.o
tags

10
fpm/Makefile Normal file
View File

@ -0,0 +1,10 @@
all: ALWAYS
@$(MAKE) -s -C .. fpm/libfrrfpm_pb.la
%: ALWAYS
@$(MAKE) -s -C .. fpm/$@
Makefile:
#nothing
ALWAYS:
.PHONY: ALWAYS makefiles
.SUFFIXES:

View File

@ -1,29 +0,0 @@
include ../common.am
AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib $(Q_PROTOBUF_C_CLIENT_INCLUDES)
PROTOBUF_INCLUDES=-I$(top_srcdir)
PROTOBUF_PACKAGE = fpm
lib_LTLIBRARIES = libfrrfpm_pb.la
libfrrfpm_pb_la_LDFLAGS = -version-info 0:0:0
if HAVE_PROTOBUF
protobuf_srcs =
protobuf_srcs_nodist = \
fpm.pb-c.c
endif
libfrrfpm_pb_la_SOURCES = \
fpm.h \
fpm_pb.h \
fpm_pb.c \
$(protobuf_srcs)
nodist_libfrrfpm_pb_la_SOURCES = $(protobuf_srcs_nodist)
CLEANFILES = $(Q_CLEANFILES)
BUILT_SOURCES = $(Q_PROTOBUF_SRCS)
EXTRA_DIST = fpm.proto

23
fpm/subdir.am Normal file
View File

@ -0,0 +1,23 @@
if FPM
lib_LTLIBRARIES += fpm/libfrrfpm_pb.la
endif
fpm_libfrrfpm_pb_la_LDFLAGS = -version-info 0:0:0
fpm_libfrrfpm_pb_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) -I$(top_builddir)/lib \
$(Q_PROTOBUF_C_CLIENT_INCLUDES)
fpm_libfrrfpm_pb_la_SOURCES = \
fpm/fpm.h \
fpm/fpm_pb.h \
fpm/fpm_pb.c \
# end
if HAVE_PROTOBUF
nodist_fpm_libfrrfpm_pb_la_SOURCES = fpm/fpm.pb-c.c
BUILT_SOURCES += fpm/fpm.pb-c.c
CLEANFILES += \
fpm/fpm.pb-c.c \
fpm/fpm.pb-c.h \
# end
endif
EXTRA_DIST += fpm/fpm.proto

2
qpb/.gitignore vendored
View File

@ -1,4 +1,4 @@
Makefile
!Makefile
Makefile.in
*.o
tags

10
qpb/Makefile Normal file
View File

@ -0,0 +1,10 @@
all: ALWAYS
@$(MAKE) -s -C .. fpm/libfrr_pb.la
%: ALWAYS
@$(MAKE) -s -C .. fpm/$@
Makefile:
#nothing
ALWAYS:
.PHONY: ALWAYS makefiles
.SUFFIXES:

View File

@ -1,30 +0,0 @@
include ../common.am
AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib $(Q_PROTOBUF_C_CLIENT_INCLUDES)
PROTOBUF_INCLUDES=-I$(top_srcdir)
PROTOBUF_PACKAGE = qpb
lib_LTLIBRARIES = libfrr_pb.la
libfrr_pb_la_LDFLAGS = -version-info 0:0:0
if HAVE_PROTOBUF
protobuf_srcs = \
qpb_allocator.c
protobuf_srcs_nodist = \
qpb.pb-c.c
endif
libfrr_pb_la_SOURCES = \
linear_allocator.h \
qpb.h \
qpb.c \
qpb_allocator.h \
$(protobuf_srcs)
nodist_libfrr_pb_la_SOURCES = $(protobuf_srcs_nodist)
CLEANFILES = $(Q_CLEANFILES)
BUILT_SOURCES = $(Q_PROTOBUF_SRCS)
EXTRA_DIST = qpb.proto

26
qpb/subdir.am Normal file
View File

@ -0,0 +1,26 @@
if HAVE_PROTOBUF
lib_LTLIBRARIES += qpb/libfrr_pb.la
endif
qpb_libfrr_pb_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) -I$(top_builddir)/lib \
$(Q_PROTOBUF_C_CLIENT_INCLUDES)
qpb_libfrr_pb_la_LDFLAGS = -version-info 0:0:0
qpb_libfrr_pb_la_SOURCES = \
qpb/linear_allocator.h \
qpb/qpb.h \
qpb/qpb.c \
qpb/qpb_allocator.h \
# end
if HAVE_PROTOBUF
qpb_libfrr_pb_la_SOURCES += qpb/qpb_allocator.c
nodist_qpb_libfrr_pb_la_SOURCES = qpb/qpb.pb-c.c
BUILT_SOURCES += qpb/qpb.pb-c.c
CLEANFILES += \
qpb/qpb.pb-c.c \
qpb/qpb.pb-c.h \
# end
endif
EXTRA_DIST += qpb/qpb.proto