Index: unix/Makefile.in
===================================================================
RCS file: /cvsroot/tktoolkit/tk/unix/Makefile.in,v
retrieving revision 1.93
diff -u -p -r1.93 Makefile.in
--- unix/Makefile.in	24 Apr 2004 06:00:18 -0000	1.93
+++ unix/Makefile.in	24 Apr 2004 07:40:45 -0000
@@ -63,6 +63,9 @@ SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TK
 # Directory in which to install the include file tk.h:
 INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)
 
+# Directory in which to (optionally) install the private tk headers:
+PRIVATE_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
+
 # Top-level directory for manual entries:
 MAN_INSTALL_DIR		= $(INSTALL_ROOT)$(mandir)
 
@@ -678,6 +681,28 @@ install-doc:
 	@echo "Cross-linking command (.n) docs";
 	@$(UNIX_DIR)/mkLinks $(MKLINKS_FLAGS) $(MANN_INSTALL_DIR)
 
+# Optional target to install private headers
+install-private-headers:
+	@for i in $(PRIVATE_INCLUDE_INSTALL_DIR); \
+	    do \
+	    if [ ! -d $$i ] ; then \
+		echo "Making directory $$i"; \
+		mkdir -p $$i; \
+		chmod 755 $$i; \
+		else true; \
+		fi; \
+	    done;
+	@if test ! -x $(UNIX_DIR)/install-sh; then \
+	    chmod +x $(UNIX_DIR)/install-sh; \
+	    fi
+	@echo "Installing private header files";
+	@for i in $(GENERIC_DIR)/tkInt.h $(GENERIC_DIR)/tkIntDecls.h \
+		$(GENERIC_DIR)/tkIntPlatDecls.h $(GENERIC_DIR)/tkPort.h \
+		$(UNIX_DIR)/tkUnixPort.h $(UNIX_DIR)/tkUnixInt.h ; \
+	    do \
+	    $(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
+	    done;
+
 Makefile: $(UNIX_DIR)/Makefile.in
 	$(SHELL) config.status
 
Index: win/Makefile.in
===================================================================
RCS file: /cvsroot/tktoolkit/tk/win/Makefile.in,v
retrieving revision 1.61
diff -u -p -r1.61 Makefile.in
--- win/Makefile.in	24 Apr 2004 06:00:20 -0000	1.61
+++ win/Makefile.in	24 Apr 2004 07:40:45 -0000
@@ -56,6 +56,9 @@ SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TK
 # Directory in which to install the include file tk.h:
 INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)
 
+# Directory in which to (optionally) install the private tk headers:
+PRIVATE_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
+
 # Top-level directory for manual entries:
 MAN_INSTALL_DIR		= $(INSTALL_ROOT)$(mandir)
 
@@ -526,6 +529,24 @@ install-demos:
 
 install-doc: doc
 
+# Optional target to install private headers
+install-private-headers: libraries
+	@for i in $(PRIVATE_INCLUDE_INSTALL_DIR); \
+	    do \
+	    if [ ! -d $$i ] ; then \
+		echo "Making directory $$i"; \
+		$(MKDIR) $$i; \
+		chmod 755 $$i; \
+		else true; \
+		fi; \
+	    done;
+	@echo "Installing private header files to $(PRIVATE_INCLUDE_INSTALL_DIR)/";
+	@for i in $(GENERIC_DIR)/tkInt.h $(GENERIC_DIR)/tkIntDecls.h \
+		$(GENERIC_DIR)/tkIntPlatDecls.h $(GENERIC_DIR)/tkPort.h \
+		$(WIN_DIR)/tkWinPort.h $(WIN_DIR)/tkWinInt.h $(WIN_DIR)/tkWin.h; \
+	    do \
+	    $(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
+	    done;
 
 $(WISH): $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(WISH_OBJS) wish.$(RES)
 	$(CC) $(CFLAGS) $(WISH_OBJS) $(TCL_LIB_FILE) $(TK_LIB_FILE) $(LIBS) \
