summaryrefslogtreecommitdiffhomepage
path: root/auto/echo/build
blob: d66c6951aed07fa26df510fb947692f901c1c305 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.


$echo 'building an "echo" program'

rm -f $NXT_BUILD_DIR/echo

nxt_echo_test="$CC -o $NXT_BUILD_DIR/echo -O $NXT_CC_OPT
               auto/echo/echo.c $NXT_LD_OPT"

# "|| true" is to bypass "set -e" setting.
nxt_echo_err=`$nxt_echo_test 2>&1 || true`

if [ ! -x $NXT_BUILD_DIR/echo ]; then
    $echo
    $echo $0: error: cannot build an \"echo\" program:
    $echo
    $echo $nxt_echo_test
    $echo
    $echo $nxt_echo_err
    $echo
    exit 1
fi

echo=$NXT_BUILD_DIR/echo