# Generated automatically from Makefile.in by configure.
# Makefile for GNU permuted indexer.
# Copyright (C) 1990, 1991, 1993, 1994 Free Software Foundation, Inc.
# Francois Pinard <pinard@iro.umontreal.ca>, 1990.

# This program 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 2, or (at your option)
# any later version.

# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

PRODUCT = ptx
VERSION = 0.4
PROGRAMS = @PROGRAMS@

SHELL = /bin/sh
srcdir = //1/ez/ptx-0.4
VPATH = //1/ez/ptx-0.4

AR = ar
CC = cc
CFLAGS = -g
CPPFLAGS = 
DEFS = -DHAVE_CONFIG_H
INSTALL = /usr/local/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
LDFLAGS = 
LIBS = 
MAKEINFO = makeinfo
RANLIB = :
TEXI2DVI = texi2dvi

prefix = /usr/local
exec_prefix = ${prefix}
transform = s,x,x,
bindir = $(exec_prefix)/bin
datadir = $(prefix)/share
infodir = $(prefix)/info

COMPILE = $(CC) -c -DDEFAULT_IGNORE_FILE=\"$(datadir)/eign\" \
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)

LINK = $(CC) $(LDFLAGS) -o $@

.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
	$(COMPILE) $<

ANSI2KNR = 
O = .o

.SUFFIXES: ._c ._o
.c._c:
	./ansi2knr $< > $@
._c._o:
	@echo $(COMPILE) $<
	@rm -f _$*.c
	@ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
.c._o:
	./ansi2knr $< > $*._c
	@echo $(COMPILE) $*._c
	@rm -f _$*.c
	@ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c

INCLUDES = -I. -I$(srcdir)

HEADERS = bumpalloc.h diacrit.h
SOURCES = ptx.c diacrit.c
OBJECTS = ptx$O diacrit$O
LIBHDRS = getopt.h regex.h
LIBSRCS = regex.c argmatch.c error.c xmalloc.c getopt.c getopt1.c alloca.c
LIBOBJS = regex.o argmatch.o error.o xmalloc.o getopt.o getopt1.o alloca.o

DISTFILES = README NEWS TODO THANKS COPYING INSTALL ChangeLog \
configure.in aclocal.m4 acconfig.h mkinstalldirs install-sh Makefile.in \
ptx.texinfo texinfo.tex eign ansi2knr.c ansi2knr.1 c-boxes.el \
$(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS) check-out \
stamp-h.in config.h.in configure stamp-vti version.texi ptx.info TAGS BACKLOG

all: ptx.info ptx

info: ptx.info

ptx.info: ptx.texinfo version.texi
	cd $(srcdir) && $(MAKEINFO) --no-split ptx.texinfo

dvi: ptx.dvi

ptx.dvi: ptx.texinfo
	$(TEXI2DVI) $(srcdir)/ptx.texinfo

version.texi: stamp-vti
stamp-vti: ptx.texinfo configure.in
	echo "@set EDITION $(VERSION)" > version.tmp
	echo "@set UPDATED `date '+%B %Y'`" >> version.tmp
	echo "@set VERSION $(VERSION)" >> version.tmp
	if cmp -s version.tmp $(srcdir)/version.texi; then rm version.tmp; \
	else mv version.tmp $(srcdir)/version.texi; fi
	date > $(srcdir)/stamp-vti

ptx: $(OBJECTS) libptx.a
	$(LINK) $(OBJECTS) libptx.a $(LIBS)

$(OBJECTS): $(ANSI2KNR) config.h
ptx$O: bumpalloc.h diacrit.h getopt.h regex.h
diacrit$O: diacrit.h

ansi2knr: ansi2knr.o
	$(LINK) ansi2knr.o $(LIBS)

libptx.a: $(LIBOBJS)
	rm -f libptx.a
	$(AR) cru libptx.a $(LIBOBJS)
	$(RANLIB) libptx.a

$(LIBOBJS): config.h
getopt.o getopt1.o: getopt.h
regex.o: regex.h

CHECK_OPTIONS = -i /dev/null -AfW i.i

check: ptx
	./ptx $(CHECK_OPTIONS) < $(srcdir)/COPYING > check-out.tmp
	cmp $(srcdir)/check-out check-out.tmp
	rm check-out.tmp
	@echo Check successful

make-check-out: ptx
	./ptx $(CHECK_OPTIONS) < $(srcdir)/COPYING > check-out.tmp
	mv check-out.tmp $(srcdir)/check-out

install: all
	$(srcdir)/mkinstalldirs $(bindir) $(datadir) $(infodir)
	$(INSTALL_PROGRAM) ptx $(bindir)/`echo ptx | sed '$(transform)'`
	$(INSTALL_DATA) $(srcdir)/eign $(datadir)/eign
	$(INSTALL_DATA) $(srcdir)/ptx.info $(infodir)/ptx.info

uninstall:
	rm -f $(bindir)/`echo ptx | sed '$(transform)'`
	rm -f $(datadir)/eign
	rm -f $(infodir)/ptx.info

tags: TAGS

TAGS: $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)
	cd $(srcdir) && etags $(HEADERS) $(SOURCES) $(LIBHDRS) $(LIBSRCS)

mostlyclean:
	rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
	rm -f *.a *.o *._c *._o core core.*
	rm -f *.tmp

clean: mostlyclean
	rm -f ptx

distclean: clean
	rm -f ansi2knr
	rm -f Makefile config.cache config.h config.log stamp-h config.status

realclean: distclean
	rm -f stamp-vti version.texi ptx.info
	rm -f TAGS

dist: $(DISTFILES)
	rm -rf $(PRODUCT)-$(VERSION)
	mkdir $(PRODUCT)-$(VERSION)
	chmod 777 $(PRODUCT)-$(VERSION)
	@echo "Copying distribution files"
	@for file in $(DISTFILES); do \
	  ln $(srcdir)/$$file $(PRODUCT)-$(VERSION) 2> /dev/null \
	    || cp -p $(srcdir)/$$file $(PRODUCT)-$(VERSION); \
	done
	chmod -R a+r $(PRODUCT)-$(VERSION)
	tar chozf $(PRODUCT)-$(VERSION).tar.gz $(PRODUCT)-$(VERSION)
	rm -rf $(PRODUCT)-$(VERSION)

# For an explanation of the following Makefile rules, see node
# `Automatic Remaking' in GNU Autoconf documentation.
Makefile: Makefile.in config.status
	CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
config.status: configure
	./config.status --recheck
configure: configure.in aclocal.m4
	cd $(srcdir) && autoconf

config.h: stamp-h
stamp-h: config.h.in config.status
	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
	date > stamp-h
config.h.in: stamp-h.in
stamp-h.in: configure.in aclocal.m4 acconfig.h
	cd $(srcdir) && autoheader
	date > $(srcdir)/stamp-h.in

# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
