| 1 |
# Makefile |
| 2 |
# |
| 3 |
# COPYRIGHT (c) 2009 The Fellowship of SML/NJ (http://www.smlnj.org) |
| 4 |
# All rights reserved. |
| 5 |
# |
| 6 |
# Makefile for building ml-ulex using MLton |
| 7 |
# |
| 8 |
|
| 9 |
SHELL = /bin/sh |
| 10 |
|
| 11 |
MLTON = mlton |
| 12 |
MLTON_FLAGS = |
| 13 |
|
| 14 |
TARGET = mlulex |
| 15 |
|
| 16 |
SML_BE = BackEnds/SML |
| 17 |
|
| 18 |
TEMPLATES = $(SML_BE)/string-template-ml-lex.sml \ |
| 19 |
$(SML_BE)/string-template-ml-ulex.sml |
| 20 |
|
| 21 |
SML_FILES = |
| 22 |
|
| 23 |
MLB_FILES = ../common/lpt-common.mlb \ |
| 24 |
../lib/ml-lpt-lib.mlb \ |
| 25 |
$(TARGET).mlb |
| 26 |
|
| 27 |
$(TARGET) : $(MLB_FILES) $(SML_FILES) $(TEMPLATES) |
| 28 |
$(MLTON) -output $(TARGET) $(MLTON_FLAGS) $(TARGET).mlb |
| 29 |
|
| 30 |
# a generator for the template string files |
| 31 |
# |
| 32 |
GEN = ../gen/gen-template-struct |
| 33 |
|
| 34 |
$(GEN): |
| 35 |
(cd ../gen; make gen-template-struct) |
| 36 |
|
| 37 |
$(SML_BE)/string-template-ml-lex.sml: $(GEN) $(SML_BE)/template-ml-lex.sml |
| 38 |
$(GEN) LexTemplate $(SML_BE)/template-ml-lex.sml $(SML_BE)/string-template-ml-lex.sml |
| 39 |
|
| 40 |
$(SML_BE)/string-template-ml-ulex.sml: $(GEN) $(SML_BE)/template-ml-ulex.sml |
| 41 |
$(GEN) ULexTemplate $(SML_BE)/template-ml-ulex.sml $(SML_BE)/string-template-ml-ulex.sml |
| 42 |
|
| 43 |
.PHONEY: clean |
| 44 |
clean: |
| 45 |
rm -f $(TARGET) |
| 46 |
rm -f $(TEMPLATES) |
| 47 |
(cd ../gen; make clean) |