Hi Michal, On Mon, Dec 26, 2022 at 05:49:51PM +0100, Michal Sojka wrote: > Make 4.4 introduces several backward incompatibilities and the result > is that building trace-cmd with it never finishes. It seems that make > ends up in some kind of infinite recursion. The symptoms are: > > $ make -d > GNU Make 4.4 > Built for x86_64-pc-linux-gnu > Copyright (C) 1988-2022 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Reading makefiles... > Reading makefile 'Makefile'... > Makefile:79: not recursively expanding pkgconfig_dir to export to shell function > Makefile:79: not recursively expanding pkgconfig_dir to export to shell function > Makefile:224: not recursively expanding LIBTRACECMD_SHARED_VERSION to export to shell function > Makefile:79: not recursively expanding pkgconfig_dir to export to shell function > Makefile:224: not recursively expanding LIBTRACECMD_SHARED_VERSION to export to shell function > Makefile:225: not recursively expanding LIBTRACECMD_SHARED_SO to export to shell function > Makefile:79: not recursively expanding pkgconfig_dir to export to shell function > Makefile:79: not recursively expanding pkgconfig_dir to export to shell function > > Build succeeds if recursively expanded variables (defined with '='), > which use $(shell ...) as its value, are replaced with simply expanded > variables (defined with ':='). > > Signed-off-by: Michal Sojka <michal.sojka@xxxxxxx> This seems to address my make troubles. I am again able to build trace-cmd with make v4.4. Thanks! Tested-by: Daniel Wagner <dwagner@xxxxxxx> > --- > Makefile | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/Makefile b/Makefile > index bda49dd..d50e625 100644 > --- a/Makefile > +++ b/Makefile > @@ -221,8 +221,8 @@ LIBS ?= -ldl > LIBTRACECMD_DIR = $(obj)/lib/trace-cmd > LIBTRACECMD_STATIC = $(LIBTRACECMD_DIR)/libtracecmd.a > LIBTRACECMD_SHARED = $(LIBTRACECMD_DIR)/libtracecmd.so.$(LIBTRACECMD_VERSION) > -LIBTRACECMD_SHARED_VERSION = $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\.[0-9]*\).*/\1/') > -LIBTRACECMD_SHARED_SO = $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\).*/\1/') > +LIBTRACECMD_SHARED_VERSION := $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\.[0-9]*\).*/\1/') > +LIBTRACECMD_SHARED_SO := $(shell echo $(LIBTRACECMD_SHARED) | sed -e 's/\(\.so\).*/\1/') > > export LIBTRACECMD_STATIC LIBTRACECMD_SHARED > export LIBTRACECMD_SHARED_VERSION LIBTRACECMD_SHARED_SO > @@ -230,12 +230,12 @@ export LIBTRACECMD_SHARED_VERSION LIBTRACECMD_SHARED_SO > LIBTRACEEVENT=libtraceevent > LIBTRACEFS=libtracefs > > -TEST_LIBTRACEEVENT = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEEVENT_MIN_VERSION) $(LIBTRACEEVENT) > /dev/null 2>&1 && echo y") > -TEST_LIBTRACEFS = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEFS_MIN_VERSION) $(LIBTRACEFS) > /dev/null 2>&1 && echo y") > +TEST_LIBTRACEEVENT := $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEEVENT_MIN_VERSION) $(LIBTRACEEVENT) > /dev/null 2>&1 && echo y") > +TEST_LIBTRACEFS := $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEFS_MIN_VERSION) $(LIBTRACEFS) > /dev/null 2>&1 && echo y") > > ifeq ("$(TEST_LIBTRACEEVENT)", "y") > -LIBTRACEEVENT_CFLAGS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT)") > -LIBTRACEEVENT_LDLAGS = $(shell sh -c "$(PKG_CONFIG) --libs $(LIBTRACEEVENT)") > +LIBTRACEEVENT_CFLAGS := $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT)") > +LIBTRACEEVENT_LDLAGS := $(shell sh -c "$(PKG_CONFIG) --libs $(LIBTRACEEVENT)") > else > .PHONY: warning > warning: > @@ -253,8 +253,8 @@ endif > export LIBTRACEEVENT_CFLAGS LIBTRACEEVENT_LDLAGS > > ifeq ("$(TEST_LIBTRACEFS)", "y") > -LIBTRACEFS_CFLAGS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEFS)") > -LIBTRACEFS_LDLAGS = $(shell sh -c "$(PKG_CONFIG) --libs $(LIBTRACEFS)") > +LIBTRACEFS_CFLAGS := $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEFS)") > +LIBTRACEFS_LDLAGS := $(shell sh -c "$(PKG_CONFIG) --libs $(LIBTRACEFS)") > else > .PHONY: warning > warning: > @@ -324,11 +324,11 @@ endif > export ZLIB_LDLAGS > > ifndef NO_LIBZSTD > -TEST_LIBZSTD = $(shell sh -c "$(PKG_CONFIG) --atleast-version 1.4.0 libzstd > /dev/null 2>&1 && echo y") > +TEST_LIBZSTD := $(shell sh -c "$(PKG_CONFIG) --atleast-version 1.4.0 libzstd > /dev/null 2>&1 && echo y") > > ifeq ("$(TEST_LIBZSTD)", "y") > -LIBZSTD_CFLAGS = $(shell sh -c "$(PKG_CONFIG) --cflags libzstd") > -LIBZSTD_LDLAGS = $(shell sh -c "$(PKG_CONFIG) --libs libzstd") > +LIBZSTD_CFLAGS := $(shell sh -c "$(PKG_CONFIG) --cflags libzstd") > +LIBZSTD_LDLAGS := $(shell sh -c "$(PKG_CONFIG) --libs libzstd") > CFLAGS += -DHAVE_ZSTD > ZSTD_INSTALLED=1 > $(info Have ZSTD compression support) > -- > 2.38.1 >