1
# rdepend.mk -- rules for remaking the dependencies. Public domain.
2
# $Id: rdepend.mk 4681 2007-07-28 23:16:42Z karl $
4
@MAINT@# Have to use -M, not -MM, since we use <kpathsea/...> instead of
5
@MAINT@# "kpathsea/..." in the sources. But that means we have to remove the
6
@MAINT@# directory prefixes and all the system include files.
7
@MAINT@# And <kpathsea/paths.h> is generated, not part of the distribution.
8
@MAINT@# We also remove any ../texk/kpathsea path component, since that comes
9
@MAINT@# from VPATH when srcdir != builddir.
11
@MAINT@# There's no need for any installer/user to ever run this, it can
12
@MAINT@# only cause trouble. So comment it out by default.
14
@MAINT@ifndef c_auto_h_dir
15
@MAINT@c_auto_h_dir = .
18
@MAINT@depend depend.mk:: $(c_auto_h_dir)/c-auto.h \
19
@MAINT@ $(top_srcdir)/../make/rdepend.mk
20
@MAINT@ $(CC) -M $(ALL_CPPFLAGS) \
21
@MAINT@ -I$(c_auto_h_dir) \
22
@MAINT@ -I$(top_srcdir)/../../libs/libgsw32 \
23
@MAINT@ $(srcdir)/*.c \
24
@MAINT@ | sed -e 's,\(\.\./\)\+texk/kpathsea/,,g' \
25
@MAINT@ -e 's,\(\.\./\)\+kpathsea/,$$(kpathsea_srcdir)/,g' \
26
@MAINT@ -e 's,$$(kpathsea_srcdir)/c-auto.h,$$(kpathsea_dir)/c-auto.h,g' \
27
@MAINT@ -e 's,$$(kpathsea_srcdir)/paths.h,$$(kpathsea_dir)/paths.h,g' \
28
@MAINT@ -e 's, /[^ ]*,,g' \
29
@MAINT@ -e 's, [^ ]*/\.\./libs/[^ ]*,,g' \
30
@MAINT@ -e 's, \./, ,g' \
31
@MAINT@ -e 's,dvi2xx.o,dvilj.o dvilj2p.o dvilj4.o dvilj4l.o,' \
32
@MAINT@ -e 's,lex.yy,$$(LEX_OUTPUT_ROOT),g' \
33
@MAINT@ | $(top_srcdir)/../unbackslsh.awk \
35
@MAINT@# If kpathsea, we're making .lo library objects instead of .o's.
36
@MAINT@ pwd | grep -v kpathsea >/dev/null \
37
@MAINT@ || (sed -e 's/\.o:/.lo:/' \
38
@MAINT@ -e 's/kpsewhich.lo:/kpsewhich.o:/' \
39
@MAINT@ -e 's/kpsestat.lo:/kpsestat.o:/' \
40
@MAINT@ -e 's/access.lo:/access.o:/' \
41
@MAINT@ -e 's/readlink.lo:/readlink.o:/' \
42
@MAINT@ <depend.mk >depend-tmp.mk; mv depend-tmp.mk depend.mk)
45
# Let's stick a rule for TAGS here, just in case someone wants them.
46
# (We don't put them in the distributions, to keep them smaller.)
48
pwd | grep kpathsea >/dev/null && append=../kpathsea/TAGS; \
51
# Prevent GNU make 3.[59,63) from overflowing arg limit on system V.