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); \ 11 if test -f ./pdo_sql_parser.re; then \ 12 $(RE2C) $(RE2C_FLAGS) --no-generation-date -o pdo_sql_parser.c pdo_sql_parser.re; \ 13 else \ 14 $(RE2C) $(RE2C_FLAGS) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re; \ 15 fi) 16 17install-pdo-headers: 18 @echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/" 19 @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo 20 @for f in $(PDO_HEADER_FILES); do \ 21 if test -f "$(top_srcdir)/$$f"; then \ 22 $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 23 elif test -f "$(top_builddir)/$$f"; then \ 24 $(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 25 elif test -f "$(top_srcdir)/ext/pdo/$$f"; then \ 26 $(INSTALL_DATA) $(top_srcdir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 27 elif test -f "$(top_builddir)/ext/pdo/$$f"; then \ 28 $(INSTALL_DATA) $(top_builddir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ 29 else \ 30 echo "hmmm"; \ 31 fi \ 32 done; 33 34# mini hack 35install: $(all_targets) $(install_targets) install-pdo-headers 36