mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wedgwood <cw@f00f.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	davej@redhat.com, Eric Sandeen <sandeen@sandeen.net>
Subject: Re: [RFC PATCH] Add a 'minimal tree install' target
Date: Thu, 13 Sep 2007 11:57:53 -0700	[thread overview]
Message-ID: <20070913185753.GA9259@puku.stupidest.org> (raw)
In-Reply-To: <20070913183359.GA27146@uranus.ravnborg.org>

On Thu, Sep 13, 2007 at 08:34:00PM +0200, Sam Ravnborg wrote:

> A few. Please address them and resubmit with full changelog and
> proper attribution (if possible) and a signed-of-by.

sure

> I would strongly prefer the name "build-pkg".

right

> The prefix -pkg is just to use the magic in top-level Makefile to
> dicert it to the right Makefile.

yeah, i had something a bit like originally but didn't like the name
so changed it and poked the top-level Makefile

> I would like to attribute whoever made this somehow.

so would i, i assume it was davej + others so i cc'd him on this
hoping for feedback

> This becomes obsolete when target is named -pkg

yes

> Here we could do a $(MAKE) KBUILD_SRC= clean
> This will leave all files needed for building external modules
> but delete the rest (almost).

ok, i'll try that

> set -e to bail out on error could do it for now.

will do

> kbuild will not like it either so you can drop this FIXME

ok


> > +# This relies on the following environment variables being sane and
> > +# passed in from the Makefiles:
> > +#
> > +#    INSTALL_MINTREE_PATH
> > +#    KERNELVERSION

> Could we pass this as parameters. This makes it explicit.
> You do not need to check them since this script is not
> supposed to be used stand-alone.

can do

> > +if [ "$srctree" != "$objtree" ] ; then
> > +    cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*" -not -ipath "$objtree/*Makefile" ) ${tgtdir}
>                                                                                                ^
> Why this wildcard??? (objtree/>*<Makefile)
> Seems to be a typing error.

no, it's so we catch things like

linux/build/Makefile

 *and*

linux/build/foo/bar/Makefile

> > +#rm -rf ${tgtdir}/Documentation
> Remove this line since it is commented out

right, actually, it can be uncommented but the 'make help' fails; i'm
not sure if we need make help to work since most of the other targets
won't anyhow

so should i remove it (leaving 'make help' as usable) or remove it?

> > +rm -f ${tgtdir}/scripts/*.o
> > +rm -f ${tgtdir}/scripts/*/*.o
> If we do the make clean this is not needed.

ok

> Something less hardcoded are preferred. Maybe like:
> cp -a `ls | grep -v ^asm` asm-generic $(tgtdir}/include

ok (though i'm not a big fan of ls | grep as a rule, it tends to be
fragile when people do dumb things)

> Here we use readlink but in next line we use $ARCH.
> We should be consitent and use ARCH all over.

i tried to preserve as much logic as possible from the original
script, at least initially

i'll change that

> > +if [ "$ARCH" = "x86_64" ]; then
> > +    cp -a asm-i386 ${tgtdir}/include
> > +fi
> Too hardcoded.
> Here we could use some sed magic to extract a potential ALTARCH from asm-${ARCH}/Kbuild
> My sed skills are too limited to do this in a minute... :-(

what about something like?

    sed -n "s/^ALTARCH[[:space:]]:=[[:space:]]\(.*$\)\+/\1/p"

(i'm sure there is a better way though)

> This part I did not check up on - I assume it is correct.

it all seems to work

  parent reply	other threads:[~2007-09-13 18:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-12 23:25 Chris Wedgwood
2007-09-13 18:34 ` Sam Ravnborg
2007-09-13 18:37   ` Robert P. J. Day
2007-09-13 19:26     ` Sam Ravnborg
2007-09-14  9:59       ` Tilman Schmidt
2007-09-13 18:57   ` Chris Wedgwood [this message]
2007-09-13 19:19     ` Sam Ravnborg
2007-09-13 20:17       ` Oleg Verych
2007-09-13 20:05         ` Chris Wedgwood
2007-09-14 10:04           ` Oleg Verych
2007-09-13 23:27     ` Dave Jones
2007-09-14 16:44 ` Goswin von Brederlow

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=20070913185753.GA9259@puku.stupidest.org \
    --to=cw@f00f.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=sandeen@sandeen.net \
    /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

all inboxes | Powered by JetHome®