pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk In computing _REPLACE_LOCALEDIR_PATTERNS_FIND_cmd, ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1b472d1824af
branches:  trunk
changeset: 494215:1b472d1824af
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat May 21 01:55:53 2005 +0000

description:
In computing _REPLACE_LOCALEDIR_PATTERNS_FIND_cmd, make sure the :sh
operator does not result in an empty string as make(1) doesn't like
them.  Also, rewrite the variable substitution for the find(1) command
to be more readable, and get rid of the extra grep(1) in favor of
using :N.

diffstat:

 mk/bsd.pkg.mk |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r a040c99978d4 -r 1b472d1824af mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Sat May 21 01:46:10 2005 +0000
+++ b/mk/bsd.pkg.mk     Sat May 21 01:55:53 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1673 2005/05/20 21:36:05 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1674 2005/05/21 01:55:53 jlam Exp $
 #
 # This file is in the public domain.
 #
@@ -1728,10 +1728,15 @@
 _REPLACE_LOCALEDIR_PATTERNS+=  [Mm]akefile*
 .  endif
 _REPLACE_LOCALEDIR_PATTERNS_FIND_cmd= \
-       cd ${WRKSRC} && ${FIND} . \( ${_REPLACE_LOCALEDIR_PATTERNS:S/$/!/:S/^/-o -name !/:S/!/"/g:S/-o//1} \) -print | ${SED} -e 's|^\./||' | ${GREP} -v '\.orig' | ${SORT} -u
-REPLACE_LOCALEDIR?=            # empty
-_REPLACE_LOCALEDIR=            ${REPLACE_LOCALEDIR}                    \
-                               ${_REPLACE_LOCALEDIR_PATTERNS_FIND_cmd:sh}
+       cd ${WRKSRC} && \
+       ${ECHO} "__dummy-entry__" && \
+       ${FIND} . \( ${_REPLACE_LOCALEDIR_PATTERNS:C/.*/-o -name "&"/g:S/-o//1} \) -print \
+       | ${SED} -e 's|^\./||' \
+       | ${SORT} -u
+REPLACE_LOCALEDIR?=    # empty
+_REPLACE_LOCALEDIR=    \
+       ${REPLACE_LOCALEDIR}                                            \
+       ${_REPLACE_LOCALEDIR_PATTERNS_FIND_cmd:sh:N__dummy-entry__:N*.orig}
 
 _CONFIGURE_PREREQ+=            subst-pkglocaledir
 .  if empty(USE_PKGLOCALEDIR:M[nN][oO])



Home | Main Index | Thread Index | Old Index