move to PHP-7.4 as current GA
[m6w6/ext-http] / Makefile.frag
index 9854c03f6df633ffbd5f354f8f8f662df367df88..3dd9ce2629fa4eedce98563e83add6322feff557 100644 (file)
@@ -1,41 +1,16 @@
-phpincludedir=$(prefix)/include/php
+# provide headers in builddir, so they do not end up in /usr/include/ext/http/src
 
-HTTP_HEADER_FILES= \
-       phpstr/phpstr.h \
-       php_http_cache_api.h \
-       php_http_headers_api.h \
-       php_http_response_object.h \
-       php_http_util_object.h \
-       php_http.h \
-       php_http_curl_api.h \
-       php_http_message_api.h \
-       php_http_send_api.h \
-       php_http_api.h \
-       php_http_date_api.h \
-       php_http_message_object.h \
-       php_http_std_defs.h \
-       php_http_auth_api.h \
-       php_http_exception_object.h \
-       php_http_request_object.h \
-       php_http_url_api.h
+PHP_HTTP_HEADERS := $(addprefix $(PHP_HTTP_BUILDDIR)/,$(PHP_HTTP_HEADERS))
 
-install-http-headers:
-       @echo "Installing HTTP headers:          $(INSTALL_ROOT)$(phpincludedir)/ext/http/"
-       @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/http
-       @for f in $(HTTP_HEADER_FILES); do \
-               if test -f "$(top_srcdir)/$$f"; then \
-                       $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/http; \
-               elif test -f "$(top_builddir)/$$f"; then \
-                       $(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/http; \
-               elif test -f "$(top_srcdir)/ext/http/$$f"; then \
-                       $(INSTALL_DATA) $(top_srcdir)/ext/http/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/http; \
-               elif test -f "$(top_builddir)/ext/http/$$f"; then \
-                       $(INSTALL_DATA) $(top_builddir)/ext/http/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/http; \
-               else \
-                       echo "WTF? $f $$f"; \
-               fi \
-       done;
+$(PHP_HTTP_BUILDDIR)/%.h: $(PHP_HTTP_SRCDIR)/src/%.h
+       @cat >$@ <$<
 
-# mini hack
-install: $(all_targets) $(install_targets) install-http-headers
+$(all_targets): http-build-headers
+clean: http-clean-headers
 
+.PHONY: http-build-headers
+http-build-headers: $(PHP_HTTP_HEADERS)
+
+.PHONY: http-clean-headers
+http-clean-headers:
+       -rm -f $(PHP_HTTP_HEADERS)