Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/pkgformat/pkg mk/.../metadata.mk: properly clean up...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9dd1e7112d2e
branches: trunk
changeset: 433666:9dd1e7112d2e
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Jun 07 04:41:58 2020 +0000
description:
mk/.../metadata.mk: properly clean up loops after removing ""
There is no evidence that any shell needs the empty string literal in
'for i in "" $var' to loop over a simple variable. This would only be
necessary if the shell code were generated by a preprocessor such as
bmake or autoconf, and the list of items might end up empty. In such a
case, the empty string literal prevents to generate 'for i in ; do',
which would produce a syntax error.
diffstat:
mk/pkgformat/pkg/metadata.mk | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r fc0b9102a9d2 -r 9dd1e7112d2e mk/pkgformat/pkg/metadata.mk
--- a/mk/pkgformat/pkg/metadata.mk Sun Jun 07 04:36:59 2020 +0000
+++ b/mk/pkgformat/pkg/metadata.mk Sun Jun 07 04:41:58 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.27 2020/06/06 09:33:56 rillig Exp $
+# $NetBSD: metadata.mk,v 1.28 2020/06/07 04:41:58 rillig Exp $
######################################################################
### The targets below are all PRIVATE.
@@ -107,12 +107,10 @@
${AWK} '{ print "${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}; } | \
${SORT} | uniq -c | awk '$$1 == 2 {print $$2}'`; \
for i in $$libs; do \
- ${TEST} "$$i" != "" || continue; \
${ECHO} "PROVIDES=$$i"; \
done | ${SED} -e 's,^PROVIDES=${DESTDIR},PROVIDES=,' \
>> ${.TARGET}.tmp; \
for req in $$requires; do \
- ${TEST} "$$req" != "" || continue; \
${ECHO} "REQUIRES=$$req" >> ${.TARGET}.tmp; \
done
.endif
Home |
Main Index |
Thread Index |
Old Index