summaryrefslogtreecommitdiff
path: root/build/mkmyocamlbuild_config.sh
blob: 9c7eebd3c3ef35279cd4b6925fbe044d4a4dd64a (plain)
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
#!/bin/sh

#########################################################################
#                                                                       #
#                            Objective Caml                             #
#                                                                       #
#       Nicolas Pouillard, projet Gallium, INRIA Rocquencourt           #
#                                                                       #
#   Copyright 2007 Institut National de Recherche en Informatique et    #
#   en Automatique.  All rights reserved.  This file is distributed     #
#   under the terms of the Q Public License version 1.0.                #
#                                                                       #
#########################################################################

# $Id$

cd `dirname $0`/..

sed \
    -e 's/^.*FLEXDIR.*$//g' \
    -e 's/^#ml \(.*\)/\1/' \
    -e 's/^\([^"][^"]*\("[^"]*"[^"]*\)*\)#.*$/\1/' \
    -e 's/^\(#.*\)$/(* \1 *)/' \
    -e 's/^\(.*\$([0-9]).*\)$/(* \1 *)/' \
    -e 's/^\([^(=]*\)=\([^"]*\)$/let <:lower<\1>> = "\2";;/' \
    -e 's/\$(AS)/as/g' \
    -e 's/\$(\([^)]*\))/"\^<:lower<\1>>\^"/g' \
    -e 's/""\^//g' \
    -e 's/\^""//g' \
    -e 's/^let <:lower<MAKE.*$//g' \
    -e 's/^let <:lower<DO.*$//g' \
    -e 's/"true"/true/g' \
    -e 's/"false"/false/g' \
    config/Makefile \
    | sed -f build/tolower.sed \
    | sed -f build/tolower.sed \
    | sed -f build/tolower.sed \
    | sed -f build/tolower.sed \
    | sed -f build/tolower.sed \
    | sed -f build/tolower.sed \
    > myocamlbuild_config.ml