diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-08 12:15:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-08 12:15:07 (GMT) |
commit | ad8867047b3dbf97070106075b402f749cb73e81 (patch) | |
tree | d5a96d950250871ed11ffa5a17e1d4dcfe690280 | |
parent | b0d5cedf3b3ac5e59e669ab1072cf6b7906ed01b (diff) | |
download | tk-ad8867047b3dbf97070106075b402f749cb73e81.zip tk-ad8867047b3dbf97070106075b402f749cb73e81.tar.gz tk-ad8867047b3dbf97070106075b402f749cb73e81.tar.bz2 |
Fix [44eaf9a908]: 'make distclean' fails on trunk
Undo ttk.decls from unnecessary "current" and ending semicolon
Don't use "catch" in Tk's pkgIndex.tcl, and don't use "load" 2th argument
-rw-r--r-- | generic/ttk/ttk.decls | 124 | ||||
-rw-r--r-- | unix/Makefile.in | 24 | ||||
-rw-r--r-- | win/Makefile.in | 30 | ||||
-rw-r--r-- | win/makefile.vc | 6 |
4 files changed, 94 insertions, 90 deletions
diff --git a/generic/ttk/ttk.decls b/generic/ttk/ttk.decls index 8b2b50b..e668a2a 100644 --- a/generic/ttk/ttk.decls +++ b/generic/ttk/ttk.decls @@ -3,148 +3,148 @@ interface ttk epoch 0 scspec TTKAPI -declare 0 current { - Ttk_Theme Ttk_GetTheme(Tcl_Interp *interp, const char *name); +declare 0 { + Ttk_Theme Ttk_GetTheme(Tcl_Interp *interp, const char *name) } -declare 1 current { - Ttk_Theme Ttk_GetDefaultTheme(Tcl_Interp *interp); +declare 1 { + Ttk_Theme Ttk_GetDefaultTheme(Tcl_Interp *interp) } -declare 2 current { - Ttk_Theme Ttk_GetCurrentTheme(Tcl_Interp *interp); +declare 2 { + Ttk_Theme Ttk_GetCurrentTheme(Tcl_Interp *interp) } -declare 3 current { +declare 3 { Ttk_Theme Ttk_CreateTheme( - Tcl_Interp *interp, const char *name, Ttk_Theme parent); + Tcl_Interp *interp, const char *name, Ttk_Theme parent) } -declare 4 current { +declare 4 { void Ttk_RegisterCleanup( - Tcl_Interp *interp, void *deleteData, Ttk_CleanupProc *cleanupProc); + Tcl_Interp *interp, void *deleteData, Ttk_CleanupProc *cleanupProc) } -declare 5 current { +declare 5 { int Ttk_RegisterElementSpec( Ttk_Theme theme, const char *elementName, Ttk_ElementSpec *elementSpec, - void *clientData); + void *clientData) } -declare 6 current { +declare 6 { Ttk_ElementClass *Ttk_RegisterElement( Tcl_Interp *interp, Ttk_Theme theme, const char *elementName, Ttk_ElementSpec *elementSpec, - void *clientData); + void *clientData) } -declare 7 current { +declare 7 { int Ttk_RegisterElementFactory( Tcl_Interp *interp, const char *name, Ttk_ElementFactory factoryProc, - void *clientData); + void *clientData) } -declare 8 current { +declare 8 { void Ttk_RegisterLayout( - Ttk_Theme theme, const char *className, Ttk_LayoutSpec layoutSpec); + Ttk_Theme theme, const char *className, Ttk_LayoutSpec layoutSpec) } # # State maps. # -declare 10 current { +declare 10 { int Ttk_GetStateSpecFromObj( - Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_StateSpec *spec_rtn); + Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_StateSpec *spec_rtn) } -declare 11 current { +declare 11 { Tcl_Obj *Ttk_NewStateSpecObj( - unsigned int onbits, unsigned int offbits); + unsigned int onbits, unsigned int offbits) } -declare 12 current { +declare 12 { Ttk_StateMap Ttk_GetStateMapFromObj( - Tcl_Interp *interp, Tcl_Obj *objPtr); + Tcl_Interp *interp, Tcl_Obj *objPtr) } -declare 13 current { +declare 13 { Tcl_Obj *Ttk_StateMapLookup( - Tcl_Interp *interp, Ttk_StateMap map, Ttk_State state); + Tcl_Interp *interp, Ttk_StateMap map, Ttk_State state) } -declare 14 current { +declare 14 { int Ttk_StateTableLookup( - Ttk_StateTable map[], Ttk_State state); + Ttk_StateTable map[], Ttk_State state) } # # Low-level geometry utilities. # -declare 20 current { +declare 20 { int Ttk_GetPaddingFromObj( Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, - Ttk_Padding *pad_rtn); + Ttk_Padding *pad_rtn) } -declare 21 current { +declare 21 { int Ttk_GetBorderFromObj( Tcl_Interp *interp, Tcl_Obj *objPtr, - Ttk_Padding *pad_rtn); + Ttk_Padding *pad_rtn) } -declare 22 current { +declare 22 { int Ttk_GetStickyFromObj( - Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Sticky *sticky_rtn); + Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Sticky *sticky_rtn) } -declare 23 current { +declare 23 { Ttk_Padding Ttk_MakePadding( - short l, short t, short r, short b); + short l, short t, short r, short b) } -declare 24 current { +declare 24 { Ttk_Padding Ttk_UniformPadding( - short borderWidth); + short borderWidth) } -declare 25 current { - Ttk_Padding Ttk_AddPadding(Ttk_Padding pad1, Ttk_Padding pad2); +declare 25 { + Ttk_Padding Ttk_AddPadding(Ttk_Padding pad1, Ttk_Padding pad2) } -declare 26 current { +declare 26 { Ttk_Padding Ttk_RelievePadding( - Ttk_Padding padding, int relief, int n); + Ttk_Padding padding, int relief, int n) } -declare 27 current { - Ttk_Box Ttk_MakeBox(int x, int y, int width, int height); +declare 27 { + Ttk_Box Ttk_MakeBox(int x, int y, int width, int height) } -declare 28 current { - int Ttk_BoxContains(Ttk_Box box, int x, int y); +declare 28 { + int Ttk_BoxContains(Ttk_Box box, int x, int y) } -declare 29 current { - Ttk_Box Ttk_PackBox(Ttk_Box *cavity, int w, int h, Ttk_Side side); +declare 29 { + Ttk_Box Ttk_PackBox(Ttk_Box *cavity, int w, int h, Ttk_Side side) } -declare 30 current { - Ttk_Box Ttk_StickBox(Ttk_Box parcel, int w, int h, Ttk_Sticky sticky); +declare 30 { + Ttk_Box Ttk_StickBox(Ttk_Box parcel, int w, int h, Ttk_Sticky sticky) } -declare 31 current { - Ttk_Box Ttk_AnchorBox(Ttk_Box parcel, int w, int h, Tk_Anchor anchor); +declare 31 { + Ttk_Box Ttk_AnchorBox(Ttk_Box parcel, int w, int h, Tk_Anchor anchor) } -declare 32 current { - Ttk_Box Ttk_PadBox(Ttk_Box b, Ttk_Padding p); +declare 32 { + Ttk_Box Ttk_PadBox(Ttk_Box b, Ttk_Padding p) } -declare 33 current { - Ttk_Box Ttk_ExpandBox(Ttk_Box b, Ttk_Padding p); +declare 33 { + Ttk_Box Ttk_ExpandBox(Ttk_Box b, Ttk_Padding p) } -declare 34 current { +declare 34 { Ttk_Box Ttk_PlaceBox( - Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky); + Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky) } -declare 35 current { - Tcl_Obj *Ttk_NewBoxObj(Ttk_Box box); +declare 35 { + Tcl_Obj *Ttk_NewBoxObj(Ttk_Box box) } # # Utilities. # -declare 40 current { - int Ttk_GetOrientFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient); +declare 40 { + int Ttk_GetOrientFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient) } diff --git a/unix/Makefile.in b/unix/Makefile.in index ace5a3a..5fc8cb9 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -701,16 +701,16 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE} echo "Creating package index $(PKG_INDEX)"; \ rm -f "$(PKG_INDEX)"; \ (\ - echo "if {[catch {package present Tcl 8.5.0}]} return";\ + echo "if {![package vsatisfies [package provide Tcl] 8.5.0]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \ - echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]] Tk]";\ + echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]]]";\ else \ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]]]";\ echo "} else {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]]]";\ echo "}";\ fi \ ) > "$(PKG_INDEX)"; \ @@ -721,8 +721,8 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE} @if test -f "tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \ $(INSTALL_LIBRARY) "tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\ chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\ - $(INSTALL_LIBRARY) "../win/libtk${MAJOR_VERSION}${MINOR_VERSION}.a" "$(LIB_INSTALL_DIR)";\ - chmod 555 "$(LIB_INSTALL_DIR)/libtk${MAJOR_VERSION}${MINOR_VERSION}.a";\ + $(INSTALL_LIBRARY) "../win/libtk${MAJOR_VERSION}${MINOR_VERSION}.dll.a" "$(LIB_INSTALL_DIR)";\ + chmod 555 "$(LIB_INSTALL_DIR)/libtk${MAJOR_VERSION}${MINOR_VERSION}.dll.a";\ fi @echo "Installing ${WISH_EXE} as $(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}" @$(INSTALL_PROGRAM) ${WISH_EXE} "$(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}" @@ -734,8 +734,8 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE} fi @EXTRA_INSTALL_BINARIES@ @echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/" - @$(INSTALL_DATA_DIR) $(LIB_INSTALL_DIR)/pkgconfig - @$(INSTALL_DATA) tk.pc $(LIB_INSTALL_DIR)/pkgconfig/tk.pc + @$(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/pkgconfig" + @$(INSTALL_DATA) tk.pc "$(LIB_INSTALL_DIR)/pkgconfig/tk.pc" install-libraries: libraries @for i in "$(SCRIPT_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)/images" \ @@ -876,8 +876,10 @@ Makefile: $(UNIX_DIR)/Makefile.in # $(SHELL) config.status clean: + rm -rf *.vfs rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out \ - errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc + errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc \ + *.zip distclean: clean rm -rf Makefile config.status config.cache config.log tkConfig.sh \ @@ -1488,7 +1490,7 @@ rpm: all # # Target to create a proper Tk distribution from information in the -# master source directory. DISTDIR must be defined to indicate where +# source directory. DISTDIR must be defined to indicate where # to put the distribution. DISTDIR must be an absolute path name. # @@ -1617,7 +1619,7 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(M $(TOP_DIR)/doc/man.macros $(DISTDIR)/doc mkdir $(DISTDIR)/tests cp -p $(TOP_DIR)/license.terms $(TEST_DIR)/*.{test,tcl} \ - $(TEST_DIR)/README $(TEST_DIR)/*.{gif,ppm,xbm} \ + $(TEST_DIR)/README $(TEST_DIR)/*.{gif,png,ppm,xbm} \ $(TEST_DIR)/option.file* $(DISTDIR)/tests mkdir $(DISTDIR)/tests/ttk cp -p $(TEST_DIR)/ttk/*.{test,tcl} $(DISTDIR)/tests/ttk diff --git a/win/Makefile.in b/win/Makefile.in index e2071f6..6d3d472 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -146,7 +146,7 @@ MAN2TCL = man2tcl$(EXEEXT) # makefile to look into these paths when resolving .c to .obj # dependencies. -VPATH = $(GENERIC_DIR):$(TTK_DIR):$(WIN_DIR):$(UNIX_DIR):$(XLIB_DIR):$(RC_DIR) +VPATH = $(GENERIC_DIR):$(TTK_DIR):$(WIN_DIR):$(XLIB_DIR):$(RC_DIR) # warning flags CFLAGS_WARNING = @CFLAGS_WARNING@ @@ -159,18 +159,12 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ -# Tk does not used deprecated Tcl constructs so it should -# compile fine with -DTCL_NO_DEPRECATED. To remove its own -# set of deprecated code uncomment the second line. -NO_DEPRECATED_FLAGS = -#NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED - # To change the compiler switches, for example to change from optimization to # debugging symbols, change the following line: #CFLAGS = $(CFLAGS_DEBUG) #CFLAGS = $(CFLAGS_OPTIMIZE) #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) -CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ $(NO_DEPRECATED_FLAGS) -D_ATL_XP_TARGETING=1 -D__USE_MINGW_ANSI_STDIO=0 +CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D_ATL_XP_TARGETING=1 -D__USE_MINGW_ANSI_STDIO=0 # Special compiler flags to use when building man2tcl on Windows. MAN2TCLFLAGS = @MAN2TCLFLAGS@ @@ -204,6 +198,12 @@ COPY = cp BUILD_TCLSH = @BUILD_TCLSH@ +# Tk does not used deprecated Tcl constructs so it should +# compile fine with -DTCL_NO_DEPRECATED. To remove its own +# set of deprecated code uncomment the second line. +NO_DEPRECATED_FLAGS = +#NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED + # TCL_EXE is the name of a tclsh executable that is available *BEFORE* # running make for the first time. Certain build targets (make genstubs) # need it to be available on the PATH. This executable should *NOT* be @@ -214,7 +214,8 @@ TCL_EXE = @TCLSH_PROG@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ -I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \ --I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" ${AC_FLAGS} +-I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" \ +${AC_FLAGS} $(NO_DEPRECATED_FLAGS) CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -480,12 +481,12 @@ install-binaries: binaries @echo "Creating package index $(PKG_INDEX)"; @$(RM) $(PKG_INDEX); @(\ - echo "if {[catch {package present Tcl 8.5.0}]} return";\ + echo "if {![package vsatisfies [package provide Tcl] 8.5.0]} return";\ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\ - echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin libtk$(VERSION).dll]] Tk]";\ + echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin libtk$(VERSION).dll]]]";\ echo "} else {";\ - echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin $(TK_DLL_FILE)]] Tk]";\ + echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin $(TK_DLL_FILE)]]]";\ echo "}";\ ) > $(PKG_INDEX); @for i in tkConfig.sh $(TK_LIB_FILE) $(TK_STUB_LIB_FILE); \ @@ -650,7 +651,7 @@ winMain.$(OBJEXT): winMain.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) testMain.$(OBJEXT): winMain.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ -DTK_TEST $(CC_OBJNAME) + $(CC) -c $(CC_SWITCHES) -DTK_TEST @DEPARG@ $(CC_OBJNAME) tkTest.$(OBJEXT): tkTest.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) @@ -692,7 +693,8 @@ cleanhelp: clean: cleanhelp $(RM) *.lib *.a *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(WISH) $(TKTEST) $(CAT32) - $(RM) *.pch *.ilk *.pdb + $(RM) *.pch *.ilk *.pdb *.zip + $(RMDIR) *.vfs distclean: clean $(RM) Makefile config.status config.cache config.log tkConfig.sh \ diff --git a/win/makefile.vc b/win/makefile.vc index 654f21d..9892ee4 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -954,12 +954,12 @@ install-binaries: !if !$(STATIC_BUILD)
@echo creating package index
@type << > $(OUT_DIR)\pkgIndex.tcl
-if {[catch {package present Tcl $(TK_DOTVERSION).0}]} { return }
+if {![package vsatisfies [package provide Tcl] $(TK_DOTVERSION).0]} return
if {($$::tcl_platform(platform) eq "unix") && ([info exists ::env(DISPLAY)]
|| ([info exists ::argv] && ("-display" in $$::argv)))} {
- package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin libtk$(TK_DOTVERSION).dll] Tk]
+ package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin libtk$(TK_DOTVERSION).dll]]
} else {
- package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk]
+ package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)]]
}
<<
@$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)\"
|