diff options
author | Nicolás Ojeda Bär <n.oje.bar@gmail.com> | 2022-07-01 18:03:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-01 18:03:41 +0200 |
commit | e3e08db042e1639beb5ec6e1351bdd55f9639da0 (patch) | |
tree | 89039b538619bd40ea22565c79ac5dab777091bd | |
parent | 110c6a3c20a314709142a19b440f8b52115ac4db (diff) | |
download | ocaml-e3e08db042e1639beb5ec6e1351bdd55f9639da0.tar.gz |
Add META files (#11007)
-rw-r--r-- | .gitattributes | 1 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Changes | 6 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | compilerlibs/META | 43 | ||||
-rwxr-xr-x | configure | 10 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | ocamldoc/META | 4 | ||||
-rw-r--r-- | ocamldoc/Makefile | 2 | ||||
-rw-r--r-- | otherlibs/Makefile.otherlibs.common | 2 | ||||
-rw-r--r-- | otherlibs/dynlink/META.in | 6 | ||||
-rw-r--r-- | otherlibs/dynlink/Makefile | 3 | ||||
-rw-r--r-- | otherlibs/runtime_events/META | 7 | ||||
-rw-r--r-- | otherlibs/str/META | 7 | ||||
-rw-r--r-- | otherlibs/systhreads/META | 19 | ||||
-rw-r--r-- | otherlibs/systhreads/Makefile | 2 | ||||
-rw-r--r-- | otherlibs/unix/META | 7 | ||||
-rw-r--r-- | stdlib/META | 3 | ||||
-rw-r--r-- | stdlib/Makefile | 4 |
19 files changed, 129 insertions, 5 deletions
diff --git a/.gitattributes b/.gitattributes index 260cdd1514..ddb7a1af55 100644 --- a/.gitattributes +++ b/.gitattributes @@ -50,6 +50,7 @@ VERSION typo.missing-header api_docgen/*.mld typo.missing-header api_docgen/alldoc.tex typo.missing-header tools/mantis2gh_stripped.csv typo.missing-header +META typo.missing-header *.adoc typo.long-line=may typo.very-long-line=may diff --git a/.gitignore b/.gitignore index 29389d3f84..2bfe2eb935 100644 --- a/.gitignore +++ b/.gitignore @@ -135,6 +135,7 @@ _build /otherlibs/*/.dep /otherlibs/dynlink/extract_crc +/otherlibs/dynlink/META /otherlibs/dynlink/dynlink_platform_intf.mli /otherlibs/dynlink/byte/dynlink.mli /otherlibs/dynlink/native/dynlink.mli @@ -317,6 +317,12 @@ OCaml 5.0 from +compiler-libs, as the debugger does. (David Allsopp, review by Sébastien Hinderer) +- #11007: META files for the stdlib, compiler-libs and other libraries (unix, + dynlink, str, runtime_events, threads, ocamldoc) are now installed along with + the compiler. + (David Allsopp, Florian Angeletti, Nicolás Ojeda Bär and Sébastien Hinderer, + review by Daniel Bünzli, Kate Deplaix, Anil Madhavapeddy and Gabriel Scherer) + ### Build system: * #10893: Remove configuration options --disable-force-safe-string and @@ -1467,7 +1467,7 @@ ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" "$(INSTALL_COMPLIBDIR)" endif $(INSTALL_DATA) \ - compilerlibs/*.cma \ + compilerlibs/*.cma compilerlibs/META \ "$(INSTALL_COMPLIBDIR)" $(INSTALL_DATA) \ $(BYTESTART) $(TOPLEVELSTART) \ diff --git a/compilerlibs/META b/compilerlibs/META new file mode 100644 index 0000000000..b99237b5f2 --- /dev/null +++ b/compilerlibs/META @@ -0,0 +1,43 @@ +version = "[distributed with OCaml]" +description = "compiler-libs support library" +directory= "+compiler-libs" + +package "common" ( + requires = "compiler-libs" + version = "[distributed with OCaml]" + description = "Common compiler routines" + archive(byte) = "ocamlcommon.cma" + archive(native) = "ocamlcommon.cmxa" +) + +package "bytecomp" ( + requires = "compiler-libs.common" + version = "[distributed with OCaml]" + description = "Bytecode compiler" + archive(byte) = "ocamlbytecomp.cma" + archive(native) = "ocamlbytecomp.cmxa" +) + +package "optcomp" ( + requires = "compiler-libs.common" + version = "[distributed with OCaml]" + description = "Native-code compiler" + archive(byte) = "ocamloptcomp.cma" + archive(native) = "ocamloptcomp.cmxa" + exists_if = "ocamloptcomp.cma" +) + +package "toplevel" ( + requires = "compiler-libs.bytecomp" + version = "[distributed with OCaml]" + description = "Toplevel interactions" + archive(byte) = "ocamltoplevel.cma" +) + +package "native-toplevel" ( + requires = "compiler-libs.optcomp dynlink" + version = "[distributed with OCaml]" + description = "Toplevel interactions" + archive(native) = "ocamltoplevel.cmxa" + exists_if = "ocamltoplevel.cmxa" +) @@ -794,6 +794,7 @@ instrumented_runtime_libs instrumented_runtime debug_runtime cmxs +natdynlink_archive natdynlinkopts natdynlink supports_shared_libraries @@ -2930,6 +2931,7 @@ OCAML_VERSION_SHORT=5.1 + # TODO: rename this variable @@ -2975,6 +2977,8 @@ ac_config_files="$ac_config_files Makefile.config" ac_config_files="$ac_config_files stdlib/sys.ml" +ac_config_files="$ac_config_files otherlibs/dynlink/META" + ac_config_files="$ac_config_files manual/src/version.tex" ac_config_files="$ac_config_files manual/src/html_processing/src/common.ml" @@ -14467,6 +14471,11 @@ if $natdynlink; then : else cmxs="cmx" fi +if $natdynlink; then : + natdynlink_archive="dynlink.cmxa" +else + natdynlink_archive="" +fi cat >>confdefs.h <<_ACEOF #define OCAML_OS_TYPE "$ostype" @@ -19281,6 +19290,7 @@ do "Makefile.build_config") CONFIG_FILES="$CONFIG_FILES Makefile.build_config" ;; "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; "stdlib/sys.ml") CONFIG_FILES="$CONFIG_FILES stdlib/sys.ml" ;; + "otherlibs/dynlink/META") CONFIG_FILES="$CONFIG_FILES otherlibs/dynlink/META" ;; "manual/src/version.tex") CONFIG_FILES="$CONFIG_FILES manual/src/version.tex" ;; "manual/src/html_processing/src/common.ml") CONFIG_FILES="$CONFIG_FILES manual/src/html_processing/src/common.ml" ;; "runtime/caml/m.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/m.h" ;; diff --git a/configure.ac b/configure.ac index 59aabefb2f..d988aa342a 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,7 @@ AC_SUBST([mklib]) AC_SUBST([supports_shared_libraries]) AC_SUBST([natdynlink]) AC_SUBST([natdynlinkopts]) +AC_SUBST([natdynlink_archive]) AC_SUBST([cmxs]) AC_SUBST([debug_runtime]) AC_SUBST([instrumented_runtime]) @@ -180,6 +181,7 @@ AC_SUBST([QS]) AC_CONFIG_FILES([Makefile.build_config]) AC_CONFIG_FILES([Makefile.config]) AC_CONFIG_FILES([stdlib/sys.ml]) +AC_CONFIG_FILES([otherlibs/dynlink/META]) AC_CONFIG_FILES([manual/src/version.tex]) AC_CONFIG_FILES([manual/src/html_processing/src/common.ml]) AC_CONFIG_HEADERS([runtime/caml/m.h]) @@ -1204,6 +1206,9 @@ AS_IF([$native_compiler], AS_IF([! $native_compiler], [natdynlink=false]) AS_IF([$natdynlink], [cmxs="cmxs"], [cmxs="cmx"]) +AS_IF([$natdynlink], + [natdynlink_archive="dynlink.cmxa"], + [natdynlink_archive=""]) AC_DEFINE_UNQUOTED([OCAML_OS_TYPE], ["$ostype"]) diff --git a/ocamldoc/META b/ocamldoc/META new file mode 100644 index 0000000000..5cb3dd40bd --- /dev/null +++ b/ocamldoc/META @@ -0,0 +1,4 @@ +requires = "compiler-libs" +version = "[distributed with OCaml]" +description = "ocamldoc plugin interface" +directory= "+ocamldoc" diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile index 5f5c9493be..a74aa2dcea 100644 --- a/ocamldoc/Makefile +++ b/ocamldoc/Makefile @@ -220,7 +220,7 @@ install: $(MKDIR) "$(INSTALL_LIBDIR)/ocamldoc" $(INSTALL_PROG) $(OCAMLDOC) "$(INSTALL_BINDIR)" $(INSTALL_DATA) \ - ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) \ + ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) META \ "$(INSTALL_LIBDIR)/ocamldoc" $(INSTALL_DATA) \ $(OCAMLDOC_LIBCMIS) \ diff --git a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common index bccbff6763..27861e0e9c 100644 --- a/otherlibs/Makefile.otherlibs.common +++ b/otherlibs/Makefile.otherlibs.common @@ -103,7 +103,7 @@ endif $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).cmxs $(LIBNAME).$(A)) $(MKDIR) "$(INSTALL_LIBDIR_LIBNAME)" $(INSTALL_DATA) \ - $(LIBNAME).cma $(CMIFILES) \ + $(LIBNAME).cma $(CMIFILES) META \ "$(INSTALL_LIBDIR_LIBNAME)/" ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" $(INSTALL_DATA) \ diff --git a/otherlibs/dynlink/META.in b/otherlibs/dynlink/META.in new file mode 100644 index 0000000000..e8d1c2d811 --- /dev/null +++ b/otherlibs/dynlink/META.in @@ -0,0 +1,6 @@ +# @configure_input@ +version = "[distributed with OCaml]" +description = "Dynamic loading and linking of object files" +directory = "+dynlink" +archive(byte) = "dynlink.cma" +archive(native) = "@natdynlink_archive@" diff --git a/otherlibs/dynlink/Makefile b/otherlibs/dynlink/Makefile index b51df69866..5a1cf43026 100644 --- a/otherlibs/dynlink/Makefile +++ b/otherlibs/dynlink/Makefile @@ -251,7 +251,7 @@ install: $(addprefix "$(INSTALL_LIBDIR)/", $(notdir $(NATOBJS))) $(MKDIR) "$(INSTALL_LIBDIR_DYNLINK)" $(INSTALL_DATA) \ - dynlink.cmi dynlink.cma \ + dynlink.cmi dynlink.cma META \ "$(INSTALL_LIBDIR_DYNLINK)" ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" $(INSTALL_DATA) \ @@ -281,6 +281,7 @@ clean: partialclean .PHONY: distclean distclean: clean + rm -f META .PHONY: beforedepend beforedepend: dynlink_platform_intf.mli diff --git a/otherlibs/runtime_events/META b/otherlibs/runtime_events/META new file mode 100644 index 0000000000..a228b08fc7 --- /dev/null +++ b/otherlibs/runtime_events/META @@ -0,0 +1,7 @@ +description = "Ring buffer-based runtime tracing" +version = "[distributed with OCaml]" +directory = "+runtime_events" +archive(byte) = "runtime_events.cma" +archive(native) = "runtime_events.cmxa" +plugin(byte) = "runtime_events.cma" +plugin(native) = "runtime_events.cmxs" diff --git a/otherlibs/str/META b/otherlibs/str/META new file mode 100644 index 0000000000..082a78d4f7 --- /dev/null +++ b/otherlibs/str/META @@ -0,0 +1,7 @@ +description = "Regular expressions and string processing" +version = "[distributed with OCaml]" +directory = "+str" +archive(byte) = "str.cma" +archive(native) = "str.cmxa" +plugin(byte) = "str.cma" +plugin(native) = "str.cmxs" diff --git a/otherlibs/systhreads/META b/otherlibs/systhreads/META new file mode 100644 index 0000000000..909b65f3e1 --- /dev/null +++ b/otherlibs/systhreads/META @@ -0,0 +1,19 @@ +version = "[distributed with OCaml]" +description = "Multi-threading" +requires(mt,mt_posix) = "threads.posix" +directory = "+" +type_of_threads = "posix" + +package "posix" ( + requires = "unix" + directory = "+threads" + exists_if = "threads.cma" + archive(byte,mt,mt_posix) = "threads.cma" + archive(native,mt,mt_posix) = "threads.cmxa" + version = "[internal]" +) + +package "none" ( + error = "threading is not supported on this platform" + version = "[internal]" +) diff --git a/otherlibs/systhreads/Makefile b/otherlibs/systhreads/Makefile index f7efed57bc..8f1f4f212c 100644 --- a/otherlibs/systhreads/Makefile +++ b/otherlibs/systhreads/Makefile @@ -121,7 +121,7 @@ install: $(INSTALL_DATA) libthreads.$(A) "$(INSTALL_LIBDIR)" $(MKDIR) "$(INSTALL_THREADSLIBDIR)" $(INSTALL_DATA) \ - $(CMIFILES) threads.cma \ + $(CMIFILES) threads.cma META \ "$(INSTALL_THREADSLIBDIR)" ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" $(INSTALL_DATA) \ diff --git a/otherlibs/unix/META b/otherlibs/unix/META new file mode 100644 index 0000000000..2924e9081a --- /dev/null +++ b/otherlibs/unix/META @@ -0,0 +1,7 @@ +description = "Unix system calls" +version = "[distributed with OCaml]" +directory = "+unix" +archive(byte) = "unix.cma" +archive(native) = "unix.cmxa" +plugin(byte) = "unix.cma" +plugin(native) = "unix.cmxs" diff --git a/stdlib/META b/stdlib/META new file mode 100644 index 0000000000..f137d522b8 --- /dev/null +++ b/stdlib/META @@ -0,0 +1,3 @@ +description = "Standard library" +version = "[distributed with OCaml]" +directory = "+" diff --git a/stdlib/Makefile b/stdlib/Makefile index 240ba9f8e5..ebc20a2ac4 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -65,10 +65,14 @@ install:: exit 1; \ fi +INSTALL_STDLIB_META_DIR=$(DESTDIR)$(LIBDIR)/stdlib + install:: $(INSTALL_DATA) \ stdlib.cma std_exit.cmo *.cmi camlheader_ur \ "$(INSTALL_LIBDIR)" + $(MKDIR) "$(INSTALL_STDLIB_META_DIR)" + $(INSTALL_DATA) META "$(INSTALL_STDLIB_META_DIR)" ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" $(INSTALL_DATA) \ *.cmt *.cmti *.mli *.ml *.ml.in \ |