+function is_ticlib() {
+ return ( subset ~ /^ticlib$/ );
+ }
+function is_termlib() {
+ return ( subset ~ /^(ticlib\+)?termlib((\+[^+ ]+)*\+[a-z_]+_tinfo)?$/ );
+ }
+# see lib_name
+function lib_name_of(a_name) {
+ return sprintf("%s%s%s", prefix, a_name, suffix)
+ }
+# see imp_name
+function imp_name_of(a_name) {
+ if (ShlibVerInfix == "cygdll" || ShlibVerInfix == "msysdll" || ShlibVerInfix == "mingw") {
+ result = sprintf("%s%s%s.a", prefix, a_name, suffix);
+ } else if (ShlibVerInfix == "msvcdll") {
+ result = sprintf("%s%s%s.lib", prefix, a_name, suffix);
+ } else{
+ result = "";
+ }
+ return result;
+ }
+# see abi_name
+function abi_name_of(a_name) {
+ if (ShlibVerInfix == "cygdll") {
+ result = sprintf("%s%s$(ABI_VERSION)%s", "cyg", a_name, suffix);
+ } else if (ShlibVerInfix == "msysdll") {
+ result = sprintf("%s%s$(ABI_VERSION)%s", "msys-", a_name, suffix);
+ } else if (ShlibVerInfix == "mingw" || ShlibVerInfix == "msvcdll") {
+ result = sprintf("%s%s$(ABI_VERSION)%s", prefix, a_name, suffix);
+ } else if (ShlibVerInfix == "yes") {
+ result = sprintf("%s%s.$(ABI_VERSION)%s", prefix, a_name, suffix);
+ } else {
+ result = sprintf("%s.$(ABI_VERSION)", lib_name_of(a_name));
+ }
+ return result;
+ }
+# see rel_name
+function rel_name_of(a_name) {
+ if (ShlibVerInfix == "cygdll") {
+ result = sprintf("%s%s$(REL_VERSION)%s", "cyg", a_name, suffix);
+ } else if (ShlibVerInfix == "msysdll") {
+ result = sprintf("%s%s$(ABI_VERSION)%s", "msys-", a_name, suffix);
+ } else if (ShlibVerInfix == "mingw" || ShlibVerInfix == "msvcdll") {
+ result = sprintf("%s%s$(REL_VERSION)%s", prefix, a_name, suffix);
+ } else if (ShlibVerInfix == "yes") {
+ result = sprintf("%s%s.$(REL_VERSION)%s", prefix, a_name, suffix);
+ } else {
+ result = sprintf("%s.$(REL_VERSION)", lib_name_of(a_name));
+ }
+ return result;
+ }
+# see end_name
+function end_name_of(a_name) {
+ if ( MODEL != "SHARED" ) {
+ result = lib_name_of(a_name);
+ } else if ( DoLinks == "reverse") {
+ result = lib_name_of(a_name);
+ } else {
+ if ( ShlibVer == "rel" ) {
+ result = rel_name_of(a_name);
+ } else if ( ShlibVer == "abi" || ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || ShlibVer == "msvcdll" ) {
+ result = abi_name_of(a_name);
+ } else {
+ result = lib_name_of(a_name);
+ }
+ }
+ return result
+ }