public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Nathan Scott <nathans@debian.org>, xfs@oss.sgi.com
Subject: [PATCH] build: create include/xfs before installing headers (was Re: [PATCH 06/10] xfsprogs: use <>-style includes in installed headers)
Date: Sat, 1 Aug 2015 08:44:50 +1000	[thread overview]
Message-ID: <20150731224450.GQ16638@dastard> (raw)
In-Reply-To: <20150731080957.GA22546@lst.de>

On Fri, Jul 31, 2015 at 10:09:57AM +0200, Christoph Hellwig wrote:
> On Fri, Jul 31, 2015 at 12:55:06PM +1000, Dave Chinner wrote:
> > I made a small change to pull the creation of include/xfs out of
> > include/Makefile and up into include/buildrules where it is done
> > before running the install-headers rule on each header subdir,
> > and that fixes it. i.e:
> 
> Thanks, this looks sensible to me.
> 
> > Now I've just got to work out which patch is breaking 'make deb'....
> 
> "packaging: rework dh_autoreconf invocation for deb builds" is the
> culprit..

That goes away on a make distclean. What was wrong is that
debian/buildrules manually builds programs for the installer packge
(the udebs, IIUC) and so it runs the headers-install rules manually
rather than through the top level make file. It needed to have a
mkdir -p install/xfs added to it....

I've isolated all this to a patch that applies in front of you
series, as it appears the problems aren't directly related to any of
the changes you made - they just expose the problem. Patch below.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com


build: create include/xfs before installing headers

From: Dave Chinner <dchinner@redhat.com>

Currently the install-headers rule from include/Makefile creates
include/xfs, but there is no guarantee that it will be the first
directory that make executes that rule in. Hence other directories
can race with the creation on include/xfs and fail.

Move the creation of include/xfs to occur before running the
install_headers rules on the subdirectories to avoid any possible
races with creation.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 debian/rules       | 1 +
 include/Makefile   | 5 +----
 include/buildrules | 8 +++++++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/debian/rules b/debian/rules
index 27b043f..5526bbf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -44,6 +44,7 @@ dibuild:
 	@echo "== dpkg-buildpackage: installer" 1>&2
 	if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
 		$(diopts) $(MAKE) include/platform_defs.h; \
+		mkdir -p include/xfs; \
 		for dir in include libxfs; do \
 			$(MAKE) -C $$dir NODEP=1 install-headers; \
 		done; \
diff --git a/include/Makefile b/include/Makefile
index 91b33b0..01c886d 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -65,12 +65,9 @@ include $(BUILDRULES)
 # set up include/xfs header directory
 install-headers: $(addsuffix -hdrs, $(HFILES) $(QAHFILES) $(PHFILES) $(DKHFILES) $(LIBHFILES))
 
-%-hdrs: xfs
+%-hdrs:
 	$(Q)$(LN_S) -f $(PWD)/include/$* xfs/$*
 
-xfs:
-	@mkdir -p xfs
-
 install: default
 	$(INSTALL) -m 755 -d $(PKG_INC_DIR)
 
diff --git a/include/buildrules b/include/buildrules
index 0e13f9d..5010895 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -14,10 +14,16 @@ clean clobber : $(addsuffix -clean,$(SUBDIRS))
 	$(Q)$(MAKE) $(MAKEOPTS) -C $* clean
 
 ifdef HDR_SUBDIRS
+.PHONY: .xfs
+
 headers: $(addsuffix -headers, $(HDR_SUBDIRS))
-%-headers:
+
+%-headers: .xfs
 	@echo "   [HEADERS] $*"
 	$(Q)$(MAKE) $(MAKEOPTS) -C $* NODEP=1 install-headers
+
+.xfs:
+	@mkdir -p include/xfs
 endif
 
 # Never blow away subdirs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-07-31 22:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-26 16:13 xfsprogs: fix and clean up installed headers V2 Christoph Hellwig
2015-07-26 16:13 ` [PATCH 01/10] xfsprogs: don't install internal header files Christoph Hellwig
2015-07-26 16:13 ` [PATCH 02/10] xfsprogs: remove unused macros from xfs_arch.h Christoph Hellwig
2015-07-26 16:13 ` [PATCH 03/10] xfsprogs: remove swab.h Christoph Hellwig
2015-07-26 16:13 ` [PATCH 04/10] xfsprogs: only install *format.h headers in install-qa Christoph Hellwig
2015-07-26 16:13 ` [PATCH 05/10] xfsprogs: remove install-qa target Christoph Hellwig
2015-07-26 16:13 ` [PATCH 06/10] xfsprogs: use <>-style includes in installed headers Christoph Hellwig
2015-07-31  2:55   ` Dave Chinner
2015-07-31  8:09     ` Christoph Hellwig
2015-07-31 22:44       ` Dave Chinner [this message]
2015-07-26 16:13 ` [PATCH 07/10] xfsprogs: simplify internal includes Christoph Hellwig
2015-07-26 16:13 ` [PATCH 08/10] xfsprogs: move __be*/__le* types and __arch_pack to xfs_arch.h Christoph Hellwig
2015-07-26 16:13 ` [PATCH 09/10] xfsprogs: move __u*/__s* typedefs to per-port headers Christoph Hellwig
2015-07-26 16:13 ` [PATCH 10/10] xfsprogs: don't install platform_defs.h Christoph Hellwig

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=20150731224450.GQ16638@dastard \
    --to=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=nathans@debian.org \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox