diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/plist/shlib-pe.awk | 20 |
1 files 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 @@ -131,6 +131,22 @@ function add_dll(lib) { } ### +### 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. ### { |