summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am13
-rw-r--r--common.am61
-rw-r--r--doc/developer/cli.rst2
-rw-r--r--lib/subdir.am20
-rw-r--r--qpb/subdir.am36
5 files changed, 64 insertions, 68 deletions
diff --git a/Makefile.am b/Makefile.am
index 67c3540e11..fc1beaeeae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,15 @@
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = subdir-objects 1.12
-include common.am
+ACLOCAL_AMFLAGS = -I m4
-AM_CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \
- -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib
+AM_CFLAGS = \
+ @ASAN_FLAGS@ @TSAN_FLAGS@ @MSAN_FLAGS@ \
+ $(WERROR)
+AM_CPPFLAGS = \
+ @ASAN_FLAGS@ @TSAN_FLAGS@ @MSAN_FLAGS@ \
+ -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \
+ -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE)
LIBCAP = @LIBCAP@
@@ -195,8 +200,6 @@ EXTRA_DIST += \
zebra/Makefile \
# end
-ACLOCAL_AMFLAGS = -I m4
-
noinst_HEADERS += defaults.h
indent:
diff --git a/common.am b/common.am
deleted file mode 100644
index 9c0c547811..0000000000
--- a/common.am
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Automake fragment intended to be shared by Makefile.am files in the
-# tree. When used, should be included at the very top of the file.
-#
-AM_CPPFLAGS = @ASAN_FLAGS@ @TSAN_FLAGS@ @MSAN_FLAGS@
-AM_CFLAGS = @ASAN_FLAGS@ @TSAN_FLAGS@ @MSAN_FLAGS@ $(WERROR)
-
-AM_V_CLIPPY = $(am__v_CLIPPY_$(V))
-am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
-am__v_CLIPPY_0 = @echo " CLIPPY " $@;
-am__v_CLIPPY_1 =
-
-CLIPPY_DEPS = $(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py
-
-SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h
-.c_clippy.c:
- @{ test -x $(top_builddir)/$(HOSTTOOLS)lib/clippy || $(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy; }
- $(AM_V_CLIPPY) $(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py -o $@ $<
-
-## automake's "ylwrap" is a great piece of GNU software... not.
-.l.c:
- $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $<
-.y.c:
- $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $<
-
-
-if HAVE_PROTOBUF
-
-# Uncomment to use an non-system version of libprotobuf-c.
-#
-# Q_PROTOBUF_C_CLIENT_INCLUDES = -I$(top_srcdir)/third-party/protobuf-c/src
-# Q_PROTOBUF_C_CLIENT_LDOPTS = $(top_builddir)/third-party/protobuf-c/src/libprotobuf-c.la
-
-Q_PROTOBUF_C_CLIENT_INCLUDES=
-Q_PROTOBUF_C_CLIENT_LDOPTS=-lprotobuf-c
-
-Q_PROTOC=protoc
-Q_PROTOC_C=protoc-c
-
-# Rules
-.proto.pb.h:
- $(Q_PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
-
-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.
-#
-Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS)
-
-Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS)
-
-endif # HAVE_PROTOBUF
diff --git a/doc/developer/cli.rst b/doc/developer/cli.rst
index 20391c47bc..c0716a5c93 100644
--- a/doc/developer/cli.rst
+++ b/doc/developer/cli.rst
@@ -450,8 +450,6 @@ is no ordering requirement)
.. code-block:: make
- include ../common.am
-
# ...
# if linked into a LTLIBRARY (.la/.so):
diff --git a/lib/subdir.am b/lib/subdir.am
index 58c0ce6558..2ff3c732ec 100644
--- a/lib/subdir.am
+++ b/lib/subdir.am
@@ -251,6 +251,26 @@ lib_clippy_SOURCES = \
lib/vector.c \
# end
+# (global) clippy rules for all directories
+
+AM_V_CLIPPY = $(am__v_CLIPPY_$(V))
+am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
+am__v_CLIPPY_0 = @echo " CLIPPY " $@;
+am__v_CLIPPY_1 =
+
+CLIPPY_DEPS = $(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py
+
+SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h
+.c_clippy.c:
+ @{ test -x $(top_builddir)/$(HOSTTOOLS)lib/clippy || \
+ $(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy; }
+ $(AM_V_CLIPPY) $(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py -o $@ $<
+
+## automake's "ylwrap" is a great piece of GNU software... not.
+.l.c:
+ $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $<
+.y.c:
+ $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $<
#
# generated sources & extra foo
diff --git a/qpb/subdir.am b/qpb/subdir.am
index 3c006fd221..0ed50c01be 100644
--- a/qpb/subdir.am
+++ b/qpb/subdir.am
@@ -23,3 +23,39 @@ CLEANFILES += \
endif
EXTRA_DIST += qpb/qpb.proto
+
+if HAVE_PROTOBUF
+
+# Uncomment to use an non-system version of libprotobuf-c.
+#
+# Q_PROTOBUF_C_CLIENT_INCLUDES = -I$(top_srcdir)/third-party/protobuf-c/src
+# Q_PROTOBUF_C_CLIENT_LDOPTS = $(top_builddir)/third-party/protobuf-c/src/libprotobuf-c.la
+
+Q_PROTOBUF_C_CLIENT_INCLUDES=
+Q_PROTOBUF_C_CLIENT_LDOPTS=-lprotobuf-c
+
+Q_PROTOC=protoc
+Q_PROTOC_C=protoc-c
+
+# Rules
+.proto.pb.h:
+ $(Q_PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
+
+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.
+#
+Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS)
+
+Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS)
+
+endif # HAVE_PROTOBUF