summaryrefslogtreecommitdiff
path: root/Packages.txt
diff options
context:
space:
mode:
authoragc <agc>1998-06-03 11:11:27 +0000
committeragc <agc>1998-06-03 11:11:27 +0000
commitdefb2e2bf8fe1e3b6580fe0d6092a9a0d75f7e1a (patch)
treec0af8aa826eef65f6992a445048fd267619c6ec3 /Packages.txt
parentd9f5ab01e422e725d345b470d8283cabcaedff23 (diff)
downloadpkgsrc-defb2e2bf8fe1e3b6580fe0d6092a9a0d75f7e1a.tar.gz
Document pkgsrc/mk/bsd.prefs.mk (in section 9.9, including /etc/mk.conf)
Diffstat (limited to 'Packages.txt')
-rw-r--r--Packages.txt27
1 files changed, 16 insertions, 11 deletions
diff --git a/Packages.txt b/Packages.txt
index 394c8ed4167..fcf55ea2c0e 100644
--- a/Packages.txt
+++ b/Packages.txt
@@ -1,4 +1,4 @@
-# $NetBSD: Packages.txt,v 1.31 1998/05/25 22:01:57 tron Exp $
+# $NetBSD: Packages.txt,v 1.32 1998/06/03 11:11:27 agc Exp $
###########################################################################
==========================
@@ -309,7 +309,7 @@ package from the FreeBSD ports collection:
definition, which is used to do this. For example, to install the
indent.info entry into the info directory file, simply use the
- INFO_FILES= indent
+ INFO_FILES= indent.info
definition in the package Makefile. If the package does this insertion
for you, you should specify USE_GTEXINFO in the package Makefile, to
@@ -941,17 +941,22 @@ See section 4.3 on how to remove RCS IDs from patch files.
==============================================
The problem with package-defined variables that can be overridden via
-/etc/mk.conf is that the values of these variables aren't known at the
-beginning of the Makefile, and thus can't be used in .if statements. It's
-OK to use them like any other variable in expansions ("${VAR}"), but not in
-.if-statements, though.
+MAKECONF or /etc/mk.conf is that make(1) expands a variable as it is
+used, but evaluates preprocessor like statements (.if, .ifdef and
+.ifndef) as they are read. So, to use any variable (which may be set
+in /etc/mk.conf) in one of the .if* statements, the file /etc/mk.conf
+must be included before that .if* statement.
-Here's the preferred way to handle things if you want to include variables
-in .if statements:
+Rather than have a number of ad-hoc ways of including /etc/mk.conf,
+should it exist, or MAKECONF, should it exist, include the
+pkgsrc/mk/bsd.prefs.mk file in the package Makefile before any
+preprocessor-like .if, .ifdef, or .ifndef statements:
-1. in the pkg Makefile, set all the pre-install etc targets.
-2. in the pkg Makefile, .include "../../mk/bsd.pkg.mk"
-3. Then put all the .if defined(USE_SOCKS), .if defined(USE_IDEA) etc
+ .include "../../mk/bsd.prefs.mk"
+
+ .if defined(USE_MENUS)
+ ...
+ .endif
9.10 Is there a mailing list for pkg-related discussion?