Changeset e4b8f93 for perl


Ignore:
Timestamp:
Jun 20, 2013, 9:25:24 AM (11 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10
Children:
cf2ebde, 1b17f50, 10c32c9
Parents:
1c22155
git-author:
Anders Kaseorg <andersk@mit.edu> (04/10/13 06:23:40)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/20/13 09:25:24)
Message:
Really support building Perl modules from a separate builddir

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Location:
perl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/Module/Install/BarnOwl.pm

    rb8a3e00 re4b8f93  
    4141    my $class = ref $self;
    4242
     43    my $srcdir = $ENV{BARNOWL_SRCDIR} || '.';
     44
    4345    $self->name("BarnOwl-Module-$name");
    44     $self->all_from("lib/BarnOwl/Module/$name.pm");
     46    $self->all_from("$srcdir/lib/BarnOwl/Module/$name.pm");
     47    $self->makemaker_args(PMLIBDIRS => ["$srcdir/lib"],
     48                          PMLIBPARENTDIRS => ["$srcdir/lib"]);
    4549
    4650    $self->postamble(<<"END_MAKEFILE");
    4751
    4852# --- $class section:
     53
     54BARNOWL_SRCDIR = $srcdir
     55export BARNOWL_SRCDIR
    4956
    5057$name.par: pm_to_blib
  • perl/modules/Makefile.am

    r1c22155 re4b8f93  
    1111        (cd $* && $(MAKE) $*.par)
    1212
     13BARNOWL_PERL := $(shell which perl) -I$(abs_srcdir)/../lib
     14
    1315MODULES_MAKEFILE = $(MODULES:=/Makefile)
    1416$(MODULES_MAKEFILE): %/Makefile: %/Makefile.PL ../lib/Module/Install/BarnOwl.pm
    15         [ $(srcdir) = . ] || cp -srf --no-preserve=mode -- $(abs_srcdir)/$*/. $*
    16         $(AM_V_GEN)(cd $* && perl -I../../lib Makefile.PL)
     17        $(AM_V_GEN)test -d $* || mkdir $*
     18        $(AM_V_at)test $(srcdir) = . || $(LN_S) $(abs_srcdir)/$*/Makefile.PL $*/Makefile.PL
     19        $(AM_V_at)(cd $* && BARNOWL_SRCDIR='$(abs_srcdir)/$*' && export BARNOWL_SRCDIR && $(BARNOWL_PERL) Makefile.PL 'PERL=$(BARNOWL_PERL)')
    1720
    1821MODULES_CLEAN = $(MODULES:%=clean_%)
    1922clean-local: $(MODULES_CLEAN)
    2023$(MODULES_CLEAN): clean_%:
    21         if [ $(srcdir) = . ]; then \
    22             (cd $* && { test ! -f Makefile || $(MAKE) realclean; }) && \
    23             rm -f $*/$*.par; \
    24             rm -rf $*/inc; \
    25         else \
    26             rm -rf $*; \
    27         fi
     24        (cd $* && { test ! -f Makefile || $(MAKE) realclean; })
     25        rm -f $*/$*.par
     26        rm -rf $*/inc
     27        test $(srcdir) = . || rm -f $*/Makefile.PL
    2828
    2929MODULES_INSTALL = $(MODULES:%=module_install_%)
Note: See TracChangeset for help on using the changeset viewer.