Backport from sid to buster
[hcoop/debian/mlton.git] / mlnlffigen / Makefile
1 ## Copyright (C) 2018 Matthew Fluet
2 # Copyright (C) 2005-2009 Henry Cejtin, Matthew Fluet, Suresh
3 # Jagannathan, and Stephen Weeks.
4 #
5 # MLton is released under a BSD-style license.
6 # See the file MLton-LICENSE for details.
7 ##
8
9 MLTON_RUNTIME_ARGS :=
10 MLTON_COMPILE_ARGS :=
11
12 ######################################################################
13 ######################################################################
14
15 SRC := $(shell cd .. && pwd)
16 BUILD := $(SRC)/build
17 BIN := $(BUILD)/bin
18
19 PATH := $(BIN):$(shell echo $$PATH)
20
21 TARGET := self
22
23 ######################################################################
24
25 MLTON := mlton
26 NAME := mlnlffigen
27
28 all: $(NAME)
29
30 $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
31 @echo 'Compiling $(NAME)'
32 "$(MLTON)" @MLton $(MLTON_RUNTIME_ARGS) -- $(MLTON_COMPILE_ARGS) -target $(TARGET) $(NAME).mlb
33
34 .PHONY: clean
35 clean:
36 ../bin/clean
37
38
39 cppcmd.sml : gen-cppcmd
40 ./gen-cppcmd > $@