[PATCH libevdev 2/8] Add a copy of linux/input.h

Gaetan Nadon memsize at videotron.ca
Mon Oct 21 07:21:01 PDT 2013


On 13-10-21 06:26 AM, Peter Hutterer wrote:
> On Mon, Oct 21, 2013 at 10:57:27AM +0200, David Herrmann wrote:
>> Hi Peter
>>
>> On Mon, Oct 14, 2013 at 8:14 AM, Peter Hutterer
>> <peter.hutterer at who-t.net> wrote:
>>> This avoids a number of otherwise required ifdefs when building on older kernels
>>>
>>> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
>>> ---
>>>  Makefile.am           |    2 +-
>>>  include/linux/input.h | 1157 +++++++++++++++++++++++++++++++++++++++++++++++++
>>>  libevdev/Makefile.am  |    2 +-
>>>  test/Makefile.am      |    2 +-
>>>  tools/Makefile.am     |    2 +-
>>>  5 files changed, 1161 insertions(+), 4 deletions(-)
>>>  create mode 100644 include/linux/input.h
>>>
>>> diff --git a/Makefile.am b/Makefile.am
>>> index 95a16ea..82a44b9 100644
>>> --- a/Makefile.am
>>> +++ b/Makefile.am
>>> @@ -8,4 +8,4 @@ SUBDIRS = doc libevdev tools test
>>>  pkgconfigdir = $(libdir)/pkgconfig
>>>  pkgconfig_DATA = libevdev.pc
>>>
>>> -EXTRA_DIST = libevdev.pc.in
>>> +EXTRA_DIST = libevdev.pc.in include/linux/input.h
>> Why not list it in _SOURCES?
> good question. I don't know what the more appropriate thing to do here is.
> It's a source, but it's not technically a source, so...
It should go in _SOURCES. Running make distcheck does all the testing
for you.

Some modules put C code in EXTRA_DIST if they the makefile does not
build it.
It could be some demo code or legacy code for reference only.
>  
> [...]
>
>>> +
>>> +#endif /* _INPUT_H */
>> 3.11 is already released, you might want to take its header. Your
>> version is missing the BTN_DPAD_ constants.
> right. I just grabbed the one fedora ships atm, will copy over the one from
> the 3.11 release.
>
>>> diff --git a/libevdev/Makefile.am b/libevdev/Makefile.am
>>> index 94f5514..e47bd6b 100644
>>> --- a/libevdev/Makefile.am
>>> +++ b/libevdev/Makefile.am
>>> @@ -1,6 +1,6 @@
>>>  lib_LTLIBRARIES=libevdev.la
>>>
>>> -AM_CPPFLAGS = $(GCC_CFLAGS) $(GCOV_CFLAGS) -I$(top_srcdir)
>>> +AM_CPPFLAGS = $(GCC_CFLAGS) $(GCOV_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)
>>>
>>>  libevdev_la_SOURCES = \
>>>                     libevdev.h \
>>> diff --git a/test/Makefile.am b/test/Makefile.am
>>> index 8454329..2baafb0 100644
>>> --- a/test/Makefile.am
>>> +++ b/test/Makefile.am
>>> @@ -17,7 +17,7 @@ common_sources = $(libevdev_sources) \
>>>                  test-common.h
>>>
>>>  # include builddir for event-names.h
>>> -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)/libevdev $(CHECK_CFLAGS) $(GCOV_CFLAGS)
>>> +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/libevdev $(CHECK_CFLAGS) $(GCOV_CFLAGS)
>>>
>>>  test_libevdev_SOURCES = \
>>>                         test-main.c \
>>> diff --git a/tools/Makefile.am b/tools/Makefile.am
>>> index 295c419..7ac4431 100644
>>> --- a/tools/Makefile.am
>>> +++ b/tools/Makefile.am
>>> @@ -1,6 +1,6 @@
>>>  noinst_PROGRAMS = libevdev-events
>>>
>>> -AM_CPPFLAGS = $(GCC_CFLAGS) -I$(top_srcdir)/libevdev
>>> +AM_CPPFLAGS = $(GCC_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/libevdev
>> No idea of include-path order and autotools XFLAGS orders. I guess you
>> tested this with a missing /usr/include/linux/input.h? Other than
>> that, looks fine to me.
> I'm sure I did but I will re-test anyway.
>
> Cheers,
>    Peter
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools
>



More information about the Input-tools mailing list