From:	CRDGW2::CRDGW2::MRGATE::"SMTP::PREP.AI.MIT.EDU::HELP-GCC-REQUEST" 17-MAR-1992 11:10:47.82
To:	ARISIA::EVERHART
CC:	
Subj:	Re: make install-fixincludes loops forever under SunOS 4.1.2

From:	help-gcc-request@prep.ai.mit.edu@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.123)
	 id AA22125; Tue, 17 Mar 92 10:43:28 EST
Received: by life.ai.mit.edu (4.1/AI-4.10) id AA06955; Tue, 17 Mar 92 07:20:54 EST
Return-Path: <h.b.furuseth@usit.uio.no>
Received: from pat.uio.no by life.ai.mit.edu (4.1/AI-4.10) id AA06886; Tue, 17 Mar 92 07:19:45 EST
Received: from ulrik.uio.no by pat.uio.no with local-SMTP (PP) 
          id <17070-0@pat.uio.no>; Tue, 17 Mar 1992 13:07:31 +0100
Date: Tue, 17 Mar 1992 13:07:27 +0100
From: hbf <h.b.furuseth@usit.uio.no>
Message-Id: <9203171207.AAgandalf08884@gandalf.uio.no>
To: help-gcc@prep.ai.mit.edu
Cc: karl@thuja.gsfc.nasa.gov (Karl A. Anderson)
In-Reply-To: karl@thuja.gsfc.nasa.gov's message of 16 Mar 92 21:16:33 GMT
Subject: Re: make install-fixincludes loops forever under SunOS 4.1.2
References: <1992Mar16.161633@thuja.gsfc.nasa.gov>

To stop fixincludes from looping over "recursive symlinks", replace this:

	if $LINKS; then
	  files=`ls -LR | sed -n s/:$//p`
	else
	  files=`find . -type d -print | sed '/^.$/d'`
	fi

with this:

	files=`	find . -type d -print | sed '/^.$/d'
		$LINKS && find . -type l -exec test -d '{}' \; -print`

It will still make the symlinks into directories and not symlinks, but
at least it won't loop.  If I remember correctly, several versions of
fixincludes have been posted that make gcc-include into a more accurate
mirror of /usr/include, but none have made it into gcc so far.


Hallvard
