summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2015-09-04 14:46:45 +0100
committerThomas Wood <thomas.wood@intel.com>2015-09-08 16:14:45 +0100
commit9ecb50e5c55c4d287f9f083b41d5e51b6a9d9ad2 (patch)
treeec3db630e7104ad64e73e45e4e765712407bed38 /tools
parentaf9791849467a3437e0920c8f08c5a646302da7d (diff)
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 <jani.nikula@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am2
-rw-r--r--tools/intel_reg.c4
-rw-r--r--tools/registers/Makefile.am3
3 files changed, 5 insertions, 4 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 95ede58b..8e454b4f 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -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
diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 190aa5b3..95760db8 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -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) {
diff --git a/tools/registers/Makefile.am b/tools/registers/Makefile.am
index 4e1e3c2f..14293df0 100644
--- a/tools/registers/Makefile.am
+++ b/tools/registers/Makefile.am
@@ -1 +1,2 @@
-EXTRA_DIST = ${REGISTERS_EXTRA_DIST}
+register_definitiondir = ${pkgdatadir}/registers
+dist_register_definition_DATA = ${REGISTER_FILES}