VirtualBox

source: kBuild/vendor/gnumake/3.82/tests/mkshadow

Last change on this file was 2579, checked in by bird, 12 years ago

Importing make-3.82.tar.bz2 (md5sum 1a11100f3c63fcf5753818e59d63088f) with --auto-props but no keywords.

File size: 1.5 KB
Line 
1#!/bin/sh
2#
3# Simple script to make a "shadow" test directory, using symbolic links.
4# Typically you'd put the shadow in /tmp or another local disk
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8# Foundation, Inc.
9# This file is part of GNU Make.
10#
11# GNU Make is free software; you can redistribute it and/or modify it under
12# the terms of the GNU General Public License as published by the Free Software
13# Foundation; either version 3 of the License, or (at your option) any later
14# version.
15#
16# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
17# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19# details.
20#
21# You should have received a copy of the GNU General Public License along with
22# this program. If not, see <http://www.gnu.org/licenses/>.
23
24case "$1" in
25 "") echo 'Usage: mkshadow <destdir>'; exit 1 ;;
26esac
27
28dest="$1"
29
30if [ ! -d "$dest" ]; then
31 echo "Destination directory \`$dest' must exist!"
32 exit 1
33fi
34
35if [ ! -f run_make_tests ]; then
36 echo "The current directory doesn't appear to contain the test suite!"
37 exit 1
38fi
39
40suite=`pwd | sed 's%^/tmp_mnt%%'`
41name=`basename "$suite"`
42
43files=`echo *`
44
45set -e
46
47mkdir "$dest/$name"
48cd "$dest/$name"
49
50ln -s "$suite" .testdir
51
52for f in $files; do
53 ln -s .testdir/$f .
54done
55
56rm -rf work
57
58echo "Shadow test suite created in \`$dest/$name'."
59exit 0
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette