xref: /unit/auto/echo/build (revision 327:d698da6de19b)
10Sigor@sysoev.ru
20Sigor@sysoev.ru# Copyright (C) Igor Sysoev
30Sigor@sysoev.ru# Copyright (C) NGINX, Inc.
40Sigor@sysoev.ru
50Sigor@sysoev.ru
60Sigor@sysoev.ru$echo 'building an "echo" program'
70Sigor@sysoev.ru
80Sigor@sysoev.rurm -f $NXT_BUILD_DIR/echo
90Sigor@sysoev.ru
100Sigor@sysoev.runxt_echo_test="$CC -o $NXT_BUILD_DIR/echo -O $NXT_CC_OPT
110Sigor@sysoev.ru               auto/echo/echo.c $NXT_LD_OPT"
120Sigor@sysoev.ru
13*327Sigor@sysoev.ru# "|| true" is to bypass "set -e" setting.
14*327Sigor@sysoev.runxt_echo_err=`$nxt_echo_test 2>&1 || true`
150Sigor@sysoev.ru
160Sigor@sysoev.ruif [ ! -x $NXT_BUILD_DIR/echo ]; then
170Sigor@sysoev.ru    $echo
180Sigor@sysoev.ru    $echo $0: error: cannot build an \"echo\" program:
190Sigor@sysoev.ru    $echo
200Sigor@sysoev.ru    $echo $nxt_echo_test
210Sigor@sysoev.ru    $echo
220Sigor@sysoev.ru    $echo $nxt_echo_err
230Sigor@sysoev.ru    $echo
240Sigor@sysoev.ru    exit 1
250Sigor@sysoev.rufi
260Sigor@sysoev.ru
270Sigor@sysoev.ruecho=$NXT_BUILD_DIR/echo
28