summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2009-11-17 09:23:52 -0500
committerKristian Høgsberg <krh@bitplanet.net>2009-11-17 09:23:52 -0500
commita99680384ad3daaceee05b3b40dc492cf0e52a0f (patch)
treeb3fd2d3b2bc50813fb29327d36758e11d229dd90
parent89cc98c0d5c1b43a883f13210c472339dde1a4cf (diff)
Add makefile rule to copy headers from kernel tree
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac5
3 files changed, 14 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index fbece64c..e8f93b75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,8 @@ bsd-core/*/machine
.deps
.libs
.tmp_versions
+.*check*
+.*install*
Makefile
Makefile.in
aclocal.m4
diff --git a/Makefile.am b/Makefile.am
index 5b1ae60a..48a49e21 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,3 +28,10 @@ pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm.pc
EXTRA_DIST = libdrm.pc.in
+
+copy-headers :
+ cp -r $(kernel_source)/usr/include/drm $(top_srcdir)/include
+
+commit-headers : copy-headers
+ git add include
+ git commit -am "Copy headers from kernel $$(GIT_DIR=$(kernel_source)/.git git describe)"
diff --git a/configure.ac b/configure.ac
index 410a359c..cece9f83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,6 +188,11 @@ fi
AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"])
+AC_ARG_WITH([kernel-source],
+ [AS_HELP_STRING([--with-kernel-source],
+ [specify path to linux kernel source])],
+ [kernel_source="$with_kernel_source"])
+AC_SUBST(kernel_source)
AC_SUBST(WARN_CFLAGS)
AC_OUTPUT([