This is the mail archive of the
mailing list for the GCC project.
RE: [RFC/PATCH] make "make install" play nicely in CVS trees
- From: "Dave Korn" <dk at artimi dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 25 Mar 2004 17:20:38 -0000
- Subject: 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" <firstname.lastname@example.org> 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
Yeh, when I stopped to think about it, that did seem the most likely
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
because if that's acceptable (in terms of gnu portable shell coding
standards), I'll send a take 2 tomorrow.
Can't think of a witty .sigline today....