Hi all, The attached patch gives a minor upgrade to OpenOCD's autotools support. Its commit message should provide ample detail for understanding all of the changes that were made, though the patch itself is easy to read.
I would have simply committed these changes, but I recognize that they could possibly pose a problem for some people. Most notably, it raises the minimum requirements for automake from 1.4 to 1.6. Please reply to this thread if this change poses a potential problem, but I think this will be a safe move for us. Cheers, Zach
Update autotools scripts to require automake 1.6. The configure.in script already required autoconf 2.59 (circa 2006), so there is no reason to support versions of automake older than 1.6 (circa 2002). The first part of this patch upgrades the configure.in script: 1. Use current calling conventions for the AC_INIT and AM_INIT_AUTOMAKE macros, bringing their usage up-to-date with the version of autoconf already specified by AC_PREREQ. 2. Add AC_CONFIG_SRCDIR macro, required by new version of AC_INIT. 3. Automatically enable all of automake's warnings except Makefile portability (which OpenOCD violates by using GNU make's $(wildcard)). [[ While automake has its own -Werror option, I did not enabled it due to existing warnings. ]] 4. Add the missing AM_PROG_C_O check, required by the build rules for openocd.o in src/Makefile.am. 5. Adjust version number to show progress toward the next release. 6. Include a bug reporting e-mail address to direct users to this list. This patch makes the following adjustments to the Makefile.am files: 1. Update AUTOMAKE_OPTIONS to require automake version 1.6 2. Rewrite all deprecated INCLUDES assignments as AM_CPPFLAGS 3. Clean-up all AM_CPPFLAGS declarations to be patch-friendly. 4. Remove vestigial references to $(all_includes) 5. Remove erroneous references to @CPPFLAGS@ (only use AM_CPPFLAGS) 6. Remove unused -I and -D directives in helper/, flash/, target/
Index: configure.in =================================================================== --- configure.in (revision 1585) +++ configure.in (working copy) @@ -1,5 +1,7 @@ AC_PREREQ(2.59) -AC_INIT(configure.in) +AC_INIT([openocd], [0.2.0-in-development], + [OpenOCD Mailing List <openocd-development@lists.berlios.de>]) +AC_CONFIG_SRCDIR([src/openocd.c]) AC_CANONICAL_HOST @@ -738,7 +740,7 @@ fi AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(openocd, 1.0) +AM_INIT_AUTOMAKE([-Wall -Wno-portability]) AM_MAINTAINER_MODE AM_CONDITIONAL(RELEASE, test $build_release = yes) @@ -771,6 +773,7 @@ AC_LANG_C AC_PROG_CC +AM_PROG_CC_C_O AC_PROG_RANLIB # set default gcc warnings Index: src/pld/Makefile.am =================================================================== --- src/pld/Makefile.am (revision 1585) +++ src/pld/Makefile.am (working copy) @@ -1,4 +1,8 @@ -INCLUDES = -I$(top_srcdir)/src/server -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag $(all_includes) +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/server \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/jtag + METASOURCES = AUTO noinst_LIBRARIES = libpld.a noinst_HEADERS = pld.h xilinx_bit.h virtex2.h Index: src/helper/Makefile.am =================================================================== --- src/helper/Makefile.am (revision 1585) +++ src/helper/Makefile.am (working copy) @@ -1,6 +1,10 @@ -INCLUDES = -I$(top_srcdir)/src $(all_includes) -I$(top_srcdir)/src/target -I$(top_srcdir)/src/server +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/server \ + -I$(top_srcdir)/src/target \ + -DPKGDATADIR=\"$(pkgdatadir)\" \ + -DPKGLIBDIR=\"$(pkglibdir)\" + METASOURCES = AUTO -AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@ noinst_LIBRARIES = libhelper.a if ECOSBOARD Index: src/jtag/Makefile.am =================================================================== --- src/jtag/Makefile.am (revision 1585) +++ src/jtag/Makefile.am (working copy) @@ -1,6 +1,7 @@ +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/target - -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper $(all_includes) -I$(top_srcdir)/src/target METASOURCES = AUTO noinst_LIBRARIES = libjtag.a Index: src/xsvf/Makefile.am =================================================================== --- src/xsvf/Makefile.am (revision 1585) +++ src/xsvf/Makefile.am (working copy) @@ -1,4 +1,8 @@ -INCLUDES = -I$(top_srcdir)/src/server -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag $(all_includes) +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/server \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/jtag + METASOURCES = AUTO noinst_LIBRARIES = libxsvf.a noinst_HEADERS = xsvf.h Index: src/target/Makefile.am =================================================================== --- src/target/Makefile.am (revision 1585) +++ src/target/Makefile.am (working copy) @@ -5,9 +5,12 @@ OOCD_TRACE_FILES = endif -INCLUDES = -I$(top_srcdir)/src/gdb -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/xsvf $(all_includes) +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/jtag \ + -I$(top_srcdir)/src/xsvf + METASOURCES = AUTO -AM_CPPFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@ noinst_LIBRARIES = libtarget.a libtarget_a_SOURCES = target.c register.c breakpoints.c armv4_5.c embeddedice.c etm.c arm7tdmi.c arm9tdmi.c \ arm_jtag.c arm7_9_common.c algorithm.c arm920t.c arm720t.c armv4_5_mmu.c armv4_5_cache.c arm_disassembler.c \ Index: src/flash/Makefile.am =================================================================== --- src/flash/Makefile.am (revision 1585) +++ src/flash/Makefile.am (working copy) @@ -1,5 +1,8 @@ -INCLUDES = -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/target $(all_includes) -AM_CPPFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@ +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/jtag \ + -I$(top_srcdir)/src/target + METASOURCES = AUTO noinst_LIBRARIES = libflash.a libflash_a_SOURCES = \ Index: src/svf/Makefile.am =================================================================== --- src/svf/Makefile.am (revision 1585) +++ src/svf/Makefile.am (working copy) @@ -1,4 +1,8 @@ -INCLUDES = -I$(top_srcdir)/src/server -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/jtag $(all_includes) +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/server \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/jtag + METASOURCES = AUTO noinst_LIBRARIES = libsvf.a noinst_HEADERS = svf.h Index: src/server/Makefile.am =================================================================== --- src/server/Makefile.am (revision 1585) +++ src/server/Makefile.am (working copy) @@ -1,4 +1,10 @@ -INCLUDES = -I$(top_srcdir)/src/helper -I$(top_srcdir)/src/target -I$(top_srcdir)/src/flash -I$(top_srcdir)/src/jtag $(all_includes) +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/target \ + -I$(top_srcdir)/src/flash \ + -I$(top_srcdir)/src/jtag \ + -DPKGLIBDIR=\"$(pkglibdir)\" + METASOURCES = AUTO noinst_LIBRARIES = libserver.a noinst_HEADERS = server.h telnet_server.h gdb_server.h @@ -21,6 +27,5 @@ if HTTPD nobase_dist_pkglib_DATA = $(wildcard $(srcdir)/httpd/*.tcl $(srcdir)/httpd/*.css $(srcdir)/httpd/menu_cuts/*.png) endif -AM_CPPFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@ MAINTAINERCLEANFILES = Makefile.in Index: src/Makefile.am =================================================================== --- src/Makefile.am (revision 1585) +++ src/Makefile.am (working copy) @@ -9,9 +9,16 @@ openocd_SOURCES = $(MAINFILE) openocd.c # set the include path found by configure -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper \ - -I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/target -I$(top_srcdir)/src/xsvf -I$(top_srcdir)/src/svf \ - -I$(top_srcdir)/src/server -I$(top_srcdir)/src/flash -I$(top_srcdir)/src/pld $(all_includes) +AM_CPPFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/helper \ + -I$(top_srcdir)/src/jtag \ + -I$(top_srcdir)/src/target \ + -I$(top_srcdir)/src/xsvf \ + -I$(top_srcdir)/src/svf \ + -I$(top_srcdir)/src/server \ + -I$(top_srcdir)/src/flash \ + -I$(top_srcdir)/src/pld # pass path to prefix path openocd_CPPFLAGS = \ @@ -25,7 +32,7 @@ endif # add default CPPFLAGS -openocd_CPPFLAGS += @CPPFLAGS@ +openocd_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS) # the library search path. openocd_LDFLAGS = $(all_libraries) Index: Makefile.am =================================================================== --- Makefile.am (revision 1585) +++ Makefile.am (working copy) @@ -1,6 +1,6 @@ # not a GNU package. You can remove this line, if # have all needed files, that a GNU package needs -AUTOMAKE_OPTIONS = foreign 1.4 +AUTOMAKE_OPTIONS = foreign 1.6 nobase_dist_pkgdata_DATA = \ contrib/libdcc/dcc_stdio.c \ Index: bootstrap ===================================================================
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development