I've been experimenting with a SPARC Solaris build recently and the
non-portable use of find in Makefile.in is annoying, it means that the
'make clean' target fails.  There are two uses of

  find some/path -mindepth 1 -maxdepth 1 -print0 | xargs -0 rm -rf --

Solaris find doesn't support -mindepth, -maxdepth or -print0.

Are we using -print0 because problems with spaces in paths have been
observed or simply as some sort of future-proofing?  Don't we control
the paths thus allowing us to avoid spaces?

The use of -mindepth 1 -maxdepth 1 is also something I don't understand,
what advantage is there over simply using a shell expansion?  Like this:

  rm -rf some/path/*

The shell expansion doesn't appear to have a problem with spaces when I
test it.

There is also one use of

  find some/path -print0 | xargs -0 rm -rf --

looking for gcov files.  Have problems with spaces been observed or is
this also future-proofing?

I'd like to have a more portable Makefile.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Reply via email to