Detect more errors
This commit is contained in:
parent
9397a25143
commit
969eef859c
@ -917,7 +917,7 @@ static int _target_binary(Configure * configure, FILE * fp,
|
|||||||
String const * target);
|
String const * target);
|
||||||
static int _target_library(Configure * configure, FILE * fp,
|
static int _target_library(Configure * configure, FILE * fp,
|
||||||
String const * target);
|
String const * target);
|
||||||
static void _target_library_static(Configure * configure, FILE * fp,
|
static int _target_library_static(Configure * configure, FILE * fp,
|
||||||
String const * target);
|
String const * target);
|
||||||
static int _target_libtool(Configure * configure, FILE * fp,
|
static int _target_libtool(Configure * configure, FILE * fp,
|
||||||
String const * target);
|
String const * target);
|
||||||
@ -1205,9 +1205,10 @@ static int _target_library(Configure * configure, FILE * fp,
|
|||||||
if(_target_flags(configure, fp, target) != 0)
|
if(_target_flags(configure, fp, target) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
soext = configure_get_soext(configure);
|
soext = configure_get_soext(configure);
|
||||||
if(configure_can_library_static(configure))
|
if(configure_can_library_static(configure)
|
||||||
/* generate a static library */
|
/* generate a static library */
|
||||||
_target_library_static(configure, fp, target);
|
&& _target_library_static(configure, fp, target) != 0)
|
||||||
|
return 1;
|
||||||
if((p = config_get(configure->config, target, "soname")) != NULL)
|
if((p = config_get(configure->config, target, "soname")) != NULL)
|
||||||
soname = string_new(p);
|
soname = string_new(p);
|
||||||
else if(configure->os == HO_MACOSX)
|
else if(configure->os == HO_MACOSX)
|
||||||
@ -1251,13 +1252,15 @@ static int _target_library(Configure * configure, FILE * fp,
|
|||||||
_makefile_print(fp, "%s%s%s%s%s", " $(", target, "_OBJS) $(", target,
|
_makefile_print(fp, "%s%s%s%s%s", " $(", target, "_OBJS) $(", target,
|
||||||
"_LDFLAGS)");
|
"_LDFLAGS)");
|
||||||
len = strlen(target) + strlen(soext) + 1;
|
len = strlen(target) + strlen(soext) + 1;
|
||||||
if((q = malloc(len)) != NULL)
|
if((q = malloc(len)) == NULL)
|
||||||
{
|
{
|
||||||
snprintf(q, len, "%s%s", target, soext);
|
string_delete(soname);
|
||||||
if((p = config_get(configure->config, q, "ldflags")) != NULL)
|
return 1;
|
||||||
_binary_ldflags(configure, fp, p);
|
|
||||||
free(q);
|
|
||||||
}
|
}
|
||||||
|
snprintf(q, len, "%s%s", target, soext);
|
||||||
|
if((p = config_get(configure->config, q, "ldflags")) != NULL)
|
||||||
|
_binary_ldflags(configure, fp, p);
|
||||||
|
free(q);
|
||||||
_makefile_print(fp, "%c", '\n');
|
_makefile_print(fp, "%c", '\n');
|
||||||
if(configure->os == HO_MACOSX)
|
if(configure->os == HO_MACOSX)
|
||||||
{
|
{
|
||||||
@ -1277,7 +1280,7 @@ static int _target_library(Configure * configure, FILE * fp,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _target_library_static(Configure * configure, FILE * fp,
|
static int _target_library_static(Configure * configure, FILE * fp,
|
||||||
String const * target)
|
String const * target)
|
||||||
{
|
{
|
||||||
String const * p;
|
String const * p;
|
||||||
@ -1292,16 +1295,16 @@ static void _target_library_static(Configure * configure, FILE * fp,
|
|||||||
"\n\t$(AR) -rc $(OBJDIR)", target, ".a $(",
|
"\n\t$(AR) -rc $(OBJDIR)", target, ".a $(",
|
||||||
target, "_OBJS)");
|
target, "_OBJS)");
|
||||||
len = strlen(target) + 3;
|
len = strlen(target) + 3;
|
||||||
if((q = malloc(len)) != NULL)
|
if((q = malloc(len)) == NULL)
|
||||||
{
|
return 1;
|
||||||
snprintf(q, len, "%s.a", target);
|
snprintf(q, len, "%s.a", target);
|
||||||
if((p = config_get(configure->config, q, "ldflags"))
|
if((p = config_get(configure->config, q, "ldflags"))
|
||||||
!= NULL)
|
!= NULL)
|
||||||
_binary_ldflags(configure, fp, p);
|
_binary_ldflags(configure, fp, p);
|
||||||
free(q);
|
free(q);
|
||||||
}
|
|
||||||
_makefile_print(fp, "%s%s%s",
|
_makefile_print(fp, "%s%s%s",
|
||||||
"\n\t$(RANLIB) $(OBJDIR)", target, ".a\n");
|
"\n\t$(RANLIB) $(OBJDIR)", target, ".a\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _target_libtool(Configure * configure, FILE * fp,
|
static int _target_libtool(Configure * configure, FILE * fp,
|
||||||
|
Loading…
Reference in New Issue
Block a user