On 22 April 2018 at 10:28, Mathieu Lirzin wrote: > > > $(srcdir)/foo.1: foo.c foo$(EXEEXT) > > -@case '$?' in \ > > *foo.c*) > > ​​$(AM_V_P) && set -x || echo " HELP2MAN $@"; \ > > LANGUAGE= help2man --output="$(srcdir)/foo.1" ./foo$(EXEEXT);; \ > > *) : ;; \ > > esac; > > > > Nice! The one thing I don't understand: why is "-" needed at the start > > (i.e. why do we need to ignore failure of this command?). > > I don't recall exactly the reason Guix added it, I guess it was to allow > the build to "succeed" even if the man pages generation failed since > that doesn't impact the software to run. However I am not sure if it's > a good idea. > Ah, I guess it could fail because if help2man is not available. The code I supplied​ uses "missing" instead. IIUC this case silently ignores when the ‘beetle.1’ is not distributed, > ​It is distributed. This is important to cover the case where help2man is not available.​ Note that the command would not work anyway under make distcheck, as it would attempt to write to a non-writable directory, and this case is explicitly handled. -- https://rrt.sc3d.org