|Subject:||RE : A way to emulate "Directory Search for Link Libraries"|
|Date:||Thu, 28 Feb 2008 14:41:33 +0100|
I found a surrounding solution by writting a macro which emulates the "Directory Search for Link Libraries" :
FileSearchLibPath = $(foreach __lib, $(1:-l%=%), \
Now, my rule looks like the following :
exe_target_file: object … $(filter %.a, $(call FileSearchLibPath, $(LDLIBS))) | $(LDLIBS)
It seems not necessary to call the macro with filter-out to get dynamic libraries, because gmake removes prerequisites which already exist on the dependences line.
However, this solution increases greatly the processing time.
In order not to recompile the target when one dynamic library has changed, I decided to separate dynamic from static libraries in the rule’s prerequisites, as following :
exe_target_file: object … static_libraries | dynamic_libraries
However, the library list is stored in a unique variable $(LDLIBS), under the following form “-lname”.
So my problem is to filter the static libraries from the result of the "Directory Search for Link Libraries", applied to this variable content.
To do that, I need to emulate/perform this operation before applying the filter function :
exe_target_file: object … $(filter %.a, $(dir_search $(LDLIBS))) | $(filter-out %.a, $(dir_search $(LDLIBS)))
Does someone have any idea to resolve this problem ?
|[Prev in Thread]||Current Thread||[Next in Thread]|