From 4236d4904115bae1f809fffb41fab3d7e7a710b0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 10 Jul 2002 15:11:24 +0000 Subject: [PATCH] Improved LinkSharedOSLibs. It does now look, if a supplied "library" has a dirname or grist, which makes the rule handle it as if the basename would start with "lib". Needed e.g. when linking against servers. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@37 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- Jamrules | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Jamrules b/Jamrules index d768781ded..21a16f6487 100644 --- a/Jamrules +++ b/Jamrules @@ -316,16 +316,28 @@ rule LinkSharedOSLibs { # LinkSharedOSLibs : ; # Valid elements for are e.g. "be" or "libopenbeos.so" or - # "/boot/.../libfoo.so". If the basename starts with "lib", it is added - # to the NEEDLIBS variable (i.e. the file will be bound!), otherwise it is - # prefixed "-l" and added to LINKLIBS. + # "/boot/.../libfoo.so". If the basename starts with "lib" or the thingy + # has a dirname or grist, it is added to the NEEDLIBS variable (i.e. the + # file will be bound!), otherwise it is prefixed "-l" and added to + # LINKLIBS. for i in $(>) { - switch $(i:B) - { - case lib* : NEEDLIBS on $(1) += $(i) ; DEPENDS $(1) : $(i) ; - case * : LINKLIBS on $(1) += -l$(i) ; + local isfile = ; + if $(i:D) || $(i:G) { + isfile = true ; + } else { + switch $(i:B) + { + case lib* : isfile = true ; + case * : isfile = ; + } + } + if $(isfile) { + NEEDLIBS on $(1) += $(i) ; + DEPENDS $(1) : $(i) ; + } else { + LINKLIBS on $(1) += -l$(i) ; } } }