From nobody@FreeBSD.ORG Wed Aug  4 17:11:05 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id A157414F73; Wed,  4 Aug 1999 17:11:05 -0700 (PDT)
Message-Id: <19990805001105.A157414F73@hub.freebsd.org>
Date: Wed,  4 Aug 1999 17:11:05 -0700 (PDT)
From: jobaldwi@vt.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: [PATCH] Make optional variables in docproj.docbook.mk truly optional
X-Send-Pr-Version: www-1.0

>Number:         12978
>Category:       docs
>Synopsis:       [PATCH] Make optional variables in docproj.docbook.mk truly optional
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug  4 17:20:00 PDT 1999
>Closed-Date:    Thu Aug 5 13:22:40 PDT 1999
>Last-Modified:  Thu Aug  5 13:23:08 PDT 1999
>Originator:     John Baldwin
>Release:        3.2-STABLE
>Organization:
>Environment:
n/a
>Description:
The current doc/share/mk/docproj.docbook.mk lists INSTALL_COMPRESSED and
INSTALL_ONLY_COMPRESSED as being optional variables.  However, if these
variables are not defined, then the makefile dies with make errors.
>How-To-Repeat:
Create a makefile that includes docproh.docbook.mk but doesn't define
INSTALL_COMPRESSED or INSTALL_ONLY_COMPRESSED and try to make something
with it.
>Fix:
Apply this patch to docproj.docbook.mk:

Index: docproj.docbook.mk
===================================================================
RCS file: /usr/cvs/doc/share/mk/docproj.docbook.mk,v
retrieving revision 1.5
diff -u -r1.5 docproj.docbook.mk
--- docproj.docbook.mk  1999/06/03 19:39:29     1.5
+++ docproj.docbook.mk  1999/08/04 23:45:06
@@ -183,7 +183,7 @@
 # ${_docs} and ${CLEANFILES} so they get built/cleaned by "all" and
 # "clean".
 #
-.if !empty(INSTALL_COMPRESSED)
+.if defined(INSTALL_COMPRESSED) && !empty(INSTALL_COMPRESSED)
 .for _curformat in ${FORMATS}
 _cf=${_curformat}
 .for _curcomp in ${INSTALL_COMPRESSED}
@@ -336,7 +336,7 @@
 # Build a list of install-format targets to be installed. These will be
 # dependencies for the "realinstall" target.
 #
-.if empty(INSTALL_ONLY_COMPRESSED)
+.if !defined(INSTALL_ONLY_COMPRESSED) || empty(INSTALL_ONLY_COMPRESSED)
 _curinst+= ${FORMATS:S/^/install-/g}
 .endif


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nik 
State-Changed-When: Thu Aug 5 13:22:40 PDT 1999 
State-Changed-Why:  
Committed, thanks. 
>Unformatted:
