From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Bender Date: Wed, 20 Jan 2010 18:59:18 +0000 Subject: Re: udev, input/linux.h and cross compilation Message-Id: <4B575286.3080405@san.rr.com> List-Id: References: <4B5749A9.2090005@san.rr.com> In-Reply-To: <4B5749A9.2090005@san.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On 1/20/2010 10:30 AM, Kay Sievers wrote: > On Wed, Jan 20, 2010 at 19:21, Paul Bender wrote: >> The top level Makefile.am hard codes /usr/include/linux/input.h for use in >> the generation of extras/keymap/keys.txt. Such hard coding does not work >> when cross compiling as the linux/input.h file that should be used is the >> cross environment's linux/include.h not /usr/include/linux/input.h. >> >> I have attached a patch that determines the correct linux/include.h file >> during configure. The configure change makes use of the AX_ABOLUTE_HEADER >> http://www.nongnu.org/autoconf-archive/ax_absolute_header.html, which the >> patch adds to the m4. > > Why is all this magic needed? Can't you just use: > extras/keymap/keys.txt: $(includedir)/linux/input.h > > Thanks, > Kay Using ${includedir} is not sufficient because ${includedir} is in the run time path. The cross build files are installed in ${DESTDIR}${includedir} not ${includedir} on the build system. For me, ${DESTDIR}${includedir} would be sufficient. However, I figured that depending on a detection macro used by (and therefore fixed for) multiple packages on multiple distributions was better than hard coding ${DESTDIR}${includedir}.