tools/ocaml: Fix cleaning bindings test
PATCH 1/1 tools/ocaml: Fix cleaning bindings test
make clean fails in the bindings tests:
make[7]: Entering directory '/home/amd/xen/tools/ocaml/tests/bindings'
rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.cmxs *.annot *.spot *.spit unix.cmxa -ccopt -L -ccopt ....
rm: invalid option -- 'c'
Try 'rm --help' for more information.
Split the compiler flags out of the LIBS variable, since LIBS is passed to rm. The individual *.cxma files are deleted in their respective directories.
--- tools/ocaml/tests/bindings/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/ocaml/tests/bindings/Makefile +3 -3
@@ -10,8 +10,8 @@ OCAMLINCLUDE += \ -I $(OCAML_TOPLEVEL)/libs/xc \ -I $(OCAML_TOPLEVEL)/libs/eventchn -LIBS = \ - unix.cmxa \ +LIBS = unix.cmxa +LIBFLAGS = \ -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/mmap $(OCAML_TOPLEVEL)/libs/mmap/xenmmap.cmxa \ -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/eventchn $(OCAML_TOPLEVEL)/libs/eventchn/xeneventchn.cmxa \ -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xc $(OCAML_TOPLEVEL)/libs/xc/xenctrl.cmxa \
@@ -21,7 +21,7 @@ LIBS = \ PROGRAMS = test-ocaml-bindings OCAML_PROGRAM = test-ocaml-bindings -test-ocaml-bindings_LIBS = $(LIBS) +test-ocaml-bindings_LIBS = $(LIBS) $(LIBFLAGS) test-ocaml-bindings_MLSORTED = $(shell $(OCAMLDEP) -sort $(OBJS:=.ml)) test-ocaml-bindings_OBJS = $(test-ocaml-bindings_MLSORTED:.ml=)
Signature · 1 line
2.34.1
Quoted 7 lines · Jason Andryuk
make clean fails in the bindings tests:
make[7]: Entering directory '
/home/amd/xen/tools/ocaml/tests/bindings'
rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.cmxs *.annot *.spot *.spit unix.cmxa -ccopt -L -ccopt ....
rm: invalid option -- 'c'
Try 'rm --help' for more information.
Quoted 6 lines
Split the compiler flags out of the LIBS variable, since LIBS is passed to rm. The individual *.cxma files are deleted in their respective directories.
Fixes d97847e858f1 ("tools/ocaml: Gitlab CI test for bindings")Signed-off-by Jason Andryuk <[email protected]>
Lovely... Sorry for breaking this.
Quoted 12 lines · Andrew Cooper
Quoted 11 lines · Jason Andryuk
make clean fails in the bindings tests:
make[7]: Entering directory '
/home/amd/xen/tools/ocaml/tests/bindings'
rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.cmxs *.annot *.spot *.spit unix.cmxa -ccopt -L -ccopt ....
rm: invalid option -- 'c'
Try 'rm --help' for more information.Split the compiler flags out of the LIBS variable, since LIBS is passed to rm. The individual *.cxma files are deleted in their respective directories.
Quoted 6 lines
Quoted 2 lines
Fixes d97847e858f1 ("tools/ocaml: Gitlab CI test for bindings")Signed-off-by Jason Andryuk <[email protected]>Lovely... Sorry for breaking this.
Acked-by Andrew Cooper <[email protected]>
Thanks. I just double checked and unix.cmxa isn't in the directory on a successful build. So the whole thing could be moved to LIBFLAGS or a suitable name.
Regards,
Jason
Quoted 17 lines · Jason Andryuk
Quoted 16 lines · Andrew Cooper
Quoted 14 lines · Jason Andryuk
make clean fails in the bindings tests:
make[7]: Entering directory '
/home/amd/xen/tools/ocaml/tests/bindings' rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.cmxs *.annot *.spot *.spit unix.cmxa -ccopt -L -ccopt ....
rm: invalid option -- 'c'
Try 'rm --help' for more information.Split the compiler flags out of the LIBS variable, since LIBS is passed to rm. The individual *.cxma files are deleted in their respective directories.
Fixes d97847e858f1 ("tools/ocaml: Gitlab CI test for bindings")Signed-off-by Jason Andryuk <[email protected]>
Quoted 7 lines
Quoted 3 lines
Lovely... Sorry for breaking this.
Acked-by Andrew Cooper <[email protected]>Thanks. I just double checked and unix.cmxa isn't in the directory on a successful build. So the whole thing could be moved to LIBFLAGS or a suitable name.
Unix is from the Ocaml standard library, but you still have to name it to get an executable out at the end.
I cribbed this all from tools/ocaml/xenstored/Makefile attempting to simplify it as I went. What's not clear is why LIBS is a special name.
~Andrew
Quoted 16 lines · Jason Andryuk
Quoted 15 lines · Andrew Cooper
Quoted 13 lines · Jason Andryuk
make clean fails in the bindings tests:
make[7]: Entering directory '
/home/amd/xen/tools/ocaml/tests/bindings'
rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.cmxs *.annot *.spot *.spit unix.cmxa -ccopt -L -ccopt ....
rm: invalid option -- 'c'
Try 'rm --help' for more information.Split the compiler flags out of the LIBS variable, since LIBS is passed to rm. The individual *.cxma files are deleted in their respective directories.
Fixes d97847e858f1 ("tools/ocaml: Gitlab CI test for bindings")Signed-off-by Jason Andryuk <[email protected]>
Quoted 8 lines
Quoted 3 lines
Lovely... Sorry for breaking this.
Acked-by Andrew Cooper <[email protected]>Thanks. I just double checked and unix.cmxa isn't in the directory on a successful build. So the whole thing could be moved to LIBFLAGS or a suitable name.
Regards,
Jason
Could we follow tools/ocaml/xenstored/Makefile further and move to BINDINGSLIBS or something like that?
Quoted 28 lines · Andrii Sultanov
Quoted 26 lines · Jason Andryuk
Quoted 14 lines · Andrew Cooper
Quoted 13 lines · Jason Andryuk
make clean fails in the bindings tests:
make[7]: Entering directory '
/home/amd/xen/tools/ocaml/tests/bindings' rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.cmxs *.annot *.spot *.spit unix.cmxa -ccopt -L -ccopt ....
rm: invalid option -- 'c'
Try 'rm --help' for more information.Split the compiler flags out of the LIBS variable, since LIBS is passed
to rm. The individual *.cxma files are deleted in their respective directories.Quoted 6 lines
Quoted 2 lines
Fixes d97847e858f1 ("tools/ocaml: Gitlab CI test for bindings")Signed-off-by Jason Andryuk <[email protected]>Lovely... Sorry for breaking this.
Acked-by Andrew Cooper <[email protected]>Thanks. I just double checked and unix.cmxa isn't in the directory on a successful build. So the whole thing could be moved to LIBFLAGS or a suitable name.
Quoted 6 lines
Quoted 2 lines
Regards,
JasonCould we follow
tools/ocaml/xenstored/Makefilefurther and move to BINDINGSLIBS or something like that?
Yeah, lets do that. It keeps it firmly away from variable names which have common meanings.
I'll fix up on commit.
~Andrew