xfs-cmds parallel build patches
cover xfs-cmds parallel build patches
On a 4-way xeon, the build time for attr+acl+dmapi+xfsprogs+xfsdump (not configure or package or whatnot time) goes from 2m12s to 42s for me; the more processors the better ;)
Merge this, guys, and you'll spend less time waiting for builds & more time merging other patches ;)
Thanks,
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 1/7 attr parallel build
Allow parallel builds of the attr package
---
attr/Makefile +32 -9
@@ -16,23 +16,30 @@ LSRCFILES = configure configure.in acloc LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ Logs/* built .census install.* install-dev.* install-lib.* *.gz -SUBDIRS = include libmisc libattr attr getfattr setfattr \ - examples test m4 man doc po debian build +LIB_SUBDIRS = include libmisc libattr +TOOL_SUBDIRS = attr getfattr setfattr examples test m4 man doc po debian build -default: $(CONFIGURE) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs include/config.h ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) -C . $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) endif +# tool/lib dependencies +libattr: include +getfattr setfattr: libmisc libattr +attr: libattr + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs: autoconf ./configure \ --prefix=/ \
@@ -48,16 +55,32 @@ $(CONFIGURE): $$LOCAL_CONFIGURE_OPTIONS touch .census +include/config.h: include/builddefs +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f include/builddefs; \ + $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ + fi + aclocal.m4:: aclocal --acdir=`pwd`/m4 --output=$@ -install: default - $(SUBDIRS_MAKERULE) +install: default $(addsuffix -install,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 README $(PKG_DOC_DIR) -install-dev install-lib: default - $(SUBDIRS_MAKERULE) +install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) + +install-lib: install $(addsuffix -install-lib,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev + +%-install-lib: + $(MAKE) -C $* install-lib realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE)
attr/include/buildrules +11 -5
@@ -6,16 +6,20 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) + +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -68,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
attr/man/Makefile +16 -2
@@ -7,7 +7,21 @@ include $(TOPDIR)/include/builddefs SUBDIRS = man1 man2 man3 man5 -default install install-dev install-lib: $(SUBDIRS) - $(SUBDIRS_MAKERULE) +default : $(SUBDIRS) + +install : $(addsuffix -install,$(SUBDIRS)) + +install-dev : $(addsuffix -install-dev,$(SUBDIRS)) + +install-lib : $(addsuffix -install-lib,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev + +%-install-lib: + $(MAKE) -C $* install-lib include $(BUILDRULES)
attr/include/buildmacros +0 -8
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 2/7 acl parallel build
In reply to Eric SandeenAllow parallel builds of the acl package
---
acl/Makefile +30 -11
@@ -16,23 +16,29 @@ LSRCFILES = configure configure.in acloc LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ Logs/* built .census install.* install-dev.* install-lib.* *.gz -SUBDIRS = include libmisc libacl getfacl setfacl chacl m4 man doc po \ - test examples build debian +LIB_SUBDIRS = include libmisc libacl +TOOL_SUBDIRS = getfacl setfacl chacl m4 man doc po test examples build debian -default: $(CONFIGURE) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs include/config.h ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) -C . $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) endif +# tool/lib dependencies +libacl: libmisc +getfacl setfacl chacl: libacl + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs: autoconf ./configure \ --prefix=/ \
@@ -48,19 +54,32 @@ $(CONFIGURE): $$LOCAL_CONFIGURE_OPTIONS touch .census +include/config.h: include/builddefs +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f include/builddefs; \ + $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ + fi + aclocal.m4:: aclocal --acdir=`pwd`/m4 --output=$@ -install: default - $(SUBDIRS_MAKERULE) +install: default $(addsuffix -install,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 README $(PKG_DOC_DIR) -install-dev: default - $(SUBDIRS_MAKERULE) +install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) + +install-lib: default $(addsuffix -install-lib,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-lib: + $(MAKE) -C $* install-lib -install-lib: default - $(SUBDIRS_MAKERULE) +%-install-dev: + $(MAKE) -C $* install-dev realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE)
acl/include/buildrules +11 -5
@@ -6,16 +6,20 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) + +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -68,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
acl/man/Makefile +11 -2
@@ -7,7 +7,16 @@ include $(TOPDIR)/include/builddefs SUBDIRS = man1 man3 man5 -default install install-dev install-lib: $(SUBDIRS) - $(SUBDIRS_MAKERULE) +default : $(SUBDIRS) + +install : $(addsuffix -install,$(SUBDIRS)) + +install-dev : $(addsuffix -install-dev,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev include $(BUILDRULES)
acl/include/buildmacros +0 -8
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 4/7 dmapi parallel build
In reply to Eric SandeenAllow parallel builds of the dmapi package
---
dmapi/Makefile +18 -8
@@ -15,22 +15,28 @@ LSRCFILES = configure configure.in acloc LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ Logs/* built .census install.* install-dev.* *.gz -SUBDIRS = include libdm m4 man doc debian build +LIB_SUBDIRS = include libdm +TOOL_SUBDIRS = m4 man doc debian build -default: $(CONFIGURE) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) -C . $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) endif +# tool/lib dependencies +# There don't appear to be any dependencies between subdirs + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs: autoconf ./configure \ --prefix=/ \
@@ -49,15 +55,19 @@ $(CONFIGURE): aclocal.m4:: aclocal --acdir=`pwd`/m4 --output=$@ -install: default - $(SUBDIRS_MAKERULE) +install: default $(addsuffix -install,$(SUBDIRS)) ifneq ($(PKG_DISTRIBUTION), debian) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 README $(PKG_DOC_DIR) endif -install-dev: default - $(SUBDIRS_MAKERULE) +install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE)
dmapi/include/buildmacros +0 -8
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
dmapi/include/buildrules +11 -5
@@ -6,16 +6,20 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) + +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -68,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
dmapi/man/Makefile +11 -2
@@ -7,7 +7,16 @@ include $(TOPDIR)/include/builddefs SUBDIRS = man3 -default install install-dev : $(SUBDIRS) - $(SUBDIRS_MAKERULE) +default : $(SUBDIRS) + +install : $(addsuffix -install,$(SUBDIRS)) + +install-dev : $(addsuffix -install-dev,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev include $(BUILDRULES)
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 5/7 xfsdump parallel build
In reply to Eric SandeenAllow parallel builds of the xfsdump package
I got tired of waiting for xfsdump to build
serially...
On a 16p altix, make -j16 (excluding the configure phase) went from 55s to 8s.
---
xfsdump/Makefile +25 -9
@@ -15,24 +15,29 @@ LSRCFILES = configure configure.in acloc LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ Logs/* built .census install.* install-dev.* *.gz -SUBDIRS = include librmt \ - common fsr inventory invutil dump restore \ +LIB_SUBDIRS = include librmt +TOOL_SUBDIRS = common fsr inventory invutil dump restore \ m4 man doc po debian build -default: $(CONFIGURE) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs include/config.h ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) -C . $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) endif +# tool/lib dependencies +fsr invutil dump restore: librmt + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs: autoconf ./configure \ --prefix=/ \
@@ -48,16 +53,27 @@ $(CONFIGURE): $$LOCAL_CONFIGURE_OPTIONS touch .census +include/config.h: include/builddefs +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f include/builddefs; \ + $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ + fi + aclocal.m4:: aclocal --acdir=`pwd`/m4 --output=$@ -install: default - $(SUBDIRS_MAKERULE) +install: default $(addsuffix -install,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 README $(PKG_DOC_DIR) -install-dev: default - $(SUBDIRS_MAKERULE) +install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE)
xfsdump/include/buildmacros +0 -8
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
xfsdump/include/buildrules +11 -5
@@ -6,16 +6,20 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) + +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -68,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
xfsdump/man/Makefile +11 -2
@@ -7,7 +7,16 @@ include $(TOPDIR)/include/builddefs SUBDIRS = man8 -default install install-dev : $(SUBDIRS) - $(SUBDIRS_MAKERULE) +default : $(SUBDIRS) + +install : $(addsuffix -install,$(SUBDIRS)) + +install-dev : $(addsuffix -install-dev,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev include $(BUILDRULES)
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 6/7 nfs4acl parallel build
In reply to Eric SandeenAllow parallel builds of the nfs4acl package
---
nfs4acl/include/buildmacros +0 -8
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
nfs4acl/include/buildrules +11 -5
@@ -6,16 +6,20 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) + +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -68,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
nfs4acl/Makefile +29 -11
@@ -18,23 +18,28 @@ LDIRT = config.log .dep config.status co #SUBDIRS = include libnfs4acl nfs4acl m4 man doc po \ # test examples build debian -SUBDIRS = include libnfs4acl nfs4acl m4 doc \ - test build +LIB_SUBDIRS = include libnfs4acl +TOOL_SUBDIRS = nfs4acl m4 doc test build -default: $(CONFIGURE) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs include/config.h ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) -C . $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) endif +# tool/lib dependencies +nfs4acl: libnfs4acl + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs: autoconf ./configure \ --prefix=/ \
@@ -49,20 +54,33 @@ $(CONFIGURE): --datadir=/usr/share \ $$LOCAL_CONFIGURE_OPTIONS touch .census + +include/config.h: include/builddefs +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f include/builddefs; \ + $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ + fi aclocal.m4:: aclocal --acdir=`pwd`/m4 --output=$@ -install: default - $(SUBDIRS_MAKERULE) +install: default $(addsuffix -install,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 README $(PKG_DOC_DIR) -install-dev: default - $(SUBDIRS_MAKERULE) +install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) + +install-lib: default $(addsuffix -install-lib,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev -install-lib: default - $(SUBDIRS_MAKERULE) +%-install-lib: + $(MAKE) -C $* install-lib realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE)
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 7/7 xfstests parallel build
In reply to Eric SandeenAllow parallel builds of the xfstests package
---
xfstests/Makefile +18 -5
@@ -16,31 +16,44 @@ LSRCFILES = configure configure.in acloc LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ check.log check.time -SUBDIRS = include lib ltp src m4 +LIB_SUBDIRS = include lib +TOOL_SUBDIRS = ltp src m4 -default: $(CONFIGURE) $(DMAPI_MAKEFILE) new remake check $(TESTS) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs include/config.h $(DMAPI_MAKEFILE) new remake check $(TESTS) ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) # automake doesn't always support "default" target # so do dmapi make explicitly with "all" - cd $(TOPDIR)/dmapi; make all + $(MAKE) -C $(TOPDIR)/dmapi all endif +# tool/lib dependencies +src ltp: lib + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs.h: autoheader autoconf ./configure \ --libexecdir=/usr/lib \ --enable-lib64=yes +include/config.h: include/builddefs +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f include/builddefs; \ + $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ + fi + $(DMAPI_MAKEFILE): cd $(TOPDIR)/dmapi/ ; ./configure
xfstests/include/buildmacros +0 -8
@@ -122,14 +122,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
xfstests/include/buildrules +11 -5
@@ -6,16 +6,20 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) + +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -68,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 7/7] xfstests parallel build
Quoted 11 lines · Barry Naujok
Quoted 2 lines · Eric Sandeen
Allow parallel builds of the xfstests package
Eric, this patch doesn't apply anymore with the DMAPI patch you posted earlier.
Try this on for size (quick merge, not tested...)
xfstests/Makefile +18 -5
@@ -16,33 +16,46 @@ LSRCFILES = configure configure.in acloc LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ check.log check.time -SUBDIRS = include lib ltp src m4 +LIB_SUBDIRS = include lib +TOOL_SUBDIRS = ltp src m4 -default: $(CONFIGURE) $(DMAPI_MAKEFILE) new remake check $(TESTS) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs include/config.h $(DMAPI_MAKEFILE) new remake check $(TESTS) ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) # automake doesn't always support "default" target # so do dmapi make explicitly with "all" ifeq ($(HAVE_DMAPI), true) - cd $(TOPDIR)/dmapi; make all + $(MAKE) -C $(TOPDIR)/dmapi all endif endif +# tool/lib dependencies +src ltp: lib + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs.h: autoheader autoconf ./configure \ --libexecdir=/usr/lib \ --enable-lib64=yes +include/config.h: include/builddefs +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f include/builddefs; \ + $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ + fi + $(DMAPI_MAKEFILE): cd $(TOPDIR)/dmapi/ ; ./configure
xfstests/include/buildmacros +0 -8
@@ -122,14 +122,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
xfstests/include/buildrules +11 -5
@@ -6,16 +6,20 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) + +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -68,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH 3/7] xfsprogs parallel build
In reply to Eric SandeenAllow parallel builds of the xfsprogs package
I got tired of waiting for xfsprogs to build serially...
On a 16p altix, make -j16 (excluding the configure phase) went from 2m16s to 15s.
I tossed this into an rpm and did a fedora scratch build on all arches, they all passed - some of them, at least, should have been doing parallel builds too.
So this has had reasonable testing.
---
xfsprogs/Makefile +37 -12
@@ -15,24 +15,36 @@ LSRCFILES = configure configure.in Makep LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \ Logs/* built .census install.* install-dev.* *.gz -SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk \ - copy db estimate fsck growfs io logprint mkfs quota mdrestore repair rtcp \ - m4 man doc po debian build +LIB_SUBDIRS = include libxfs libxlog libxcmd libhandle libdisk +TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \ + mdrestore repair rtcp m4 man doc po debian build -default: $(CONFIGURE) +SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS) + +default: include/builddefs include/platform_defs.h ifeq ($(HAVE_BUILDDEFS), no) $(MAKE) -C . $@ else - $(SUBDIRS_MAKERULE) + $(MAKE) $(SUBDIRS) endif +# tool/lib dependencies +libxcmd: include +copy mdrestore: libxfs +db logprint: libxfs libxlog +growfs: libxfs libxcmd +io: libxcmd libhandle +mkfs: libxfs libdisk +quota: libxcmd +repair: libxfs libxlog + ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES) else clean: # if configure hasn't run, nothing to clean endif -$(CONFIGURE): +include/builddefs: autoconf ./configure \ --prefix=/ \
@@ -48,19 +60,32 @@ $(CONFIGURE): $$LOCAL_CONFIGURE_OPTIONS touch .census +include/platform_defs.h: include/builddefs +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f include/builddefs; \ + $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \ + fi + aclocal.m4:: aclocal --acdir=`pwd`/m4 --output=$@ -install: default - $(SUBDIRS_MAKERULE) +install: default $(addsuffix -install,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 README $(PKG_DOC_DIR) -install-dev: default - $(SUBDIRS_MAKERULE) +install-dev: default $(addsuffix -install-dev,$(SUBDIRS)) + +install-qa: install $(addsuffix -install-qa,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev -install-qa: install - $(SUBDIRS_MAKERULE) +%-install-qa: + $(MAKE) -C $* install-qa realclean distclean: clean rm -f $(LDIRT) $(CONFIGURE)
xfsprogs/include/buildrules +10 -5
@@ -6,16 +6,19 @@ _BUILDRULES_INCLUDED_ = 1 include $(TOPDIR)/include/builddefs -clean clobber : $(SUBDIRS) +clean clobber : $(addsuffix -clean,$(SUBDIRS)) rm -f $(DIRT) @rm -fr .libs - $(SUBDIRS_MAKERULE) +%-clean: + $(MAKE) -C $* clean # Never blow away subdirs ifdef SUBDIRS .PRECIOUS: $(SUBDIRS) +.PHONY: $(SUBDIRS) + $(SUBDIRS): - $(SUBDIRS_MAKERULE) + $(MAKE) -C $@ endif #
@@ -69,11 +72,13 @@ ifdef LTLIBRARY DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' endif -depend : $(CFILES) $(HFILES) - $(SUBDIRS_MAKERULE) +depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS)) $(DEPENDSCRIPT) > .dep test -s .dep || rm -f .dep +%-depend: + $(MAKE) -C $* depend + # Include dep, but only if it exists ifeq ($(shell test -f .dep && echo .dep), .dep) include .dep
xfsprogs/include/buildmacros +0 -8
@@ -123,14 +123,6 @@ INSTALL_LINGUAS = \ done endif -SUBDIRS_MAKERULE = \ - @for d in $(SUBDIRS) ""; do \ - if test -d "$$d" -a ! -z "$$d"; then \ - $(ECHO) === $$d ===; \ - $(MAKEF) -C $$d $@ || exit $$?; \ - fi; \ - done - MAN_MAKERULE = \ @for f in *.[12345678] ""; do \ if test ! -z "$$f"; then \
xfsprogs/man/Makefile +11 -2
@@ -7,7 +7,16 @@ include $(TOPDIR)/include/builddefs SUBDIRS = man3 man5 man8 -default install install-dev : $(SUBDIRS) - $(SUBDIRS_MAKERULE) +default : $(SUBDIRS) + +install : $(addsuffix -install,$(SUBDIRS)) + +install-dev : $(addsuffix -install-dev,$(SUBDIRS)) + +%-install: + $(MAKE) -C $* install + +%-install-dev: + $(MAKE) -C $* install-dev include $(BUILDRULES)
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs