[PATCH 1/4] Add 'install-headers' target in the top-level Makefile

Keith Packard keithp at keithp.com
Mon Jul 9 16:38:12 PDT 2012


This target recursively locates directories with sdk headers and
installs them all. Useful when you want to build a complete new X
server and drivers without having to install the X server before the
drivers are actually working.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 Makefile.am |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index cea140b..9a62853 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -95,3 +95,10 @@ DIST_SUBDIRS = \
 # gross hack
 relink: all
 	$(AM_V_at)$(MAKE) -C hw relink
+
+install-headers: Makefile
+	+find . -name Makefile | while read m; do			\
+		if grep -q install-sdkHEADERS $$m; then			\
+			(cd `dirname "$$m"` && make install-sdkHEADERS)	\
+		fi							\
+	done
-- 
1.7.10.4



More information about the xorg-devel mailing list