head	1.20;
access;
symbols
	core-8-4-19:1.7.2.17
	core-8-4-18:1.7.2.17
	core-8-4-17:1.7.2.17
	core-8-4-16:1.7.2.17
	core-8-4-15:1.7.2.17
	core-8-4-14:1.7.2.16
	core-8-4-13:1.7.2.14
	core-8-4-12:1.7.2.12
	core-8-4-11:1.7.2.11
	core-8-5-a3:1.18
	core-8-4-10:1.7.2.10
	core-8-4-9-branch:1.7.2.7.0.2
	core-8-5-a2:1.15
	core-8-4-9:1.7.2.7
	core-8-4-8:1.7.2.7
	core-8-4-7:1.7.2.6
	core-8-5-a1:1.13
	core-8-4-6:1.7.2.5
	core-8-4-5:1.7.2.4
	mistachkin-dev-branch:1.11.0.2
	core-8-4-4:1.7.2.2
	core-8-4-3:1.7.2.1
	core-8-4-branch:1.7.0.2
	core-8-4-2:1.7
	core-8-4-1:1.6
	core-8-4-0:1.2
	macosx-8-4-merge-2002-08-31-trunk:1.2
	macosx-8-4-premerge-2002-08-31-branch:1.1.2.2
	macosx-8-4-branch:1.1.0.2;
locks; strict;
comment	@# @;


1.20
date	2005.11.22.20.23.33;	author das;	state dead;
branches;
next	1.19;

1.19
date	2005.06.18.21.46.02;	author das;	state Exp;
branches;
next	1.18;

1.18
date	2005.06.03.08.52.35;	author das;	state Exp;
branches;
next	1.17;

1.17
date	2005.05.26.11.19.01;	author das;	state Exp;
branches;
next	1.16;

1.16
date	2005.05.23.20.24.59;	author das;	state Exp;
branches;
next	1.15;

1.15
date	2004.11.11.01.24.32;	author das;	state Exp;
branches;
next	1.14;

1.14
date	2004.07.20.11.49.16;	author das;	state Exp;
branches;
next	1.13;

1.13
date	2004.02.23.22.49.26;	author das;	state Exp;
branches;
next	1.12;

1.12
date	2004.01.27.10.09.37;	author das;	state Exp;
branches;
next	1.11;

1.11
date	2003.10.01.14.35.32;	author das;	state Exp;
branches;
next	1.10;

1.10
date	2003.09.25.05.37.00;	author das;	state Exp;
branches;
next	1.9;

1.9
date	2003.07.18.02.02.28;	author das;	state Exp;
branches;
next	1.8;

1.8
date	2003.03.18.13.47.52;	author das;	state Exp;
branches;
next	1.7;

1.7
date	2003.02.19.16.44.16;	author das;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2002.10.16.23.56.02;	author das;	state Exp;
branches;
next	1.5;

1.5
date	2002.10.09.13.02.08;	author das;	state Exp;
branches;
next	1.4;

1.4
date	2002.09.26.17.07.33;	author das;	state Exp;
branches;
next	1.3;

1.3
date	2002.09.10.09.59.16;	author das;	state Exp;
branches;
next	1.2;

1.2
date	2002.08.31.06.12.29;	author das;	state Exp;
branches;
next	1.1;

1.1
date	2002.08.30.18.18.16;	author das;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2002.08.30.18.18.16;	author das;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2002.08.30.19.18.00;	author das;	state Exp;
branches;
next	;

1.7.2.1
date	2003.03.18.13.55.50;	author das;	state Exp;
branches;
next	1.7.2.2;

1.7.2.2
date	2003.07.18.01.06.33;	author das;	state Exp;
branches;
next	1.7.2.3;

1.7.2.3
date	2003.09.25.05.37.48;	author das;	state Exp;
branches;
next	1.7.2.4;

1.7.2.4
date	2003.10.01.14.35.39;	author das;	state Exp;
branches;
next	1.7.2.5;

1.7.2.5
date	2004.01.27.10.10.16;	author das;	state Exp;
branches;
next	1.7.2.6;

1.7.2.6
date	2004.07.20.06.05.59;	author das;	state Exp;
branches;
next	1.7.2.7;

1.7.2.7
date	2004.11.11.01.26.42;	author das;	state Exp;
branches;
next	1.7.2.8;

1.7.2.8
date	2005.05.24.04.21.32;	author das;	state Exp;
branches;
next	1.7.2.9;

1.7.2.9
date	2005.05.26.11.20.08;	author das;	state Exp;
branches;
next	1.7.2.10;

1.7.2.10
date	2005.06.03.08.54.12;	author das;	state Exp;
branches;
next	1.7.2.11;

1.7.2.11
date	2005.06.18.21.47.47;	author das;	state Exp;
branches;
next	1.7.2.12;

1.7.2.12
date	2005.11.27.02.36.46;	author das;	state Exp;
branches;
next	1.7.2.13;

1.7.2.13
date	2006.01.10.05.38.19;	author das;	state Exp;
branches;
next	1.7.2.14;

1.7.2.14
date	2006.04.12.00.58.44;	author das;	state Exp;
branches;
next	1.7.2.15;

1.7.2.15
date	2006.09.10.17.07.36;	author das;	state Exp;
branches;
next	1.7.2.16;

1.7.2.16
date	2006.10.16.17.35.20;	author das;	state Exp;
branches;
next	1.7.2.17;

1.7.2.17
date	2007.04.29.02.26.47;	author das;	state Exp;
branches;
next	;


desc
@@


1.20
log
@Renamed Makefile to GNUmakefile
@
text
@########################################################################################################
#
# Makefile wrapper to build tk on Mac OS X in a way compatible with the tk/macosx Xcode buildsystem
#	uses the standard unix build system in tk/unix (which can be used directly instead of this
#	if you are not using the tk/macosx projects).
#
# RCS: @@(#) $Id: Makefile,v 1.19 2005/06/18 21:46:02 das Exp $
#
########################################################################################################

#-------------------------------------------------------------------------------------------------------
# customizable settings

DESTDIR			?=
INSTALL_ROOT		?= ${DESTDIR}

BUILD_DIR		?= ${CURDIR}/../../build
SYMROOT			?= ${BUILD_DIR}/${PROJECT}
OBJROOT			?= ${SYMROOT}

EXTRA_CONFIGURE_ARGS 	?= 
EXTRA_MAKE_ARGS		?= 

INSTALL_PATH		?= /Library/Frameworks
APPLICATION_INSTALL_PATH ?= /Applications/Utilities
PREFIX			?= /usr/local
BINDIR			?= ${PREFIX}/bin
LIBDIR			?= ${INSTALL_PATH}
MANDIR			?= ${PREFIX}/man

# tcl build directory (containing tclConfig.sh and Makefile)
TCL_BUILD_DIR		?= ${BUILD_DIR}/tcl/${BUILD_STYLE}
# location of installed tcl, only used if tcl in TCL_BUILD_DIR can't be found
TCL_FRAMEWORK_DIR	?= /Library/Frameworks
TCLSH_DIR		?= ${PREFIX}

# set to non-empty value to install manpages in addition to html help:
INSTALL_MANPAGES 	?= 

# set to non-empty value to build TkX11 instead of TkAqua:
TK_X11			?=

#-------------------------------------------------------------------------------------------------------
# meta targets

meta 			:= all install embedded install-embedded clean distclean test

styles			:= develop deploy

all			:= ${styles}
all			: ${all}

install			:= ${styles:%=install-%}
install			: ${install}
install-%:		action := install-

embedded		:= ${styles:%=embedded-%}
embedded		: embedded-deploy
install-embedded	:= ${embedded:%=install-%}
install-embedded	: install-embedded-deploy

clean			:= ${styles:%=clean-%}
clean			: ${clean}
clean-%:		action := clean-
distclean		:= ${styles:%=distclean-%}
distclean		: ${distclean}
distclean-%:		action := distclean-

test			:= ${styles:%=test-%}
test			: ${test}
test-%:			action := test-

targets			:= $(foreach v,${meta},${$v})

#-------------------------------------------------------------------------------------------------------
# build styles

BUILD_STYLE		=
CONFIGURE_ARGS		=
OBJ_DIR			= ${OBJROOT}/${BUILD_STYLE}

develop_make_args	:= BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols
deploy_make_args	:= BUILD_STYLE=Deployment INSTALL_TARGET=install-strip
embedded_make_args	:= EMBEDDED_BUILD=1
install_make_args	:= INSTALL_BUILD=1

${targets}: 
	${MAKE} ${action}${PROJECT} \
	$(foreach s,${styles} embedded install,$(if $(findstring $s,$@@),${${s}_make_args}))

#-------------------------------------------------------------------------------------------------------
# project specific settings

PROJECT			:= tk
PRODUCT_NAME		:= Tk

UNIX_DIR		:= ${CURDIR}/../unix
VERSION			:= $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.in)
TCL_VERSION		:= ${VERSION}
wish			:= wish
WISH			= wish${VERSION}

BUILD_TARGET		:= wish
INSTALL_TARGET		:= install

ifneq ($(wildcard ${TCL_BUILD_DIR}/tclConfig.sh),)
TCL_DIR			:= ${TCL_BUILD_DIR}
TCL_FRAMEWORK_DIR	:= ${TCL_BUILD_DIR}/..
else
TCL_DIR			:= ${TCL_FRAMEWORK_DIR}/Tcl.framework
TCL_EXE                 := ${TCLSH_DIR}/tclsh${TCL_VERSION}
MAKE_VARS		= TCL_EXE
export DYLD_FRAMEWORK_PATH := ${TCL_FRAMEWORK_DIR}
endif
export CPPROG		:= cp -p

ifeq (${TK_X11},)
override CONFIGURE_ARGS := ${CONFIGURE_ARGS} --enable-aqua
else
VERSION			:= ${VERSION}-X11
wish			:= ${wish}-X11
endif

INSTALL_TARGETS		= install-binaries install-libraries
ifeq (${EMBEDDED_BUILD},)
INSTALL_TARGETS		+= install-private-headers install-demos
endif
ifeq (${INSTALL_BUILD}_${EMBEDDED_BUILD}_${BUILD_STYLE},1__Deployment)
INSTALL_TARGETS		+= html-tk
ifneq (${INSTALL_MANPAGES},)
INSTALL_TARGETS		+= install-doc
endif
endif

MAKE_VARS		+= INSTALL_ROOT INSTALL_TARGETS VERSION
MAKE_ARGS_V		= $(foreach v,${MAKE_VARS},$v='${$v}')

build-${PROJECT}:	target = ${TARGET}
install-${PROJECT}:	target = ${INSTALL_TARGET}
clean-${PROJECT} distclean-${PROJECT} test-${PROJECT}: \
			target = $*

DO_MAKE			= +${MAKE} -C ${OBJ_DIR} ${target} ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}

#-------------------------------------------------------------------------------------------------------
# locations for custom tk install actions

ifeq (${INSTALL_BUILD},1)
TOP_DIR			:= ${INSTALL_ROOT}/
APP_DIR			:= ${APPLICATION_INSTALL_PATH}
FMWK_DIR		:= ${LIBDIR}
else
TOP_DIR			:= ${SYMROOT}
APP_DIR			:= .
FMWK_DIR		:= .
endif

TCL_FMWK_DIR		:= ${FMWK_DIR}/Tcl.framework/Versions/${TCL_VERSION}
TK_FMWK_DIR		:= ${FMWK_DIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}

#-------------------------------------------------------------------------------------------------------
# build rules

${PROJECT}:
	${MAKE} install-${PROJECT} INSTALL_ROOT=${OBJ_DIR}/

${OBJ_DIR}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure
	mkdir -p ${OBJ_DIR} && cd ${OBJ_DIR} && ${UNIX_DIR}/configure -C \
	--prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} \
	--mandir=${MANDIR} --enable-threads --enable-framework \
	--with-tcl=${TCL_DIR} \
	${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}
ifneq (${TK_X11},)
	@@cd ${OBJ_DIR} && sed -e 's#/Versions/${TCL_VERSION}#/Versions/${VERSION}#' \
	tkConfig.sh > tkConfig.sh.1 && mv -f tkConfig.sh.1 tkConfig.sh
endif

build-${PROJECT}: ${OBJ_DIR}/Makefile
	${DO_MAKE}
# symolic link hackery to trick
# 'make install INSTALL_ROOT=${OBJ_DIR}'
# into building Tk.framework and wish in ${SYMROOT}
	@@cd ${OBJ_DIR} && mkdir -p $(dir ./${LIBDIR}) $(dir ./${BINDIR}) ${SYMROOT} && \
	rm -rf ./${LIBDIR} ./${BINDIR} && ln -fs ${SYMROOT} ./${LIBDIR} && \
	ln -fs ${SYMROOT} ./${BINDIR} && ln -fs ${OBJ_DIR}/tktest ${SYMROOT}
ifeq (${TK_X11},)
	@@rm -f ${OBJ_DIR}/${BINDIR}
endif
# Create symbolic link to Tcl.framework in ${SYMROOT}if necessary
	@@cd ${SYMROOT} && if [ ! -e Tcl.framework -o -L Tcl.framework ]; then \
	rm -f Tcl.framework && ln -s ${TCL_FRAMEWORK_DIR}/Tcl.framework . ; fi

install-${PROJECT}: build-${PROJECT}
ifeq (${EMBEDDED_BUILD}_${INSTALL_ROOT},1_)
	@@echo "Cannot install-embedded with empty INSTALL_ROOT !" && false
endif
ifeq (${EMBEDDED_BUILD},1)
	@@rm -rf "${INSTALL_ROOT}/${LIBDIR}/Tk.framework"
endif
	${DO_MAKE}
ifeq (${INSTALL_BUILD},1)
ifeq (${EMBEDDED_BUILD},1)
# if we are embedding frameworks, don't install wish
	@@rm -f "${INSTALL_ROOT}${BINDIR}/${WISH}" && \
	rmdir -p "${INSTALL_ROOT}${BINDIR}" 2>&- || true
else
# redo prebinding
	@@cd ${INSTALL_ROOT}/ && \
	if [ ! -d usr/lib ]; then mkdir -p usr && ln -fs /usr/lib usr/ && RM_USRLIB=1; fi; \
	if [ -n "${TK_X11}" -a ! -d usr/X11R6 ]; then mkdir -p usr && ln -fs /usr/X11R6 usr/ && RM_USRX11=1; fi; \
	if [ ! -d System ]; then ln -fs /System . && RM_SYSTEM=1; fi; \
	if [ ! -d ./${LIBDIR}/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework ./${LIBDIR}; RM_TCL=1; fi; \
	redo_prebinding -r . "./${TK_FMWK_DIR}/${PRODUCT_NAME}"; \
	if [ -z "${TK_X11}" ]; then redo_prebinding -r . "./${TK_FMWK_DIR}/Resources/Wish.app/Contents/MacOS/Wish"; \
	else redo_prebinding -r . "./${BINDIR}/${WISH}"; fi; \
	if [ -n "$${RM_USRLIB:-}" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi; \
	if [ -n "$${RM_USRX11:-}" ]; then rm -f usr/X11R6; rmdir -p usr 2>&-; fi; \
	if [ -n "$${RM_SYSTEM:-}" ]; then rm -f System; fi; \
	if [ -n "$${RM_TCL:-}" ]; then rm -f ./${LIBDIR}/Tcl.framework; fi
# install wish symbolic link
	@@ln -fs ${WISH} ${INSTALL_ROOT}${BINDIR}/${wish}
endif
endif
ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_)
# keep copy of debug library around, so that
# Deployment build can be installed on top
# of Development build without overwriting
# the debug library
	@@cd ${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION} && \
	ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug"
endif
ifeq (${TK_X11},)
ifeq (${EMBEDDED_BUILD},)
# install Wish.app link in APPLICATION_INSTALL_PATH and setup 'Wish Shell' compatibility links
	@@cd ${TOP_DIR} && if [ -n "${APP_DIR}" ]; then mkdir -p "./${APP_DIR}" && \
	ln -fsh "./$$(echo ${APP_DIR} | sed -e 's#/[^/][^/]*#/..#g')/${FMWK_DIR}/${PRODUCT_NAME}.framework/Resources/Wish.app" "./${APP_DIR}" && \
	ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app"; fi && \
	ln -fsh Wish.app "./${TK_FMWK_DIR}/Resources/Wish Shell.app" && \
	ln -fsh Wish "./${TK_FMWK_DIR}/Resources/Wish.app/Contents/MacOS/Wish Shell"
else
# if we are embedding frameworks, move them into the app and fix their install names
	@@cd ${TOP_DIR} && \
	rm -rf "./${APP_DIR}/Wish.app" && mkdir -p "./${APP_DIR}" && \
	mv -f "./${TK_FMWK_DIR}/Resources/Wish.app" "./${APP_DIR}" && \
	ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app" && \
	rm -rf "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
	mkdir -p "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
	mv -f "./${FMWK_DIR}"/T{cl,k}.framework "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
	rmdir -p "./${FMWK_DIR}" 2>&- || true && cd "./${APP_DIR}/Wish.app/Contents" && \
	rm -rf Frameworks/Tcl.framework/{,/Versions/$(TCL_VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
	rm -rf Frameworks/Tk.framework/{,/Versions/$(VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
	fix_install_id ( ) { \
	    chmod -RH a+w "$$1"; \
	    install_name_tool -id $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {sub(\"^.*/Frameworks\",\"@@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \
	    chmod -RH a-w "$$1"; \
	} && \
	fix_install_name ( ) { \
	    chmod -RH a+w "$$1"; \
	    install_name_tool -change $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {print \$$1; sub(\"^.*/Frameworks\",\"@@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \
	    chmod -RH a-w "$$1"; \
	} && \
	fix_install_id Frameworks/Tcl.framework/Tcl Tcl && fix_install_id Frameworks/Tk.framework/Tk Tk && \
	fix_install_name MacOS/Wish Tcl && fix_install_name MacOS/Wish Tk
endif
endif

clean-${PROJECT}: %-${PROJECT}:
	${DO_MAKE}
	rm -rf ${SYMROOT}/{${PRODUCT_NAME}.framework,${WISH},tktest}
	rm -f ${OBJ_DIR}{${LIBDIR},${BINDIR}} && \
	rmdir -p ${OBJ_DIR}$(dir ${LIBDIR}) 2>&- || true && \
	rmdir -p ${OBJ_DIR}$(dir ${BINDIR}) 2>&- || true

distclean-${PROJECT}: %-${PROJECT}: clean-${PROJECT}
	${DO_MAKE}
	rm -rf ${OBJ_DIR}
	
test-${PROJECT}: %-${PROJECT}: build-${PROJECT}
	${DO_MAKE}

#-------------------------------------------------------------------------------------------------------

.PHONY: ${meta} ${targets} ${PROJECT} build-${PROJECT} install-${PROJECT} \
	clean-${PROJECT} distclean-${PROJECT}

.NOTPARALLEL:

#-------------------------------------------------------------------------------------------------------
@


1.19
log
@	* macosx/Makefile: for X11 build, add -X11 suffix to unversioned wish
	symbolic link.

	* unix/tcl.m4 (Darwin): add -headerpad_max_install_names to LDFLAGS to
	ensure we can always relocate binaries with install_name_tool.

	* unix/configure: autoconf-2.59
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.18 2005/06/03 08:52:35 das Exp $
@


1.18
log
@	* macosx/Makefile: fixed 'embedded' target.
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.17 2005/05/26 11:19:01 das Exp $
d100 1
d121 1
d221 1
a221 1
	@@ln -fs ${WISH} ${INSTALL_ROOT}${BINDIR}/wish
@


1.17
log
@	* macosx/tkMacOSXInit.c (TkpInit): fixed resource file extraction
	from __tk_rsrc section to work with non-prebound .dylib and .bundle.

	* macosx/Makefile: corrected EMBEDDED_BUILD check, use separate tcl
	and tk version vars to properly support tk/x11 framework version
	overriding, rewrite tkConfig.sh when overriding tk version, corrected
	Wish.app symlink in tk build dir.

	* unix/configure.in: corrected framework finalization to softlink
	stub library to Versions/8.x subdir instead of Versions/Current.
	* unix/configure: autoconf-2.59
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.16 2005/05/23 20:24:59 das Exp $
a142 2
${PROJECT}:		override INSTALL_ROOT := ${OBJ_DIR}/

d162 2
a163 1
${PROJECT}: install-${PROJECT}
@


1.16
log
@	* macosx/Makefile:
	* macosx/README:
	* macosx/Tk-Info.plist.in (new file):
	* macosx/Wish-Info.plist.in (new file):
	* unix/Makefile.in:
	* unix/configure.in:
	* unix/tcl.m4:
	* unix/tkUnixInit.c:  moved all Darwin framework and TkAqua build
	support from macosx/Wish.pbproj and macosx/Makefile into the standard
	unix configure/make buildsystem, the project and macosx/Makefile are
	no longer required to build Tk.framework and/or TkAqua. TkAqua is now
	enabled by the --enable-aqua configure option, and static and
	non-framework builds of TkAqua are now available via the standard
	configure switches. Tk/X11 can also be built as a framework. The
	macosx/Makefile now wraps the unix buildsystem and no longer uses the
	projects, embedded builds are still only available via this Makefile,
	but for other builds it is not longer required (but its current
	functionality is still available for backwards compatibility). The
	projects currently do not call through to the Makefile to build
	(unlike Tcl.pbproj) so project builds may differ from makefile builds.
	Due to issues with spaces in pathnames, 'Wish Shell.app' has been
	renamed to 'Wish.app', the macosx/Makefile installs backwards
	compatibility symlinks for the old name.
	* macosx/tkMacOSXInit.c (TkpInit): added support for Tk resource file
	in non-framework and static builds: the resource file is copied into a
	__tk_rsrc MachO segment of the library or executable at link time and
	extracted into a temporary location at initialization.
	* unix/configure: autoconf-2.59
	* unix/tkConfig.h.in (new file): autoheader-2.59
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.15 2004/11/11 01:24:32 das Exp $
d99 1
d110 1
a110 1
TCL_EXE                 := ${TCLSH_DIR}/tclsh${VERSION}
d158 1
a158 1
TCL_FMWK_DIR		:= ${FMWK_DIR}/Tcl.framework/Versions/${VERSION}
d172 4
d195 2
a196 1
else
d234 3
a236 3
	@@cd ${TOP_DIR} && mkdir -p "./${APP_DIR}" && \
	ln -fsh "$$(echo ./${APP_DIR} | sed -e 's#/[^/][^/]*#/..#g')/${TK_FMWK_DIR}/Resources/Wish.app" "./${APP_DIR}" && \
	ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app" && \
d249 2
a250 1
	rm -rf Frameworks/T{cl,k}.framework/{,/Versions/$(VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
@


1.15
log
@	* generic/tkMain.c:
	* macosx/tkMacOSXAppInit.c (removed):
	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h: changes to make TkAqua dynamically loadable,
	enabling [package require Tk] from tclsh. Startup code from
	tkMacOSXAppInit.c moved into tkMacOSXInit.c, added code that
	notifies the window server that an unbundled executable is a full
	GUI application after loading Tk. [Patch 1035348]

	* doc/wm.n: documented [wm attributes] on Mac OS X. [Bug 606665]
	* macosx/tkMacOSXWm.c: implemented TIP 222 [wm attributes -alpha] on
	Mac OS X. [Patch 892194]
	WmIconbitmapCmd: adopted FSRef changes from [wm atttrs -titlepath].

	* macosx/tkMacOSXSubwindows.c: synced spacing/formatting with
	core-8-4-branch.

	* generic/tkRectOval.c:
	* macosx/README:
	* macosx/tkMacOSXDefault.h:
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXWm.c: forward port from core-8-4-branch of Jim's
	and my changes for CG drawing and [wm attributes] (corresponds to
	8.4 changes dating from 09-18, 07-27, 07-24).

	* macosx/tkMacOSXMouseEvent.c: endianness fixes.

	* macosx/Wish.pbproj/project.pbxproj: corrected path to html help
	inside framework.

	* macosx/Makefile: prevent parallel make from building several
	targets at the same time.
@
text
@d1 1
a1 1
################################################################################
d3 3
a5 2
# Makefile to build AquaTk on Mac OS X packaged as a Framework
#	uses Project Builder command line tool 'pbxbuild'
d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.14 2004/07/20 11:49:16 das Exp $
d9 1
a9 1
################################################################################
d11 1
a11 1
#-------------------------------------------------------------------------------
d21 1
d26 1
a26 2

PREFIX			?= /usr
d28 1
d31 5
a35 2
TCL_FRAMEWORK_DIR	?= ${BUILD_DIR}/tcl
TCLSH_DIR		?= ${TCL_FRAMEWORK_DIR}
d40 2
a41 1
#-------------------------------------------------------------------------------
d43 2
a44 2
PROJECT			= tk
TARGET			= Wish
d46 1
a46 2
DEVBUILDSTYLE		= Development
DEPBUILDSTYLE		= Deployment
d48 66
a113 2
PBXBUILD		= /usr/bin/pbxbuild
XCODEBUILD		= /usr/bin/xcodebuild
d115 5
a119 3
BUILDCMD		= `if [ -f $(XCODEBUILD) ]; then \
			    echo "$(XCODEBUILD) -project $$(ls -d *.pbproj)"; \
			    else echo "$(PBXBUILD)"; fi`
d121 6
a126 40
MAKE_VARS		:= SYMROOT OBJROOT BINDIR APPLICATION_INSTALL_PATH \
				TCL_FRAMEWORK_DIR TCLSH_DIR
MAKE_ARGS_V		= $(foreach v,${MAKE_VARS},$v=${$v})

BUILD			= ${BUILDCMD} -target "${TARGET}" ${MAKE_ARGS_V} \
				DYLIB_INSTALL_PATH="${INSTALL_PATH}" \
				${EXTRA_MAKE_ARGS} ${MAKEOVERRIDES}

DEVBUILD		= ${BUILD} -buildstyle "${DEVBUILDSTYLE}"
DEPBUILD		= ${BUILD} -buildstyle "${DEPBUILDSTYLE}"

INSTALLOPTS		= INSTALL_ROOT="${INSTALL_ROOT}"

EMBEDDEDOPTS		= EMBEDDED_BUILD=1

################################################################################

all: develop deploy

install: install-develop install-deploy

embedded: embedded-deploy

install-embedded: install-embedded-deploy cleanup-embedded

clean: clean-develop clean-deploy

################################################################################

develop:
	${DEVBUILD}

deploy:
	${DEPBUILD}

install-develop: 
	${DEVBUILD} install ${INSTALLOPTS}

install-deploy:
	${DEPBUILD} install ${INSTALLOPTS}
d128 2
a129 4
# install manpages
	${MAKE} -C "$(CURDIR)/../unix" -f Makefile.in install-doc \
	        SRC_DIR="$(CURDIR)/.." UNIX_DIR="$(CURDIR)/../unix" \
	        mandir="$(MANDIR)" ${INSTALLOPTS} ${EXTRA_MAKE_ARGS}
d132 2
a133 2
embedded-develop:
	${DEVBUILD} ${EMBEDDEDOPTS}
d135 21
a155 2
embedded-deploy:
	${DEPBUILD} ${EMBEDDEDOPTS}
d157 2
a158 2
install-embedded-develop:
	${DEVBUILD} install ${INSTALLOPTS} ${EMBEDDEDOPTS}
d160 2
a161 2
install-embedded-deploy:
	${DEPBUILD} install ${INSTALLOPTS} ${EMBEDDEDOPTS}
d163 1
a163 2
clean-develop:
	${DEVBUILD} clean
d165 93
a257 4
clean-deploy:
	${DEPBUILD} clean

################################################################################
d259 13
a271 7
cleanup-embedded:
	@@-cd ${INSTALL_ROOT}/; \
	chmod -RH u+w Library/Frameworks/Tcl.framework; \
	rm -rf Library/Frameworks/Tcl.framework; \
	chmod -RH u+w Library/Frameworks/Tk.framework; \
	rm -rf Library/Frameworks/Tk.framework; \
	rmdir -p Library/Frameworks 2>&-;
d273 1
a273 1
################################################################################
d275 2
a276 3
.PHONY: all install embedded clean develop deploy install-develop install-deploy \
embedded-develop embedded-deploy install-embedded-develop install-embedded-deploy \
clean-develop clean-deploy cleanup-embedded
d280 1
a280 1
################################################################################
@


1.14
log
@	* macosx/Makefile: added support to tk framework build to
	optionally install tk manpages in addition to html help,
	similarly to tcl/macosx/Makefile.

	* macosx/Wish.pbproj/project.pbxproj: fixes for building with
	non-default SYMROOT/OBJROOT/SRCROOT, added support for using a
	Tcl.framework in DYLIB_INSTALL_PATH != /Library/Frameworks,
	added optional support for building html help without tcl sources
	present by giving explicit location of tcltk-man2html script.

	* macosx/tkMacOSXMenu.c: fixed #include case sensitivity bug.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.13 2004/02/23 22:49:26 das Exp $
d131 2
@


1.13
log
@	* macosx/Makefile: ensure that xcodebuild will use the
	Wish.pbproj project even if a .xcode project is also present.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.12 2004/01/27 10:09:37 das Exp $
d27 1
d32 3
d90 6
@


1.12
log
@        * generic/tkTextIndex.c: added '#include <tclInt.h>' since the
        code uses the TclUtfToUniChar macro from that file. [Bug 874745]

        * macosx/Wish.pbproj/project.pbxproj: removed erroneous reference
        to mkpsenc.tcl in bundle resources phase (mkpsenc.tcl is already
        part of the copy files phase to Resources/Scripts).

        * macosx/Makefile: added support for 'xcodebuild' on Mac OS X 10.3.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.11 2003/10/01 14:35:32 das Exp $
d43 2
a44 2
				echo "$(XCODEBUILD)"; \
			  	else echo "$(PBXBUILD)"; fi`
@


1.11
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile: fixed redo prebinding bug when DESTDIR="".
	Added support for all applicable customizable makefile variables
	from tcl/macosx/Makefile.

	* macosx/README:
	* macosx/Wish.pbproj/project.pbxproj: ensure that the versioned
	wishX.X script works correctly when Tk.framework with multiple
	versions is present by referring to a copy of 'Wish Shell.app'
	located in Tk.framework/Versions/X.X/Resources.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.10 2003/09/25 05:37:00 das Exp $
d40 5
d50 1
a50 1
BUILD			= ${PBXBUILD} -target "${TARGET}" ${MAKE_ARGS_V} \
@


1.10
log
@	* library/demos/widget: don't create iconwindow on aqua, but add
	about menu like on classic.
	* macosx/Makefile: pass MAKEOVERRIDES to pxbuild.
	* macosx/tkMacOSXButton.c: added -compound support for bevel buttons.
@
text
@d3 2
a4 2
# Simple makefile for building on Mac OS X with the
# Project Builder command line tool 'pbxbuild'
d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.9 2003/07/18 02:02:28 das Exp $
d10 2
a11 1
INSTALL_ROOT	?=
d13 14
a26 2
BUILD_DIR	?= ${CURDIR}/../../build
SYMROOT		?= ${BUILD_DIR}/${PROJECT}
d29 6
a34 1
TCLSH_DIR	?= ${TCL_FRAMEWORK_DIR}
d36 2
a37 2
PROJECT		= tk
TARGET		= Wish
d39 1
a39 2
DEVBUILDSTYLE	= Development
DEPBUILDSTYLE	= Deployment
d41 3
a43 1
PBXBUILD	= /usr/bin/pbxbuild
d45 3
a47 3
BUILD		= ${PBXBUILD} SYMROOT="${SYMROOT}" -target "${TARGET}" \
			TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" \
			TCLSH_DIR="${TCLSH_DIR}" ${MAKEOVERRIDES}
d49 2
a50 2
DEVBUILD	= ${BUILD} -buildstyle "${DEVBUILDSTYLE}"
DEPBUILD	= ${BUILD} -buildstyle "${DEPBUILDSTYLE}"
d52 1
a52 1
INSTALLOPTS	= INSTALL_ROOT="${INSTALL_ROOT}"
d54 1
a54 1
EMBEDDEDOPTS	= EMBEDDED_BUILD=1
d103 1
a103 1
	@@-cd ${INSTALL_ROOT}; \
@


1.9
log
@	* macosx/Makefile: Changes for new tcl buildsystem.

	* macosx/Wish.pbproj/jingham.pbxuser:
	* macosx/Wish.pbproj/project.pbxproj:
	Changes for new tcl buildsystem.
	Changed build to include tk specific html help in Tk.framework
	instead of Tcl.framework.
	Set default SYMROOT in target options to simplify setting up PB
	(manually setting common build folder for tcl & tk no longer needed).

	* macosx/README: Updated info for changes to buildsystem,
	html help location and PB setup.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.8 2003/03/18 13:47:52 das Exp $
d28 1
a28 1
			TCLSH_DIR="${TCLSH_DIR}"
@


1.8
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile:
	* macosx/README: added support for giving 'make' the location
	of Tcl.framework and tclsh to build and link against.

	* macosx/tkMacOSXXStubs.c: fixed crash in [winfo server].
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7 2003/02/19 16:44:16 das Exp $
d13 1
d15 1
a15 1
TCL_FRAMEWORK_DIR	?= ${BUILD_DIR}
d18 1
d26 3
a28 2
BUILD		= ${PBXBUILD} SYMROOT="${BUILD_DIR}" -target "${TARGET}" \
			  TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" TCLSH_DIR="${TCLSH_DIR}"
a82 4
forceRelink:
	@@-cd ${BUILD_DIR}; \
	rm -rf Tk.framework Wish\ Shell.app libtkstub8.4.a

d95 1
a95 2
clean-develop clean-deploy forceRelink \
cleanup-embedded
@


1.7
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile: reworked embedded build to no longer require
	relinking but to use install_name_tool instead to change the
	install_names for embedded frameworks.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.6 2002/10/16 23:56:02 das Exp $
d14 3
d24 2
a25 1
BUILD		= ${PBXBUILD} SYMROOT="${BUILD_DIR}" -target "${TARGET}"
d96 1
a96 1
clean-develop clean-deploy forceRelinkTcl \
@


1.7.2.1
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile:
	* macosx/README: added support for giving 'make' the location
	of Tcl.framework and tclsh to build and link against.

	* macosx/tkMacOSXXStubs.c: fixed crash in [winfo server].
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7 2003/02/19 16:44:16 das Exp $
a13 3
TCL_FRAMEWORK_DIR	?= ${BUILD_DIR}
TCLSH_DIR	?= ${TCL_FRAMEWORK_DIR}

d21 1
a21 2
BUILD		= ${PBXBUILD} SYMROOT="${BUILD_DIR}" -target "${TARGET}" \
			  TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" TCLSH_DIR="${TCLSH_DIR}"
d92 1
a92 1
clean-develop clean-deploy forceRelink \
@


1.7.2.2
log
@	* macosx/Makefile: Changes for new tcl buildsystem.

	* macosx/Wish.pbproj/jingham.pbxuser:
	* macosx/Wish.pbproj/project.pbxproj:
	Changes for new tcl buildsystem.
	Changed build to include tk specific html help in Tk.framework
	instead of Tcl.framework.
	Set default SYMROOT in target options to simplify setting up PB
	(manually setting common build folder for tcl & tk no longer needed).

	* macosx/README: Updated info for changes to buildsystem,
	html help location and PB setup.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.1 2003/03/18 13:55:50 das Exp $
a12 1
SYMROOT		?= ${BUILD_DIR}/${PROJECT}
d14 1
a14 1
TCL_FRAMEWORK_DIR	?= ${BUILD_DIR}/tcl
a16 1
PROJECT		= tk
d24 2
a25 3
BUILD		= ${PBXBUILD} SYMROOT="${SYMROOT}" -target "${TARGET}" \
			TCL_FRAMEWORK_DIR="${TCL_FRAMEWORK_DIR}" \
			TCLSH_DIR="${TCLSH_DIR}"
d80 4
d96 2
a97 1
clean-develop clean-deploy cleanup-embedded
@


1.7.2.3
log
@	* library/demos/widget: don't create iconwindow on aqua, but add
	about menu like on classic.
	* macosx/Makefile: pass MAKEOVERRIDES to pxbuild.
	* macosx/tkMacOSXButton.c: added -compound support for bevel buttons.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.2 2003/07/18 01:06:33 das Exp $
d28 1
a28 1
			TCLSH_DIR="${TCLSH_DIR}" ${MAKEOVERRIDES}
@


1.7.2.4
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile: fixed redo prebinding bug when DESTDIR="".
	Added support for all applicable customizable makefile variables
	from tcl/macosx/Makefile.

	* macosx/README:
	* macosx/Wish.pbproj/project.pbxproj: ensure that the versioned
	wishX.X script works correctly when Tk.framework with multiple
	versions is present by referring to a copy of 'Wish Shell.app'
	located in Tk.framework/Versions/X.X/Resources.
@
text
@d3 2
a4 2
# Makefile to build AquaTk on Mac OS X packaged as a Framework
#	uses Project Builder command line tool 'pbxbuild'
d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.3 2003/09/25 05:37:48 das Exp $
d10 1
a10 2
#-------------------------------------------------------------------------------
# customizable settings
d12 2
a13 14
DESTDIR			?=
INSTALL_ROOT		?= ${DESTDIR}

BUILD_DIR		?= ${CURDIR}/../../build
SYMROOT			?= ${BUILD_DIR}/${PROJECT}
OBJROOT			?= ${SYMROOT}

EXTRA_MAKE_ARGS		?= 

INSTALL_PATH		?= /Library/Frameworks
APPLICATION_INSTALL_PATH ?= /Applications/Utilities

PREFIX			?= /usr
BINDIR			?= ${PREFIX}/bin
d16 1
a16 6
TCLSH_DIR		?= ${TCL_FRAMEWORK_DIR}

#-------------------------------------------------------------------------------

PROJECT			= tk
TARGET			= Wish
d18 2
a19 2
DEVBUILDSTYLE		= Development
DEPBUILDSTYLE		= Deployment
d21 2
a22 1
PBXBUILD		= /usr/bin/pbxbuild
d24 1
a24 3
MAKE_VARS		:= SYMROOT OBJROOT BINDIR APPLICATION_INSTALL_PATH \
				TCL_FRAMEWORK_DIR TCLSH_DIR
MAKE_ARGS_V		= $(foreach v,${MAKE_VARS},$v=${$v})
d26 3
a28 3
BUILD			= ${PBXBUILD} -target "${TARGET}" ${MAKE_ARGS_V} \
				DYLIB_INSTALL_PATH="${INSTALL_PATH}" \
				${EXTRA_MAKE_ARGS} ${MAKEOVERRIDES}
d30 2
a31 2
DEVBUILD		= ${BUILD} -buildstyle "${DEVBUILDSTYLE}"
DEPBUILD		= ${BUILD} -buildstyle "${DEPBUILDSTYLE}"
d33 1
a33 1
INSTALLOPTS		= INSTALL_ROOT="${INSTALL_ROOT}"
d35 1
a35 1
EMBEDDEDOPTS		= EMBEDDED_BUILD=1
d84 1
a84 1
	@@-cd ${INSTALL_ROOT}/; \
@


1.7.2.5
log
@        * macosx/Wish.pbproj/project.pbxproj: removed erroneous reference
        to mkpsenc.tcl in bundle resources phase (mkpsenc.tcl is already
        part of the copy files phase to Resources/Scripts).

        * macosx/Makefile: added support for 'xcodebuild' on Mac OS X 10.3.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.4 2003/10/01 14:35:39 das Exp $
a39 5
XCODEBUILD		= /usr/bin/xcodebuild

BUILDCMD		= `if [ -f $(XCODEBUILD) ]; then \
				echo "$(XCODEBUILD)"; \
			  	else echo "$(PBXBUILD)"; fi`
d45 1
a45 1
BUILD			= ${BUILDCMD} -target "${TARGET}" ${MAKE_ARGS_V} \
@


1.7.2.6
log
@	* macosx/Makefile: added support to tk framework build to
	optionally install tk manpages in addition to html help,
	similarly to tcl/macosx/Makefile.

	* macosx/Wish.pbproj/project.pbxproj: fixes for building with
	non-default SYMROOT/OBJROOT/SRCROOT, added support for using a
	Tcl.framework in DYLIB_INSTALL_PATH != /Library/Frameworks,
	added optional support for building html help without tcl sources
	present by giving explicit location of tcltk-man2html script.

	* macosx/tkMacOSXMenu.c: fixed #include case sensitivity bug.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.5 2004/01/27 10:10:16 das Exp $
a26 1
MANDIR			?= ${PREFIX}/man
a30 3
# set to non-empty value to install manpages in addition to html help:
INSTALL_MANPAGES 	?= 

a85 6
ifneq (${INSTALL_MANPAGES},)
# install manpages
	${MAKE} -C "$(CURDIR)/../unix" -f Makefile.in install-doc \
	        SRC_DIR="$(CURDIR)/.." UNIX_DIR="$(CURDIR)/../unix" \
	        mandir="$(MANDIR)" ${INSTALLOPTS} ${EXTRA_MAKE_ARGS}
endif
@


1.7.2.7
log
@	* generic/tkMain.c:
	* macosx/tkMacOSXAppInit.c (removed):
	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h: changes to make TkAqua dynamically loadable,
	enabling [package require Tk] from tclsh. Startup code from
	tkMacOSXAppInit.c moved into tkMacOSXInit.c, added code that
	notifies the window server that an unbundled executable is a full
	GUI application after loading Tk. [Patch 1035348]

	* doc/wm.n: documented [wm attributes] on Mac OS X. [Bug 606665]
	* macosx/tkMacOSXWm.c: implemented TIP 222 [wm attributes -alpha] on
	Mac OS X. [Patch 892194]
	WmIconbitmapCmd: adopted FSRef changes from [wm atttrs -titlepath].

	* macosx/tkMacOSXButton.c:
	* macosx/tkMacOSXMenus.c:
	* macosx/tkMacOSXRegion.c:
	* macosx/tkMacOSXSubwindows.c: synced spacing/formatting with HEAD.

	* macosx/tkMacOSXMouseEvent.c: endianness fixes.

	* macosx/Wish.pbproj/project.pbxproj: corrected path to html help
	inside framework.

	* macosx/Makefile: prevent parallel make from building several
	targets at the same time.
	Ensure that xcodebuild will use Wish.pbproj project even if a .xcode
	project is also present.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.6 2004/07/20 06:05:59 das Exp $
d47 2
a48 2
			    echo "$(XCODEBUILD) -project $$(ls -d *.pbproj)"; \
			    else echo "$(PBXBUILD)"; fi`
a130 2
.NOTPARALLEL:

@


1.7.2.8
log
@	* macosx/Makefile:
	* macosx/README:
	* macosx/Tk-Info.plist.in (new file):
	* macosx/Wish-Info.plist.in (new file):
	* unix/Makefile.in:
	* unix/configure.in:
	* unix/tcl.m4:
	* unix/tkUnixInit.c:  moved all Darwin framework and TkAqua build
	support from macosx/Wish.pbproj and macosx/Makefile into the standard
	unix configure/make buildsystem, the project and macosx/Makefile are
	no longer required to build Tk.framework and/or TkAqua. TkAqua is now
	enabled by the --enable-aqua configure option, and static and
	non-framework builds of TkAqua are now available via the standard
	configure switches. Tk/X11 can also be built as a framework. The
	macosx/Makefile now wraps the unix buildsystem and no longer uses the
	projects, embedded builds are still only available via this Makefile,
	but for other builds it is not longer required (but its current
	functionality is still available for backwards compatibility). The
	projects currently do not call through to the Makefile to build
	(unlike Tcl.pbproj) so project builds may differ from makefile builds.
	Due to issues with spaces in pathnames, 'Wish Shell.app' has been
	renamed to 'Wish.app', the macosx/Makefile installs backwards
	compatibility symlinks for the old name.
	* macosx/tkMacOSXInit.c (TkpInit): added support for Tk resource file
	in non-framework and static builds: the resource file is copied into a
	__tk_rsrc MachO segment of the library or executable at link time and
	extracted into a temporary location at initialization.
	* unix/configure: autoconf-2.13
@
text
@d1 1
a1 1
########################################################################################################
d3 2
a4 3
# Makefile wrapper to build tk on Mac OS X in a way compatible with the tk/macosx Xcode buildsystem
#	uses the standard unix build system in tk/unix (which can be used directly instead of this
#	if you are not using the tk/macosx projects).
d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.7 2004/11/11 01:26:42 das Exp $
d8 1
a8 1
########################################################################################################
d10 1
a10 1
#-------------------------------------------------------------------------------------------------------
a19 1
EXTRA_CONFIGURE_ARGS 	?= 
d24 2
a25 1
PREFIX			?= /usr/local
a26 1
LIBDIR			?= ${INSTALL_PATH}
d29 2
a30 5
# tcl build directory (containing tclConfig.sh and Makefile)
TCL_BUILD_DIR		?= ${BUILD_DIR}/tcl/${BUILD_STYLE}
# location of installed tcl, only used if tcl in TCL_BUILD_DIR can't be found
TCL_FRAMEWORK_DIR	?= /Library/Frameworks
TCLSH_DIR		?= ${PREFIX}
d35 39
a73 2
# set to non-empty value to build TkX11 instead of TkAqua:
TK_X11			?=
d75 1
a75 2
#-------------------------------------------------------------------------------------------------------
# meta targets
d77 1
a77 1
meta 			:= all install embedded install-embedded clean distclean test
d79 5
a83 66
styles			:= develop deploy

all			:= ${styles}
all			: ${all}

install			:= ${styles:%=install-%}
install			: ${install}
install-%:		action := install-

embedded		:= ${styles:%=embedded-%}
embedded		: embedded-deploy
install-embedded	:= ${embedded:%=install-%}
install-embedded	: install-embedded-deploy

clean			:= ${styles:%=clean-%}
clean			: ${clean}
clean-%:		action := clean-
distclean		:= ${styles:%=distclean-%}
distclean		: ${distclean}
distclean-%:		action := distclean-

test			:= ${styles:%=test-%}
test			: ${test}
test-%:			action := test-

targets			:= $(foreach v,${meta},${$v})

#-------------------------------------------------------------------------------------------------------
# build styles

BUILD_STYLE		=
CONFIGURE_ARGS		=
OBJ_DIR			= ${OBJROOT}/${BUILD_STYLE}

develop_make_args	:= BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols
deploy_make_args	:= BUILD_STYLE=Deployment INSTALL_TARGET=install-strip
embedded_make_args	:= EMBEDDED_BUILD=1
install_make_args	:= INSTALL_BUILD=1

${targets}: 
	${MAKE} ${action}${PROJECT} \
	$(foreach s,${styles} embedded install,$(if $(findstring $s,$@@),${${s}_make_args}))

#-------------------------------------------------------------------------------------------------------
# project specific settings

PROJECT			:= tk
PRODUCT_NAME		:= Tk

UNIX_DIR		:= ${CURDIR}/../unix
VERSION			:= $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.in)
WISH			= wish${VERSION}

BUILD_TARGET		:= wish
INSTALL_TARGET		:= install

ifneq ($(wildcard ${TCL_BUILD_DIR}/tclConfig.sh),)
TCL_DIR			:= ${TCL_BUILD_DIR}
TCL_FRAMEWORK_DIR	:= ${TCL_BUILD_DIR}/..
else
TCL_DIR			:= ${TCL_FRAMEWORK_DIR}/Tcl.framework
TCL_EXE                 := ${TCLSH_DIR}/tclsh${VERSION}
MAKE_VARS		= TCL_EXE
export DYLD_FRAMEWORK_PATH := ${TCL_FRAMEWORK_DIR}
endif
export CPPROG		:= cp -p
d85 2
a86 5
ifeq (${TK_X11},)
override CONFIGURE_ARGS := ${CONFIGURE_ARGS} --enable-aqua
else
VERSION			:= ${VERSION}-X11
endif
d88 2
a89 6
INSTALL_TARGETS		= install-binaries install-libraries
ifeq (${EMBEDDED_BUILD},)
INSTALL_TARGETS		+= install-private-headers install-demos
endif
ifeq (${INSTALL_BUILD}_${EMBEDDED_BUILD}_${BUILD_STYLE},1__Deployment)
INSTALL_TARGETS		+= html-tk
d91 4
a94 2
INSTALL_TARGETS		+= install-doc
endif
d97 5
a101 2
MAKE_VARS		+= INSTALL_ROOT INSTALL_TARGETS VERSION
MAKE_ARGS_V		= $(foreach v,${MAKE_VARS},$v='${$v}')
d103 2
a104 21
build-${PROJECT}:	target = ${TARGET}
install-${PROJECT}:	target = ${INSTALL_TARGET}
clean-${PROJECT} distclean-${PROJECT} test-${PROJECT}: \
			target = $*

DO_MAKE			= +${MAKE} -C ${OBJ_DIR} ${target} ${MAKE_ARGS_V} ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}

${PROJECT}:		override INSTALL_ROOT := ${OBJ_DIR}/

#-------------------------------------------------------------------------------------------------------
# locations for custom tk install actions

ifeq (${INSTALL_BUILD},1)
TOP_DIR			:= ${INSTALL_ROOT}/
APP_DIR			:= ${APPLICATION_INSTALL_PATH}
FMWK_DIR		:= ${LIBDIR}
else
TOP_DIR			:= ${SYMROOT}
APP_DIR			:= .
FMWK_DIR		:= .
endif
d106 2
a107 2
TCL_FMWK_DIR		:= ${FMWK_DIR}/Tcl.framework/Versions/${VERSION}
TK_FMWK_DIR		:= ${FMWK_DIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}
d109 2
a110 2
#-------------------------------------------------------------------------------------------------------
# build rules
d112 2
a113 1
${PROJECT}: install-${PROJECT}
d115 1
a115 93
${OBJ_DIR}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure
	mkdir -p ${OBJ_DIR} && cd ${OBJ_DIR} && ${UNIX_DIR}/configure \
	--prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} \
	--mandir=${MANDIR} --enable-threads --enable-framework \
	--with-tcl=${TCL_DIR} \
	${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}

build-${PROJECT}: ${OBJ_DIR}/Makefile
	${DO_MAKE}
# symolic link hackery to trick
# 'make install INSTALL_ROOT=${OBJ_DIR}'
# into building Tk.framework and wish in ${SYMROOT}
	@@cd ${OBJ_DIR} && mkdir -p $(dir ./${LIBDIR}) $(dir ./${BINDIR}) ${SYMROOT} && \
	rm -rf ./${LIBDIR} ./${BINDIR} && ln -fs ${SYMROOT} ./${LIBDIR} && \
	ln -fs ${SYMROOT} ./${BINDIR} && ln -fs ${OBJ_DIR}/tktest ${SYMROOT}
ifeq (${TK_X11},)
	@@rm -f ${OBJ_DIR}/${BINDIR}
endif
# Create symbolic link to Tcl.framework in ${SYMROOT}if necessary
	@@cd ${SYMROOT} && if [ ! -e Tcl.framework -o -L Tcl.framework ]; then \
	rm -f Tcl.framework && ln -s ${TCL_FRAMEWORK_DIR}/Tcl.framework . ; fi

install-${PROJECT}: build-${PROJECT}
ifeq (${EMBEDDED_BUILD}_${INSTALL_ROOT},1_)
	@@echo "Cannot install-embedded with empty INSTALL_ROOT !" && false
else
	@@rm -rf "${INSTALL_ROOT}/${LIBDIR}/Tk.framework"
endif
	${DO_MAKE}
ifeq (${INSTALL_BUILD},1)
ifeq (${EMBEDDED_BUILD},1)
# if we are embedding frameworks, don't install wish
	@@rm -f "${INSTALL_ROOT}${BINDIR}/${WISH}" && \
	rmdir -p "${INSTALL_ROOT}${BINDIR}" 2>&- || true
else
# redo prebinding
	@@cd ${INSTALL_ROOT}/ && \
	if [ ! -d usr/lib ]; then mkdir -p usr && ln -fs /usr/lib usr/ && RM_USRLIB=1; fi; \
	if [ -n "${TK_X11}" -a ! -d usr/X11R6 ]; then mkdir -p usr && ln -fs /usr/X11R6 usr/ && RM_USRX11=1; fi; \
	if [ ! -d System ]; then ln -fs /System . && RM_SYSTEM=1; fi; \
	if [ ! -d ./${LIBDIR}/Tcl.framework ]; then ln -fs ${TCL_FRAMEWORK_DIR}/Tcl.framework ./${LIBDIR}; RM_TCL=1; fi; \
	redo_prebinding -r . "./${TK_FMWK_DIR}/${PRODUCT_NAME}"; \
	if [ -z "${TK_X11}" ]; then redo_prebinding -r . "./${TK_FMWK_DIR}/Resources/Wish.app/Contents/MacOS/Wish"; \
	else redo_prebinding -r . "./${BINDIR}/${WISH}"; fi; \
	if [ -n "$${RM_USRLIB:-}" ]; then rm -f usr/lib; rmdir -p usr 2>&-; fi; \
	if [ -n "$${RM_USRX11:-}" ]; then rm -f usr/X11R6; rmdir -p usr 2>&-; fi; \
	if [ -n "$${RM_SYSTEM:-}" ]; then rm -f System; fi; \
	if [ -n "$${RM_TCL:-}" ]; then rm -f ./${LIBDIR}/Tcl.framework; fi
# install wish symbolic link
	@@ln -fs ${WISH} ${INSTALL_ROOT}${BINDIR}/wish
endif
endif
ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_)
# keep copy of debug library around, so that
# Deployment build can be installed on top
# of Development build without overwriting
# the debug library
	@@cd ${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION} && \
	ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug"
endif
ifeq (${TK_X11},)
ifeq (${EMBEDDED_BUILD},)
# install Wish.app link in APPLICATION_INSTALL_PATH and setup 'Wish Shell' compatibility links
	@@cd ${TOP_DIR} && mkdir -p "./${APP_DIR}" && \
	ln -fsh "$$(echo ./${APP_DIR} | sed -e 's#/[^/][^/]*#/..#g')/${TK_FMWK_DIR}/Resources/Wish.app" "./${APP_DIR}" && \
	ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app" && \
	ln -fsh Wish.app "./${TK_FMWK_DIR}/Resources/Wish Shell.app" && \
	ln -fsh Wish "./${TK_FMWK_DIR}/Resources/Wish.app/Contents/MacOS/Wish Shell"
else
# if we are embedding frameworks, move them into the app and fix their install names
	@@cd ${TOP_DIR} && \
	rm -rf "./${APP_DIR}/Wish.app" && mkdir -p "./${APP_DIR}" && \
	mv -f "./${TK_FMWK_DIR}/Resources/Wish.app" "./${APP_DIR}" && \
	ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app" && \
	rm -rf "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
	mkdir -p "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
	mv -f "./${FMWK_DIR}"/T{cl,k}.framework "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
	rmdir -p "./${FMWK_DIR}" 2>&- || true && cd "./${APP_DIR}/Wish.app/Contents" && \
	rm -rf Frameworks/T{cl,k}.framework/{,/Versions/$(VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
	fix_install_id ( ) { \
	    chmod -RH a+w "$$1"; \
	    install_name_tool -id $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {sub(\"^.*/Frameworks\",\"@@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \
	    chmod -RH a-w "$$1"; \
	} && \
	fix_install_name ( ) { \
	    chmod -RH a+w "$$1"; \
	    install_name_tool -change $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {print \$$1; sub(\"^.*/Frameworks\",\"@@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \
	    chmod -RH a-w "$$1"; \
	} && \
	fix_install_id Frameworks/Tcl.framework/Tcl Tcl && fix_install_id Frameworks/Tk.framework/Tk Tk && \
	fix_install_name MacOS/Wish Tcl && fix_install_name MacOS/Wish Tk
endif
endif
d117 7
a123 13
clean-${PROJECT}: %-${PROJECT}:
	${DO_MAKE}
	rm -rf ${SYMROOT}/{${PRODUCT_NAME}.framework,${WISH},tktest}
	rm -f ${OBJ_DIR}{${LIBDIR},${BINDIR}} && \
	rmdir -p ${OBJ_DIR}$(dir ${LIBDIR}) 2>&- || true && \
	rmdir -p ${OBJ_DIR}$(dir ${BINDIR}) 2>&- || true

distclean-${PROJECT}: %-${PROJECT}: clean-${PROJECT}
	${DO_MAKE}
	rm -rf ${OBJ_DIR}
	
test-${PROJECT}: %-${PROJECT}: build-${PROJECT}
	${DO_MAKE}
d125 1
a125 1
#-------------------------------------------------------------------------------------------------------
d127 3
a129 2
.PHONY: ${meta} ${targets} ${PROJECT} build-${PROJECT} install-${PROJECT} \
	clean-${PROJECT} distclean-${PROJECT}
d133 1
a133 1
#-------------------------------------------------------------------------------------------------------
@


1.7.2.9
log
@	* macosx/tkMacOSXInit.c (TkpInit): fixed resource file extraction
	from __tk_rsrc section to work with non-prebound .dylib and .bundle.

	* macosx/Makefile: corrected EMBEDDED_BUILD check, use separate tcl
	and tk version vars to properly support tk/x11 framework version
	overriding, rewrite tkConfig.sh when overriding tk version, corrected
	Wish.app symlink in tk build dir.

	* unix/configure.in: corrected framework finalization to softlink
	stub library to Versions/8.x subdir instead of Versions/Current.
	* unix/configure: autoconf-2.13
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.8 2005/05/24 04:21:32 das Exp $
a98 1
TCL_VERSION		:= ${VERSION}
d109 1
a109 1
TCL_EXE                 := ${TCLSH_DIR}/tclsh${TCL_VERSION}
d157 1
a157 1
TCL_FMWK_DIR		:= ${FMWK_DIR}/Tcl.framework/Versions/${TCL_VERSION}
a170 4
ifneq (${TK_X11},)
	@@cd ${OBJ_DIR} && sed -e 's#/Versions/${TCL_VERSION}#/Versions/${VERSION}#' \
	tkConfig.sh > tkConfig.sh.1 && mv -f tkConfig.sh.1 tkConfig.sh
endif
d190 1
a190 2
endif
ifeq (${EMBEDDED_BUILD},1)
d228 3
a230 3
	@@cd ${TOP_DIR} && if [ -n "${APP_DIR}" ]; then mkdir -p "./${APP_DIR}" && \
	ln -fsh "./$$(echo ${APP_DIR} | sed -e 's#/[^/][^/]*#/..#g')/${FMWK_DIR}/${PRODUCT_NAME}.framework/Resources/Wish.app" "./${APP_DIR}" && \
	ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app"; fi && \
d243 1
a243 2
	rm -rf Frameworks/Tcl.framework/{,/Versions/$(TCL_VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
	rm -rf Frameworks/Tk.framework/{,/Versions/$(VERSION)}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
@


1.7.2.10
log
@	* macosx/Makefile: fixed 'embedded' target.
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.9 2005/05/26 11:20:08 das Exp $
d143 2
d164 1
a164 2
${PROJECT}:
	${MAKE} install-${PROJECT} INSTALL_ROOT=${OBJ_DIR}/
@


1.7.2.11
log
@	*** 8.4.11 TAGGED FOR RELEASE ***

	* macosx/Makefile: for X11 build, add -X11 suffix to unversioned wish
	symbolic link.

	* unix/tcl.m4 (Darwin): add -headerpad_max_install_names to LDFLAGS to
	ensure we can always relocate binaries with install_name_tool.

	* unix/configure: autoconf-2.13
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.10 2005/06/03 08:54:12 das Exp $
a99 1
wish			:= wish
a119 1
wish			:= ${wish}-X11
d219 1
a219 1
	@@ln -fs ${WISH} ${INSTALL_ROOT}${BINDIR}/${wish}
@


1.7.2.12
log
@	* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
	add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to
	configure (flag can't be present twice, so can't be in both CFLAGS and
	LDFLAGS during configure), don't use -prebind when deploying on 10.4,
	define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542).
	(SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete
	autoconf macros. Sync with tk/unix/tcl.m4, sync whitespace with HEAD.

	* unix/configure.in: fix obsolete autoconf macros, sync gratuitous
	formatting/ordering differences with tcl/unix/configure.in.

	* unix/Makefile.in: add CFLAGS to wish/tktest link to make executable
	linking the same as during configure (needed to avoid loosing any linker
	relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS).
	Avoid concurrent linking of wish and compiling of tkTestInit.o during
	parallel make, fix dependencies and flags for building tkMacOSXInit.o
	(checkstubs, checkexports): dependency and Darwin fixes

	* macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent):
	* macosx/tkMacOSXEvent.h:
	* macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent):
	* macosx/tkMacOSXCarbonEvents.c: install standard application event
	handler, add & call functions to start and stop carbon even timer that
	runs the tcl event loop periodically during a nested carbon event loop
	in the toolbox (e.g. during menutracking) to ensure tcl timers etc
	continue to fire, register app event handler for menu tracking and HI
	command carbon events, move menu event handling to new handlers for
	those carbon events, no longer register for/handle appleevent carbon
	event (now dealt with by standard application event handler), event
	debugging code dynamically acquires carbon event debugging functions to
	allow use on Tiger where they are no longer exported from HIToolbox.

	* macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText):
	* macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout):
	* macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents):
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h: abstract common code to dynamically acquire
	address of a named symbol (from a loaded dynamic library) into new
	function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol.

	* macosx/tkMacOSXMenu.c (TkpNewMenu):
	* macosx/tkMacOSXMenubutton.c (MenuButtonInitControl):
	* macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to  modern
	utf8 aware menu manager API, remove obsolete code, add error handling.

	* macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants
	if necessary to allow compilation on OSX 10.2

	* macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never
	executed.

	* generic/tk.h: add/correct location of version numbers in macosx files.

	* generic/tkInt.h: clarify fat compile comment.

	* macosx/Wish.pbproj/default.pbxuser (new file):
	* macosx/Wish.pbproj/jingham.pbxuser:
	* macosx/Wish.pbproj/project.pbxproj: sync with HEAD.

	* macosx/buildTkConfig.tcl (removed): remove obsolete build files.

	* macosx/README: clarification/cleanup, sync with HEAD, document
	universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time).

	* macosx/Makefile: add support for reusing configure cache, build target
	fixes.

	* generic/tkMenu.c:
	* macosx/tkMacOSXButton.c:
	* macosx/tkMacOSXDebug.c:
	* macosx/tkMacOSXDebug.h:
	* macosx/tkMacOSXDialog.c:
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXEntry.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXXStubs.c:
	* macosx/tkMacOSXSubwindows.c:
	* xlib/xgc.c: declare functions and globals used only in own file as
	static, #ifdef out a few Xlib and aqua functions that are never called
	(sync with HEAD).

	* macosx/tkMacOSXPort.h:
	* generic/tkInt.decls: correct signature of TkMacOSXHandleMenuSelect,
	add XSync to aqua Xlib stubs.

	* generic/tkTest.c: #ifdef unix only declarations.
	(TestmetricsCmd): unify win and mac implementation.

	* generic/tkTextDisp.c:
	* generic/tkTextBTree.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXKeyEvent.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXXStubs.c: fix gcc 4 warnings.

	* macosx/tkMacOSXNotify.c:
	* macosx/tkMacOSXTest.c: sync with HEAD.

	* generic/tkIntPlatDecls.h:
	* generic/tkIntXlibDecls.h:
	* generic/tkStubInit.c:
	* unix/configure: regen.
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.11 2005/06/18 21:47:47 das Exp $
d103 1
a103 1
BUILD_TARGET		:= all tktest
d138 1
a138 1
build-${PROJECT}:	target = ${BUILD_TARGET}
d167 2
a168 4
${OBJ_DIR}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
                     ${UNIX_DIR}/tkConfig.sh.in Tk-Info.plist.in Wish-Info.plist.in
	mkdir -p ${OBJ_DIR} && cd ${OBJ_DIR} && \
	if [ ${UNIX_DIR}/configure -nt config.status ]; then ${UNIX_DIR}/configure \
d172 1
a172 1
	${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi
@


1.7.2.13
log
@	* macosx/tkMacOSXDraw.c: re-added inclusion of tclInt.h to allow access
	* macosx/tkMacOSXFont.c: to 8.4-internal Tcl_CreateNamespace().

	* macosx/tkMacOSXDebug.c: add TkMacOSXGetNamedDebugSymbol() function
	* macosx/tkMacOSXDebug.h: that finds unexported symbols in loaded
	libraries by manually walking their symbol table; only to be used for
	debugging purposes, may break unexpectedly in the future. Needed to get
	access to private_extern internal debugging functions in HIToolbox.

	* macosx/tkMacOSXCarbonEvents.c: fix debug event tracing on Tiger.
	* macosx/tkMacOSXMenu.c: add debug menu printing during reconfigure.
	* macosx/tkMacOSXInit.c: conditionalize 64bit-unsafe dyld code.
	* macosx/Makefile: add 'wish8.x' symlink to SYMROOT.

	* unix/configure:    add caching, use AC_CACHE_CHECK instead of
	* unix/configure.in: AC_CACHE_VAL where possible, consistent message
	* unix/tcl.m4:       quoting, sync relevant tclconfig/tcl.m4 changes and
	gratuitous formatting differences, fix SC_CONFIG_MANPAGES with default
	argument, Darwin improvements to SC_LOAD_*CONFIG.
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.12 2005/11/27 02:36:46 das Exp $
d189 1
a189 2
	@@rm -f ${OBJ_DIR}/${BINDIR} && \
	ln -fs Wish.app/Contents/MacOS/Wish ${SYMROOT}/${WISH}
@


1.7.2.14
log
@fix to 'embedded' targets & cosmetic fix to 'install' targets
CCVS: ----------------------------------------------------------------------
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.13 2006/01/10 05:38:19 das Exp $
a181 1
ifeq (${INSTALL_BUILD},)
a194 1
endif
d251 2
a252 2
	${CPPROG} -RH "./${FMWK_DIR}"/T{cl,k}.framework "./${APP_DIR}/Wish.app/Contents/Frameworks" && \
	cd "./${APP_DIR}/Wish.app/Contents" && \
a266 3
ifeq (${INSTALL_BUILD},1)
	@@cd ${TOP_DIR} && rm -rf "./${FMWK_DIR}"/T{cl,k}.framework && rmdir -p "./${FMWK_DIR}" 2>&- || true
endif
@


1.7.2.15
log
@	* macosx/tkMacOSXColor.c (TkSetMacColor, TkpGetColor): use AppearanceMgr
	* macosx/tkMacOSXDefault.h: to retrieve platform std colors for text
	* macosx/tkMacOSXPort.h:    selections, add "systemHighlightSecondary"
	color name for standard color of inactive selections.

	* library/text.tcl (aqua): change focus bindings to implement platform
	standard look for inactive text selections using this new color.

	* generic/tkTextBTree.c (TkTextIsElided): on TkAqua, don't show text
	* generic/tkTextDisp.c (GetStyle):        selection when text widget
	* generic/tkText.c (TextEventProc):       is in disabled state.

	* generic/tkEntry.c (DisplayEntry): change default TkAqua selection
	* macosx/tkMacOSXDefault.h:         relief to "flat" (platform std).

	* generic/tkText.c (Tk_TextCmd): fix bug leading to default text
	selection relief string DEF_TEXT_SELECT_RELIEF being ignored.

	* macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): allow mouse
	event delivery to background windows with kWindowNoActivatesAttribute
	(e.g. overrideredirect windows), as these never come to the foreground
	they would not receive any mouse events otherwise. [Bug 1472624]

	* macosx/tkMacOSXWindowEvent.c (TkMacOSXGenerateFocusEvent): do not
	send focus events to any windows with kWindowNoActivatesAttribute.

	* macosx/tkMacOSXXStubs.c (XQueryColor, XQueryColors): implement basic
	XColor computation from pixel values, enough to make tkImg's window.c
	happy, fixes img::window failures reported on tcl-mac.

	* macosx/tkMacOSXMenu.c (DrawMenuEntryLabel): fix leak. [Bug 1554672]

	* macosx/Makefile: workaround bug in 'cp -pRH' on Darwin 6 and earlier,
	fixes 'make embedded' failure reported on tcl-mac; fix error from 'make
	deploy' with same build tree as previous 'make embedded'.

	* macosx/tkMacOSXEntry.c (TkpDrawEntryBorderAndFocus): fix typo.

	* unix/tcl.m4: sync with tcl/unix/tcl.m4.
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.14 2006/04/12 00:58:44 das Exp $
a205 5
ifeq (${EMBEDDED_BUILD}_${TK_X11},1_)
# workaround bug with 'cp -pRH' on Darwin 6 and earlier
	@@if [ "`uname -r | awk -F. '{print $$1}'`" -lt 7 ]; then \
	mkdir -p ${TOP_DIR}/{"${TCL_FMWK_DIR}","${TK_FMWK_DIR}"}/PrivateHeaders; fi
endif
d240 1
a240 1
	@@cd ${TOP_DIR} && if [ -n "${APP_DIR}" ]; then mkdir -p "./${APP_DIR}" && rm -rf "./${APP_DIR}/Wish.app" && \
@


1.7.2.16
log
@	* macosx/Makefile: don't redo prebinding of non-prebound binaires.
@
text
@d7 1
a7 1
# RCS: @@(#) $Id: Makefile,v 1.7.2.15 2006/09/10 17:07:36 das Exp $
d217 2
a218 5
# redo prebinding (when not building for Mac OS X 10.4 or later only)
	@@if [ "`echo "$${MACOSX_DEPLOYMENT_TARGET}" | \
	awk -F '10\\.' '{print int($$2)}'`" -lt 4 -a "`echo "$${CFLAGS}" | \
	awk -F '-mmacosx-version-min=10\\.' '{print int($$2)}'`" -lt 4 ]; \
	then cd ${INSTALL_ROOT}/; \
d229 1
a229 1
	if [ -n "$${RM_TCL:-}" ]; then rm -f ./${LIBDIR}/Tcl.framework; fi; fi
@


1.7.2.17
log
@	* macosx/tkMacOSXCarbonEvents.c: add window event target carbon event
	* macosx/tkMacOSXEvent.c:	 handler for all kEventClassWindow and
	* macosx/tkMacOSXEvent.h:	 kEventClassMouse events; move all
	* macosx/tkMacOSXNotify.c:	 remaining events except for
	* macosx/tkMacOSXWindowEvent.c:	 kEventClassKeyboard from dispatcher to
	application event handler; pass event handler callRef downstream; fix
	debug event tracing; process all tcl event types in carbon event timer;
	delay carbon event timer first fire; add TkMacOSXTrackingLoop() to mark
	enter/exit of event tracking loop during which all tcl events but only
	carbon update events should be processed by the timer (replaces various
	calls to Tcl_SetServiceMode()); rename TkMacOSXReceiveAndProcessEvent()
	to TkMacOSXReceiveAndDispatchEvent(), move it from tkMacOSXEvent.c to
	tkMacOSXCarbonEvents.c and modify it to dequeue only update events
	during a tracking loop; add TkMacOSXRunTclEventLoop() to standardize
	the various ways in use to run the tcl event loop; add handling of
	kEventClassAppearance events (for ScrollBarVariantChanged event).

	* macosx/tkMacOSXDialog.c:	use new TkMacOSXTrackingLoop() around
	* macosx/tkMacOSXEvent.c:	blocking API that puts up modal dialogs
	* macosx/tkMacOSXMenu.c:	or when entering/exiting menu/control
	* macosx/tkMacOSXMouseEvent.c:	tracking, window dragging and other
	* macosx/tkMacOSXScale.c:	mouse tracking loops.
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXDialog.c:	use new TkMacOSXRunTclEventLoop()
	* macosx/tkMacOSXScale.c:	instead of Tcl_DoOneEvent(),
	* macosx/tkMacOSXScrlbr.c:	Tcl_ServiceAll(), TclServiceIdle()
	* macosx/tkMacOSXWindowEvent.c:	and Tcl_GlobalEval("update idletasks").

	* macosx/tkMacOSXColor.c: make available as Tk system colors all
	* macosx/tkMacOSXPort.h:  appearance manager brushes, text colors and
	backgrounds with new and legacy names, as well as the fully transparent
	color "systemTransparent"; add TkMacOSXSetColorIn{Port,Context}() to
	directly set an X pixel color value in the current QD port resp. the
	given CG context without requiring passage through rgb representation
	(lossy for most system colors); modernize/remove Classic-era code;
	replace crufty strcmp() elseifs by Tcl_GetIndexFromObjStruct().

	* macosx/tkMacOSXButton.c:	use new TkMacOSXSetColorInPort()
	* macosx/tkMacOSXDraw.c:	instead of setting rgb color directly
	* macosx/tkMacOSXMenubutton.c:	to allow for non-rgb system colors.

	* macosx/tkMacOSXCursor.c: implement "none" cursor as on other
	platforms [Patch 1615427]; add all missing appearance manager cursors.

	* macosx/tkMacOSXDefault.h: set SELECT_FG_COLORs to None to match aqua
	L&F; use standard system color names; use new 'menu' system font;
	correct default scrollbar width.

	* macosx/tkMacOSXDraw.c:	standardize initialization, use and
	* macosx/tkMacOSXInt.h:		emptying of various static temp rgns
	* macosx/tkMacOSXRegion.c:	onto two global RgnHandles; in debug
	* macosx/tkMacOSXSubwindows.c:	builds, verify emptiness of these temp
	* macosx/tkMacOSXWindowEvent.c:	rgns before use.

	* macosx/tkMacOSXDraw.c: add TkMacOSX{Setup,Restore}DrawingContext() to
	* macosx/tkMacOSXInt.h:  abstract common setup & teardown of drawing
	environment (for both CG and QD); save/restore QD theme drawing state;
	handle GC clip region; add TkpClipDrawableToRect() to allow clipped
	drawing into drawable regardless of GC used; use new system color
	"systemWindowHeaderBackground" to setup background in themed toplevels;
	correct implementation of TkMacOSXMakeStippleMap().

	* macosx/tkMacOSXEntry.c: use new TkMacOSXSetupDrawingContext() and
	* macosx/tkMacOSXFont.c:  TkMacOSXRestoreDrawingContext() instead of
	various setup/teardown procs like TkMacOSX{SetUp,Release}CGContext(),
	TkMacOSXQuarz{Start,End}Draw(), TkMacOSXSetUpGraphicsPort() etc.

	* macosx/tkMacOSXEmbed.c: add CG context and drawable clip rgn fields
	* macosx/tkMacOSXInt.h:   to MacDrawable struct.
	* macosx/tkMacOSXSubwindows.c:

	* macosx/tkMacOSXDialog.c: make -parent option of tk_getOpenFile et al.
	use the sheet version of NavServices dialogs; ensure native parent win
	exists before using StandardSheet API for tk_messageBox [Bug 1677611];
	force sheets to behave like app-modal dialogs via WindowModality() API;
	use more modern ColorPicker API.

	* macosx/tkAboutDlg.r: use themed movable modal dialog, fix (c) year.

	* macosx/tkMacOSXEntry.c:  take xOff/yOff of MacDrawable into account
	when computing locations/bounds to ensure correct posititioning when
	not drawing into intermediate pixmap.

	* macosx/tkMacOSXFont.c: use appearance manager API to map system font
	* macosx/tkMacOSXFont.h: names to TkFonts; add "menu" system font for
	menu item text drawing from MDEF; disable broken QD stippling.

	* macosx/tkMacOSXMenu.c:		large-scale rewrite of custom
	* macosx/tkMacOSXMenu.r (removed):	MDEF and related code that
	* unix/Makefile.in:			restores many longtime-MIA
	features to working order (e.g. images, custom colors & fonts in menus
	etc); implement compound menu items; use Appearance Mgr and ThemeText
	APIs to mimic native MDEF as closely as possible when default "menu"
	system font is used; remove now obsolete SICN drawing code and
	resources.

	* macosx/tkMacOSXCarbonEvents.c: handle additional menu carbon events
	* macosx/tkMacOSXEvent.c:	 in order to support <<MenuSelect>> in
	* macosx/tkMacOSXMenu.c:	 the menubar and in menus that are not
	* macosx/tkMacOSXMenus.c:	 using the custom MDEF [Bug 1620826];
	fix early and missing clearing of current Tk active menu entry; fix
	extraneous sending of <<MenuSelect>> during active menu entry clearing.

	* macosx/tkMacOSXMouseEvent.c: add support for async window dragging by
	the window server; set the corresponding window attribute by default.

	* macosx/tkMacOSXMouseEvent.c: rationalized handling order of
	non-mousedown events; add TkMacOSXModifierState() to retrieve the
	current key modifiers in carbon format.

	* macosx/tkMacOSXScrlbr.c: use appearance manager API to retrieve
	scrollbar component metrics; add awareness of multiple possibilites for
	scrollbar arrow position in aqua and handle user changes to arrow
	position pref; handle difference in metrics of small & large scrollbar
	variants; handle aqua "jump to here" scrollbar behaviour; correct
	computation of scroll view size and position; enforce min scrollbar
	height to avoid scrollbar component overlap; erase scrollbar area
	outside of standard width; remove broken auto-adjust code; account for
	window class when leaving space for grow box; remove code to manually
	draw grow box; use modern API for thumb scroll proc; replace
	HiliteControl() by modern API; replace control mgr constants with
	appearance mgr equivalents.

	* macosx/tkMacOSXSubwindows.c: use SetWindowBounds() API instead of
	SizeWindow(); invalidate clip regions after X{Map,Unmap}Window as fix
	for [Bug 940117] made them dependent on mapping state; remove unneeded
	calls to TkMacOSXInvalClipRgns() and unnecessary setting of QD port;
	use native-endian pixmap on intel; remove obsolete pixmap pix locking.

	* macosx/tkMacOSXWindowEvent.c: handle only the first of a batch of
	kEventAppAvailableWindowBoundsChanged events sent per transaction;
	handle kEventWindowBoundsChanged event to support live window resizing
	and centralized sending of location/size changed ConfigureNotify
	events; ensure HIGrowBox is redrawn after bounds change; constrain
	window after dragging to ensure titlebar is not inacessible
	offscreen or under dock/menubar; handle kEventWindowGetRegion and
	kEventWindowDrawContent for transparent windows to mark resp. paint
	content region as transparent; handle kEventWindowConstrain for
	fullscreen windows to ensure bounds match new screen size; enter/exit
	fullscreen UIMode upon activation/deactivation of fullscreen window.

	* macosx/tkMacOSXWm.c: use live-resize and async-drag carbon window
	* macosx/tkMacOSXWm.h: attributes for toplevels by default; implement
	new [wm attributes] -topmost, -transparent and -fullscreen; refactor
	WmAttributesCmd() parallelling the tkUnixWm.c implementation, use thus
	factored proc to set proxy icon from [wm iconbitmap]; dynamically
	determine default values for toplevel min and max sizes (similar to
	tkWinWm.c impl): min sizes depend on window class & attributes to
	ensure visibility of all titlebar widgets and grow box, max sizes
	depend on maximal window bounds for all active displays; factor out
	code that puts into effect changes to master or override_redirect; use
	RepositionWindow() API to determine staggered initial window bounds;
	correct resize limit calculations, handle gridding and use modern
	resize API in TkMacOSXGrowToplevel(); remove sending of ConfigureNotify
	after resize or zoom (now handled by BoundsChanged handler); correct
	composite carbon window attribute handling, remove currently unusable
	attributes and add new attributes in [tk::unsupported::MacWindowStyle];
	ensure validity of window class and attributes before use; apply
	changes to window class when handling carbon window attribute changes
	(if HIWindowChangeClass() API available); add debug build warning
	message when deprecated window style is used instead of window class;
	use transparent HIGrowBox for resizable windows; avoid unnecessary
	calls to window structure width API; use tcl time API in TkpGetMS();
	add TkMacOSXEnterExitFullscreen() to enter/exit UIMode with dock and
	menubar hidden; restrict wmTracing output to debug builds; remove
	unneeded calls to TkMacOSXInvalClipRgns() and unnecessary setting of QD
	port; workaround GetWindowStructureWidths() Carbon bug (bogus results
	for never-mapped floating windows).

	* macosx/tkMacOSXXStubs.c (TkMacOSXDisplayChanged): add maximal window
	bounds field to Screen record (in ext_data), computed as the union of
	available window positioning bounds of all graphics devices (displays).

	* macosx/tkMacOSXBitmap.c: fix macRoman encoding leak.
	* macosx/tkMacOSXCursor.c:

	* macosx/tkMacOSXDebug.c (TkMacOSXCarbonEventToAscii): use static
	* macosx/tkMacOSXDebug.h: buffer to simplify callers; const fixes.

	* macosx/tkMacOSXBitmap.c: use more efficient QDSwapPort() instead of
	* macosx/tkMacOSXButton.c: GetPort()/SetPort()/GetGWorld()/SetGWorld().
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXScale.c:
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXColor.c: use kHIToolboxVersionNumber for runtime OS
	* macosx/tkMacOSXEntry.c: version check rather than Gestalt() etc.
	* macosx/tkMacOSXInt.h:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXDraw.c: remove obsolete and now incorrect
	* macosx/tkMacOSXInt.h:  tkMenuCascadeRgn clipping code.
	* macosx/tkMacOSXMenu.c:

	* macosx/tkMacOSXHLEvents.c: replace Tcl_GlobalEval() resp. Tcl_Eval()
	* macosx/tkMacOSXScrlbr.c:   by Tcl_EvalEx().
	* macosx/tkMacOSXInit.c:

	* macosx/tkMacOSXInit.c (TkpInit): reorder initialization steps.

	* macosx/tkMacOSXKeyEvent.c: remove pre-10.2 support.

	* macosx/tkMacOSXMenus.c: remove now useless call to
	TkMacOSXHandleTearoffMenu(); use \x.. quoting for non-latin1 macroman
	literar chars to allow file to be edited as utf-8.

	* macosx/tkMacOSXScale.c: replace TrackControl() by modern
	* macosx/tkMacOSXScrlbr.c: HandleControlClick() API (using new
	TkMacOSXModifierState()).

	* macosx/tkMacOSXInt.h:		move all constant #defines needed to
	* macosx/tkMacOSXColor.c:	support building on older OS X releases
	* macosx/tkMacOSXEvent.h:	to a central location in tkMacOSXInt.h.
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMenus.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXInt.h:		 add ChkErr() macro to factor out
	* macosx/tkMacOSXButton.c:	 Carbon OSStatus return value checking
	* macosx/tkMacOSXCarbonEvents.c: and TkMacOSXDbgMsg() macro to factour
	* macosx/tkMacOSXClipboard.c:	 out debug message output; use these
	* macosx/tkMacOSXColor.c:	 macros to replace #ifdef TK_MAC_DEBUG
	* macosx/tkMacOSXCursor.c:	 blocks & direct printing to stderr,
	* macosx/tkMacOSXDebug.c:	 and to do additional OSStatus return
	* macosx/tkMacOSXDialog.c:	 checking, and to standardize OSStatus
	* macosx/tkMacOSXDraw.c:	 usage.
	* macosx/tkMacOSXEntry.c:
	* macosx/tkMacOSXEvent.c:
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXHLEvents.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXKeyEvent.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMenus.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXSubwindows.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXSend.c:	remove duplicate/unused declarations.
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXDebug.c:	const fixes.
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXTest.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/Wish-Info.plist.in: add tcl document extensions/mime types and
	LSMinimumSystemVersion, LSRequiresCarbon & NSAppleScriptEnabled keys.

	* macosx/tkMacOSXAETE.r:	fix whitespace.
	* macosx/tkMacOSXConfig.c:
	* macosx/tkMacOSXCursors.r:
	* macosx/tkMacOSXKeyboard.c:
	* macosx/tkMacOSXSend.c:
	* macosx/tkMacOSXXCursors.r:
	* macosx/README:

	* macosx/Makefile:		fix/add copyright and license refs.
	* macosx/Tk-Info.plist.in:
	* macosx/Wish-Info.plist.in:
	* macosx/tkMacOSX.h:
@
text
@d7 1
a7 6
# Copyright (c) 2002-2007 Daniel A. Steffen <das@@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @@(#) $Id: Makefile,v 1.7.2.16 2006/10/16 17:35:20 das Exp $
d21 2
a22 2
EXTRA_CONFIGURE_ARGS	?=
EXTRA_MAKE_ARGS		?=
d38 1
a38 1
INSTALL_MANPAGES	?=
d46 1
a46 1
meta			:= all install embedded install-embedded clean distclean test
d87 1
a87 1
${targets}:
d111 1
a111 1
TCL_EXE			:= ${TCLSH_DIR}/tclsh${TCL_VERSION}
d168 1
a168 1
		     ${UNIX_DIR}/tkConfig.sh.in Tk-Info.plist.in Wish-Info.plist.in
d293 1
a293 1

@


1.6
log
@	* macosx/README: info specific to building and running
	TclTk on Mac OS X, answers to tcl-mac list FAQs.
	* macosx/Makefile: permission fix after embedded install.
	* macosx/Wish.pbproj/project.pbxproj: after install, fix
	permissions of uninstalled products.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.5 2002/10/09 13:02:08 das Exp $
d28 1
a28 1
EMBEDDEDOPTS	= DYLIB_INSTALL_PATH="@@executable_path/../Frameworks"
d38 1
a38 1
install-embedded: install-embedded-deploy cleanup-embedded forceRelink forceRelinkTcl
d56 1
a56 1
embedded-develop: forceRelink
d59 1
a59 1
embedded-deploy: forceRelink
a79 5
forceRelinkTcl:
	@@-cd ${BUILD_DIR}; \
	rm -rf Tcl.framework \
	Development.build/Tcl.build/Tcl Deployment.build/Tcl.build/Tcl

a81 2
	rm -f Frameworks; \
	rm -rf @@executable_path; \
@


1.5
log
@	* macosx/Makefile: don't remove tclsh after building embedded.

	* macosx/Wish.pbproj/project.pbxproj: bumped version to 8.4.1;
	added missing library/mkpsenc.tcl to framework.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.4 2002/09/26 17:07:33 das Exp $
d89 1
d91 1
@


1.4
log
@	* macosx/Makefile: preserve environment value of INSTALL_ROOT.
	When embedding only use deployment build. Force relink before
	embedded build to ensure new linker flags are picked up.

	* macosx/buildTkConfig.tcl (new):
	* macosx/Wish.pbproj/project.pbxproj: synthesize tkConfig.sh
	based on tclConfig.sh in Tcl.framework and tkConfig.sh.in.
	Add symbolic links to debug lib, stub libs and tkConfig.sh
	in framework toplevel. Made tkIntXlibDecls.h a public header
	since Headers/X11/Xlib.h includes it. Install wish8.4 script
	that runs "Wish Shell.app" and corresponding wish link.
	Use tcl headers from built Tcl.framework instead of from tcl
	source directory.

        * macosx/tkMacOSXPort.h: added missing standard unix includes
        and defines, similarly to tkUnixPort.h.
        * macosx/tkMacOSXNotify.c: removed dependency on internal tcl
        header "tclPort.h"

	* unix/Makefile.in:
	* unix/install-sh: copied support for 'install-strip' target
	over from tcl/unix/{Makefile.in,install-sh}
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.3 2002/09/10 09:59:16 das Exp $
d82 1
a82 1
	rm -rf Tcl.framework tclsh8.4 \
@


1.3
log
@	* unix/Makefile.in: added DYLIB_INSTALL_DIR variable for Darwin
	and set it to default value ${LIB_RUNTIME_DIR}
	* unix/tcl.m4 (Darwin): use DYLIB_INSTALL_DIR instead of
	LIB_RUNTIME_DIR in the -install_name argument to ld.
	* unix/configure: regen.

	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile: added support for building Tcl as an embedded
	framework, i.e. using an dyld install_name containing
	@@executable_path/../Frameworks via the new DYLIB_INSTALL_DIR
	unix/Makefile variable.
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.2 2002/08/31 06:12:29 das Exp $
d10 1
a10 1
INSTALL_ROOT	=
d12 1
a12 1
BUILD_DIR	= ../../build
d36 1
a36 1
embedded: embedded-develop embedded-deploy
d38 1
a38 1
install-embedded: install-embedded-develop install-embedded-deploy cleanup-embedded
d56 1
a56 1
embedded-develop: 
d59 1
a59 1
embedded-deploy:
d62 1
a62 1
install-embedded-develop: 
d76 9
d86 1
a86 2
	@@( \
	cd ${INSTALL_ROOT}; \
d91 8
a98 2
	if [ -d Library/Frameworks ]; then rmdir -p Library/Frameworks; fi; \
	)
@


1.2
log
@	*** macosx-8-4-branch merged into the mainline [tcl patch #602770] ***

	* generic/tk.decls:
	* generic/tkInt.decls: added new "aqua" specific entries to the
	stubs tables. Changed all "unix" entries to "x11" to allow us to
	distinguish and build both "aqua" on MacOSX and "x11" on MacOSX.

	* generic/tk.h: added a #ifnded RESOURCE_INCLUDED so that tk.h can
	be passed to the resource compiler.

	* generic/tkCmds.c (Tk_TkObjCmd): added [tk windowingsystem]
	subcommand: returns "x11" when running on X11, "win32" on Windows,
	"classic" on MacOS9 and "aqua" on MacOSX Aqua (i.e. Carbon)

	* generic/tkFont.c (TkFontGetFirstTextLayout): new private function
	returning the first chunk of a Tk_TextLayout, i.e. until the first
	font change on the first line (or the whole first line if there is
	no such font change).

	* generic/tkMain.c: made Tcl_ThreadDataKey static

	* library/demos/puzzle.tcl: fixed button metrics for aqua

	* tests/cursor.test: check for presence of arrow cursor instead of
	heart cursor

	* xlib/xcolors.c: changed xColors static initialization to more
	standard C

	* macosx/Wish.pbproj/jingham.pbxuser (new):
	* macosx/Wish.pbproj/project.pbxproj (new): project for Apple's
	ProjectBuilder IDE.

	* macosx/Makefile (new): simple makefile for building the project
	from the command line via the ProjectBuilder tool 'pbxbuild'.

	* macosx/tkMacOSXAppInit.c (new): macosx specific AppInit looking
	for a AppMain.tcl file in its bundled Resources/Scripts folder. If
	present, argv[1] is set to that file and the Scripts folder is
	added to the auto_path. This allows tk apps to embed scripts within
	their bundle directory structure.

	* macosx/tkMacOSXInit.c (new): macosx adapted version of
	tkUnixInit.c: we initialize & cache the Carbon native encoding
	(e.g. 'macRoman') and try to find the tk script library files
	inside Tk packaged as a framework.

	* macosx/tkMacOSXNotify.c (new): new macosx specific merged
	Carbon/select-based notifier.

	* macosx/tkMacOSXEvent.c (new):
	* macosx/tkMacOSXEvent.h (new):
	* macosx/tkMacOSXKeyEvent.c (new):
	* macosx/tkMacOSXMouseEvent.c (new):
	* macosx/tkMacOSXWindowEvent.c (new): new macosx specific event
	handling functionality.

	* macosx/tkMacOSX.h (new):
	* macosx/tkMacOSXBitmap.c (new):
	* macosx/tkMacOSXButton.c (new):
	* macosx/tkMacOSXClipboard.c (new):
	* macosx/tkMacOSXColor.c (new):
	* macosx/tkMacOSXConfig.c (new):
	* macosx/tkMacOSXCursor.c (new):
	* macosx/tkMacOSXDefault.h (new):
	* macosx/tkMacOSXDialog.c (new):
	* macosx/tkMacOSXDraw.c (new):
	* macosx/tkMacOSXEmbed.c (new):
	* macosx/tkMacOSXFont.c (new):
	* macosx/tkMacOSXHLEvents.c (new):
	* macosx/tkMacOSXInt.h (new):
	* macosx/tkMacOSXKeyboard.c (new):
	* macosx/tkMacOSXMenu.c (new):
	* macosx/tkMacOSXMenubutton.c (new):
	* macosx/tkMacOSXMenus.c (new):
	* macosx/tkMacOSXPort.h (new):
	* macosx/tkMacOSXRegion.c (new):
	* macosx/tkMacOSXScale.c (new):
	* macosx/tkMacOSXScrlbr.c (new):
	* macosx/tkMacOSXSubwindows.c (new):
	* macosx/tkMacOSXTest.c (new):
	* macosx/tkMacOSXUtil.c (new):
	* macosx/tkMacOSXUtil.h (new):
	* macosx/tkMacOSXWm.c (new):
	* macosx/tkMacOSXWm.h (new):
	* macosx/tkMacOSXXStubs.c (new): macosx ports of classic mac Tk
	implementation in tk/mac.

	* macosx/tkMacOSXSend.c (new): only send to local interp
	implemented currently.

	* macosx/tkMacOSXDebug.h (new):
	* macosx/tkMacOSXDebug.c (new): new macosx specific functions for
	debugging MacOS events, regions, etc.

	* macosx/tkAboutDlg.r (new):
	* macosx/tkMacOSXApplication.r (new):
	* macosx/tkMacOSXCursors.r (new):
	* macosx/tkMacOSXLibrary.r (new):
	* macosx/tkMacOSXMenu.r (new):
	* macosx/tkMacOSXResource.r (new):
	* macosx/tkMacOSXXCursors.r (new):
	* macosx/tclets.r (new): sources for Rez resource compiler.

	* macosx/Wish.icns (new): Wish application icon.

	* generic/tk.h:
	* generic/default.h:
	* generic/tkBind.c:
	* generic/tkCmds.c:
	* generic/tkGrab.c:
	* generic/tkPointer.c:
	* generic/tkPort.h:
	* generic/tkSelect.c:
	* generic/tkStubLib.c:
	* generic/tkTest.c:
	* generic/tkText.c:
	* generic/tkWindow.c:
	* unix/tkUnix3d.c:
	* xlib/xgc.c:
	* xlib/X11/X.h:
	* xlib/X11/Xlib.h:
	* xlib/X11/Xutil.h: added #includes and #ifdefs for macosx

	* library/bgerror.tcl:
	* library/button.tcl:
	* library/console.tcl:
	* library/dialog.tcl:
	* library/entry.tcl:
	* library/listbox.tcl:
	* library/menu.tcl:
	* library/msgbox.tcl:
	* library/scrlbar.tcl:
	* library/spinbox.tcl:
	* library/text.tcl:
	* library/tk.tcl:
	* library/demos/menu.tcl:
	* library/demos/menubu.tcl:
	* library/demos/widget: check [tk windowingsystem] instead of
	and/or in addition to $tcl_platform(platform).

	* generic/tkInt.h:
	* mac/tkMacBitmap.c:
	* mac/tkMacWm.c: added missing CONSTification

	* generic/tkIntDecls.h:
	* generic/tkIntPlatDecls.h:
	* generic/tkIntXlibDecls.h:
	* generic/tkPlatDecls.h:
	* generic/tkStubInit.c: regen
@
text
@d6 1
a6 1
# RCS: @@(#) $Id:$
d28 2
d36 4
d56 12
d73 12
@


1.1
log
@file Makefile was initially added on branch macosx-8-4-branch.
@
text
@d1 56
@


1.1.2.1
log
@various project cleanups & enhancements
added macosx/Makefile to facilitate building from cli
added [tk windowingsystem] and removed $::tcl_plaform(windowingsystem)
changed all runtime library references to the above
removed duplicate entries in tk.decls & tkInt.decls
CONSTification and other small changes in macosx/ to remove compiler warnings
@
text
@a0 50
################################################################################
#
# Simple makefile for building on Mac OS X with the
# Project Builder command line tool 'pbxbuild'
#
# RCS: @@(#) $Id:$
#
################################################################################

INSTALL_ROOT	=

TARGET		= Wish

DEVBUILDSTYLE	= Development
DEPBUILDSTYLE	= Deployment

PBXBUILD	= /usr/bin/pbxbuild

DEVBUILD	= ${PBXBUILD} -target "${TARGET}" -buildstyle "${DEVBUILDSTYLE}"
DEPBUILD	= ${PBXBUILD} -target "${TARGET}" -buildstyle "${DEPBUILDSTYLE}"

################################################################################

all: develop deploy

install: install-develop install-deploy

clean: clean-develop clean-deploy

################################################################################

develop:
	${DEVBUILD}

deploy:
	${DEPBUILD}

install-develop: 
	${DEVBUILD} install INSTALL_ROOT="${INSTALL_ROOT}"

install-deploy:
	${DEPBUILD} install INSTALL_ROOT="${INSTALL_ROOT}"

clean-develop:
	${DEVBUILD} clean

clean-deploy:
	${DEPBUILD} clean

################################################################################
@


1.1.2.2
log
@set SYMROOT in macosx/Makefile
@
text
@d6 1
a6 1
# RCS: @@(#) $Id: Makefile,v 1.1.2.1 2002/08/30 18:18:16 das Exp $
a11 2
BUILD_DIR	= ../../build

d19 2
a20 6
BUILD		= ${PBXBUILD} SYMROOT="${BUILD_DIR}" -target "${TARGET}"

DEVBUILD	= ${BUILD} -buildstyle "${DEVBUILDSTYLE}"
DEPBUILD	= ${BUILD} -buildstyle "${DEPBUILDSTYLE}"

INSTALLOPTS	= INSTALL_ROOT="${INSTALL_ROOT}"
d39 1
a39 1
	${DEVBUILD} install ${INSTALLOPTS}
d42 1
a42 1
	${DEPBUILD} install ${INSTALLOPTS}
@


