Messages in this thread Patch in this message | | | Date | Sat, 6 Aug 2022 14:22:03 -0400 | From | Steven Rostedt <> | Subject | Re: [GIT PULL] rtla: Updates for 5.20/6.0 |
| |
On Sat, 6 Aug 2022 08:52:29 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
> For extra bonus points, if you can state all missing packages in one > go (instead of "oops you don't have Xyz" followed by install of Xyz, > followed by "Oops, now you don't have Abc") that would be nice too. > > But at this point the fundamental problem with incomprehensible error > messages is long gone, so it's not a big deal and not worth lots of > effort. More of a "if it's easy enough.."
With the below patch, it will show the warnings for both libtraceevent and libtracefs if they are not installed:
$ make ******************************************** ** NOTICE: libtraceevent version 1.5 or higher not found ** ** Consider installing the latest libtraceevent from your ** distribution, e.g., 'dnf install libtraceevent-devel' on Fedora, ** or from source: ** ** https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ ** ******************************************** ******************************************** ** NOTICE: libtracefs version 1.3 or higher not found ** ** Consider installing the latest libtracefs from your ** distribution, e.g., 'dnf install libtracefs-devel' on Fedora, ** or from source: ** ** https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ ** ******************************************** Makefile:106: *** Please add the necessary dependencies. Stop.
-- Steve
diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile index 1bea2d16d4c1..a8c89b5b8fa5 100644 --- a/tools/tracing/rtla/Makefile +++ b/tools/tracing/rtla/Makefile @@ -61,15 +61,19 @@ endif LIBTRACEEVENT_MIN_VERSION = 1.5 LIBTRACEFS_MIN_VERSION = 1.3 +.PHONY: all warnings +all: warnings rtla + TEST_LIBTRACEEVENT = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEEVENT_MIN_VERSION) libtraceevent > /dev/null 2>&1 || echo n") ifeq ("$(TEST_LIBTRACEEVENT)", "n") +WARNINGS += warning_traceevent .PHONY: warning_traceevent warning_traceevent: @echo "********************************************" @echo "** NOTICE: libtraceevent version $(LIBTRACEEVENT_MIN_VERSION) or higher not found" @echo "**" @echo "** Consider installing the latest libtraceevent from your" - @echo "** distribution, e.g., 'dnf install libtraceevent' on Fedora," + @echo "** distribution, e.g., 'dnf install libtraceevent-devel' on Fedora," @echo "** or from source:" @echo "**" @echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ " @@ -80,12 +84,13 @@ endif TEST_LIBTRACEFS = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEFS_MIN_VERSION) libtracefs > /dev/null 2>&1 || echo n") ifeq ("$(TEST_LIBTRACEFS)", "n") .PHONY: warning_tracefs +WARNINGS += warning_tracefs warning_tracefs: @echo "********************************************" @echo "** NOTICE: libtracefs version $(LIBTRACEFS_MIN_VERSION) or higher not found" @echo "**" @echo "** Consider installing the latest libtracefs from your" - @echo "** distribution, e.g., 'dnf install libtracefs' on Fedora," + @echo "** distribution, e.g., 'dnf install libtracefs-devel' on Fedora," @echo "** or from source:" @echo "**" @echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ " @@ -93,8 +98,12 @@ warning_tracefs: @echo "********************************************" endif -.PHONY: all -all: rtla +ifneq ("$(WARNINGS)", "") +ERROR_OUT = $(error Please add the necessary dependencies) +endif + +warnings: $(WARNINGS) + $(ERROR_OUT) rtla: $(OBJ) $(CC) -o rtla $(LDFLAGS) $(OBJ) $(LIBS)
| |