-function shlib_rule(directory) {
- if ( ShlibVer == "cygdll" ) {
- dst_libs = sprintf("%s/$(SHARED_LIB) %s/$(IMPORT_LIB)", directory, directory);
- } else {
- dst_libs = sprintf("%s/%s", directory, end_name);
- }
+# termlib may be named explicitly via "--with-termlib=XXX", which overrides
+# any suffix. Temporarily override "suffix" to account for this.
+function termlib_end_of() {
+ termlib_save_suffix = suffix;
+ suffix = TermlibSuffix;
+ termlib_temp_result = end_name_of(TermlibRoot);
+ suffix = termlib_save_suffix;
+ return termlib_temp_result;
+}
+function shlib_build(directory) {
+ dst_libs = sprintf("%s/%s", directory, end_name);