PGM=s.in.grid

# change the following to fit your installation.
# possibilities are /bin/nawk, /bin/awk, /usr/local/bin/gawk, whatever.
# Ask your system admin about what is available.
#
# Beware that Sun's /bin/awk in Solaris 2.x and SunOS 4.1.x has a record
# limit of less than 100 fields. Thus, if you have 100 columns or more
# in your grid, /bin/awk won't work.

AWK=/usr/bin/awk

PROG=$(GISBASE)/scripts/$(PGM)

MSEC=4
MDIR=$(SRC)/../man/man$(MSEC)
MUTL=$(SRC)/../man/utilities


#all : $(PROG) man

all:
	echo "#!"$(AWK)" -f" > $(PROG)
	cat s.in.grid.awk >> $(PROG)
	chmod 755 $(PROG)

man:
	-cp $(PGM).man $(MDIR)/$(PGM)
	$(NROFF) $(MUTL)/man.version $(MDIR)/.class-header \
	 $(MUTL)/man.header $(PGM).man $(MDIR)/.class-notice \
	 > $(GISBASE)/man/$(MSEC)/$(PGM)


clean: 
	-rm -f *.BAK core *~ $(PGM) tags plt.dat plt.gp 
	-rm -f *.bbl *.blg *.dvi *.aux *.log *.toc

realclean: clean
	-rm -rf OBJ* LIB*

veryclean: realclean

dist: veryclean
	(cd .. ; tar cvf $(PGM).tar $(PGM); gzip $(PGM).tar; mv $(PGM).tar.gz /home/pasture/a/ftp/pub/mccauley/grass)
