X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/f89850618442dc1b6520c9447d15b8ca0fe135f7..5a95db215e07e2f80af6238a0f92b5d6823a7e0b:/nt/makefile.w32-in diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in index 5e8de8bdf6..5cb13a79e9 100644 --- a/nt/makefile.w32-in +++ b/nt/makefile.w32-in @@ -1,6 +1,6 @@ # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. # Copyright (C) 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2007 Free Software Foundation, Inc. # # Top level makefile for building GNU Emacs on Windows NT # @@ -8,7 +8,7 @@ # # GNU Emacs is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Emacs is distributed in the hope that it will be useful, @@ -21,33 +21,38 @@ # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. +# FIXME: This file uses DOS EOLs. Convert to Unix after 22.1 is out +# (and remove or replace this comment). + ALL = addpm ddeclient runemacs cmdproxy addsection preprep .PHONY: $(ALL) TRES = $(BLD)/emacs.res -addpm: $(BLD) $(BLD)/addpm.exe +XMFLAGS = + +addpm: stamp_BLD $(BLD)/addpm.exe $(BLD)/addpm.exe: $(BLD)/addpm.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32) -ddeclient: $(BLD) $(BLD)/ddeclient.exe +ddeclient: stamp_BLD $(BLD)/ddeclient.exe $(BLD)/ddeclient.exe: $(BLD)/ddeclient.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32) -cmdproxy: $(BLD) $(BLD)/cmdproxy.exe +cmdproxy: stamp_BLD $(BLD)/cmdproxy.exe $(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32) -addsection: $(BLD) $(BLD)/addsection.exe +addsection: stamp_BLD $(BLD)/addsection.exe $(BLD)/addsection.exe: $(BLD)/addsection.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32) -preprep: $(BLD) $(BLD)/preprep.exe +preprep: stamp_BLD $(BLD)/preprep.exe $(BLD)/preprep.exe: $(BLD)/preprep.$(O) $(LINK) $(LINK_OUT)$@ \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) @@ -56,10 +61,10 @@ $(BLD)/preprep.exe: $(BLD)/preprep.$(O) # The resource file. NT 3.10 requires the use of cvtres; even though # it is not necessary on later versions, it is still ok to use it. # -$(TRES): emacs.rc - $(RC) $(RC_OUT)$(BLD)/emacs.res $(ALL_DEPS) +$(TRES): emacs.rc stamp_BLD + $(RC) $(RC_OUT)$(BLD)/emacs.res emacs.rc -runemacs: $(BLD) $(BLD)/runemacs.exe +runemacs: stamp_BLD $(BLD)/runemacs.exe $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES) $(LINK) $(LINK_OUT)$@ $(SUBSYSTEM_WINDOWS) \ $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32) @@ -67,12 +72,18 @@ $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES) which-sh: @echo Using $(THE_SHELL) as shell. +# These depend on stamp_BLD to make sure the $(BLD) directory is created +# before the compilation begins, even if Make runs several commands +# in parallel under "make -j". +# +$(BLD)/addpm.$(O) $(BLD)/ddeclient.$(O) $(BLD)/runemacs.$(O) $(BLD)/cmdproxy.$(O) $(BLD)/addsection.$(O) $(BLD)/preprep.$(O): stamp_BLD + # # Build emacs # -all: which-sh $(BLD) $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE) +all: which-sh stamp_BLD $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE) -all-other-dirs-nmake: +all-other-dirs-nmake: addsection cd ..\lib-src $(MAKE) $(MFLAGS) all cd ..\src @@ -83,11 +94,11 @@ all-other-dirs-nmake: $(MAKE) $(MFLAGS) all cd ..\nt -all-other-dirs-gmake: - $(MAKE) $(MFLAGS) -C ../lib-src all - $(MAKE) $(MFLAGS) -C ../src all - $(MAKE) $(MFLAGS) -C ../lisp all - $(MAKE) $(MFLAGS) -C ../leim all +all-other-dirs-gmake: addsection + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src all + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src all + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp all + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim all recompile: recompile-$(MAKETYPE) @@ -97,7 +108,7 @@ recompile-nmake: cd ..\nt recompile-gmake: - $(MAKE) $(MFLAGS) -C ../lisp recompile + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp recompile #### Bootstrapping. @@ -127,9 +138,12 @@ maybe-bootstrap-SH: doit exit -1; \ fi -bootstrap: addsection bootstrap-$(MAKETYPE) all +# Bootstrap depends on cmdproxy because some Lisp functions +# loaded during bootstrap may need to run shell commands. +bootstrap: addsection cmdproxy bootstrap-$(MAKETYPE) + $(MAKE) $(MFLAGS) $(XMFLAGS) all -bootstrap-nmake: +bootstrap-nmake: addsection cmdproxy cd ..\lisp $(MAKE) $(MFLAGS) bootstrap-clean cd ..\src @@ -139,20 +153,23 @@ bootstrap-nmake: cd ..\src $(MAKE) $(MFLAGS) bootstrap $(MAKE) $(MFLAGS) bootstrap-clean + cd ..\nt + $(CP) $(BLD)/cmdproxy.exe ../bin cd ..\lisp $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap cd ..\lib-src $(MAKE) $(MFLAGS) DOC cd ..\nt -bootstrap-gmake: - $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean - $(MAKE) $(MFLAGS) -C ../src clean - $(MAKE) $(MFLAGS) -C ../lib-src clean - $(MAKE) $(MFLAGS) -C ../src bootstrap - $(MAKE) $(MFLAGS) -C ../src bootstrap-clean - $(MAKE) $(MFLAGS) -C ../lisp bootstrap - $(MAKE) $(MFLAGS) -C ../lib-src DOC +bootstrap-gmake: addsection cmdproxy + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean + $(CP) $(BLD)/cmdproxy.exe ../bin + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src DOC bootstrap-clean: bootstrap-clean-$(MAKETYPE) @@ -163,8 +180,8 @@ bootstrap-clean-nmake: $(MAKE) $(MFLAGS) bootstrap-clean bootstrap-clean-gmake: - $(MAKE) $(MFLAGS) -C ../src bootstrap-clean - $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean $(INSTALL_DIR): - mkdir "$(INSTALL_DIR)" @@ -194,6 +211,8 @@ install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE) $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF) - $(CP_DIR) icons $(INSTALL_DIR)/etc $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF) + $(IFNOTSAMEDIR) $(CP) ../COPYING $(INSTALL_DIR) $(ENDIF) + - $(CP) ../COPYING $(INSTALL_DIR)/bin - $(DEL) ../same-dir.tst - $(DEL) $(INSTALL_DIR)/same-dir.tst @@ -209,35 +228,39 @@ install-other-dirs-nmake: cd ..\nt install-other-dirs-gmake: - $(MAKE) $(MFLAGS) -C ../lib-src install - $(MAKE) $(MFLAGS) -C ../src install - $(MAKE) $(MFLAGS) -C ../lisp install - $(MAKE) $(MFLAGS) -C ../leim install + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src install + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src install + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp install + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim install force-info: -# Note that man/makefile knows how to +# Note that doc/emacs/makefile knows how to # put the info files in $(infodir), # so we can do ok running make in the build dir. info: force-info info-$(MAKETYPE) info-nmake: - cd ..\man + cd ..\doc\emacs + $(MAKE) $(MFLAGS) info + cd ..\doc\misc $(MAKE) $(MFLAGS) info - cd ..\lispref + cd ..\doc\lispref $(MAKE) $(MFLAGS) info - cd ..\lispintro + cd ..\doc\lispintro $(MAKE) $(MFLAGS) info info-gmake: - $(MAKE) $(MFLAGS) -C ../man info - $(MAKE) $(MFLAGS) -C ../lispref info - $(MAKE) $(MFLAGS) -C ../lispintro info + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs info + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc info + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref info + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro info # # Maintenance # clean: clean-other-dirs-$(MAKETYPE) - - $(DEL) *~ $(COMPILER_TEMP_FILES) + - $(DEL) $(COMPILER_TEMP_FILES) - $(DEL_TREE) $(OBJDIR) + - $(DEL) stamp_BLD - $(DEL) ../etc/DOC ../etc/DOC-X clean-other-dirs-nmake: @@ -247,21 +270,23 @@ clean-other-dirs-nmake: $(MAKE) $(MFLAGS) clean cd ..\lisp $(MAKE) $(MFLAGS) clean - cd ..\lispintro + cd ..\doc\lispintro $(MAKE) $(MFLAGS) clean - cd ..\lispref + cd ..\doc\lispref $(MAKE) $(MFLAGS) clean cd ..\leim $(MAKE) $(MFLAGS) clean - cd ..\man + cd ..\doc\emacs + $(MAKE) $(MFLAGS) clean + cd ..\doc\misc $(MAKE) $(MFLAGS) clean cd ..\nt clean-other-dirs-gmake: - $(MAKE) $(MFLAGS) -C ../lib-src clean - $(MAKE) $(MFLAGS) -C ../src clean - $(MAKE) $(MFLAGS) -C ../lisp clean - $(MAKE) $(MFLAGS) -C ../leim clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim clean cleanall-other-dirs-nmake: cd ..\lib-src @@ -271,9 +296,11 @@ cleanall-other-dirs-nmake: cd ..\nt cleanall-other-dirs-gmake: - $(MAKE) $(MFLAGS) -C ../lib-src cleanall - $(MAKE) $(MFLAGS) -C ../src cleanall + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall +# We used to delete *~ here, but that might inadvertently remove +# precious files if it happens to match their short 8+3 aliases. cleanall: clean cleanall-other-dirs-$(MAKETYPE) - $(DEL_TREE) obj - $(DEL_TREE) obj-spd