makefiles: Generate the config.status dependency as part of the makefile dependencies.
[wine/hacks.git] / Makefile.in
blob9dd1bd9330b48c3309700b523bf63e0c370cea3d
1 # This Makefile understands the following targets:
3 # all (default): build wine
4 # clean: remove all intermediate files
5 # distclean: also remove all files created by configure
6 # test: run tests
7 # testclean: clean test results to force running all tests again
8 # crosstest: build tests as native windows applications (requires MinGW)
9 # install-lib: install libraries needed to run applications
10 # install-dev: install development environment
11 # install: install everything
12 # uninstall: uninstall everything
13 # depend: create the dependencies
14 # ctags: create a tags file for vim and others.
15 # etags: create a TAGS file for Emacs.
16 # manpages: compile manpages for Wine API
17 # htmlpages: compile html pages for Wine API
18 # sgmlpages: compile sgml source for the Wine API Guide
19 # xmlpages: compile xml source for the Wine API Guide
21 # Directories
23 TOPSRCDIR = @top_srcdir@
24 TOPOBJDIR = .
25 SRCDIR = @srcdir@
26 VPATH = @srcdir@
27 LIBEXT = @LIBEXT@
28 MODULE = none
29 PROGRAMS = wine
31 # Sub-directories to run make depend/clean into
32 SUBDIRS = \
33 dlls \
34 documentation \
35 fonts \
36 include \
37 libs \
38 loader \
39 programs \
40 server \
41 tools
43 # Sub-directories to run make install/uninstall into
44 INSTALLSUBDIRS = @ALL_TOP_DIRS@
46 # Sub-directories to run make test into
47 TESTSUBDIRS = dlls
49 all: Make.rules $(PROGRAMS)
50 @echo "Wine build complete."
52 WINAPI_CHECK_EXTRA_FLAGS = --global
54 @MAKE_RULES@
56 $(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
57 cd $(SRCDIR) && autoconf --warnings=all
59 $(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in
60 $(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4
61 cd $(SRCDIR) && autoheader --warnings=all
62 @echo timestamp > $@
64 config.status: configure
65 @./config.status --recheck
67 include/config.h: include/stamp-h
68 include/stamp-h: include/config.h.in config.status
69 @./config.status include/config.h include/stamp-h
71 wine: $(WINEWRAPPER)
72 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
74 # Installation rules
76 uninstall::
77 -rmdir $(DESTDIR)$(datadir)/wine
79 # Dependencies between directories
81 all: $(INSTALLSUBDIRS)
82 dlls: include libs tools
83 fonts loader server: libs tools
84 programs: dlls include libs tools
85 include: libs tools
86 tools: libs
88 dlls/__install__ dlls/__install-lib__ dlls/__install-dev__: libs tools include
89 fonts/__install__ fonts/__install-lib__: libs tools
90 include/__install__ include/__install-dev__: include libs tools
91 libs/__install__ libs/__install-lib__ libs/__install-dev__: libs
92 loader/__install__ loader/__install-lib__: libs tools
93 server/__install__ server/__install-lib__: libs tools
94 programs/__install__: libs tools include dlls/__install__
95 programs/__install-lib__: libs tools include dlls/__install-lib__
96 tools/__install__ tools/__install-lib__ tools/__install-dev__: tools
98 RECURSE_TARGETS = \
99 $(SUBDIRS) \
100 $(SUBDIRS:%=%/__clean__) \
101 $(SUBDIRS:%=%/__depend__) \
102 $(SUBDIRS:%=%/__install-dev__) \
103 $(SUBDIRS:%=%/__install-lib__) \
104 $(SUBDIRS:%=%/__install__) \
105 $(SUBDIRS:%=%/__uninstall__) \
106 $(TESTSUBDIRS:%=%/__crosstest__) \
107 $(TESTSUBDIRS:%=%/__test__) \
108 $(TESTSUBDIRS:%=%/__testclean__)
110 depend $(RECURSE_TARGETS): $(MAKEDEP)
112 $(MAKEDEP): include/config.h
113 @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
115 # Test rules
117 $(TESTSUBDIRS:%=%/__test__): wine
118 $(TESTSUBDIRS:%=%/__crosstest__): tools include
120 # Misc rules
122 TAGS etags:
123 $(RM) TAGS
124 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
126 tags ctags:
127 $(RM) tags
128 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
130 manpages htmlpages sgmlpages xmlpages: dummy
131 @cd documentation && $(MAKE) $@
133 distclean:: clean
134 $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h
135 $(RM) -r autom4te.cache
137 .PHONY: manpages htmlpages sgmlpages xmlpages distclean
139 # Makefile rules
141 ALL_MAKERULES = @ALL_MAKERULES@
142 ALL_MAKEFILES = @ALL_MAKEFILES@
144 Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES):
145 @./config.status $@
146 .INIT: Makefile
147 .BEGIN: Makefile
148 .MAKEFILEDEPS:
150 $(RECURSE_TARGETS) $(MAKEDEP): $(ALL_MAKEFILES)
152 distclean::
153 $(RM) Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES)
155 @ALL_MAKEFILE_DEPENDS@