Skip to content

Instantly share code, notes, and snippets.

@thatseeyou
Created December 15, 2016 14:56
Show Gist options
  • Save thatseeyou/e4affa92507ac7714bb1fa8954ea4b89 to your computer and use it in GitHub Desktop.
Save thatseeyou/e4affa92507ac7714bb1fa8954ea4b89 to your computer and use it in GitHub Desktop.
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