From: Sam Ravnborg <sam@ravnborg.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Michal Marek <mmarek@suse.cz>,
linux-kbuild <linux-kbuild@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
David Herrmann <dh.herrmann@googlemail.com>,
Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 2/6] samples: refactor Makefile
Date: Sun, 13 Jul 2014 21:52:36 +0200 [thread overview]
Message-ID: <20140713195236.GA8711@ravnborg.org> (raw)
In-Reply-To: <53C2DD2D.2030902@infradead.org>
Hi Randy - thanks for the feedback.
On Sun, Jul 13, 2014 at 12:25:33PM -0700, Randy Dunlap wrote:
> On 07/13/14 11:42, Sam Ravnborg wrote:
> > Use one line per module/program in Makefile.
> > This style is easier to read/extend.
> >
> > Introduce inverse xmas style sorting.
>
> google search couldn't tell me what that means and I cannot
> deduce it from the new Makefile ordering (if there is some ordering).
> Please explain.
Sort by length - with longest entry first. Like an xmas tree upside-down.
For entries with same lenght sort alphabetically.
Advocated in some places for includes and other places for local variables.
One recent reference is for example this:
http://marc.info/?l=linux-netdev&m=140510662905580&w=2
I will rephrase it like this:
# Sort entries using inverse xmas style:
# Longest entries first, alphabetically when legth is the same.
OK?
Sam
>
> Thanks.
>
> > This may prevent some merge conflicts in the future
> >
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > ---
> > samples/Makefile | 15 +++++++++++++--
> > 1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/samples/Makefile b/samples/Makefile
> > index 1a60c62..7c08028 100644
> > --- a/samples/Makefile
> > +++ b/samples/Makefile
> > @@ -1,4 +1,15 @@
> > # Makefile for Linux samples code
> > +# Sort entries using inverse xmas style
> > +#
> > +# kernel modules
> > +obj-$(CONFIG_SAMPLES) += hw_breakpoint/
> > +obj-$(CONFIG_SAMPLES) += trace_events/
> > +obj-$(CONFIG_SAMPLES) += kprobes/
> > +obj-$(CONFIG_SAMPLES) += kobject/
> > +obj-$(CONFIG_SAMPLES) += kfifo/
> > +obj-$(CONFIG_SAMPLES) += rpmsg/
> > +obj-$(CONFIG_SAMPLES) += kdb/
> >
> > -obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ \
> > - hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/
> > +# user space programs
> > +obj-$(CONFIG_SAMPLES) += seccomp/
> > +obj-$(CONFIG_SAMPLES) += hidraw/
> >
>
>
> --
> ~Randy
next prev parent reply other threads:[~2014-07-13 19:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140713183636.GA17241@ravnborg.org>
2014-07-13 18:42 ` [PATCH 1/6] kbuild: add support for building userspace api programs Sam Ravnborg
2014-07-13 18:42 ` [PATCH 2/6] samples: refactor Makefile Sam Ravnborg
2014-07-13 19:25 ` Randy Dunlap
2014-07-13 19:52 ` Sam Ravnborg [this message]
2014-07-13 20:13 ` Randy Dunlap
2014-07-14 0:26 ` Stephen Rothwell
2014-07-13 18:42 ` [PATCH 3/6] samples: use uapiprogs support for seccomp Sam Ravnborg
2014-07-16 9:43 ` Masahiro Yamada
2014-07-16 10:31 ` Sam Ravnborg
2014-07-17 3:40 ` Masahiro Yamada
2014-07-13 18:42 ` [PATCH 4/6] samples: use uapiprogs support for hidraw Sam Ravnborg
2014-07-13 18:42 ` [PATCH 5/6] samples: fix warnings in uhid-example Sam Ravnborg
2014-07-13 18:42 ` [PATCH 6/6] samples: use uapiprogs support for uhid Sam Ravnborg
2014-07-13 19:23 ` [PATCH 1/6] kbuild: add support for building userspace api programs Randy Dunlap
2014-07-13 19:53 ` Sam Ravnborg
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=20140713195236.GA8711@ravnborg.org \
--to=sam@ravnborg.org \
--cc=dh.herrmann@googlemail.com \
--cc=jkosina@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=rdunlap@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=thierry.reding@gmail.com \
/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