# Makefile for octave's scripts/plot directory
#
# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007, 2008, 2009
#               John W. Eaton
#
# This file is part of Octave.
# 
# Octave is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
# 
# Octave is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License
# along with Octave; see the file COPYING.  If not, see
# <http://www.gnu.org/licenses/>.

TOPDIR = ../..

script_sub_dir = plot

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

include $(TOPDIR)/Makeconf

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

SOURCES = \
  __actual_axis_position__.m \
  __add_datasource__.m \
  __area__.m \
  __axes_limits__.m \
  __axis_label__.m \
  __bar__.m \
  __bars__.m \
  __clabel__.m \
  __contour__.m \
  __default_plot_options__.m \
  __errcomm__.m \
  __errplot__.m \
  __ezplot__.m \
  __gnuplot_has_feature__.m \
  __go_close_all__.m \
  __go_draw_axes__.m \
  __go_draw_figure__.m \
  __gnuplot_ginput__.m \
  __gnuplot_version__.m \
  __line__.m \
  __next_line_color__.m \
  __patch__.m \
  __plr1__.m \
  __plr2__.m \
  __plt1__.m \
  __plt2__.m \
  __plt2mm__.m \
  __plt2mv__.m \
  __plt2ss__.m \
  __plt2sv__.m \
  __plt2vm__.m \
  __plt2vs__.m \
  __plt2vv__.m \
  __plt__.m \
  __plt_get_axis_arg__.m \
  __pltopt1__.m \
  __pltopt__.m \
  __quiver__.m \
  __scatter__.m \
  __stem__.m \
  allchild.m \
  ancestor.m \
  area.m \
  axes.m \
  axis.m \
  backend.m \
  bar.m \
  barh.m \
  box.m \
  caxis.m \
  cla.m \
  clabel.m \
  clf.m \
  close.m \
  closereq.m \
  colorbar.m \
  comet.m \
  compass.m \
  contour3.m \
  contour.m \
  contourc.m \
  contourf.m \
  cylinder.m \
  diffuse.m \
  gnuplot_drawnow.m \
  ellipsoid.m \
  errorbar.m \
  ezcontourf.m \
  ezcontour.m \
  ezmeshc.m \
  ezmesh.m \
  ezplot.m \
  ezplot3.m \
  ezpolar.m \
  ezsurfc.m \
  ezsurf.m \
  feather.m \
  figure.m \
  fill.m \
  findall.m \
  findobj.m \
  fplot.m \
  gca.m \
  gcbf.m \
  gcbo.m \
  gcf.m \
  ginput.m \
  grid.m \
  gtext.m \
  hggroup.m \
  hidden.m \
  hist.m \
  hold.m \
  isfigure.m \
  ishghandle.m \
  ishold.m \
  legend.m \
  line.m \
  linkprop.m \
  loglog.m \
  loglogerr.m \
  mesh.m \
  meshc.m \
  meshgrid.m \
  meshz.m \
  ndgrid.m \
  newplot.m \
  orient.m \
  pareto.m \
  patch.m \
  pcolor.m \
  peaks.m \
  pie.m \
  plot.m \
  plotmatrix.m \
  plotyy.m \
  plot3.m \
  plotyy.m \
  polar.m \
  print.m \
  quiver.m \
  quiver3.m \
  refresh.m \
  refreshdata.m \
  replot.m \
  ribbon.m \
  rose.m \
  scatter.m \
  scatter3.m \
  semilogx.m \
  semilogxerr.m \
  semilogy.m \
  semilogyerr.m \
  shading.m \
  shg.m \
  slice.m \
  sombrero.m \
  specular.m \
  sphere.m \
  spinmap.m \
  stairs.m \
  stem.m \
  stem3.m \
  subplot.m \
  surf.m \
  surface.m \
  surfc.m \
  surfl.m \
  surfnorm.m \
  text.m \
  title.m \
  view.m \
  waitforbuttonpress.m \
  xlabel.m \
  xlim.m \
  ylabel.m \
  ylim.m \
  zlabel.m \
  zlim.m

SOURCES_IN = gnuplot_binary.in

GEN_M = $(SOURCES_IN:.in=.m)

DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(SOURCES) $(SOURCES_IN))

FCN_FILES = $(addprefix $(srcdir)/, $(SOURCES)) $(GEN_M)
FCN_FILES_NO_DIR = $(notdir $(FCN_FILES))

all: $(GEN_M) PKG_ADD
.PHONY: all

install install-strip:
	$(do-script-install)
.PHONY: install install-strip

uninstall:
	$(do-script-uninstall)
.PHONY: uninstall

clean:
.PHONY: clean

PKG_ADD: $(FCN_FILES)
	@echo "making PKG_ADD"
	@$(do-mkpkgadd)

tags: $(SOURCES)
	ctags $(SOURCES)

TAGS: $(SOURCES)
	etags $(SOURCES)

mostlyclean: clean
.PHONY: mostlyclean

distclean: clean
	rm -f Makefile PKG_ADD $(GEN_M)
.PHONY: distclean

maintainer-clean: distclean
	rm -f tags TAGS
.PHONY: maintainer-clean

dist:
	ln $(DISTFILES) ../../`cat ../../.fname`/scripts/plot
.PHONY: dist

$(GEN_M): %.m : %.in $(TOPDIR)/Makeconf
	@$(do-subst-config-vals)

check-m-sources:
	@$(do-check-m-sources)
.PHONY: check-m-sources
