public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* xfsprogs: avoid dot-directories when configuring
@ 2011-03-30 17:52 Alex Elder
  2011-03-30 18:46 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2011-03-30 17:52 UTC (permalink / raw)
  To: xfs

The "find" command used in the configure script to find localized
files searches through directories (including .git and .pc) that
really should be ignored.  Change it so it skips over these
directories.

I think it's reasonable to assume any such "dot directory" should be
ignored, so this change skips any directory at the top level whose
name begins with ".".  

Note that I found an odd anomaly in "find".  If you do not supply
the "-print" argument, the pruned directory names show up in the
output.  Supplying "-print" does not include them (and that's what
we want).

Signed-off-by: Alex Elder <aelder@sgi.com>

---
 configure.in |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: b/configure.in
===================================================================
--- a/configure.in
+++ b/configure.in
@@ -76,9 +76,12 @@ esac
 AC_SUBST([root_sbindir])
 AC_SUBST([root_libdir])
 
-# Find localized files
+# Find localized files.  Don't descend into any "dot directories"
+# (like .git or .pc from quilt).  Strangely, the "-print" argument
+# to "find" is required, to avoid including such directories in the
+# list.
 LOCALIZED_FILES=""
-for lfile in `find ${srcdir} -name '*.c' -type f || exit 1`; do
+for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
     LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
 done
 AC_SUBST(LOCALIZED_FILES)


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: xfsprogs: avoid dot-directories when configuring
  2011-03-30 17:52 xfsprogs: avoid dot-directories when configuring Alex Elder
@ 2011-03-30 18:46 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2011-03-30 18:46 UTC (permalink / raw)
  To: Alex Elder; +Cc: xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-30 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30 17:52 xfsprogs: avoid dot-directories when configuring Alex Elder
2011-03-30 18:46 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox