]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/Makefile.am
b4431101ffa813ae08131a88d4c46762ffd4c7f2
[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 bin_SCRIPTS = Build lib/OpenILS/Utils/Cronscript.pm
15
16 CLEANFILES = $(bin_SCRIPTS)
17
18 DISTCLEANFILES = Makefile.in Makefile
19
20 do_subst = $(SED) -e 's,[@]sysconfdir@,$(sysconfdir),g'
21
22 all: build-perl
23         ./Build || make -s build-perl-fail
24
25 check: build-perl
26         ./Build test || make -s build-perl-fail
27
28 livecheck: build-perl
29         ./Build test --test_files live_t || make -s build-perl-fail
30
31 install: build-perl
32         ./Build install
33
34 build-perl: lib/OpenILS/Utils/Cronscript.pm
35         perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail
36
37 lib/OpenILS/Utils/Cronscript.pm: Makefile lib/OpenILS/Utils/Cronscript.pm.in
38         $(do_subst) lib/OpenILS/Utils/Cronscript.pm.in > "$@"
39
40 build-perl-fail:
41         echo
42         echo ">>> Build/test of Perl modules has failed. The most likely"
43         echo ">>> possibility is that a dependency is not pre-installed"
44         echo ">>> or that a test has failed."
45         echo ">>> See the messages above this one for more information."
46         echo
47         exit 1
48
49 install-perl-fail:
50         echo
51         echo ">>> Install of Perl modules has failed."
52         echo ">>> Are you root?"
53         echo ">>> See the message above this one for more information."
54         echo
55
56 distclean-local:
57         rm -rf ./_build
58         rm -rf ./blib