From owner-svn-doc-all@freebsd.org Wed Apr 29 08:30:57 2020 Return-Path: Delivered-To: svn-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0500F2AC515; Wed, 29 Apr 2020 08:30:57 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49BsD06N3Nz3R1t; Wed, 29 Apr 2020 08:30:56 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC30F26C9; Wed, 29 Apr 2020 08:30:56 +0000 (UTC) (envelope-from blackend@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03T8UuCO024555; Wed, 29 Apr 2020 08:30:56 GMT (envelope-from blackend@FreeBSD.org) Received: (from blackend@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03T8UuCF024553; Wed, 29 Apr 2020 08:30:56 GMT (envelope-from blackend@FreeBSD.org) Message-Id: <202004290830.03T8UuCF024553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: blackend set sender to blackend@FreeBSD.org using -f From: Marc Fonvieille Date: Wed, 29 Apr 2020 08:30:56 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r54081 - in head/share: mk pgpkeys X-SVN-Group: doc-head X-SVN-Commit-Author: blackend X-SVN-Commit-Paths: in head/share: mk pgpkeys X-SVN-Commit-Revision: 54081 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 08:30:57 -0000 Author: blackend Date: Wed Apr 29 08:30:56 2020 New Revision: 54081 URL: https://svnweb.freebsd.org/changeset/doc/54081 Log: - Tidy up .ps.eps target to make sure the build really fails when a problem occurs during conversion. Currently the build doesn't stop on failures and runs to its end; - Add some .DELETE_ON_ERROR targets to remove broken target files on failures. Submitted by: mandree Reviewed by: blackend Differential Revision: https://reviews.freebsd.org/D24560 Modified: head/share/mk/doc.images.mk head/share/pgpkeys/Makefile Modified: head/share/mk/doc.images.mk ============================================================================== --- head/share/mk/doc.images.mk Wed Apr 29 07:48:03 2020 (r54080) +++ head/share/mk/doc.images.mk Wed Apr 29 08:30:56 2020 (r54081) @@ -96,6 +96,13 @@ EPS2PNM_RES?= 100 # Use suffix rules to convert .scr files to other formats .SUFFIXES: .scr .pic .png .ps .eps .txt +# +# There are many rules around here that use > ${.TARGET} +# so that on failure, may leave corrupt files behind. +# Make sure to remove them. +# +.DELETE_ON_ERROR: + .scr.png: ${SCR2PNG} ${SCR2PNGOPTS} < ${.IMPSRC} > ${.TARGET} @@ -145,8 +152,8 @@ EPS2PNM_RES?= 100 # (the older versions calculated BBox directly in ps2epsi.ps). .ps.eps: tmpfile=$$(mktemp ${.TARGET}.XXXXXXXX); \ - ${PS2BBOX} ${PS2BBOXOPTS} ${.ALLSRC} > $$tmpfile 2>&1; \ - ${SETENV} outfile=$$tmpfile ${PS2EPS} ${PS2EPSOPTS} < ${.ALLSRC} 1>&2; \ + ${PS2BBOX} ${PS2BBOXOPTS} ${.ALLSRC} 2> $$tmpfile >$$tmpfile.err && \ + ${SETENV} outfile=$$tmpfile ${PS2EPS} ${PS2EPSOPTS} < ${.ALLSRC} >>$$tmpfile.err 2>&1 && \ (echo "save countdictstack mark newpath /showpage {} def /setpagedevice {pop} def";\ echo "%%EndProlog";\ echo "%%Page: 1 1";\ @@ -161,7 +168,9 @@ EPS2PNM_RES?= 100 echo "cleartomark countdictstack exch sub { end } repeat restore";\ echo "%%EOF";\ ) >> $$tmpfile; \ - ${MV} -f $$tmpfile ${.TARGET} + test ! -s $$tmpfile.err && \ + { ${MV} -f $$tmpfile ${.TARGET} ; ${RM} -f $$tmpfile.err ; } \ + || { ${CAT} $$tmpfile.err ; ${RM} -f $$tmpfile.err $$tmpfile ; false ; } # We can't use suffix rules to generate the rules to convert EPS to PNG and # PNG to EPS. This is because a .png file can depend on a .eps file, and Modified: head/share/pgpkeys/Makefile ============================================================================== --- head/share/pgpkeys/Makefile Wed Apr 29 07:48:03 2020 (r54080) +++ head/share/pgpkeys/Makefile Wed Apr 29 08:30:56 2020 (r54081) @@ -10,6 +10,8 @@ CLEANFILES= pgpkeyring.txt keyring.xml .ORDER: pgpkeyring pgpkeyring.txt .ORDER: keyring.xml pgpkeyring.txt +.DELETE_ON_ERROR: + all: keyring.xml pgpkeyring pgpkeyring.txt keyring.xml: .PHONY