source: perl/modules/Makefile.am @ c53f5e8

Last change on this file since c53f5e8 was e4b8f93, checked in by Anders Kaseorg <andersk@mit.edu>, 9 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
RevLine 
[35c5bd8]1MODULES = Jabber IRC WordWrap Twitter Facebook
[b9c8d28]2
[1c22155]3EXTRA_DIST = $(MODULES:=/Makefile.PL) $(MODULES:=/lib)
[b80bae0]4EXTRA_DIST += \
5    Facebook/README \
6    Twitter/README \
7    Twitter/twitter.example
[b9c8d28]8
9all-local: $(MODULES)
10$(MODULES): %: %/Makefile
11        (cd $* && $(MAKE) $*.par)
12
[e4b8f93]13BARNOWL_PERL := $(shell which perl) -I$(abs_srcdir)/../lib
14
[b9c8d28]15MODULES_MAKEFILE = $(MODULES:=/Makefile)
[1c22155]16$(MODULES_MAKEFILE): %/Makefile: %/Makefile.PL ../lib/Module/Install/BarnOwl.pm
[e4b8f93]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)')
[b9c8d28]20
21MODULES_CLEAN = $(MODULES:%=clean_%)
22clean-local: $(MODULES_CLEAN)
23$(MODULES_CLEAN): clean_%:
[e4b8f93]24        (cd $* && { test ! -f Makefile || $(MAKE) realclean; })
25        rm -f $*/$*.par
26        rm -rf $*/inc
27        test $(srcdir) = . || rm -f $*/Makefile.PL
[b9c8d28]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
[a870319]36uninstall-local:
37        rm -f $(MODULES:%=${DESTDIR}${pkgdatadir}/modules/%.par)
38
[65b9a40]39.PHONY: $(MODULES) $(MODULES_CLEAN) $(MODULES_INSTALL)
Note: See TracBrowser for help on using the repository browser.