diff --git a/Makefile.frag b/Makefile.frag new file mode 100644 index 0000000..88924e8 --- /dev/null +++ b/Makefile.frag @@ -0,0 +1,9 @@ +# Only when building statically into PHP (i.e. not via phpize) +ifeq ($(PHP_AST_SHARED),no) + +# Ensure Zend’s generated sources are ready before building ast +$(builddir)/ast.lo: \ + $(top_srcdir)/Zend/zend_language_parser.c \ + $(top_srcdir)/Zend/zend_language_scanner.c + +endif diff --git a/config.m4 b/config.m4 index fb7a360..faf9cfe 100644 --- a/config.m4 +++ b/config.m4 @@ -5,4 +5,5 @@ PHP_ARG_ENABLE(ast, whether to enable ast support, if test "$PHP_AST" != "no"; then PHP_NEW_EXTENSION(ast, ast.c ast_data.c, $ext_shared) + PHP_ADD_MAKEFILE_FRAGMENT fi