mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
msvc.mak: (hopefully) make external dependencies work with NMAKE
Hopefully this will make external dependencies work with NMAKE. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
cae5d06184
commit
d685bd2c4c
@ -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 --#
|
||||
|
@ -134,7 +134,7 @@ sub _insert_deps($$) {
|
||||
my $obj = '.o'; # Defaults
|
||||
my $sep = '/';
|
||||
my $cont = "\\";
|
||||
my $include_command = 'include';
|
||||
my $include_command = undef;
|
||||
my $selfrule = 0;
|
||||
my $do_external = 0;
|
||||
my $maxline = 78; # Seems like a reasonable default
|
||||
@ -194,7 +194,7 @@ sub _insert_deps($$) {
|
||||
}
|
||||
|
||||
if ( $externalize ) {
|
||||
if ( $is_external ) {
|
||||
if ( $is_external && defined($include_command) ) {
|
||||
print $out "$include_command $external\n";
|
||||
}
|
||||
return undef;
|
||||
|
Loading…
Reference in New Issue
Block a user