[PATCH] add a build.sh helper to allow for a one-stop build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows for a quick build instead of typing the whole mkdir, cd,
cmake and ninja sequence.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 README.md |  5 +----
 build.sh  | 12 ++++++++++++
 2 files changed, 13 insertions(+), 4 deletions(-)
 create mode 100755 build.sh

diff --git a/README.md b/README.md
index 98ec5a7..2ddecc3 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
+$ sh build.sh
 ```
 
 *build/bin* will contain the sample programs and *build/lib* will contain the
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..e3d85eb
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+SRCDIR=`dirname $0`
+BUILDDIR="$SRCDIR/build"
+
+if [ ! -d "$BUILDDIR" ]; then
+    mkdir $BUILDDIR
+fi
+
+cd $BUILDDIR
+cmake -GNinja ..
+ninja
-- 
2.10.1.382.ga23ca1b

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux