Day: November 3, 2012

Error: `pkglibdir’ is not a legitimate directory for `DATA’

I was getting this error when compiling OpenOCD:

src/target/Makefile.am:168: `pkglibdir' is not a legitimate directory for `DATA'

Then I fixed it this way:

diff --git a/src/target/Makefile.am b/src/target/Makefile.am
index eb1e6db..6b5100e 100644
--- a/src/target/Makefile.am
+++ b/src/target/Makefile.am
@@ -159,7 +159,8 @@ noinst_HEADERS = \
        xscale.h \
        xscale_debug.h
 
-nobase_dist_pkglib_DATA =
-nobase_dist_pkglib_DATA += ecos/at91eb40a.elf
+ocddatadir = $(pkglibdir)
+nobase_dist_ocddata_DATA =
+nobase_dist_ocddata_DATA += ecos/at91eb40a.elf

I used this patch from Spencer Oliver as base:
http://openocd.zylin.com/#/c/457/