=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/Makefile.am,v retrieving revision 1.18 retrieving revision 1.27 diff -u -p -r1.18 -r1.27 --- OpenXM_contrib2/asir2000/Makefile.am 2003/03/24 11:30:38 1.18 +++ OpenXM_contrib2/asir2000/Makefile.am 2007/11/11 15:54:02 1.27 @@ -1,4 +1,4 @@ -## $OpenXM: OpenXM_contrib2/asir2000/Makefile.am,v 1.17 2003/03/20 07:34:07 ohara Exp $ +## $OpenXM: OpenXM_contrib2/asir2000/Makefile.am,v 1.26 2007/11/11 08:44:12 ohara Exp $ AUTOMAKE_OPTIONS = foreign no-dependencies 1.5 if USE_PLOT @@ -15,9 +15,19 @@ asir_SOURCES = parse/main.c asir_LDADD = libasir.a libasir-gc.a CLEANFILES = ${asir_LDADD} asir-openxm-${VERSION}.tgz +GC_TAR_GZ = ${GC}.tar.gz +if USE_GC7 +GC_PATCH = gc-7.0-risa.diff +else +GC_PATCH = gc6.5-risa.diff +endif +GC_DISTDIR = @GC_DISTDIR@ +GC_MASTER_SITE=ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/misc/ +OX_FETCH = ${bindir}/oxfetch.sh + DEFS = @DEFS@ -DASIR_LIBDIR=\"${asirdir}\" INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/parse -I${top_srcdir}/io \ - -I${top_srcdir}/gc/include \ + -I${top_srcdir}/${GC}/include \ @PARIINC@ @MPIINC@ @X_CFLAGS@ GLIB = libasir-gc.a @@ -35,22 +45,39 @@ LIBS = @LIBS@ @PARILIB@ @MPILIB@ @LAPACKLIB@ ${X11 umain.o: parse/main.c ${COMPILE} -DUINIT main.c -o umain.o -libasir-gc.a: parse/gc_risa.c +libasir-gc.a: ${GC_PATCH} parse/gc_risa.c + -if [ ! -f ${top_srcdir}/.gc_fetch_done ]; then \ + if [ ! -f ${GC_DISTDIR}/${GC_TAR_GZ} ]; then \ + ${OX_FETCH} ${GC_MASTER_SITE}${GC_TAR_GZ} ${GC_DISTDIR}; \ + fi ; \ + touch ${top_srcdir}/.gc_fetch_done ; \ + fi + -if [ ! -f ${top_srcdir}/.gc_risa_done ]; then \ + (cd ${top_srcdir}; tar xzvf ${GC_DISTDIR}/${GC_TAR_GZ}) ; \ + (cd ${top_srcdir}/${GC}; patch -p1 < ../${GC_PATCH}) ; \ + touch ${top_srcdir}/.gc_risa_done ; \ + fi -if [ "${USE_GC_ZEROPAGE}" = yes \ - -a ! -f ${top_srcdir}/gc/.patch_gc_zeropage_done ]; then \ - (cd ${top_srcdir}/gc; patch < ../gc_zeropage.diff) ; \ - touch ${top_srcdir}/gc/.patch_gc_zeropage_done ; \ + -a ! -f ${top_srcdir}/${GC}/.patch_gc_zeropage_done ]; then \ + (cd ${top_srcdir}/${GC}; patch < ../gc_zeropage.diff) ; \ + touch ${top_srcdir}/${GC}/.patch_gc_zeropage_done ; \ fi - -if [ ! -f ${top_srcdir}/gc/.configure_done ]; then \ - if [ -n "${host_alias}" ]; then \ - (cd ${top_srcdir}/gc; ./configure --host=${host_alias} --disable-threads) ; \ - else \ - (cd ${top_srcdir}/gc; ./configure --disable-threads) ; \ - fi ; \ - touch ${top_srcdir}/gc/.configure_done ; \ + -if [ "${USE_GC_INTERIX}" = yes \ + -a ! -f ${top_srcdir}/${GC}/.patch_gc_interix_done ]; then \ + (cd ${top_srcdir}/${GC}; patch -p0 < ../gc_interix.diff) ; \ + touch ${top_srcdir}/${GC}/.patch_gc_interix_done ; \ fi - (cd ${top_srcdir}/gc; ${MAKE}) - cp ${top_srcdir}/gc/.libs/libgc.a ${GLIB} + -if [ "${USE_GC_SPARC64}" = yes \ + -a ! -f ${top_srcdir}/${GC}/.patch_gc_sparc64_done ]; then \ + (cd ${top_srcdir}/${GC}; patch -p0 < ../gc_sparc64.diff) ; \ + touch ${top_srcdir}/${GC}/.patch_gc_sparc64_done ; \ + fi + -if [ ! -f ${top_srcdir}/${GC}/.configure_done ]; then \ + (cd ${top_srcdir}/${GC}; ./configure ${GC_CONFIGURE_ARGS}) ; \ + touch ${top_srcdir}/${GC}/.configure_done ; \ + fi + (cd ${top_srcdir}/${GC}; ${MAKE}) + cp ${top_srcdir}/${GC}/.libs/libgc.a ${GLIB} (cd ${top_srcdir}/parse; ${MAKE} gc_risa.o) ${AR} q ${GLIB} ${top_srcdir}/parse/gc_risa.o ${RANLIB} ${GLIB}