

RM		= /bin/rm -f

# Makefile for Texinfo to nroff/troff translator (texi2roff)

BINDIR		= /usr/local/bin

# Flags:
# -DBSD controls use of string(s).h and strchr/index only (not needed for Sun)
# use -Dvoid=int for System III and V7
CFLAGS		= -O

CHMOD		= /bin/chmod

CP		= /bin/cp

EXETARGET	= texi2roff

MANDIR		= /usr/local/man/man1

MKDIR		= /bin/mkdir

OBJECTS		= texi2roff.o table.o translate.o

RM		= /bin/rm -f

SHELL		= /bin/sh

#=======================================================================

all:	$(EXETARGET)

$(EXETARGET): $(OBJECTS)
	$(CC) -o $@ $(CFLAGS) $(OBJECTS)

texi2roff.o : texi2roff.h

translate.o : texi2roff.h

table.o : texi2roff.h tablems.h tablemm.h tableme.h

bundle:
	bundle texi2roff.1 Readme copyright Makefile  *.h *.c >bundled
	ls -l bundled

clean mostlyclean:
	-$(RM) *.i
	-$(RM) *.o
	-$(RM) *~
	-$(RM) \#*
	-$(RM) a.out
	-$(RM) core
	-$(RM) errs

clobber distclean realclean:	clean
	-$(RM) $(EXETARGET)

install:	$(EXETARGET)
	-$(CP) $(EXETARGET) $(BINDIR)/$(EXETARGET)
	-$(CHMOD) 775 $(BINDIR)/$(EXETARGET)
	-$(MKDIR) $(MANDIR) 2>/dev/null
	-$(CP) texi2roff.1 $(MANDIR)/texi2roff.1
	-$(CHMOD) 664 $(MANDIR)/texi2roff.1

uninstall:
	-$(RM) $(BINDIR)/$(EXETARGET)
	-$(RM) $(MANDIR)/texi2roff.1
