1 2# Copyright (C) Igor Sysoev 3# Copyright (C) Nginx, Inc. 4 5 6case "$NGX_CC_NAME" in 7 8 msvc) 9 ngx_makefile=makefile.msvc 10 ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC" 11 ngx_pcre="PCRE=\"$PCRE\"" 12 ;; 13 14 owc) 15 ngx_makefile=makefile.owc 16 ngx_opt="CPU_OPT=\"$CPU_OPT\"" 17 ngx_pcre=`echo PCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"` 18 ;; 19 20 bcc) 21 ngx_makefile=makefile.bcc 22 ngx_opt="-DCPU_OPT=\"$CPU_OPT\"" 23 ngx_pcre=`echo \-DPCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"` 24 ;; 25 26 *) 27 ngx_makefile= 28 ;; 29 30esac 31 32 33if [ -n "$ngx_makefile" ]; then 34 35 cat << END >> $NGX_MAKEFILE 36 37`echo "$PCRE/pcre.lib: $PCRE/pcre.h $NGX_MAKEFILE" \ 38 | sed -e "s/\//$ngx_regex_dirsep/g"` 39 \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt 40 41`echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"` 42 \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h 43 44END 45 46else 47 48 cat << END >> $NGX_MAKEFILE 49 50$PCRE/pcre.h: $PCRE/Makefile 51 52$PCRE/Makefile: $NGX_MAKEFILE 53 cd $PCRE \\ 54 && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\ 55 && CC="\$(CC)" CFLAGS="$PCRE_OPT" \\ 56 ./configure --disable-shared $PCRE_CONF_OPT 57 58$PCRE/.libs/libpcre.a: $PCRE/Makefile 59 cd $PCRE \\ 60 && \$(MAKE) libpcre.la 61 62END 63 64fi 65