[DTrace-devel] [PATCH] install: add installation of libdtrace header file to install target

Nick Alcock nick.alcock at oracle.com
Fri Jul 25 13:43:44 UTC 2025


On 25 Jul 2025, Kris Van Hees via DTrace-devel uttered the following:

> Commit 35989b43 ("spec: ensure the include/dtrace hierarchy is included
> in dtrace-devel") assumed that the include/dtrace hierarchy was actually
> installed with 'make install' but that is incorrect.
>
> Now it is.
>
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
>  include/Build | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/include/Build b/include/Build
> index 84cf11c0..706e1ed5 100644
> --- a/include/Build
> +++ b/include/Build
> @@ -5,8 +5,17 @@
>  
>  dt_include_DIR := $(current-dir)
>  
> +# Header files that are needed for consumer development.
> +
> +DTRACE_HEADERS_INSTALL := $(notdir $(wildcard $(dt_include_DIR)/dtrace/*.h))
> +
>  $(objdir)/dt_git_version.h: $(dt_include_DIR)/dt_git_version.h.in .git-version
>  	sed 's, at GIT-VERSION@,'"`cat .git-version`", < $(dt_include_DIR)/dt_git_version.h.in > $(objdir)/dt_git_version.h
>  
>  $(objdir)/include/bpf_asm_helpers.h: /usr/include/bpf/bpf_helper_defs.h $(objdir)/include/.dir.stamp
>  	./include/mkHelpers $< > $@
> +
> +install::
> +	mkdir -p $(INSTINCLUDEDIR)/dtrace
> +	$(call describe-install-target,$(INSTINCLUDEDIR)/dtrace,$(notdir $(DTRACE_HEADERS_INSTALL)))
> +	cd $(dt_include_DIR)/dtrace && install -m 644 $(DTRACE_HEADERS_INSTALL) $(INSTINCLUDEDIR)/dtrace

LGTM (though if we add more dirs, we might want to move away from
stripping the dirname off only to add it back on).

Reviewed-by: Nick Alcock <nick.alcock at oracle.com>



More information about the DTrace-devel mailing list