[dpdk-dev] [PATCH v2] devtools: better freebsd support
Olivier Matz
olivier.matz at 6wind.com
Thu Jul 11 15:06:12 CEST 2019
On Mon, Jul 08, 2019 at 06:35:25PM +0200, Thomas Monjalon wrote:
> 05/07/2019 15:58, Olivier Matz:
> > - As "readlink -e" and "readlink -m" do not exist on freebsd,
> > use "readlink -f", it should not have any impact in these cases.
> > - "sed -ri" is invalid on freebsd and should be replaced by
> > "sed -ri=''"
> > - Use gmake instead of make.
> >
> > This fixes the following command:
> > SYSDIR=/usr/src/sys ./devtools/test-build.sh \
> > -j4 x86_64-native-freebsd-gcc
> >
> > Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> > ---
> > --- a/devtools/test-build.sh
> > +++ b/devtools/test-build.sh
> > +[ -z $MAKE ] && command -v gmake > /dev/null && MAKE=gmake
> > +[ -z $MAKE ] && command -v make > /dev/null && MAKE=make
> > +[ -z $MAKE ] && echo "Cannot find make or gmake" && exit 1
>
> I'm surprised it works, given the -e in this script.
> I would be more confortable with "if/elif" constructs.
Honnestly, I'm surprised too :)
This is the expected. Quoting "man sh":
-e errexit
If not interactive, exit immediately if any untested command fails. The
exit status of a command is considered to be explicitly tested if the
command is used to control an if, elif, while, or until; or if the
command is the left hand operand of an "&&" or "||" operator.
More information about the dev
mailing list