test for robodoc in configure if enabled with --enable-autodoc
[libfirm] / Makefile.in
1 # Hey Emacs, this is a -*- makefile -*-
2 #
3 # libFIRM Project
4 #
5 # Top level Makefile
6 # $Id$
7 #
8
9
10 # top directory of the source tree
11 top_srcdir := @top_srcdir@
12 # directory with the sources for this directory
13 srcdir := @srcdir@
14 # top directory of the configured tree
15 topdir := .
16 # subdirectory under topdir
17 subdir := .
18
19 prefix := @prefix@
20 exec_prefix := @exec_prefix@
21 bindir = $(exec_prefix)/bin
22 datadir = $(prefix)/lib
23
24 subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr
25
26 SOURCES := Makefile.in MakeRules.in MakeTargets\
27            aclocal.m4 config.h.in\
28            config.guess config.sub configure.in \
29            stamp-h.in
30
31 INSTALL_LIBS = libfirm.a
32
33 GENFILES := stamp-h config.log config.cache
34
35 # config.status config.h.in $(srcdir)/stamp-h.in
36
37 include $(topdir)/MakeRules
38
39 XOFILES += $(addsuffix /subdir.o, $(subdirs))
40
41 include $(top_srcdir)/MakeTargets
42
43
44 all: config.h Makefile libfirm.a
45
46 libfirm.a: subdir_all $(XOFILES) $(OFILES)
47         $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
48         $(RANLIB) $@.new
49         mv -f $@.new $@
50
51 testprograms:   libfirm.a
52         $(MAKE) -C testprograms
53
54
55 # generate program documentation
56 autodoc: autodoc_xref $(AUTODOCDIR) $(GLOBALXREFFILE) autodoc_html $(INDEXFILE)
57
58 $(GLOBALXREFFILE): $(addsuffix /$(LOCALXREFSFILE), $(subdirs)) .xrefs
59 #       cat $^ > $@
60         $(RM) $@
61         find $(PWD) -name "*.xref" -print > $@
62
63 $(INDEXFILE): $(GLOBALXREFFILE)
64         $(AUTODOC) $(GLOBALXREFFILE) $@ INDEX HTML
65
66
67 #${srcdir}/configure: configure.in aclocal.m4
68 $(srcdir)/configure: configure.in
69         cd $(srcdir) && autoconf
70
71 # autoheader might not change config.h.in, so touch a stamp file.
72 $(srcdir)/config.h.in: stamp-h.in
73
74 #${srcdir\1c2/stamp-h.in: configure.in aclocal.m4 acconfig.h \
75 $(srcdir)/stamp-h.in: configure.in
76         cd $(srcdir) && autoheader
77         echo timestamp > $(srcdir)/stamp-h.in
78
79 config.h: stamp-h
80 stamp-h: config.h.in config.status
81         ./config.status
82
83 config.status: configure
84         ./config.status --recheck