diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2017-10-21 12:14:25 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2017-10-21 12:14:25 (GMT) |
commit | 7db056b75a847ee07e8c457304fec5b3c68bed4a (patch) | |
tree | 5591350707e231c9bafa28143b857f4bf4a96e86 /win/rules.vc | |
parent | 6f23316c4abdd3a5605d3aa6b558639095d75650 (diff) | |
download | tcl-7db056b75a847ee07e8c457304fec5b3c68bed4a.zip tcl-7db056b75a847ee07e8c457304fec5b3c68bed4a.tar.gz tcl-7db056b75a847ee07e8c457304fec5b3c68bed4a.tar.bz2 |
Fully qualify OUT_DIR and TMP_DIR paths so that the test target can
change directories and not break relative paths to the built extension.
Diffstat (limited to 'win/rules.vc')
-rw-r--r-- | win/rules.vc | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/win/rules.vc b/win/rules.vc index 88b90e0..69f531e 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -70,6 +70,14 @@ PROJECT_REQUIRES_TK = 0 # changing them for consistency or clarity.
# 0. Sanity check compiler environment
+
+!if !exist("rules-ext.vc")
+MSG = ^
+You must run nmake from the directory containing the makefile and rules-ext.vc.^
+Please `cd` to its location first.
+!error $(MSG)
+!endif
+
# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
@@ -538,7 +546,7 @@ DEBUGFLAGS = $(DEBUGFLAGS) -GZ # They are not passed through to the actual application / extension
# link rules.
!ifndef LINKER_TESTFLAGS
-LINKER_TESTFLAGS = /DLL /NOENTRY /OUT:nmhlp-out.txt
+LINKER_TESTFLAGS = /DLL /NOENTRY /OUT:nmakehlp.out
!endif
LINKERFLAGS =
@@ -951,6 +959,17 @@ OUT_DIR = $(TMP_DIR) !endif
!endif
+# Relative paths -> absolute
+!if [echo OUT_DIR = \> nmakehlp.out] \
+ || [nmakehlp -Q "$(OUT_DIR)" >> nmakehlp.out]
+!error *** Could not fully qualify path OUT_DIR=$(OUT_DIR)
+!endif
+!if [echo TMP_DIR = \>> nmakehlp.out] \
+ || [nmakehlp -Q "$(TMP_DIR)" >> nmakehlp.out]
+!error *** Could not fully qualify path TMP_DIR=$(TMP_DIR)
+!endif
+!include nmakehlp.out
+
# The name of the stubs library for the project being built
STUBPREFIX = $(PROJECT)stub
@@ -1400,7 +1419,7 @@ default-install-libraries: $(OUT_DIR)\pkgIndex.tcl default-install-docs-html:
@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
@if not exist "$(DOC_INSTALL_DIR)" mkdir "$(DOC_INSTALL_DIR)"
- @if exist $(DOCDIR) for %f in ("$(DOCDIR)\*.html" "$(DOCDIR)\*.css") do @$(COPY) %f "$(DOC_INSTALL_DIR)"
+ @if exist $(DOCDIR) for %f in ("$(DOCDIR)\*.html" "$(DOCDIR)\*.css" "$(DOCDIR)\*.png") do @$(COPY) %f "$(DOC_INSTALL_DIR)"
default-install-docs-n:
@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
@@ -1418,6 +1437,7 @@ default-clean: @echo Cleaning $(WINDIR)\nmakehlp.obj, nmakehlp.exe ...
@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
+ @if exist $(WINDIR)\nmakehlp.out del $(WINDIR)\nmakehlp.out
@echo Cleaning $(WINDIR)\_junk.pch ...
@if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
@echo Cleaning $(WINDIR)\vercl.x, vercl.i ...
|