Contents of /smage/trunk/include/mbuild.sminc
Parent Directory | Revision Log
Revision 11528 -
(show annotations)
(download)
Thu Dec 21 09:38:17 2017 UTC (6 years, 10 months ago) by niro
File size: 1394 byte(s)
Thu Dec 21 09:38:17 2017 UTC (6 years, 10 months ago) by niro
File size: 1394 byte(s)
-updated from upstream
1 | # $Id$ |
2 | # default magellan build |
3 | |
4 | mbuild_src_prepare() |
5 | { |
6 | munpack ${SRCFILE} || die |
7 | } |
8 | |
9 | mbuild_src_compile() |
10 | { |
11 | cd ${SRCDIR} |
12 | if [[ -x ./configure ]] |
13 | then |
14 | mconfigure || die |
15 | else |
16 | echo "mbuild: No configure found, skipping!" |
17 | fi |
18 | |
19 | mmake || die |
20 | } |
21 | |
22 | mbuild_multilib_src_compile() |
23 | { |
24 | mconfigure || die |
25 | mmake || die |
26 | } |
27 | |
28 | mbuild_src_check() |
29 | { |
30 | if [[ ${MULTILIB_BUILD} != true ]] |
31 | then |
32 | cd ${SRCDIR} |
33 | fi |
34 | mmake -j1 -k check || die |
35 | } |
36 | |
37 | mbuild_src_install() |
38 | { |
39 | cd ${SRCDIR} |
40 | mmake DESTDIR=${BINDIR} install || die |
41 | |
42 | local i |
43 | for i in ABOUT-NLS ANNOUNCE AUTHORS BUGS CHANGES \ |
44 | ChangeLog COPYING FAQ LICENSE NEWS README TODO |
45 | do |
46 | if [ -f ${SRCDIR}/${i} ] |
47 | then |
48 | minstalldocs ${i} || die |
49 | fi |
50 | done |
51 | } |
52 | |
53 | mbuild_multilib_src_install() |
54 | { |
55 | mmake DESTDIR=${BINDIR} install || die |
56 | |
57 | local i |
58 | local abi |
59 | local abis_to_run="${MULTILIB_ABIS}" |
60 | |
61 | # respect MULTILIB_ONLY_ABI variable |
62 | [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}" |
63 | for abi in ${abis_to_run} |
64 | do |
65 | cd ${SRCDIR}-${abi}/${SRCSUBDIR} |
66 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
67 | FAQ LICENSE NEWS README TODO |
68 | do |
69 | if [ -f ${SRCDIR}-${abi}/${i} ] |
70 | then |
71 | minstalldocs ${i} || die |
72 | fi |
73 | done |
74 | done |
75 | } |
76 | |
77 | export_inherits mbuild src_prepare src_check |
78 | if [[ ${MULTILIB_BUILD} = true ]] |
79 | then |
80 | export_inherits mbuild_multilib src_compile src_install |
81 | else |
82 | export_inherits mbuild src_compile src_install |
83 | fi |