version 1.18, 2003/11/10 09:12:24 |
version 1.28, 2021/03/25 03:02:40 |
|
|
# $OpenXM: OpenXM/src/pari/Makefile,v 1.17 2003/09/02 14:26:06 takayama Exp $ |
# $OpenXM: OpenXM/src/pari/Makefile,v 1.27 2020/08/26 06:03:31 noro Exp $ |
|
|
#PARI = ../../../OpenXM_contrib/pari-2.2 |
OpenXM_HOME=../.. |
PARI = ../../../OpenXM_contrib/pari |
PREFIX=${OpenXM_HOME} |
OpenXM_ROOT = ../../../OpenXM |
DISTDIR=${OpenXM_HOME}/../OpenXM_dist |
|
RM = /bin/rm |
|
RANLIB=ranlib |
|
PARI=pari-2.11.4 |
|
PATCH_FILE=${PARI}.diff |
|
MASTER_SITE=http://www.math.kobe-u.ac.jp/pub/OpenXM/misc/ |
|
DIST_SUFFIX=.tar.gz |
|
DISTFILES=${PARI}${DIST_SUFFIX} |
|
GALFILES=galdata.tgz galpol.tgz |
|
|
all: configure |
all: build |
@if [ ! -f ./.make_done ]; then \ |
|
(cd $(PARI) ; make lib-sta); \ |
|
fi |
|
@touch ./.make_done |
|
|
|
install: install-lib-bin |
fetch: |
|
-mkdir work |
|
@if [ ! -f work/.fetch_done ]; then \ |
|
for i in ${DISTFILES} ${GALFILES}; do \ |
|
${OpenXM_HOME}/bin/oxfetch.sh ${MASTER_SITE}"$$i" ${DISTDIR}; \ |
|
done; \ |
|
fi |
|
@touch work/.fetch_done |
|
|
#install-lib-bin: all install-lib |
extract: fetch |
# if [ ! -f ./.install-lib-bin_done ]; then \ |
@if [ ! -f work/.extract_done ]; then \ |
# (cd $(PARI)/O*-* ; make install-include) ; \ |
cat ${DISTDIR}/${DISTFILES} | (cd work ; tar xzvf -) ; \ |
# if [ "`uname | sed -e 's/_.*$$//'`" != "CYGWIN" ]; then \ |
for i in ${GALFILES}; do \ |
# (cd $(PARI)/O*-* ; make install-lib-dyn); \ |
cat ${DISTDIR}/"$$i" | (cd work/${PARI} ; tar xzvf -) ; \ |
# (cd $(PARI)/O*-* ; make install-bin); \ |
done; \ |
# (cd $(PARI)/O*-* ; make install-misc); \ |
fi |
# (cd $(PARI)/O*-* ; make install-man); \ |
@touch work/.extract_done |
# (cd $(PARI)/O*-* ; make install-data); \ |
|
# fi ; \ |
|
# touch ./.install-lib-bin_done ; \ |
|
# fi |
|
|
|
install-lib-bin: all install-lib |
patch: extract |
if [ ! -f ./.install-lib-bin_done ]; then \ |
@if [ ! -f work/.patch_done ]; then \ |
(cd $(PARI)/O*-* ; make install-include) ; \ |
if [ -f "${PATCH_FILE}" ]; then \ |
touch ./.install-lib-bin_done ; \ |
cat ${PATCH_FILE} | (cd work/${PARI} ; patch -p1 ) ; \ |
fi |
fi \ |
|
fi |
|
@touch work/.patch_done |
|
|
|
configure: patch |
install-doc: all |
@if [ ! -f work/.configure_done ]; then \ |
(cd $(PARI) ; make doc) |
prefix=`cd ${OpenXM_HOME}; pwd` ; \ |
@if [ ! -d $(OpenXM_ROOT)/doc/pari ]; then \ |
(cd work/${PARI} ; ./Configure --prefix="$$prefix" ) ; \ |
mkdir $(OpenXM_ROOT)/doc/pari ;\ |
|
fi |
fi |
-cp $(OpenXM_ROOT)/lib/pari/users.dvi $(OpenXM_ROOT)/doc/pari/users.dvi |
@touch work/.configure_done |
-cp $(OpenXM_ROOT)/lib/pari/tutorial.dvi $(OpenXM_ROOT)/doc/pari/tutorial.dvi |
|
|
|
clean: patch-clean |
build: configure |
@if [ -f ./.make_done ]; then \ |
@if [ ! -f work/.build_done ]; then \ |
(cd $(PARI) ; make clean) \ |
d=`cd work/${PARI} ; config/objdir` ; \ |
|
(cd work/${PARI}/$$d ; ${MAKE} lib-sta; ${MAKE} gp) ; \ |
fi |
fi |
@rm -f ./.*_done |
@touch work/.build_done |
|
|
distclean: |
build-doc: configure |
@cat BINARIES | xargs -t rm -rf |
@if [ ! -f work/.build_doc_done ]; then \ |
|
(cd work/${PARI} ; ${MAKE} doc) ; \ |
configure: patch |
|
@if [ ! -f ./.configure_done ]; then \ |
|
(cd $(PARI) ; ./Configure --prefix=../../../OpenXM) \ |
|
fi |
fi |
@touch ./.configure_done |
@touch work/.build_doc_done |
|
|
patch: |
install: build |
@if [ ! -f ./.patch_done ]; then \ |
-mkdir ${PREFIX}/bin ${PREFIX}/lib |
(cd $(PARI)/config ; patch < ../../../OpenXM/src/pari/Makefile.SH.diff) \ |
@if [ ! -f work/.install_done ]; then \ |
|
d=`cd work/${PARI} ; config/objdir` ; \ |
|
(cd work/${PARI}/$$d ; ${MAKE} install-lib-sta install-include install-lib-dyn install-data) ; \ |
|
${RANLIB} ${PREFIX}/lib/libpari.a ; \ |
fi |
fi |
@touch ./.patch_done |
@touch work/.install_done |
|
|
patch-clean: |
install-doc: build-doc |
@if [ -f ./.patch_done ]; then \ |
-mkdir ${PREFIX}/doc/pari |
(cd $(PARI)/config ; patch -R < ../../../OpenXM/src/pari/Makefile.SH.diff) \ |
@if [ ! -f work/.install_doc_done ]; then \ |
|
for i in users.dvi tutorial.dvi; do \ |
|
cp work/${PARI}/doc/$$i ${PREDIX}/doc/pari ; \ |
|
done ; \ |
fi |
fi |
@rm -f ./.patch_done |
@touch work/.install_doc_done |
|
|
install-lib: all |
clean: |
if [ ! -f ./.install-lib_done ]; then \ |
-${RM} -rf work |
(cd $(PARI) ; make install-lib-sta) ; \ |
|
ranlib ../../lib/libpari.a ; \ |
distclean: clean |
touch ./.install-lib_done ; \ |
|
fi |
|