Commit 9ecb50e5 authored by Thomas Wood's avatar Thomas Wood

tools: install the register definition files

Install the register definition files and use them by default in
intel_reg.

v2: remove redundant path check
Suggested-by: Jani Nikula's avatarJani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: default avatarThomas Wood <thomas.wood@intel.com>
parent af979184
......@@ -217,9 +217,10 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform])
files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake"
for file in $files; do
REGISTERS_EXTRA_DIST="$REGISTERS_EXTRA_DIST $file `tr '\n' ' ' < $srcdir/tools/registers/$file`"
REGISTER_FILES="$REGISTER_FILES $file `cat $srcdir/tools/registers/$file`"
done
AC_SUBST(REGISTERS_EXTRA_DIST)
REGISTER_FILES=`echo $REGISTER_FILES | tr ' ' '\n' | sort -u | tr '\n' ' '`
AC_SUBST(REGISTER_FILES)
AC_CONFIG_FILES([
Makefile
......
......@@ -3,7 +3,7 @@ include Makefile.sources
SUBDIRS = null_state_gen registers
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS)
AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) -DPKGDATADIR=\"$(pkgdatadir)\"
LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(LIBUNWIND_LIBS) -lm
AM_LDFLAGS = -Wl,--as-needed
......
......@@ -713,7 +713,7 @@ static int get_reg_spec_file(char *buf, size_t buflen, const char *dir,
static int read_reg_spec(struct config *config)
{
char buf[PATH_MAX];
char *path;
const char *path;
struct stat st;
int r;
......@@ -722,7 +722,7 @@ static int read_reg_spec(struct config *config)
path = getenv("INTEL_REG_SPEC");
if (!path)
goto builtin;
path = PKGDATADIR"/registers";
r = stat(path, &st);
if (r) {
......
EXTRA_DIST = ${REGISTERS_EXTRA_DIST}
register_definitiondir = ${pkgdatadir}/registers
dist_register_definition_DATA = ${REGISTER_FILES}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment