]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/perlmods/Makefile.am
Respect DESTDIR during the build process
[working/Evergreen.git] / Open-ILS / src / perlmods / Makefile.am
1 # Copyright (C) 2009 Equinox Software, Inc.
2 # Shawn Boyette <sboyette@esilibrary.com>
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 CLEANFILES = Build
15 DISTCLEANFILES = Makefile.in Makefile
16
17 all: build-perl
18         ./Build || make -s build-perl-fail
19
20 check: build-perl
21         ./Build test || make -s build-perl-fail
22
23 install: build-perl
24         ./Build install
25
26 build-perl:
27         perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail
28
29 build-perl-fail:
30         echo
31         echo ">>> Build/test of Perl modules has failed. The most likely"
32         echo ">>> possibility is that a dependency is not pre-installed"
33         echo ">>> or that a test has failed."
34         echo ">>> See the messages above this one for more information."
35         echo
36         exit 1
37
38 install-perl-fail:
39         echo
40         echo ">>> Install of Perl modules has failed."
41         echo ">>> Are you root?"
42         echo ">>> See the message above this one for more information."
43         echo
44
45 distclean-local:
46         rm -rf ./_build
47         rm -rf ./blib