# Generated automatically from Makefile.in by configure.
# Makefile.in for lacheck  -- S Rahtz s.rahtz@elsevier.co.uk
# Remember to change when lacheck is updated.
REV = 1.26
version = 1.0
# paths.make -- installation directories.
#
# The compile-time paths are defined in kpathsea/paths.h, which is built
# from kpathsea/texmf.in and these definitions.  See kpathsea/INSTALL
# for how the various path-related files are used and created.

# Do not change prefix and exec_prefix in Makefile.in!
# configure doesn't propagate the change to the other Makefiles.
# Instead, give the -prefix/-exec-prefix options to configure.
# (See kpathsea/INSTALL for more details.) This is arguably
# a bug, but it's not likely to change soon.
prefix = c:/djgpp
exec_prefix = ${prefix}

# Architecture-dependent executables.
bindir = ${exec_prefix}/bin

# Architecture-independent executables.
scriptdir = $(bindir)

# Architecture-dependent files, such as lib*.a files.
libdir = ${exec_prefix}/lib

# Architecture-independent files.
datadir = c:/djgpp/share

# Header files.
includedir = ${prefix}/include

# GNU .info* files.
infodir = ${prefix}/info

# Unix man pages.
manext = 1
mandir = ${prefix}/man/man$(manext)

# TeX system-specific directories. Not all of the following are relevant
# for all programs, but it seems cleaner to collect everything in one place.

# The default paths are now in kpathsea/texmf.in. Passing all the
# paths to sub-makes can make the arg list too long on system V.
# Note that if you make changes below, you will have to make the
# corresponding changes to texmf.in or texmf.cnf yourself.

# The root of the main tree.
texmf = c:/djgpp/share/texmf

# The directory used by varfonts.
vartexfonts = /var/tmp/texfonts

# Regular input files.
texinputdir = $(texmf)/tex
mfinputdir = $(texmf)/metafont
mpinputdir = $(texmf)/metapost
mftinputdir = $(texmf)/mft

# dvips's epsf.tex, rotate.tex, etc. get installed here;
# ditto for dvilj's fonts support.
dvips_plain_macrodir = $(texinputdir)/plain/dvips
dvilj_latex2e_macrodir = $(texinputdir)/latex/dvilj

# mktex.cnf, texmf.cnf, etc.
web2cdir = $(texmf)/web2c

# The top-level font directory.
fontdir = $(texmf)/fonts

# Memory dumps (.fmt/.base/.mem).
fmtdir = $(web2cdir)
basedir = $(fmtdir)
memdir = $(fmtdir)

# Pool files.
texpooldir = $(web2cdir)
mfpooldir = $(texpooldir)
mppooldir = $(texpooldir)

# Where the .map files from fontname are installed.
fontnamedir = $(texmf)/fontname

# For dvips configuration files, psfonts.map, etc.
dvipsdir = $(texmf)/dvips

# For dvips .pro files, gsftopk's render.ps, etc.
psheaderdir = $(dvipsdir)

# If a font can't be found close enough to its stated size, we look for
# each of these sizes in the order given.  This colon-separated list is
# overridden by the envvar TEXSIZES, and by a program-specific variable
# (e.g., XDVISIZES), and perhaps by a config file (e.g., in dvips).
# This list must be sorted in ascending order.
default_texsizes = 300;600

# End of paths.make.
# common.make -- used by all Makefiles.
SHELL = /bin/sh

top_srcdir = .
srcdir = .

CC = gcc
CFLAGS = -g -O2 $(XCFLAGS)
CPPFLAGS =  $(XCPPFLAGS)
DEFS = -DHAVE_CONFIG_H $(XDEFS)

# Kpathsea needs this for compiling, programs need it for linking.
LIBTOOL = $(kpathsea_srcdir_parent)/klibtool

# You can change [X]CPPFLAGS, [X]CFLAGS, or [X]DEFS, but
# please don't change ALL_CPPFLAGS or ALL_CFLAGS.
# prog_cflags is set by subdirectories of web2c.
ALL_CPPFLAGS = $(DEFS) -I. -I$(srcdir) $(prog_cflags) \
  -I$(kpathsea_parent) -I$(kpathsea_srcdir_parent) $(CPPFLAGS)
ALL_CFLAGS = $(ALL_CPPFLAGS) $(CFLAGS) -c
compile = $(CC) $(ALL_CFLAGS)

.SUFFIXES: .c .o # in case the suffix list has been cleared, e.g., by web2c
.c.o:
	$(compile) $<

# Installation.
INSTALL = ${DJDIR}/bin/ginstall -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = $(INSTALL_PROGRAM)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_LIBTOOL_LIBS = INSTALL_DATA='$(INSTALL_DATA)' $(LIBTOOL) install-lib
INSTALL_LIBTOOL_PROG = INSTALL_PROGRAM='$(INSTALL_PROGRAM)' $(LIBTOOL) install-prog

# Creating (symbolic) links.
LN = ln

# We use these for many things.
kpathsea_parent = ..
kpathsea_dir = $(kpathsea_parent)/kpathsea
kpathsea_srcdir_parent = $(top_srcdir)/..
kpathsea_srcdir = $(kpathsea_srcdir_parent)/kpathsea
kpathsea = $(kpathsea_dir)/libkpathsea.la

#M#ifeq ($(CC), gcc)
#M#XDEFS = -D__USE_FIXED_PROTOTYPES__ -Wall -Wpointer-arith $(warn_more)
#M#CFLAGS = -pipe -g $(XCFLAGS)
#M#endif
# End of common.make.
# programs.make -- used by Makefiles for executables only.

# Don't include $(CFLAGS), since ld -g under Linux forces
# static libraries, e.g., libc.a and libX*.a.
LDFLAGS =  $(XLDFLAGS)

# proglib is for web2c; 
# XLOADLIBES is for the installer.
LIBS = 
LOADLIBES = $(proglib) $(kpathsea) $(LIBS) -lm $(XLOADLIBES)

# May as well separate linking from compiling, just in case.
CCLD = $(CC)
link_command = $(CCLD) -o $@ $(LDFLAGS) 

# When we link with Kpathsea, have to take account that it might be a
# shared library, etc.
kpathsea_link = $(LIBTOOL) link $(link_command)
# End of programs.make.

LEX = flex
LEXLIB = -lfl
LEX_OUTPUT_ROOT = lexyy

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!" > $@ 

# dist.make -- making distribution tar files.
#M#top_distdir = $(distname)-$(version)
#M#top_files = ChangeLog Makefile.in README configure.in configure \
#M#  install.sh acklibtool.m4 config.guess config.sub klibtool \
#M#  mkinstalldirs add-info-toc rename unbackslsh.awk withenable.ac
#M#distdir = $(top_distdir)/$(distname)
#M#kpathsea_distdir = ../$(distname)/$(top_distdir)/kpathsea
#M#ln_files = AUTHORS ChangeLog INSTALL NEWS README *.in *.h *.c \
#M#  configure *.make
#M#
#M#dist_rm_predicate = -name Makefile
#M#dist: all depend pre-dist-$(distname)
#M#	rm -rf $(top_distdir)*
#M#	mkdir -p $(distdir)
#M#	cd .. && make Makefile ./configure
#M#	cd .. && ln $(top_files) $(distname)/$(top_distdir)
#M#	cp -p $(top_srcdir)/../dir $(top_distdir)
#M#	-ln $(ln_files) $(distdir)
#M#	ln $(program_files) $(distdir)
#M#	cd $(kpathsea_dir); $(MAKE) distdir=$(kpathsea_distdir) \
#M#	  ln_files='$(ln_files)' distdir
#M#	cp -pr ../make ../etc ../djgpp $(top_distdir)
#M#	rm -rf $(top_distdir)/make/CVS
#M#	rm -rf $(top_distdir)/etc/CVS
#M#	rm -rf $(top_distdir)/etc/autoconf/CVS
#M#	rm -rf $(top_distdir)/djgpp/CVS
#M## Remove the extra files our patterns got us.
#M#	cd $(top_distdir); rm -f */c-auto.h
#M#	find $(top_distdir) \( $(dist_rm_predicate) \) -exec rm '{}' \;
#M#	find $(top_distdir) -name \.*texi -exec egrep -ni '	| ::|xx[^}]' \;
#M## Now handle the contrib dir.
#M#	mkdir -p $(top_distdir)/contrib && \
#M#	  cp -p ../contrib/{ChangeLog,INSTALL,Makefile,README,*.c,*.h} \
#M#	        $(top_distdir)/contrib
#M#	$(MAKE) post-dist-$(distname)
#M#	cd $(distdir); test ! -r *.info || touch *.info*
#M#	chmod -R a+rX,u+w $(top_distdir)
#M#	GZIP=-9 tar chzf $(top_distdir).tar.gz $(top_distdir)
#M#	rm -rf $(top_distdir)
# End of dist.make.
# config.make -- autoconf rules to remake the Makefile, c-auto.h, etc.
#M#ac_dir = $(top_srcdir)/../etc/autoconf
#M#autoconf = $(ac_dir)/acspecific.m4 $(ac_dir)/acgeneral.m4 $(ac_dir)/acsite.m4
#M#autoheader = $(ac_dir)/acconfig.h $(ac_dir)/autoheader.m4
#M#
#M## I define $(autoconf) to acgeneral.m4 and the other Autoconf files, so
#M## configure automatically gets remade in the sources with a new Autoconf
#M## release.  But it would be bad for installers with Autoconf to remake
#M## configure (not to mention require Autoconf), so I take out the variable
#M## $(autoconf) definition before release.
#M## 
#M## BTW, xt.ac isn't really required for dvipsk or dviljk, but it doesn't
#M## seem worth the trouble.
#M## 
#M#configure_in = $(srcdir)/configure.in $(kpathsea_srcdir)/common.ac \
#M#  $(kpathsea_srcdir)/withenable.ac $(kpathsea_srcdir)/xt.ac \
#M#  $(kpathsea_srcdir_parent)/acklibtool.m4
#M#$(srcdir)/configure: $(configure_in) $(autoconf)
#M#	cd $(srcdir) && autoconf -m $(ac_dir)
#M#
#M## And make sure that --enable-maintainer-mode is used if configure is
#M## called from the makefiles.  We do not try to do this through the
#M## cache, lest the option sneaks into a global cache file.
#M#enablemaintflag = --enable-maintainer-mode

config.status: $(srcdir)/configure
	$(SHELL) $(srcdir)/configure --no-create $(enablemaintflag)

Makefile: $(srcdir)/Makefile.in config.status $(top_srcdir)/../make/*.mak*
	$(SHELL) config.status

# This rule isn't used for the top-level Makefile, but it doesn't hurt.
# We don't depend on config.status because configure always rewrites
# config.status, even when it doesn't change. Thus it might be newer
# than c-auto.h when we don't need to remake the latter.
c-auto.h: stamp-auto
stamp-auto: $(srcdir)/c-auto.in
	$(SHELL) config.status
	date >stamp-auto

#M## autoheader reads acconfig.h (and c-auto.h.top) automatically.
#M#$(srcdir)/c-auto.in: $(srcdir)/stamp-auto.in
#M#$(srcdir)/stamp-auto.in: $(configure_in) $(autoheader) \
#M#  $(kpathsea_srcdir)/acconfig.h
#M#	cd $(srcdir) && autoheader -m $(ac_dir) -l $(kpathsea_srcdir)
#M#	date >$(srcdir)/stamp-auto.in

# End of config.make.

check info dvi:

# clean.make -- cleaning.
mostlyclean::
	rm -f *.o

clean:: mostlyclean
	rm -f $(program) $(programs) squeeze lib$(library).* $(library).a *.bad
	rm -f *.exe *.dvi *.lj

distclean:: extraclean clean
	rm -f Makefile
	rm -f config.status config.log config.cache c-auto.h
	rm -f stamp-auto stamp-tangle stamp-otangle

# Although we can remake configure and c-auto.in, we don't remove
# them, since many people may lack Autoconf.  Use configclean for that.
maintainer-clean:: distclean
	rm -f *.info*

extraclean::
	rm -f *.aux *.bak *.bbl *.blg *.dvi *.log *.pl *.tfm *.vf *.vpl
	rm -f *.*pk *.*gf *.mpx *.i *.s *~ *.orig  *.rej *\#*
	rm -f CONTENTS.tex a.out core mfput.* texput.* mpout.*

configclean:
	rm -f configure c-auto.in c-auto.h stamp-*
# End of clean.make.

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

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

# rdepend.make -- rules for remaking the dependencies.
#M## 
#M## Have to use -M, not -MM, since we use <kpathsea/...> instead of
#M## "kpathsea/..." in the sources.  But that means we have to remove the
#M## directory prefixes and all the system include files.
#M## And <kpathsea/paths.h> is generated, not part of the distribution.
#M## 
#M## And, there's no need for any installer/user to ever run this, it can
#M## only cause trouble. So comment it out in the distribution.
#M## (It doesn't work when the source and build directories are different.)
#M#ifndef c_auto_h_dir
#M#c_auto_h_dir = .
#M#endif
#M#
#M#depend depend.make:: $(c_auto_h_dir)/c-auto.h \
#M#  $(top_srcdir)/../make/rdepend.make 
#M#	$(CC) -M $(ALL_CPPFLAGS) -I$(c_auto_h_dir) *.c \
#M#	  | sed -e 's,\(\.\./\)\+kpathsea/,$$(kpathsea_srcdir)/,g' \
#M#	        -e 's,$$(kpathsea_srcdir)/c-auto.h,$$(kpathsea_dir)/c-auto.h,g' \
#M#	        -e 's,$$(kpathsea_srcdir)/paths.h,$$(kpathsea_dir)/paths.h,g' \
#M#	        -e 's,/usr[^ ]* ,,g' \
#M#	        -e 's,/usr[^ ]*$$,,g' \
#M#	        -e 's,dvi2xx.o,dvilj.o dvilj2p.o dvilj4.o dvilj4l.o,' \
#M#	        -e 's,lex.yy,$$(LEX_OUTPUT_ROOT),g' \
#M#	  | $(top_srcdir)/../unbackslsh.awk \
#M#	  >depend.make
#M## If kpathsea, we're making .lo library objects instead of .o's.
#M#	pwd | grep -v kpathsea >/dev/null \
#M#	  || (sed -e 's/\.o:/.lo:/' \
#M#	          -e 's/kpsewhich.lo:/kpsewhich.o:/' \
#M#	          -e 's/kpsestat.lo:/kpsestat.o:/' \
#M#	          -e 's/access.lo:/access.o:/' \
#M#	          -e 's/readlink.lo:/readlink.o:/' \
#M#	      <depend.make >depend-tmp.make; mv depend-tmp.make depend.make)
#M#.PHONY: depend

# Let's stick a rule for TAGS here, just in case someone wants them.
# (We don't put them in the distributions, to keep them smaller.)
TAGS: *.c *.h
	pwd | grep kpathsea >/dev/null && append=../kpathsea/TAGS; \
	  etags $$append *.[ch]

# Prevent GNU make 3.[59,63) from overflowing arg limit on system V.
.NOEXPORT:

# End of rdepend.make.
$(LEX_OUTPUT_ROOT).o: $(LEX_OUTPUT_ROOT).c 
