From 2d4fb56c1d333069fa847d6e7c1f415fa41f631e Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 15 Jan 2018 14:23:46 +0100 Subject: Allow pecl like usage in ext/phar, closes #2955 --- ext/phar/Makefile.frag | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ext/phar/Makefile.frag') diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag index e58795deea..0e3713fc63 100644 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag @@ -1,5 +1,10 @@ $(srcdir)/phar_path_check.c: $(srcdir)/phar_path_check.re - @(cd $(top_srcdir); $(RE2C) --no-generation-date -b -o ext/phar/phar_path_check.c ext/phar/phar_path_check.re) + @(cd $(top_srcdir); \ + if test -f ./php_phar.h; then \ + $(RE2C) --no-generation-date -b -o phar_path_check.c phar_path_check.re; \ + else \ + $(RE2C) --no-generation-date -b -o ext/phar/phar_path_check.c ext/phar/phar_path_check.re; \ + fi) pharcmd: $(builddir)/phar.php $(builddir)/phar.phar -- cgit v1.2.1