This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the downloading of extra mlton sml lib as part of build process
- Loading branch information
Paul H. Liu
committed
Apr 11, 2017
1 parent
67999f6
commit de4ab2e
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MLTON_SRC_URL="https://sourceforge.net/projects/mlton/files/mlton/20130715/mlton-20130715.src.tgz/download" | ||
MLTON_BIN=$(shell which mlton) | ||
MLTON_LIBDIR=$(abspath $(dir $(MLTON_BIN))/../lib/mlton/sml) | ||
DIR_LIST=basis ckit-lib cml mllpt-lib mlnlffi-lib mlrisc-lib mlyacc-lib smlnj-lib | ||
|
||
mlb-path-map: mlton $(DIR_LIST) | ||
@echo "MLTON_ROOT $(shell pwd)" > mlb-path-map | ||
@echo "SML_LIB $(shell pwd)" >> mlb-path-map | ||
|
||
./mlton: | ||
@echo Downloading mlton source and extract its directory lib/mlton to ./mlton. | ||
curl -L $(MLTON_SRC_URL)|tar zxf - mlton-20130715/lib/mlton --strip-components=2 | ||
|
||
$(DIR_LIST): | ||
@echo linking $@ from system mlton installation to ./$@ | ||
@ln -s "$(MLTON_LIBDIR)/$@" . | ||
|
||
clean: | ||
rm -f $(DIR_LIST) | ||
|
||
cleanall: clean | ||
rm -rf mlton |