X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=Makefile.frag;h=3ef9ecbd3ed2213378a5ade26c56e96248e4cb11;hp=480198627ffed62911ab0155654d21e13e024552;hb=b2a4f89e30c04a18ec0da23d2ff0c80c2dccf42e;hpb=86508dbae5f9296485820e654f07af59be55003f diff --git a/Makefile.frag b/Makefile.frag index 4801986..3ef9ecb 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -1,22 +1,16 @@ -phpincludedir=$(prefix)/include/php +# provide headers in builddir, so they do not end up in /usr/include/ext/http/src -install-http-headers: - @echo "Installing HTTP headers: $(INSTALL_ROOT)$(phpincludedir)/ext/http/" - @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/http - @for f in $(PHP_HTTP_HEADERS); 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"; \ - fi \ - done; +PHP_HTTP_HEADERS := $(addprefix $(PHP_HTTP_BUILDDIR)/,$(PHP_HTTP_HEADERS)) -# mini hack -install: $(all_targets) $(install_targets) install-http-headers +$(PHP_HTTP_BUILDDIR)/%.h: $(PHP_HTTP_SRCDIR)/src/%.h + @cat >$@ <$< +all: 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 $(PHP_HTTP_HEADERS)