Makefile.frag 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. phpincludedir=$(prefix)/include/php
  2. PDO_HEADER_FILES= \
  3. php_pdo.h \
  4. php_pdo_driver.h \
  5. php_pdo_error.h
  6. $(srcdir)/pdo_sql_parser.c: $(srcdir)/pdo_sql_parser.re
  7. (cd $(top_srcdir); $(RE2C) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re)
  8. install-pdo-headers:
  9. @echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/"
  10. @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo
  11. @for f in $(PDO_HEADER_FILES); do \
  12. if test -f "$(top_srcdir)/$$f"; then \
  13. $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
  14. elif test -f "$(top_builddir)/$$f"; then \
  15. $(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
  16. elif test -f "$(top_srcdir)/ext/pdo/$$f"; then \
  17. $(INSTALL_DATA) $(top_srcdir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
  18. elif test -f "$(top_builddir)/ext/pdo/$$f"; then \
  19. $(INSTALL_DATA) $(top_builddir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
  20. else \
  21. echo "hmmm"; \
  22. fi \
  23. done;
  24. # mini hack
  25. install: $(all_targets) $(install_targets) install-pdo-headers