linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev, input/linux.h and cross compilation
Date: Sun, 24 Jan 2010 19:23:05 +0000	[thread overview]
Message-ID: <ac3eb2511001241123h70ae9598occ6e05a512db25d9@mail.gmail.com> (raw)
In-Reply-To: <4B5749A9.2090005@san.rr.com>

On Fri, Jan 22, 2010 at 15:02, Dan Nicholson <dbn.lists@gmail.com> wrote:
> On Thu, Jan 21, 2010 at 5:29 PM, Paul Bender <pebender@san.rr.com> wrote:
>> On 1/21/2010 3:00 AM, Martin Pitt wrote:
>>>
>>> echo '#include<linux/input.h>' | cpp -M | xargs -n1 | grep linux/input.h
>>
>> I believe that would work once cpp is replaced with $ac_cpp so that the
>> correct cpp is used (the one pointed to by $CPP) and the correct cpp flags
>> are used (the flags in $CPPFLAGS). However, it adds dependencies on grep and
>> xargs, both of which would need to be tested for.
>
> I'm pretty sure libtool is already using grep. However, here's an
> alternative just using sed:
>
> echo '#include <linux/input.h>' | cpp -M | sed -n
> '/linux\/input.h/s,.* \(.*linux/input.h\).*,\1,p'

Yeah, looks fine. I ended up with:
  $ echo '#include <linux/errno.h>'| \
    cpp -E| \
    sed '/linux\/errno.h/!d; s:.*"\(.*\)/linux/errno.h".*:\1:; /.*/q'
  /usr/include

to find the prefix for the current system include we can use in the Makefile.

Kay

      parent reply	other threads:[~2010-01-24 19:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 18:21 udev, input/linux.h and cross compilation Paul Bender
2010-01-20 18:30 ` Kay Sievers
2010-01-20 18:59 ` Paul Bender
2010-01-21 11:00 ` Martin Pitt
2010-01-22  1:29 ` Paul Bender
2010-01-22 14:02 ` Dan Nicholson
2010-01-24 19:23 ` Kay Sievers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac3eb2511001241123h70ae9598occ6e05a512db25d9@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).