summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-12-11 16:26:24 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-12-11 16:26:24 (GMT)
commitc220b0dcfab61bd6f1d633d56dafd78171b3a457 (patch)
tree63c321855c990a48d91e90594effe9247b4407d8 /win
parent5cddfdcda6241cdb20f0b50fe2d10293063786b9 (diff)
downloadtcl-c220b0dcfab61bd6f1d633d56dafd78171b3a457.zip
tcl-c220b0dcfab61bd6f1d633d56dafd78171b3a457.tar.gz
tcl-c220b0dcfab61bd6f1d633d56dafd78171b3a457.tar.bz2
Allow standard targets to be selectively disabled.
Automatic install for extension stubs and public headers if present. Print installation dir, remove useless partial print of preprocessor defines.
Diffstat (limited to 'win')
-rw-r--r--win/rules.vc2
-rw-r--r--win/targets.vc48
2 files changed, 48 insertions, 2 deletions
diff --git a/win/rules.vc b/win/rules.vc
index 9b917b6..10bc26e 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1681,8 +1681,8 @@ TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake"
!message *** Intermediate directory will be '$(TMP_DIR)'
!message *** Output directory will be '$(OUT_DIR)'
+!message *** Installation, if selected, will be in '$(_INSTALLDIR)'
!message *** Suffix for binaries will be '$(SUFX)'
-!message *** Optional defines are '$(OPTDEFINES)'
!message *** Compiler version $(VCVER). Target machine is $(MACHINE)
!message *** Host architecture is $(NATIVE_ARCH)
diff --git a/win/targets.vc b/win/targets.vc
index ca227d8..7f1d388 100644
--- a/win/targets.vc
+++ b/win/targets.vc
@@ -36,17 +36,63 @@ $(PRJLIB): $(PRJ_OBJS) $(RESFILE)
-@del $*.exp
!endif
-!ifndef DISABLE_STANDARD_TARGETS
+!if "$(PRJ_HEADERS)" != "" && "$(PRJ_OBJS)" != ""
+$(PRJ_OBJS): $(PRJ_HEADERS)
+!endif
+
+# If parent makefile has defined stub objects, add their installation
+# to the default install
+!if "$(PRJ_STUBOBJS)" != ""
+default-install: default-install-stubs
+!endif
+
+# Unlike the other default targets, these cannot be in rules.vc because
+# the executed command depends on existence of macro PRJ_HEADERS_PUBLIC
+# that the parent makefile will not define until after including rules-ext.vc
+!if "$(PRJ_HEADERS_PUBLIC)" != ""
+default-install: default-install-headers
+default-install-headers:
+ @echo Installing headers to '$(INCLUDE_INSTALL_DIR)'
+ @for %f in ($(PRJ_HEADERS_PUBLIC)) do @$(COPY) %f "$(INCLUDE_INSTALL_DIR)"
+!endif
+
+!if "$(DISABLE_STANDARD_TARGETS)" == ""
DISABLE_STANDARD_TARGETS = 0
!endif
+!if "$(DISABLE_TARGET_setup)" == ""
+DISABLE_TARGET_setup = 0
+!endif
+!if "$(DISABLE_TARGET_install)" == ""
+DISABLE_TARGET_install = 0
+!endif
+!if "$(DISABLE_TARGET_clean)" == ""
+DISABLE_TARGET_clean = 0
+!endif
+!if "$(DISABLE_TARGET_test)" == ""
+DISABLE_TARGET_test = 0
+!endif
+!if "$(DISABLE_TARGET_shell)" == ""
+DISABLE_TARGET_shell = 0
+!endif
+
!if !$(DISABLE_STANDARD_TARGETS)
+!if !$(DISABLE_TARGET_setup)
setup: default-setup
+!endif
+!if !$(DISABLE_TARGET_install)
install: default-install
+!endif
+!if !$(DISABLE_TARGET_clean)
clean: default-clean
realclean: hose
hose: default-hose
distclean: realclean default-distclean
+!endif
+!if !$(DISABLE_TARGET_test)
test: default-test
+!endif
+!if !$(DISABLE_TARGET_shell)
shell: default-shell
!endif
+!endif # DISABLE_STANDARD_TARGETS