X-Authentication-Warning: sirppi.helsinki.fi: peuha owned process doing -bs Date: Thu, 3 Aug 2000 14:04:12 +0300 (EET DST) From: Esa A E Peuha Sender: peuha AT cc DOT helsinki DOT fi To: djgpp-workers AT delorie DOT com Subject: DJGPP build process Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com I tried to compile djgpp docs from the CVS sources on a Unix machine, and found it to be very difficult without a cross compiler, because the makefiles are not designed so that docs could be built without compiling the libraries and executables at the same time. Would it be a good idea to make the build process more flexible? Actually, I was able to build the docs by providing dummy shell scripts for cross-gcc, cross-ar, and cross-ld that just touch their specified output file. I could have done the same for native dxegen and stubify, but it wasn't really necessary for dxegen (make process in src/libemu will fail, but it wouldn't build any docs anyway), and stubify works well enough after applying the following patch (which just prevents stubify from reading past the end of its input file). Index: src/stub/stubify.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/stub/stubify.c,v retrieving revision 1.4 diff -c -r1.4 stubify.c *** stubify.c 1999/12/14 12:01:36 1.4 --- stubify.c 2000/08/03 10:59:49 *************** *** 49,55 **** char *ofname, *ofext; char buf[4096]; int rbytes, used_temp = 0, i, n; ! long coffset=0; unsigned char filehdr_buf[20]; int max_file_size = 0; int coff_file_size = 0; --- 49,56 ---- char *ofname, *ofext; char buf[4096]; int rbytes, used_temp = 0, i, n; ! long coffset = 0; ! long file_size; unsigned char filehdr_buf[20]; int max_file_size = 0; int coff_file_size = 0; *************** *** 85,92 **** --- 86,99 ---- perror(fname); return; } + file_size = lseek(ifile, 0, SEEK_END); while (1) { + if (coffset == file_size) + { + fprintf(stderr, "Warning: input file is empty or stub without COFF\n"); + break; + } lseek(ifile, coffset, 0); read(ifile, buf, 6); if (buf[0] == 'M' && buf[1] == 'Z') /* stubbed already, skip stub */ *************** *** 108,137 **** } } ! coff_file_size = lseek(ifile, 0, SEEK_END) - coffset; ! lseek(ifile, coffset, 0); ! read(ifile, filehdr_buf, 20); /* get the COFF header */ ! lseek(ifile, get16(filehdr_buf+16), SEEK_CUR); /* skip optional header */ ! n = get16(filehdr_buf + 2); ! for (i=0; i