forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.frag
35 lines (30 loc) · 1.25 KB
/
Makefile.frag
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
phpincludedir=$(prefix)/include/php
PDO_HEADER_FILES= \
php_pdo.h \
php_pdo_driver.h \
php_pdo_error.h
$(srcdir)/pdo_sql_parser.c: $(srcdir)/pdo_sql_parser.re
@(cd $(top_srcdir); \
if test -f ./pdo_sql_parser.re; then \
$(RE2C) $(RE2C_FLAGS) --no-generation-date -o pdo_sql_parser.c pdo_sql_parser.re; \
else \
$(RE2C) $(RE2C_FLAGS) --no-generation-date -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re; \
fi)
install-pdo-headers:
@echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo
@for f in $(PDO_HEADER_FILES); do \
if test -f "$(top_srcdir)/$$f"; then \
$(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
elif test -f "$(top_builddir)/$$f"; then \
$(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
elif test -f "$(top_srcdir)/ext/pdo/$$f"; then \
$(INSTALL_DATA) $(top_srcdir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
elif test -f "$(top_builddir)/ext/pdo/$$f"; then \
$(INSTALL_DATA) $(top_builddir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \
else \
echo "hmmm"; \
fi \
done;
# mini hack
install: $(all_targets) $(install_targets) install-pdo-headers