3 # GNU Mes --- Maxwell Equations of Software
4 # Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
6 # This file is part of GNU Mes.
8 # GNU Mes is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or (at
11 # your option) any later version.
13 # GNU Mes is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
27 if test "$V" = 2; then
30 if test "$V" -gt 0; then
37 # Use bash or lose if pipes fail
38 if test -n "$BASHOPTS"; then
43 mkdir -p ${DESTDIR}${bindir}
44 cp $_v src/mes ${DESTDIR}${bindir}/mes
45 cp $_v scripts/mesar ${DESTDIR}${bindir}/mesar
46 cp $_v scripts/mescc.scm ${DESTDIR}${bindir}/mescc.scm
47 cp $_v scripts/mescc ${DESTDIR}${bindir}/mescc
50 -e "s,^#! /bin/sh,#! ${SHELL}," \
51 scripts/diff.scm > ${DESTDIR}${bindir}/diff.scm
52 chmod +x ${DESTDIR}${bindir}/diff.scm
54 mkdir -p ${DESTDIR}${docdir}
58 && ${PERL} -v > /dev/null\
59 && ! test -f .git-for-build; then
60 ${PERL} ${srcdest}build-aux/gitlog-to-changelog --srcdir=. > ChangeLog+
73 if test -f ChangeLog+; then
74 cp $_v ChangeLog+ ${DESTDIR}${docdir}/ChangeLog
77 cp $_v ChangeLog ${DESTDIR}${docdir}
80 mkdir -p $DESTDIR$libdir
81 mkdir -p $DESTDIR$pkgdatadir
82 # rm -f $(find lib -type f -a -executable)
83 # rm -f $(find scaffold -type f -a -executable)
84 tar -cf- -C ${srcdir} include lib/$mes_cpu-mes | tar -${v}xf- -C $DESTDIR$prefix
85 if test -z "$srcdest"; then
86 tar -cf- --exclude='*.go' module | tar -${v}xf- -C $DESTDIR$pkgdatadir
88 tar -cf- -C ${srcdest} module | tar -${v}xf- -C $DESTDIR$pkgdatadir
90 tar -cf- -C ${srcdest}mes module | tar -${v}xf- -C $DESTDIR$pkgdatadir
91 if test -d gcc-lib/$mes_cpu-mes; then
92 tar -cf- -C gcc-lib/$mes_cpu-mes . | tar -${v}xf- -C $DESTDIR$libdir
94 if test -d mescc-lib/$mes_cpu-mes; then
95 tar -cf- -C mescc-lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
98 mkdir -p ${DESTDIR}${guile_site_dir}
99 mkdir -p ${DESTDIR}${guile_site_ccache_dir}
100 tar -cf- -C ${srcdest}module --exclude='*.go' . | tar -${v}xf- -C ${DESTDIR}${guile_site_dir}
101 tar -cf- -C module --exclude='*.scm' . | tar -${v}xf- -C ${DESTDIR}${guile_site_ccache_dir}
103 if test -f doc/mes.info; then
104 mkdir -p ${DESTDIR}${infodir}
105 tar -cf- doc/mes.info* doc/images | tar -${v}xf- --strip-components=1 -C ${DESTDIR}${infodir}
106 install-info --info-dir=${DESTDIR}${infodir} doc/mes.info
109 if test -f doc/mes.1; then
110 mkdir -p ${DESTDIR}${mandir}/man1
111 cp $_v doc/mes.1 ${DESTDIR}${mandir}/man1/
114 if test -f doc/mescc.1; then
115 mkdir -p ${DESTDIR}${mandir}/man1
116 cp $_v doc/mescc.1 ${DESTDIR}${mandir}/man1/