bug in jtag Automake file (./src/jtag/Makefile.am) ?

I think this is wrong in the ./src/jtag/Makefile.am :

"

if FT2232_LIBFTDI

FT2232FILES = ft2232.c

else

FT2232FILES =

endif

if FT2232_FTD2XX

FT2232FILES = ft2232.c

else

FT2232FILES =

endif

"

It should better be:

"

if FT2232_LIBFTDI

FT2232FILES = ft2232.c

else

if FT2232_FTD2XX

FT2232FILES = ft2232.c

else

FT2232FILES =

endif

endif

"

If I am wrong please sy explain, what’s wrong in my thinking.

I think you are wright. I was unable to compile the openocd code because of this mistake.

I have only the libftdi librairie on my system, and I always had the ./bootstrap script which finished with the following warning :

src/jtag/Makefile.am:52: warning: automake does not support conditional definition of FT2232FILES in libjtag_a_SOURCES

And all goes better if I remove the libftd2xx concerning lines in the ./src/jtag/Makefile.am

But it is strange to force the use of one libftd even if we don’t plane to use a FT2232 base interface.

This problem only seems to occur with certain autotools versions. I haven’t seen it yet on either of my Linux machines, nor on my Windows machine running Cygwin.

Anyway, I’ve included the proposed changes (it just rearranges the IF clauses) in my local tree, and they’ll be in SVN with the next set of changes.

Best regards,

Dominic