Created
December 15, 2016 14:56
-
-
Save thatseeyou/e4affa92507ac7714bb1fa8954ea4b89 to your computer and use it in GitHub Desktop.
JXA용 Makefile: src 디렉토리의 소스를 build 디렉토리로 컴파일
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
COMPILE.scpt = osacompile -l JavaScript | |
SRCDIR = src | |
DSTDIR = build | |
SRCS = $(wildcard $(SRCDIR)/*.scpt) | |
DSTS = $(patsubst $(SRCDIR)/%,$(DSTDIR)/%,$(SRCS)) | |
# pseudo target | |
CLEAN_DSTS = $(patsubst $(DSTDIR)/%,clean/%,$(wildcard $(DSTDIR)/*.scpt)) | |
$(DSTDIR)/%.scpt: $(SRCDIR)/%.scpt | |
$(COMPILE.scpt) -o '$@' '$<' | |
clean/%.scpt: $(DSTDIR)/%.scpt | |
rm -- "$<" | |
.PHONY: all clean | |
all: $(DSTS) | |
clean: $(CLEAN_DSTS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment