Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2016 14:56
What would you like to do?
JXA용 Makefile: src 디렉토리의 소스를 build 디렉토리로 컴파일
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