make 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. cat << END >> $NGX_MAKEFILE
  4. $NGX_OBJS/src/http/modules/perl/ngx_http_perl_module.o: \\
  5. $NGX_OBJS/$ngx_perl_module
  6. $NGX_OBJS/$ngx_perl_module: \\
  7. \$(CORE_DEPS) \$(HTTP_DEPS) \\
  8. src/http/modules/perl/ngx_http_perl_module.h \\
  9. $NGX_OBJS/src/http/modules/perl/Makefile
  10. cd $NGX_OBJS/src/http/modules/perl && \$(MAKE)
  11. rm -rf $NGX_OBJS/install_perl
  12. $NGX_OBJS/src/http/modules/perl/Makefile: \\
  13. $NGX_AUTO_CONFIG_H \\
  14. src/core/nginx.h \\
  15. src/http/modules/perl/Makefile.PL \\
  16. src/http/modules/perl/nginx.pm \\
  17. src/http/modules/perl/nginx.xs \\
  18. src/http/modules/perl/typemap
  19. grep 'define NGINX_VERSION' src/core/nginx.h \\
  20. | sed -e 's/^.*"\(.*\)".*/\1/' > \\
  21. $NGX_OBJS/src/http/modules/perl/version
  22. sed "s/%%VERSION%%/\`cat $NGX_OBJS/src/http/modules/perl/version\`/" \\
  23. src/http/modules/perl/nginx.pm > \\
  24. $NGX_OBJS/src/http/modules/perl/nginx.pm
  25. cp -p src/http/modules/perl/nginx.xs $NGX_OBJS/src/http/modules/perl/
  26. cp -p src/http/modules/perl/typemap $NGX_OBJS/src/http/modules/perl/
  27. cp -p src/http/modules/perl/Makefile.PL $NGX_OBJS/src/http/modules/perl/
  28. cd $NGX_OBJS/src/http/modules/perl \\
  29. && NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \\
  30. NGX_PM_LDFLAGS="$NGX_LD_OPT \$(NGX_PM_LDFLAGS)" \\
  31. NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \\
  32. NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\
  33. $NGX_PERL Makefile.PL \\
  34. LIB=$NGX_PERL_MODULES \\
  35. INSTALLSITEMAN3DIR=$NGX_PERL_MODULES_MAN
  36. END