source: perl/modules/Makefile.am @ 1c22155

Last change on this file since 1c22155 was 1c22155, checked in by Anders Kaseorg <andersk@mit.edu>, 9 years ago
Get rid of all our embedded copies of Module::Install Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 1.2 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
13MODULES_MAKEFILE = $(MODULES:=/Makefile)
14$(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
18MODULES_CLEAN = $(MODULES:%=clean_%)
19clean-local: $(MODULES_CLEAN)
20$(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
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.