[erlang-questions] Can the CouchDB install of Mochiweb be used alone?
Carl McDade
carlmcdade@REDACTED
Fri May 1 18:38:10 CEST 2009
Tuncer Ayaz wrote:
> On Fri, May 1, 2009 at 5:59 PM, Carl McDade <carlmcdade@REDACTED> wrote:
>
>> Everything seems to be fine on the path front. I have tried both werl and
>> erl
>>
>> 7> pwd().
>> c:/erlang_stuff/mochi_test
>> ok
>> 8> for %i in (src/*.erl) do erlc -o ebin src/%i;.
>>
>
> This was meant to be executed in the Windows cmd.exe shell
> and not within the Erlang repl (interactive erl.exe, werl.exe).
>
>
>> 8> for %i in (src/*.erl) do erlc -o ebin src/%i;
>> 8> for %i in (src/*.erl) do erlc -o ebin src/%i.
>> 8> pwd().
>> * 2: syntax error before: for
>> 8> for %i in (src/*.erl) -> do erlc -o ebin src/%i.
>> 8> pwd().
>> * 2: syntax error before: pwd
>> 8> for %i in (src/*.erl) -> do erlc -o ebin src/%i;.
>> 8> pwd().
>> * 2: syntax error before: pwd
>> 8> for %i in (src/*.erl) do erlc -o ebin src/%i
>> 8> pwd().
>> * 2: syntax error before: pwd
>> 8> pwd().
>> c:/erlang_stuff/mochi_test
>> ok
>> 9> for %i in (src/*.erl) do erlc -o ebin src/%i.erl.
>> 9> erlc -o ebin src/mochiweb_app.erl.
>> * 2: syntax error before: erlc
>> 9> erlc -o ebin src/mochiweb_app.erl.
>> * 1: syntax error before: ebin
>> 9> erlc -o ebin src/mochiweb_app.erl.
>> * 1: syntax error before: ebin
>> 9>
>>
>> My path looks like this.
>>
>> C:\yaws\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;E:\Program
>> Files\jEdit;E:\PROGRA~1\DISKEE~1\DISKEE~1\;C:\erlang\bin;E:\Program
>> Files\doxygen\bin
>>
>>
>>
>> On Fri, May 1, 2009 at 5:53 PM, Robert Raschke <rtrlists@REDACTED>
>> wrote:
>>
>>> On Fri, May 1, 2009 at 3:28 PM, Carl McDade <carlmcdade@REDACTED> wrote:
>>>
>>>> Well the command prompt in both werl and erl just hang on this:
>>>>
>>>> for %i in (src/*.erl) do erlc -o ebin src/%i.
>>>>
>>>> No error no response. Ideas on where to problem lies?
>>>>
>>> It's a regular windows shell command. Is the erl bin directory on your
>>> path?
>>>
>>> You could make yourself a wee batch file build.bat in the mochiweb root
>>> folder with these contents:
>>>
>>> setlocal
>>> set PATH=%PATH%;"C:\Program Files\erl6.5.6\bin"
>>> for %%i in (src/*.erl) do erlc -o ebin src/%%i
>>> copy src\mochiweb.app ebin
>>> endlocal
>>>
>>> The '%i's need to be written '%%i' inside a batch script. Also, you may
>>> need to set the PATH to your erl correctly.
>>>
>>> Robby
>>>
>
>
Got it and it does work!
C:\>cd erlang_stuff/mochi_test
C:\erlang_stuff\mochi_test>for %i in (src/*.erl) do erlc -o ebin src/%i
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochifmt.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochifmt_records.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochifmt_std.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochihex.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochijson.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochijson2.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochinum.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_app.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_charref.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_cookies.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_echo.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_headers.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_html.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_http.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_multipart.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_request.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_response.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_skel.erl
c:/ERLANG~1/MOCHI_~1/src/mochiweb_skel.erl:32: Warning: regexp:gsub/3:
the regex
p module is deprecated (will be removed in R15A); use the re module instead
c:/ERLANG~1/MOCHI_~1/src/mochiweb_skel.erl:53: Warning: regexp:gsub/3:
the regex
p module is deprecated (will be removed in R15A); use the re module instead
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_socket_server.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_sup.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/mochiweb_util.erl
C:\erlang_stuff\mochi_test>erlc -o ebin src/reloader.erl
C:\erlang_stuff\mochi_test>
Thanks to all.
I am getting confused as hell though. First I switched from cmd.exe
because I could not get info on the environment the same way as it
looked in Linux. Now I get instructions based on the cmd.exe
So what's the preferred shell method?
More information about the erlang-questions
mailing list