source: perl/modules/Makefile.am @ 53151d4

Last change on this file since 53151d4 was eb5e8fc, checked in by Anders Kaseorg <andersk@mit.edu>, 9 years ago
Allow building in a separate build directory Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 1.1 KB
Line 
1MODULES = Jabber IRC WordWrap Twitter Facebook
2
3EXTRA_DIST = $(MODULES:=/Makefile.PL) $(MODULES:=/inc) $(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
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        else \
25            rm -rf $*; \
26        fi
27
28MODULES_INSTALL = $(MODULES:%=module_install_%)
29install-data-local: $(MODULES_INSTALL)
30installdirs-local:
31        $(mkinstalldirs) ${DESTDIR}${pkgdatadir}/modules/
32$(MODULES_INSTALL): module_install_%: % installdirs-local
33        ${INSTALL_DATA} $*/$*.par ${DESTDIR}${pkgdatadir}/modules/$*.par
34
35uninstall-local:
36        rm -f $(MODULES:%=${DESTDIR}${pkgdatadir}/modules/%.par)
37
38.PHONY: $(MODULES) $(MODULES_CLEAN) $(MODULES_INSTALL)
Note: See TracBrowser for help on using the repository browser.