summaryrefslogtreecommitdiff
path: root/asmcomp/dune
blob: 5ba763d58a1d93d4fe702aa9783109e53f3c4ed2 (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
42
;**************************************************************************
;*                                                                        *
;*                                 OCaml                                  *
;*                                                                        *
;*                     Thomas Refis, Jane Street Europe                   *
;*                                                                        *
;*   Copyright 2018 Jane Street Group LLC                                 *
;*                                                                        *
;*   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.          *
;*                                                                        *
;**************************************************************************

(rule
 (targets arch.ml CSE.ml proc.ml reload.ml scheduling.ml selection.ml)
 (mode    fallback)
 (deps    (:conf ../Makefile.config)
          (glob_files amd64/*.ml)
          (glob_files arm64/*.ml)
          (glob_files power/*.ml)
          (glob_files riscv/*.ml)
          (glob_files s390x/*.ml))
 (action  (bash "cp `grep '^ARCH=' %{conf} | cut -d'=' -f2`/*.ml .")))

(rule
 (targets emit.ml)
 (mode    fallback)
 (deps    (:conf ../Makefile.config)
          amd64/emit.mlp
          arm64/emit.mlp
          power/emit.mlp
          riscv/emit.mlp
          s390x/emit.mlp)
 (action
   (progn
     (with-stdout-to contains-input-name
       (bash "echo `grep '^ARCH=' %{conf} | cut -d'=' -f2`/emit.mlp"))
     (with-stdout-to %{targets}
       (progn
         (bash "echo \\# 1 \\\"`cat contains-input-name`\\\"")
         (bash "%{dep:../tools/cvt_emit.exe} < `cat contains-input-name`"))))))