2017-05-24 17:48:12 +02:00
|
|
|
#
|
|
|
|
# libfrr
|
|
|
|
#
|
2022-05-07 19:23:09 +02:00
|
|
|
|
2017-05-24 17:48:12 +02:00
|
|
|
lib_LTLIBRARIES += lib/libfrr.la
|
2021-07-21 11:04:23 +02:00
|
|
|
lib_libfrr_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0 -Xlinker -e_libfrr_version
|
2021-11-11 15:28:33 +01:00
|
|
|
lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS) $(LUA_LIB) $(UST_LIBS) $(LIBCRYPT) $(LIBDL) $(LIBM)
|
2017-05-24 17:48:12 +02:00
|
|
|
|
|
|
|
lib_libfrr_la_SOURCES = \
|
2022-11-08 17:59:33 +01:00
|
|
|
lib/admin_group.c \
|
2022-11-03 14:30:23 +01:00
|
|
|
lib/affinitymap.c \
|
|
|
|
lib/affinitymap_cli.c \
|
|
|
|
lib/affinitymap_northbound.c \
|
2018-08-03 19:18:59 +02:00
|
|
|
lib/agg_table.c \
|
2016-11-08 18:11:20 +01:00
|
|
|
lib/atomlist.c \
|
2022-11-02 18:17:21 +01:00
|
|
|
lib/asn.c \
|
2022-02-11 04:49:41 +01:00
|
|
|
lib/base64.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/bfd.c \
|
|
|
|
lib/buffer.c \
|
|
|
|
lib/checksum.c \
|
|
|
|
lib/command.c \
|
|
|
|
lib/command_graph.c \
|
|
|
|
lib/command_lex.l \
|
|
|
|
lib/command_match.c \
|
|
|
|
lib/command_parse.y \
|
2022-01-13 10:15:51 +01:00
|
|
|
lib/cspf.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/csv.c \
|
2018-02-28 22:14:45 +01:00
|
|
|
lib/debug.c \
|
2018-10-26 15:25:25 +02:00
|
|
|
lib/defaults.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/distribute.c \
|
2022-05-07 19:23:09 +02:00
|
|
|
lib/explicit_bzero.c \
|
2016-09-28 23:19:50 +02:00
|
|
|
lib/ferr.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/filter.c \
|
2019-11-08 18:50:00 +01:00
|
|
|
lib/filter_cli.c \
|
2019-11-08 18:41:46 +01:00
|
|
|
lib/filter_nb.c \
|
2017-04-03 00:51:20 +02:00
|
|
|
lib/frrcu.c \
|
2019-05-09 22:08:40 +02:00
|
|
|
lib/frrlua.c \
|
lib: start adding generic scripting stuff
Rather than let Luaisms propagate from the start, this is some generic
wrapper stuff that defines some semantics for interacting with scripts
that aren't specific to the underlying language.
The concept I have in mind for FRR's idea of a script is:
- has a name
- has some inputs, which have types
- has some outputs, which have types
I don't want to even say they have to be files; maybe we can embed
scripts in frr.conf, for example. Similarly the types of inputs and
outputs are probably going to end up being some language-specific setup.
For now, we will stick to this simple model, but the plan is to add full
object support (ie calling back into C).
This shouldn't be misconstrued as prepping for multilingual scripting
support, which is a bad idea for the following reasons:
- Each language would require different FFI methods, and specifically
different object encoders; a lot of code
- Languages have different capabilities that would have to be brought to
parity with each other; a lot of work
- Languages have *vastly* different performance characteristics; bad
impressions, lots of issues we can't do anything about
- Each language would need a dedicated maintainer for the above reasons;
pragmatically difficult
- Supporting multiple languages fractures the community and limits the
audience with which a given script can be shared
The only pro for multilingual support would be ease of use for users not
familiar with Lua but familiar with one of the other supported
languages. This is not enough to outweigh the cons.
In order to get rich scripting capabilities, we need to be able to pass
representations of internal objects to the scripts. For example, a
script that performs some computation based on information about a peer
needs access to some equivalent of `struct peer` for the peer in
question. To transfer these objects from C-space into Lua-space we need
to encode them onto the Lua stack. This patch adds a mapping from
arbitrary type names to the functions that encode objects of that type.
For example, the function that encodes `struct peer` into a Lua table
could be registered with:
bgp_peer_encoder_func(struct frrscript *fs, struct peer *peer)
{
// encode peer to Lua table, push to stack in fs->scriptinfo->L
}
frrscript_register_type_encoder("peer", bgp_peer_encoder_func);
Later on when calling a script that wants a peer, the plan is to be able
to specify the type name like so:
frrscript_call(script, "peer", peer);
Using C-style types for the type names would have been nice, it might be
possible to do this with preprocessor magic or possibly python
preprocessing later on.
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
mergeme no stdlib
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-11-29 01:02:39 +01:00
|
|
|
lib/frrscript.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/frr_pthread.c \
|
2018-05-11 21:32:06 +02:00
|
|
|
lib/frrstr.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/getopt.c \
|
|
|
|
lib/getopt1.c \
|
|
|
|
lib/grammar_sandbox.c \
|
|
|
|
lib/graph.c \
|
|
|
|
lib/hash.c \
|
|
|
|
lib/hook.c \
|
lib: Implement an allocator for 32 bit ID numbers
This commit introduces lib/id_alloc, which has facilities for both an ID number
allocator, and less efficient ID holding pools. The pools are meant to be a
temporary holding area for ID numbers meant to be re-used, and are implemented
as a linked-list stack.
The allocator itself is much more efficient with memory. Based on sizeof
values on my 64 bit desktop, the allocator requires around 155 KiB per
million IDs tracked.
IDs are ultimately tracked in a bit-map split into many "pages." The
allocator tracks a list of pages that have free bits, and which sections
of each page have free IDs, so there isn't any scanning required to find
a free ID. (The library utility ffs, or "Find First Set," is generally a
single CPU instruction.) At the moment, totally empty pages will not be
freed, so the memory utilization of this allocator will remain at the
high water mark.
The initial intended use case is for BGP's TX Addpath IDs to be pulled
from an allocator that tracks which IDs are in use, rather than a free
running counter. The allocator reserves ID #0 as a sentinel value for
an invalid ID numbers, and BGP will want ID #1 reserved as well. To
support this, the allocator allows for IDs to be explicitly reserved,
though be aware this is only practical to use with low numbered IDs
because the allocator must allocate pages in order.
Signed-off-by Mitchell Skiba <mskiba@amazon.com>
2018-05-17 21:06:08 +02:00
|
|
|
lib/id_alloc.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/if.c \
|
|
|
|
lib/if_rmap.c \
|
|
|
|
lib/imsg-buffer.c \
|
|
|
|
lib/imsg.c \
|
|
|
|
lib/jhash.c \
|
|
|
|
lib/json.c \
|
|
|
|
lib/keychain.c \
|
2020-07-22 18:41:57 +02:00
|
|
|
lib/ldp_sync.c \
|
2018-06-14 14:23:49 +02:00
|
|
|
lib/lib_errors.c \
|
2019-12-06 14:38:55 +01:00
|
|
|
lib/lib_vty.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/libfrr.c \
|
2020-09-28 21:49:22 +02:00
|
|
|
lib/libfrr_trace.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/linklist.c \
|
2020-05-26 14:51:02 +02:00
|
|
|
lib/link_state.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/log.c \
|
2019-12-17 13:05:32 +01:00
|
|
|
lib/log_filter.c \
|
2019-06-13 23:46:29 +02:00
|
|
|
lib/log_vty.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/md5.c \
|
|
|
|
lib/memory.c \
|
2023-03-08 23:26:38 +01:00
|
|
|
lib/mgmt_fe_client.c \
|
2018-12-21 15:46:48 +01:00
|
|
|
lib/mlag.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/module.c \
|
2018-04-18 13:06:11 +02:00
|
|
|
lib/mpls.c \
|
2020-01-09 04:00:43 +01:00
|
|
|
lib/srv6.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/network.c \
|
|
|
|
lib/nexthop.c \
|
2018-02-05 16:23:42 +01:00
|
|
|
lib/netns_linux.c \
|
|
|
|
lib/netns_other.c \
|
2018-01-26 16:12:35 +01:00
|
|
|
lib/nexthop_group.c \
|
2017-12-07 20:31:48 +01:00
|
|
|
lib/northbound.c \
|
|
|
|
lib/northbound_cli.c \
|
|
|
|
lib/northbound_db.c \
|
2019-06-06 19:10:29 +02:00
|
|
|
lib/ntop.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/openbsd-tree.c \
|
|
|
|
lib/pid_output.c \
|
|
|
|
lib/plist.c \
|
|
|
|
lib/prefix.c \
|
|
|
|
lib/privs.c \
|
|
|
|
lib/ptm_lib.c \
|
2019-05-09 10:43:09 +02:00
|
|
|
lib/pullwr.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/qobj.c \
|
2017-12-19 22:28:45 +01:00
|
|
|
lib/ringbuf.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/routemap.c \
|
2019-09-30 20:01:46 +02:00
|
|
|
lib/routemap_cli.c \
|
2019-09-30 15:34:49 +02:00
|
|
|
lib/routemap_northbound.c \
|
2017-05-08 13:18:21 +02:00
|
|
|
lib/sbuf.c \
|
2015-05-25 06:36:10 +02:00
|
|
|
lib/seqlock.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/sha256.c \
|
|
|
|
lib/sigevent.c \
|
|
|
|
lib/skiplist.c \
|
|
|
|
lib/sockopt.c \
|
|
|
|
lib/sockunion.c \
|
|
|
|
lib/spf_backoff.c \
|
|
|
|
lib/srcdest_table.c \
|
|
|
|
lib/stream.c \
|
2021-02-19 00:08:11 +01:00
|
|
|
lib/strformat.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/strlcat.c \
|
|
|
|
lib/strlcpy.c \
|
|
|
|
lib/systemd.c \
|
|
|
|
lib/table.c \
|
|
|
|
lib/termtable.c \
|
|
|
|
lib/thread.c \
|
2019-01-31 04:25:38 +01:00
|
|
|
lib/typerb.c \
|
2019-01-31 01:09:13 +01:00
|
|
|
lib/typesafe.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/vector.c \
|
|
|
|
lib/vrf.c \
|
|
|
|
lib/vty.c \
|
|
|
|
lib/wheel.c \
|
|
|
|
lib/workqueue.c \
|
2018-08-09 22:50:19 +02:00
|
|
|
lib/xref.c \
|
2017-12-07 20:31:48 +01:00
|
|
|
lib/yang.c \
|
|
|
|
lib/yang_translator.c \
|
|
|
|
lib/yang_wrappers.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/zclient.c \
|
2017-05-06 06:40:17 +02:00
|
|
|
lib/zlog.c \
|
2020-04-29 10:26:05 +02:00
|
|
|
lib/zlog_5424.c \
|
|
|
|
lib/zlog_5424_cli.c \
|
2019-12-04 08:10:42 +01:00
|
|
|
lib/zlog_live.c \
|
2017-05-06 06:40:17 +02:00
|
|
|
lib/zlog_targets.c \
|
2019-05-12 21:10:04 +02:00
|
|
|
lib/printf/printf-pos.c \
|
|
|
|
lib/printf/vfprintf.c \
|
|
|
|
lib/printf/glue.c \
|
2020-04-24 14:37:36 +02:00
|
|
|
lib/routing_nb.c \
|
|
|
|
lib/routing_nb_config.c \
|
2022-09-06 09:10:11 +02:00
|
|
|
lib/tc.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
# end
|
|
|
|
|
2018-11-19 19:18:37 +01:00
|
|
|
nodist_lib_libfrr_la_SOURCES = \
|
2022-11-03 14:30:23 +01:00
|
|
|
yang/frr-affinity-map.yang.c \
|
2019-10-01 22:56:16 +02:00
|
|
|
yang/frr-filter.yang.c \
|
2018-11-19 19:18:37 +01:00
|
|
|
yang/frr-interface.yang.c \
|
2019-09-30 15:34:49 +02:00
|
|
|
yang/frr-route-map.yang.c \
|
2018-11-19 19:18:37 +01:00
|
|
|
yang/frr-route-types.yang.c \
|
2019-12-09 03:18:04 +01:00
|
|
|
yang/frr-vrf.yang.c \
|
2019-12-11 06:57:37 +01:00
|
|
|
yang/frr-routing.yang.c \
|
2020-04-24 14:37:36 +02:00
|
|
|
yang/frr-nexthop.yang.c \
|
2019-10-09 22:19:50 +02:00
|
|
|
yang/ietf/ietf-routing-types.yang.c \
|
2020-02-04 01:09:29 +01:00
|
|
|
yang/ietf/ietf-interfaces.yang.c \
|
2020-07-23 20:40:18 +02:00
|
|
|
yang/ietf/ietf-bgp-types.yang.c \
|
2018-11-19 19:18:37 +01:00
|
|
|
yang/frr-module-translator.yang.c \
|
|
|
|
# end
|
|
|
|
|
2023-03-08 23:26:38 +01:00
|
|
|
# Add logic to build mgmt.proto
|
|
|
|
lib_libfrr_la_LIBADD += $(PROTOBUF_C_LIBS)
|
|
|
|
|
|
|
|
BUILT_SOURCES += \
|
|
|
|
lib/mgmt.pb-c.c \
|
|
|
|
lib/mgmt.pb-c.h \
|
|
|
|
# end
|
|
|
|
|
|
|
|
CLEANFILES += \
|
|
|
|
lib/mgmt.pb-c.h \
|
|
|
|
lib/mgmt.pb-c.c \
|
|
|
|
# end
|
|
|
|
|
|
|
|
lib_libfrr_la_SOURCES += \
|
|
|
|
lib/mgmt.pb-c.c \
|
|
|
|
#end
|
|
|
|
|
2017-12-07 20:31:48 +01:00
|
|
|
if SQLITE3
|
2019-01-30 18:11:54 +01:00
|
|
|
lib_libfrr_la_LIBADD += $(SQLITE3_LIBS)
|
2017-12-07 20:31:48 +01:00
|
|
|
lib_libfrr_la_SOURCES += lib/db.c
|
|
|
|
endif
|
|
|
|
|
2020-04-15 10:27:49 +02:00
|
|
|
clippy_scan += \
|
2022-11-03 14:30:23 +01:00
|
|
|
lib/affinitymap_cli.c \
|
2020-04-15 10:27:49 +02:00
|
|
|
lib/if.c \
|
2019-11-08 18:50:00 +01:00
|
|
|
lib/filter_cli.c \
|
2020-04-15 10:27:49 +02:00
|
|
|
lib/log_vty.c \
|
|
|
|
lib/nexthop_group.c \
|
|
|
|
lib/northbound_cli.c \
|
|
|
|
lib/plist.c \
|
2023-02-13 15:14:56 +01:00
|
|
|
lib/routemap.c \
|
2020-04-15 10:27:49 +02:00
|
|
|
lib/routemap_cli.c \
|
2021-04-13 20:38:09 +02:00
|
|
|
lib/thread.c \
|
2020-04-15 10:27:49 +02:00
|
|
|
lib/vty.c \
|
2020-04-29 10:26:05 +02:00
|
|
|
lib/zlog_5424_cli.c \
|
2020-04-15 10:27:49 +02:00
|
|
|
# end
|
2017-05-24 17:48:12 +02:00
|
|
|
|
|
|
|
pkginclude_HEADERS += \
|
2022-11-08 17:59:33 +01:00
|
|
|
lib/admin_group.h \
|
2022-11-03 14:30:23 +01:00
|
|
|
lib/affinitymap.h \
|
2018-08-03 19:18:59 +02:00
|
|
|
lib/agg_table.h \
|
2022-11-02 18:17:21 +01:00
|
|
|
lib/asn.h \
|
2016-11-08 18:11:20 +01:00
|
|
|
lib/atomlist.h \
|
2022-02-11 04:49:41 +01:00
|
|
|
lib/base64.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/bfd.h \
|
|
|
|
lib/bitfield.h \
|
|
|
|
lib/buffer.h \
|
|
|
|
lib/checksum.h \
|
2018-12-18 13:35:28 +01:00
|
|
|
lib/mlag.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/command.h \
|
|
|
|
lib/command_graph.h \
|
|
|
|
lib/command_match.h \
|
2017-08-23 20:22:31 +02:00
|
|
|
lib/compiler.h \
|
2022-01-13 10:15:51 +01:00
|
|
|
lib/cspf.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/csv.h \
|
2017-12-07 20:31:48 +01:00
|
|
|
lib/db.h \
|
2018-02-28 22:14:45 +01:00
|
|
|
lib/debug.h \
|
2018-10-26 15:25:25 +02:00
|
|
|
lib/defaults.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/distribute.h \
|
2016-09-28 23:19:50 +02:00
|
|
|
lib/ferr.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/filter.h \
|
2017-08-07 11:47:51 +02:00
|
|
|
lib/freebsd-queue.h \
|
2019-05-09 22:08:40 +02:00
|
|
|
lib/frrlua.h \
|
lib: start adding generic scripting stuff
Rather than let Luaisms propagate from the start, this is some generic
wrapper stuff that defines some semantics for interacting with scripts
that aren't specific to the underlying language.
The concept I have in mind for FRR's idea of a script is:
- has a name
- has some inputs, which have types
- has some outputs, which have types
I don't want to even say they have to be files; maybe we can embed
scripts in frr.conf, for example. Similarly the types of inputs and
outputs are probably going to end up being some language-specific setup.
For now, we will stick to this simple model, but the plan is to add full
object support (ie calling back into C).
This shouldn't be misconstrued as prepping for multilingual scripting
support, which is a bad idea for the following reasons:
- Each language would require different FFI methods, and specifically
different object encoders; a lot of code
- Languages have different capabilities that would have to be brought to
parity with each other; a lot of work
- Languages have *vastly* different performance characteristics; bad
impressions, lots of issues we can't do anything about
- Each language would need a dedicated maintainer for the above reasons;
pragmatically difficult
- Supporting multiple languages fractures the community and limits the
audience with which a given script can be shared
The only pro for multilingual support would be ease of use for users not
familiar with Lua but familiar with one of the other supported
languages. This is not enough to outweigh the cons.
In order to get rich scripting capabilities, we need to be able to pass
representations of internal objects to the scripts. For example, a
script that performs some computation based on information about a peer
needs access to some equivalent of `struct peer` for the peer in
question. To transfer these objects from C-space into Lua-space we need
to encode them onto the Lua stack. This patch adds a mapping from
arbitrary type names to the functions that encode objects of that type.
For example, the function that encodes `struct peer` into a Lua table
could be registered with:
bgp_peer_encoder_func(struct frrscript *fs, struct peer *peer)
{
// encode peer to Lua table, push to stack in fs->scriptinfo->L
}
frrscript_register_type_encoder("peer", bgp_peer_encoder_func);
Later on when calling a script that wants a peer, the plan is to be able
to specify the type name like so:
frrscript_call(script, "peer", peer);
Using C-style types for the type names would have been nice, it might be
possible to do this with preprocessor magic or possibly python
preprocessing later on.
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
mergeme no stdlib
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-11-29 01:02:39 +01:00
|
|
|
lib/frrscript.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/frr_pthread.h \
|
|
|
|
lib/frratomic.h \
|
2017-04-03 00:51:20 +02:00
|
|
|
lib/frrcu.h \
|
2018-05-11 21:32:06 +02:00
|
|
|
lib/frrstr.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/getopt.h \
|
|
|
|
lib/graph.h \
|
|
|
|
lib/hash.h \
|
|
|
|
lib/hook.h \
|
2019-06-02 21:02:07 +02:00
|
|
|
lib/iana_afi.h \
|
lib: Implement an allocator for 32 bit ID numbers
This commit introduces lib/id_alloc, which has facilities for both an ID number
allocator, and less efficient ID holding pools. The pools are meant to be a
temporary holding area for ID numbers meant to be re-used, and are implemented
as a linked-list stack.
The allocator itself is much more efficient with memory. Based on sizeof
values on my 64 bit desktop, the allocator requires around 155 KiB per
million IDs tracked.
IDs are ultimately tracked in a bit-map split into many "pages." The
allocator tracks a list of pages that have free bits, and which sections
of each page have free IDs, so there isn't any scanning required to find
a free ID. (The library utility ffs, or "Find First Set," is generally a
single CPU instruction.) At the moment, totally empty pages will not be
freed, so the memory utilization of this allocator will remain at the
high water mark.
The initial intended use case is for BGP's TX Addpath IDs to be pulled
from an allocator that tracks which IDs are in use, rather than a free
running counter. The allocator reserves ID #0 as a sentinel value for
an invalid ID numbers, and BGP will want ID #1 reserved as well. To
support this, the allocator allows for IDs to be explicitly reserved,
though be aware this is only practical to use with low numbered IDs
because the allocator must allocate pages in order.
Signed-off-by Mitchell Skiba <mskiba@amazon.com>
2018-05-17 21:06:08 +02:00
|
|
|
lib/id_alloc.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/if.h \
|
|
|
|
lib/if_rmap.h \
|
|
|
|
lib/imsg.h \
|
|
|
|
lib/ipaddr.h \
|
|
|
|
lib/jhash.h \
|
|
|
|
lib/json.h \
|
|
|
|
lib/keychain.h \
|
2020-07-22 18:41:57 +02:00
|
|
|
lib/ldp_sync.h \
|
2018-06-14 14:23:49 +02:00
|
|
|
lib/lib_errors.h \
|
2019-12-06 14:38:55 +01:00
|
|
|
lib/lib_vty.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/libfrr.h \
|
2020-09-28 21:49:22 +02:00
|
|
|
lib/libfrr_trace.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/libospf.h \
|
|
|
|
lib/linklist.h \
|
2020-05-26 14:51:02 +02:00
|
|
|
lib/link_state.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/log.h \
|
2019-06-13 23:46:29 +02:00
|
|
|
lib/log_vty.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/md5.h \
|
|
|
|
lib/memory.h \
|
2023-03-08 23:26:38 +01:00
|
|
|
lib/mgmt.pb-c.h \
|
|
|
|
lib/mgmt_fe_client.h \
|
|
|
|
lib/mgmt_pb.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/module.h \
|
|
|
|
lib/monotime.h \
|
|
|
|
lib/mpls.h \
|
2020-01-09 04:00:43 +01:00
|
|
|
lib/srv6.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/network.h \
|
|
|
|
lib/nexthop.h \
|
2018-01-26 16:12:35 +01:00
|
|
|
lib/nexthop_group.h \
|
2019-06-24 20:04:13 +02:00
|
|
|
lib/nexthop_group_private.h \
|
2017-12-07 20:31:48 +01:00
|
|
|
lib/northbound.h \
|
|
|
|
lib/northbound_cli.h \
|
|
|
|
lib/northbound_db.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/ns.h \
|
|
|
|
lib/openbsd-queue.h \
|
|
|
|
lib/openbsd-tree.h \
|
|
|
|
lib/plist.h \
|
|
|
|
lib/prefix.h \
|
2019-05-12 21:10:04 +02:00
|
|
|
lib/printfrr.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/privs.h \
|
|
|
|
lib/ptm_lib.h \
|
2019-05-09 10:43:09 +02:00
|
|
|
lib/pullwr.h \
|
2017-05-15 17:09:28 +02:00
|
|
|
lib/pw.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/qobj.h \
|
2017-08-07 11:47:51 +02:00
|
|
|
lib/queue.h \
|
2017-12-19 22:28:45 +01:00
|
|
|
lib/ringbuf.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/routemap.h \
|
2021-04-18 20:53:19 +02:00
|
|
|
lib/route_opaque.h \
|
2017-05-08 13:18:21 +02:00
|
|
|
lib/sbuf.h \
|
2015-05-25 06:36:10 +02:00
|
|
|
lib/seqlock.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/sha256.h \
|
|
|
|
lib/sigevent.h \
|
|
|
|
lib/skiplist.h \
|
2018-09-06 02:47:07 +02:00
|
|
|
lib/smux.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/sockopt.h \
|
|
|
|
lib/sockunion.h \
|
|
|
|
lib/spf_backoff.h \
|
|
|
|
lib/srcdest_table.h \
|
2020-07-20 13:43:54 +02:00
|
|
|
lib/srte.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/stream.h \
|
|
|
|
lib/systemd.h \
|
|
|
|
lib/table.h \
|
|
|
|
lib/termtable.h \
|
|
|
|
lib/thread.h \
|
2020-09-28 23:22:53 +02:00
|
|
|
lib/trace.h \
|
2019-01-31 04:25:38 +01:00
|
|
|
lib/typerb.h \
|
2019-01-31 01:09:13 +01:00
|
|
|
lib/typesafe.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/vector.h \
|
|
|
|
lib/vlan.h \
|
|
|
|
lib/vrf.h \
|
|
|
|
lib/vrf_int.h \
|
|
|
|
lib/vty.h \
|
|
|
|
lib/vxlan.h \
|
|
|
|
lib/wheel.h \
|
|
|
|
lib/workqueue.h \
|
2018-08-09 22:50:19 +02:00
|
|
|
lib/xref.h \
|
2017-12-07 20:31:48 +01:00
|
|
|
lib/yang.h \
|
|
|
|
lib/yang_translator.h \
|
|
|
|
lib/yang_wrappers.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/zclient.h \
|
|
|
|
lib/zebra.h \
|
2017-05-06 06:40:17 +02:00
|
|
|
lib/zlog.h \
|
2020-04-29 10:26:05 +02:00
|
|
|
lib/zlog_5424.h \
|
2019-12-04 08:10:42 +01:00
|
|
|
lib/zlog_live.h \
|
2017-05-06 06:40:17 +02:00
|
|
|
lib/zlog_targets.h \
|
2018-03-21 11:55:38 +01:00
|
|
|
lib/pbr.h \
|
2022-09-06 09:10:11 +02:00
|
|
|
lib/tc.h \
|
2020-04-24 14:37:36 +02:00
|
|
|
lib/routing_nb.h \
|
2021-03-16 11:03:44 +01:00
|
|
|
\
|
|
|
|
lib/assert/assert.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
# end
|
|
|
|
|
2018-04-19 17:35:16 +02:00
|
|
|
|
2017-08-04 10:36:34 +02:00
|
|
|
nodist_pkginclude_HEADERS += \
|
|
|
|
lib/route_types.h \
|
|
|
|
lib/version.h \
|
|
|
|
# end
|
|
|
|
|
2017-05-24 17:48:12 +02:00
|
|
|
noinst_HEADERS += \
|
|
|
|
lib/clippy.h \
|
|
|
|
lib/plist_int.h \
|
2019-05-12 21:10:04 +02:00
|
|
|
lib/printf/printfcommon.h \
|
|
|
|
lib/printf/printflocal.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
#end
|
|
|
|
|
2018-09-10 20:10:19 +02:00
|
|
|
# General note about module and module helper library (libfrrsnmp, libfrrzmq)
|
|
|
|
# linking: If we're linking libfrr statically into daemons, we *must* remove
|
|
|
|
# libfrr from modules because modules will always link it in dynamically and
|
|
|
|
# thus 2 copies of libfrr will be loaded... hilarity ensues.
|
|
|
|
#
|
|
|
|
# Not linking libfrr into modules should generally work fine because the
|
|
|
|
# executable refers to libfrr either way and the dynamic linker should make
|
|
|
|
# libfrr available to modules. If some OS platform has a dynamic linker that
|
|
|
|
# doesn't do that, libfrr needs to be readded to modules, but _only_ _if_
|
|
|
|
# it's not linked into daemons statically.
|
|
|
|
|
2017-05-24 17:48:12 +02:00
|
|
|
#
|
|
|
|
# SNMP support
|
|
|
|
#
|
|
|
|
if SNMP
|
|
|
|
lib_LTLIBRARIES += lib/libfrrsnmp.la
|
|
|
|
endif
|
|
|
|
|
2021-04-21 11:54:48 +02:00
|
|
|
lib_libfrrsnmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
|
2021-07-21 11:04:23 +02:00
|
|
|
lib_libfrrsnmp_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
|
2018-09-10 20:10:19 +02:00
|
|
|
lib_libfrrsnmp_la_LIBADD = $(SNMP_LIBS)
|
2017-05-24 17:48:12 +02:00
|
|
|
lib_libfrrsnmp_la_SOURCES = \
|
|
|
|
lib/agentx.c \
|
|
|
|
lib/snmp.c \
|
|
|
|
# end
|
|
|
|
|
2022-05-07 19:23:09 +02:00
|
|
|
|
2019-05-23 12:23:02 +02:00
|
|
|
#
|
|
|
|
# c-ares support
|
|
|
|
#
|
|
|
|
if CARES
|
|
|
|
lib_LTLIBRARIES += lib/libfrrcares.la
|
|
|
|
pkginclude_HEADERS += lib/resolver.h
|
|
|
|
endif
|
|
|
|
|
2021-04-21 11:54:48 +02:00
|
|
|
lib_libfrrcares_la_CFLAGS = $(AM_CFLAGS) $(CARES_CFLAGS)
|
2021-07-21 11:04:23 +02:00
|
|
|
lib_libfrrcares_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
|
2019-05-23 12:23:02 +02:00
|
|
|
lib_libfrrcares_la_LIBADD = $(CARES_LIBS)
|
|
|
|
lib_libfrrcares_la_SOURCES = \
|
|
|
|
lib/resolver.c \
|
|
|
|
#end
|
|
|
|
|
2017-05-17 18:27:54 +02:00
|
|
|
#
|
|
|
|
# ZeroMQ support
|
|
|
|
#
|
|
|
|
if ZEROMQ
|
|
|
|
lib_LTLIBRARIES += lib/libfrrzmq.la
|
|
|
|
pkginclude_HEADERS += lib/frr_zmq.h
|
|
|
|
endif
|
|
|
|
|
2021-04-21 11:54:48 +02:00
|
|
|
lib_libfrrzmq_la_CFLAGS = $(AM_CFLAGS) $(ZEROMQ_CFLAGS)
|
2021-07-21 11:04:23 +02:00
|
|
|
lib_libfrrzmq_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
|
2018-09-10 20:10:19 +02:00
|
|
|
lib_libfrrzmq_la_LIBADD = $(ZEROMQ_LIBS)
|
2017-05-17 18:27:54 +02:00
|
|
|
lib_libfrrzmq_la_SOURCES = \
|
|
|
|
lib/frr_zmq.c \
|
|
|
|
#end
|
|
|
|
|
2018-05-24 01:11:59 +02:00
|
|
|
#
|
|
|
|
# Tail-f's ConfD support
|
|
|
|
#
|
|
|
|
if CONFD
|
|
|
|
module_LTLIBRARIES += lib/confd.la
|
|
|
|
endif
|
|
|
|
|
2021-04-21 11:54:48 +02:00
|
|
|
lib_confd_la_CFLAGS = $(AM_CFLAGS) $(CONFD_CFLAGS)
|
2021-07-21 11:04:23 +02:00
|
|
|
lib_confd_la_LDFLAGS = $(MODULE_LDFLAGS)
|
2019-01-30 18:11:54 +01:00
|
|
|
lib_confd_la_LIBADD = lib/libfrr.la $(CONFD_LIBS)
|
2018-05-24 01:11:59 +02:00
|
|
|
lib_confd_la_SOURCES = lib/northbound_confd.c
|
|
|
|
|
2018-05-24 01:12:29 +02:00
|
|
|
#
|
|
|
|
# Sysrepo support
|
|
|
|
#
|
|
|
|
if SYSREPO
|
|
|
|
module_LTLIBRARIES += lib/sysrepo.la
|
|
|
|
endif
|
|
|
|
|
2021-04-21 11:54:48 +02:00
|
|
|
lib_sysrepo_la_CFLAGS = $(AM_CFLAGS) $(SYSREPO_CFLAGS)
|
2021-07-21 11:04:23 +02:00
|
|
|
lib_sysrepo_la_LDFLAGS = $(MODULE_LDFLAGS)
|
2019-01-30 18:11:54 +01:00
|
|
|
lib_sysrepo_la_LIBADD = lib/libfrr.la $(SYSREPO_LIBS)
|
2018-05-24 01:12:29 +02:00
|
|
|
lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c
|
|
|
|
|
2019-01-25 21:54:16 +01:00
|
|
|
#
|
|
|
|
# gRPC northbound plugin
|
|
|
|
#
|
|
|
|
if GRPC
|
|
|
|
module_LTLIBRARIES += lib/grpc.la
|
|
|
|
endif
|
|
|
|
|
|
|
|
lib_grpc_la_CXXFLAGS = $(WERROR) $(GRPC_CFLAGS)
|
2021-07-21 11:04:23 +02:00
|
|
|
lib_grpc_la_LDFLAGS = $(MODULE_LDFLAGS)
|
2019-01-25 21:54:16 +01:00
|
|
|
lib_grpc_la_LIBADD = lib/libfrr.la grpc/libfrrgrpc_pb.la $(GRPC_LIBS)
|
|
|
|
lib_grpc_la_SOURCES = lib/northbound_grpc.cpp
|
|
|
|
|
2017-05-24 17:48:12 +02:00
|
|
|
#
|
|
|
|
# CLI utilities
|
|
|
|
#
|
|
|
|
noinst_PROGRAMS += \
|
|
|
|
lib/grammar_sandbox \
|
|
|
|
# end
|
|
|
|
|
2017-08-03 13:31:28 +02:00
|
|
|
if BUILD_CLIPPY
|
|
|
|
noinst_PROGRAMS += lib/clippy
|
|
|
|
else
|
2019-06-04 15:35:16 +02:00
|
|
|
if HOSTTOOLS_CLIPPY
|
|
|
|
$(CLIPPY):
|
|
|
|
@$(MAKE) -C $(top_builddir)/hosttools lib/route_types.h lib/clippy
|
|
|
|
endif
|
2017-08-03 13:31:28 +02:00
|
|
|
endif
|
|
|
|
|
2017-05-24 17:48:12 +02:00
|
|
|
lib_grammar_sandbox_SOURCES = \
|
|
|
|
lib/grammar_sandbox_main.c
|
|
|
|
lib_grammar_sandbox_LDADD = \
|
|
|
|
lib/libfrr.la
|
|
|
|
|
2021-03-16 11:03:44 +01:00
|
|
|
lib_clippy_CPPFLAGS = $(CPPFLAGS_BASE) -D_GNU_SOURCE -DBUILDING_CLIPPY
|
2021-04-21 11:54:48 +02:00
|
|
|
lib_clippy_CFLAGS = $(AC_CFLAGS) $(PYTHON_CFLAGS)
|
2018-08-09 19:11:53 +02:00
|
|
|
lib_clippy_LDADD = $(PYTHON_LIBS) $(UST_LIBS) -lelf
|
2021-07-21 11:04:23 +02:00
|
|
|
# no $(SAN_FLAGS) here
|
|
|
|
lib_clippy_LDFLAGS = -export-dynamic $(AC_LDFLAGS) $(AC_LDFLAGS_EXEC)
|
2017-05-24 17:48:12 +02:00
|
|
|
lib_clippy_SOURCES = \
|
2018-08-09 22:50:19 +02:00
|
|
|
lib/jhash.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/clippy.c \
|
|
|
|
lib/command_graph.c \
|
|
|
|
lib/command_lex.l \
|
|
|
|
lib/command_parse.y \
|
|
|
|
lib/command_py.c \
|
|
|
|
lib/defun_lex.l \
|
2018-08-09 19:11:53 +02:00
|
|
|
lib/elf_py.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/graph.c \
|
2020-09-28 21:49:22 +02:00
|
|
|
lib/libfrr_trace.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/memory.c \
|
2018-08-09 19:11:53 +02:00
|
|
|
lib/typesafe.c \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/vector.c \
|
|
|
|
# end
|
|
|
|
|
2018-08-18 05:34:59 +02:00
|
|
|
# (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 =
|
|
|
|
|
2019-06-04 15:35:16 +02:00
|
|
|
CLIPPY_DEPS = $(CLIPPY) $(top_srcdir)/python/clidef.py
|
2018-08-18 05:34:59 +02:00
|
|
|
|
2020-05-04 18:39:35 +02:00
|
|
|
SUFFIXES += _clippy.c
|
2018-08-18 05:34:59 +02:00
|
|
|
.c_clippy.c:
|
2019-06-04 15:35:16 +02:00
|
|
|
$(AM_V_CLIPPY) $(CLIPPY) $(top_srcdir)/python/clidef.py -o $@ $<
|
2018-08-18 05:34:59 +02:00
|
|
|
|
2020-04-28 13:17:20 +02:00
|
|
|
# xrelfo, the ELF xref extractor
|
|
|
|
|
|
|
|
AM_V_XRELFO = $(am__v_XRELFO_$(V))
|
|
|
|
am__v_XRELFO_ = $(am__v_XRELFO_$(AM_DEFAULT_VERBOSITY))
|
|
|
|
am__v_XRELFO_0 = @echo " XRELFO " $@;
|
|
|
|
am__v_XRELFO_1 =
|
|
|
|
|
2021-02-14 00:53:27 +01:00
|
|
|
XRELFO_FLAGS = -Wlog-format -Wlog-args
|
|
|
|
|
2020-04-28 13:17:20 +02:00
|
|
|
SUFFIXES += .xref
|
|
|
|
%.xref: % $(CLIPPY)
|
2021-04-13 20:57:25 +02:00
|
|
|
$(AM_V_XRELFO) $(CLIPPY) $(top_srcdir)/python/xrelfo.py $(WERROR) $(XRELFO_FLAGS) -o $@ $<
|
2020-04-28 13:17:20 +02:00
|
|
|
|
|
|
|
# dependencies added in python/makefile.py
|
|
|
|
frr.xref:
|
2022-10-04 18:44:36 +02:00
|
|
|
$(AM_V_XRELFO) $(CLIPPY) $(top_srcdir)/python/xrelfo.py -o $@ -c vtysh/vtysh_cmd.c $^
|
2020-04-28 13:17:20 +02:00
|
|
|
all-am: frr.xref
|
|
|
|
|
|
|
|
clean-xref:
|
|
|
|
-rm -rf $(xrefs) frr.xref
|
|
|
|
clean-local: clean-xref
|
|
|
|
|
2022-10-04 18:44:36 +02:00
|
|
|
CLEANFILES += vtysh/vtysh_cmd.c
|
|
|
|
vtysh/vtysh_cmd.c: frr.xref
|
|
|
|
@test -f $@ || rm -f frr.xref || true
|
|
|
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) frr.xref
|
|
|
|
|
2018-08-18 05:34:59 +02:00
|
|
|
## 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) $<
|
2017-05-24 17:48:12 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# generated sources & extra foo
|
|
|
|
#
|
|
|
|
EXTRA_DIST += \
|
|
|
|
lib/command_lex.h \
|
2017-08-04 10:36:34 +02:00
|
|
|
lib/command_parse.h \
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/gitversion.pl \
|
|
|
|
lib/route_types.pl \
|
|
|
|
lib/route_types.txt \
|
|
|
|
# end
|
|
|
|
|
|
|
|
BUILT_SOURCES += \
|
|
|
|
lib/gitversion.h \
|
|
|
|
lib/route_types.h \
|
|
|
|
# end
|
|
|
|
|
2017-07-31 22:38:48 +02:00
|
|
|
## force route_types.h
|
|
|
|
$(lib_clippy_OBJECTS): lib/route_types.h
|
|
|
|
$(lib_libfrr_la_OBJECTS): lib/route_types.h
|
|
|
|
|
2017-05-24 17:48:12 +02:00
|
|
|
AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
|
|
|
|
|
|
|
|
lib/command_lex.h: lib/command_lex.c
|
|
|
|
@if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi
|
|
|
|
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
|
2017-07-31 22:38:48 +02:00
|
|
|
lib/command_lex.lo: lib/command_parse.h
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/command_parse.lo: lib/command_lex.h
|
2019-01-30 18:11:54 +01:00
|
|
|
lib/clippy-command_lex.$(OBJEXT): lib/command_parse.h
|
|
|
|
lib/clippy-command_parse.$(OBJEXT): lib/command_lex.h
|
2017-07-31 22:38:48 +02:00
|
|
|
lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
|
|
|
|
|
2022-03-23 14:03:14 +01:00
|
|
|
DISTCLEANFILES += lib/command_lex.h \
|
|
|
|
lib/command_lex.c \
|
|
|
|
lib/command_parse.h \
|
|
|
|
lib/command_parse.c
|
|
|
|
|
2020-09-30 15:04:50 +02:00
|
|
|
rt_enabled =
|
|
|
|
|
|
|
|
if BABELD
|
|
|
|
rt_enabled += --enabled babeld
|
|
|
|
endif
|
|
|
|
if BFDD
|
|
|
|
rt_enabled += --enabled bfdd
|
|
|
|
endif
|
|
|
|
if BGPD
|
|
|
|
rt_enabled += --enabled bgpd
|
|
|
|
if ENABLE_BGP_VNC
|
|
|
|
rt_enabled += --enabled bgpd-vnc
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
if EIGRPD
|
|
|
|
rt_enabled += --enabled eigrpd
|
|
|
|
endif
|
|
|
|
if ISISD
|
|
|
|
rt_enabled += --enabled isisd
|
|
|
|
endif
|
|
|
|
if FABRICD
|
|
|
|
rt_enabled += --enabled fabricd
|
|
|
|
endif
|
|
|
|
if LDPD
|
|
|
|
rt_enabled += --enabled ldpd
|
|
|
|
endif
|
|
|
|
if NHRPD
|
|
|
|
rt_enabled += --enabled nhrpd
|
|
|
|
endif
|
|
|
|
if OSPFD
|
|
|
|
rt_enabled += --enabled ospfd
|
|
|
|
endif
|
|
|
|
if OSPF6D
|
|
|
|
rt_enabled += --enabled ospf6d
|
|
|
|
endif
|
|
|
|
if PBRD
|
|
|
|
rt_enabled += --enabled pbrd
|
|
|
|
endif
|
|
|
|
if PIMD
|
|
|
|
rt_enabled += --enabled pimd
|
|
|
|
endif
|
|
|
|
if RIPD
|
|
|
|
rt_enabled += --enabled ripd
|
|
|
|
endif
|
|
|
|
if RIPNGD
|
|
|
|
rt_enabled += --enabled ripngd
|
|
|
|
endif
|
|
|
|
if SHARPD
|
|
|
|
rt_enabled += --enabled sharpd
|
|
|
|
endif
|
|
|
|
if ZEBRA
|
|
|
|
rt_enabled += --enabled zebra
|
|
|
|
endif
|
|
|
|
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
|
2023-01-24 17:45:13 +01:00
|
|
|
@$(MKDIR_P) lib
|
2020-09-30 15:04:50 +02:00
|
|
|
$(PERL) $(top_srcdir)/lib/route_types.pl $(rt_enabled) < $(top_srcdir)/lib/route_types.txt > $@
|
2018-10-24 17:44:04 +02:00
|
|
|
DISTCLEANFILES += lib/route_types.h
|
2017-05-24 17:48:12 +02:00
|
|
|
|
|
|
|
if GIT_VERSION
|
|
|
|
# bit of a trick here to always have up-to-date git stamps without triggering
|
2022-04-19 14:11:29 +02:00
|
|
|
# unnecessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
|
2017-05-24 17:48:12 +02:00
|
|
|
# but if we use that on gitversion.h it'll ripple through the .c file deps.
|
|
|
|
# (even if gitversion.h's file timestamp doesn't change, make will think it
|
|
|
|
# did, because of .PHONY...)
|
|
|
|
|
2018-08-15 22:59:31 +02:00
|
|
|
PHONY_GITVERSION=lib/gitversion.h.tmp
|
2017-05-24 17:48:12 +02:00
|
|
|
.SILENT: lib/gitversion.h lib/gitversion.h.tmp
|
|
|
|
GITH=lib/gitversion.h
|
|
|
|
lib/gitversion.h.tmp: $(top_srcdir)/.git
|
2023-01-24 17:45:13 +01:00
|
|
|
@$(MKDIR_P) lib
|
2019-01-30 18:11:54 +01:00
|
|
|
$(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/gitversion.h: lib/gitversion.h.tmp
|
2017-08-02 03:12:24 +02:00
|
|
|
{ test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
|
2017-05-24 17:48:12 +02:00
|
|
|
|
|
|
|
else
|
2018-08-15 22:59:31 +02:00
|
|
|
PHONY_GITVERSION=lib/gitversion.h
|
2017-05-24 17:48:12 +02:00
|
|
|
lib/gitversion.h:
|
|
|
|
true
|
|
|
|
endif
|
2018-08-15 22:59:31 +02:00
|
|
|
.PHONY: $(PHONY_GITVERSION)
|