ocaml/asmcomp/dune

45 lines
1.9 KiB
Plaintext

;**************************************************************************
;* *
;* 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 arm/*.ml)
(glob_files arm64/*.ml)
(glob_files i386/*.ml)
(glob_files power/*.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
arm/emit.mlp
arm64/emit.mlp
i386/emit.mlp
power/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`"))))))