URL:
  <http://savannah.gnu.org/bugs/?32511>

                 Summary: Prerequisite libraries can expand to the system
library despite vpath
                 Project: make
            Submitted by: None
            Submitted on: Thu 17 Feb 2011 03:05:04 AM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.82
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Prerequisite libraries can expand to the system library despite being in a
path in vpath. However, this only seems to occur if the vpath for archives
follows a vpath for another pattern such as headers.
For example if libssl.a and libcrypto.a both exist in /tmp and /usr/lib, both
are prerequisite libraries to an executable, and "vpath %.a /tmp" is set then
both should expand to the version in /tmp. However, only the first one expands
to the version in /tmp. The second one expand to the version in /usr/lib
provided a vpath for a different pattern comes before the "vpath %.a /tmp".

Here is an example makefile:

######## START OF MAKEFILE ###################
LD              := gcc
LDFLAGS         := -L/tmp
vpath %.h /tmp
vpath %.a /tmp
.LIBPATTERNS=lib%.a lib%.so

example: example.o -lssl -lcrypto
        $(LD) $(LDFLAGS) -o $@ $^
######## END OF MAKEFILE ###################


Here is what it does:
#gmake -f Makefile.example
cc    -c -o example.o example.c
gcc -L/tmp -o example example.o /tmp/libssl.a /usr/lib/libcrypto.a




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32511>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to