15 return os
.path
.abspath(os
.path
.join(__file__
, par
, par
, par
, par
, name
))
17 TCL_DIR
= abspath("tcl%d.%d.%d" % (TCL_MAJOR
, TCL_MINOR
, TCL_PATCH
))
18 TK_DIR
= abspath("tk%d.%d.%d" % (TCL_MAJOR
, TCL_MINOR
, TCL_PATCH
))
19 TIX_DIR
= abspath("tix%d.%d.%d" % (TIX_MAJOR
, TIX_MINOR
, TIX_PATCH
))
20 OUT_DIR
= abspath("tcltk")
23 return any(s
in sys
.argv
[1:] for s
in a
)
26 os
.chdir(os
.path
.join(dir, "win"))
29 debug
= have_args("-d", "--debug")
30 clean
= have_args("clean")
31 install
= have_args("install")
32 tcl
= have_args("tcl")
34 tix
= have_args("tix")
35 if not(tcl
) and not(tk
) and not(tix
):
38 def nmake(makefile
, *a
):
39 args
= ["nmake", "/nologo", "/f", makefile
, "DEBUG=%d" % debug
]
41 subprocess
.check_call(args
)
46 nmake("makefile.vc", *a
)
50 nmake_tcl("install", "INSTALLDIR=" + OUT_DIR
)
57 nmake("makefile.vc", "TCLDIR=" + TCL_DIR
, *a
)
61 nmake_tk("install", "INSTALLDIR=" + OUT_DIR
)
69 "TCL_MAJOR=%d" % TCL_MAJOR
,
70 "TCL_MINOR=%d" % TCL_MINOR
,
71 "TCL_PATCH=%d" % TCL_PATCH
,
76 nmake_tix("install", "INSTALL_DIR=" + OUT_DIR
)
80 if __name__
== '__main__':