| 1 |
# -*- Makefile -*- |
| 2 |
|
| 3 |
#************************************************************************** |
| 4 |
#* * |
| 5 |
#* OCaml * |
| 6 |
#* * |
| 7 |
#* Xavier Leroy, projet Cristal, INRIA Rocquencourt * |
| 8 |
#* * |
| 9 |
#* Copyright 2002 Institut National de Recherche en Informatique et * |
| 10 |
#* en Automatique. * |
| 11 |
#* * |
| 12 |
#* All rights reserved. This file is distributed under the terms of * |
| 13 |
#* the GNU Lesser General Public License version 2.1, with the * |
| 14 |
#* special exception on linking described in the file LICENSE. * |
| 15 |
#* * |
| 16 |
#************************************************************************** |
| 17 |
|
| 18 |
# This file should be included after Makefile.common |
| 19 |
|
| 20 |
# This file lists all standard library modules. It is used by: |
| 21 |
# 1. stdlib/Makefile when building stdlib.cma |
| 22 |
# 2. Makefile to expunge the toplevels |
| 23 |
# 3. api_docgen/Makefile.docfiles to compute all documentation files which need |
| 24 |
# need to be generated for the stdlib |
| 25 |
|
| 26 |
# Three variables are exported: |
| 27 |
# $(STDLIB_MODULE_BASENAMES) - basenames, in dependency order, of the modules in |
| 28 |
# the stdlib |
| 29 |
# $(STDLIB_PREFIXED_MODULES) - just the namespaced modules of |
| 30 |
# $(STDLIB_MODULE_BASENAMES), i.e. without camlinternal* and stdlib. Used in |
| 31 |
# stdlib/Makefile to munge the dependencies. |
| 32 |
# $(STDLIB_MODULES) - full list, in prefixed form as appropriate. |
| 33 |
|
| 34 |
# Basenames of the source files for the standard library (i.e. unprefixed and |
| 35 |
# with lowercase first letters). These must be listed in dependency order. |
| 36 |
STDLIB_MODULE_BASENAMES = \ |
| 37 |
camlinternalFormatBasics \ |
| 38 |
stdlib \ |
| 39 |
either \ |
| 40 |
sys \ |
| 41 |
obj \ |
| 42 |
type \ |
| 43 |
atomic \ |
| 44 |
camlinternalLazy \ |
| 45 |
lazy \ |
| 46 |
seq \ |
| 47 |
option \ |
| 48 |
pair \ |
| 49 |
result \ |
| 50 |
bool \ |
| 51 |
char \ |
| 52 |
uchar \ |
| 53 |
list \ |
| 54 |
int \ |
| 55 |
array \ |
| 56 |
iarray \ |
| 57 |
bytes \ |
| 58 |
string \ |
| 59 |
unit \ |
| 60 |
marshal \ |
| 61 |
float \ |
| 62 |
int32 \ |
| 63 |
int64 \ |
| 64 |
nativeint \ |
| 65 |
lexing \ |
| 66 |
parsing \ |
| 67 |
repr \ |
| 68 |
set \ |
| 69 |
map \ |
| 70 |
stack \ |
| 71 |
queue \ |
| 72 |
buffer \ |
| 73 |
mutex \ |
| 74 |
condition \ |
| 75 |
semaphore \ |
| 76 |
domain \ |
| 77 |
camlinternalFormat \ |
| 78 |
printf \ |
| 79 |
arg \ |
| 80 |
printexc \ |
| 81 |
fun \ |
| 82 |
gc \ |
| 83 |
in_channel \ |
| 84 |
out_channel \ |
| 85 |
digest \ |
| 86 |
bigarray \ |
| 87 |
random \ |
| 88 |
hashtbl \ |
| 89 |
weak \ |
| 90 |
format \ |
| 91 |
scanf \ |
| 92 |
callback \ |
| 93 |
camlinternalOO \ |
| 94 |
oo \ |
| 95 |
camlinternalMod \ |
| 96 |
dynarray \ |
| 97 |
pqueue \ |
| 98 |
ephemeron \ |
| 99 |
filename \ |
| 100 |
complex \ |
| 101 |
arrayLabels \ |
| 102 |
listLabels \ |
| 103 |
bytesLabels \ |
| 104 |
stringLabels \ |
| 105 |
moreLabels \ |
| 106 |
stdLabels \ |
| 107 |
effect |
| 108 |
|
| 109 |
STDLIB_PREFIXED_MODULES = \ |
| 110 |
$(filter-out stdlib camlinternal%, $(STDLIB_MODULE_BASENAMES)) |
| 111 |
|
| 112 |
# $(STDLIB_MODULES) applies the PREFIX_MODULE macro to each item in |
| 113 |
# $(STDLIB_MODULE_BASENAMES). For the names which require prefixing, this is |
| 114 |
# done using CAPITALIZE. CAPITALIZE is a recursive macro taking the name to |
| 115 |
# transform and a list of transformations to apply to the beginning of the name, |
| 116 |
# thus $(call CAPITALIZE, string, ... r R s S t T ...) expands to String. |
| 117 |
CAPITALIZE = \ |
| 118 |
$(strip $(if $(firstword $(2)), \ |
| 119 |
$(call CAPITALIZE, $(patsubst $(word 1, $(2))%, $(word 2, $(2))%, $(1)), \ |
| 120 |
$(wordlist 3, $(words $(2)), $(2))), \ |
| 121 |
$(1))) |
| 122 |
|
| 123 |
PREFIX_MODULE = \ |
| 124 |
$(if $(filter stdlib camlinternal%, $(1)), \ |
| 125 |
$(1), \ |
| 126 |
stdlib__$(call CAPITALIZE, $(1), \ |
| 127 |
a A b B c C d D e E f F g G h H i I j J k K l L m M \ |
| 128 |
n N o O p P q Q r R s S t T u U v V w W x X y Y z Z)) |
| 129 |
|
| 130 |
STDLIB_MODULES = $(strip \ |
| 131 |
$(foreach name, $(STDLIB_MODULE_BASENAMES), $(call PREFIX_MODULE, $(name)))) |