Pino Toscano
2019-Jan-18 12:31 UTC
[Libguestfs] [PATCH] build: integrate ocaml-link.sh with automake silent rules
In case either the silent rules are disabled, or V=1 is set, print the full command line that is executed. --- ocaml-link.sh.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ocaml-link.sh.in b/ocaml-link.sh.in index 129c6fb0e..ba990f809 100755 --- a/ocaml-link.sh.in +++ b/ocaml-link.sh.in @@ -43,6 +43,14 @@ while true ; do esac done +# Integration with silent rules of automake: print the full command +# line option in verbose mode. +if [ x"${V:-@AM_DEFAULT_VERBOSITY@}" = x1 ]; then + echo "$@" \ + @OCAML_RUNTIME_VARIANT_PIC_OPTION@ \ + -linkpkg \ + -cclib "'@LDFLAGS@ $cclib'" +fi # NB -cclib must come last. exec "$@" \ @OCAML_RUNTIME_VARIANT_PIC_OPTION@ \ -- 2.20.1
Richard W.M. Jones
2019-Jan-18 14:56 UTC
Re: [Libguestfs] [PATCH] build: integrate ocaml-link.sh with automake silent rules
On Fri, Jan 18, 2019 at 01:31:55PM +0100, Pino Toscano wrote:> In case either the silent rules are disabled, or V=1 is set, print the > full command line that is executed. > --- > ocaml-link.sh.in | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/ocaml-link.sh.in b/ocaml-link.sh.in > index 129c6fb0e..ba990f809 100755 > --- a/ocaml-link.sh.in > +++ b/ocaml-link.sh.in > @@ -43,6 +43,14 @@ while true ; do > esac > done > > +# Integration with silent rules of automake: print the full command > +# line option in verbose mode. > +if [ x"${V:-@AM_DEFAULT_VERBOSITY@}" = x1 ]; then > + echo "$@" \ > + @OCAML_RUNTIME_VARIANT_PIC_OPTION@ \ > + -linkpkg \ > + -cclib "'@LDFLAGS@ $cclib'" > +fi > # NB -cclib must come last. > exec "$@" \ > @OCAML_RUNTIME_VARIANT_PIC_OPTION@ \ACK, very necessary thanks. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Reasonably Related Threads
- [PATCH 1/2] tools: Link OCaml programs with -runtime-variant _pic if available.
- [PATCH] build: add simple custom silent rules for automake
- [PATCH] Don't rely on OCaml native compiler for tests
- [PATCH 2/2] mllib: link tests with automake
- [PATCH 1/2] build: factor out the OCaml link.sh scripts