Created
January 25, 2020 22:52
-
-
Save quinnjr/644f654f3318f76c66e1c4644ee10f7c to your computer and use it in GitHub Desktop.
A generic, not-perfect F# compilation Makefile
This file contains hidden or 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
# Copyright (C) Joseph R. Quinn 2020 | |
# SPDX-License-Identifier: ISC | |
ifeq ($(OS),"Windows_NT") | |
FSC := $(shell where fsc) | |
else | |
FSC := $(shell which fsharpc) | |
endif | |
input := $(shell find . -type f -name "*.fs") | |
output := $(input:.fs=) | |
.PHONY: build clean | |
build: $(output) | |
$(output): $(input) | |
$(FSC) --nologo --target:exe --out:$@ $(@:%=%.fs) | |
clean: | |
$(foreach executable, $(input:%.fs=%), $(RM) $(executable)) | |
$(foreach dll, $(shell find . -type f -name "FSharp.Core.dll"), $(RM) $(dll)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment