This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Moving C to its own directory (was Re: ObjC tree inlining)

On Mon, Nov 19, 2001 at 12:27:45PM -0500, Phil Edwards wrote:
> On Sun, Nov 18, 2001 at 04:59:53PM +0000, Neil Booth wrote:
> > c-lang.c is C only.  I think it would be good to create a C directory
> > for the C front end to dispel confusion like this.  It might also help
> > towards making C just another front end, rather than the somewhat
> > special status it currently has.  What do you think Joseph?
> The usual objection to this is that it makes CVS history browsing more
> difficult,e.g., the problems discussed in
> No matter which of the two or three methods of moving files we use, at
> least one CVS operation will be much harder.

It is trival.  Do a repository copy.
    cd /cvs/gcc/gcc
    mkdir c
    cd c
    cp ../foo.c,v .
    #run script to prefix tags with "old_"
    cd /tmp
    cvs co gcc
    cd gcc/gcc/
    cvs rm -f foo.c
    cvs ci foo.c
    cd c
    cvs ci -f -m 'repo copied from gcc/gcc/' *

#! /bin/sh

# Recursive function so that the tags are done in reverse order.  That
# makes them come out in the same order in the final file.
fix() {
    local file tag

    if [ $# -le 1 ]; then
    shift 2
    fix $file $* || exit
    echo "  $tag ==> $new"
    rcs -q -n${new}:${tag} $file || exit
    rcs -q -n${tag} $file || exit


while getopts "e:i:" opt; do
    case $opt in
    e) ecmd="fgrep -f $OPTARG -x -v";;
    i) icmd="fgrep -f $OPTARG -x";;
    *) echo "Usage: $(basename $0) [-e excludefrom] [-i includefrom] file..."
       exit 1;;
shift $(($OPTIND-1))

for file; do
    echo $file:
    tags=$(rlog -h $file | grep '^	' | grep -v '^	old' |\
	sed -e 's/^	\([^:]*\):.*$/\1/' | $ecmd | $icmd)
    fix $file $tags

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]