+$(PHP_PSI_BUILDDIR)/lempar.c:
+ curl -sSo $@ "http://www.sqlite.org/src/raw/tool/lempar.c?name=db1bdb4821f2d8fbd76e577cf3ab18642c8d08d1"
+
+$(PHP_PSI_BUILDDIR)/lemon.c:
+ curl -sSo $@ "http://www.sqlite.org/src/raw/tool/lemon.c?name=5ccba178a8e8a4b21e1c9232944d23973da38ad7"
+
+$(PHP_PSI_BUILDDIR)/lemon: $(PHP_PSI_BUILDDIR)/lemon.c | $(PHP_PSI_BUILDDIR)/lempar.c
+ $(CC) -o $@ $<
+
+$(PHP_PSI_SRCDIR)/src/parser_proc.h: $(PHP_PSI_SRCDIR)/src/parser_proc.c
+
+$(PHP_PSI_SRCDIR)/src/parser_proc.inc:
+$(PHP_PSI_SRCDIR)/src/parser_proc.y: $(PHP_PSI_SRCDIR)/src/parser_def.h $(PHP_PSI_SRCDIR)/src/parser_proc.inc
+ cat $(PHP_PSI_SRCDIR)/src/parser_proc.inc >$@
+ $(CPP) -P -DGENERATE $< >>$@
+$(PHP_PSI_SRCDIR)/src/parser_proc.c: $(PHP_PSI_SRCDIR)/src/parser_proc.y $(LEMON)
+ $(LEMON) $<
+
+$(PHP_PSI_SRCDIR)/src/parser.re: $(PHP_PSI_SRCDIR)/src/parser_proc.h
+ touch $@
+$(PHP_PSI_SRCDIR)/src/parser.c: $(PHP_PSI_SRCDIR)/src/parser.re
+ $(RE2C) -o $@ $<
+
+PHP_PSI_DEPEND = $(patsubst $(PHP_PSI_SRCDIR)/%,$(PHP_PSI_BUILDDIR)/%,$(PHP_PSI_SOURCES:.c=.dep))
+
+$(PHP_PSI_BUILDDIR)/%.dep: $(PHP_PSI_SRCDIR)/%.c
+ $(CC) -MM -MG -MF $@ -MT $(patsubst $(PHP_PSI_SRCDIR)/%,$(PHP_PSI_BUILDDIR)/%,$(@:.dep=.lo)) \
+ $(CPPFLAGS) $(DEFS) $(INCLUDES) $< \
+ || touch $@
+
+php_psi_stdinc.h:
+
+ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
+ifneq ($(PSI_DEPS),)
+-include $(PHP_PSI_DEPEND)
+endif
+endif
+
+install-headers: psi-build-headers
+.PHONY: psi-clean
+clean: psi-clean