summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2004-04-14 15:26:41 +0000
committerjmmv <jmmv@pkgsrc.org>2004-04-14 15:26:41 +0000
commit6bb0eff02e0f2c772b0ba3bc6cf6cf153aa53bd6 (patch)
treef6c7a498a69efa61adb9a84dba84dca241ea297b /mk/bsd.pkg.mk
parent34c7796109a07988ca0181707201e1730447c986 (diff)
downloadpkgsrc-6bb0eff02e0f2c772b0ba3bc6cf6cf153aa53bd6.tar.gz
Rework the way to use the -dirs packages (ATM, xdg-dirs, xdg-x11-dirs,
gnome1-dirs and gnome2-dirs): - Introduce a global USE_DIRS variable, which takes pairs of names and versions. For example, an xdg-1.1 value will request the use of the xdg-dirs package, at least version 1.1. This variable must always be appended to. If there are duplicates with different versions, the one with the higher number will be picked up. - Introduce the mk/dirs.mk file, which is automatically included by bsd.pkg.mk when USE_DIRS is not empty. It parses the variable's value and includes the required dirs.mk files, present in each -dirs package. - For each -dirs package, add a dirs.mk file that defines a variable holding the list of directories provided by it, adds a dependency on that package, and modifies the PRINT_PLIST_AWK variable to output comments for the directories handled by it. - Drop some Makefile.common files that only make things difficult and more confusing now (in favour of the new dirs.mk files). The only thing to worry about is to keep version numbers consistent across xdg-* and gnome*-* packages, but that will be easier to handle. The main reason for this change is to be able to modify PRINT_PLIST_AWK in a clean way, but I hope this will improve clarity too. Also, this simplifies the addition of future -dirs packages (if needed) in a consistent way.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index f6c955b82fd..ac91780b2ae 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1440 2004/04/12 20:48:07 jmmv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1441 2004/04/14 15:26:41 jmmv Exp $
#
# This file is in the public domain.
#
@@ -1385,6 +1385,10 @@ NO_BUILDLINK= # defined
.include "../../mk/tools.mk"
+.if defined(USE_DIRS) && !empty(USE_DIRS)
+. include "../../mk/dirs.mk"
+.endif
+
_PREPENDED_TO_PATH?= # empty
.for _dir_ in ${PREPEND_PATH}
. if empty(_PREPENDED_TO_PATH:M${_dir_})