From 70d27c5b7decb53c27543a0d58f7cd1dcda3ba44 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 4 Aug 2017 10:36:34 +0200 Subject: [PATCH] build: clean up BUILT_SOURCES BUILT_SOURCES doesn't do what the name suggests. What it actually means is "these files should be built first when doing a 'make' without explicit target" (or "make all"). It's pretty much almost always wrong to use BUILT_SOURCES, the only correct use is when a file is needed by an unspecified / large set of files. Also remove version.h and route_types.h from dist tarball while we're at it. configure will create them anyway. Signed-off-by: David Lamparter --- Makefile.am | 1 + doc/Makefile.am | 12 +++++++----- fpm/subdir.am | 1 - lib/subdir.am | 10 ++++++---- qpb/subdir.am | 1 - tests/Makefile.am | 4 +--- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index bd421c9dde..72689c28f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,6 +22,7 @@ noinst_LIBRARIES = lib_LTLIBRARIES = module_LTLIBRARIES = pkginclude_HEADERS = +nodist_pkginclude_HEADERS = dist_examples_DATA = include lib/subdir.am diff --git a/doc/Makefile.am b/doc/Makefile.am index b2bdf91cd4..47e87c7b9c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -45,18 +45,20 @@ figures_txt = $(figures_names_parts:%=fig%.txt) # provided by automake. If you are an automake wizard, please feel free to # compact it somehow. -# Built from defines.texi.in -BUILT_SOURCES = defines.texi - info_TEXINFOS = frr.texi # Have to manually specify the frr.pdf rule in order to allow # us to have a generic automatic .pdf rule to build the figure sources # because it cant just work from the png's directly it seems - contrary # to the documentation... -frr.pdf: $(info_TEXINFOS) $(figures_pdf) $(frr_TEXINFOS) +frr.pdf: $(info_TEXINFOS) $(figures_pdf) $(frr_TEXINFOS) defines.texi $(TEXI2PDF) -o "$@" $< || true +# don't ask me why the info file is in srcdir +$(srcdir)/frr.info: defines.texi +frr.dvi: defines.texi +frr.html: defines.texi + frr_TEXINFOS = appendix.texi basic.texi bgpd.texi isisd.texi filter.texi \ vnc.texi \ babeld.texi \ @@ -65,7 +67,7 @@ frr_TEXINFOS = appendix.texi basic.texi bgpd.texi isisd.texi filter.texi \ eigrpd.texi \ ospf6d.texi ospfd.texi \ overview.texi protocol.texi ripd.texi ripngd.texi routemap.texi \ - snmp.texi vtysh.texi routeserver.texi defines.texi $(figures_png) \ + snmp.texi vtysh.texi routeserver.texi $(figures_png) \ snmptrap.texi ospf_fundamentals.texi isisd.texi $(figures_txt) .png.eps: diff --git a/fpm/subdir.am b/fpm/subdir.am index f81a84222c..795535596b 100644 --- a/fpm/subdir.am +++ b/fpm/subdir.am @@ -13,7 +13,6 @@ fpm_libfrrfpm_pb_la_SOURCES = \ 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 \ diff --git a/lib/subdir.am b/lib/subdir.am index 86fe09ca64..682ae45cb4 100644 --- a/lib/subdir.am +++ b/lib/subdir.am @@ -124,7 +124,6 @@ pkginclude_HEADERS += \ lib/privs.h \ lib/ptm_lib.h \ lib/qobj.h \ - lib/route_types.h \ lib/routemap.h \ lib/sbuf.h \ lib/sha256.h \ @@ -141,7 +140,6 @@ pkginclude_HEADERS += \ lib/termtable.h \ lib/thread.h \ lib/vector.h \ - lib/version.h \ lib/vlan.h \ lib/vrf.h \ lib/vrf_int.h \ @@ -154,6 +152,11 @@ pkginclude_HEADERS += \ lib/zebra.h \ # end +nodist_pkginclude_HEADERS += \ + lib/route_types.h \ + lib/version.h \ + # end + noinst_HEADERS += \ lib/clippy.h \ lib/log_int.h \ @@ -216,6 +219,7 @@ lib_clippy_SOURCES = \ # EXTRA_DIST += \ lib/command_lex.h \ + lib/command_parse.h \ lib/gitversion.pl \ lib/queue.h \ lib/route_types.pl \ @@ -223,8 +227,6 @@ EXTRA_DIST += \ # end BUILT_SOURCES += \ - lib/command_lex.h \ - lib/command_parse.h \ lib/gitversion.h \ lib/route_types.h \ # end diff --git a/qpb/subdir.am b/qpb/subdir.am index 71e501b9c2..3c006fd221 100644 --- a/qpb/subdir.am +++ b/qpb/subdir.am @@ -16,7 +16,6 @@ qpb_libfrr_pb_la_SOURCES = \ 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 \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 0c31c0441a..59ea3c4c69 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -85,9 +85,7 @@ lib/cli/test_commands_defun.c: ../vtysh/vtysh_cmd.c isisd/test_fuzz_isis_tlv_tests.h: $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@" - -BUILT_SOURCES = \ - lib/cli/test_commands_defun.c \ +isisd/isisd_test_fuzz_isis_tlv-test_fuzz_isis_tlv.$(OBJEXT): \ isisd/test_fuzz_isis_tlv_tests.h noinst_HEADERS = \ -- 2.39.5