| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
ROOT := .. |
| 11 |
include $(ROOT)/Makefile.config |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
NAME := mllex |
| 16 |
|
| 17 |
all: $(NAME) |
| 18 |
|
| 19 |
$(NAME): $(shell $(MLBDEPS) $(NAME).mlb) |
| 20 |
@echo 'Compiling $(NAME)' |
| 21 |
"$(RUN_MLTON)" @MLton $(RUN_MLTON_RUNTIME_ARGS) -- $(RUN_MLTON_COMPILE_ARGS) -target $(TARGET) $(NAME).mlb |
| 22 |
|
| 23 |
$(eval $(MK_COMMON_GOALS)) |
| 24 |
|
| 25 |
PDFLATEX := pdflatex |
| 26 |
|
| 27 |
doc/mllex.pdf: |
| 28 |
$(MAKE) -C doc mllex.pdf |
| 29 |
|
| 30 |
mllex.pdf: doc/mllex.pdf |
| 31 |
$(CP) doc/mllex.pdf mllex.pdf |
| 32 |
|
| 33 |
DOCS := |
| 34 |
ifeq (true, $(call HAVE_CMD,$(PDFLATEX))) |
| 35 |
DOCS += mllex.pdf |
| 36 |
endif |
| 37 |
|
| 38 |
.PHONY: docs |
| 39 |
docs: $(DOCS) |
| 40 |
|
| 41 |
|
| 42 |
.PHONY: test |
| 43 |
test: $(NAME) |
| 44 |
$(CP) ../mlton/front-end/ml.lex . \ |
| 45 |
$(NAME) ml.lex && \ |
| 46 |
$(DIFF) ml.lex.sml ../mlton/front-end/ml.lex.sml \ |
| 47 |
$(RM) ml.lex ml.lex.sml |