Date: Wed, 4 Oct 2000 22:26:23 +0200 From: Wolfram Schneider <bsd@panke.de.freebsd.org> To: Jun Kuriyama <kuriyama@imgsrc.co.jp> Cc: Doc Team <freebsd-doc@FreeBSD.ORG> Subject: Re: current www building problem Message-ID: <20001004222622.A1198@paula.panke.de.freebsd.org> In-Reply-To: <7maecmea8n.wl@waterblue.imgsrc.co.jp>; from kuriyama@imgsrc.co.jp on Tue, Oct 03, 2000 at 02:59:04PM %2B0900 References: <7maecmea8n.wl@waterblue.imgsrc.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <wosch@freebsd.org> http://wolfram.schneider.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001004222622.A1198>
