]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/perlmods/Makefile.am
Merge remote branch 'working/user/dbwells/shared_siss_editor'
[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 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 install: build-perl
29         ./Build install
30
31 build-perl: lib/OpenILS/Utils/Cronscript.pm
32         perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail
33
34 lib/OpenILS/Utils/Cronscript.pm: Makefile lib/OpenILS/Utils/Cronscript.pm.in
35         $(do_subst) lib/OpenILS/Utils/Cronscript.pm.in > "$@"
36
37 build-perl-fail:
38         echo
39         echo ">>> Build/test of Perl modules has failed. The most likely"
40         echo ">>> possibility is that a dependency is not pre-installed"
41         echo ">>> or that a test has failed."
42         echo ">>> See the messages above this one for more information."
43         echo
44         exit 1
45
46 install-perl-fail:
47         echo
48         echo ">>> Install of Perl modules has failed."
49         echo ">>> Are you root?"
50         echo ">>> See the message above this one for more information."
51         echo
52
53 distclean-local:
54         rm -rf ./_build
55         rm -rf ./blib