From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Jenkins Date: Thu, 29 Oct 2009 20:10:01 +0000 Subject: Re: [PATCH] extras/keymap: fix build (GEN keys.txt) Message-Id: <4AE9F699.3050001@tuffmail.co.uk> List-Id: References: <4AE9A648.2090006@tuffmail.co.uk> In-Reply-To: <4AE9A648.2090006@tuffmail.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Martin Pitt wrote: > Hello Alan, > > Alan Jenkins [2009-10-29 14:27 +0000]: > >> Specifically, it changed the command used to generate keys.txt in several >> ways. The most obvious change was that the output was completely empty :). >> This was probably missed due to stale Makefiles. Hint: to reproduce the >> build failure, first run "make distclean". >> > > Hm, I'm autoreconfing and/or rebuilding the udev tree all the time, > without problems. We also have this in our packages in Ubuntu, and it > produces valid and working files. > Can you please give some precise steps how it fails? > Yup. I tried cloning and building a fresh checkout (./autogen.sh; make), and it failed with the same problem. > >> - $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[[:space:]]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@ >> + $(AM_V_GEN)$(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@ >> > > As Lennart already pointed out, the COFFEE->SCREENLOCK sed is > important to not break existing keymaps (commit 7f06ec2e19). Also, > your change drops the check that it's a real key definition instead of > an alias definition, and thus generates duplicate hash values. That > wasn't changed in the move to single top-level Makefile.am, but was an > explicit bug fix (commit 6983c0d0f). > > >> -extras/keymap/keys.txt: /usr/include/linux/input.h >> +extras/keymap/keys.txt: /usr/include/linux/input.h Makefile >> > > >> -extras/keymap/keys-from-name.gperf: extras/keymap/keys.txt >> +extras/keymap/keys-from-name.gperf: extras/keymap/keys.txt Makefile >> > > Why is that necessary? You shouldn't change the Makefile manually, it > should at most depend on Makefile.am changes (but even that is not > necessary since it just calls gperf, which doesn't care about any > other file in the tree). > > Thanks, > > Martin > Thanks for the corrections Martin. Looks like the real problem is my awk doesn't grok "[[:space:]]". $ awk '/^#define.*KEY_[^ ]+[[:space:]]+[0-9]/ { if ($2 != "KEY_MAX") { print $2 } }' < /usr/include/linux/input.h $ $ awk '/^#define.*KEY_[^ ]+[[:space:]]/ { if ($2 != "KEY_MAX") { print $2 } }' < /usr/include/linux/input.h $ $ awk '/^#define.*KEY_[^ ]+/ { if ($2 != "KEY_MAX") { print $2 } }' < /usr/include/linux/input.h KEY_RESERVED KEY_ESC KEY_1 ... My awk package is mawk-1.3.3-11.1. Thanks again Alan