From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Subject: [PATCH] xfs-cmds: fix parallel installs in include/ dirs
Date: Mon, 29 Dec 2008 16:19:05 -0600 [thread overview]
Message-ID: <49594CD9.3010402@sandeen.net> (raw)
This is for http://oss.sgi.com/bugzilla/show_bug.cgi?id=759
"fix parallel issue with include/ symlinks"
Doing something like "make -j2 install install-dev" would lead
to a race of removing & creating symlinks in include/
Thanks to Mike for reporting & suggesting the fix.
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
Index: xfs-cmds/acl/include/Makefile
===================================================================
--- xfs-cmds.orig/acl/include/Makefile
+++ xfs-cmds/acl/include/Makefile
@@ -9,10 +9,10 @@ HFILES = acl.h libacl.h acl_ea.h misc.h
LSRCFILES = builddefs.in buildmacros buildrules config.h.in
LDIRT = sys acl
-default:
- rm -f sys acl
- $(LN_S) . sys
- $(LN_S) . acl
+sys acl:
+ $(LN_S) . $@
+
+default: sys acl
include $(BUILDRULES)
@@ -22,4 +22,5 @@ install-dev: default
$(INSTALL) -m 644 acl.h $(PKG_INC_DIR)/sys/acl.h
$(INSTALL) -m 755 -d $(PKG_INC_DIR)/acl
$(INSTALL) -m 644 libacl.h $(PKG_INC_DIR)/acl/libacl.h
+
install install-lib:
Index: xfs-cmds/attr/include/Makefile
===================================================================
--- xfs-cmds.orig/attr/include/Makefile
+++ xfs-cmds/attr/include/Makefile
@@ -11,13 +11,15 @@ HFILES = $(INST_HFILES) misc.h walk_tree
LSRCFILES = builddefs.in buildmacros buildrules config.h.in
LDIRT = $(INCDIR)
-default:
- rm -f $(INCDIR)
- $(LN_S) . $(INCDIR)
+$(INCDIR):
+ $(LN_S) . $@
+
+default: $(INCDIR)
include $(BUILDRULES)
install-dev: default
$(INSTALL) -m 755 -d $(PKG_INC_DIR)
$(INSTALL) -m 644 $(INST_HFILES) $(PKG_INC_DIR)
+
install install-lib:
Index: xfs-cmds/dmapi/include/Makefile
===================================================================
--- xfs-cmds.orig/dmapi/include/Makefile
+++ xfs-cmds/dmapi/include/Makefile
@@ -9,9 +9,10 @@ HFILES = dmapi.h
LSRCFILES = builddefs.in buildmacros buildrules dmapi_kern.h
LDIRT = xfs
-default install :
- rm -f xfs
- $(LN_S) . xfs
+xfs:
+ $(LN_S) . $@
+
+default install: xfs
include $(BUILDRULES)
Index: xfs-cmds/nfs4acl/include/Makefile
===================================================================
--- xfs-cmds.orig/nfs4acl/include/Makefile
+++ xfs-cmds/nfs4acl/include/Makefile
@@ -9,9 +9,10 @@ HFILES = nfs4acl.h nfs4acl-internal.h nf
LSRCFILES = builddefs.in buildmacros buildrules config.h.in
LDIRT = sys
-default:
- rm -f sys
- $(LN_S) . sys
+sys:
+ $(LN_S) . $@
+
+default: sys
include $(BUILDRULES)
@@ -19,4 +20,5 @@ install-dev: default
$(INSTALL) -m 755 -d $(PKG_INC_DIR)
$(INSTALL) -m 755 -d $(PKG_INC_DIR)/sys
$(INSTALL) -m 644 nfs4acl.h $(PKG_INC_DIR)/sys/nfs4acl.h
+
install install-lib:
Index: xfs-cmds/xfsprogs/include/Makefile
===================================================================
--- xfs-cmds.orig/xfsprogs/include/Makefile
+++ xfs-cmds/xfsprogs/include/Makefile
@@ -40,10 +40,10 @@ LSRCFILES += platform_defs.h.in builddef
LSRCFILES += command.h input.h path.h project.h
LDIRT = xfs disk
-default install :
- rm -f xfs disk
- $(LN_S) . xfs
- $(LN_S) . disk
+xfs disk:
+ $(LN_S) . $@
+
+default install: xfs disk
include $(BUILDRULES)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2008-12-29 22:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-29 22:19 Eric Sandeen [this message]
2008-12-30 11:52 ` [PATCH] xfs-cmds: fix parallel installs in include/ dirs Christoph Hellwig
2008-12-30 12:49 ` Christoph Hellwig
2008-12-30 14:07 ` Mike Frysinger
2008-12-30 17:18 ` Christoph Hellwig
2008-12-30 20:19 ` Mike Frysinger
2008-12-30 20:23 ` Eric Sandeen
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=49594CD9.3010402@sandeen.net \
--to=sandeen@sandeen.net \
--cc=vapier@gentoo.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