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