# Makefile for octave's scripts/general directory
#
# Copyright (C) 1994, 1995, 1996, 1997, 2002, 2005, 2006, 2007
#               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 = general

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

include $(TOPDIR)/Makeconf

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

SOURCES = __isequal__.m __splinen__.m accumarray.m arrayfun.m \
  bicubic.m bitcmp.m bitget.m bitset.m blkdiag.m cart2pol.m \
  cart2sph.m cell2mat.m celldisp.m circshift.m common_size.m \
  cplxpair.m cumtrapz.m deal.m del2.m diff.m flipdim.m fliplr.m \
  flipud.m genvarname.m gradient.m idivide.m ind2sub.m int2str.m \
  interp1.m interp2.m interp3.m interpn.m interpft.m \
  is_duplicate_entry.m isa.m isdefinite.m isdir.m isequal.m \
  isequalwithequalnans.m isscalar.m issquare.m issymmetric.m \
  isvector.m logical.m logspace.m lookup.m mod.m nargchk.m \
  nargoutchk.m nextpow2.m nthroot.m num2str.m perror.m pol2cart.m \
  polyarea.m postpad.m prepad.m quadl.m randperm.m rat.m rem.m \
  repmat.m rot90.m rotdim.m shift.m shiftdim.m sortrows.m \
  sph2cart.m strerror.m structfun.m sub2ind.m trapz.m tril.m triu.m

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

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

all: 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
.PHONY: distclean

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

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