Hi,<br><br>I prefer to use emakefiles and the OTP make utility. It's very simple but most of the times good enough. Check it out here:<br><a href="http://erlang.org/doc/man/make.html">http://erlang.org/doc/man/make.html</a><br>
<br>Cheers!<br>Adam<br>--<br>Adam Lindberg<br><a href="http://www.erlang-consulting.com">http://www.erlang-consulting.com</a><br>(Erlang Community: <a href="http://www.trapexit.org">http://www.trapexit.org</a>)<br><br><div class="gmail_quote">
On Thu, Feb 28, 2008 at 2:15 PM, Dave Rafkind <<a href="mailto:dave.rafkind@gmail.com">dave.rafkind@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Alexander Lamb wrote:<br>
<br>
> What are the various strategies to manage your build / run or build /<br>
> deploy cycles?<br>
><br>
<br>
</div>There is an interesting add-on for SCons here:<br>
<a href="http://pupeno.com/software/scons-erlang/" target="_blank">http://pupeno.com/software/scons-erlang/</a><br>
<br>
<br>
However one day I thought I'd obsolete Make with a bash script (assumes<br>
code in esrc and binaries in ebin):<br>
<br>
<br>
#!/bin/bash<br>
<br>
ERLC=erlc<br>
SOURCE_ROOT=esrc<br>
DEST_ROOT=ebin<br>
# collect source directories<br>
for SOURCE_DIR in `find -L $SOURCE_ROOT -type d`; do<br>
SOURCE_INCLUDES="$SOURCE_INCLUDES -I $SOURCE_DIR"<br>
done<br>
<br>
COMPILE="$ERLC $SOURCE_INCLUDES"<br>
<br>
mkdir -p $DEST_ROOT<br>
<br>
for SOURCE_TARGET in `find -L $SOURCE_ROOT -name "*.erl"`; do<br>
DEST_TARGET=${DEST_ROOT}/${SOURCE_TARGET#*/}<br>
DEST_TARGET=${DEST_TARGET%.erl}.beam<br>
DEST_PATH=${DEST_TARGET%/*}<br>
<br>
mkdir -p $DEST_PATH<br>
<br>
CMD="$COMPILE -o $DEST_PATH $SOURCE_TARGET"<br>
<br>
if [[ -e $DEST_TARGET ]]<br>
then<br>
if [[ $SOURCE_TARGET -nt $DEST_TARGET ]]<br>
then<br>
#echo $DEST_TARGET is old, recompiling to $DEST_PATH<br>
echo "$CMD"<br>
if $CMD<br>
then<br>
# do nothing<br>
FOO=1<br>
else<br>
echo "Compilation halted due to errors."<br>
exit 1<br>
fi<br>
fi<br>
else<br>
#echo $DEST_TARGET does not exist, compiling to $DEST_PATH<br>
echo "$CMD"<br>
if $CMD<br>
then<br>
# do nothing<br>
FOO=1<br>
else<br>
echo "Compilation halted due to errors."<br>
exit 1<br>
fi<br>
fi<br>
done<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>