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 <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-08-04 10:36:34 +02:00
parent 306ed6816a
commit 70d27c5b7d
6 changed files with 15 additions and 14 deletions

View file

@ -22,6 +22,7 @@ noinst_LIBRARIES =
lib_LTLIBRARIES = lib_LTLIBRARIES =
module_LTLIBRARIES = module_LTLIBRARIES =
pkginclude_HEADERS = pkginclude_HEADERS =
nodist_pkginclude_HEADERS =
dist_examples_DATA = dist_examples_DATA =
include lib/subdir.am include lib/subdir.am

View file

@ -45,18 +45,20 @@ figures_txt = $(figures_names_parts:%=fig%.txt)
# provided by automake. If you are an automake wizard, please feel free to # provided by automake. If you are an automake wizard, please feel free to
# compact it somehow. # compact it somehow.
# Built from defines.texi.in
BUILT_SOURCES = defines.texi
info_TEXINFOS = frr.texi info_TEXINFOS = frr.texi
# Have to manually specify the frr.pdf rule in order to allow # 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 # 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 # because it cant just work from the png's directly it seems - contrary
# to the documentation... # to the documentation...
frr.pdf: $(info_TEXINFOS) $(figures_pdf) $(frr_TEXINFOS) frr.pdf: $(info_TEXINFOS) $(figures_pdf) $(frr_TEXINFOS) defines.texi
$(TEXI2PDF) -o "$@" $< || true $(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 \ frr_TEXINFOS = appendix.texi basic.texi bgpd.texi isisd.texi filter.texi \
vnc.texi \ vnc.texi \
babeld.texi \ babeld.texi \
@ -65,7 +67,7 @@ frr_TEXINFOS = appendix.texi basic.texi bgpd.texi isisd.texi filter.texi \
eigrpd.texi \ eigrpd.texi \
ospf6d.texi ospfd.texi \ ospf6d.texi ospfd.texi \
overview.texi protocol.texi ripd.texi ripngd.texi routemap.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) snmptrap.texi ospf_fundamentals.texi isisd.texi $(figures_txt)
.png.eps: .png.eps:

View file

@ -13,7 +13,6 @@ fpm_libfrrfpm_pb_la_SOURCES = \
if HAVE_PROTOBUF if HAVE_PROTOBUF
nodist_fpm_libfrrfpm_pb_la_SOURCES = fpm/fpm.pb-c.c nodist_fpm_libfrrfpm_pb_la_SOURCES = fpm/fpm.pb-c.c
BUILT_SOURCES += fpm/fpm.pb-c.c
CLEANFILES += \ CLEANFILES += \
fpm/fpm.pb-c.c \ fpm/fpm.pb-c.c \
fpm/fpm.pb-c.h \ fpm/fpm.pb-c.h \

View file

@ -124,7 +124,6 @@ pkginclude_HEADERS += \
lib/privs.h \ lib/privs.h \
lib/ptm_lib.h \ lib/ptm_lib.h \
lib/qobj.h \ lib/qobj.h \
lib/route_types.h \
lib/routemap.h \ lib/routemap.h \
lib/sbuf.h \ lib/sbuf.h \
lib/sha256.h \ lib/sha256.h \
@ -141,7 +140,6 @@ pkginclude_HEADERS += \
lib/termtable.h \ lib/termtable.h \
lib/thread.h \ lib/thread.h \
lib/vector.h \ lib/vector.h \
lib/version.h \
lib/vlan.h \ lib/vlan.h \
lib/vrf.h \ lib/vrf.h \
lib/vrf_int.h \ lib/vrf_int.h \
@ -154,6 +152,11 @@ pkginclude_HEADERS += \
lib/zebra.h \ lib/zebra.h \
# end # end
nodist_pkginclude_HEADERS += \
lib/route_types.h \
lib/version.h \
# end
noinst_HEADERS += \ noinst_HEADERS += \
lib/clippy.h \ lib/clippy.h \
lib/log_int.h \ lib/log_int.h \
@ -216,6 +219,7 @@ lib_clippy_SOURCES = \
# #
EXTRA_DIST += \ EXTRA_DIST += \
lib/command_lex.h \ lib/command_lex.h \
lib/command_parse.h \
lib/gitversion.pl \ lib/gitversion.pl \
lib/queue.h \ lib/queue.h \
lib/route_types.pl \ lib/route_types.pl \
@ -223,8 +227,6 @@ EXTRA_DIST += \
# end # end
BUILT_SOURCES += \ BUILT_SOURCES += \
lib/command_lex.h \
lib/command_parse.h \
lib/gitversion.h \ lib/gitversion.h \
lib/route_types.h \ lib/route_types.h \
# end # end

View file

@ -16,7 +16,6 @@ qpb_libfrr_pb_la_SOURCES = \
if HAVE_PROTOBUF if HAVE_PROTOBUF
qpb_libfrr_pb_la_SOURCES += qpb/qpb_allocator.c qpb_libfrr_pb_la_SOURCES += qpb/qpb_allocator.c
nodist_qpb_libfrr_pb_la_SOURCES = qpb/qpb.pb-c.c nodist_qpb_libfrr_pb_la_SOURCES = qpb/qpb.pb-c.c
BUILT_SOURCES += qpb/qpb.pb-c.c
CLEANFILES += \ CLEANFILES += \
qpb/qpb.pb-c.c \ qpb/qpb.pb-c.c \
qpb/qpb.pb-c.h \ qpb/qpb.pb-c.h \

View file

@ -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 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 > "$@" gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@"
isisd/isisd_test_fuzz_isis_tlv-test_fuzz_isis_tlv.$(OBJEXT): \
BUILT_SOURCES = \
lib/cli/test_commands_defun.c \
isisd/test_fuzz_isis_tlv_tests.h isisd/test_fuzz_isis_tlv_tests.h
noinst_HEADERS = \ noinst_HEADERS = \