All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] add a build.sh helper to allow for a one-stop build
Date: Wed, 12 Oct 2016 12:30:15 +0300	[thread overview]
Message-ID: <20161012093015.GS9282@leon.nu> (raw)
In-Reply-To: <20161010164758.GB1796-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

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

On Mon, Oct 10, 2016 at 10:47:58AM -0600, Jason Gunthorpe wrote:
> On Mon, Oct 10, 2016 at 09:17:11AM -0700, Bart Van Assche wrote:
> > On 10/10/16 08:59, Christoph Hellwig wrote:
> > >On Mon, Oct 10, 2016 at 08:56:33AM -0700, Bart Van Assche wrote:
> > >>Have you considered to make this script stop immediately if one of the
> > >>steps fails, e.g. as follows?
> > >
> > >How about just ading a
> > >
> > >set -e
> > >
> > >to the beginning to get this automatically?
> >
> > That would also work. But if there is a space anywhere in the path in which
> > the rdma-core repository exists, mkdir $BUILDDIR will have to be changed
> > into mkdir "$BUILDDIR".
>
> Is this OK?
>
> From 6362ec4c1ddec0f6b2a1bf052cdfde63cbf73d90 Mon Sep 17 00:00:00 2001
> From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> Date: Mon, 10 Oct 2016 10:46:47 -0600
> Subject: [PATCH] Add a build.sh helper to allow for a one-stop build
>
> This allows for a quick build instead of typing the whole mkdir, cd,
> cmake and ninja sequence.
>
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  README.md | 17 +----------------
>  build.sh  | 33 +++++++++++++++++++++++++++++++++
>  2 files changed, 34 insertions(+), 16 deletions(-)
>  create mode 100755 build.sh
>
> diff --git a/README.md b/README.md
> index 98ec5a7d695f..66aee3f49f00 100644
> --- a/README.md
> +++ b/README.md
> @@ -36,10 +36,7 @@ Additional service daemons are provided for:
>  This project uses a cmake based build system. Quick start:
>
>  ```sh
> -$ mkdir build
> -$ cd build
> -$ cmake -GNinja ..
> -$ ninja
> +$ bash build.sh
>  ```
>
>  *build/bin* will contain the sample programs and *build/lib* will contain the
> @@ -76,16 +73,6 @@ Install required packages:
>  $ yum install cmake gcc libnl3-devel make pkgconfig valgrind-devel
>  ```
>
> -For end users, the package can be built using GNU Make and the old cmake
> -included with the distro:
> -
> -```sh
> -$ mkdir build
> -$ cd build
> -$ cmake  ..
> -$ make
> -```
> -
>  Developers are suggested to install more modern tooling for the best experience.
>
>  ```sh
> @@ -96,8 +83,6 @@ $ unzip ninja-linux.zip
>  $ install -m755 ninja /usr/local/bin/ninja
>  ```
>
> -Use the 'cmake3' program in place of `cmake` in the above instructions.
> -
>  # Reporting bugs
>
>  Bugs should be reported to the <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> mailing list
> diff --git a/build.sh b/build.sh
> new file mode 100755
> index 000000000000..76205e6af921
> --- /dev/null
> +++ b/build.sh
> @@ -0,0 +1,33 @@
> +#!/bin/bash
> +set -e
> +
> +SRCDIR=`dirname $0`
> +BUILDDIR="$SRCDIR/build"
> +
> +if [ ! -d "$BUILDDIR" ]; then
> +    mkdir "$BUILDDIR"
> +fi

What do you think about following code, instead of 3 lines above?

+ mkdir -p "$BUILDDIR"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-10-12  9:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 15:28 [PATCH] add a build.sh helper to allow for a one-stop build Christoph Hellwig
     [not found] ` <1476113282-19194-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-10-10 15:56   ` Bart Van Assche
     [not found]     ` <c2d80cd4-74b8-8391-1855-3c666f611d91-HInyCGIudOg@public.gmane.org>
2016-10-10 15:59       ` Christoph Hellwig
     [not found]         ` <20161010155949.GA20091-jcswGhMUV9g@public.gmane.org>
2016-10-10 16:17           ` Bart Van Assche
     [not found]             ` <ec4f3158-a25d-7cd8-216c-fbec52577e75-HInyCGIudOg@public.gmane.org>
2016-10-10 16:47               ` Jason Gunthorpe
     [not found]                 ` <20161010164758.GB1796-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-10 16:51                   ` Christoph Hellwig
     [not found]                     ` <20161010165115.GA8385-jcswGhMUV9g@public.gmane.org>
2016-10-10 17:46                       ` Bart Van Assche
2016-10-12  9:30                   ` Leon Romanovsky [this message]
     [not found]                     ` <20161012093015.GS9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-12 10:52                       ` Christoph Hellwig
     [not found]                         ` <20161012105208.GA9491-jcswGhMUV9g@public.gmane.org>
2016-10-12 12:18                           ` Leon Romanovsky
     [not found]                             ` <20161012121845.GT9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-12 12:22                               ` Leon Romanovsky
     [not found]                                 ` <20161012122220.GU9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-12 16:38                                   ` Jason Gunthorpe
     [not found]                                     ` <20161012163834.GA18838-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-12 17:31                                       ` Leon Romanovsky

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=20161012093015.GS9282@leon.nu \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=bvanassche-HInyCGIudOg@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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.