pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Avoid checking whether PKG_OPTIONS_DEPRECATED_WARNI...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/308344ae1d50
branches:  trunk
changeset: 532234:308344ae1d50
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Aug 14 19:03:25 2007 +0000

description:
Avoid checking whether PKG_OPTIONS_DEPRECATED_WARNINGS is defined in
the makefile and simply handle it in the shell code.  This allows for
appending to PKG_OPTIONS_DEPRECATED_WARNINGS in a makefile even after
bsd.options.mk is included.

diffstat:

 mk/bsd.options.mk |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (45 lines):

diff -r 4db5d9be2fc2 -r 308344ae1d50 mk/bsd.options.mk
--- a/mk/bsd.options.mk Tue Aug 14 18:04:16 2007 +0000
+++ b/mk/bsd.options.mk Tue Aug 14 19:03:25 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.options.mk,v 1.60 2007/06/06 07:12:31 rillig Exp $
+# $NetBSD: bsd.options.mk,v 1.61 2007/08/14 19:03:25 jlam Exp $
 #
 # This Makefile fragment provides boilerplate code for standard naming
 # conventions for handling per-package build options.
@@ -386,13 +386,13 @@
        @${ECHO} ""
        @${ECHO} "You can select which build options to use by setting PKG_DEFAULT_OPTIONS"
        @${ECHO} "or "${PKG_OPTIONS_VAR:Q}"."
-.if defined(PKG_OPTIONS_DEPRECATED_WARNINGS)
-       @${ECHO}
-       @for l in ${PKG_OPTIONS_DEPRECATED_WARNINGS}; \
+       @set -- dummy ${PKG_OPTIONS_DEPRECATED_WARNINGS}; \
+       if ${TEST} $$# -gt 1; then ${ECHO}; fi; \
+       for l; \
        do \
+               if ${TEST} "$$l" = "dummy"; then continue; fi; \
                ${ECHO} "$$l"; \
        done
-.endif
 
 .if defined(PKG_SUPPORTED_OPTIONS)
 .PHONY: supported-options-message
@@ -418,13 +418,13 @@
 .    else
        @${ECHO} "      ${PKG_OPTIONS_VAR} = "${${PKG_OPTIONS_VAR}:Q}
 .    endif
-.    if defined(PKG_OPTIONS_DEPRECATED_WARNINGS)
-       @${ECHO}
-       @for l in ${PKG_OPTIONS_DEPRECATED_WARNINGS}; \
+       @set -- dummy ${PKG_OPTIONS_DEPRECATED_WARNINGS}; \
+       if ${TEST} $$# -gt 1; then ${ECHO}; fi; \
+       for l; \
        do \
+               if ${TEST} "$$l" = "dummy"; then continue; fi; \
                ${ECHO} "$$l"; \
        done
-.    endif
        @${ECHO} ""
        @${ECHO} "=========================================================================="
 .  endif



Home | Main Index | Thread Index | Old Index