Quantcast

Makefile and Erlang

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Makefile and Erlang

Alexis Le-Quoc
Hello,

First of all, let me state the obvious, the more I use Erlang, the more
impressed I am! I've been fiddling with the release tools and I find them
absolutely useful.

I'm stumbling on two problems:

1) I wrote a Makefile (for GNU make) which is about 3 lines long:
all:
        erl -noinput -make
        echo "systools:make_tar(app1)." | erl -noshell

The third line obviously never returns but produces the expected .tar.gz.

It looks like:
lib/app-1/...
lib/kernel-.../...
lib/sasl-.../...
lib/stdlib-.../...
releases/1/start.boot

2) Once I have that tarball, I un-tar it to my_directory and do a cd
my_directory. Then I try erl -boot releases/1/start but it crashes since I
suspect it does not find the appropriate *.beam files. I'm missing
something here. Is is the {path, Path} trick in the .rel file?

Thank you,

-- Alexis



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Makefile and Erlang

Vance Shipley-2
Alexis Le-Quoc writes:
>
> 1) I wrote a Makefile (for GNU make) which is about 3 lines long:
> all:
>         erl -noinput -make
>         echo "systools:make_tar(app1)." | erl -noshell
>
> The third line obviously never returns but produces the expected .tar.gz.


Alexis,

This is what I use in our Makefile (abreviated version attached):

%.tar.gz:   all %.boot
   erl -noshell -s systools make_script $* -s erlang halt
   erl -noshell -s systools make_tar $* -s erlang halt



> 2) Once I have that tarball, I un-tar it to my_directory and do a cd
> my_directory. Then I try erl -boot releases/1/start but it crashes since I
> suspect it does not find the appropriate *.beam files. I'm missing
> something here. Is is the {path, Path} trick in the .rel file?
>
> Thank you,
>
> -- Alexis


I'm not sure but I know that it isn't working for me because I'm not
getting all my applications files into the tarball.  It puts all the
*.beam files in but not the priv/bin & priv/data files. I haven't
gotten around to figuring out how to do that yet.

        -Vance
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 1267 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20010126/469adb23/attachment.obj>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Makefile and Erlang

Vance Shipley-2
I wrote:
> This is what I use in our Makefile (abreviated version attached):
>
> %.tar.gz:   all %.boot
>    erl -noshell -s systools make_script $* -s erlang halt
>    erl -noshell -s systools make_tar $* -s erlang halt

I should have said that I use it as:

        $ make January2001.tar.gz

where I have a release file named January2001.rel


        -Vance


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Makefile and Erlang

Vance Shipley-2
I wrote:

> This is what I use in our Makefile (abreviated version attached):
>
> %.tar.gz:   all %.boot
>    erl -noshell -s systools make_script $* -s erlang halt
>    erl -noshell -s systools make_tar $* -s erlang halt
>
> I use it as:
>
> $ make January2001.tar.gz
>
> where I have a release file named January2001.rel


I've been trying to get this work but I'm left with one odd little
problem.  The resulting tar file is missing the .rel file.

The interesting thing is if I fire up erl it works:

Eshell V5.0.1.1  (abort with ^G)
1> systools:make_tar("February2001").
ok

$ gunzip -c February2001.tar.gz | tar tvf -
...
-rw-rw-r-- 501/501         206 2001-02-14 18:29:13 releases/February2001.rel


There is something quite odd going on here.

        -Vance



Loading...