All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - make: restore buildir != srcdir support
Date: Fri, 19 Mar 2021 23:17:16 +0000 (GMT)	[thread overview]
Message-ID: <20210319231716.E27EB385783D@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=48d04afaa2015fe285b2ae499b7f06d0b25ae00d
Commit:        48d04afaa2015fe285b2ae499b7f06d0b25ae00d
Parent:        c6a76c1ffe8321a4f2ed988fe5884541489e120f
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Fri Mar 19 14:47:21 2021 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 19 23:21:18 2021 +0100

make: restore buildir != srcdir support

Our new faster deps generation missed support for
buildirs != srcdir - as it can be usable to have
several builds from unchanged directory with sources.
---
 libdm/make.tmpl.in | 5 ++++-
 make.tmpl.in       | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in
index af55a7f91..083fba9c3 100644
--- a/libdm/make.tmpl.in
+++ b/libdm/make.tmpl.in
@@ -404,14 +404,17 @@ DEFS+=-D_FILE_OFFSET_BITS=64
 
 %.o: %.c $(DEPS)
 	@echo "    [CC] $(<F)"
+	@mkdir -p $(@D)
 	$(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
 
 %.o: %.cpp $(DEPS)
 	@echo "    [CXX] $(<F)"
+	@mkdir -p $(@D)
 	$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
 
-%.pot: %.c Makefile
+%.pot: %.c $(DEPS)
 	@echo "    [CC] $@"
+	@mkdir -p $(@D)
 	$(Q) $(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/po/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $< >$@
 
 %.so: %.o
diff --git a/make.tmpl.in b/make.tmpl.in
index 2611dcd90..6f3f81915 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -443,14 +443,17 @@ DEFS+=-D_FILE_OFFSET_BITS=64
 
 %.o: %.c $(DEPS)
 	@echo "    [CC] $(<F)"
+	@mkdir -p $(@D)
 	$(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
 
 %.o: %.cpp $(DEPS)
 	@echo "    [CXX] $(<F)"
+	@mkdir -p $(@D)
 	$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
 
-%.pot: %.c Makefile
+%.pot: %.c $(DEPS)
 	@echo "    [CC] $(<F)"
+	@mkdir -p $(@D)
 	$(Q) $(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/po/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $< >$@
 
 %.so: %.o



                 reply	other threads:[~2021-03-19 23:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210319231716.E27EB385783D@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.