mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
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:
committed by
Antonio Borneo
parent
b44948985f
commit
87c90393fe
@@ -17,11 +17,6 @@ AC_SUBST([MAKEINFO])
|
||||
AM_INIT_AUTOMAKE([-Wall -Wno-portability dist-bzip2 dist-zip subdir-objects])
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AH_BOTTOM([
|
||||
#include <helper/system.h>
|
||||
#include <helper/types.h>
|
||||
#include <helper/replacements.h>
|
||||
])
|
||||
|
||||
AC_LANG([C])
|
||||
AC_PROG_CC
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define OPENOCD_FLASH_COMMON_H
|
||||
|
||||
#include <helper/log.h>
|
||||
#include <helper/replacements.h>
|
||||
|
||||
/**
|
||||
* Parses the optional '.index' portion of a flash bank identifier.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "helper/types.h"
|
||||
#include <target/algorithm.h>
|
||||
#include <target/armv7m.h>
|
||||
#include <target/cortex_m.h>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "helper/replacements.h"
|
||||
#include "log.h"
|
||||
#include "binarybuffer.h"
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#ifndef OPENOCD_HELPER_BITS_H
|
||||
#define OPENOCD_HELPER_BITS_H
|
||||
|
||||
#include <helper/replacements.h>
|
||||
#include <helper/types.h>
|
||||
|
||||
#define BIT(nr) (1UL << (nr))
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "configuration.h"
|
||||
#include "log.h"
|
||||
#include "replacements.h"
|
||||
|
||||
static size_t num_config_files;
|
||||
static char **config_file_names;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "log.h"
|
||||
#include "configuration.h"
|
||||
#include "fileio.h"
|
||||
#include "replacements.h"
|
||||
|
||||
struct fileio {
|
||||
char *url;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef OPENOCD_HELPER_FILEIO_H
|
||||
#define OPENOCD_HELPER_FILEIO_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define FILEIO_MAX_ERROR_STRING (128)
|
||||
|
||||
enum fileio_type {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "log.h"
|
||||
#include "command.h"
|
||||
#include "replacements.h"
|
||||
#include "time_support.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if IS_DARWIN
|
||||
#include <libproc.h>
|
||||
#endif
|
||||
|
||||
@@ -62,6 +62,7 @@ void *fill_malloc(size_t size)
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
/* replacements for gettimeofday */
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define OPENOCD_HELPER_REPLACEMENTS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <helper/system.h>
|
||||
|
||||
/* MIN,MAX macros */
|
||||
#ifndef MIN
|
||||
|
||||
@@ -21,6 +21,15 @@
|
||||
#ifndef OPENOCD_HELPER_SYSTEM_H
|
||||
#define OPENOCD_HELPER_SYSTEM_H
|
||||
|
||||
/* +++ platform specific headers +++ */
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
/* --- platform specific headers --- */
|
||||
|
||||
/* standard C library header files */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -34,15 +43,6 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* +++ platform specific headers +++ */
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
/* --- platform specific headers --- */
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define OPENOCD_HELPER_TIME_SUPPORT_H
|
||||
|
||||
#include <time.h>
|
||||
#include "types.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <helper/system.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <jtag/interface.h>
|
||||
#include <jtag/commands.h>
|
||||
#include "helper/system.h"
|
||||
#include "libusb_helper.h"
|
||||
|
||||
#define USB_VID 0x15ba
|
||||
|
||||
@@ -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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user