cppannotations/build
2009-11-06 14:09:20 +00:00

89 lines
2.3 KiB
Text
Executable file

#!/usr/bin/icmake -qt/tmp/cppannotations
#include "INSTALL.im"
#define ECHO_COMMANDS 1
#define COPT "-Wall -O2 -g"
#define CPPOPT "--std=c++0x -Wall -O2 -g"
string
g_cwd; // current WD
#include "icmake/run"
#include "icmake/clean"
#include "icmake/programs"
#include "icmake/man"
#include "icmake/docs"
#include "icmake/pre"
#include "icmake/install"
#include "icmake/svnclean"
#include "icmake/zips"
void main(int argc, list argv, list envp)
{
string option;
echo(ECHO_COMMANDS);
option = element(1, argv);
g_cwd = chdir(".");
setLocations(); // from INSTALL.im
if (option == "clean")
clean();
if (option == "programs")
{
programs(0);
programs(1);
exit(0);
}
if (option == "svnclean")
svnclean();
if (option == "pre")
pre();
if (option == "docs")
docs();
if (option == "zips")
zips();
if (option == "man")
{
man();
exit(0);
}
if (option == "install")
install(0, element(2, argv));
if (option == "cinstall")
install(1, element(2, argv));
printf("Usage: build what [x]\n"
"Where `what' is one of:\n"
" clean - clean up remnants of previous compilations\n"
" cinstall <base> - to install the C++ Annotations in the "
"locations\n"
" defined in the INSTALL.im file, optionally\n"
" below <base>\n"
" docs - construct the C++ Annotations\n"
" install <base> - to install the C++ Annotations in the "
"locations\n"
" defined in the INSTALL.im file, optionally\n"
" below <base>\n"
" man - build the manual page (requires Yodl)\n"
" pre - prepare files for independent `docs' call\n"
" programs - build support programs\n"
" svnclean - clean remnants of locally run ./bin/ scripts\n"
" zips - zip archives (after doc)\n"
"\n"
);
exit(1);
}