linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Subject: [PATCH 3/9] libtracefs: Fix sample intermediate build targets
Date: Thu, 16 Dec 2021 19:42:08 -0500	[thread overview]
Message-ID: <20211217004214.16074-4-rostedt@goodmis.org> (raw)
In-Reply-To: <20211217004214.16074-1-rostedt@goodmis.org>

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The target for compiling from *.c to *.o in the samples directory had:

  $(bdir)/%.o: %.c

But since the *.c files were extracted, they already included the $(bdir)
in the name, so the above was really matching: $(bdir)/$(bdir)/*.c and not
being used. Remove the extra $(bdir) from the target.

This also exposed a bug that $(CFLAGS) was not included, and the stream.c
failed to build because of the lacking -D_GNU_SOURCE.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 samples/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/samples/Makefile b/samples/Makefile
index 6ee57fecacbd..2d0d2397c5b4 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -60,10 +60,10 @@ $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS))
 ## name, and the file will not be discarded by make.
 #
 # $(bdir)/XX.o: $(bdir)/XX.c
-#	$(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES)
+#	$(CC) -g -Wall $(CFLAGS) -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES)
 
-$(bdir)/%.o: %.c
-	$(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES)
+%.o: %.c
+	$(CC) -g -Wall $(CFLAGS) -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES)
 
 clean:
 	$(RM) $(bdir)/*
-- 
2.33.0


  parent reply	other threads:[~2021-12-17  0:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17  0:42 [PATCH 0/9] libtracefs: Updates to the Makefile Steven Rostedt
2021-12-17  0:42 ` [PATCH 1/9] libtracefs: Remove unused "bindir" from Makefile Steven Rostedt
2021-12-17  0:42 ` [PATCH 2/9] libtracefs: Remove unneeded blkflags " Steven Rostedt
2021-12-17  0:42 ` Steven Rostedt [this message]
2021-12-17  0:42 ` [PATCH 4/9] libtracefs: Add "DESCEND" output when descending into directories during build Steven Rostedt
2021-12-17  0:42 ` [PATCH 5/9] libtracefs: Have make clean output cleaner Steven Rostedt
2021-12-17  0:42 ` [PATCH 6/9] libtracefs: Quiet mv: cannot stat message for libtracefs.a Steven Rostedt
2021-12-17  0:42 ` [PATCH 7/9] libtracefs: Quiet "Nothing to be done for" messages Steven Rostedt
2021-12-17  0:42 ` [PATCH 8/9] libtracefs: Have sample build look cleaner Steven Rostedt
2021-12-17  0:42 ` [PATCH 9/9] libtracefs: Have make tags and TAGS honor O= build directory Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211217004214.16074-4-rostedt@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).