Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / lib / perl / make
blob260bd95a0b7b7fccfe923df53362865cbbfae8ce
2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 v=`grep 'define NGINX_VERSION' src/core/nginx.h | sed -e 's/^.*"\(.*\)".*/\1/'`
9 cat << END                                                    >> $NGX_MAKEFILE
11 $NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.$ngx_perl_dlext: \\
12                 \$(CORE_DEPS) \$(HTTP_DEPS) \\
13                 src/http/modules/perl/ngx_http_perl_module.h \\
14                 $NGX_OBJS/src/http/modules/perl/Makefile
15         cd $NGX_OBJS/src/http/modules/perl && \$(MAKE)
17         rm -rf $NGX_OBJS/install_perl
20 $NGX_OBJS/src/http/modules/perl/Makefile: \\
21                 src/core/nginx.h \\
22                 src/http/modules/perl/Makefile.PL \\
23                 src/http/modules/perl/nginx.pm \\
24                 src/http/modules/perl/nginx.xs \\
25                 src/http/modules/perl/typemap
26         sed "s/%%VERSION%%/$v/" src/http/modules/perl/nginx.pm > \\
27                 $NGX_OBJS/src/http/modules/perl/nginx.pm
28         cp -p src/http/modules/perl/nginx.xs $NGX_OBJS/src/http/modules/perl/
29         cp -p src/http/modules/perl/typemap $NGX_OBJS/src/http/modules/perl/
30         cp -p src/http/modules/perl/Makefile.PL $NGX_OBJS/src/http/modules/perl/
32         cd $NGX_OBJS/src/http/modules/perl \\
33                 && NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \\
34                         NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \\
35                         NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\
36                 $NGX_PERL Makefile.PL \\
37                         LIB=$NGX_PERL_MODULES \\
38                         INSTALLSITEMAN3DIR=$NGX_PERL_MODULES_MAN
40 END