From d685bd2c4cf9b1fdeef1651575e3cfb7b5c23357 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 8 Nov 2017 10:57:16 -0800 Subject: msvc.mak: (hopefully) make external dependencies work with NMAKE Hopefully this will make external dependencies work with NMAKE. Signed-off-by: H. Peter Anvin --- Mkfiles/msvc.mak | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'Mkfiles') diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak index d77d822b..711ca423 100644 --- a/Mkfiles/msvc.mak +++ b/Mkfiles/msvc.mak @@ -53,6 +53,7 @@ LN_S = copy O = obj A = lib X = .exe +.SUFFIXES: .SUFFIXES: .c .i .s .$(O) .$(A) .exe .1 .man .c.obj: @@ -312,15 +313,6 @@ nsis: nsis\nasm.nsi nsis\arch.nsh nsis\version.nsh #-- End NSIS Rules --# -# -# Generate dependency information for this Makefile only. -# If this Makefile has external dependency information, then -# the dependency information will remain external, so it doesn't -# pollute the git logs. -# -deps: perlreq tools/mkdep.pl - $(PERL) tools/mkdep.pl -M Mkfiles/msvc.mak -- $(DEPDIRS) - clean: -del /f /s *.$(O) -del /f /s *.pdb @@ -370,9 +362,37 @@ docs: everything: all docs nsis +# +# Does this version of this file have external dependencies? This definition +# will be automatically updated by mkdep.pl as needed. +# +EXTERNAL_DEPENDENCIES = 1 + +# +# Generate dependency information for this Makefile only. +# If this Makefile has external dependency information, then +# the dependency information will remain external, so it doesn't +# pollute the git logs. +# +msvc.dep: $(PERLREQ) tools\mkdep.pl + $(RUNPERL) tools\mkdep.pl -M Mkfiles\msvc.mak -- $(DEPDIRS) + +dep: msvc.dep + +# Include and/or generate msvc.dep as needed. This is too complex to +# use the include-command feature, but we can open-code it here. +!IF $(EXTERNAL_DEPENDENCIES) == 1 +!IF [$(MAKE) /c msvc.dep] == 0 +!INCLUDE msvc.dep +!ELSE +!ERROR Unable to rebuild dependencies file msvc.dep +!ENDIF +!ENDIF + #-- Magic hints to mkdep.pl --# # @object-ending: ".$(O)" # @path-separator: "\" # @exclude: "config/config.h" -# @include-command: "!INCLUDE" +# @external: "msvc.dep" +# @selfrule: "1" #-- Everything below is generated by mkdep.pl - do not edit --# -- cgit v1.2.1