00001 /* maker options. 00002 COMPILER=g++ -O2 -Wall 00003 MAINFILE=maker.cpp 00004 MAKER_ADD_DEPENDENCY="maker.h" 00005 NOFILE 00006 */ 00007 00008 /************ file.h ************** 00009 $Revision: 1.2 $ 00010 $Author: pbergen $ 00011 $Date: 2001/05/13 21:56:03 $ 00012 ***********************************/ 00013 00014 #include <stdio.h> 00015 #include "maker.h" 00016 00022 int main(int argc, char **argv) 00023 { 00024 printf("Maker v1.0 by Philip Bergen (pb@instadia.net).\n"); 00025 00026 /* parse the options */ 00027 OptionReader *opt=new OptionReader(argc,argv); 00028 00029 if (argc<2) 00030 { 00031 opt->displayHelp(); 00032 delete opt; 00033 return 0; 00034 } 00035 00036 Maker *maker=new Maker(opt); 00037 00038 maker->resolveDependencies(); 00039 if (!maker->generateMakescript()) 00040 { 00041 printf("Cannot open makescript (%s) for writing.\n", 00042 opt->getMakescript()); 00043 return -1; 00044 } 00045 if (!maker->generateDotOutput()) 00046 { 00047 printf("Cannot open dotoutput file (%s) for writing.\n", 00048 opt->getDotoutput()); 00049 } 00050 00051 /* clean up */ 00052 delete fileRoot; 00053 delete maker; 00054 delete opt; 00055 00056 return 0; 00057 } 00058 00059 /*************** LOG ***************** 00060 $Log: maker.cpp,v $ 00061 Revision 1.2 2001/05/13 21:56:03 pbergen 00062 Improved dot output. 00063 00064 Revision 1.10 2001/05/09 12:10:56 pb 00065 Cleaned up the source. Added new directive MAKER_ADD_DEPENDENCY. 00066 Added documentation. 00067 00068 Revision 1.9 2001/05/08 18:13:41 pb 00069 Niced the comments and added return 0 if help is displayed. 00070 00071 Revision 1.8 2001/05/08 18:10:18 pb 00072 Fixed a couple of bugs. 00073 00074 Revision 1.7 2001/05/08 14:21:28 pb 00075 Works 100% and lots of new features. 00076 00077 Revision 1.6 2001/05/07 17:17:15 pb 00078 It really works! 00079 00080 Revision 1.5 2001/04/28 14:35:10 pb 00081 Added dot-output. 00082 00083 Revision 1.4 2001/04/28 10:11:19 pb 00084 A -perhaps- working version. 00085 00086 Revision 1.3 2001/04/27 14:23:36 pb 00087 It seems to start working. But there is a bug in building dependencies. 00088 00089 Revision 1.2 2001/04/27 13:49:28 pb 00090 Added headers and footers. 00091 00092 *************************************/