summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2015-11-22 11:49:44 +0100
committerpgen <p.gen.progs@gmail.com>2015-11-22 12:06:40 +0100
commitbf6615c1021aadc672ad35b77162944a8b6f24d6 (patch)
tree9efa65f00937f9b870d1f7425fb648f5def03539 /build.sh
parent08b5ef7ef446ed652f4512d6de02616251caedff (diff)
Improve the build.sh script and adjust the documentation
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 2016ef2..4f44505 100755
--- a/build.sh
+++ b/build.sh
@@ -1,11 +1,29 @@
#!/bin/sh
+
+# Manage --help option
+# """"""""""""""""""""
+if echo "$@" | grep -- "--help"; then
+ ./configure --help | sed s/configure/build.sh/g
+ exit 1
+fi
+
+# Ensure that aclocal wont' be called
+# """""""""""""""""""""""""""""""""""
+touch Makefile.in install-sh missing depcomp config.h.in configure aclocal.m4
+
+# Create the Makefile
+# """""""""""""""""""
./configure "$@"
+# Add the git version if this is a git clone
+# """"""""""""""""""""""""""""""""""""""""""
[ -d .git ] && V=`git log -1 --pretty=format:-%h` || V=""
sed "/VERSION/s/\$/ \"$V\"/" config.h > /tmp/config.h$$
mv /tmp/config.h$$ config.h
+# Create the executable
+# """""""""""""""""""""
make
exit 0