#
# Compilation rules.
#

.SUFFIXES: .c .d .o

.c.o:
	$(CC) $(CFLAGS) -c -o $@ $<

.c.d:
	sh $(srcdir)/autoconf/scripts/depend.sh $(CC) $< $(<:%.c=%) $(srcdir) $(CFLAGS) > $@

doc/mconv.info: $(srcdir)/doc/mconv.texi
	makeinfo --no-split $< -o $@; true
	chmod 644 $@

doc/mconv.html: $(srcdir)/doc/mconv.texi
	texi2html -monolithic $< || true
	perl $(srcdir)/autoconf/scripts/munge.pl < mconv.html > $@ || true
	rm -f mconv.html
	perl $(srcdir)/autoconf/scripts/html2mconv.pl extra/help \
	  < $@ || true
	chmod 644 $@ || true
