tentative fix for issue 3 (ex 53)
[mplib] / src / texk / make / config.mk
1 # config.mk -- autoconf rules to remake the Makefile, c-auto.h, etc.
2 @MAINT@ac_dir = $(top_srcdir)/../etc/autoconf
3 @MAINT@autoconf = $(ac_dir)/acspecific.m4 $(ac_dir)/acgeneral.m4 $(ac_dir)/acsite.m4
4 @MAINT@autoheader = $(ac_dir)/acconfig.h $(ac_dir)/autoheader.m4
5 @MAINT@
6 @MAINT@# I define $(autoconf) to acgeneral.m4 and the other Autoconf files, so
7 @MAINT@# configure automatically gets remade in the sources with a new Autoconf
8 @MAINT@# release.  But it would be bad for installers with Autoconf to remake
9 @MAINT@# configure (not to mention require Autoconf), so I take out the variable
10 @MAINT@# $(autoconf) definition before release.
11 @MAINT@# 
12 @MAINT@# BTW, xt.ac isn't really required for dvipsk or dviljk, but it doesn't
13 @MAINT@# seem worth the trouble.
14 @MAINT@# 
15 @MAINT@configure_in = $(srcdir)/configure.in $(kpathsea_srcdir)/common.ac \
16 @MAINT@  $(kpathsea_srcdir)/withenable.ac $(kpathsea_srcdir)/xt.ac \
17 @MAINT@  $(kpathsea_srcdir_parent)/libtool.m4
18 @MAINT@$(srcdir)/configure: $(configure_in) $(autoconf)
19 @MAINT@ cd $(srcdir) && $(top_srcdir)/../autoconf2.13 -m $(ac_dir)
20
21 config.status: $(srcdir)/configure
22         $(SHELL) $@ --recheck
23
24 Makefile: config.status $(srcdir)/Makefile.in $(top_srcdir)/../make/*.mk
25         $(SHELL) $<
26
27 @MAINT@# autoheader reads acconfig.h (and c-auto.h.top) automatically.
28 @MAINT@$(srcdir)/c-auto.in: $(srcdir)/stamp-auto.in
29 @MAINT@$(srcdir)/stamp-auto.in: $(configure_in) $(autoheader) \
30 @MAINT@  $(kpathsea_srcdir)/acconfig.h
31 @MAINT@ cd $(srcdir) && autoheader -m $(ac_dir) -l $(srcdir)
32 @MAINT@ date >$(srcdir)/stamp-auto.in
33
34 # This rule isn't used for the top-level Makefile, but it doesn't hurt.
35 # We don't depend on config.status because configure always rewrites
36 # config.status, even when it doesn't change. Thus it might be newer
37 # than c-auto.h when we don't need to remake the latter.
38 c-auto.h: stamp-auto
39 stamp-auto: $(srcdir)/c-auto.in
40         $(SHELL) config.status
41         date >stamp-auto
42
43 # End of config.mk.