From owner-freebsd-doc  Wed Oct  4 15:32: 2 2000
Delivered-To: freebsd-doc@freebsd.org
Received: from ns1.sunesi.net (ns1.sunesi.net [196.15.192.194])
	by hub.freebsd.org (Postfix) with ESMTP id C8E7737B502
	for <freebsd-doc@freebsd.org>; Wed,  4 Oct 2000 15:31:58 -0700 (PDT)
Received: from nbm by ns1.sunesi.net with local (Exim 3.03 #1)
	id 13gx4n-000Lwh-00; Thu, 05 Oct 2000 00:31:49 +0200
Date: Thu, 5 Oct 2000 00:31:49 +0200
From: Neil Blakey-Milner <nbm@mithrandr.moria.org>
To: Wolfram Schneider <bsd@panke.de.freebsd.org>
Cc: Jun Kuriyama <kuriyama@imgsrc.co.jp>,
	Doc Team <freebsd-doc@FreeBSD.ORG>
Subject: Re: current www building problem
Message-ID: <20001005003149.A84322@mithrandr.moria.org>
References: <7maecmea8n.wl@waterblue.imgsrc.co.jp> <20001004222622.A1198@paula.panke.de.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20001004222622.A1198@paula.panke.de.freebsd.org>; from bsd@panke.de.freebsd.org on Wed, Oct 04, 2000 at 10:26:23PM +0200
Organization: Sunesi Clinical Systems
X-Operating-System: FreeBSD 3.3-RELEASE i386
X-URL: http://rucus.ru.ac.za/~nbm/
Sender: owner-freebsd-doc@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

On Wed 2000-10-04 (22:26), Wolfram Schneider wrote:
> On 2000-10-03 14:59:04 +0900, Jun Kuriyama wrote:
> > Current web.mk has following target.
> > .sgml.html:
> > 	${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} |\
> > 	SGML_CATALOG_FILES='' ${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET}
> > 
> > But if $SGMLNORM fails, broken ${.TARGET} is created.  And if we type
> > "make" again, it finishes successfully because ${.TARGET} is newer
> > than ${.IMPSRC}.
> > 
> > How should we do to remove ${.TARGET} if it fails?  One idea is:
> > 
> > .sgml.html:
> > 	(${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} |\
> > 	 SGML_CATALOG_FILES='' ${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET})\
> > 	|| rm -f ${.TARGET}
> > 
> > but it seems dirty...  Does anyone have good idea?
> 
> use a temp file and rename it to the target if successfully.
> 
> .sgml.html:
>  	${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} |\
>  	SGML_CATALOG_FILES='' ${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET}.tmp
> 	mv -f ${.TARGET}.tmp ${.TARGET}

If we do that, we need to add foo.html.tmp to CLEANFILES.

Neil
-- 
Neil Blakey-Milner
Sunesi Clinical Systems
nbm@mithrandr.moria.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message