Subject: bin/25218: Errors including bsd.man.mk and running make
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <ccatrian@eml.cc>
List: netbsd-bugs
Date: 04/18/2004 04:19:11
>Number:         25218
>Category:       bin
>Synopsis:       Errors including bsd.man.mk and running make
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 18 04:20:06 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Cesar Catrian C.
>Release:        NetBSD 2.0_BETA
>Organization:
	
>Environment:
	
	
System: NetBSD core.cjc.cl 2.0_BETA NetBSD 2.0_BETA (SAT) #4: Mon Apr 12 21:11:26 CLT 2004 cetrox@core.cjc.cl:/home/cetrox/src/src/sys/arch/i386/compile/obj/SAT i386
Architecture: i386
Machine: i386
>Description:
Running /usr/bin/make including bsd.man.mk causes multiple 'malformed conditional' errors, as variables are undefined.
>How-To-Repeat:
make at pkgsrc/emulators/vmware-module
>Fix:
Please review

--- share/mk/bsd.man.mk.orig    2004-04-18 00:06:13.000000000 -0400
+++ share/mk/bsd.man.mk 2004-04-18 00:12:02.000000000 -0400
@@ -29,7 +29,7 @@
 _MNUMBERS=     1 2 3 4 5 6 7 8 9
 .SUFFIXES:     ${_MNUMBERS:@N@.$N@}
 
-.if ${MKMANZ} == "no"
+.if !defined(MKMANZ) || ${MKMANZ} == "no"
 MANCOMPRESS?=
 MANSUFFIX?=
 .else
@@ -167,7 +167,7 @@
 
 ##### Build and install rules (HTML pages)
 
-.if ${MKHTML} != "no"                                  # {
+.if defined(MKHTML) && ${MKHTML} != "no"                                       # {
 installhtml:   .PHONY htmlpages
 htmlpages::    # ensure target exists
 HTMLPAGES=     ${MAN:C/\.([1-9])$/.html\1/}
@@ -185,7 +185,7 @@
 # construct installed path
 _F:=           ${HTMLDIR}/${F:T:E}${MANSUBDIR}/${F:R:S-/index$-/x&-}.html
 
-.if ${MKUPDATE} == "no"
+.if !defined(MKUPDATE) || ${MKUPDATE} == "no"
 ${_F}!         ${F} __installpage                      # install rule
 .if !defined(BUILD) && !make(all) && !make(${F})
 ${_F}!         .MADE                                   # no build at install
>Release-Note:
>Audit-Trail:
>Unformatted: