Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Massive autotools refactoring & cleanup

Now, all makefile are generated by automake. This way, many things are more
configurable and maintainable.

Main (visible) changes:

 * Now, you can configure and compile Yaws outside the source directory. It is
   also possible to generate an archive for distribution, using the 'dist' target
   (from now, 'distcheck' target should always pass).

 * We track .erl dependencies using '-M*' flags of ERLC.

 * generated header 'yaws_configure.hrl' disappears. HAVE_SENDFILE,
   HAVE_ERLANG_SENDFILE and HAVE_CRYPTO_HASH macros are defined in ERLC flags.

 * yaws_generated:localinstall/0 function disappears (see comment about local

 * To create a windows installer, we just need to run the 'mkinstaller'
   target. Read win32/README.developer for details.

 * We use standard Erlang installation path for Yaws, relative to the erlang
   library directory (/usr/lib/erlang/lib). Now, '$(libdir)/yaws' is a link. We
   do the same for yapp application.

 * "local install" was removed. Now, to do a "developer install", we just need
   to set a prefix during the project configuration using --prefix option. So,
   you need to install yaws to test it.

 * DESTDIR variable is still supported.

 * scripts/make-release was rewritten to use 'dist' and 'mkinstaller' targets.

 * Installation of Yaws applications has slightly changed. Now they are
   installed in their own directory, in '$(localstatedir)/yaws'. So, chat
   application will be installed in '$(localstatedir)/yaws/chat', with 'www' and
   'ebin' subdirs.

Main targets (others than all/install/clean....):

  * all           : compile Yaws
  * debug         : compile Yaws with debug flags
  * clean         : remove files produced by all or debug target
  * install       : do a proper install of Yaws
  * doc or docs   : build the documentation
  * check or test : launch tests
  * cleantest     : remove files produced by check target
  * dialyzer      : run dialyzer on Yaws
  * mkinstaller   : build an installer for windows
  * cleaninstaller: remove files produced by mkinstaller target
  * apps          : compile Yaws applications (chat,mail,wiki,yapp)
  * cleanapps     : remove files produced by apps target
  * installapps   : install Yaws applications
  * fullinstall   : install + installapps
  * fullclean     : clean + cleantest + cleanapps + cleaninstaller

  To install an application, run: (cd application/{APP} && make install)

Of course, many things can be customized during configuration and Rebar still
works as expected. To do an install with (almost) the same tree than with
previous of Yaws, do:

  $> ./configure yawsdir=${prefix}/lib/yaws yappdir=${prefix}/lib/yapp \
        --sysconfdir=/etc --localstatedir=/var
  $> make install

Here is the default installation tree on my debian:

    ├── lib
    │   └── erlang
    │       └── lib
    │           ├── yapp-0.4.2
    │           │   ├── doc/
    │           │   ├── ebin/
    │           │   ├── examples/
    │           │   └── priv/docroot/
    │           └── yaws-1.98
    │               ├── ebin/
    │               ├── include/
    │               └── priv/
    │               ├── examples/
    ├── local/bin/yaws
    ├── local/etc/init.d/yaws
    ├── local/etc/yaws/
    ├── local/etc/mail/yaws-webmail.conf
    ├── local/lib/pkgconfig/yaws.pc
    ├── local/lib/yapp -> /usr/lib/erlang/lib/yapp-0.4.2
    ├── local/lib/yaws -> /usr/lib/erlang/lib/yaws-1.98
    ├── local/share/doc/yaws/yaws.pdf
    ├── local/share/man/{man1,man5}/
    ├── local/var/log/yaws
    ├── local/var/run/yaws
    └── local/var/yaws
        ├── chat/{ebin,www}
        ├── mail/{ebin,www}
        ├── wiki/{ebin,www}
        └── www
latest commit cba96bca06
@capflam capflam authored


This is a very basic WebMail application which is completely stateless, by
design. I didn't want any SQL databases etc for storing the emails.

The reason for building it was that I needed a local WebMail and I didn't want
to install an Apache with python or PHP, and besides all those relied on some
local store (mbox, MySQL etc) which I didn't want. Also, Klacke told me that he
never finished the other webmail app so I started from scratch.

A few important things are still missing. The most notable is the ability to
handle attached files and email on multipart format...

To install

- Yaws should be installed

- Run 'make install'

- Edit $(etcdir)/mail/yaws-webmail.conf

Two things need to be edited in /etc/yaws.conf

1. Yaws must find the beam code for mail.beam.  This path must be added to
   /etc/yaws conf as in:

   ebin_dir = $(vardir)/yaws/mail/ebin

2. The virtual server that is supposed to run the webmail must have an appmod
   called 'attachment' installed.

   Here is an example:

   <server flinta>
         port = 80
         appmods = attachment
         listen =
         docroot =  $(vardir)/yaws/mail/www

/Johan Bevemyr
Something went wrong with that request. Please try again.