Skip to content

Commit

Permalink
build: make builddir include path consistent
Browse files Browse the repository at this point in the history
... by referencing all autogenerated headers relative to the root
directory.  (90% of the changes here is `version.h`.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
  • Loading branch information
eqvinox committed Apr 21, 2021
1 parent 9219708 commit 0978119
Show file tree
Hide file tree
Showing 38 changed files with 41 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AM_CFLAGS = \
# end
AM_CPPFLAGS = \
-I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \
-I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib \
-I$(top_builddir) \
$(LUA_INCLUDE) \
# end
AM_LDFLAGS = \
Expand Down
2 changes: 1 addition & 1 deletion babeld/babel_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ THE SOFTWARE.
#include "thread.h"
#include "privs.h"
#include "sigevent.h"
#include "version.h"
#include "lib/version.h"
#include "command.h"
#include "vty.h"
#include "memory.h"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "lib_errors.h"
#include "stream.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"
#include "jhash.h"
#include "termtable.h"

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_mplsvpn_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "filter.h"
#include "hook.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#include "bgpd/bgpd.h"
#include "bgpd/bgp_route.h"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_rpki.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#endif
#include "hook.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#ifndef VTYSH_EXTRACT_PL
#include "bgpd/bgp_rpki_clippy.c"
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "filter.h"
#include "hook.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#include "bgpd/bgpd.h"
#include "bgpd/bgp_table.h"
Expand Down
2 changes: 1 addition & 1 deletion fpm/fpm_pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#ifndef _FPM_PB_H
#define _FPM_PB_H

#include "route_types.h"
#include "lib/route_types.h"
#include "qpb/qpb.h"

#include "fpm/fpm.pb-c.h"
Expand Down
2 changes: 1 addition & 1 deletion isisd/isis_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "memory.h"
#include "smux.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#include "isisd/isis_constants.h"
#include "isisd/isis_common.h"
Expand Down
2 changes: 1 addition & 1 deletion ldpd/ldp_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "memory.h"
#include "smux.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"
#include "ldpd.h"
#include "ldpe.h"

Expand Down
2 changes: 1 addition & 1 deletion lib/agentx.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "smux.h"
#include "memory.h"
#include "linklist.h"
#include "version.h"
#include "lib/version.h"
#include "lib_errors.h"
#include "xref.h"

Expand Down
2 changes: 1 addition & 1 deletion lib/command_lex.l
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wmissing-prototypes"

#include "command_parse.h"
#include "lib/command_parse.h"

#define YY_USER_ACTION yylloc->last_column += yyleng;
#define LOC_STEP do { if (yylloc) { \
Expand Down
2 changes: 1 addition & 1 deletion lib/command_parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

%code provides {
#ifndef FLEX_SCANNER
#include "command_lex.h"
#include "lib/command_lex.h"
#endif

extern void set_lexer_string (yyscan_t *scn, const char *string);
Expand Down
2 changes: 1 addition & 1 deletion lib/defaults.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <zebra.h>

#include "defaults.h"
#include "version.h"
#include "lib/version.h"

static char df_version[128] = FRR_VER_SHORT, df_profile[128] = DFLT_NAME;
static struct frr_default *dflt_first = NULL, **dflt_next = &dflt_first;
Expand Down
2 changes: 1 addition & 1 deletion lib/libfrr.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "privs.h"
#include "vty.h"
#include "command.h"
#include "version.h"
#include "lib/version.h"
#include "lib_vty.h"
#include "log_vty.h"
#include "zclient.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "module.h"
#include "memory.h"
#include "version.h"
#include "lib/version.h"

DEFINE_MTYPE_STATIC(LIB, MODULE_LOADNAME, "Module loading name");
DEFINE_MTYPE_STATIC(LIB, MODULE_LOADARGS, "Module loading arguments");
Expand Down
2 changes: 1 addition & 1 deletion lib/northbound_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <zebra.h>

#include "libfrr.h"
#include "version.h"
#include "lib/version.h"
#include "defaults.h"
#include "log.h"
#include "lib_errors.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/northbound_confd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "command.h"
#include "debug.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"
#include "northbound.h"

#include <confd_lib.h>
Expand Down
2 changes: 1 addition & 1 deletion lib/northbound_grpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "log.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"
#include "command.h"
#include "lib_errors.h"
#include "northbound.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/northbound_sysrepo.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "debug.h"
#include "memory.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"
#include "northbound.h"

#include <sysrepo.h>
Expand Down
2 changes: 1 addition & 1 deletion lib/pid_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <zebra.h>
#include <fcntl.h>
#include <log.h>
#include "version.h"
#include "lib/version.h"
#include "network.h"
#include "lib_errors.h"

Expand Down
2 changes: 1 addition & 1 deletion lib/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define _ZEBRA_VERSION_H

#ifdef GIT_VERSION
#include "gitversion.h"
#include "lib/gitversion.h"
#endif

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion lib/zebra.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ struct in_pktinfo {
#include "compiler.h"

/* Zebra route's types are defined in route_types.h */
#include "route_types.h"
#include "lib/route_types.h"

#define strmatch(a,b) (!strcmp((a), (b)))

Expand Down
2 changes: 1 addition & 1 deletion nhrpd/nhrp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "getopt.h"
#include "thread.h"
#include "sigevent.h"
#include "version.h"
#include "lib/version.h"
#include "log.h"
#include "memory.h"
#include "command.h"
Expand Down
2 changes: 1 addition & 1 deletion ospf6d/ospf6_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "vrf.h"
#include "smux.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#include "ospf6_proto.h"
#include "ospf6_lsa.h"
Expand Down
2 changes: 1 addition & 1 deletion ospfd/ospf_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "memory.h"
#include "smux.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#include "ospfd/ospfd.h"
#include "ospfd/ospf_interface.h"
Expand Down
2 changes: 1 addition & 1 deletion pathd/path_pcep.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "command.h"
#include "libfrr.h"
#include "printfrr.h"
#include "version.h"
#include "lib/version.h"
#include "northbound.h"
#include "frr_pthread.h"
#include "jhash.h"
Expand Down
2 changes: 1 addition & 1 deletion pathd/path_pcep_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "command.h"
#include "libfrr.h"
#include "printfrr.h"
#include "version.h"
#include "lib/version.h"
#include "northbound.h"
#include "frr_pthread.h"
#include "jhash.h"
Expand Down
2 changes: 1 addition & 1 deletion pathd/path_pcep_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "command.h"
#include "libfrr.h"
#include "printfrr.h"
#include "version.h"
#include "lib/version.h"
#include "northbound.h"
#include "frr_pthread.h"
#include "jhash.h"
Expand Down
2 changes: 1 addition & 1 deletion pathd/path_pcep_pcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "command.h"
#include "libfrr.h"
#include "printfrr.h"
#include "version.h"
#include "lib/version.h"
#include "northbound.h"
#include "frr_pthread.h"
#include "jhash.h"
Expand Down
4 changes: 2 additions & 2 deletions pimd/pim_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "log.h"
#include "privs.h"
#include "version.h"
#include "lib/version.h"
#include <getopt.h>
#include "command.h"
#include "thread.h"
Expand All @@ -32,7 +32,7 @@
#include "filter.h"
#include "vty.h"
#include "sigevent.h"
#include "version.h"
#include "lib/version.h"
#include "prefix.h"
#include "plist.h"
#include "vrf.h"
Expand Down
2 changes: 1 addition & 1 deletion ripd/rip_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "table.h"
#include "smux.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#include "ripd/ripd.h"

Expand Down
3 changes: 3 additions & 0 deletions version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "lib/compiler.h"
CPP_NOTICE("Trying to include version.h. Please fix to use lib/version.h.")
#include "lib/version.h"
2 changes: 1 addition & 1 deletion zebra/irdp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "privs.h"
#include "libfrr.h"
#include "lib_errors.h"
#include "version.h"
#include "lib/version.h"
#include "zebra/interface.h"
#include "zebra/rtadv.h"
#include "zebra/rib.h"
Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_fpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "thread.h"
#include "network.h"
#include "command.h"
#include "version.h"
#include "lib/version.h"
#include "jhash.h"

#include "zebra/rib.h"
Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_mlag_private.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "thread.h"
#include "frr_pthread.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"
#include "network.h"

#include "lib/stream.h"
Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_ptm.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "ptm_lib.h"
#include "rib.h"
#include "stream.h"
#include "version.h"
#include "lib/version.h"
#include "vrf.h"
#include "vty.h"
#include "lib_errors.h"
Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "plist.h"
#include "nexthop.h"
#include "northbound_cli.h"
#include "route_types.h"
#include "lib/route_types.h"
#include "vrf.h"
#include "frrstr.h"

Expand Down
2 changes: 1 addition & 1 deletion zebra/zebra_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "vrf.h"
#include "hook.h"
#include "libfrr.h"
#include "version.h"
#include "lib/version.h"

#include "zebra/rib.h"
#include "zebra/zserv.h"
Expand Down

0 comments on commit 0978119

Please sign in to comment.