]> git.draconx.ca Git - dxcommon.git/blobdiff - scripts/fix-ltdl.pl
fix-ltdl: Move all convenience libs to EXTRA_LTLIBRARIES only.
[dxcommon.git] / scripts / fix-ltdl.pl
index 806554526ccd7069a56a95e314cef0290c486357..7dd1c8b0ef6e7991b2adb8e8cda86e4c28eb84db 100755 (executable)
@@ -62,6 +62,7 @@ sub handle_libobj {
        print <<EOF;
 ${am_dir_prefix}libobj_la_SOURCES += $distfile
 $ltdl_dir/$base.lo: $ltdl_dir/${am_dir_prefix}libobj_la-$base.lo
+\t\$(AM_V_at)-rm -f \$@
 \t\$(AM_V_at)(cd \$(\@D) && \$(LN_S) ${am_dir_prefix}libobj_la-\$(\@F) \$(\@F))
 EOF
 
@@ -140,6 +141,15 @@ EOF
                $_ = fixup_libobjs($_);
        }
 
+       # There is no reason to list $(LT_DLLOADERS) in noinst_LTLIBRARIES;
+       # these will be picked up as ordinary prerequisites.  They're already
+       # all in EXTRA_LTLIBRARIES.
+       drop if (/^noinst_LTLIBRARIES.*\$\(LT_DLLOADERS\)$/);
+
+       # Don't list other libs in noinst_LTLIBRARIES so that they don't get
+       # built unless explicitly required by prerequisites.
+       s/noinst_LTLIBRARIES/EXTRA_LTLIBRARIES/;
+
        # BUILT_SOURCES has similar problems to recursive make: inadequate
        # dependencies lead to incorrect builds.  Collect them into an
        # ordinary variable so we can deal with them later.