Attachment "tcl-install-private-headers.diff" to
ticket [922727ffff]
added by
das
2004-04-24 15:54:35.
Index: macosx/Makefile
===================================================================
RCS file: /cvsroot/tcl/tcl/macosx/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- macosx/Makefile 24 Apr 2004 05:59:18 -0000 1.14
+++ macosx/Makefile 24 Apr 2004 08:46:37 -0000
@@ -94,7 +94,6 @@ PRODUCT_LONGVERSION := $(shell eval $$(g
echo "${PRODUCT_VERSION}$${TCL_PATCH_LEVEL}")
YEAR := $(shell date +%Y)
-PRIVATE_HEADERS := tclInt.h tclIntDecls.h tclIntPlatDecls.h tclPort.h ../unix/tclUnixPort.h
TARGETS := tclsh tcltest
TCLSH := tclsh${PRODUCT_VERSION}
TCL_EXE ?= ${SYMROOT}/${TCLSH}
@@ -154,10 +153,10 @@ test-${PROJECT}: build-${PROJECT}
install-${PROJECT}: build-${PROJECT}
# install to ${INSTALL_ROOT} with optional stripping
- ${MAKE} -C ${OBJ_DIR} install-binaries install-libraries \
- SCRIPT_INSTALL_DIR=${INSTALL_ROOT}${SCRIPTDIR} ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
- mkdir -p ${INSTALL_ROOT}${PRIVATEINCLUDEDIR} && \
- cd ${GENERIC_DIR} && ${CPPROG} ${PRIVATE_HEADERS} ${INSTALL_ROOT}${PRIVATEINCLUDEDIR}
+ ${MAKE} -C ${OBJ_DIR} install-binaries install-libraries install-private-headers \
+ SCRIPT_INSTALL_DIR=${INSTALL_ROOT}${SCRIPTDIR} \
+ PRIVATE_INCLUDE_INSTALL_DIR=${INSTALL_ROOT}${PRIVATEINCLUDEDIR} \
+ ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
ifeq (${BUILD_STYLE},Development)
# keep copy of debug library around, so that
# Deployment build can be installed on top
Index: unix/Makefile.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/Makefile.in,v
retrieving revision 1.136
diff -u -p -r1.136 Makefile.in
--- unix/Makefile.in 24 Apr 2004 05:59:19 -0000 1.136
+++ unix/Makefile.in 24 Apr 2004 08:46:37 -0000
@@ -58,6 +58,9 @@ SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TC
# Directory in which to install the include file tcl.h:
INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
+# Directory in which to (optionally) install the private tcl headers:
+PRIVATE_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
+
# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir)
@@ -730,6 +733,28 @@ install-doc: doc
@echo "Cross-linking command (.n) docs";
@$(UNIX_DIR)/mkLinks $(MKLINKS_FLAGS) $(MANN_INSTALL_DIR)
+# 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 -p $$i; \
+ chmod 755 $$i; \
+ else true; \
+ fi; \
+ done;
+ @if test ! -x $(SRC_DIR)/install-sh; then \
+ chmod +x $(SRC_DIR)/install-sh; \
+ fi
+ @echo "Installing private header files";
+ @for i in $(GENERIC_DIR)/tclInt.h $(GENERIC_DIR)/tclIntDecls.h \
+ $(GENERIC_DIR)/tclIntPlatDecls.h $(GENERIC_DIR)/tclPort.h \
+ $(UNIX_DIR)/tclUnixPort.h ; \
+ do \
+ $(INSTALL_DATA) $$i $(PRIVATE_INCLUDE_INSTALL_DIR); \
+ done;
+
Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in
$(SHELL) config.status
Index: win/Makefile.in
===================================================================
RCS file: /cvsroot/tcl/tcl/win/Makefile.in,v
retrieving revision 1.76
diff -u -p -r1.76 Makefile.in
--- win/Makefile.in 6 Apr 2004 22:25:57 -0000 1.76
+++ win/Makefile.in 24 Apr 2004 08:46:37 -0000
@@ -56,6 +56,9 @@ SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TC
# Directory in which to install the include file tcl.h:
INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
+# Directory in which to (optionally) install the private tcl headers:
+PRIVATE_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
+
# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir)
@@ -571,6 +574,24 @@ install-libraries: libraries
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; \
+ else true; \
+ fi; \
+ done;
+ @echo "Installing private header files";
+ @for i in "$(GENERIC_DIR)/tclInt.h" "$(GENERIC_DIR)/tclIntDecls.h" \
+ "$(GENERIC_DIR)/tclIntPlatDecls.h" "$(GENERIC_DIR)/tclPort.h" \
+ "$(WIN_DIR)/tclWinPort.h" ; \
+ do \
+ $(COPY) "$$i" "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
+ done;
+
# Specifying TESTFLAGS on the command line is the standard way to pass
# args to tcltest, ie:
# % make test TESTFLAGS="-verbose bps -file fileName.test"