On Tue, Feb 16, 2016 at 10:34:07AM -0800, Russ Allbery wrote:
> My preferred solution would be to require Encode as a prerequisite for
> podlators when building core.  Is there any way to do that?

Probably, but the build system isn't my strong point. I tried hacking
Makefile.SH so that it adds this line to Makefile if Encode hasn't been
deselected:

    cpan/podlators/pm_to_blib: lib/auto/Encode/Encode.so

but then I get this:

    make: Circular lib/auto/Encode/Encode.so <- makeppport dependency dropped.
    make: Circular DynaLoader.o <- cpan/podlators/pm_to_blib dependency dropped.

Anyone have a better clue how to do this?

Here's my Makefile.SH WIP diff:

diff --git a/Makefile.SH b/Makefile.SH
index 2278f9f..6ad578a 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -177,10 +177,12 @@ esac
 : is Cwd static or dynamic
 static_cwd='define'
 list_util_dep='$(PERL_EXE)'
+encode_dep=
 for f in $dynamic_ext; do
    case $f in
        Cwd) static_cwd='undef' ;;
-       List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext
+       List/Util) list_util_dep=lib/auto/List/Util/Util.$dlext ;;
+       Encode) encode_dep=lib/auto/Encode/Encode.$dlext ;;
    esac
 done
 
@@ -227,6 +229,12 @@ for f in $nonxs_ext; do
            nonxs_list="$nonxs_list $d/$p/pm_to_blib"
        fi
     done
+    case $f in
+       podlators) if [ -n "$encode_dep" ]; then
+                   extra_dep="$extra_dep
+cpan/podlators/pm_to_blib: $encode_dep"
+                  fi ;;
+    esac
 done
 
 dtrace_h=''




-- 
"I do not resent criticism, even when, for the sake of emphasis,
it parts for the time with reality".
    -- Winston Churchill, House of Commons, 22nd Jan 1941.

Reply via email to