Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2017-01-31 at 09:36 +0200, Jani Nikula wrote:
> On Tue, 31 Jan 2017, Ben Hutchings <ben@xxxxxxxxxxxxxxx> wrote:
> > As we use redirection to create the SVG file, even a failed
> > conversion
> > will create the file and 'make' will consider it up-to-date if the
> > build is retried.  We should delete it in case of failure.
> > 
> > Fixes: ec868e4ee2bc ("docs-rst: media: build SVG from graphviz
> > files")
> > Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
> > ---
> >  Documentation/media/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/media/Makefile
> > b/Documentation/media/Makefile
> > index 32663602ff25..730d73db7c7a 100644
> > --- a/Documentation/media/Makefile
> > +++ b/Documentation/media/Makefile
> > @@ -36,7 +36,7 @@ quiet_cmd_genpdf = GENPDF  $2
> >        cmd_genpdf = convert $2 $3
> >  
> >  quiet_cmd_gendot = DOT     $2
> > -      cmd_gendot = dot -Tsvg $2 > $3
> > +      cmd_gendot = dot -Tsvg $2 > $3 || { rm -f $3; exit 1; }
> 
> I'd just use dot -o.

That does make more sense.  I looked for such an option before writing
this, but the manual page doesn't mention it!

Ben.

> >  
> >  %.pdf: %.svg
> >  	@$(call cmd,genpdf,$<,$@)
> > 
> 
> 
-- 
Ben Hutchings
It is easier to write an incorrect program than to understand a correct
one.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux