xref: /minix3/external/gpl3/gcc/gcc2netbsd (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
184d9c625SLionel Sambuc#! /bin/sh
284d9c625SLionel Sambuc#
3*0a6a1f1dSLionel Sambuc#	$NetBSD: gcc2netbsd,v 1.5 2014/02/23 05:46:28 mrg Exp $
484d9c625SLionel Sambuc#
584d9c625SLionel Sambuc# Copyright (c) 2011 The NetBSD Foundation, Inc.
684d9c625SLionel Sambuc# All rights reserved.
784d9c625SLionel Sambuc#
884d9c625SLionel Sambuc# Redistribution and use in source and binary forms, with or without
984d9c625SLionel Sambuc# modification, are permitted provided that the following conditions
1084d9c625SLionel Sambuc# are met:
1184d9c625SLionel Sambuc# 1. Redistributions of source code must retain the above copyright
1284d9c625SLionel Sambuc#    notice, this list of conditions and the following disclaimer.
1384d9c625SLionel Sambuc# 2. Redistributions in binary form must reproduce the above copyright
1484d9c625SLionel Sambuc#    notice, this list of conditions and the following disclaimer in the
1584d9c625SLionel Sambuc#    documentation and/or other materials provided with the distribution.
1684d9c625SLionel Sambuc#
1784d9c625SLionel Sambuc# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1884d9c625SLionel Sambuc# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1984d9c625SLionel Sambuc# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2084d9c625SLionel Sambuc# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2184d9c625SLionel Sambuc# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2284d9c625SLionel Sambuc# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2384d9c625SLionel Sambuc# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2484d9c625SLionel Sambuc# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2584d9c625SLionel Sambuc# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2684d9c625SLionel Sambuc# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2784d9c625SLionel Sambuc# POSSIBILITY OF SUCH DAMAGE.
2884d9c625SLionel Sambuc#
2984d9c625SLionel Sambuc# gcc2netbsd:  convert a file source tree into a
30*0a6a1f1dSLionel Sambuc# format suitable for import.  Works on first arg dir.
3184d9c625SLionel Sambuc# You can run this only once if you want it to work.
3284d9c625SLionel Sambuc#
3384d9c625SLionel Sambuc# based on file 2netbsd
3484d9c625SLionel Sambuc#
3584d9c625SLionel SambucPROG="$(basename "$0")"
3684d9c625SLionel Sambuc
3784d9c625SLionel Sambucif [ -z "$1" ]
3884d9c625SLionel Sambucthen
3984d9c625SLionel Sambuc	echo "Usage: $PROG <directory>" 1>&2
4084d9c625SLionel Sambuc	exit 1
4184d9c625SLionel Sambucfi
42*0a6a1f1dSLionel SambucDIR="$1"
4384d9c625SLionel Sambuc
4484d9c625SLionel Sambuc### Remove the $'s around RCS tags
45*0a6a1f1dSLionel Sambuccleantags "$DIR"
4684d9c625SLionel Sambuc
4784d9c625SLionel SambucRM="
48*0a6a1f1dSLionel Sambucboehm-gc
4984d9c625SLionel Sambucgcc/ada
5084d9c625SLionel Sambucgcc/fortran
51*0a6a1f1dSLionel Sambucgcc/go
52*0a6a1f1dSLionel Sambucgcc/java
53*0a6a1f1dSLionel Sambucgcc/po
54*0a6a1f1dSLionel Sambucgcc/testsuite
5584d9c625SLionel Sambuclibada
56*0a6a1f1dSLionel Sambuclibatomic
57*0a6a1f1dSLionel Sambuclibcpp/po
58*0a6a1f1dSLionel Sambuclibffi
5984d9c625SLionel Sambuclibgfortran
60*0a6a1f1dSLionel Sambuclibgo
61*0a6a1f1dSLionel Sambuclibgomp/testsuite
62*0a6a1f1dSLionel Sambuclibiberty/testsuite
63*0a6a1f1dSLionel Sambuclibitm/testsuite
64*0a6a1f1dSLionel Sambuclibjava
65*0a6a1f1dSLionel Sambuclibmudflap/testsuite
66*0a6a1f1dSLionel Sambuclibquadmath
67*0a6a1f1dSLionel Sambuclibstdc++-v3/po
68*0a6a1f1dSLionel Sambuclibstdc++-v3/testsuite
69*0a6a1f1dSLionel Sambuczlib
7084d9c625SLionel Sambuc"
7184d9c625SLionel Sambuc
72*0a6a1f1dSLionel Sambucfind "$DIR" -name .cvsignore -exec rm -f {} +
73*0a6a1f1dSLionel Sambucfind "$DIR" -name .gitignore -exec rm -f {} +
74*0a6a1f1dSLionel Sambucfind "$DIR" -name .svn -type d -exec rm -fr {} +
7584d9c625SLionel Sambucfor i in $RM; do
76*0a6a1f1dSLionel Sambuc	rm -fr "$DIR/$i"
7784d9c625SLionel Sambucdone
7884d9c625SLionel Sambuc
7984d9c625SLionel Sambucecho You can import now.  Use the following command:
8084d9c625SLionel Sambucecho cvs import src/external/gpl3/gcc/dist FSF gcc-X-Y-Z
8184d9c625SLionel Sambuc
8284d9c625SLionel Sambucexit 0
83