From naddy@bigeye.rhein-neckar.de  Sun Dec 12 09:31:03 1999
Return-Path: <naddy@bigeye.rhein-neckar.de>
Received: from news-ma.rhein-neckar.de (news-ma.rhein-neckar.de [193.197.90.3])
	by hub.freebsd.org (Postfix) with ESMTP id 2EB5E15095
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Dec 1999 09:30:49 -0800 (PST)
	(envelope-from naddy@bigeye.rhein-neckar.de)
Received: from bigeye.rhein-neckar.de (uucp@localhost)
	by news-ma.rhein-neckar.de (8.8.8/8.8.8) with bsmtp id SAA03369
	for FreeBSD-gnats-submit@freebsd.org; Sun, 12 Dec 1999 18:30:47 +0100 (CET)
	(envelope-from naddy@bigeye.rhein-neckar.de)
Received: (from naddy@localhost)
	by bigeye.rhein-neckar.de (8.9.3/8.9.3) id SAA37226;
	Sun, 12 Dec 1999 18:02:42 +0100 (CET)
	(envelope-from naddy)
Message-Id: <199912121702.SAA37226@bigeye.rhein-neckar.de>
Date: Sun, 12 Dec 1999 18:02:42 +0100 (CET)
From: Christian Weisgerber <naddy@mips.rhein-neckar.de>
Sender: naddy@bigeye.rhein-neckar.de
Reply-To: naddy@mips.rhein-neckar.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: Add update target to doc/Makefile
X-Send-Pr-Version: 3.2

>Number:         15439
>Category:       docs
>Synopsis:       Add update target to doc/Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    billf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 12 09:40:01 PST 1999
>Closed-Date:    Wed Dec 15 18:23:11 PST 1999
>Last-Modified:  Wed Dec 15 18:23:26 PST 1999
>Originator:     Christian Weisgerber
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:

>Description:

Both the src and ports trees support a make target "update" which
updates the respective tree by CVSup or CVS to the latest version.
Configuration is typically provided through /etc/make.conf.

The patch below adds this capability to the top level Makefile of
the doc tree. The code is cribbed from {src,ports}/Makefile.

>How-To-Repeat:

n/a

>Fix:

--- doc/Makefile.orig	Sun Dec 12 17:34:01 1999
+++ doc/Makefile	Sun Dec 12 17:48:24 1999
@@ -14,4 +14,24 @@
 .endif
 
 DOC_PREFIX?=   ${.CURDIR}
+
+update:
+.if defined(SUP_UPDATE)
+.if !defined(DOCSUPFILE)
+	@echo "Error: Please define DOCSUPFILE before doing make update."
+	@exit 1
+.endif
+	@echo "--------------------------------------------------------------"
+	@echo ">>> Running ${SUP}"
+	@echo "--------------------------------------------------------------"
+	@${SUP} ${SUPFLAGS} ${DOCSUPFILE}
+.elif defined(CVS_UPDATE)
+	@echo "--------------------------------------------------------------"
+	@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
+	@echo "--------------------------------------------------------------"
+	cd ${.CURDIR}; cvs -q update -P -d
+.else
+	@echo "Error: Please define either SUP_UPDATE or CVS_UPDATE first."
+.endif
+
 .include "${DOC_PREFIX}/share/mk/doc.subdir.mk"
--- src/etc/defaults/make.conf.orig	Sun Dec 12 17:41:23 1999
+++ src/etc/defaults/make.conf	Sun Dec 12 17:42:11 1999
@@ -185,6 +185,7 @@
 #SUPFILE=        /usr/share/examples/cvsup/standard-supfile
 #SUPFILE1=       /usr/share/examples/cvsup/secure-supfile
 #PORTSSUPFILE=   /usr/share/examples/cvsup/ports-supfile
+#DOCSUPFILE=     /usr/share/examples/cvsup/doc-supfile
 #
 # top(1) uses a hash table for the user names.  The size of this hash
 # can be tuned to match the number of local users.  The table size should

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->billf 
Responsible-Changed-By: billf 
Responsible-Changed-When: Sun Dec 12 14:18:19 PST 1999 
Responsible-Changed-Why:  
I was the fool who added PORTSSUPFILE, I'll look at this. 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Wed Dec 15 18:23:11 PST 1999 
State-Changed-Why:  
Committed thanks. 
>Unformatted:
