Date: Sun, 24 Oct 1999 09:43:20 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "Juan Manuel Guerrero, Student, FB05" cc: djgpp AT delorie DOT com Subject: Re: bzip2-0.9.5d port for DJGPP In-Reply-To: <9323A241D99@HRZ1.hrz.tu-darmstadt.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 21 Oct 1999, Juan Manuel Guerrero, Student, FB05 wrote: > I have used basename to get the file name. I know that it is not > ANSI, not POSIX but I hope this isn't a problem. Since the NO_LFN_SUPPORT fragment is for MSDOS only, and we do have basename, I don't think anybody will object. > If o.k., i will make bin- and source-packages and send them to > SimTel.NET. Thank, you this is the right way to let others benefit from your work. Please read the simtel-upload HOWTO (available from the DJGPP Web site) for instructions about preparing packages for uploading to SimTel. > libbz2.a: $(OBJS) > rm -f libbz2.a > ! ar cq libbz2.a $(OBJS) > @if ( test -f /usr/bin/ranlib -o -f /bin/ranlib -o \ > -f /usr/ccs/bin/ranlib ) ; then \ > echo ranlib libbz2.a ; \ > ranlib libbz2.a ; \ > fi > --- 1,35 ---- > [snip] > libbz2.a: $(OBJS) > rm -f libbz2.a > ! ar cqs libbz2.a $(OBJS) > @if ( test -f /usr/bin/ranlib -o -f /bin/ranlib -o \ > -f /usr/ccs/bin/ranlib ) ; then \ > echo ranlib libbz2.a ; \ > ranlib libbz2.a ; \ > fi I presume that this change of "ar cq" into "ar cqs" is because the shell command after the "ar cq" line didn't work for you. The reason it didn't work is because "test -f foo" looks for a file `foo', not `foo.exe'. To make it work, replace "test -f" with "test -x", and use ${DJDIR}/bin instead of /usr/bin. Then "ar cq" can stay unchanged. Alternatively, if you change "ar cq" into "ar cqs", you might as well remove the shell command altogether. This has an additional benefit of not requiring users to have Bash installed to build the package. (Yes, I know it goes against my recommendation to change as little as possible, but I think here you have a good reason.) > + #define HAS_NO_EXTENSION(filename) (strchr ((filename), '.') == NULL) It's hard to determine without full sources whether this makes any difference, but in general the above seems a bit too much: a file name can have a dot in it (in the leading directories), but still be without extension in the basename. Thanks again for working on this!