Merge pull request #328 from purdeaandrei/f_allow_libext_and_y_commands_to_be_given_in_any_order
Allow +libext+ and -y commands to be given in any order (and small fix in manpage)
This commit is contained in:
commit
ed7734c795
|
|
@ -502,7 +502,7 @@ Variables in the \fIincludedir\fP are substituted.
|
|||
|
||||
.TP 8
|
||||
.B +libext+\fIext\fP
|
||||
The \fB+libext\fP token in command files fives file extensions to try
|
||||
The \fB+libext\fP token in command files lists file extensions to try
|
||||
when looking for a library file. This is useful in conjunction with
|
||||
\fB\-y\fP flags to list suffixes to try in each directory before moving
|
||||
on to the next library directory.
|
||||
|
|
|
|||
10
main.cc
10
main.cc
|
|
@ -598,6 +598,7 @@ bool had_timescale = false;
|
|||
static void read_iconfig_file(const char*ipath)
|
||||
{
|
||||
char buf[8*1024];
|
||||
vector<pair<char*,bool> > to_build_library_index;
|
||||
|
||||
FILE*ifile = fopen(ipath, "r");
|
||||
if (ifile == 0) {
|
||||
|
|
@ -756,10 +757,10 @@ static void read_iconfig_file(const char*ipath)
|
|||
ignore_missing_modules = true;
|
||||
|
||||
} else if (strcmp(buf, "-y") == 0) {
|
||||
build_library_index(cp, CASE_SENSITIVE);
|
||||
to_build_library_index.push_back(make_pair(strdup(cp), CASE_SENSITIVE));
|
||||
|
||||
} else if (strcmp(buf, "-yl") == 0) {
|
||||
build_library_index(cp, false);
|
||||
to_build_library_index.push_back(make_pair(strdup(cp), false));
|
||||
|
||||
} else if (strcmp(buf, "-Y") == 0) {
|
||||
library_suff.push_back(strdup(cp));
|
||||
|
|
@ -798,6 +799,11 @@ static void read_iconfig_file(const char*ipath)
|
|||
}
|
||||
}
|
||||
fclose(ifile);
|
||||
for (vector<pair<char *, bool> >::iterator it = to_build_library_index.begin() ;
|
||||
it != to_build_library_index.end() ; ++ it ) {
|
||||
build_library_index(it->first, it->second);
|
||||
free(it->first);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue