From: Eric Sandeen <sandeen@sandeen.net>
To: Alex Elder <aelder@sgi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH, v2 1/2] xfstests: a few fixes to Makefile
Date: Wed, 09 Mar 2011 13:22:25 -0600 [thread overview]
Message-ID: <4D77D371.6070802@sandeen.net> (raw)
In-Reply-To: <201103091837.p29Ib3nc012048@stout.americas.sgi.com>
On 3/9/11 12:37 PM, Alex Elder wrote:
> Change the top-level Makefile, to make it clearer just what makes
> what, and what depends on what:
> - Separate the rules for "configure" and "include/builddefs" into
> two parts, each of which generate one of the files
> - Get rid of the rule for include/config.h, and group it with the
> one for include/builddefs (the same command creates both files)
>
> Having done this, we find that having both "include/builddefs" and
> "include/config.h" as dependencies for the default target results in
> a parallel invocation of "make" spawning two concurrent attempts to
> do the configure step--and that doesn't work.
>
> Creating one of those two will result in the other getting created,
> so just list one of them as a dependency for the default rule.
>
> A couple of other small fixes:
> - Get rid of the "new", "remake" and "check" dependencies for the
> default rule, which serve no purpose
> - Use the $(Q) convention in a few missed spots
> - Stop a DMAPI-only comment from getting echoed on default build
>
> This updated version folds in the content of a patch previously
> posted separately to fix the problem with parallel builds.
>
> Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
> ---
> Makefile | 23 ++++++++++-------------
> 1 file changed, 10 insertions(+), 13 deletions(-)
>
> Index: b/Makefile
> ===================================================================
> --- a/Makefile
> +++ b/Makefile
> @@ -39,14 +39,14 @@ TOOL_SUBDIRS = ltp src m4
>
> SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
>
> -default: include/builddefs include/config.h $(DMAPI_MAKEFILE) new remake check $(TESTS)
> +default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS)
> ifeq ($(HAVE_BUILDDEFS), no)
> $(Q)$(MAKE) $(MAKEOPTS) $@
> else
> $(Q)$(MAKE) $(MAKEOPTS) $(SUBDIRS)
> +ifeq ($(HAVE_DMAPI), true)
> # automake doesn't always support "default" target
> # so do dmapi make explicitly with "all"
> -ifeq ($(HAVE_DMAPI), true)
> $(Q)$(MAKE) $(MAKEOPTS) -C $(TOPDIR)/dmapi all
> endif
> endif
> @@ -60,22 +60,19 @@ else
> clean: # if configure hasn't run, nothing to clean
> endif
>
> -configure include/builddefs:
> +configure: configure.in
> autoheader
> autoconf
> +
> +include/builddefs include/config.h: configure
> ./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
> -
> +ifeq ($(HAVE_DMAPI), true)
> $(DMAPI_MAKEFILE):
> - cd $(TOPDIR)/dmapi/ ; ./configure
> + $(Q)cd $(TOPDIR)/dmapi && ./configure
> +endif
>
> aclocal.m4::
> aclocal --acdir=`pwd`/m4 --output=$@
> @@ -97,5 +94,5 @@ install-dev install-lib:
> $(MAKE) $(MAKEOPTS) -C $* install
>
> realclean distclean: clean
> - rm -f $(LDIRT) $(CONFIGURE)
> - rm -rf autom4te.cache Logs
> + $(Q)rm -f $(LDIRT) $(CONFIGURE)
> + $(Q)rm -rf autom4te.cache Logs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
parent reply other threads:[~2011-03-09 19:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <201103091837.p29Ib3nc012048@stout.americas.sgi.com>]
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=4D77D371.6070802@sandeen.net \
--to=sandeen@sandeen.net \
--cc=aelder@sgi.com \
--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 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.