void man()
{
    list yo;
    string base;
    string yodl;
    int idx;

    special(0, 0, 0);

    md("tmp/man/man3 tmp/man/man7 tmp/manhtml");

    chdir("documentation/man");

    if (g_test)
        yo = (list)"align.yo";
    else                                // remove the man7 manpages
        yo = makelist("*.yo") - (list)LIBRARY ".yo" - 
                                (list)"memoryreadme.yo";

    printf("Building the man3 man-pages");

    for (idx = listlen(yo); idx--; )
    {
        yodl = element(idx, yo);

        base = get_base(yodl);

        printf << "\n\n";

        run("yodl2man  --no-warnings -r 3 -o ../../tmp/man/man3/" +
                                        base + ".3" LIBRARY " " + yodl);
        run("yodl2html --no-warnings -r 3 -o ../../tmp/manhtml/" +
                                        base + ".3.html " + yodl);
    }

    printf("\n"                         // see above: removed from 'list yo'
            "Building the man7 man-pages\n");

    printf << "\n\n";
    run("yodl2man  --no-warnings  -r 3 -o ../../tmp/man/man7/"
                                          LIBRARY ".7 " LIBRARY ".yo");
    run("yodl2html --no-warnings  -r 3 "
                    "-o ../../tmp/manhtml/" LIBRARY ".7.html " LIBRARY ".yo");

    printf << "\n\n";
    run("yodl2man  --no-warnings  -r 3 "
                "-o ../../tmp/man/man7/memoryreadme.7" LIBRARY
                " memoryreadme.yo");
    run("yodl2html --no-warnings  -r 3 "
                    "-o ../../tmp/manhtml/memoryreadme.7.html "
                                "memoryreadme.yo");

    exit(0);
}

