summaryrefslogtreecommitdiffstats
path: root/build-aux
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-05-16 16:58:20 +0200
committerAnand Avati <avati@redhat.com>2014-05-17 11:53:34 -0700
commit618d465295df02ae6d53be1327947a210bb8b47d (patch)
tree5d6a8a489ab3fc339d478cd16c7401736f749df8 /build-aux
parentaa85de4be3f96a140a69170330293bfdfa3d24e7 (diff)
NetBSD build fixes
- Shell scripts: == is specific to bash and ksh. Use = instead. - Shell scripts: use sh instead of bash if bash functionnality is not used - Shell scripts: ${var/search/replace} is specific to bash - sed: The -i option is specific to GNU sed. - Makefiles: $< outside of generic rules only work in GNU make. - xdrproc_t() is not universally defined as variadic. Do not specify third argument if it is not used - NetBSD FUSE specific: only include <perfuse.h> in FUSE client code, it harms in other locations - configure: Search for gettext() in libintl as NetBSD stores it there - Like MacOS X, NetBSD has unmount(2) and not umount(2) (un vs u) Some other build issues previously included in this change were removed: - __THROW macro, addressed in http://review.gluster.com/#/c/7757/ - getmntent() compat shared with MacOS X, in http://review.gluster.com/#/c/7722/ This patchset adds warning fixes for mount_glusterfs BUG: 764655 Change-Id: I2f1faf8ff96362d3e2baf237b943df619011f1f4 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/7783 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/pkg-version6
-rwxr-xr-xbuild-aux/xdrgen8
2 files changed, 7 insertions, 7 deletions
diff --git a/build-aux/pkg-version b/build-aux/pkg-version
index 15efb15..83d4a5f 100755
--- a/build-aux/pkg-version
+++ b/build-aux/pkg-version
@@ -1,11 +1,11 @@
-#!/bin/bash
+#!/bin/sh
# To override version/release from git,
# create VERSION file containing text with version/release
# eg. v3.4.0-1
PKG_VERSION=`cat VERSION 2> /dev/null || git describe --tags --match "v[0-9]*"`
-function get_version ()
+get_version()
{
# tags and output versions:
# - v3.4.0 => 3.4.0 (upstream clean)
@@ -21,7 +21,7 @@ function get_version ()
echo $PKG_VERSION | awk "$AWK_VERSION" | tr -cd '[:alnum:].'
}
-function get_release ()
+get_release()
{
# tags and output releases:
# - v3.4.0 => 0 (upstream clean)
diff --git a/build-aux/xdrgen b/build-aux/xdrgen
index e826111..c6dd5cc 100755
--- a/build-aux/xdrgen
+++ b/build-aux/xdrgen
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
append_licence_header ()
{
@@ -67,7 +67,7 @@ gen_headers ()
rm -f $hfile;
rpcgen -h -o $hfile $xfile;
# the '#ifdef' part of file should be fixed
- sed -i -e 's/-/_/g' $hfile;
+ sed -e 's/-/_/g' $hfile > ${hfile}.new && mv ${hfile}.new $hfile;
# Gen header to temp file and append generated file
append_licence_header $hfile $tmp_hfile;
# now move the destination file to actual original file
@@ -85,11 +85,11 @@ main ()
exit 1;
fi
- if [ $1 == "header" ]; then
+ if [ $1 = "header" ]; then
gen_headers $2
fi
- if [ $1 == "source" ]; then
+ if [ $1 = "source" ]; then
gen_sources $2
fi
}