# Makefile.in for lacheck  -- S Rahtz s.rahtz@elsevier.co.uk
# Remember to change when lacheck is updated.
REV = 1.26
version = 1.0
ac_include ../make/paths.make
ac_include ../make/common.make
ac_include ../make/programs.make

LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@

prog_cflags = -DUNIX  -DNeedFunctionPrototypes

program = lacheck
objects = $(LEX_OUTPUT_ROOT).o

programs = $(program)

default: $(program)
all: $(program)

$(program): $(objects) 
	$(kpathsea_link) $(objects) $(LEXLIB)

install: install-exec install-data

uninstall: uninstall-exec uninstall-data

install-exec: all
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
	for p in $(programs); do $(INSTALL_LIBTOOL_PROG) $(bindir) $$p; done
uninstall-exec:
	for p in $(programs); do rm -f $(bindir)/$$p; done

install-data: lacheck.1
	$(SHELL) $(top_srcdir)/../mkinstalldirs  $(mandir)
	$(INSTALL_DATA) lacheck.1 $(mandir)/lacheck.1

uninstall-data: 
	rm -f $(mandir)/lacheck.1

lacheck.1: 	lacheck.man  
	-sed -e "s!%%LACHECKREV%%!Release $(REV)!" $(srcdir)/lacheck.man |\
	sed -e "s!%%LACHECKDATE%%!`date +%D`!" |\
	sed -e "s!%%LACHECKPATH%%!$(bindir)/lacheck!" > $@ 

ac_include ../make/dist.make
ac_include ../make/config.make

check info dvi:

ac_include ../make/clean.make

clean::
	rm -f $(LEX_OUTPUT_ROOT).c lacheck.1

$(LEX_OUTPUT_ROOT).c: lacheck.lex
	$(LEX) $(srcdir)/lacheck.lex

ac_include ../make/rdepend.make
ac_include depend.make
