public inbox for [email protected]
 help / color / mirror / Atom feed
From: Alviro Iskandar Setiawan <[email protected]>
To: Jens Axboe <[email protected]>
Cc: Alviro Iskandar Setiawan <[email protected]>,
	Pavel Begunkov <[email protected]>,
	Ammar Faizi <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>,
	[email protected], [email protected]
Subject: [PATCH liburing 2/2] src/Makefile: Add header files as dependency
Date: Tue,  8 Mar 2022 22:40:02 +0000	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

When the header files are modified, the compiled object are not going
to be recompiled because the header files are not marked as dependency
for the objects. Add those header files as dependency so it is safe
not to do "make clean" after changing those files.

Signed-off-by: Alviro Iskandar Setiawan <[email protected]>
---
 src/Makefile | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index f19d45e..b9428b7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -46,9 +46,16 @@ endif
 liburing_objs := $(patsubst %.c,%.ol,$(liburing_srcs))
 liburing_sobjs := $(patsubst %.c,%.os,$(liburing_srcs))
 
-$(liburing_srcs): syscall.h lib.h
-
-$(liburing_objs) $(liburing_sobjs): include/liburing/io_uring.h
+$(liburing_objs) $(liburing_sobjs): \
+	syscall.h \
+	lib.h \
+	arch/syscall-defs.h \
+	arch/x86/syscall.h \
+	arch/x86/lib.h \
+	arch/aarch64/syscall.h \
+	arch/generic/syscall.h \
+	arch/generic/lib.h \
+	include/liburing/io_uring.h
 
 %.os: %.c
 	$(QUIET_CC)$(CC) $(CPPFLAGS) $(SO_CFLAGS) -c -o $@ $<
@@ -78,8 +85,6 @@ ifeq ($(ENABLE_SHARED),1)
 	ln -sf $(relativelibdir)$(libname) $(libdevdir)/liburing.so
 endif
 
-$(liburing_objs): include/liburing.h
-
 clean:
 	@rm -f $(all_targets) $(liburing_objs) $(liburing_sobjs) $(soname).new
 	@rm -f *.so* *.a *.o
-- 
2.32.0


  parent reply	other threads:[~2022-03-08 22:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 22:40 [PATCH liburing 0/2] Changes for src/Makefile Alviro Iskandar Setiawan
2022-03-08 22:40 ` [PATCH liburing 1/2] src/Makefile: Remove `-fomit-frame-pointer` from default build Alviro Iskandar Setiawan
2022-03-08 22:40 ` Alviro Iskandar Setiawan [this message]
2022-03-08 22:52   ` [PATCH liburing 2/2] src/Makefile: Add header files as dependency Ammar Faizi
2022-03-08 23:06     ` Alviro Iskandar Setiawan
2022-03-09  0:23       ` Alviro Iskandar Setiawan
2022-03-09  0:41         ` Ammar Faizi
2022-03-08 22:58   ` Ammar Faizi
2022-03-08 23:07     ` Alviro Iskandar Setiawan

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=20220308224002.3814225-3-alviro.iskandar@gnuweeb.org \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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