public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Loïc Minier" <lool@dooz.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Don't add symlink in srctree when using an objtree
Date: Mon, 3 Jan 2011 16:11:32 +0100	[thread overview]
Message-ID: <20110103151132.GA23810@bee.dooz.org> (raw)
In-Reply-To: <20101218160711.GA4008@bee.dooz.org>

On Sat, Dec 18, 2010, Lo?c Minier wrote:
> > Don't make it that complicated. Just change the line into
> > 	@rm -fr$(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
>  I think I had this in my first version, but had an issue with it; I
>  will retest

 This works just fine and is much simpler; thanks.  I will send an
 updated patch to use this

> > Also a question: how has this change been tested?

 I'm attaching a test script which, starting from a clean tree, will try
 to distclean, to configure + distclean, and finally to configure +
 build + distclean.  It tries both with and without an objdir in all
 make calls, and checks whether the tree is really clean with:
    git clean -d -x -n.

 This script uncovered another issue with .boards.depend which was not
 cleaned up by distclean O=foo because it's created in the srctree.

 I will send a separate patch for this issue as well.

-- 
Lo?c Minier
-------------- next part --------------
#!/bin/sh

set -e

self="$(basename "$0")"

do_make() {
    make CROSS_COMPILE=arm-linux-gnueabi- "$@"
}

distclean() {
    do_make distclean "$@"
}

config() {
    do_make omap3_beagle_config "$@"
}

build() {
    do_make -j2 "$@"
}

check_clean() {
    clean_output="$(git clean -x -d -n "$@" 2>&1)"
    if [ -n "$clean_output" ]; then
        echo "Expected a clean tree but got: $clean_output" >&2
        exit 1
    fi
}

objdir=""
cleanup() {
    if [ -n "$objdir" ]; then
        rm -rf "$objdir"
    fi
}
trap "cleanup" 0 1 2 3 9 11 13 15

objdir="$(mktemp -dt)"

# this will stop the test if the tree isn't clean to start with
check_clean

for with_objdir in yes no; do
    echo "I: objdir: $with_objdir" >&2
    for seq in "distclean" "config distclean" "config build distclean"; do
        echo "I: sequence: $seq" >&2
        for step in $seq; do
            echo "I: step: $step" >&2
            if [ "$with_objdir" = yes ]; then
                $step "O=$objdir" >/dev/null 2>&1
            else
                $step >/dev/null 2>&1
            fi
        done
        check_clean
    done
done

      reply	other threads:[~2011-01-03 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-05  0:52 [U-Boot] [PATCH] Don't add symlink in srctree when using an objtree Loïc Minier
2010-12-17 19:51 ` Wolfgang Denk
     [not found] ` <20101217195131.321CC15192A@gemini.denx.de>
2010-12-18 16:07   ` Loïc Minier
2011-01-03 15:11     ` Loïc Minier [this message]

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=20110103151132.GA23810@bee.dooz.org \
    --to=lool@dooz.org \
    --cc=u-boot@lists.denx.de \
    /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