mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Fix some bugs.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@2503 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d57a532a54
commit
bdbfbc236e
5 changed files with 94 additions and 23 deletions
|
@ -1,3 +1,12 @@
|
|||
Tue Oct 14 10:03:04 1997 Scott Christley <scottc@net-community.com>
|
||||
|
||||
* README: Update installation instructions.
|
||||
* bundle.make (BUNDLE_DIR_NAME): Elminate period.
|
||||
* config.make.in (YACC, BISON, FLEX, LEX): New variables.
|
||||
* which_lib.c (search_for_library_with_type_in_directory):
|
||||
Correct testing of filename so that only legitimate combinations
|
||||
of name suffixes are recognized.
|
||||
|
||||
Mon Oct 13 16:06:12 1997 Ovidiu Predescu <ovidiu@net-community.com>
|
||||
|
||||
* openapp.in: New file.
|
||||
|
|
10
README
10
README
|
@ -41,11 +41,11 @@ configure will use /usr/GNUstep as the default root directory.
|
|||
Installing the GNUstep makefile package
|
||||
=======================================
|
||||
|
||||
After you configure the GNUstep makefile package, then you are ready
|
||||
to install it. There is nothing to be "made"; the GNUstep makefile
|
||||
package is a set of predefined makefile and shell scripts, so they
|
||||
just need to be installed into the appropriate place. To install the
|
||||
makefile package into the configured root directory type:
|
||||
After you configure the GNUstep makefile package, then you need to
|
||||
compile the programs that come with the package. Currently there is
|
||||
only a single C program which needs to be compiled; all of the other
|
||||
files are either shell scripts or makefile fragments, so you can
|
||||
compile and install the makefile package in one step with:
|
||||
|
||||
make install
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/rules.make
|
|||
# where xxx is the bundle name
|
||||
#
|
||||
|
||||
BUNDLE_DIR_NAME := $(BUNDLE_NAME:=.$(BUNDLE_EXTENSION))
|
||||
BUNDLE_DIR_NAME := $(BUNDLE_NAME:=$(BUNDLE_EXTENSION))
|
||||
BUNDLE_FILE := $(BUNDLE_DIR_NAME)/$(GNUSTEP_TARGET_DIR)/$(LIBRARY_COMBO)/$(BUNDLE_NAME)
|
||||
BUNDLE_STAMPS := $(foreach bundle,$(BUNDLE_NAME),stamp-bundle-$(bundle))
|
||||
BUNDLE_STAMPS := $(addprefix $(GNUSTEP_OBJ_DIR)/,$(BUNDLE_STAMPS))
|
||||
|
|
|
@ -46,6 +46,11 @@ RANLIB = @RANLIB@
|
|||
RC = @RC@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
|
||||
YACC = yacc
|
||||
BISON = bison
|
||||
FLEX = flex
|
||||
LEX = lex
|
||||
|
||||
INSTALL = @HOST_INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
|
91
which_lib.c
91
which_lib.c
|
@ -239,31 +239,88 @@ int search_for_library_with_type_in_directory(char type, char* path, char* ext)
|
|||
|
||||
/* Now check if the extension matches */
|
||||
if (ext && (extlen = strlen (ext)) && filelen - extlen > 0) {
|
||||
int dfound = 0, sfound = 0, pfound = 0, dash = 0;
|
||||
|
||||
if (strcmp (dirbuf->d_name + filelen - extlen, ext))
|
||||
/* No luck, skip this file */
|
||||
continue;
|
||||
|
||||
/* If we only need the first library found then just return */
|
||||
if (!type)
|
||||
found = 1;
|
||||
else {
|
||||
/* The extension matches. Do a check to see if the suffix of the
|
||||
library matches the library type we are looking for. */
|
||||
for (i = library_name_len + 3; i < filelen - extlen; i++) {
|
||||
if (dirbuf->d_name[i] == '_')
|
||||
continue;
|
||||
/* The extension matches. Do a check to see if the suffix of the
|
||||
library matches the library type we are looking for. */
|
||||
for (i = library_name_len + 3; i < filelen - extlen; i++)
|
||||
{
|
||||
/* Skip the libraries that begin with the same name but have
|
||||
different suffix, eg libobjc.a libobjc-test.a. */
|
||||
|
||||
/* Possibly a match */
|
||||
if (type == dirbuf->d_name[i]) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
/* Skip the libraries that begin with the same name but have different
|
||||
suffix, eg libobjc.a libobjc-test.a. */
|
||||
if (dirbuf->d_name[i] != 'd'
|
||||
|| dirbuf->d_name[i] != 'p'
|
||||
|| dirbuf->d_name[i] != 's')
|
||||
break;
|
||||
|
||||
/* Only one dash allowed */
|
||||
if (dirbuf->d_name[i] == '_')
|
||||
{
|
||||
/* Found another dash or one of the letters first */
|
||||
if (dash || dfound || sfound || pfound)
|
||||
{
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
dash = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Only one d allowed */
|
||||
if (dirbuf->d_name[i] == 'd')
|
||||
{
|
||||
/* We must have found the dash already */
|
||||
if (!dash || dfound)
|
||||
{
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
dfound = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Only one p allowed */
|
||||
if (dirbuf->d_name[i] == 'p')
|
||||
{
|
||||
/* We must have found the dash already */
|
||||
if (!dash || pfound)
|
||||
{
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
pfound = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Only one s allowed */
|
||||
if (dirbuf->d_name[i] == 's')
|
||||
{
|
||||
/* We must have found the dash already */
|
||||
if (!dash || sfound)
|
||||
{
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
sfound = 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (found) {
|
||||
char filename[PATH_MAX + 1];
|
||||
|
|
Loading…
Reference in a new issue