Cleanup of config/includes.

Remove a use of AH_BOTTOM from configure.ac. This macro is used by
autoheader to add '#include' of some include file to the end of
config.h.in and then to config.h. OpenOCD can be built with a custom
config.h, so it's preferable to move these '#include' statement directly
in the C files that need them dropping this unneeded dependency.

It also causes problems when I want to use the gnulib library (which
comes with its own Makefile, and does not have the same include path as
the top-level Makefile).

So this change touches a lot of files, but is actually really simple. It
does not affect functionality at all.

Change-Id: I52c70bf15eb2edc1dd10e0fde23b2bcd4caec000
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: http://openocd.zylin.com/6171
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Tim Newsome
2021-04-19 13:04:30 -07:00
committed by Antonio Borneo
parent b44948985f
commit 87c90393fe
56 changed files with 81 additions and 17 deletions

View File

@@ -19,6 +19,8 @@
#include "config.h"
#endif
#include <helper/system.h>
#ifdef _WIN32
#include <windows.h>
#else

View File

@@ -27,6 +27,7 @@
#include <target/target.h>
#include <jtag/aice/aice_interface.h>
#include <jtag/aice/aice_transport.h>
#include <string.h>
/* */
static int jim_newtap_expected_id(Jim_Nvp *n, Jim_GetOptInfo *goi,

View File

@@ -19,6 +19,7 @@
#include "config.h"
#endif
#include <helper/system.h>
#include <jtag/drivers/libusb_helper.h>
#include <helper/log.h>
#include <helper/time_support.h>

View File

@@ -35,6 +35,7 @@
#include "interface.h"
#include <transport/transport.h>
#include <helper/jep106.h>
#include "helper/system.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>

View File

@@ -22,6 +22,7 @@
#include <jtag/interface.h>
#include <jtag/commands.h>
#include "helper/system.h"
#include "libusb_helper.h"
#define USB_VID 0x15ba

View File

@@ -36,6 +36,7 @@
#endif
#include <transport/transport.h>
#include "helper/replacements.h"
#include <jtag/swd.h>
#include <jtag/interface.h>
#include <jtag/commands.h>

View File

@@ -35,8 +35,10 @@
#include "config.h"
#endif
#include <helper/system.h>
#include <libusb.h>
#include <helper/log.h>
#include <helper/replacements.h>
#include "cmsis_dap.h"

View File

@@ -35,6 +35,7 @@
#include "config.h"
#endif
#include <string.h>
#include <hidapi.h>
#include <helper/log.h>

View File

@@ -74,6 +74,7 @@
#include <jtag/swd.h>
#include <transport/transport.h>
#include <helper/time_support.h>
#include <helper/log.h>
#if IS_CYGWIN == 1
#include <windows.h>

View File

@@ -39,6 +39,7 @@
#include <jtag/swd.h>
#include <jtag/commands.h>
#include <jtag/drivers/jtag_usb_common.h>
#include <src/helper/replacements.h>
#include <target/cortex_m.h>
#include <libjaylink/libjaylink.h>

View File

@@ -4,6 +4,7 @@
*/
#include <helper/log.h>
#include <string.h>
#include "jtag_usb_common.h"

View File

@@ -6,6 +6,9 @@
#ifndef OPENOCD_JTAG_USB_COMMON_H
#define OPENOCD_JTAG_USB_COMMON_H
#include <helper/replacements.h>
#include <helper/types.h>
void jtag_usb_set_location(const char *location);
const char *jtag_usb_get_location(void);
bool jtag_usb_location_equal(uint8_t dev_bus, uint8_t *port_path,

View File

@@ -33,7 +33,7 @@
#include <netinet/tcp.h>
#endif
#include <string.h>
#include "helper/replacements.h"
#define NO_TAP_SHIFT 0
#define TAP_SHIFT 1

View File

@@ -22,6 +22,7 @@
#include "mpsse.h"
#include "helper/log.h"
#include "helper/replacements.h"
#include "helper/time_support.h"
#include <libusb.h>

View File

@@ -24,6 +24,8 @@
#include <sys/un.h>
#include <netdb.h>
#endif
#include "helper/system.h"
#include "helper/replacements.h"
#include <jtag/interface.h>
#include "bitbang.h"

View File

@@ -29,6 +29,7 @@
/* project specific includes */
#include <jtag/interface.h>
#include <jtag/commands.h>
#include "helper/replacements.h"
#include "rlink.h"
#include "rlink_st7.h"
#include "rlink_ep1_cmd.h"

View File

@@ -19,6 +19,7 @@
#ifndef OPENOCD_JTAG_DRIVERS_RLINK_H
#define OPENOCD_JTAG_DRIVERS_RLINK_H
#include "helper/types.h"
struct rlink_speed_table {
uint8_t const *dtc;
uint16_t dtc_size;

View File

@@ -35,6 +35,7 @@
/* project specific includes */
#include <helper/binarybuffer.h>
#include <helper/bits.h>
#include <helper/system.h>
#include <jtag/interface.h>
#include <jtag/hla/hla_layout.h>
#include <jtag/hla/hla_transport.h>

View File

@@ -21,6 +21,7 @@
#endif
#include <math.h>
#include "helper/system.h"
#include <jtag/interface.h>
#include <jtag/commands.h>
#include <target/image.h>

View File

@@ -23,6 +23,7 @@
#endif
#include <jtag/interface.h>
#include <jtag/commands.h>
#include "helper/system.h"
#include <libusb_helper.h>
#include <target/image.h>

View File

@@ -77,6 +77,7 @@
#include <jtag/interface.h>
#include <jtag/commands.h>
#include <helper/time_support.h>
#include <helper/replacements.h>
#include "ublast_access.h"
/* system includes */

View File

@@ -19,11 +19,12 @@
#include "config.h"
#endif
#include "versaloon_include.h"
#include <stdio.h>
#include <string.h>
#include <libusb.h>
#include "versaloon_include.h"
#include "versaloon.h"
#include "versaloon_internal.h"
#include "usbtoxxx/usbtoxxx.h"

View File

@@ -18,6 +18,7 @@
#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H
#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H
#include "helper/system.h"
/* This file is used to include different header and macros */
/* according to different platform */
#include <jtag/interface.h>

View File

@@ -24,6 +24,7 @@
#include <helper/binarybuffer.h>
#include <helper/log.h>
#include <helper/replacements.h>
#ifndef DEBUG_JTAG_IOZ
#define DEBUG_JTAG_IOZ 64