Skip to content

Commit 2243555

Browse files
author
jan.nijtmans
committed
Update to latest rules.vc
1 parent 97d947d commit 2243555

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

‎win/rules-ext.vc‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,14 @@ NMAKEHLPC = $(_RULESDIR)\nmakehlp.c
126126
!undef OUR_RULES_MINOR
127127

128128
!if exist("$(_RULESDIR)\rules.vc")
129-
!message *** Using $(_RULESDIR)\rules.vc
130129
!include "$(_RULESDIR)\rules.vc"
130+
!ifndef VERBOSE
131+
# Backward compatibility
132+
VERBOSE=1
133+
!endif
134+
!if $(VERBOSE)
135+
!message *** Using $(_RULESDIR)\rules.vc
136+
!endif
131137
!else
132138
!error *** Could not locate rules.vc in $(_RULESDIR)
133139
!endif

‎win/rules.vc‎

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ NMAKEHLP_NATIVE=nmakehlp
4242
# For modifications that are not backward-compatible, you *must* change
4343
# the major version.
4444
RULES_VERSION_MAJOR = 1
45-
RULES_VERSION_MINOR = 18
45+
RULES_VERSION_MINOR = 19
4646

4747
# The PROJECT macro must be defined by parent makefile.
4848
!if "$(PROJECT)" == ""
@@ -1064,6 +1064,7 @@ WARNINGS = $(WARNINGS) -Wp64
10641064
# SUFX - the suffix to use for binaries based on above naming convention
10651065
# BUILDDIRTOP - the toplevel default output directory
10661066
# is of the form {Release,Debug}[_AMD64][_COMPILERVERSION]
1067+
# unless overridden by defining OUT_DIR on the command line.
10671068
# TMP_DIR - directory where object files are created
10681069
# OUT_DIR - directory where output executables are created
10691070
# Both TMP_DIR and OUT_DIR are defaulted only if not defined by the
@@ -1079,19 +1080,43 @@ WARNINGS = $(WARNINGS) -Wp64
10791080

10801081
SUFX = tsgx
10811082

1083+
# If OUT_DIR is defined (via command line or environment) make that
1084+
# define BUILDDIRTOP as its tail. Otherwise, default it as below and
1085+
# define OUT_DIR based on BUILDDIRTOP.
1086+
!ifdef OUT_DIR
1087+
# Relative paths -> absolute
1088+
!if [echo OUT_DIR = \> nmakehlp.out] \
1089+
|| [$(NMAKEHLP_NATIVE) -Q "$(OUT_DIR)" >> nmakehlp.out]
1090+
!error *** Could not fully qualify path OUT_DIR=$(OUT_DIR)
1091+
!endif
1092+
# The undef is needed when OUT_DIR is passed on the command line
1093+
# otherwise the definition in the include will not take effect
1094+
!undef OUT_DIR
1095+
!include nmakehlp.out
1096+
!if [echo BUILDDIRTOP = \> nmakehlp.out] \
1097+
|| [for %A in ("$(OUT_DIR)") do echo %~nxA \>> nmakehlp.out]
1098+
!error *** Could not get tail of path OUT_DIR=$(OUT_DIR)
1099+
!endif
1100+
!include nmakehlp.out
1101+
1102+
!else
1103+
10821104
!if $(DEBUG)
10831105
BUILDDIRTOP = Debug
10841106
!else
10851107
BUILDDIRTOP = Release
10861108
!endif
10871109

1110+
10881111
!if "$(MACHINE)" != "IX86"
10891112
BUILDDIRTOP =$(BUILDDIRTOP)_$(MACHINE)
10901113
!endif
10911114
!if $(VCVER) > 6
10921115
BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
10931116
!endif
10941117

1118+
!endif
1119+
10951120
!if !$(DEBUG) || $(TCL_VERSION) > 86 || $(DEBUG) && $(UNCHECKED)
10961121
SUFX = $(SUFX:g=)
10971122
!endif

0 commit comments

Comments
 (0)