=================================================================== RCS file: /home/cvs/OpenXM/src/gnuplot/Makefile,v retrieving revision 1.1 retrieving revision 1.11 diff -u -p -r1.1 -r1.11 --- OpenXM/src/gnuplot/Makefile 2000/01/07 18:03:25 1.1 +++ OpenXM/src/gnuplot/Makefile 2004/03/31 01:06:10 1.11 @@ -1,34 +1,54 @@ -# $OpenXM$ +# $OpenXM: OpenXM/src/gnuplot/Makefile,v 1.10 2004/03/30 10:27:30 ohara Exp $ -GNUPLOT = ../../../OpenXM_contrib/gnuplot -CURDIR = ../../OpenXM/src/gnuplot -BINDIR = ../../bin +OpenXM_HOME = ../.. +DISTNAME = gnuplot-3.7.3 +DISTFILES = ${DISTNAME}.tar.gz +DISTDIR = ${OpenXM_HOME}/../OpenXM_dist +WRKSRC = work/${DISTNAME} +PATCHES = configure.diff plot.c.diff -all: patch - @if [ ! -f ./.make_done ]; then \ - (cd $(GNUPLOT) ; ./configure --with-x ; make) \ +all: build + +fetch: + -mkdir work + @if [ ! -f work/.fetch_done ]; then \ + ${OpenXM_HOME}/bin/oxfetch.sh ${MASTER_SITE}${DISTFILES} ${DISTDIR}; \ fi - @touch ./.make_done + @touch work/.fetch_done -install: all - install -c -s $(GNUPLOT)/gnuplot $(BINDIR)/gnuplot4ox - install -c -s $(GNUPLOT)/gnuplot_x11 $(BINDIR)/gnuplot_x11 +extract: fetch + @if [ ! -f work/.extract_done ]; then \ + cat ${DISTDIR}/${DISTFILES} | (cd work ; tar xzvf -) ; \ + fi + @touch work/.extract_done -clean: patch-clean - @if [ -f ./.make_done ]; then \ - (cd $(GNUPLOT) ; make distclean) \ +patch: extract + @if [ ! -f work/.patch_done ]; then \ + for i in ${PATCHES}; do cat $$i | (cd ${WRKSRC}; patch -p0); done ; \ fi - rm -f $(BINDIR)/gnuplot4ox $(BINDIR)/gnuplot_x11 - @rm -f ./.make_done + @touch work/.patch_done -patch: - @if [ ! -f ./.patch_done ]; then \ - (cd $(GNUPLOT) ; patch < $(CURDIR)/plot.c.diff) \ +configure: patch + if [ ! -f work/.configure_done ]; then \ + prefix=`cd ${OpenXM_HOME}; pwd` ; \ + (cd ${WRKSRC} ; ./configure --with-x --prefix="$$prefix" ) ; \ fi - @touch ./.patch_done + @touch work/.configure_done -patch-clean: - @if [ -f ./.patch_done ]; then \ - (cd $(GNUPLOT) ; patch -R < $(CURDIR)/plot.c.diff) \ +build: configure + @if [ ! -f work/.build_done ]; then \ + (cd ${WRKSRC} ; ${MAKE} ) ; \ fi - @rm -f ./.patch_done + @touch work/.build_done + +install: build + @if [ ! -f work/.install_done ]; then \ + (cd ${WRKSRC} ; ${MAKE} install) ; \ + fi + @touch work/.install_done + +clean: + -rm -rf work + +distclean: clean + -rm -f ${OpenXM_HOME}/bin/gnuplot4ox ${OpenXM_HOME}/bin/gnuplot_x11