+2006-12-22 Eli Zaretskii <eliz@gnu.org>
+
+ * gmake.defs (stamp_BLD): Rename from $(BLD). Create a file
+ stamp_BLD after creating the $(BLD) directory.
+
+ * nmake.defs (stamp_BLD): Rename from $(BLD). Create a file
+ stamp_BLD after creating the $(BLD) directory.
+
+ * makefile.w32-in (addpm, ddeclient, cmdproxy, addsection)
+ (preprep, $(TRES), runemacs)
+ ($(BLD)/addpm.$(O), $(BLD)/ddeclient.$(O), $(BLD)/runemacs.$(O))
+ ($(BLD)/cmdproxy.$(O), (BLD)/addsection.$(O), $(BLD)/preprep.$(O)):
+ Depend on stamp_BLD instead of on $(BLD).
+ (XMFLAGS): New macro.
+ (all-other-dirs-nmake, all-other-dirs-gmake, recompile-nmake)
+ (recompile-gmake, bootstrap-gmake, bootstrap-clean-gmake)
+ (install-other-dirs-gmake, info-gmake, clean-other-dirs-gmake)
+ (cleanall-other-dirs-gmake): Pass $(XMFLAGS) to sub-Make.
+
2006-12-20 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(TRES)): Depend on $(BLD). Use $< instead of
$(ALL_DEPS).
- ($(BLD)/addpm.$(O):
- $(BLD)/ddeclient.$(O):
- $(BLD)/runemacs.$(O):
- $(BLD)/cmdproxy.$(O):
- $(BLD)/addsection.$(O):
- $(BLD)/preprep.$(O)): New dependency on $(BLD).
+ ($(BLD)/addpm.$(O), $(BLD)/ddeclient.$(O), $(BLD)/runemacs.$(O)
+ ($(BLD)/cmdproxy.$(O), $(BLD)/addsection.$(O), $(BLD)/preprep.$(O)):
+ New dependency on $(BLD).
(all-other-dirs-nmake, all-other-dirs-gmake, bootstrap-nmake)
(bootstrap-gmake): Depend on addsection.
\r
TRES = $(BLD)/emacs.res\r
\r
-addpm: $(BLD) $(BLD)/addpm.exe\r
+XMFLAGS =\r
+\r
+addpm: stamp_BLD $(BLD)/addpm.exe\r
$(BLD)/addpm.exe: $(BLD)/addpm.$(O)\r
$(LINK) $(LINK_OUT)$@ \\r
$(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
\r
-ddeclient: $(BLD) $(BLD)/ddeclient.exe\r
+ddeclient: stamp_BLD $(BLD)/ddeclient.exe\r
$(BLD)/ddeclient.exe: $(BLD)/ddeclient.$(O)\r
$(LINK) $(LINK_OUT)$@ \\r
$(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
\r
-cmdproxy: $(BLD) $(BLD)/cmdproxy.exe\r
+cmdproxy: stamp_BLD $(BLD)/cmdproxy.exe\r
$(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O)\r
$(LINK) $(LINK_OUT)$@ \\r
$(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)\r
\r
-addsection: $(BLD) $(BLD)/addsection.exe\r
+addsection: stamp_BLD $(BLD)/addsection.exe\r
$(BLD)/addsection.exe: $(BLD)/addsection.$(O)\r
$(LINK) $(LINK_OUT)$@ \\r
$(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)\r
\r
-preprep: $(BLD) $(BLD)/preprep.exe\r
+preprep: stamp_BLD $(BLD)/preprep.exe\r
$(BLD)/preprep.exe: $(BLD)/preprep.$(O)\r
$(LINK) $(LINK_OUT)$@ \\r
$(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS)\r
# The resource file. NT 3.10 requires the use of cvtres; even though\r
# it is not necessary on later versions, it is still ok to use it.\r
#\r
-$(TRES): emacs.rc $(BLD)\r
+$(TRES): emacs.rc stamp_BLD\r
$(RC) $(RC_OUT)$(BLD)/emacs.res $<\r
\r
-runemacs: $(BLD) $(BLD)/runemacs.exe\r
+runemacs: stamp_BLD $(BLD)/runemacs.exe\r
$(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES)\r
$(LINK) $(LINK_OUT)$@ $(SUBSYSTEM_WINDOWS) \\r
$(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
which-sh:\r
@echo Using $(THE_SHELL) as shell.\r
\r
-$(BLD)/addpm.$(O) $(BLD)/ddeclient.$(O) $(BLD)/runemacs.$(O) $(BLD)/cmdproxy.$(O) $(BLD)/addsection.$(O) $(BLD)/preprep.$(O): $(BLD)\r
+# These depend on stamp_BLD to make sure the $(BLD) directory is created\r
+# before the compilation begins, even if Make runs several commands\r
+# in parallel under "make -j".\r
+#\r
+$(BLD)/addpm.$(O) $(BLD)/ddeclient.$(O) $(BLD)/runemacs.$(O) $(BLD)/cmdproxy.$(O) $(BLD)/addsection.$(O) $(BLD)/preprep.$(O): stamp_BLD\r
\r
#\r
# Build emacs\r
#\r
-all: which-sh $(BLD) $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE)\r
+all: which-sh stamp_BLD $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE)\r
\r
all-other-dirs-nmake: addsection\r
cd ..\lib-src\r
- $(MAKE) $(MFLAGS) all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) all\r
cd ..\src\r
- $(MAKE) $(MFLAGS) all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) all\r
cd ..\lisp\r
- $(MAKE) $(MFLAGS) all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) all\r
cd ..\leim\r
- $(MAKE) $(MFLAGS) all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) all\r
cd ..\nt\r
\r
all-other-dirs-gmake: addsection\r
- $(MAKE) $(MFLAGS) -C ../lib-src all\r
- $(MAKE) $(MFLAGS) -C ../src all\r
- $(MAKE) $(MFLAGS) -C ../lisp all\r
- $(MAKE) $(MFLAGS) -C ../leim all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp all\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim all\r
\r
recompile: recompile-$(MAKETYPE)\r
\r
recompile-nmake:\r
cd ..\lisp\r
- $(MAKE) $(MFLAGS) recompile\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) recompile\r
cd ..\nt\r
\r
recompile-gmake:\r
- $(MAKE) $(MFLAGS) -C ../lisp recompile\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp recompile\r
\r
#### Bootstrapping.\r
\r
cd ..\nt\r
\r
bootstrap-gmake: addsection\r
- $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
- $(MAKE) $(MFLAGS) -C ../src clean\r
- $(MAKE) $(MFLAGS) -C ../lib-src clean\r
- $(MAKE) $(MFLAGS) -C ../src bootstrap\r
- $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
- $(MAKE) $(MFLAGS) -C ../lisp bootstrap\r
- $(MAKE) $(MFLAGS) -C ../lib-src DOC\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src DOC\r
\r
bootstrap-clean: bootstrap-clean-$(MAKETYPE)\r
\r
$(MAKE) $(MFLAGS) bootstrap-clean\r
\r
bootstrap-clean-gmake:\r
- $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
- $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean\r
\r
$(INSTALL_DIR):\r
- mkdir "$(INSTALL_DIR)"\r
cd ..\nt\r
\r
install-other-dirs-gmake:\r
- $(MAKE) $(MFLAGS) -C ../lib-src install\r
- $(MAKE) $(MFLAGS) -C ../src install\r
- $(MAKE) $(MFLAGS) -C ../lisp install\r
- $(MAKE) $(MFLAGS) -C ../leim install\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src install\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src install\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp install\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim install\r
\r
force-info:\r
# Note that man/makefile knows how to\r
$(MAKE) $(MFLAGS) info\r
\r
info-gmake:\r
- $(MAKE) $(MFLAGS) -C ../man info\r
- $(MAKE) $(MFLAGS) -C ../lispref info\r
- $(MAKE) $(MFLAGS) -C ../lispintro info\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../man info\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispref info\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispintro info\r
#\r
# Maintenance\r
#\r
cd ..\nt\r
\r
clean-other-dirs-gmake:\r
- $(MAKE) $(MFLAGS) -C ../lib-src clean\r
- $(MAKE) $(MFLAGS) -C ../src clean\r
- $(MAKE) $(MFLAGS) -C ../lisp clean\r
- $(MAKE) $(MFLAGS) -C ../leim clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp clean\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim clean\r
\r
cleanall-other-dirs-nmake:\r
cd ..\lib-src\r
cd ..\nt\r
\r
cleanall-other-dirs-gmake:\r
- $(MAKE) $(MFLAGS) -C ../lib-src cleanall\r
- $(MAKE) $(MFLAGS) -C ../src cleanall\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall\r
+ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall\r
\r
cleanall: clean cleanall-other-dirs-$(MAKETYPE)\r
- $(DEL_TREE) obj\r