我的erlang的makefile模板

目前还不支持文件夹的遍历,只能一个一个写上去。

.SUFFIXES: .erl .beam

.erl.beam:
    erlc ${ERLC_FLAGS} $<

SOURCES = ${wildcard src/api/twitter/*.erl} ${wildcard src/ui/*.erl}
BINS = bin
INCLUDES = include
ERLC_FLAGS = -W -I ${INCLUDES} -o ${BINS}

all: compile

compile:  initDirs ${SOURCES:%.erl=%.beam}

initDirs:
    mkdir -p bin

test: compile
    erl -noshell -pa $(BINS) -s client test -s init stop
    • idanke
    • 2009 年 12 月 3 日 9:34下午

    干啥的啊,在哪用的。

      • kmlzkma
      • 2009 年 12 月 5 日 10:59上午

      自动化开发的,在linux下的shell上用。

  1. 尚無引用.