[Python-ideas] VS2005 project improvement

Victor Martin Ulloa pelotoescogorciao at yahoo.es
Sun Oct 19 22:43:26 CEST 2008


I see this code in the python3.0rc1 makebuild_info project for VS2005:

int main(int argc, char*argv[])
{
   char command[500] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL ";
   int do_unlink, result;
   if (argc != 2) {
       fprintf(stderr, "make_buildinfo $(ConfigurationName)\n");
       return EXIT_FAILURE;
   }
   if (strcmp(argv[1], "Release") == 0) {
       strcat_s(command, CMD_SIZE, "-MD ");
   }
   else if (strcmp(argv[1], "Debug") == 0) {
       strcat_s(command, CMD_SIZE, "-D_DEBUG -MDd ");
   }
   else if (strcmp(argv[1], "ReleaseItanium") == 0) {
       strcat_s(command, CMD_SIZE, "-MD /USECL:MS_ITANIUM ");
   }
   else if (strcmp(argv[1], "ReleaseAMD64") == 0) {
       strcat_s(command, CMD_SIZE, "-MD ");
       strcat_s(command, CMD_SIZE, "-MD /USECL:MS_OPTERON ");
   }
   else {
       fprintf(stderr, "unsupported configuration %s\n", argv[1]);
       return EXIT_FAILURE;
   }


I don't think to hardcode the configurations would be a good idea. I went crazy trying to setup a static library(or a custom configuration) and it was difficult to figure things like that... pls fix it, that's not the good way.


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.es 



More information about the Python-ideas mailing list