This is the mail archive of the gcc-patches@gcc.gnu.org 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: [RFC/PATCH] make "make install" play nicely in CVS trees


> -----Original Message-----
> From: Ian Lance Taylor 
> Sent: 25 March 2004 16:08

> "Dave Korn" <dk@artimi.com> writes:

> > fixinclude headers.  Instead of rm -rf'ing and then mkdir'ing the 
> > directory, we create it only if it doesn't already exist, 
> then iterate 
> > through it and rm everything that isn't called "CVS".
> 
> I don't see how that can work in the general case, because 
> the installed include directory can have subdirectories with 
> header files in them, and you would presumably want to keep 
> the CVS directory in those subdirectories.

  Ah.  I wasn't aware of the amount of structure that might end up in there.
You're obviously correct, of course.

> It might be safe to simply remove all .h files from the 
> installed include directory.  My reading of fixinc.sh is that 
> it will only operate on files matching "*.h".  Plus the top 
> level README file, of course.

  Yes, I see the bit you mean.  Portable shell scripting is a bit of a black
art, I'm surprised that the find command is standardized enough to be used.
Hmm, I see that symlinks get searched for as well sometimes.

> Yes, the latter.  Don't send patches for generated files to 
> gcc-patches.
> 
> Ian

  Yeh, when I stopped to think about it, that did seem the most likely
option.  Cheers.

  Heh.  I sent in the test version of my patch as it happens: it wasn't
meant to still say "echo" in this bit:

! 		if [ "$$i" != "$(libsubdir)/include/CVS" ] ; then \
! 			echo -rm -rf $$i; \
! 		fi; \

  So, do you think it would be suitable to replace the for loop with a
couple of lines like:

	find $(libsubdir)/include/ -name '\*.h' -xargs rm
	-rm $(libsubdir)/include/README

because if that's acceptable (in terms of gnu portable shell coding
standards), I'll send a take 2 tomorrow.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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