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