# makefile that comes with distribution is in Makefile.original

TOP=../..
include $(TOP)/mk/boilerplate.mk

PROGRAMS = makeinfo postmakeinfo
# the last is a script that helps cooperation w/ the literate programming stuff 

all:: $(PROGRAMS)

# CC = gcc termcap'ping does not work right with gcc on sun4s for info

# Colon-separated list of directories in which to look for info files.
DEFAULT_INFOPATH=

# Command used to print out a text file.  The filename follows this command.
INFO_PRINT_COMMAND = lpr

PATHSPEC = -DDEFAULT_INFOPATH='"$(DEFAULT_INFOPATH)"'
PRINTSPEC = -DINFO_PRINT_COMMAND='"$(INFO_PRINT_COMMAND)"'

INFO_DEFINES = $(PATHSPEC) $(PRINTSPEC)

# TRACK_SRCFILE and ALLOW_JUNK are partain additions
MAKEINFO_DEFINES = -DTRACK_SRCFILE -DALLOW_JUNK

# roll them together; hurts nothing... 
SRC_CC_OPTS = $(INFO_DEFINES) $(MAKEINFO_DEFINES)

C_SRCS          = makeinfo.c getopt.c getopt1.c
INFO_OBJS_C     = getopt.o getopt1.o
MAKEINFO_OBJS_C = makeinfo.o getopt.o getopt1.o

#
#HEADERS = getopt.h
#SUPPORT = Makefile ChangeLog testfile.texinfo test-suite.texinfo\
#	default-nodes.texinfo
#

makeinfo : $(MAKEINFO_OBJS_C)
	$(CC) $(CC_OPTS) $(MAKEINFO_DEFINES) -o $@ $(MAKEINFO_OBJS_C)

SCRIPT_PROG=postmakeinfo
SCRIPT_OBJS=postmakeinfo.prl
INTERP=$(PERL)

INSTALL_PROGS   += makeinfo
INSTALL_SCRIPTS += postmakeinfo

include $(TOP)/mk/target.mk
