Cc: Jani Nikula <[email protected]>
Signed-off-by: Thomas Wood <[email protected]>
---
 configure.ac                 |  5 +++--
 tools/Makefile.am            |  3 ++-
 tools/intel_reg.c            |  4 ++--
 tools/quick_dump/Makefile.am | 13 ++++++++-----
 4 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index c370ec3..33caddc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,9 +230,10 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], 
[Target platform])
 
 files="broadwell cherryview haswell ivybridge sandybridge valleyview skylake"
 for file in $files; do
-       QUICK_DUMP_EXTRA_DIST="$QUICK_DUMP_EXTRA_DIST $file `tr '\n' ' ' < 
$srcdir/tools/quick_dump/$file`"
+       REGSPECFILES="$REGSPECFILES $file `cat $srcdir/tools/quick_dump/$file`"
 done
-AC_SUBST(QUICK_DUMP_EXTRA_DIST)
+REGSPECFILES=`echo $REGSPECFILES | tr ' ' '\n' | sort -u | tr '\n' ' '`
+AC_SUBST(REGSPECFILES)
 
 AC_CONFIG_FILES([
                 Makefile
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 04bfd12..f673f3c 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS += quick_dump
 endif
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
-AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) 
$(LIBUNWIND_CFLAGS)
+AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) \
+           $(LIBUNWIND_CFLAGS) -DREGSPECDIR=\"$(pkgdatadir)/registers\"
 LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) 
$(CAIRO_LIBS) $(LIBUDEV_LIBS) $(LIBUNWIND_LIBS)
 
diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 090cc25..66ec485 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -698,7 +698,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;
 
@@ -707,7 +707,7 @@ static int read_reg_spec(struct config *config)
                path = getenv("INTEL_REG_SPEC");
 
        if (!path)
-               goto builtin;
+               path = REGSPECDIR;
 
        r = stat(path, &st);
        if (r) {
diff --git a/tools/quick_dump/Makefile.am b/tools/quick_dump/Makefile.am
index 3d0bd23..b526d19 100644
--- a/tools/quick_dump/Makefile.am
+++ b/tools/quick_dump/Makefile.am
@@ -25,9 +25,12 @@ chipset_wrap_python.c: chipset.i
 all-local: I915ChipsetPython.la
        $(LN_S) -f .libs/I915ChipsetPython.so _chipset.so
 
+regspecdir = $(pkgdatadir)/registers
+dist_regspec_DATA = $(REGSPECFILES) \
+                   base_interrupt.txt base_other.txt base_power.txt \
+                   base_rings.txt
+
 CLEANFILES = chipset_wrap_python.c chipset.py _chipset.so
-EXTRA_DIST = $(QUICK_DUMP_EXTRA_DIST) \
-             base_interrupt.txt base_other.txt base_power.txt base_rings.txt \
-             quick_dump.py \
-             reg_access.py \
-             chipset.i
+EXTRA_DIST = quick_dump.py \
+            reg_access.py \
+            chipset.i
-- 
2.4.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to