# Generated automatically from Makefile.in by configure.
# Makefile.in generated automatically by automake 1.2 from Makefile.am

# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

#-----------------------------------------------------------------------
# WARNING: If you edit the Makefile.am file, you must
#	(1) run automake to regenerate Makefile.in
#	(2) run aclocal to regenerate aclocal.m4
#	(3) run autoheader to regenerate config.hin
#	(4) run autoconf to regenerate configure
#
# On the target system, run the command
#
#	./configure && make all check install
#
# to build, check, and install the program.
#
# [25-Sep-1997]
#-----------------------------------------------------------------------


srcdir = .
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}

bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include

pkgdatadir = $(datadir)/dosmacux
pkglibdir = $(libdir)/dosmacux
pkgincludedir = $(includedir)/dosmacux

top_builddir = .

ACLOCAL = aclocal
AUTOCONF = autoconf
AUTOMAKE = automake
AUTOHEADER = autoheader
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
transform = s,x,x,

NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
CC = gcc
CXX = c++
LN_S = ln -s
MAKEINFO = makeinfo
NAWK = gawk
PACKAGE = dosmacux
VERSION = 1.4

AUTOMAKE_OPTIONS = gnu dist-zip

# We NEED this private install program because some vendor-provided
# have inconsistent and unpredictable behavior
INSTALL		= $(srcdir)/install-sh -c

BASENAME	= basename
CMP		= cmp
CP		= rcp -p
DEROFF		= deroff
DW		= dw
ISPELL		= ispell
MAN2HTML	= man2html
MAN2PS		= ./man2ps
MKDIR		= mkdir
MV		= mv
RM		= rm -f
RMDIR		= rmdir
SED		= sed
SHELL		= /bin/sh
SORT		= sort
SPELL		= spell
SPELLPREFILTER	= $(SED) -e 's/[0-9,.:;?&]/ /g'
TAR		= tar
TMPDIR		= /tmp
TMPTESTDIR	= $(TMPDIR)/dosmacux

# These lines are updated when the configure script is run:
AWK		= gawk
COL		= col -x -b
NROFF		= groff -Tascii
TBL		= gtbl
ZIP		= zip

HTML_FILES 	= $(MAIN_SOURCES:.c=.html)
MAN_FILES 	= $(MAIN_SOURCES:.c=.man)
PS_FILES 	= $(MAIN_SOURCES:.c=.ps)
TXT_FILES 	= $(MAIN_SOURCES:.c=.txt)

bin_PROGRAMS	=  dos2mac dos2ux mac2dos mac2ux ux2dos ux2mac

CLEANFILES	= *.i

COMMON_OBJS	= common.o

DOCFILES	= AUTHORS ChangeLog NEWS README COPYING INSTALL

dosmacux_OBJS   = dos2mac.o dos2ux.o mac2dos.o mac2ux.o \
		  ux2dos.o ux2mac.o

EXTRA_DIST      = $(HTML_FILES) $(MAIN_SOURCES) $(MAN_FILES) $(man_MANS) \
		  $(PS_FILES) $(TXT_FILES) common.c configure dosmacux.sok \
		  man2ps

MAIN_SOURCES	= dos2mac.c dos2ux.c mac2dos.c mac2ux.c \
		  ux2dos.c ux2mac.c

# *.1 files are symbolic links to the master *.man files
man_MANS	=  dos2mac.1 dos2ux.1 mac2dos.1 mac2ux.1 ux2dos.1 ux2mac.1

MAINTAINERCLEANFILES = -r $(distdir) $(distdir).tar.gz Makefile.in config.hin \
		  configure dos2mac.html dos2mac.ps dos2ux.html dos2ux.ps \
		  mac2dos.html mac2dos.ps mac2ux.html mac2ux.ps ux2dos.html \
		  ux2dos.ps ux2mac.html ux2mac.ps

noinst_HEADERS	= acconfig.h confix.h custom.h headers.h

#-----------------------------------------------------------------------

SUFFIXES	= .i .c .txt .man
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = 
PROGRAMS =  $(bin_PROGRAMS)


DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.
CPPFLAGS = 
LDFLAGS = 
LIBS = 
dos2mac_SOURCES = dos2mac.c
dos2mac_OBJECTS =  dos2mac.o
dos2mac_LDADD = $(LDADD)
dos2mac_LDFLAGS = 
dos2ux_SOURCES = dos2ux.c
dos2ux_OBJECTS =  dos2ux.o
dos2ux_LDADD = $(LDADD)
dos2ux_LDFLAGS = 
mac2dos_SOURCES = mac2dos.c
mac2dos_OBJECTS =  mac2dos.o
mac2dos_LDADD = $(LDADD)
mac2dos_LDFLAGS = 
mac2ux_SOURCES = mac2ux.c
mac2ux_OBJECTS =  mac2ux.o
mac2ux_LDADD = $(LDADD)
mac2ux_LDFLAGS = 
ux2dos_SOURCES = ux2dos.c
ux2dos_OBJECTS =  ux2dos.o
ux2dos_LDADD = $(LDADD)
ux2dos_LDFLAGS = 
ux2mac_SOURCES = ux2mac.c
ux2mac_OBJECTS =  ux2mac.o
ux2mac_LDADD = $(LDADD)
ux2mac_LDFLAGS = 
CFLAGS = -g -O2
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
MANS = dos2mac.1 dos2ux.1 mac2dos.1 mac2ux.1 ux2dos.1 ux2mac.1
HEADERS =  $(noinst_HEADERS)

DIST_COMMON =  README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS acconfig.h aclocal.m4 config.hin configure \
configure.in install-sh missing mkinstalldirs stamp-h.in


DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)

GZIP = --best
DEP_FILES =  .deps/dos2mac.P .deps/dos2ux.P .deps/mac2dos.P \
.deps/mac2ux.P .deps/ux2dos.P .deps/ux2mac.P
SOURCES = dos2mac.c dos2ux.c mac2dos.c mac2ux.c ux2dos.c ux2mac.c
OBJECTS = dos2mac.o dos2ux.o mac2dos.o mac2ux.o ux2dos.o ux2mac.o

default: all

.SUFFIXES:
.SUFFIXES: .c .i .man .o .txt
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
	cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
	cd $(top_builddir) \
	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

$(ACLOCAL_M4):  configure.in 
	cd $(srcdir) && $(ACLOCAL)

config.status: $(srcdir)/configure
	$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
	cd $(srcdir) && $(AUTOCONF)
stamp-h: $(srcdir)/config.hin $(top_builddir)/config.status
	cd $(top_builddir) \
	  && CONFIG_FILES= CONFIG_HEADERS=config.h:config.hin \
	     $(SHELL) ./config.status
	@echo timestamp > stamp-h
$(srcdir)/config.hin: $(srcdir)/stamp-h.in
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
	cd $(top_srcdir) && $(AUTOHEADER)
	@echo timestamp > $(srcdir)/stamp-h.in

mostlyclean-hdr:

clean-hdr:

distclean-hdr:
	-rm -f config.h

maintainer-clean-hdr:

mostlyclean-binPROGRAMS:

clean-binPROGRAMS:
	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)

distclean-binPROGRAMS:

maintainer-clean-binPROGRAMS:

install-binPROGRAMS: $(bin_PROGRAMS)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(bindir)
	@list='$(bin_PROGRAMS)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo "  $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \
	     $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
	  else :; fi; \
	done

uninstall-binPROGRAMS:
	$(NORMAL_UNINSTALL)
	list='$(bin_PROGRAMS)'; for p in $$list; do \
	  rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
	done

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

mostlyclean-compile:
	-rm -f *.o core

clean-compile:

distclean-compile:
	-rm -f *.tab.c

maintainer-clean-compile:
install-man: $(MANS)
	$(NORMAL_INSTALL)
	$(mkinstalldirs) $(mandir)/man1
	@sect=1;				\
	inst=`echo "dos2mac" | sed '$(transform)'`.1; \
	if test -f $(srcdir)/dos2mac.1; then file=$(srcdir)/dos2mac.1; \
	else file=dos2mac.1; fi; \
	echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
	$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
	@sect=1;				\
	inst=`echo "dos2ux" | sed '$(transform)'`.1; \
	if test -f $(srcdir)/dos2ux.1; then file=$(srcdir)/dos2ux.1; \
	else file=dos2ux.1; fi; \
	echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
	$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
	@sect=1;				\
	inst=`echo "mac2dos" | sed '$(transform)'`.1; \
	if test -f $(srcdir)/mac2dos.1; then file=$(srcdir)/mac2dos.1; \
	else file=mac2dos.1; fi; \
	echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
	$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
	@sect=1;				\
	inst=`echo "mac2ux" | sed '$(transform)'`.1; \
	if test -f $(srcdir)/mac2ux.1; then file=$(srcdir)/mac2ux.1; \
	else file=mac2ux.1; fi; \
	echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
	$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
	@sect=1;				\
	inst=`echo "ux2dos" | sed '$(transform)'`.1; \
	if test -f $(srcdir)/ux2dos.1; then file=$(srcdir)/ux2dos.1; \
	else file=ux2dos.1; fi; \
	echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
	$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
	@sect=1;				\
	inst=`echo "ux2mac" | sed '$(transform)'`.1; \
	if test -f $(srcdir)/ux2mac.1; then file=$(srcdir)/ux2mac.1; \
	else file=ux2mac.1; fi; \
	echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
	$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst

uninstall-man:
	$(NORMAL_UNINSTALL)
	inst=`echo "dos2mac" | sed '$(transform)'`.1; \
	rm -f $(mandir)/man1/$$inst
	inst=`echo "dos2ux" | sed '$(transform)'`.1; \
	rm -f $(mandir)/man1/$$inst
	inst=`echo "mac2dos" | sed '$(transform)'`.1; \
	rm -f $(mandir)/man1/$$inst
	inst=`echo "mac2ux" | sed '$(transform)'`.1; \
	rm -f $(mandir)/man1/$$inst
	inst=`echo "ux2dos" | sed '$(transform)'`.1; \
	rm -f $(mandir)/man1/$$inst
	inst=`echo "ux2mac" | sed '$(transform)'`.1; \
	rm -f $(mandir)/man1/$$inst


tags: TAGS

ID: $(HEADERS) $(SOURCES)
	here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)

TAGS:  $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES)
	tags=; \
	here=`pwd`; \
	test -z "$(ETAGS_ARGS)config.hin$(SOURCES)$(HEADERS)$$tags" \
	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.hin $(SOURCES) $(HEADERS) -o $$here/TAGS)

mostlyclean-tags:

clean-tags:

distclean-tags:
	-rm -f TAGS ID

maintainer-clean-tags:

distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	rm -rf $(distdir)
	GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
	mkdir $(distdir)/=build
	mkdir $(distdir)/=inst
	dc_install_base=`cd $(distdir)/=inst && pwd`; \
	cd $(distdir)/=build \
	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
	  && $(MAKE) \
	  && $(MAKE) dvi \
	  && $(MAKE) check \
	  && $(MAKE) install \
	  && $(MAKE) installcheck \
	  && $(MAKE) dist
	rm -rf $(distdir)
	@echo "========================"; \
	echo "$(distdir).tar.gz is ready for distribution"; \
	echo "========================"
dist: distdir
	-chmod -R a+r $(distdir)
	GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
	rm -rf $(distdir)
dist-zip: distdir
	-chmod -R a+r $(distdir)
	rm -rf $(distdir)
dist-all: distdir
	-chmod -R a+r $(distdir)
	GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
	rm -rf $(distdir)
distdir: $(DISTFILES)
	rm -rf $(distdir)
	mkdir $(distdir)
	-chmod 777 $(distdir)
	here=`cd $(top_builddir) && pwd`; \
	top_distdir=`cd $(top_distdir) && pwd`; \
	cd $(top_srcdir) \
	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
	@for file in $(DISTFILES); do \
	  d=$(srcdir); \
	  test -f $(distdir)/$$file \
	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
	  || cp -p $$d/$$file $(distdir)/$$file; \
	done
	$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook

MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)

DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
	echo > $@

-include $(DEP_FILES)

mostlyclean-depend:

clean-depend:

distclean-depend:

maintainer-clean-depend:
	-rm -rf .deps

.deps/%.P: %.c
	@echo "Computing dependencies for $<..."
	@o='o'; \
	test -n "$o" && o='$$o'; \
	$(MKDEP) $< >$@.tmp \
	  && sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \
	  && rm -f $@.tmp
info:
dvi:
check: all
	$(MAKE) check-local
installcheck:
install-exec: install-binPROGRAMS
	@$(NORMAL_INSTALL)

install-data: install-man
	@$(NORMAL_INSTALL)

install: install-exec install-data all
	@:

uninstall: uninstall-binPROGRAMS uninstall-man

all: Makefile $(PROGRAMS) $(MANS) $(HEADERS) config.h

install-strip:
	$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
	$(mkinstalldirs)  $(bindir) $(mandir)/man1


mostlyclean-generic:
	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)

clean-generic:
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean-generic:
	-rm -f Makefile $(DISTCLEANFILES)
	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

maintainer-clean-generic:
	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean:  mostlyclean-hdr mostlyclean-binPROGRAMS \
		mostlyclean-compile mostlyclean-tags mostlyclean-depend \
		mostlyclean-generic

clean:  clean-hdr clean-binPROGRAMS clean-compile clean-tags \
		clean-depend clean-generic mostlyclean

distclean:  distclean-hdr distclean-binPROGRAMS distclean-compile \
		distclean-tags distclean-depend distclean-generic clean
	rm -f config.status

maintainer-clean:  maintainer-clean-hdr maintainer-clean-binPROGRAMS \
		maintainer-clean-compile maintainer-clean-tags \
		maintainer-clean-depend maintainer-clean-generic \
		distclean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."
	rm -f config.status

.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \
clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile install-man uninstall-man tags \
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info dvi check-local installcheck install-exec \
install-data install uninstall all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean


.c.i:
	$(CC) -E $(DEFS) $(EXTRA_DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< >$@

.man.txt:
	$(TBL) $< | $(NROFF) -man | $(COL) -b -x >$*.txt

#-----------------------------------------------------------------------

all:	config.h bin doc

bin:	$(bin_PROGRAMS)

check-local:	check-dos check-dos-z check-mac check-ux

check-dos:	bin
	-@$(RM) -r $(TMPTESTDIR)
	-@$(MKDIR) $(TMPTESTDIR)
	@echo There should be no differences in these tests
	@BUILDDIR=`pwd`; \
	for f in test01 ; \
	do \
		$(CP) $(srcdir)/testdata/$$f.dos $(TMPTESTDIR)/$$f.dos ; \
		$$BUILDDIR/dos2mac $(TMPTESTDIR)/$$f.dos ; \
		$(CMP) testdata/$$f.mac $(TMPTESTDIR)/$$f.dos && $(RM) $(TMPTESTDIR)/$$f.dos ; \
		$(CP) $(srcdir)/testdata/$$f.dos $(TMPTESTDIR)/$$f.dos ; \
		$$BUILDDIR/dos2ux $(TMPTESTDIR)/$$f.dos ; \
		$(CMP) testdata/$$f.ux $(TMPTESTDIR)/$$f.dos && $(RM) $(TMPTESTDIR)/$$f.dos; \
	done

	-@$(RMDIR) $(TMPTESTDIR)

check-dos-z:	bin
	-@$(RM) -r $(TMPTESTDIR)
	-@$(MKDIR) $(TMPTESTDIR)
	@echo There should be no differences in these tests
	@BUILDDIR=`pwd`; \
	for f in test02 ; \
	do \
		$(CP) $(srcdir)/testdata/$$f.dos $(TMPTESTDIR)/$$f.dos ; \
		$$BUILDDIR/dos2mac -z $(TMPTESTDIR)/$$f.dos ; \
		$(CMP) testdata/$$f.mac $(TMPTESTDIR)/$$f.dos && $(RM) $(TMPTESTDIR)/$$f.dos ; \
		$(CP) $(srcdir)/testdata/$$f.dos $(TMPTESTDIR)/$$f.dos ; \
		$$BUILDDIR/dos2ux -z $(TMPTESTDIR)/$$f.dos ; \
		$(CMP) testdata/$$f.ux $(TMPTESTDIR)/$$f.dos && $(RM) $(TMPTESTDIR)/$$f.dos ; \
	done
	-@$(RMDIR) $(TMPTESTDIR)

check-mac:	bin
	-@$(RM) -r $(TMPTESTDIR)
	-@$(MKDIR) $(TMPTESTDIR)
	@echo There should be no differences in these tests
	@BUILDDIR=`pwd`; \
	for f in test01 ; \
	do \
		$(CP) $(srcdir)/testdata/$$f.mac $(TMPTESTDIR)/$$f.mac ; \
		$$BUILDDIR/mac2dos $(TMPTESTDIR)/$$f.mac ; \
		$(CMP) testdata/$$f.dos $(TMPTESTDIR)/$$f.mac && $(RM) $(TMPTESTDIR)/$$f.mac ; \
		$(CP) $(srcdir)/testdata/$$f.mac $(TMPTESTDIR)/$$f.mac ; \
		$$BUILDDIR/mac2ux $(TMPTESTDIR)/$$f.mac ; \
		$(CMP) testdata/$$f.ux $(TMPTESTDIR)/$$f.mac && $(RM) $(TMPTESTDIR)/$$f.mac ; \
	done
	-@$(RMDIR) $(TMPTESTDIR)

check-ux:	bin
	-@$(RM) -r $(TMPTESTDIR)
	-@$(MKDIR) $(TMPTESTDIR)
	@echo There should be no differences in these tests
	@BUILDDIR=`pwd`; \
	for f in test01 ; \
	do \
		$(CP) $(srcdir)/testdata/$$f.ux $(TMPTESTDIR)/$$f.ux ; \
		$$BUILDDIR/ux2mac $(TMPTESTDIR)/$$f.ux ; \
		$(CMP) testdata/$$f.mac $(TMPTESTDIR)/$$f.ux && $(RM) $(TMPTESTDIR)/$$f.ux ; \
		$(CP) $(srcdir)/testdata/$$f.ux $(TMPTESTDIR)/$$f.ux ; \
		$$BUILDDIR/ux2dos $(TMPTESTDIR)/$$f.ux ; \
		$(CMP) testdata/$$f.dos $(TMPTESTDIR)/$$f.ux && $(RM) $(TMPTESTDIR)/$$f.ux ; \
	done
	-@$(RMDIR) $(TMPTESTDIR)

# autoheader produces a config.hin file that explicitly undefines
# _POSIX_SOURCE, which is incorrect; it should just leave its current
# definition alone, so as not to override a compile-time setting of that
# variable.  We therefore remove any undef of that variable from the
# generated config.h file.  However, that file is not touched unless
# such a removal is required.
config.h:
	if grep -s '^[ 	]*#undef[ 	]*_POSIX_SOURCE' config.h >/dev/null 2>&1 ; \
	then \
	    $(MV) config.h config.h.tmp ; \
	    $(SED) -e '/^[ 	][ 	]*#[ 	][ 	]*undef[ 	][ 	]*_POSIX_SOURCE/d' <config.h.tmp >config.h ; \
	    $(RM) config.h.tmp ; \
	fi

dist-hook:
	$(TAR) -c -f - backup testdata | (cd $(distdir); $(TAR) xf -)

doc:	 html_files ps_files txt_files

dos2mac:	 dos2mac.o $(COMMON_OBJS)
	$(CC) $(CFLAGS) dos2mac.o $(COMMON_OBJS) -o dos2mac $(LDFLAGS)

dos2mac.html:	dos2mac.man
	$(MAN2HTML) dos2mac.man

dos2mac.o:	dos2mac.c
	$(COMPILE) -c $(EXTRA_DEFS) $<

dos2mac.ps:	dos2mac.man
	$(MAN2PS) <dos2mac.man >dos2mac.ps

dos2ux:	 dos2ux.o $(COMMON_OBJS)
	$(CC) $(CFLAGS) dos2ux.o $(COMMON_OBJS) -o dos2ux $(LDFLAGS)

dos2ux.html:	dos2ux.man
	$(MAN2HTML) dos2ux.man

dos2ux.o:	dos2ux.c
	$(COMPILE) -c $(EXTRA_DEFS) $<

dos2ux.ps:	dos2ux.man
	$(MAN2PS) <dos2ux.man >dos2ux.ps

dw:
	@echo Doubled word check on documentation files: expect file names plus one instance at line 11 or 14
	-@for f in *.man ; \
	do \
		echo ========== $$f ; \
		$(DEROFF) $$f | $(DW) ; \
	done
	-@for f in $(DOCFILES) ; \
	do \
		echo ========== $$f ; \
		$(DW) <$$f ; \
	done

html_files:	$(HTML_FILES)

mac2dos:	 mac2dos.o $(COMMON_OBJS)
	$(CC) $(CFLAGS) mac2dos.o $(COMMON_OBJS) -o mac2dos $(LDFLAGS)

mac2dos.html:	mac2dos.man
	$(MAN2HTML) mac2dos.man

mac2dos.o:	mac2dos.c
	$(COMPILE) -c $(EXTRA_DEFS) $<

mac2dos.ps:	mac2dos.man
	$(MAN2PS) <mac2dos.man >mac2dos.ps

mac2ux:	 mac2ux.o $(COMMON_OBJS)
	$(CC) $(CFLAGS) mac2ux.o $(COMMON_OBJS) -o mac2ux $(LDFLAGS)

mac2ux.html:	mac2ux.man
	$(MAN2HTML) mac2ux.man

mac2ux.o:	mac2ux.c
	$(COMPILE) -c $(EXTRA_DEFS) $<

mac2ux.ps:	mac2ux.man
	$(MAN2PS) <mac2ux.man >mac2ux.ps

ps_files:	$(PS_FILES)

spell:
	@echo Spelling check on documentation files: expect nothing but file names
	-@for f in *.man ; \
	do \
		echo ========== $$f ; \
		$(DEROFF) $$f | $(SPELLPREFILTER) | $(SPELL) +dosmacux.sok >/tmp/$$f.ser ; \
		$(DEROFF) $$f | $(SPELLPREFILTER) | $(ISPELL) -l -p dosmacux.sok >>/tmp/$$f.ser ; \
		$(SORT) -u /tmp/$$f.ser ; \
		$(RM) /tmp/$$f.ser ; \
	done
	-@for f in $(DOCFILES) ; \
	do \
		echo ========== $$f ; \
		$(SPELLPREFILTER) < $$f | $(SPELL) +dosmacux.sok >/tmp/$$f.ser ; \
		$(SPELLPREFILTER) < $$f | $(ISPELL) -l -p dosmacux.sok >>/tmp/$$f.ser ; \
		$(SORT) -u /tmp/$$f.ser ; \
		$(RM) /tmp/$$f.ser ; \
	done

txt_files:	$(TXT_FILES)

ux2dos:	 ux2dos.o $(COMMON_OBJS)
	$(CC) $(CFLAGS) ux2dos.o $(COMMON_OBJS) -o ux2dos $(LDFLAGS)

ux2dos.html:	ux2dos.man
	$(MAN2HTML) ux2dos.man

ux2dos.o:	ux2dos.c
	$(COMPILE) -c $(EXTRA_DEFS) $<

ux2dos.ps:	ux2dos.man
	$(MAN2PS) <ux2dos.man >ux2dos.ps

ux2mac:	 ux2mac.o $(COMMON_OBJS)
	$(CC) $(CFLAGS) ux2mac.o $(COMMON_OBJS) -o ux2mac $(LDFLAGS)

ux2mac.html:	ux2mac.man
	$(MAN2HTML) ux2mac.man

ux2mac.o:	ux2mac.c
	$(COMPILE) -c $(EXTRA_DEFS) $<

ux2mac.ps:	ux2mac.man
	$(MAN2PS) <ux2mac.man >ux2mac.ps

$(COMMON_OBJS): confix.h

$(dosmacux_OBJS): confix.h

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