unify duplicate coding blocks

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1706 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent 720768ad02
commit c1db52acd7

@ -25,6 +25,9 @@
Use the length to automatically align output correctly. Standardize
gettext handling of strings here too (only translate descriptions).
* configure.ac: Unify duplicated coding statements with AC_DEFUN to simplify
adding new busses/cables/lowlevel drivers.
2010-01-22 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bit.c (cmd_bit_print_params): Fix strncat length handling.

@ -493,46 +493,47 @@ AC_ARG_ENABLE(bus,
busdrivers=`echo ${busdrivers} | $SED -e "s/default/DEF_ENABLE_BUSDRIVERS/"`
#
enabled_bus_drivers=''
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [arm9tdmi], [ENABLE_BUS_ARM9TDMI])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [au1500], [ENABLE_BUS_AU1500])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [avr32], [ENABLE_BUS_AVR32])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bcm1250], [ENABLE_BUS_BCM1250])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf526_ezkit], [ENABLE_BUS_BF526_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf527_ezkit], [ENABLE_BUS_BF527_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf533_stamp], [ENABLE_BUS_BF533_STAMP])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf533_ezkit], [ENABLE_BUS_BF533_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf537_stamp], [ENABLE_BUS_BF537_STAMP])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf537_ezkit], [ENABLE_BUS_BF537_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf538f_ezkit], [ENABLE_BUS_BF538F_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf548_ezkit], [ENABLE_BUS_BF548_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bf561_ezkit], [ENABLE_BUS_BF561_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [bscoach], [ENABLE_BUS_BSCOACH])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [ejtag], [ENABLE_BUS_EJTAG])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [ejtag_dma], [ENABLE_BUS_EJTAG_DMA])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [fjmem], [ENABLE_BUS_FJMEM])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [ixp425], [ENABLE_BUS_IXP425])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [ixp435], [ENABLE_BUS_IXP435])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [ixp465], [ENABLE_BUS_IXP465])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [jopcyc], [ENABLE_BUS_JOPCYC])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [h7202], [ENABLE_BUS_H7202])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [lh7a400], [ENABLE_BUS_LH7A400])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [mpc5200], [ENABLE_BUS_MPC5200])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [mpc824x], [ENABLE_BUS_MPC824X])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [ppc405ep], [ENABLE_BUS_PPC405EP])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [ppc440gx_ebc8], [ENABLE_BUS_PPC440GX_EBC8])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [prototype], [ENABLE_BUS_PROTOTYPE])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [pxa2x0], [ENABLE_BUS_PXA2X0])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [pxa27x], [ENABLE_BUS_PXA27X])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [s3c4510], [ENABLE_BUS_S3C4510])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [sa1110], [ENABLE_BUS_SA1110])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [sh7727], [ENABLE_BUS_SH7727])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [sh7750r], [ENABLE_BUS_SH7750R])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [sh7751r], [ENABLE_BUS_SH7751R])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [sharc_21065L], [ENABLE_BUS_SHARC_21065L])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [sharc_21369_ezkit], [ENABLE_BUS_SHARC_21369_EZKIT])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [slsup3], [ENABLE_BUS_SLSUP3])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [tx4925], [ENABLE_BUS_TX4925])
CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [zefant_xs3], [ENABLE_BUS_ZEFANT_XS3])
AC_DEFUN([CHECK_BUS], [CHECK_DRIVER([$busdrivers], [enabled_bus_drivers], [$1], [ENABLE_BUS_]m4_toupper([$1]))])
CHECK_BUS([arm9tdmi])
CHECK_BUS([au1500])
CHECK_BUS([avr32])
CHECK_BUS([bcm1250])
CHECK_BUS([bf526_ezkit])
CHECK_BUS([bf527_ezkit])
CHECK_BUS([bf533_stamp])
CHECK_BUS([bf533_ezkit])
CHECK_BUS([bf537_stamp])
CHECK_BUS([bf537_ezkit])
CHECK_BUS([bf538f_ezkit])
CHECK_BUS([bf548_ezkit])
CHECK_BUS([bf561_ezkit])
CHECK_BUS([bscoach])
CHECK_BUS([ejtag])
CHECK_BUS([ejtag_dma])
CHECK_BUS([fjmem])
CHECK_BUS([ixp425])
CHECK_BUS([ixp435])
CHECK_BUS([ixp465])
CHECK_BUS([jopcyc])
CHECK_BUS([h7202])
CHECK_BUS([lh7a400])
CHECK_BUS([mpc5200])
CHECK_BUS([mpc824x])
CHECK_BUS([ppc405ep])
CHECK_BUS([ppc440gx_ebc8])
CHECK_BUS([prototype])
CHECK_BUS([pxa2x0])
CHECK_BUS([pxa27x])
CHECK_BUS([s3c4510])
CHECK_BUS([sa1110])
CHECK_BUS([sh7727])
CHECK_BUS([sh7750r])
CHECK_BUS([sh7751r])
CHECK_BUS([sharc_21065L])
CHECK_BUS([sharc_21369_ezkit])
CHECK_BUS([slsup3])
CHECK_BUS([tx4925])
CHECK_BUS([zefant_xs3])
# Enable cable drivers
AC_DEFUN([DEF_ENABLE_CABLEDRIVERS], [\
@ -562,24 +563,25 @@ AS_IF([test "x$HAVELIBUSB" != "xyes"], [
])
#
enabled_cable_drivers=''
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [arcom], [ENABLE_CABLE_ARCOM])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [byteblaster], [ENABLE_CABLE_BYTEBLASTER])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [dlc5], [ENABLE_CABLE_DLC5])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [ea253], [ENABLE_CABLE_EA253])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [ei012], [ENABLE_CABLE_EI012])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [ep9307], [ENABLE_CABLE_EP9307])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [ft2232], [ENABLE_CABLE_FT2232])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [igloo], [ENABLE_CABLE_IGLOO])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [jim], [ENABLE_JIM])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [jlink], [ENABLE_CABLE_JLINK])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [keithkoep], [ENABLE_CABLE_KEITHKOEP])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [lattice], [ENABLE_CABLE_LATTICE])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [mpcbdm], [ENABLE_CABLE_MPCBDM])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [triton], [ENABLE_CABLE_TRITON])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [usbblaster], [ENABLE_CABLE_USBBLASTER])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [wiggler], [ENABLE_CABLE_WIGGLER])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [xpc], [ENABLE_CABLE_XPC])
CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [ts7800], [ENABLE_CABLE_TS7800])
AC_DEFUN([CHECK_CABLE], [CHECK_DRIVER([$cabledrivers], [enabled_cable_drivers], [$1], [ENABLE_BUS_]m4_toupper([$1]))])
CHECK_CABLE([arcom])
CHECK_CABLE([byteblaster])
CHECK_CABLE([dlc5])
CHECK_CABLE([ea253])
CHECK_CABLE([ei012])
CHECK_CABLE([ep9307])
CHECK_CABLE([ft2232])
CHECK_CABLE([igloo])
CHECK_CABLE([jim])
CHECK_CABLE([jlink])
CHECK_CABLE([keithkoep])
CHECK_CABLE([lattice])
CHECK_CABLE([mpcbdm])
CHECK_CABLE([triton])
CHECK_CABLE([usbblaster])
CHECK_CABLE([wiggler])
CHECK_CABLE([xpc])
CHECK_CABLE([ts7800])
# Enable lowlevel drivers
@ -616,11 +618,12 @@ AS_IF([test "x$HAVE_IOPERM" != "xyes" -a "x$HAVE_I386_SET_IOPERM" != "xyes" -a "
])
#
enabled_lowlevel_drivers=''
CHECK_DRIVER([$lowleveldrivers], [enabled_lowlevel_drivers], [direct], [ENABLE_LOWLEVEL_DIRECT])
CHECK_DRIVER([$lowleveldrivers], [enabled_lowlevel_drivers], [ftd2xx], [ENABLE_LOWLEVEL_FTD2XX])
CHECK_DRIVER([$lowleveldrivers], [enabled_lowlevel_drivers], [ftdi], [ENABLE_LOWLEVEL_FTDI])
CHECK_DRIVER([$lowleveldrivers], [enabled_lowlevel_drivers], [ppdev], [ENABLE_LOWLEVEL_PPDEV])
CHECK_DRIVER([$lowleveldrivers], [enabled_lowlevel_drivers], [ppi], [ENABLE_LOWLEVEL_PPI])
AC_DEFUN([CHECK_LOWLEVEL], [CHECK_DRIVER([$lowleveldrivers], [enabled_lowlevel_drivers], [$1], [ENABLE_BUS_]m4_toupper([$1]))])
CHECK_LOWLEVEL([direct])
CHECK_LOWLEVEL([ftd2xx])
CHECK_LOWLEVEL([ftdi])
CHECK_LOWLEVEL([ppdev])
CHECK_LOWLEVEL([ppi])
dnl Enable a relocatable jtag?

Loading…
Cancel
Save