$(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