source: perl/modules/Makefile.am @ 8de7c84

release-1.10
Last change on this file since 8de7c84 was e4b8f93, checked in by Anders Kaseorg <andersk@mit.edu>, 11 years ago
Really support building Perl modules from a separate builddir Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 1.3 KB
Line 
1MODULES = Jabber IRC WordWrap Twitter Facebook
2
3EXTRA_DIST = $(MODULES:=/Makefile.PL) $(MODULES:=/lib)
4EXTRA_DIST += \
5    Facebook/README \
6    Twitter/README \
7    Twitter/twitter.example
8
9all-local: $(MODULES)
10$(MODULES): %: %/Makefile
11        (cd $* && $(MAKE) $*.par)
12
13BARNOWL_PERL := $(shell which perl) -I$(abs_srcdir)/../lib
14
15MODULES_MAKEFILE = $(MODULES:=/Makefile)
16$(MODULES_MAKEFILE): %/Makefile: %/Makefile.PL ../lib/Module/Install/BarnOwl.pm
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)')
20
21MODULES_CLEAN = $(MODULES:%=clean_%)
22clean-local: $(MODULES_CLEAN)
23$(MODULES_CLEAN): clean_%:
24        (cd $* && { test ! -f Makefile || $(MAKE) realclean; })
25        rm -f $*/$*.par
26        rm -rf $*/inc
27        test $(srcdir) = . || rm -f $*/Makefile.PL
28
29MODULES_INSTALL = $(MODULES:%=module_install_%)
30install-data-local: $(MODULES_INSTALL)
31installdirs-local:
32        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/modules/
33$(MODULES_INSTALL): module_install_%: % installdirs-local
34        ${INSTALL_DATA} $*/$*.par ${DESTDIR}${pkgdatadir}/modules/$*.par
35
36uninstall-local:
37        rm -f $(MODULES:%=${DESTDIR}${pkgdatadir}/modules/%.par)
38
39.PHONY: $(MODULES) $(MODULES_CLEAN) $(MODULES_INSTALL)
Note: See TracBrowser for help on using the repository browser.