forked from erlware-deprecated/erlware-mode
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make flymake use $HOME/.erlang-flymake as temp dir. Ought to work on …
…windows, and (more importantly) if the erl file is write protected. smarter(?) include path guessing. spawn_monitor highlighted as a bif.
- Loading branch information
1 parent
5c6ebcd
commit 6984b6e
Showing
4 changed files
with
48 additions
and
22 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,35 @@ | ||
#!/bin/bash | ||
|
||
echo $1 | ||
|
||
dname (){ (cd $1 ; pwd); } | ||
bdname(){ basename `dname $1`; } | ||
|
||
# if our module lives in a src dir, we attempt to handle the cases | ||
# .../lib/<app>/src/<our module> | ||
# and | ||
# .../<app>/src/<our module> | ||
# assuming that include and ebin are parallel to src | ||
Is="" | ||
PAs="" | ||
for i in `dirname $1`/../../*/include; do | ||
Is="-I$i $Is" | ||
done | ||
for e in `dirname $1`/../../*/ebin; do | ||
PAs="-pa$e $PAs" | ||
done | ||
|
||
erlc -o/tmp $Is $PAs -Wall -P $1 | grep -v "list comprehension has no gene" | ||
if [ `bdname $2` == "src" ]; then | ||
if [ `bdname $2/../..` == "lib" ]; then | ||
top=`dname $2/../..` | ||
else | ||
top=`dname $2/..` | ||
fi | ||
for i in $top/*/include; do | ||
Is="-I$i $Is" | ||
done | ||
for e in $top/*/ebin; do | ||
PAs="-pa$e $PAs" | ||
done | ||
else | ||
top=`dname $2` | ||
PAs="-pa $top" | ||
Is="-I $top" | ||
fi | ||
|
||
OUT=`dirname $1` | ||
|
||
erlc -o$OUT $Is $PAs -Wall -P $1 | grep -v "list comprehension has no gene" | ||
exit 0 |
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