[apparmor] [PATCH] LibAppArmor.pm: Adjust Makefile dependencies to support parallel builds

Tyler Hicks tyhicks at canonical.com
Mon Nov 4 07:08:51 UTC 2013


On 2013-11-01 22:56:26, Seth Arnold wrote:
> 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.

Agreed

> 
> 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?

I think it is the better solution. Thanks!

Tyler

> 
> Thanks
> 
> > Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> > ---
> >  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
> >  



> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20131103/b600e3a4/attachment.pgp>


More information about the AppArmor mailing list