=================================================================== RCS file: /home/cvs/OpenXM/src/gnuplot/Makefile,v retrieving revision 1.1 retrieving revision 1.8 diff -u -p -r1.1 -r1.8 --- OpenXM/src/gnuplot/Makefile 2000/01/07 18:03:25 1.1 +++ OpenXM/src/gnuplot/Makefile 2004/02/22 13:58:58 1.8 @@ -1,34 +1,53 @@ -# $OpenXM$ +# $OpenXM: OpenXM/src/gnuplot/Makefile,v 1.7 2000/02/07 11:11:15 ohara Exp $ GNUPLOT = ../../../OpenXM_contrib/gnuplot CURDIR = ../../OpenXM/src/gnuplot BINDIR = ../../bin -all: patch - @if [ ! -f ./.make_done ]; then \ - (cd $(GNUPLOT) ; ./configure --with-x ; make) \ +all: configure + @if [ ! -f $(GNUPLOT)/.make_done ]; then \ + if [ `uname` = "SunOS" ]; then \ + (cd $(GNUPLOT) ; make all LDFLAGS="-lsocket -lnsl" ) ; \ + else \ + (cd $(GNUPLOT) ; make all) ; \ + fi ; \ fi - @touch ./.make_done + @touch $(GNUPLOT)/.make_done install: all - install -c -s $(GNUPLOT)/gnuplot $(BINDIR)/gnuplot4ox - install -c -s $(GNUPLOT)/gnuplot_x11 $(BINDIR)/gnuplot_x11 + if [ `uname` = "OSF1" ]; then \ + installbsd -c -s $(GNUPLOT)/gnuplot $(BINDIR)/gnuplot4ox ; \ + installbsd -c -s $(GNUPLOT)/gnuplot_x11 $(BINDIR)/gnuplot_x11 ; \ + else \ + install -c -s $(GNUPLOT)/gnuplot $(BINDIR)/gnuplot4ox ; \ + install -c -s $(GNUPLOT)/gnuplot_x11 $(BINDIR)/gnuplot_x11; \ + fi clean: patch-clean - @if [ -f ./.make_done ]; then \ + @if [ -f $(GNUPLOT)/.make_done ]; then \ (cd $(GNUPLOT) ; make distclean) \ fi + @rm -f $(GNUPLOT)/.make_done $(GNUPLOT)/.configure_done + +distclean: rm -f $(BINDIR)/gnuplot4ox $(BINDIR)/gnuplot_x11 - @rm -f ./.make_done +configure: patch + @if [ ! -f $(GNUPLOT)/.configure_done ]; then \ + (cd $(GNUPLOT) ; ./configure --with-x) ; \ + (cd $(GNUPLOT) ; make distclean) ; \ + (cd $(GNUPLOT) ; ./configure --with-x) ; \ + fi + @touch $(GNUPLOT)/.configure_done + patch: - @if [ ! -f ./.patch_done ]; then \ + -@if [ ! -f $(GNUPLOT)/.patch_done ]; then \ (cd $(GNUPLOT) ; patch < $(CURDIR)/plot.c.diff) \ fi - @touch ./.patch_done + @touch $(GNUPLOT)/.patch_done patch-clean: - @if [ -f ./.patch_done ]; then \ + @if [ -f $(GNUPLOT)/.patch_done ]; then \ (cd $(GNUPLOT) ; patch -R < $(CURDIR)/plot.c.diff) \ fi - @rm -f ./.patch_done + @rm -f $(GNUPLOT)/.patch_done