-$(PHP_PSI_DEPEND): $(PHP_PSI_SOURCES)
- $(CC) -MM -MG $(CPPFLAGS) $(DEFS) $(INCLUDES) $^ \
- | $(SED) -e 's/^\(.*\).o: /\1.lo: /' \
- > $@
+.PHONY: psi-clean-depend
+psi-clean-depend:
+ -rm -f $(PHP_PSI_DEPEND)
+
+psi-clean: psi-clean-depend
+
+.PHONY: psi-watch
+psi-watch:
+ -while inotifywait -q -e modify -r $(PHP_PSI_SRCDIR); do $(MAKE); done
+
+install-headers: psi-build-headers
+clean: psi-clean-headers
+ifneq ($(PSI_DEPS),)
+clean: psi-clean-depend
+endif
+
+.PHONY: psi-paranoid-backups
+psi-paranoid-backups:
+ @-if test -z "$(REPO)"; then \
+ echo; \
+ echo "Usage: make psi-paranoid-backups REPO=<repo to push to>"; \
+ echo; \
+ else \
+ echo "Watching $(PHP_PSI_SRCDIR) for changes to flush and push to $(REPO) ..."; \
+ while inotifywait -q -e modify -r $(PHP_PSI_SRCDIR); do \
+ git ci -am flush; \
+ git push $(REPO); \
+ done; \
+ fi