summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-09-24 14:25:48 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-09-24 14:25:48 (GMT)
commit34cb030c7be20776256f30ae2545dc88805e37be (patch)
treed7c3c153df74f8c398923a1ccd34ec485189cc36
parenta91099b33b6288e117d3913fb6da2800c2026758 (diff)
downloadtcl-34cb030c7be20776256f30ae2545dc88805e37be.zip
tcl-34cb030c7be20776256f30ae2545dc88805e37be.tar.gz
tcl-34cb030c7be20776256f30ae2545dc88805e37be.tar.bz2
Move clean target to rules.vc to avoid repetition in every extension
-rw-r--r--win/makefile.vc32
-rw-r--r--win/rules.vc38
2 files changed, 40 insertions, 30 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index 098662b..d08f30c 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -198,7 +198,6 @@ PROJECT = tcl
!include versions.vc
-STUBPREFIX = $(PROJECT)stub
DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
@@ -456,13 +455,9 @@ TCLSTUBOBJS = \
$(TMP_DIR)\tclTomMathStubLib.obj \
$(TMP_DIR)\tclOOStubLib.obj
-### The following paths CANNOT have spaces in them.
-COMPATDIR = $(ROOT)\compat
-DOCDIR = $(ROOT)\doc
-GENERICDIR = $(ROOT)\generic
+### The following paths CANNOT have spaces in them as they appear on
+### the left side of implicit rules.
TOMMATHDIR = $(ROOT)\libtommath
-TOOLSDIR = $(ROOT)\tools
-WINDIR = $(ROOT)\win
PKGSDIR = $(ROOT)\pkgs
#---------------------------------------------------------------------
@@ -471,7 +466,6 @@ PKGSDIR = $(ROOT)\pkgs
cflags = $(cflags) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
-cflags = $(cflags) -Fp$(TMP_DIR)^\
TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)"
TCL_DEFINES = -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline -DHAVE_ZLIB=1
@@ -1138,27 +1132,7 @@ tidy:
@echo Removing $(TCLREGLIB) ...
@if exist $(TCLREGLIB) del $(TCLREGLIB)
-clean: clean-pkgs
- @echo Cleaning $(TMP_DIR)\* ...
- @if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
- @echo Cleaning $(WINDIR)\nmakehlp.obj ...
- @if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
- @echo Cleaning $(WINDIR)\nmakehlp.exe ...
- @if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
- @echo Cleaning $(WINDIR)\_junk.pch ...
- @if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
- @echo Cleaning $(WINDIR)\vercl.x ...
- @if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
- @echo Cleaning $(WINDIR)\vercl.i ...
- @if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
- @echo Cleaning $(WINDIR)\versions.vc ...
- @if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
-
-realclean: hose
-
-hose:
- @echo Hosing $(OUT_DIR)\* ...
- @if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
+clean: basicclean clean-pkgs
# Local Variables:
# mode: makefile
diff --git a/win/rules.vc b/win/rules.vc
index 3a45cd7..7addfd0 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -81,6 +81,11 @@ MKDIR = mkdir
#
# The fragment will set the following macros:
# ROOT - root of this module sources
+# COMPATDIR - source directory that holds compatibility sources
+# DOCDIR - source directory containing documentation files
+# GENERICDIR - platform-independent source directory
+# WINDIR - Windows-specific source directory
+# TOOLSDIR - directory containing build tools
# _TCLDIR - root of the Tcl installation OR the Tcl sources. Not set
# when building Tcl itself.
# _INSTALLDIR - native form of the installation path. For Tcl
@@ -98,8 +103,16 @@ MKDIR = mkdir
# TKINSTALL - set 1 if _TKDIR refers to installed Tk and 0 if Tk sources
# _TK_H - native path to the tk.h file
-# Root directory for sources
+# Root directory for sources and assumed subdirectories
ROOT = $(MAKEDIR)\..
+# The following paths CANNOT have spaces in them as they appear on the
+# left side of implicit rules.
+COMPATDIR = $(ROOT)\compat
+DOCDIR = $(ROOT)\doc
+GENERICDIR = $(ROOT)\generic
+TOOLSDIR = $(ROOT)\tools
+WINDIR = $(ROOT)\win
+
# The target directory where the built packages and binaries will be installed.
# INSTALLDIR is the (optional) path specified by the user.
@@ -1072,6 +1085,29 @@ baselibs = $(winlibs) $(extralibs)
baselibs = $(baselibs) ucrt.lib
!endif
+basicclean: clean-pkgs
+ @echo Cleaning $(TMP_DIR)\* ...
+ @if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
+ @echo Cleaning $(WINDIR)\nmakehlp.obj ...
+ @if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
+ @echo Cleaning $(WINDIR)\nmakehlp.exe ...
+ @if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
+ @echo Cleaning $(WINDIR)\_junk.pch ...
+ @if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
+ @echo Cleaning $(WINDIR)\vercl.x ...
+ @if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
+ @echo Cleaning $(WINDIR)\vercl.i ...
+ @if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
+ @echo Cleaning $(WINDIR)\versions.vc ...
+ @if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
+ @if exist $(WINDIR)\version.vc del $(WINDIR)\version.vc
+
+realclean: hose
+
+hose:
+ @echo Hosing $(OUT_DIR)\* ...
+ @if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
+
#----------------------------------------------------------
# Display stats being used.