From owner-freebsd-doc Wed Oct 4 13:27:15 2000 Delivered-To: freebsd-doc@freebsd.org Received: from baerenklau.de.freebsd.org (baerenklau.de.freebsd.org [195.185.195.14]) by hub.freebsd.org (Postfix) with ESMTP id 0220E37B502 for ; Wed, 4 Oct 2000 13:27:12 -0700 (PDT) Received: (from uucp@localhost) by baerenklau.de.freebsd.org (8.8.8/8.8.8) with UUCP id WAA27614; Wed, 4 Oct 2000 22:26:41 +0200 (CEST) (envelope-from w@panke.de.freebsd.org) Received: (from w@localhost) by paula.panke.de.freebsd.org (8.9.3/8.8.8) id WAA01264; Wed, 4 Oct 2000 22:26:23 +0200 (CEST) (envelope-from w) Date: Wed, 4 Oct 2000 22:26:23 +0200 From: Wolfram Schneider To: Jun Kuriyama Cc: Doc Team Subject: Re: current www building problem Message-ID: <20001004222622.A1198@paula.panke.de.freebsd.org> References: <7maecmea8n.wl@waterblue.imgsrc.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <7maecmea8n.wl@waterblue.imgsrc.co.jp>; from kuriyama@imgsrc.co.jp on Tue, Oct 03, 2000 at 02:59:04PM +0900 Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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} -- Wolfram Schneider http://wolfram.schneider.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message