[BACK]Return to Makefile.2.0 CVS log [TXT][DIR] Up to [local] / OpenXM / src / pari

File: [local] / OpenXM / src / pari / Attic / Makefile.2.0 (download)

Revision 1.2, Thu Dec 9 18:54:31 2004 UTC (19 years, 5 months ago) by ohara
Branch: MAIN
Changes since 1.1: +3 -2 lines

Example:
  make install              (for PARI/GP 2.0.x)
  make PARI_VER=2.2 install (for PARI/GP 2.2.x)

# $OpenXM: OpenXM/src/pari/Makefile.2.0,v 1.2 2004/12/09 18:54:31 ohara Exp $
OpenXM_HOME=../..
PREFIX=${OpenXM_HOME}
DISTDIR=${OpenXM_HOME}/../OpenXM_dist
RM = /bin/rm
RANLIB=ranlib
PARI=pari-2.0.17.beta
PATCH_FILE=${PARI}.diff
MASTER_SITE=ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/misc/
DIST_SUFFIX=.tgz
DISTFILES=${PARI}${DIST_SUFFIX}

all: build 

fetch:
	-mkdir work
	@if [ ! -f work/.fetch_done ]; then \
		${OpenXM_HOME}/bin/oxfetch.sh ${MASTER_SITE}${DISTFILES} ${DISTDIR}; \
	fi 
	@touch work/.fetch_done

extract: fetch
	@if [ ! -f work/.extract_done ]; then \
	    cat ${DISTDIR}/${DISTFILES} | (cd work ; tar xzvf -) ; \
	fi 
	@touch work/.extract_done

patch: extract
	@if [ ! -f work/.patch_done ]; then \
	    cat ${PATCH_FILE} | (cd work ; patch -p ) ; \
	fi 
	@touch work/.patch_done

configure: patch
	@if [ ! -f work/.configure_done ]; then \
		prefix=`cd ${OpenXM_HOME}; pwd` ; \
		(cd work/${PARI} ; ./Configure --prefix="$$prefix" ) ; \
	fi
	@touch work/.configure_done

build: configure
	@if [ ! -f work/.build_done ]; then \
		(cd work/${PARI} ; ${MAKE} lib-sta) ; \
	fi
	@touch work/.build_done

build-doc: configure
	@if [ ! -f work/.build_doc_done ]; then \
		(cd work/${PARI} ; ${MAKE} doc) ; \
	fi
	@touch work/.build_doc_done

install: build
	-mkdir ${PREFIX}/bin ${PREFIX}/lib
	@if [ ! -f work/.install_done ]; then \
		(cd work/${PARI} ; ${MAKE} install-lib-sta install-include) ; \
		${RANLIB} ${PREFIX}/lib/libpari.a ; \
	fi
	@touch work/.install_done

install-doc: build-doc
	-mkdir ${PREFIX}/doc/pari
	@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
	@touch work/.install_doc_done

clean:
	-${RM} -rf work

distclean: clean