All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
To: Michal Marek <mmarek@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org,
	David Rientjes <rientjes@google.com>,
	Greg Thelen <gthelen@google.com>,
	Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
Subject: Re: [PATCH] kbuild: Clean up and speed up the localversion logic
Date: Tue, 22 Jun 2010 12:44:12 +0200	[thread overview]
Message-ID: <20100622104412.GB9779@ethz.ch> (raw)
In-Reply-To: <1276782038-23441-1-git-send-email-mmarek@suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]

Michal Marek [Thu, Jun 17, 2010 at 03:40:38PM +0200]:
> Now that we run scripts/setlocalversion during every build, it makes
> sense to move all the localversion logic there. This cleans up the
> toplevel Makefile and also makes sure that the script is called only
> once in 'make prepare' (previously, it would be called every time due to
> a variable expansion in an ifneq statement). No user-visible change is
> intended, unless one runs the setlocalversion script directly.

Sounds good in general.

> --- a/scripts/setlocalversion
> +++ b/scripts/setlocalversion
> @@ -10,73 +10,158 @@
>  #
>  
>  usage() {
> -	echo "Usage: $0 [srctree]" >&2
> +	echo "Usage: $0 [--scm-only] [srctree]" >&2
>  	exit 1
>  }

If more stuff like this is coming, we should probably rewrite
option handling. No need to change right now, but to keep in mind.

> -cd "${1:-.}" || usage
> +scm_only=false
> +srctree=.
> +if test "$1" = "--scm-only"; then
> +	scm_only=true
> +	shift
> +fi
> +if test $# -gt 0; then
> +	srctree=$1

You probably want

srctree="$1" 

to catch spaces and co. in the path.

Otherwise I just had a quick view over it, but seems to look good.

Nico

-- 
New PGP key: 7ED9 F7D3 6B10 81D7 0EC5  5C09 D7DC C8E4 3187 7DF0
Please resign, if you signed 9885188C or 8D0E27A4.

Currently moving *.schottelius.org to http://www.nico.schottelius.org/ ...

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2010-06-22 10:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07  6:53 Running make install over sshfs is painful now Dmitry Torokhov
2010-06-15 11:32 ` Michal Marek
2010-06-17 13:40   ` [PATCH] kbuild: Clean up and speed up the localversion logic Michal Marek
2010-06-17 23:05     ` David Rientjes
2010-06-18  5:25       ` Dmitry Torokhov
2010-06-18  5:55     ` Dmitry Torokhov
2010-06-29 21:54       ` Dmitry Torokhov
2010-06-30 14:51         ` Michal Marek
2010-06-22 10:44     ` Nico Schottelius [this message]
2010-06-22 11:13       ` Michal Marek
2010-06-22 11:25         ` Nico Schottelius

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=20100622104412.GB9779@ethz.ch \
    --to=nico-linuxsetlocalversion@schottelius.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gthelen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=rientjes@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.