On Fri, Nov 01, 2013 at 05:31:53PM -0700, Tyler Hicks wrote:
> The libapparmor_wrap.c target generates libapparmor_wrap.c and
> LibAppArmor.pm. The Perl module must exist before `perl Makefile.PL`
> under the Makefile.perl target, otherwise the generated Makefile.perl
> ends up with an empty $(TO_INST_PM) variable and the pm_to_blib target's
> dependencies are incomplete. That results in the Perl module not getting
> copied to the blib directory and a build that is missing LibAppArmor.pm.
> 
> A build missing LibAppArmor.pm only occurred while building with
> multiple threads. With this fix, libapparmor should support parallel
> builds.

This patch looks like it solves the problem but the description doesn't
quite match the patch -- it isn't libapparmor_wrap.c that is needed for
this target, but LibAppArmor.pm.

So here's a patch that modifies the Makefile.am to match the textual
description you gave. (I don't have the full set of patches you've
been working on but it compiled alright on my laptop when I modified
2.7.102-0ubuntu3.9 with this patch.)


diff -Naurp apparmor.orig/libraries/libapparmor/swig/perl/Makefile.am 
apparmor/libraries/libapparmor/swig/perl/Makefile.am
--- apparmor.orig/libraries/libapparmor/swig/perl/Makefile.am   2012-12-06 
18:33:20.000000000 -0800
+++ apparmor/libraries/libapparmor/swig/perl/Makefile.am        2013-11-01 
22:34:58.000000000 -0700
@@ -8,7 +8,9 @@ libapparmor_wrap.c: $(srcdir)/../SWIG/li
 
 MOSTLYCLEANFILES=libapparmor_wrap.c LibAppArmor.pm
 
-Makefile.perl: Makefile.PL
+LibAppArmor.pm: libapparmor_wrap.c
+
+Makefile.perl: Makefile.PL LibAppArmor.pm
        $(PERL) $< PREFIX=$(prefix) MAKEFILE=$@
        sed -ie 's/^LD_RUN_PATH.*//g' Makefile.perl
 

What do you think?

Thanks

> Signed-off-by: Tyler Hicks <[email protected]>
> ---
>  libraries/libapparmor/swig/perl/Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libraries/libapparmor/swig/perl/Makefile.am 
> b/libraries/libapparmor/swig/perl/Makefile.am
> index 2ae5ecc..c25c56d 100644
> --- a/libraries/libapparmor/swig/perl/Makefile.am
> +++ b/libraries/libapparmor/swig/perl/Makefile.am
> @@ -8,7 +8,7 @@ libapparmor_wrap.c: $(srcdir)/../SWIG/libapparmor.i
>  
>  MOSTLYCLEANFILES=libapparmor_wrap.c LibAppArmor.pm
>  
> -Makefile.perl: Makefile.PL
> +Makefile.perl: Makefile.PL libapparmor_wrap.c
>       $(PERL) $< PREFIX=$(prefix) MAKEFILE=$@
>       sed -ie 's/^LD_RUN_PATH.*//g' Makefile.perl
>  

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to