1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
#**************************************************************************
#* *
#* OCaml *
#* *
#* Florian Angeletti, projet Cambium, Inria Paris *
#* *
#* Copyright 2020 Institut National de Recherche en Informatique et *
#* en Automatique. *
#* *
#* All rights reserved. This file is distributed under the terms of *
#* the GNU Lesser General Public License version 2.1, with the *
#* special exception on linking described in the file LICENSE. *
#* *
#**************************************************************************
# Capitalize first letter of argument
define up
$(shell echo $(1) | cut -c1 | tr '[:lower:]' '[:upper:]')
endef
define capitalize_one
$(call up,$(1))$(shell echo $(1) | cut -c2-)
endef
define capitalize
$(foreach m,$(1),$(call capitalize_one,$m))
endef
runtime_events_MLIS := runtime_events.mli
str_MLIS := str.mli
unix_MLIS := unix.mli unixLabels.mli
dynlink_MLIS := dynlink.mli
thread_MLIS := \
thread.mli event.mli
STDLIB=$(STDLIB_MODULES)
stdlib_UNPREFIXED=$(STDLIB_MODULE_BASENAMES)
otherlibref := $(dynlink_MLIS:%.mli=%)
ifeq "$(lib_str)" "true"
otherlibref += $(str_MLIS:%.mli=%)
endif
ifeq "$(lib_unix)" "true"
otherlibref += $(unix_MLIS:%.mli=%)
endif
ifeq "$(lib_systhreads)" "true"
otherlibref += $(thread_MLIS:%.mli=%)
endif
ifeq "$(lib_runtime_events)" "true"
otherlibref += $(runtime_events_MLIS:%.mli=%)
endif
libref_TEXT=Ocaml_operators Format_tutorial
libref_C=$(call capitalize,$(libref))
PARSING_MLIS := $(notdir $(wildcard $(ROOTDIR)/parsing/*.mli))
UTILS_MLIS := $(notdir $(wildcard $(ROOTDIR)/utils/*.mli))
DRIVER_MLIS := pparse.mli
compilerlibref_MLIS= \
$(PARSING_MLIS) \
$(UTILS_MLIS) \
$(DRIVER_MLIS)
compilerlibref=$(compilerlibref_MLIS:%.mli=%)
compilerlibref_TEXT=Compiler_libs
compilerlibref_C=$(call capitalize,$(compilerlibref))
ALL_LIBREF= \
$(sort $(libref_TEXT:%=libref/%)) \
$(sort $(filter-out libref/camlinternal%, $(libref:%=libref/%))) \
$(sort $(filter libref/camlinternal%, $(libref:%=libref/%)))
ALL_COMPILERLIBREF= \
$(compilerlibref_TEXT:%=compilerlibref/%) \
$(compilerlibref:%=compilerlibref/%)
# Note that the output of $(wildcard ...) is sorted alphabetically.
# The compilerlibs index will be thus be sorted first by category:
# - text documentation
# - parsing modules
# - utils modules
# - driver modules
# And then alphabetically inside each category.
ALL_DOC= $(ALL_LIBREF) $(ALL_COMPILERLIBREF)
|