erlyweb:compile small patch proposal
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
shaman <buricc... @gmail.com>
Date: Fri, 13 Mar 2009 12:33:54 -0700 (PDT)
Local: Fri, Mar 13 2009 3:33 pm
Subject: erlyweb:compile small patch proposal
First of all, I must say, that erlyweb is best web development
framework.
Simple patch proposed. It's a little correction to generate correct
path for AppDir and IncludePaths (current version generates incorrect
include path on Windows due to neglect of disk letter), something like
that:
compile(AppDir, Options) ->
- AppDir1 = case lists:reverse(AppDir) of
- [$/ | _] -> AppDir;
- Other -> lists:reverse([$/ | Other])
- end,
+ AppDir1 = filename:absname(AppDir)
IncludePaths =
+ [ filename:join(AppDir,X) || {i, X} <- Options],
- lists:foldl(
- fun({i, [$/ | _] = Path}, Acc) ->
- [Path | Acc];
- ({i, Path}, Acc) ->
- [AppDir1 ++ "src/" ++ Path | Acc];
- (_Opt, Acc) ->
- Acc
- end, [AppDir1 ++ "src"], Options),
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
shaman <buricc... @gmail.com>
Date: Fri, 13 Mar 2009 15:53:42 -0700 (PDT)
Local: Fri, Mar 13 2009 6:53 pm
Subject: Re: erlyweb:compile small patch proposal
or rather:
[ filename:join(filename:join(AppDir, "src") ,X) || {i, X} <-
Options],
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Buggaboo <buggas... @gmail.com>
Date: Tue, 31 Mar 2009 08:36:54 -0700 (PDT)
Local: Tues, Mar 31 2009 11:36 am
Subject: Re: erlyweb:compile small patch proposal
I tried installing on windows 6 months ago, but didn't get manage to
set it up right. I gave up because I'm a linux guy anyways.
Good job.
On Mar 14, 12:53 am, shaman <buricc... @gmail.com> wrote:
> or rather:
> [ filename:join(filename:join(AppDir, "src") ,X) || {i, X} <-
> Options],
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
shaman <buricc... @gmail.com>
Date: Sat, 4 Apr 2009 11:32:39 -0700 (PDT)
Local: Sat, Apr 4 2009 2:32 pm
Subject: Re: erlyweb:compile small patch proposal
On Windows, it requires to correct/add yaws include dir in
make_erlyweb.erl and Emakefile and it works.
The problem arise when some one need something like that:
erlyweb:compile("./myapp", [{i,"d:/some/include"}])
erlyweb_compile:compile will seak directory "./myapp/src/d:/some/
include" instead of "d:/some/include".
The above code works on any OS, for absolute and relative paths as
well.
-module(erlyweb_compile).
...
compile(AppDir, Options) ->
AppDir1 = filename:absname(AppDir)
IncludePaths = [ filename:join(filename:join(AppDir, "src") ,X) ||
{i, X} <-Options],
...
You must
Sign in before you can post messages.
You do not have the permission required to post.