crypt32/tests: Fix cert test on Win7.
[wine] / Makefile.in
index c9d38f3..2d2d8b7 100644 (file)
@@ -5,15 +5,18 @@
 # distclean:       also remove all files created by configure
 # test:            run tests
 # testclean:       clean test results to force running all tests again
+# crosstest:       build tests as native windows applications (requires MinGW)
 # install-lib:     install libraries needed to run applications
 # install-dev:     install development environment
 # install:         install everything
 # uninstall:       uninstall everything
 # depend:          create the dependencies
+# ctags:           create a tags file for vim and others.
 # etags:           create a TAGS file for Emacs.
 # manpages:        compile manpages for Wine API
 # htmlpages:       compile html pages for Wine API
 # sgmlpages:       compile sgml source for the Wine API Guide
+# xmlpages:        compile xml source for the Wine API Guide
 
 # Directories
 
@@ -22,14 +25,14 @@ TOPOBJDIR = .
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 LIBEXT    = @LIBEXT@
-LDCONFIG  = @LDCONFIG@
-LDD       = @LDD@
 MODULE    = none
+PROGRAMS  = wine
 
 # Sub-directories to run make depend/clean into
 SUBDIRS = \
        dlls \
        documentation \
+       fonts \
        include \
        libs \
        loader \
@@ -37,120 +40,125 @@ SUBDIRS = \
        server \
        tools
 
-# Sub-directories to install for install-lib
-INSTALLLIBSUBDIRS = \
-       documentation \
-       loader \
-       programs \
-       server
-
-# Sub-directories to install for install-dev
-INSTALLDEVSUBDIRS = include tools
-
-# Sub-directories to install for both install-lib and install-dev
-INSTALLBOTHSUBDIRS = dlls libs
-
-INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
+# Sub-directories to run make install/uninstall into
+INSTALLSUBDIRS = @ALL_TOP_DIRS@
 
 # Sub-directories to run make test into
-TESTSUBDIRS = \
-       dlls \
-       programs
+TESTSUBDIRS = dlls
 
-all: Make.rules wine
+all: Make.rules $(PROGRAMS)
        @echo "Wine build complete."
 
 WINAPI_CHECK_EXTRA_FLAGS = --global
 
+INSTALLDIRS = $(DESTDIR)$(datadir)/aclocal
+
 @MAKE_RULES@
 
-Make.rules: Make.rules.in configure
-       @echo $? is newer than 'Make.rules', please rerun ./configure!
-       @exit 1
+$(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
+       cd $(SRCDIR) && autoconf --warnings=all
+
+$(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in
+$(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4
+       cd $(SRCDIR) && autoheader --warnings=all
+       @echo timestamp > $@
+
+config.status: configure
+       @./config.status --recheck
+
+include/config.h: include/stamp-h
+include/stamp-h: include/config.h.in config.status
+       @./config.status include/config.h include/stamp-h
 
 wine: $(WINEWRAPPER)
        $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
 
 # Installation rules
 
-install-aclocal: dummy
-       $(MKINSTALLDIRS) $(datadir)/aclocal
-       $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
+install-aclocal: $(DESTDIR)$(datadir)/aclocal dummy
 
-install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
-
-install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
+.PHONY: install-aclocal
 
-install:: install-lib install-dev install-aclocal
-       -$(LDCONFIG)
-       @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`";    \
-       then                                                            \
-               echo "*************************************************" ; \
-               echo "*************************************************" ; \
-               echo "The installed Wine libraries will not be found!" ; \
-               echo "You can either:" ;                                \
-               echo "   Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ;  \
-               echo '   export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
-               echo "*************************************************" ; \
-               echo "*************************************************" ; \
-       fi
+@WOW64_DISABLE@ install install-dev:: install-aclocal
 
-uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
-       $(RM) $(datadir)/aclocal/wine.m4
-       -rmdir $(datadir)/aclocal
-
-.PHONY: install-aclocal
+uninstall::
+       $(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4
+       -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal
 
 # Dependencies between directories
 
-all: $(SUBDIRS)
-dlls: libs tools
-loader server: libs tools
-programs: dlls libs tools
+all: $(INSTALLSUBDIRS)
+dlls: include libs tools
+fonts loader server: libs tools
+programs: dlls include libs tools
+include: libs tools
 tools: libs
 
-dlls/__install-lib__ dlls/__install-dev__: libs tools
-libs/__install-lib__ libs/__install-dev__: libs
-loader/__install__ server/__install__: libs tools
-programs/__install__: libs tools dlls/__install-lib__
-tools/__install__: tools
+dlls/__install__ dlls/__install-lib__ dlls/__install-dev__: libs tools include
+fonts/__install__ fonts/__install-lib__: libs tools
+include/__install__ include/__install-dev__: include libs tools
+libs/__install__ libs/__install-lib__ libs/__install-dev__: libs
+loader/__install__ loader/__install-lib__: libs tools
+server/__install__ server/__install-lib__: libs tools
+programs/__install__: libs tools include dlls/__install__
+programs/__install-lib__: libs tools include dlls/__install-lib__
+tools/__install__ tools/__install-lib__ tools/__install-dev__: tools
+
+RECURSE_TARGETS = \
+       $(SUBDIRS) \
+       $(SUBDIRS:%=%/__clean__) \
+       $(SUBDIRS:%=%/__depend__) \
+       $(SUBDIRS:%=%/__install-dev__) \
+       $(SUBDIRS:%=%/__install-lib__) \
+       $(SUBDIRS:%=%/__install__) \
+       $(SUBDIRS:%=%/__uninstall__) \
+       $(TESTSUBDIRS:%=%/__crosstest__) \
+       $(TESTSUBDIRS:%=%/__test__) \
+       $(TESTSUBDIRS:%=%/__testclean__)
+
+depend $(RECURSE_TARGETS): $(MAKEDEP)
+
+$(MAKEDEP): include/config.h
+       @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
 
 # Test rules
 
-checklink:: $(TESTSUBDIRS:%=%/__checklink__)
-
-check test:: wine $(TESTSUBDIRS:%=%/__test__)
-
-crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
+$(TESTSUBDIRS:%=%/__test__): wine
+$(TESTSUBDIRS:%=%/__crosstest__): tools include
 
 # Misc rules
 
 TAGS etags:
-       find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | etags -
+       $(RM) TAGS
+       (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
 
 tags ctags:
-       find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L -
+       $(RM) tags
+       (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
 
-manpages:
-       $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
-       cd dlls && $(MAKE) man
+manpages htmlpages sgmlpages xmlpages: dummy
+       @cd documentation && $(MAKE) $@
 
-htmlpages:
-       $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
-       cd dlls && $(MAKE) doc-html
+distclean:: clean
+       $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h
+       $(RM) -r autom4te.cache
 
-sgmlpages:
-       $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/api-guide
-       cd dlls && $(MAKE) doc-sgml
+.PHONY: manpages htmlpages sgmlpages xmlpages distclean
 
-clean::
-       $(RM) wine
+# Makefile rules
 
-distclean: clean
-       $(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h
-       $(RM) -r autom4te.cache
-       $(RM) `find . \( -name Makefile -o -size 0 \) -print`
+ALL_MAKERULES = @ALL_MAKERULES@
+ALL_MAKEFILES = @ALL_MAKEFILES@
+
+Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES): config.status
+       @./config.status $@
+.INIT: Makefile
+.BEGIN: Makefile
+.MAKEFILEDEPS:
+
+$(RECURSE_TARGETS) $(MAKEDEP): $(ALL_MAKEFILES)
 
-.PHONY: manpages htmlpages distclean
+distclean::
+       $(RM) Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES)
 
-### Dependencies:
+@ALL_MAKEFILE_DEPENDS@