version 1.19, 2004/12/07 13:08:45 |
version 1.22, 2008/08/11 15:53:33 |
|
|
# $OpenXM: OpenXM/src/pari/Makefile,v 1.18 2003/11/10 09:12:24 noro Exp $ |
# $OpenXM: OpenXM/src/pari/Makefile,v 1.21 2004/12/09 18:54:31 ohara Exp $ |
|
|
#PARI = ../../../OpenXM_contrib/pari-2.2 |
# Choose one of pari version. |
PARI = ../../../OpenXM_contrib/pari |
# Example. |
OpenXM_ROOT = ../../../OpenXM |
# $ make install ( for PARI/GP 2.0.x) |
|
# $ make PARI_VER=2.2 install ( for PARI/GP 2.2.x) |
|
|
all: configure |
PARI_VER=2.0 |
@if [ ! -f ./.make_done ]; then \ |
#PARI_VER=2.2 |
(cd $(PARI) ; make lib-sta); \ |
|
fi |
|
@touch ./.make_done |
|
|
|
install: install-lib-bin |
## for PARI/GP unstable (2.2) |
|
PARI_DEVEL_VER=pari-2.2.8.alpha |
|
PARI_DEVEL_SUFFIX=.tar.gz |
|
|
#install-lib-bin: all install-lib |
## for PARI/GP unstable (2.2) |
# if [ ! -f ./.install-lib-bin_done ]; then \ |
PARI_23_VER=pari-2.3.4 |
# (cd $(PARI)/O*-* ; make install-include) ; \ |
PARI_23_SUFFIX=.tar.gz |
# if [ "`uname | sed -e 's/_.*$$//'`" != "CYGWIN" ]; then \ |
|
# (cd $(PARI)/O*-* ; make install-lib-dyn); \ |
|
# (cd $(PARI)/O*-* ; make install-bin); \ |
|
# (cd $(PARI)/O*-* ; make install-misc); \ |
|
# (cd $(PARI)/O*-* ; make install-man); \ |
|
# (cd $(PARI)/O*-* ; make install-data); \ |
|
# fi ; \ |
|
# touch ./.install-lib-bin_done ; \ |
|
# fi |
|
|
|
install-lib-bin: all install-lib |
all: build |
if [ ! -f ./.install-lib-bin_done ]; then \ |
|
(cd $(PARI)/O*-* ; make install-include) ; \ |
|
touch ./.install-lib-bin_done ; \ |
|
fi |
|
|
|
|
fetch extract patch configure build build-doc install install-doc clean distclean: |
install-doc: all |
@if [ "${PARI_VER}" = 2.3 ]; then \ |
(cd $(PARI) ; make doc) |
${MAKE} -f Makefile.2.0 PARI=${PARI_23_VER} DIST_SUFFIX=${PARI_23_SUFFIX} PATCH_FILE=${PARI_DEVEL_VER}.diff $@ ; \ |
@if [ ! -d $(OpenXM_ROOT)/doc/pari ]; then \ |
elif [ "${PARI_VER}" = 2.2 ]; then \ |
mkdir $(OpenXM_ROOT)/doc/pari ;\ |
${MAKE} -f Makefile.2.0 PARI=${PARI_DEVEL_VER} DIST_SUFFIX=${PARI_DEVEL_SUFFIX} $@ ; \ |
fi |
else \ |
-cp $(PARI)/doc/users.dvi $(OpenXM_ROOT)/doc/pari/users.dvi |
${MAKE} -f Makefile.2.0 $@ ; \ |
-cp $(PARI)/doc/tutorial.dvi $(OpenXM_ROOT)/doc/pari/tutorial.dvi |
|
|
|
clean: patch-clean |
|
@if [ -f ./.make_done ]; then \ |
|
(cd $(PARI) ; make clean) \ |
|
fi |
|
@rm -f ./.*_done |
|
|
|
distclean: |
|
@cat BINARIES | xargs -t rm -rf |
|
|
|
configure: patch |
|
@if [ ! -f ./.configure_done ]; then \ |
|
(cd $(PARI) ; ./Configure --prefix=../../../OpenXM) \ |
|
fi |
|
@touch ./.configure_done |
|
|
|
patch: |
|
@if [ ! -f ./.patch_done ]; then \ |
|
(cd $(PARI)/config ; patch < ../../../OpenXM/src/pari/Makefile.SH.diff) \ |
|
fi |
|
@touch ./.patch_done |
|
|
|
patch-clean: |
|
@if [ -f ./.patch_done ]; then \ |
|
(cd $(PARI)/config ; patch -R < ../../../OpenXM/src/pari/Makefile.SH.diff) \ |
|
fi |
|
@rm -f ./.patch_done |
|
|
|
install-lib: all |
|
if [ ! -f ./.install-lib_done ]; then \ |
|
(cd $(PARI) ; make install-lib-sta) ; \ |
|
ranlib ../../lib/libpari.a ; \ |
|
touch ./.install-lib_done ; \ |
|
fi |
fi |