From cc9ac4ba1f5ed898ec8239c720b0ed22f19d69b7 Mon Sep 17 00:00:00 2001 From: obache Date: Wed, 17 Apr 2013 11:53:44 +0000 Subject: * try to replace .so with .dll without `lib' prefix, like a plugins. * also try to register DLL import library (.dll.a) from static library (.a). --- mk/plist/shlib-pe.awk | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/mk/plist/shlib-pe.awk b/mk/plist/shlib-pe.awk index 8bdc4c74cc5..de779c906ec 100644 --- a/mk/plist/shlib-pe.awk +++ b/mk/plist/shlib-pe.awk @@ -1,4 +1,4 @@ -# $NetBSD: shlib-pe.awk,v 1.2 2013/03/03 11:53:58 obache Exp $ +# $NetBSD: shlib-pe.awk,v 1.3 2013/04/17 11:53:44 obache Exp $ # # Copyright (c) 2006,2013 The NetBSD Foundation, Inc. # All rights reserved. @@ -115,7 +115,7 @@ function add_dll(lib) { ### module, so the entry should stay. Convert it into a dll name as ### well and record it as a dll. ### -/.*\/lib[^\/]+\.so$/ { +/.*\/[^\/]+\.so$/ { cmd = TEST " -f " PREFIX "/" $0 if (system(cmd) == 0) { entries[++nentries] = $0 @@ -130,6 +130,22 @@ function add_dll(lib) { next } +### +### If the ".a" file actually exists, then it's a library archive, +### so the entry should stay. Convert it into a DLL import library name as +### well and record it as a DLL. +### +/.*\/lib[^\/]+\.a$/ { + cmd = TEST " -f " PREFIX "/" $0 + if (system(cmd) == 0) { + entries[++nentries] = $0 + } + lib = $0; sub("\\.a$", "", lib) + lib = lib ".dll.a" + add_dll(lib) + next +} + ### ### All other entries are stored verbatim in the entries array. ### -- cgit v1.2.3