Hello, from my bug tracker submission at savannah.gnu.org [1]:
Consider the following Makefile: # --- >8 --- vpath lib%.a /tmp/boosttmp/ vpath lib%.so /tmp/boosttmp/ a: -lm -lboost_system @echo target a: $^ b: -lboost_system -lm @echo target b: $^ # --- >8 --- Note that /tmp/boosttmp/ as well as some system library path must contain libboost_system.so to reproduce the bug. From my understanding make will search the vpath first and then the system directories. Now consider the following executions of make: $ make a target a: /usr/lib64/libm.so /usr/lib64/libboost_system.so $ make b target b: /tmp/boosttmp/libboost_system.a /usr/lib64/libm.so $ make a b target a: /usr/lib64/libm.so /usr/lib64/libboost_system.so target b: /usr/lib64/libboost_system.so /usr/lib64/libm.so $ make b a target b: /tmp/boosttmp/libboost_system.a /usr/lib64/libm.so target a: /usr/lib64/libm.so /tmp/boosttmp/libboost_system.a "make a" and "make a b" find the libboost_system libray in the system directories but "make b" and "make b a" in the vpath directory. Note also that the expansion of target a and b is inconsistent in the different executions. Is that the intended behaviour? From what I understand from the manual vpath has priority over the system library paths and -lboost_system should always be resolved to /tmp/boosttmp/libboost_system.a. Best regards, Tobias [1] https://savannah.gnu.org/bugs/?39560 _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make