void install(string what, string where)
{
    string docdoc;
    docdoc = DOC + "-doc";

    if (what == "program")
    {
        printf("  installing the executable\n");
        md(where + BIN);
        run("cp tmp/bin/* " + where + BIN);
    
        printf("  installing the skeleton files\n");
        md(where + SKEL);
        run("cp share/* " + where + SKEL);

        printf("  installing the information directly in and under $DOC\n");
        md(where + DOC);
        run("gzip -9 < changelog > " + where + DOC + "/changelog.gz");
    }

    if (what == "man")
    {
        printf("  installing the manual page bisonc++.1\n");
        md(where + MAN);
        run("gzip -9 < tmp/man/bisonc++.1 > " + 
                                        where + MAN + "/bisonc++.1.gz");

        printf("  installing the manual page bisonc++man.html\n");
        md(where + DOC + "/man");
        run("cp tmp/manhtml/bisonc++man.html " + where + DOC + "/man");
    }

    if (what == "manual")
    {
        printf("  installing bison's docs\n");
        md(where + docdoc + "/bison-docs");

        printf(
            "  installing the information directly in and under $DOC-doc\n");
        run("gzip -9 < changelog > " + where + docdoc + "/changelog.gz");
    

        run("cp -r documentation/html documentation/bison.ps.org " + 
                                        where + docdoc + "/bison-docs");
    
        printf("  installing examples\n");
        md(where + docdoc + "/examples");
        run("cp -r documentation/examples " + where + DOC);
        run("cp -r documentation/man/calculator " + 
                                        where + docdoc + "/examples");

        run("cp -r documentation/regression " + where + docdoc);
    
        printf("  installing manual\n");
        run("cp -r tmp/manual " + where + docdoc);
    }

    printf("  Installation completed\n");

    exit(0);
}




