escript os:cmd behavior different from erl or command line
Sat Jul 3 17:58:26 CEST 2010
I am attempting to run 'make' using os:cmd("make"). from an escript.
The command works fine if I run it from the erl interpreter (or from the
command like) but not from an escript.
>From the escript, (i'm building mochiweb) for each beam, i'll get an error
however the beam still gets created and in fact, using make -k seems to
force it to work.
Errors are like this:
(cd src;make all)
make: Entering directory `/home/nicholas/projects/mochiweb-dev/src'
erlc -W -I ../include +debug_info -o ../ebin mochifmt_records.erl
File has no extension: /home/nicholas/projects/mochiweb-dev/src/!
make: *** [../ebin/mochifmt_records.beam] Error 1
make: Leaving directory `/home/nicholas/projects/mochiweb-dev/src'
make: *** [all] Error 2
Where test is an escript like so:
%% -*- erlang -*-
Result = os:cmd("make"),
I'm not a make fan/expert but as far as I can tell, the mochiweb make files
are looking good.
I'm using erlang R13B01 on ubuntu 9.10 and mochiweb is the head I grabbed
earlier today via the download source button.
More information about the erlang-questions