Files
gcc-os2/symlink-tree
Dmitriy Kuminov a561531e94 Apply OS/2-EMX specific files and patches.
Note: This is a cumulative patch containing the work of several people
which is impossible to separate now.

This patch contains a number of '#ifdef 0'-like hacks that need to be
reviewed and fixed properly as they are unlikely to be accepted upstream
in the current form. Also, some patches may be not relevant any more.
(cherry picked from commit 25ebd257ce836444e0914e35a7baf3fdff67e3b9)

Conflicts:

        Makefile.in
        gcc/Makefile.in
        gcc/config.build
        gcc/config.gcc
        gcc/config.host
        gcc/config/i386/i386-protos.h
        gcc/config/i386/i386.c
        gcc/config/i386/i386.h
        gcc/config/i386/i386.md
        gcc/cp/class.c
        gcc/cp/decl.c
        gcc/cp/error.c
        gcc/cp/g++spec.c
        gcc/cp/mangle.c
        gcc/cppdefault.c
        gcc/fix-header.c
        gcc/gcc.c
        gcc/gengtype.c
        gcc/gthr.h
        gcc/langhooks.c
        gcc/libgcc2.c
        gcc/target-def.h
        include/filenames.h
        libgcc/config.host
        libiberty/configure
        libiberty/configure.ac
        libstdc++-v3/include/bits/stringfwd.h
        libstdc++-v3/libsupc++/typeinfo
(cherry picked from commit 02bd882d6c317ed56da4a4d4d8af54e2687d3001)

Conflicts:

        fixincludes/fixlib.h
        gcc/Makefile.in
        gcc/config/i386/i386.c
        gcc/config/i386/i386.h
        gcc/cp/dump.c
        gcc/cp/error.c
        gcc/cp/g++spec.c
        gcc/ggc-zone.c
        libstdc++-v3/include/bits/stringfwd.h
        libstdc++-v3/include/parallel/compatibility.h
        libstdc++-v3/libsupc++/typeinfo
(cherry picked from commit b183829f9258cb3bb22117c32d610a18b1ba5359
and f0f959360a8b8fe0cb4276c695e60fdfff41f81f)

Conflicts:
	gcc/config.gcc
	gcc/config.host
	gcc/config/i386/i386-protos.h
	gcc/config/i386/i386.c
	gcc/config/i386/i386.h
	gcc/cp/dump.c
	gcc/cp/except.c
	gcc/dbxout.c
	gcc/gcc.c
	gcc/langhooks.c
	gcc/toplev.c
2019-11-26 23:45:45 +03:00

80 lines
2.2 KiB
Bash
Executable File

#!/bin/sh
# Create a symlink tree.
#
# Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# Please report bugs to <gcc-bugs@gnu.org>
# and send patches to <gcc-patches@gnu.org>.
# Syntax: symlink-tree srcdir "ignore1 ignore2 ..."
#
# where srcdir is the directory to create a symlink tree to,
# and "ignoreN" is a list of files/directories to ignore.
prog=$0
srcdir=$1
ignore="$2"
if test $# -lt 1; then
echo "symlink-tree error: Usage: symlink-tree srcdir \"ignore1 ignore2 ...\""
exit 1
fi
ignore_additional=". .. CVS"
# If we were invoked with a relative path name, adjust ${prog} to work
# in subdirs.
case ${prog} in
/* | [A-Za-z]:[\\/]*) ;;
*) prog=../${prog} ;;
esac
# Set newsrcdir to something subdirectories can use.
case ${srcdir} in
/* | [A-Za-z]:[\\/]*) newsrcdir=${srcdir} ;;
*) newsrcdir=../${srcdir} ;;
esac
for f in `ls -a ${srcdir}`; do
if [ -d ${srcdir}/$f ]; then
found=
for i in ${ignore} ${ignore_additional}; do
if [ "$f" = "$i" ]; then
found=yes
fi
done
if [ -z "${found}" ]; then
echo "$f ..working in"
if [ -d $f ]; then true; else mkdir $f; fi
(cd $f; ${prog} ${newsrcdir}/$f "${ignore}")
fi
else
echo "$f ..linked"
rm -f $f
# ln -s ${srcdir}/$f .
cp -p ${srcdir}/$f .
fi
done
exit 0