From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Lo=EFc?= Minier Date: Mon, 3 Jan 2011 16:11:32 +0100 Subject: [U-Boot] [PATCH] Don't add symlink in srctree when using an objtree In-Reply-To: <20101218160711.GA4008@bee.dooz.org> References: <1291510334-650-1-git-send-email-loic.minier@linaro.org> <20101217195131.321CC15192A@gemini.denx.de> <20101218160711.GA4008@bee.dooz.org> Message-ID: <20110103151132.GA23810@bee.dooz.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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