VERSION		= 0.90

# where are your utilities ?
#INSTALL		= /usr/bin/installbsd -c   # for AIX
INSTALL		= /usr/bin/install         # BSD'ish
PATCH		= /usr/bin/patch
CP		= /usr/bin/cp
RM		= /bin/rm
CHMOD		= /usr/bin/chmod
TOUCH		= /usr/bin/touch
MKDIR		= /bin/mkdir
CHOWN		= /usr/bin/chown
ALIASES		= /usr/lib/smail/aliases

# the working directories
# TEXLIBDIR is the directory where dinbrief.sty
# resides. 
# LIBDIR contains all the configuration stuff
# for mgetty+sendfax. 
LIBDIR		= /usr/local/etc/mgetty+sendfax
TEXLIBDIR 	= /usr/TeX/lib/tex/macros/LaTeX
#TEXLIBDIR	= /usr/local/tex/inputs/latex
FAXSPOOL	= /var/spool/fax
# set the UID/GID that your sendmail uses when piping
# stuff via /etc/aliases
UIDGID		= nobody.nobody
# set your preferred fax server user id here:
FAXUSER		= fax


#### end of configurable options ###

install:
#	$(INSTALL) -m 644 README.tsfax $(LIBDIR)
	$(INSTALL) -m 644 tex-send-fax.el $(LIBDIR)
	$(INSTALL) -m 644 tex-mode-hook.el $(LIBDIR)
	$(INSTALL) -m 755 faxmail $(LIBDIR)
	$(INSTALL) -m 755 mail2fax.pl $(LIBDIR)
	$(INSTALL) -m 644 fax.sty $(TEXLIBDIR)
	$(TOUCH) $(FAXSPOOL)/faxmaillog
	$(CHOWN) $(UIDGID) $(FAXSPOOL)/faxmaillog
	if [ -f $(FAXSPOOL)/tmp ] ; then $(MKDIR) $(FAXSPOOL)/tmp ; fi
	$(CHMOD) 1777 $(FAXSPOOL)/tmp
	@echo ""
	@echo "Don't forget to add the line "
	@echo "(load \"$(LIBDIR)/tex-mode-hook\")"
	@echo "to your .emacs"	
	@echo ""
	

doc:
	make -C doc all
	
package:
	(cd ..; tar cvf - tex-send-fax | gzip -9 > tsfax-$(VERSION).tgz)

clean:
	$(RM) -f *.dvi *.log *~ gert.ps 







