# ####################################################################### # GNUmakefile - Build Mac OS X Tcl/Tk BI distribution from CVS # # FILE: "GNUmakefile" # created: 14/9/02 07:58:03 EST # # Author: Daniel A. Steffen # E-mail: # mail: Mathematics Departement # Macquarie University NSW 2109 Australia # www: # # RCS: @(#) $Id: GNUmakefile,v 1.34 2005/06/06 17:50:54 das Exp $ # # BSD License: c.f. # # Copyright (c) 2002-2005, Daniel A. Steffen # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions and the # following disclaimer. # # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials # provided with the distribution. # # * Neither the name of Macquarie University nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # ####################################################################### # Note: this makefile uses gnumake extensions incompatible with other makes #---------------------------------------------------------------------------------------- # default directories export TMP_DIR ?= $(CURDIR) export DESTDIR ?= export INSTALL_ROOT ?= $(DESTDIR) INSTALL_ROOT_EMBEDDED ?= $(TMP_DIR)/embedded/ INSTALL_ROOT_PACKAGE ?= $(TMP_DIR)/package/ INSTALL_ROOT_ARCHIVE ?= $(TMP_DIR)/tar/ export BUILD_DIR ?= $(TMP_DIR)/build export SRC_DIR ?= $(TMP_DIR) export ORIG_DIR ?= $(TMP_DIR)/orig export SRC_ARCHIVE_DIR ?= $(TMP_DIR)/src export PKG_ARCHIVE_DIR ?= $(TMP_DIR)/pkg export DESTROOT_DIR ?= $(TMP_DIR)/root #---------------------------------------------------------------------------------------- # default installation directories PREFIX := /Library/Tcl LIBDIR := /Library/Tcl DOCDIR := $(PREFIX)/docs DEMODIR := $(PREFIX)/demos #---------------------------------------------------------------------------------------- # tools ifeq ($(wildcard /usr/bin/xcodebuild),) PBXBUILD ?= /usr/bin/pbxbuild else PBXBUILD ?= /usr/bin/xcodebuild endif XCODEBUILD ?= /usr/bin/xcodebuild CVS ?= cvs CVSDO ?= cvsdo WGET ?= wget CURL ?= curl RSYNC ?= rsync DITTO ?= ditto DIFF ?= diff PATCH ?= patch TAR ?= tar BZIP2 ?= bzip2 FIND ?= find STRIP ?= strip TCLSH ?= tclsh TCLKIT = $(BUILD_DIR)/tclkit/tclkit SDX = $(TCLKIT) $(SRC_DIR)/sdx/main.tcl CRITCL = $(TCLKIT) $(SRC_DIR)/critcl/main.tcl MPEXPAND = $(TCLSH) $(SRC_DIR)/tcllib/modules/doctools/mpexpand XSLTPROC = $(BUILD_DIR)/libxslt/xsltproc/xsltproc AUTOCONF = autoconf-$$(([ -e configure ] && \ awk '/Generated.*[Aa]utoconf/ {match($$0,"2\.[^ .]+"); print substr($$0,RSTART,RLENGTH); nextfile}' \ configure) || echo "2.59" ) DO_AUTOCONF = rm -rf autom4te.cache && $(AUTOCONF) && rm -rf autom4te.cache DO_CVS = $(CVS) -q DO_WGET = $(WGET) -N -nv DO_CURL = $(CURL) -L -s -S -O DO_RSYNC = $(RSYNC) -rlpt --exclude=CVS --exclude=.DS_Store --exclude=.cvsignore DO_DIFF = $(DIFF) -u -p -x configure -x autom4te.cache -x .DS_Store -x .cvsignore DO_PATCH = $(PATCH) -N --no-backup-if-mismatch DO_STRIP_INSTALL_DYLIB = $(STRIP) -S DO_STRIP_INSTALL_EXE = $(STRIP) DO_STRIP_DESTROOT_DYLIB = $(STRIP) -S -x DO_XSLTPROC = $(XSLTPROC) -path "$(SRC_DIR)/docbook-xsl/html $(SRC_DIR)/xsltsl" #---------------------------------------------------------------------------------------- # projects (order determines order in installer) core := tcl tk tea := \ thread tclx tclvfs expect \ tcllib tklib bwidget mclistbox \ xotcl incrTcl iwidgets \ tktable vu htmlwidget tile \ tkimg tktreectrl tix \ tclxml tcldom tclxslt tclsoap \ tclxml-expat tclxml-libxml2 tcldom-libxml2 \ libxml2 libxslt \ tdom \ tnc tdomhtml \ memchan trf trfcrypt tls \ tcludp TclCurl curl \ tclodbc sqlite sqlite3 \ tclhttpd tcljava \ tbcload tclcompiler tclparser \ ffidl \ libffi ffcall \ sampleextension \ expat \ swig \ blt tea_unix := \ metakit \ snack \ tcLex #mpexpr pbx := \ TclAE tclapplescript tclresource \ quicktimetcl tclspeech \ tcladdressbook tclbitprint other := \ e4graph \ tkcon \ tclapps jabberlib \ tcldes tcltutorial \ tclkit wishkit critlib carboncritlib \ oomk \ Launcher #tclbench tkdiff tkman SpecTcl starkit := sdx wikit critcl download := docbook-xsl xsltsl #---------------------------------------------------------------------------------------- # project sets ext := $(tea) $(tea_unix) $(pbx) $(other) $(starkit) core_pre := $(core:%=%_pre) core_macosx := $(core) $(core_pre) tk-X11 core_man := $(core:%=%_man) cores := $(core_macosx) $(core_man) meta := core batteries core_man ext core_pre core_macosx starkit batteries := $(core_man) tk-X11 $(ext) $(core_pre) projects := $(core) $(batteries) standalone $(download) tclkit-X11 all := $(core) $(batteries) standalone := tcl tk wishkit := tcl tk metakit tclvfs trf memchan incrTcl wrappers := standalone wishkit tcl_sf := tcl tcl_pre thread sampleextension tclconfig tcltutorial tcllib_sf := tcllib tklib bwidget mclistbox tclapps tclbench tktable_sf := tktable vu htmlwidget tile tclxml_sf := tclxml tcldom tclxslt tclpro := tbcload tclcompiler tclparser equi4 := metakit oomk tclkit tclkit-X11 $(starkit) PBX_BUILDSYSTEM := $(pbx) PBX_DYLIB_VERS := tclapplescript tclresource quicktimetcl tclspeech tcladdressbook tclbitprint NO_TAR := tclxml-expat tclxml-libxml2 tcldom-libxml2 tnc tdomhtml tk-X11 tclkit-X11 \ $(wrappers) $(core_man) NO_CVS := $(NO_TAR) \ trfcrypt snack critlib carboncritlib xotcl TclAE Launcher TclCurl ffidl \ libxml2 libxslt docbook-xsl curl ffcall \ #mpexpr EXTRA_CVS := tclconfig config $(download) tclkit-X11 NEED_CONFIG := bwidget mclistbox COPY_INSTALL := tkcon tclapps jabberlib tcldes tcltutorial DONT_INSTALL := libxml2 libxslt expat curl libffi ffcall $(download) SUB_INSTALL := tclxml-expat tclxml-libxml2 tcldom-libxml2 tnc tdomhtml sdx critcl \ tclkit-X11 wikit jabberlib DONT_INSTALL_DOCS := $(DONT_INSTALL) $(SUB_INSTALL) $(wrappers) $(core) Launcher DONT_PACKAGE := $(DONT_INSTALL) $(SUB_INSTALL) oomk STD_INSTALL_BINARIES_TARGET := \ incrTcl tclx thread tclvfs expect tktable vu tktreectrl tix tdom memchan tcludp STD_INSTALL_LIBRARIES_TARGET := \ incrTcl iwidgets thread tclvfs tcllib tklib bwidget mclistbox tdomhtml STD_INSTALL_DOC_TARGET := \ incrTcl iwidgets tclx thread tclvfs expect tdom targets := $(projects) #---------------------------------------------------------------------------------------- # targets all: $(all) $(meta): %: ; $(MAKE) $($*) targets += all $(all) $(meta) install := $(projects:%=install/%) $(install): install/%: % install/%: action := install install: $(all:%=install/%) $(meta:%=install/%): install/%: ; $(MAKE) $($*:%=install/%) actions += install targets += $(install) $(meta:%=install/%) clean := $(projects:%=clean/%) $(clean): clean/%: % clean/%: action := clean clean: $(clean) $(meta:%=clean/%): clean/%: ; $(MAKE) $($*:%=clean/%) actions += clean targets += $(clean) $(meta:%=clean/%) distclean := $(projects:%=distclean/%) $(distclean): distclean/%: % distclean/%: action := distclean distclean: $(distclean) $(meta:%=distclean/%): distclean/%: ; $(MAKE) $($*:%=distclean/%) actions += distclean targets += $(distclean) $(meta:%=distclean/%) embedded := $(all:%=embedded/%) $(embedded): embedded/%: % $(core_macosx:%=embedded/%): action := embedded embedded: $(all:%=embedded/%) $(meta:%=embedded/%): embedded/%: ; $(MAKE) $($*:%=embedded/%) actions += embedded targets += $(embedded) $(meta:%=embedded/%) install-embedded := $(all:%=install-embedded/%) $(core_macosx:%=install-embedded/%): install-embedded/%: % $(core_macosx:%=install-embedded/%): action := install-embedded $(ext:%=install-embedded/%): install-embedded/%: install/% install-embedded: $(all:%=install-embedded/%) $(meta:%=install-embedded/%): install-embedded/%: ; $(MAKE) $($*:%=install-embedded/%) actions += install-embedded targets += $(install-embedded) $(meta:%=install-embedded/%) destroot := $(projects:%=destroot/%) destroot: $(destroot) $(meta:%=destroot/%): destroot/%: ; $(MAKE) $($*:%=destroot/%) actions += destroot targets += $(destroot) $(meta:%=destroot/%) package := $(all:%=package/%) package: $(package) $(meta:%=package/%): package/%: ; $(MAKE) $($*:%=package/%) actions += package targets += $(package) $(meta:%=package/%) archive := $(projects:%=archive/%) archive: $(archive) $(meta:%=archive/%): archive/%: ; $(MAKE) $($*:%=archive/%) actions += archive targets += $(archive) $(meta:%=archive/%) pkg := package archive dest := install install-embedded $(pkg) cvs_diff := $(all) $(EXTRA_CVS) update := $(cvs_diff:%=update/%) update: $(update) $(meta:%=update/%): update/%: ; $(MAKE) $($*:%=update/%) actions += update targets += $(update) $(meta:%=update/%) diff := $(cvs_diff:%=diff/%) diff: $(diff) $(meta:%=diff/%): diff/%: ; $(MAKE) $($*:%=diff/%) actions += diff targets += $(diff) $(meta:%=diff/%) patch := $(cvs_diff:%=patch/%) patch: $(patch) $(meta:%=patch/%): patch/%: ; $(MAKE) $($*:%=patch/%) actions += patch targets += $(patch) $(meta:%=patch/%) diff := diff patch cvs := update $(diff) .PHONY: $(targets) $(actions) FORCE .NOTPARALLEL: FORCE: #---------------------------------------------------------------------------------------- # project make build settings PRE_AUTOCONF = true PRE_MAKE = POST_MAKE = pre_make = @echo "*** $* $(action) ***"; $(PRE_MAKE) post_make = +$(POST_MAKE) $(actions:%=%/%): TARGET_BUILD_DIR = $(BUILD_DIR)/$* $(actions:%=%/%): TARGET_SRC_DIR = $(SRC_DIR)/$* #---------------------------------------------------------------------------------------- # install build settings PRE_INSTALL = true POST_INSTALL = true POST_INSTALL_EMBEDDED = true install/%: INSTALL_ARGS = INSTALL_ROOT=$(INSTALL_ROOT) \ DESTDIR=$(INSTALL_ROOT) $(EXTRA_INSTALL_ARGS) install/% install-embedded/%: pre_install = @mkdir -p $(INSTALL_ROOT)/ && \ cd $(INSTALL_ROOT)/ && \ if [ -n "$(INSTALL_ROOT)" -a $$(id -u) -eq 0 ]\; then \ chown root:admin . && chmod 1775 .\; fi && \ $(PRE_INSTALL) install/% install-embedded/%: post_install = +@echo \ "Post-Installing $(NAME) $(VERSION)" && \ (cd $(INSTALL_ROOT)/ && $(POST_INSTALL)) && \ echo "Installing $(NAME) docs/demos: $(INSTALL_DOC_TARGET) " \ $$(echo $(DOCS) | $(call strip_src_dir)) \ $$(echo $(MAN_DOCS) | $(call strip_src_dir)) \ $$(echo $(DOCTOOL_DOCS_DIR) | $(call strip_src_dir)) \ $$(echo $(DOCBOOK_DOCS_DIR) | $(call strip_src_dir)) \ $$(echo $(DEMOS) | $(call strip_src_dir)) "$(HOMEPAGE)" && \ $(install_docs) && $(install_demos) && \ if [ -n "$(INSTALL_ROOT)" -a $$(id -u) -eq 0 -a -d $(INSTALL_ROOT)Library ]\; \ then chown -R root:admin $(INSTALL_ROOT)Library && \ chmod 775 $(INSTALL_ROOT)Library\; fi && \ rmdir -p $(INSTALL_ROOT)$(PREFIX)/{bin,lib,include,man/man?,man,share} \ $(INSTALL_ROOT)$(LIBDIR) $(INSTALL_ROOT)$(DOCDIR) \ $(INSTALL_ROOT)$(DEMODIR) $(INSTALL_ROOT)/usr/bin 2>&- || true && \ (cd $(INSTALL_ROOT)/ && $(POST_INSTALL_EMBEDDED)) install-embedded/%: INSTALL_ROOT = $(INSTALL_ROOT_EMBEDDED) $(STD_INSTALL_BINARIES_TARGET:%=install/%): INSTALL_BINARIES_TARGET = install-binaries $(STD_INSTALL_LIBRARIES_TARGET:%=install/%): INSTALL_LIBRARIES_TARGET = install-libraries $(STD_INSTALL_BINARIES_TARGET:%=install/%) $(STD_INSTALL_LIBRARIES_TARGET:%=install/%): \ action = $(INSTALL_BINARIES_TARGET) $(INSTALL_LIBRARIES_TARGET) dont_install := $(DONT_INSTALL:%=install/%) $(dont_install): action := $(dont_install): POST_INSTALL := true $(dont_install): POST_INSTALL_EMBEDDED := true $(dont_install): PRE_INSTALL := true install/%: COPY_INSTALL_SRC = install/%: COPY_INSTALL_DST = $(LIBDIR)/$* $(foreach t,$(COPY_INSTALL),$(t) $(actions:%=%/$(t))): TARGET_BUILD_DIR = #---------------------------------------------------------------------------------------- # package & archive build settings package/%: INSTALL_ROOT = $(INSTALL_ROOT_PACKAGE) archive/%: INSTALL_ROOT = $(INSTALL_ROOT_ARCHIVE) package/%: RELOCATABLE = -c package/%: PKG_LIST = $(pkg:%=%/%): ARCHIVE_DIR = $(LIBDIR) $(foreach t,$(DONT_PACKAGE),$(pkg:%=%/$(t)) destroot/$(t)): DONT_PACKAGE_THIS := 1 #---------------------------------------------------------------------------------------- # docs & demos install settings install_docs = mkdir -p $(INSTALL_ROOT){$(DOCDIR),$(PREFIX)/man/mann} && $(INSTALL_DOCS) install-embedded/%: install_docs = true install_demos = mkdir -p $(INSTALL_ROOT)$(DEMODIR) && $(INSTALL_DEMOS) install-embedded/%: install_demos = true install/%: INSTALL_DOCS = \ if [ -n "$(strip $(INSTALL_DOC_TARGET))" ]\; then \ $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$* $(INSTALL_DOC_TARGET) \ $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS)\; fi && \ if [ -n "$(strip $(DOCS))" ]\; then \ $(DO_RSYNC) --delete $(EXTRA_INSTALL_DOCS_ARGS) $(DOCS) \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/\; fi && \ if [ -n "$(strip $(MAN_DOCS))" ]\; then \ $(DO_RSYNC) --delete $(EXTRA_INSTALL_MAN_DOCS_ARGS) $(MAN_DOCS) \ $(INSTALL_ROOT)$(PREFIX)/man/mann/\; fi && \ if [ -n "$(HOMEPAGE)" ]\; then \ printf "[InternetShortcut]\nURL=$(HOMEPAGE)\n" > \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/$(NAME).url\; fi && \ if [ -n "$(strip $(DOCTOOL_DOCS_DIR))" ]\; then \ echo -n "Building doctool-format documentation" && \ for f in $$(ls $(DOCTOOL_DOCS_DIR)/*.man)\; do echo -n "." && \ $(MPEXPAND) html $$f $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/$$(basename $$f man)html && \ $(MPEXPAND) nroff $$f $(INSTALL_ROOT)$(PREFIX)/man/mann/$$(basename $$f man)n\; \ done && echo \; fi && \ if [ -n "$(strip $(DOCBOOK_DOCS_DIR))" ]\; then \ echo -n "Building docbook-format documentation" && \ $(DO_XSLTPROC) $(DOCBOOK_DOCS_DIR)/txt.xsl $(DOCBOOK_DOCS_DIR)/README.xml > \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/README.txt && echo -n "." && \ $(DO_XSLTPROC) $(DOCBOOK_DOCS_DIR)/html.xsl $(DOCBOOK_DOCS_DIR)/README.xml > \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/README.html && echo -n "." && \ $(DO_XSLTPROC) $(DOCBOOK_DOCS_DIR)/nroff.xsl $(DOCBOOK_DOCS_DIR)/$*.xml > \ $(INSTALL_ROOT)$(PREFIX)/man/mann/$*.n && echo -n "." && \ $(DO_XSLTPROC) $(DOCBOOK_DOCS_DIR)/html.xsl $(DOCBOOK_DOCS_DIR)/$*.xml > \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/$*.html && echo\; fi install/%: DOCS = $(README) $(LICENSE) $(DONT_INSTALL_DOCS:%=install/%): INSTALL_DOCS = true $(STD_INSTALL_DOC_TARGET:%=install/%): INSTALL_DOC_TARGET = install-doc install/%: INSTALL_DEMOS = if [ -n "$(strip $(DEMOS))" ]\; then \ $(DO_RSYNC) --delete $(EXTRA_INSTALL_DEMOS_ARGS) $(DEMOS) \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME)/\; fi #---------------------------------------------------------------------------------------- # default values for post-install targets $(dest:%=%/%): NAME = $$(echo $* | awk '{print toupper(substr($$0,1,1))substr($$0,2)}') $(dest:%=%/%): VERSION = \ $$(f=$$($(FIND) -H $(TARGET_SRC_DIR) -maxdepth 2 \ -name "configure.in"| head -1) && \ if egrep -q 'TEA_INIT\(\[' $$f\; then \ awk -F, '/^AC_INIT/ {gsub("[^0-9.]","",$$2)\; print $$2}' $$f\; \ else eval $$(egrep '_VERSION=|MAJOR=|MINOR=|PATCH_?LEVEL=|^[ ]*VERSION=' \ $$f | egrep -v '^\#') && echo $${VERSION}\; fi) $(foreach t,$(PBX_DYLIB_VERS),$(dest:%=%/$(t))): VERSION = \ $$(awk '/^\t*DYLIB_CURRENT_VERSION/ {sub("\;","",$$3)\; print $$3}' \ $$($(FIND) -H $(TARGET_SRC_DIR) -maxdepth 2 -name "*.pbproj")/project.pbxproj) $(dest:%=%/%): README = $$($(FIND) -E -H $(TARGET_SRC_DIR) -maxdepth 1 \ -iregex ".*/README(\.txt|\.html|\.rtf)?" | head -1) $(dest:%=%/%): LICENSE = $$(L=$$($(FIND) -E -H $(TARGET_SRC_DIR) -maxdepth 1 \ -iregex ".*/(LICENSE|COPYING).*" | head -1)\;\ if [ -z "$${L}" ]\; then \ L=$$($(FIND) -E -H $(TARGET_SRC_DIR) -maxdepth 2 \ -iregex ".*/(LICENSE|COPYING).*" | head -1)\;\ fi\; echo $${L}) $(dest:%=%/%): PKGLISTNAME = $(NAME) $(dest:%=%/%): README_INSTALLED = $$(basename "$(README)") $(dest:%=%/%): HOMEPAGE = http://$*.sourceforge.net/ $(dest:%=%/%): WIKI = $(PKGLISTNAME) WIKIBASEURL = http://wiki.tcl.tk/ #---------------------------------------------------------------------------------------- # cvs download settings checkout = +@if [ ! -d $(SRC_DIR)/$* ]; then $(MAKE) update/$*; fi; $(cvs:%=%/%): PRE_CVS = true $(cvs:%=%/%): POST_CVS = true update/%: CVSROOT = $(CVS_USER)@$(CVS_SERVER) update/%: CVS_SERVER = cvs.sourceforge.net:/cvsroot/$(CVS_PROJ) update/%: CVS_PROJ = $* update/%: CVS_PSERVER_USER = anonymous update/%: CVS_USER = $$(U=$(call conf,cvsUser.conf,$(CVS_PROJ))\; \ if [ -n "$$U" ]\; then echo ":ext:$$U"\; \ else echo ":pserver:$(CVS_PSERVER_USER)"\; fi) update/%: CVS_TAG = $(call conf,cvsTag.conf,$*) update/%: CVS_DATE = $(call conf,cvsTag.conf,defaultdate) update/%: CVS_UP = update/%: CVS_CO = $* update/%: URL = http://example.com/ update/%: DL_EXT = tar.gz #---------------------------------------------------------------------------------------- # gcc 3.3 specific settings ifneq ($(wildcard /usr/bin/gcc-3.3),) # # use gcc 3.1 for C++ code # ifeq ($(CXX),g++) # export CXX = g++3 # endif ## enable compilation of projecbuilder based projects with gcc 3.3 ## ifneq ($(wildcard /usr/bin/gcc-4.0),) GCC_VERSION = 4.0 else GCC_VERSION = 3.x endif $(PBX_BUILDSYSTEM): EXTRA_MAKE_ARGS = GCC_VERSION=$(GCC_VERSION) PRECOMPILE_PREFIX_HEADER=NO \ CC="$(CC)" CPLUSPLUS="$(CXX)" PBXBUILD="$(PBXBUILD)" XCODEBUILD="$(XCODEBUILD)" ifeq ($(CC),cc) $(PBX_BUILDSYSTEM): CC = gcc endif ifeq ($(CXX),c++) $(PBX_BUILDSYSTEM): CXX = g++ endif endif #---------------------------------------------------------------------------------------- # project specific build settings ### core_macosx ### #$(core:%=$(SRC_DIR)/%/unix/configure): AUTOCONF=autoconf-2.13 $(core_macosx): EXTRA_MAKE_ARGS = PREFIX=/usr $(EXTRA_MAKE_ARGS_TK) $(core_macosx): POST_INSTALL += && if [ "$(action)" != "install-embedded" ] \; then \ if [ -n "$(INSTALL_ROOT)" -a $$(id -u) -eq 0 -a -d usr/bin ]\; \ then chgrp wheel usr usr/bin && chmod 755 usr usr/bin\; fi && \ if [ -n "$(INSTALL_ROOT)" -a $$(id -u) -eq 0 -a -d Library/Frameworks ]\; \ then chmod 775 Library/Frameworks\; fi\; \ fi $(POST_INSTALL_TK) $(POST_INSTALL_PRE) $(core_macosx): PRE_INSTALL += && rm -f $(SRC_DIR)/$$(echo $* | sed -e 's/^\([^_]*\)\(_pre\)\{0,1\}\(-X11\)\{0,1\}$$/\18.5/') \ $(PRE_INSTALL_TK) $(PRE_INSTALL_PRE) tk tk_pre: POST_INSTALL_TK = && if [ "$(action)" != "install-embedded" ] \; then \ if [ -n "$(INSTALL_ROOT)" -a $$(id -u) -eq 0 -a -d Applications/Utilities ]\; \ then chmod 775 Applications Applications/Utilities\; fi\; \ fi $(foreach t,tcl tcl_pre tcl_man,$(dest:%=%/$(t))): \ VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(TARGET_SRC_DIR)/generic/tcl.h) $(foreach t,tk tk_pre tk-X11 tk_man,$(dest:%=%/$(t))): \ VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(TARGET_SRC_DIR)/generic/tk.h) $(foreach t,$(core),$(dest:%=%/$(t))): HOMEPAGE = $(foreach t,$(core_pre) tk-X11 $(core_man) thread sampleextension standalone,$(dest:%=%/$(t))): HOMEPAGE = http://www.tcl.tk/ $(foreach t,$(core_pre) tk-X11 $(core_man),$(dest:%=%/$(t))): DOCIDX = contents.htm package/tk package/tk_pre: EXTRA_PACKAGE_ARGS += -a $(core_macosx:%=package/%): RELOCATABLE = $(foreach t,$(core_macosx),$(dest:%=%/$(t))): ARCHIVE_DIR = / $(tcl_sf:%=update/%): CVS_PROJ = tcl update/tk update/tk_pre: CVS_PROJ = tktoolkit ### core_pre ### $(core_pre): BUILD_DIR := $(BUILD_DIR)_pre $(core_pre) $(foreach t,$(core_pre),$(actions:%=%/$(t))): TARGET_BUILD_DIR = $(BUILD_DIR)_pre/$$(echo $* | sed -e 's/_pre//') $(dest:%=%/tcl_pre): NAME = Tcl_Prerelease $(dest:%=%/tk_pre): NAME = Tk_Prerelease $(core_pre): SHORT_VERSION = $$(awk -F\" '/T(CL|K)_VERSION/ {print $$2}' \ $(SRC_DIR)/$*/generic/$$(echo $* | sed -e 's/_pre//').h) $(core_pre): REL_VERSION = $$(awk -F\" '/T(CL|K)_VERSION/ {print $$2}' \ $(SRC_DIR)/$$(echo $* | sed -e 's/_pre//')/generic/$$(echo $* | sed -e 's/_pre//').h) $(core_pre): PRE_INSTALL_PRE = && ln -fsh $* $(SRC_DIR)/$$(echo $* | sed -e 's/_pre/8.5/') tcl_pre: POST_INSTALL_PRE = && if [ "$(action)" != "install-embedded" ] \; then \ rm -f Library/Frameworks/Tcl.framework/Versions/Current usr/bin/tclsh && \ if [ -e usr/bin/tclsh$(REL_VERSION) ]\; \ then ln -s tclsh$(REL_VERSION) usr/bin/tclsh\; fi && \ if [ -e Library/Frameworks/Tcl.framework/Versions/$(REL_VERSION) ]\; \ then ln -s $(REL_VERSION) Library/Frameworks/Tcl.framework/Versions/Current\; else rm -f \ Library/Frameworks/Tcl.framework/{Headers,PrivateHeaders,Resources,Tcl,Tcl_debug,tclConfig.sh}\; fi\; \ fi && rm -f $(SRC_DIR)/$$(echo $* | sed -e 's/_pre/8.5/') tk_pre: POST_INSTALL_PRE = && if [ "$(action)" != "install-embedded" ] \; then \ chmod u+w Library/Frameworks/Tk.framework/Versions && \ rm -f Library/Frameworks/Tk.framework/Versions/Current usr/bin/wish && \ if [ -e usr/bin/wish$(REL_VERSION) ]\; \ then ln -s wish$(REL_VERSION) usr/bin/wish\; fi && \ if [ -e Library/Frameworks/Tk.framework/Versions/$(REL_VERSION) ]\; \ then ln -s $(REL_VERSION) Library/Frameworks/Tk.framework/Versions/Current\; \ else chmod u+w Library/Frameworks/Tk.framework && rm -f Applications/Utilities/Wish{,\ Shell}.app \ Library/Frameworks/Tk.framework/{Headers,PrivateHeaders,Resources,Tk,Tk_debug,tkConfig.sh} && \ (rmdir -p Applications/Utilities 2>&- || true)\; fi\; \ fi && rm -f $(SRC_DIR)/$$(echo $* | sed -e 's/_pre/8.5/') install/tcl_pre: INSTALL_DOCS = V=$(SHORT_VERSION) && ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tcl.framework/Versions/$$$$V/Resources/Documentation/Reference/,$(DOCDIR))/Tcl \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME) install/tk_pre: INSTALL_DOCS = V=$(SHORT_VERSION) && ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tk.framework/Versions/$$$$V/Resources/Documentation/Reference/,$(DOCDIR))/Tk \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME) install/tk_pre: INSTALL_DEMOS = V=$(SHORT_VERSION) && ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tk.framework/Versions/$$$$V/Resources/Scripts/,$(DEMODIR))/demos \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME) $(dest:%=%/tcl_pre): WIKI = Tcl $(dest:%=%/tk_pre): WIKI = Tk $(core_pre:%=update/%): CVS_CO = $$(echo $* | sed -e 's/_pre//') ### tk-X11 ### $(cvs:%=%/tk-X11): PRE_CVS = ln -fsh tk $(SRC_DIR)/$* tk-X11: BUILD_DIR := $(BUILD_DIR)-X11 tk-X11 $(actions:%=%/tk-X11): TARGET_BUILD_DIR = $(BUILD_DIR)-X11/tk tk-X11 $(actions:%=%/tk-X11) : TARGET_SRC_DIR = $(SRC_DIR)/$$(echo $* | sed -e 's/-X11//') $(dest:%=%/tk-X11): NAME = Tk-X11 tk-X11: SHORT_VERSION = $$(awk -F\" '/TK_VERSION/ {print $$2}' $(SRC_DIR)/$*/generic/tk.h) tk-X11: PRE_MAKE = mkdir -p $(BUILD_DIR) && ln -fsh $$(echo $(BUILD_DIR) | sed -e 's/-X11//')/tcl $(BUILD_DIR) tk-X11: EXTRA_MAKE_ARGS_TK = TK_X11=1 install/tk-X11: EXTRA_INSTALL_ARGS = INSTALL_TARGETS='install-binaries install-libraries install-private-headers' tk-X11: POST_INSTALL_TK = && d=Library/Frameworks/Tk.framework/Versions/$(SHORT_VERSION)-X11/Resources/Scripts && \ rm -rf $$d && ln -s ../../$(SHORT_VERSION)/Resources/Scripts $$d && \ if [ "$(action)" != "install-embedded" ] \; then \ chmod u+w Library/Frameworks/Tk.framework/Versions && \ rm -f Library/Frameworks/Tk.framework/Versions/Current usr/bin/wish && \ if [ -e usr/bin/wish$(SHORT_VERSION) ]\; \ then ln -s wish$(SHORT_VERSION) usr/bin/wish\; fi && \ if [ -e Library/Frameworks/Tk.framework/Versions/$(SHORT_VERSION) ]\; \ then ln -s $(SHORT_VERSION) Library/Frameworks/Tk.framework/Versions/Current && \ (cd Library/Frameworks/Tk.framework && ln -fs Versions/$(SHORT_VERSION)/libtkstub* .)\; \ else chmod u+w Library/Frameworks/Tk.framework && rm -f \ Library/Frameworks/Tk.framework/{Headers,PrivateHeaders,Resources,Tk,Tk_debug,tkConfig.sh,libtkstub*}\; \ fi\; fi install/tk-X11: INSTALL_DOCS = ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tk.framework/Resources/Documentation/Reference/,$(DOCDIR))/Tk \ $(INSTALL_ROOT)$(DOCDIR)/$(NAME) install/tk-X11: INSTALL_DEMOS = ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tk.framework/Resources/Scripts/,$(DEMODIR))/demos \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME) $(dest:%=%/tk-X11): WIKI = Tk ### core_man ### $(core_man) $(foreach t,$(core_man),$(actions:%=%/$(t))): TARGET_BUILD_DIR = $(BUILD_DIR)_man/$$(echo $* | sed -e 's/_man//') $(core_man) $(foreach t,$(core_man),$(actions:%=%/$(t))): TARGET_SRC_DIR = $(SRC_DIR)/$$(echo $* | sed -e 's/_man//') $(BUILD_DIR)_man/tk/Makefile: EXTRA_CONFIGURE_ARGS = --with-tcl=../tcl $(core_man:%=install/%): action := install-doc install/tcl_man: INSTALL_DOCS = ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tcl.framework/Resources/Documentation/Reference/,$(DOCDIR))/Tcl \ $(INSTALL_ROOT)$(DOCDIR)/ install/tk_man: INSTALL_DOCS = ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tk.framework/Resources/Documentation/Reference/,$(DOCDIR))/Tk \ $(INSTALL_ROOT)$(DOCDIR)/ install/tk_man: INSTALL_DEMOS = ln -fhs \ $(call min_rel_path,/Library/Frameworks/Tk.framework/Resources/Scripts/,$(DEMODIR))/demos \ $(INSTALL_ROOT)$(DEMODIR)/Tk $(dest:%=%/tcl_man): NAME = Tcl_Man $(dest:%=%/tk_man): NAME = Tk_Man $(dest:%=%/tcl_man): PKGLISTNAME = Tcl $(dest:%=%/tk_man): PKGLISTNAME = Tk ### sampleextension ### $(dest:%=%/sampleextension): README = $(SRC_DIR)/$*/README.sha install/sampleextension: DOCS = $(DOCS) $(SRC_DIR)/$*/ ### tclx ### #$(SRC_DIR)/tclx/configure: AUTOCONF=autoconf-2.13 $(BUILD_DIR)/tclx/Makefile: EXTRA_CONFIGURE_ARGS = --with-help #tclx: EXTRA_MAKE_ARGS = LDFLAGS='-prebind -seg1addr 0xc000000' tclx: POST_INSTALL += && $(DO_STRIP_INSTALL_DYLIB) "./$(LIBDIR)/Tclx"*/*.dylib && \ rmdir -p usr/bin 2>&- || true # $(call redo_prebinding,./$(LIBDIR)/tclx*/libtclx*.dylib) $(dest:%=%/tclx): NAME = TclX ### thread ### install/thread: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/html/ install/thread: DEMOS = $(SRC_DIR)/$*/tcl/ ### tclvfs ### $(dest:%=%/tclvfs): NAME = TclVfs $(dest:%=%/tclvfs): HOMEPAGE = http://sourceforge.net/projects/tclvfs/ install/tclvfs: DEMOS = $(SRC_DIR)/$*/examples/ ### incrTcl & iwidgets ### incrTcl: POST_INSTALL += && $(call fix_stub_config,itcl) #$(dest:%=%/incrTcl): VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(SRC_DIR)/$*/itcl/generic/itcl.h) $(dest:%=%/incrTcl) $(dest:%=%/iwidgets): HOMEPAGE = http://incrtcl.sourceforge.net/itcl/ install/incrTcl: DEMOS = $(SRC_DIR)/$*/itk/examples/ $(dest:%=%/incrTcl): WIKI = incr%20tcl $(BUILD_DIR)/iwidgets/Makefile: EXTRA_CONFIGURE_ARGS = --with-itcl=$(SRC_DIR)/incrTcl iwidgets: POST_INSTALL += && cd ./$(LIBDIR) && rm -f $* && ln -fhs $** $* && cd ../.. $(dest:%=%/iwidgets): NAME = IWidgets install/iwidgets: DOCS = $(DOCS) $(SRC_DIR)/$*/demos/html/ install/iwidgets: DEMOS = $(SRC_DIR)/$*/demos/ install/iwidgets: EXTRA_INSTALL_DEMOS_ARGS = --exclude=html/ install/iwidgets: INSTALL_DEMOS = $(INSTALL_DEMOS) && ln -fhs \ ../$(call min_rel_path,$(DOCDIR),$(DEMODIR))/$(NAME) \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME)/html && ln -fhs \ ../$(call min_rel_path,$(DEMODIR),$(LIBDIR))/$(NAME) \ $(INSTALL_ROOT)$(LIBDIR)/$*/demos $(dest:%=%/iwidgets): DOCIDX = iwidgets4.0.0UserCmds.html update/incrTcl update/iwidgets: CVS_PROJ = incrtcl ### tktable_sf ### $(cvs:%=%/vu): POST_CVS = touch $(SRC_DIR)/$*/configure.in tktable vu tile: POST_INSTALL += && rm -f $$($(FIND) ./$(LIBDIR) -maxdepth 1 -type d -iname "$**")/*.txt tile: POST_INSTALL += && $(call fix_pkg_stub2,$*,ttk, ) install/tktable install/vu: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/*.html install/tktable: MAN_DOCS = $(SRC_DIR)/$*/doc/*.n install/vu: INSTALL_DOCS = $(INSTALL_DOCS) && \ $(MAKE_ENV) $(MAKE) -C $(SRC_DIR)/$*/doc install INSTALL_DIR=$(INSTALL_ROOT)$(PREFIX) install/tile: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/*.txt install/tile: MAN_DOCS = $(SRC_DIR)/$*/doc/$**.n install/tktable install/vu install/tile: DEMOS = $(SRC_DIR)/$*/demos/ install/tktable: EXTRA_INSTALL_DEMOS_ARGS = --exclude=*.py $(dest:%=%/tktable): NAME = TkTable $(dest:%=%/tktable): DOCIDX = tkTable.html $(foreach t,tktable vu,$(dest:%=%/$(t))): HOMEPAGE = http://tktable.sourceforge.net/ $(dest:%=%/vu): WIKI = VUW%20widgets $(dest:%=%/tile): HOMEPAGE = http://tktable.sourceforge.net/tile/ #$(SRC_DIR)/htmlwidget/configure: AUTOCONF=autoconf-2.13 htmlwidget: POST_MAKE = cd $(BUILD_DIR)/$* && $(TCLSH) $(SRC_DIR)/$*/webpage/mkwebpage.tcl $(dest:%=%/htmlwidget): NAME = TkHtml $(dest:%=%/htmlwidget): README = $(BUILD_DIR)/$*/index.html $(dest:%=%/htmlwidget): LICENSE = $(SRC_DIR)/$*/COPYRIGHT $(dest:%=%/htmlwidget): HOMEPAGE = http://www.hwaci.com/sw/tkhtml/ install/htmlwidget: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/*.html install/htmlwidget: DEMOS = $(SRC_DIR)/$*/hv/*.tcl $(dest:%=%/htmlwidget): DOCIDX = spec.html $(tktable_sf:%=update/%): CVS_PROJ = tktable ### tcllib_sf ### $(foreach t,tcllib tklib,$(dest:%=%/$(t))): \ VERSION = $$($(TCLSH) $(SRC_DIR)/$*/sak.tcl version) $(foreach t,$(tcllib_sf),$(dest:%=%/$(t))): HOMEPAGE = http://tcllib.sourceforge.net/ tcllib: EXTRA_MAKE_ARGS = doc tklib: EXTRA_MAKE_ARGS = doc TCLSH_PROG='TCLLIBPATH=$(SRC_DIR)/tcllib/modules $(TCLSH)' install/tcllib: DOCS = $(DOCS) $(BUILD_DIR)/$*/doc/html/*.html $(SRC_DIR)/$*/{README-*,PACKAGES} install/tklib: DOCS = $(DOCS) $(BUILD_DIR)/$*/doc/html/*.html install/tcllib install/tklib: MAN_DOCS = $(BUILD_DIR)/$*/doc/nroff/*.n install/tcllib: DEMOS = $(SRC_DIR)/$*/examples/{README,oreilly-oscon2001} install/tcllib: INSTALL_DOCS = $(INSTALL_DOCS) && \ $(TCLSH) $(SRC_DIR)/$*/installer.tcl \ -nroff-path $(INSTALL_ROOT)$(PREFIX)/man/mann \ -html-path $(INSTALL_ROOT)$(DOCDIR)/$(NAME) \ -app-path $(INSTALL_ROOT)$(PREFIX)/bin \ -no-examples -no-pkgs -no-wait -no-gui install/tcllib: INSTALL_DEMOS = $(INSTALL_DEMOS) && \ $(TCLSH) $(SRC_DIR)/$*/installer.tcl \ -example-path $(INSTALL_ROOT)$(DEMODIR)/$(NAME) \ -no-pkgs -no-html -no-nroff -no-wait -no-gui -no-apps install/tklib: INSTALL_DEMOS = $(INSTALL_DEMOS) && \ $(TCLSH) $(SRC_DIR)/$*/installer.tcl \ -example-path $(INSTALL_ROOT)$(DEMODIR)/$(NAME) \ -no-pkgs -no-html -no-nroff -no-wait -no-gui $(cvs:%=%/tklib): POST_CVS = mkdir -p $(SRC_DIR)/$*/examples/tkpiechart && \ ln -f $(SRC_DIR)/$*/modules/tkpiechart/demo.tcl $(SRC_DIR)/$*/examples/tkpiechart/ tklib: POST_INSTALL += && rm -f ./$(LIBDIR)/$**/tkpiechart/demo.tcl $(dest:%=%/bwidget): NAME = BWidget install/bwidget: DOCS = $(DOCS) $(SRC_DIR)/$*/BWman/ install/bwidget: DEMOS = $(SRC_DIR)/$*/demo/ $(dest:%=%/bwidget): DOCIDX = index.html mclistbox: POST_INSTALL += && (rmdir -p ./$(LIBDIR)/$**/html 2>&- || true) install/mclistbox: DOCS = $(DOCS) $(SRC_DIR)/$*/{ANNOUNCE.txt,$*.html} install/mclistbox: DEMOS = $(SRC_DIR)/$*/example.tcl $(dest:%=%/mclistbox): DOCIDX = $*.html tclapps: POST_MAKE = $(MAKE) jabberlib install/tclapps: COPY_INSTALL_SRC = apps/ install/tclapps: POST_INSTALL += && mkdir -p ./$(PREFIX)/bin && cd ./$(LIBDIR)/$* && \ p=$(call min_rel_path,$(LIBDIR)/$*,$(PREFIX)/bin) && \ for f in $$(ls | fgrep -v ijbridge)\; do $(FIND) "$${f}" -maxdepth 1 \ \( -name "$${f}.tcl" -o -name main.tcl -o -name timer.tcl \) \ -exec chmod +x {} \\\; \ -exec ln -fs "$${p}/"{} "$(INSTALL_ROOT)$(PREFIX)/bin/$${f}" \\\; \;\ done && $(MAKE) -C $(CURDIR) install/jabberlib $(dest:%=%/tclapps): NAME = TclApps $(dest:%=%/tclapps): VERSION = $$($(FIND) $(SRC_DIR)/$* -name ChangeLog -exec \ awk 'FNR==1 {print $$1}' {} \\\; | sort -nr | head -1) install/tclapps: INSTALL_DEMOS = ln -fhs $(call min_rel_path,$(LIBDIR)/$*,$(DEMODIR)) \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME) $(tcllib_sf:%=update/%): CVS_PROJ = tcllib install/jabberlib: COPY_INSTALL_SRC = coccinella/{$*/,TclXML} $(dest:%=%/jabberlib): VERSION = $$(awk '/package ifneeded jlib / {print $$4}' $(SRC_DIR)/$*/coccinella/$*/pkgIndex.tcl) update/jabberlib: CVS_PROJ = coccinella update/jabberlib: CVS_CO = coccinella/$* coccinella/TclXML update/jabberlib: CVS_UP = $(CVS_CO) ### memchan & trf & trfcrypt ### ##no-tea3 $(SRC_DIR)/memchan/configure: AUTOCONF=autoconf-2.13 ##no-tea3 memchan: EXTRA_MAKE_ARGS = binaries TCLLIBPATH="$(SRC_DIR)/tcllib/modules" ##tea3 #memchan: EXTRA_MAKE_ARGS = binaries ##tea3 #$(dest:%=%trfcrypt): VERSION = \ ##no-tea3 $(foreach t,trf trfcrypt,$(dest:%=%/$(t))): \ VERSION = $$(awk '/^ *version */ {print $$2}' $(SRC_DIR)/$*/DESCRIPTION) install/memchan install/trf: DOCTOOL_DOCS_DIR = $(SRC_DIR)/$*/doc install/memchan: INSTALL_DOCS = $(INSTALL_DOCS) && \ $(DO_RSYNC) --delete $(SRC_DIR)/$*/doc/*.css $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/ && \ for f in $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/*.html\; do\ sed -e 's|||' \ $$f > $$f.1 && mv -f $$f.1 $$f \; done ##no-tea3 $(cvs:%=%/trf): POST_CVS = touch $(SRC_DIR)/$*/configure.in ##no-tea3 #$(SRC_DIR)/trf/configure $(SRC_DIR)/trfcrypt/configure: AUTOCONF=autoconf-2.13 $(BUILD_DIR)/trf/Makefile: EXTRA_CONFIGURE_ARGS = --with-zlibtcl=$(BUILD_DIR)/tkimg/libz/tcl ##no-tea3 trf trfcrypt: EXTRA_MAKE_ARGS = 'CPPFLAGS=-I/usr/include/openssl -I/usr/include/crypto \ -DLIBDES_LIB_NAME=\"libdes425.dylib\" -DNCOMPAT -DBZ2_LIB_NAME=\"libbz2.dylib\" \ -DZ_LIB_NAME=\"libz.dylib\" -DSSL_LIB_NAME=\"libcrypto.dylib\" -UHAVE_zlibtcl_PACKAGE' $(dest:%=%/trf): HOMEPAGE = http://tcltrf.sourceforge.net/ update/trf: CVS_PROJ = tcltrf $(SRC_DIR)/trfcrypt/configure: PRE_AUTOCONF = chmod -f +w $(SRC_DIR)/$*/configure $(BUILD_DIR)/trfcrypt/Makefile: EXTRA_CONFIGURE_ARGS = \ --with-trf-include-dir=$(SRC_DIR)/trf/generic \ --with-trf-lib-dir=$(BUILD_DIR)/trf $(cvs:%=%/trfcrypt): POST_CVS = chmod -R +X $(SRC_DIR)/$* trfcrypt: POST_INSTALL += && $(call fix_pkg,Trfcrypt,/) install/trfcrypt: EXTRA_INSTALL_ARGS = TCLSH_PROG='TCLLIBPATH=$(BUILD_DIR)/trf $(TCLSH)' $(dest:%=%/trfcrypt): NAME = TrfCrypt $(dest:%=%/trfcrypt): HOMEPAGE = http://www.oche.de/~akupries/soft/trfcrypt/ install/trfcrypt: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/html/ update/trfcrypt: URL = http://www.oche.de/~akupries/soft/trfcrypt/download/ $(dest:%=%/trfcrypt): DOCIDX = index.html $(dest:%=%/trfcrypt): WIKI = $(cvs:%=%/trfcrypt): EXTRA_DIFF_ARGS = -x defs.old ### tls ### $(BUILD_DIR)/tls/Makefile: EXTRA_CONFIGURE_ARGS = --with-ssl-dir=/usr $(dest:%=%/tls): NAME = TLS install/tls: DOCS = $(DOCS) $(SRC_DIR)/$*/$*.htm $(dest:%=%/tls): DOCIDX = $*.htm ### tclodbc ### tclodbc: EXTRA_MAKE_ARGS = 'SHLIB_LD=$(CXX) -dynamiclib $${LDFLAGS}' $(dest:%=%/tclodbc): NAME = TclODBC $(dest:%=%/tclodbc): HOMEPAGE = http://sourceforge.net/projects/tclodbc/ tclodbc: POST_INSTALL += && $(DO_STRIP_INSTALL_DYLIB) "./$(LIBDIR)/$*"*/*.dylib install/tclodbc: INSTALL_DOCS = $(INSTALL_DOCS) && (cd $(INSTALL_ROOT)$(DOCDIR)/$(NAME) && \ ln -fs ../$(call min_rel_path,$(PREFIX),$(DOCDIR))/$**/doc/* .) install/tclodbc: INSTALL_DEMOS = ln -fhs \ $(call min_rel_path,$(PREFIX),$(DEMODIR))/$$(basename $$(ls -d $(INSTALL_ROOT)$(LIBDIR)/$**))/samples \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME) $(dest:%=%/tclodbc): DOCIDX = reference.htm ### tclhttpd ### #$(SRC_DIR)/tclhttpd/configure: AUTOCONF=autoconf-2.13 $(BUILD_DIR)/tclhttpd/Makefile: EXTRA_CONFIGURE_ARGS = --with-serverroot=$(PREFIX)/share/$* tclhttpd: POST_INSTALL += && $(call fix_pkg,crypt, ) && $(call fix_pkg,limit, ) && \ rm -f ./$(PREFIX)/share/$*/tclhttpd.etc.init $(dest:%=%/tclhttpd): NAME = TclHttpd $(dest:%=%/tclhttpd): VERSION = $$(awk -F\" '/Httpd\(version\)/ {print $$2}' $(SRC_DIR)/$*/lib/version.tcl) install/tclhttpd: DOCS = $(DOCS) $(SRC_DIR)/$*/{README.virthost,WHATSNEW,certs/README.ssl} install/tclhttpd: INSTALL_DOCS = $(INSTALL_DOCS) && ln -fhs \ ../$(call min_rel_path,$(PREFIX)/share/$*,$(DOCDIR)) $(INSTALL_ROOT)$(DOCDIR)/$(NAME) install/tclhttpd: DEMOS = $(SRC_DIR)/$*/sampleapp/ ### tcLex ### $(SRC_DIR)/tcLex/unix/configure: AUTOCONF=autoconf-2.13 $(cvs:%=%/tcLex): POST_CVS = rm -f $(SRC_DIR)/$*/unix \; ln -fhs src $(SRC_DIR)/$*/unix\; \ touch $(SRC_DIR)/$*/src/configure.in patch/tcLex: PRE_CVS = rm -f $(SRC_DIR)/$*/src/configure $(dest:%=%/tcLex): VERSION = $$(awk '/^PROJECT_VERSION[ \t]*=/ {print $$3}' \ $(SRC_DIR)/$*/unix/Makefile.in) $(dest:%=%/tcLex): HOMEPAGE = http://sourceforge.net/projects/tclex/ install/tcLex: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/en/ install/tcLex: DEMOS = $(SRC_DIR)/$*/examples/ $(dest:%=%/tcLex): DOCIDX = index.html update/tcLex: CVS_PROJ = tclex ### tkimg ### ##no-tea3 #$(SRC_DIR)/tkimg/configure: AUTOCONF=autoconf-2.13 tkimg: POST_INSTALL += && \ $(call fix_stub_config2,jpegtcl,Img) && \ $(call fix_stub_config2,pngtcl,Img) && \ $(call fix_stub_config2,tifftcl,Img) && \ $(call fix_stub_config2,zlibtcl,Img) && \ $(call fix_stub_config2,$*,Img) && \ chown -R $$(ls -ld $(BUILD_DIR)/$* | awk '{print $$3}') $(BUILD_DIR)/$*/Img $(dest:%=%/tkimg): NAME = TkImg $(dest:%=%/tkimg): HOMEPAGE = http://sourceforge.net/projects/tkimg/ $(dest:%=%/tkimg): WIKI = Img install/tkimg: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/{*.htm,*.css} install/tkimg: DOCTOOL_DOCS_DIR = $(SRC_DIR)/$*/doc install/tkimg: DEMOS = $(SRC_DIR)/$*/{*.tcl,msgs} #$(dest:%=%/tkimg): DOCIDX = index.htm ##no-tea3 $(cvs:%=%/tkimg): POST_CVS = $(call update_config,$(SRC_DIR)/$*/libjpeg)\; $(call update_config,$(SRC_DIR)/$*/libtiff) ##no-tea3 $(cvs:%=%/tkimg): PRE_CVS = $(call restore_config,$(SRC_DIR)/$*/libjpeg)\; $(call restore_config,$(SRC_DIR)/$*/libtiff) ### expect ### ##no-tea3 #$(SRC_DIR)/expect/configure: AUTOCONF=autoconf-2.13 ##no-tea3 $(BUILD_DIR)/expect/Makefile: EXTRA_CONFIGURE_ARGS = --with-tclinclude=$(SRC_DIR)/tcl \ --with-tkinclude=$(SRC_DIR)/tk --enable-shared --enable-stubs ##tea3 #$(BUILD_DIR)/expect/Makefile: EXTRA_CONFIGURE_ARGS = --with-tclinclude=$(SRC_DIR)/tcl \ # --with-tkinclude=$(SRC_DIR)/tk ##no-tea3 expect: POST_INSTALL += && $(call fix_pkg,$*, ) && \ cd ./$(LIBDIR) && rm -f {,$**/}lib$**.a && \ cd ../../$(PREFIX) && (rmdir -p lib/$** 2>&- || true) && \ cd bin && for f in $* $*k \; do \ $(DO_STRIP_INSTALL_EXE) $$f && install_name_tool -change $$(otool -L $$f | \ awk '/lib$*/ {print $$1 " $(LIBDIR)/" substr($$1,4,length($$1)-9) "/" $$1}') $$f \; \ done && cd ../../.. # printf > $*k '\#!/bin/sh\n' && \ # printf >> $*k '\# \\\n' && \ # printf >> $*k 'exec wish "$$0" $${1+"$$@"}\n' && \ # printf >> $*k 'if {$$argc && [string equal -length \\\n' && \ # printf >> $*k ' [string length [lindex $$argv 0]] [lindex $$argv 0] "-file"]} {\n' && \ # printf >> $*k ' set argv [lreplace $$argv 0 0]\n' && \ # printf >> $*k ' incr argc -1\n' && \ # printf >> $*k '}\n' && \ # printf >> $*k 'if {$$argc && [string index [lindex $$argv 0] 0] ne "-" } {\n' && \ # printf >> $*k ' set argv0 [lindex $$argv 0]\n' && \ # printf >> $*k ' set argv [lreplace $$argv 0 0]\n' && \ # printf >> $*k ' incr argc -1\n' && \ # printf >> $*k ' package require Expect\n' && \ # printf >> $*k ' source $$argv0\n' && \ # printf >> $*k '} else {\n' && \ # printf >> $*k ' puts "Do not use [info script] as an interactive shell!"\n' && \ # printf >> $*k ' puts "Use wish and \[package require Expect\] instead"\n' && \ # printf >> $*k ' exit -1\n' && \ # printf >> $*k '}\n' && \ # chmod +x $*k && \ $(dest:%=%/expect): HOMEPAGE = http://expect.nist.gov/ install/expect: EXTRA_MAKE_ARGS = SCRIPTS_MANPAGES= install/expect: DOCS = $(DOCS) $(SRC_DIR)/$*/FAQ install/expect: DEMOS = $(SRC_DIR)/$*/example/README ##no-tea3 install/expect: INSTALL_DEMOS = $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$* install-libraries install-doc \ bindir_arch_indep=$(INSTALL_ROOT)$(DEMODIR)/$(NAME) $(INSTALL_ARGS) && \ (cd $(INSTALL_ROOT)$(PREFIX)/bin && \ ln -fhs $(call min_rel_path,$(DEMODIR),$(PREFIX)/bin)/$(NAME)/* . && \ cd .. && rmdir -p lib/$** 2>&- || true ) && $(INSTALL_DEMOS) ##tea3 #install/expect: INSTALL_DEMOS = $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$* install-libraries install-doc \ # bindir=$(DEMODIR)/$(NAME) $(INSTALL_ARGS) && \ # (mkdir -p $(INSTALL_ROOT)$(PREFIX)/bin && cd $(INSTALL_ROOT)$(PREFIX)/bin && \ # ln -fhs $(call min_rel_path,$(DEMODIR),$(PREFIX)/bin)/$(NAME)/* . && \ # cd .. && rmdir -p lib/$** 2>&- || true ) && $(INSTALL_DEMOS) ##no-tea3 $(cvs:%=%/expect): POST_CVS = $(call update_config,$(SRC_DIR)/$*) ##no-tea3 $(cvs:%=%/expect): PRE_CVS = $(call restore_config,$(SRC_DIR)/$*) ### tkcon ### install/tkcon: COPY_INSTALL_SRC = $*.tcl install/tkcon: COPY_INSTALL_DST = $(PREFIX)/bin/$* $(dest:%=%/tkcon): VERSION = $$(awk -F\" '/VERSION / {print $$2}' $(SRC_DIR)/$*/tkcon.tcl) install/tkcon: DOCS = $(README) $(SRC_DIR)/$*/{index.html,docs} $(dest:%=%/tkcon): DOCIDX = index.html ### snack ### snack: POST_INSTALL += && $(call fix_pkg_stub,$*, ) $(dest:%=%/snack): VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(SRC_DIR)/$*/generic/$*.h) $(dest:%=%/snack): LICENSE = $(SRC_DIR)/$*/BSD.txt $(dest:%=%/snack): HOMEPAGE = http://www.speech.kth.se/snack/ update/snack: URL = http://www.speech.kth.se/~kare/ update/snack: POST_CVS = $(MAKE) -C $(CURDIR) update/tclconfig && \ ln -fs ../../config/tcl.m4 $(SRC_DIR)/$*/unix install/snack: DOCS = $(DOCS) $(SRC_DIR)/$*/{doc/,ext} install/snack: EXTRA_INSTALL_DOCS_ARGS = --exclude=python* --exclude=Sphere* --exclude=*.dsp --exclude=*.vcproj install/snack: DEMOS = $(SRC_DIR)/$*/demos/tcl/ install/snack: EXTRA_INSTALL_DEMOS_ARGS = --exclude=tclkit* --exclude=sdx --exclude=wrap.tcl --exclude=Sphere* $(dest:%=%/snack): DOCIDX = tcl-man.html $(cvs:%=%/snack): EXTRA_DIFF_ARGS = -x tcl.m4 ### TclAE ### TclAE: EXTRA_PBXBUILD_ARGS = -target TclAE INSTALL_ROOT='$$(SYMROOT)/Deployment.build/' TCLSH_PROG='$(TCLSH)' TclAE: PROJ_DIR = Build TclAE: PRE_MAKE = if [ -d $(BUILD_DIR)/$* ]\; then chmod -R u+w $(BUILD_DIR)/$*\; fi install/TclAE: AFTER_OVERRIDES = INSTALL_ROOT=$(INSTALL_ROOT)$(LIBDIR)/ $(dest:%=%/TclAE): VERSION = $$(tr "\r" "\n" < $(SRC_DIR)/$*/Build/Headers/tclAEid.h | \ awk -F\" '/TCLAE_VERSION/ {print $$2}') $(dest:%=%/TclAE): README = $(SRC_DIR)/$*/Help/TclAE Help/index.html $(dest:%=%/TclAE): HOMEPAGE = http://tclae.sourceforge.net/ install/TclAE: DOCS = $(LICENSE) $(SRC_DIR)/$*/Help/TclAE\ Help/ $(dest:%=%/TclAE): DOCIDX = index.html\#TclAE%20-%20How%20is%20it%20used? update/TclAE: URL = http://rutherglen.ics.mq.edu.au/~steffen/tcltk/$*/ ### tclspeech ### $(dest:%=%/tclspeech): NAME = TclSpeech $(dest:%=%/tclspeech): README = $(SRC_DIR)/$*/speech.html install/tclspeech: DEMOS = $(SRC_DIR)/$*/demo.tcl $(dest:%=%/tclspeech): DOCIDX = speech.html $(dest:%=%/tclspeech): WIKI = MacSpeech ### tclbitprint ### tclbitprint: POST_MAKE = tr "\r" "\n" < $(SRC_DIR)/$*/README > $(BUILD_DIR)/$*/README $(dest:%=%/tclbitprint): NAME = MacCarbonPrint $(dest:%=%/tclbitprint): README = $(BUILD_DIR)/$*/README $(dest:%=%/tclbitprint): HOMEPAGE = http://sourceforge.net/projects/tclbitprint/ install/tclbitprint: DOCS = $(DOCS) $(SRC_DIR)/$*/docs/ install/tclbitprint: DEMOS = $(SRC_DIR)/$*/examples/macosx/ $(dest:%=%/tclbitprint): DOCIDX = maccarbonprint.html $(dest:%=%/tclbitprint): WIKI = ### quicktimetcl ### $(dest:%=%/quicktimetcl): NAME = QuickTimeTcl $(dest:%=%/quicktimetcl): README = $(SRC_DIR)/$*/ReadMe.rtf $(dest:%=%/quicktimetcl): VERSION = $$(tr '\r' '\n' < $(SRC_DIR)/$*/CHANGES | \ awk '/^To .*:$$/ {print substr($$2,1,length($$2)-1)\; nextfile}') install/quicktimetcl: DOCS = $(DOCS) $(SRC_DIR)/$*/docs/ install/quicktimetcl: DEMOS = $(SRC_DIR)/$*/ExampleCode/ $(dest:%=%/quicktimetcl): DOCIDX = $*.html ### tclresource ### tclresource: PROJ_DIR = Source update/tclresource: CVS_CO = Source Help Extras update/tclresource: CVS_UP = $(CVS_CO) $(dest:%=%/tclresource): NAME = TclResource $(dest:%=%/tclresource): README = $(SRC_DIR)/$*/Help/ReadMe $(dest:%=%/tclresource): HOMEPAGE = http://sourceforge.net/projects/tclresource/ install/tclresource: DOCS = $(DOCS) $(SRC_DIR)/$*/Help/*.html install/tclresource: MAN_DOCS = $(SRC_DIR)/$*/Help/*.n $(dest:%=%/tclresource): DOCIDX = TclResourceHelp.html $(dest:%=%/tclresource): WIKI = ### tcladdressbook ### tcladdressbook: PROJ_DIR = Source update/tcladdressbook: CVS_CO = Source Help Contribs update/tcladdressbook: CVS_UP = $(CVS_CO) $(dest:%=%/tcladdressbook): NAME = TclAddressBook $(dest:%=%/tcladdressbook): README = $(SRC_DIR)/$*/Help/ReadMe $(dest:%=%/tcladdressbook): VERSION = $$(awk '/^$(NAME)/ {print $$2\; nextfile}' \ $(SRC_DIR)/$*/Help/ReadMe) install/tcladdressbook: DOCS = $(DOCS) $(SRC_DIR)/$*/Help/{*.html,Images} install/tcladdressbook: MAN_DOCS = $(SRC_DIR)/$*/Help/*.n install/tcladdressbook: DEMOS = $(SRC_DIR)/$*/Contribs/Tcl/ $(dest:%=%/tcladdressbook): DOCIDX = TclAB.html $(dest:%=%/tcladdressbook): WIKI = ### tclapplescript ### tclapplescript: POST_INSTALL += && rm -f ./$(LIBDIR)/Tclapplescript*/*.html $(dest:%=%/tclapplescript): NAME = TclAppleScript $(dest:%=%/tclapplescript): README = $(SRC_DIR)/$*/TclAppleScript.html $(dest:%=%/tclapplescript): HOMEPAGE = http://sourceforge.net/projects/tclapplescript/ $(dest:%=%/tclapplescript): DOCIDX = TclAppleScript.html ### tclsoap ### $(dest:%=%/tclsoap): NAME = TclSOAP $(dest:%=%/tclsoap): README = $(SRC_DIR)/$*/TclSOAP.ANN install/tclsoap: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/ install/tclsoap: EXTRA_INSTALL_DOCS_ARGS = --exclude=index.html install/tclsoap: DEMOS = $(SRC_DIR)/$*/{samples/,cgi-bin} $(dest:%=%/tclsoap): DOCIDX = TclSOAP.html ### tclxml ### $(SRC_DIR)/tclxml/configure $(SRC_DIR)/tclxml-libxml2/configure: AUTOCONF=autoconf-2.52 tclxml: POST_MAKE = $(MAKE) tclxml-expat tclxml-libxml2 tclxml: POST_INSTALL += && $(call fix_stub_config,Tclxml) && \ $(MAKE) -C $(CURDIR) $(action)/tclxml-expat $(action)/tclxml-libxml2 $(dest:%=%/tclxml): NAME = TclXML $(foreach t,$(tclxml_sf),$(dest:%=%/$(t))): HOMEPAGE = http://tclxml.sourceforge.net/$*.html install/tclxml: DOCS = $(LICENSE) $(SRC_DIR)/$*/RELNOTES install/tclxml: DOCBOOK_DOCS_DIR = $(SRC_DIR)/$*/doc install/tclxml: DEMOS = $(SRC_DIR)/$*/examples/ $(dest:%=%/tclxml): README_INSTALLED = README.html $(dest:%=%/tclxml): DOCIDX = $*.html $(cvs:%=%/tclxml): POST_CVS = ln -fsh $*/expat $(SRC_DIR)/tclxml-expat && \ ln -fsh $*/libxml2 $(SRC_DIR)/tclxml-libxml2 $(tclxml_sf:%=update/%): CVS_PROJ = tclxml $(BUILD_DIR)/tclxml-libxml2/Makefile: PRE_CONFIGURE = $(MAKE) libxml2 $(BUILD_DIR)/tclxml-libxml2/Makefile: EXTRA_CONFIGURE_ARGS = \ --with-libxml2-lib=$(BUILD_DIR)/libxml2/.libs \ --with-libxml2-include=$(SRC_DIR)/libxml2/include tclxml-libxml2: EXTRA_MAKE_ARGS = LIBS="-lz -liconv" \ AM_CPPFLAGS=-I$(BUILD_DIR)/libxml2/include tclxml-libxml2: POST_MAKE = ln -fs tcllibxml2Config.sh $(BUILD_DIR)/$*/tclxml_libxml2Config.sh tclxml-libxml2: POST_INSTALL += && $(call fix_stub_config,tclxml_libxml2) ### tcldom ### $(SRC_DIR)/tcldom/configure: AUTOCONF=autoconf-2.52 tcldom: POST_MAKE = $(MAKE) tcldom-libxml2 tcldom: POST_INSTALL += && \ $(DO_RSYNC) $(SRC_DIR)/$*/examples/{cgi2dom,domtree,domtext}.tcl \ ./$(LIBDIR)/Tcldom*/ && $(MAKE) -C $(CURDIR) $(action)/tcldom-libxml2 $(dest:%=%/tcldom): NAME = TclDOM install/tcldom: DOCS = $(LICENSE) $(SRC_DIR)/$*/RELNOTES install/tcldom: DOCBOOK_DOCS_DIR = $(SRC_DIR)/$*/docs install/tcldom: DEMOS = $(SRC_DIR)/$*/examples/ $(dest:%=%/tcldom): README_INSTALLED = README.html $(dest:%=%/tcldom): DOCIDX = $*.html $(cvs:%=%/tcldom): POST_CVS = ln -fsh $*/src-libxml2 $(SRC_DIR)/tcldom-libxml2 $(cvs:%=%/tcldom): PATCH_EXCL_CONFDIR = |src-libxml2 #$(SRC_DIR)/tcldom-libxml2/configure: AUTOCONF=autoconf-2.13 $(BUILD_DIR)/tcldom-libxml2/Makefile: PRE_CONFIGURE = $(MAKE) libxml2 $(BUILD_DIR)/tcldom-libxml2/Makefile: EXTRA_CONFIGURE_ARGS = \ --with-tclxml_libxml2=$(BUILD_DIR)/tclxml-libxml2 \ --with-libxml2-lib=$(BUILD_DIR)/libxml2/.libs \ --with-libxml2-include=$(SRC_DIR)/libxml2/include tcldom-libxml2: EXTRA_MAKE_ARGS = LIBS="-lz -liconv" \ AM_CPPFLAGS="-I$(BUILD_DIR)/libxml2/include" tcldom-libxml2: POST_MAKE = ln -fs tcldomlibxml2Config.sh $(BUILD_DIR)/$*/tcldom_libxml2Config.sh tcldom-libxml2: POST_INSTALL += && $(call fix_stub_config,tcldom_libxml2) ### tclxslt ### $(SRC_DIR)/tclxslt/configure: AUTOCONF=autoconf-2.13 $(BUILD_DIR)/tclxslt/Makefile: PRE_CONFIGURE = $(MAKE) libxslt $(BUILD_DIR)/tclxslt/Makefile: EXTRA_CONFIGURE_ARGS = \ --with-tclxml_libxml2=$(BUILD_DIR)/tclxml-libxml2 \ --with-tcldom_libxml2=$(BUILD_DIR)/tcldom-libxml2 \ --with-libxml2-lib=$(BUILD_DIR)/libxml2/.libs \ --with-libxml2-include=$(SRC_DIR)/libxml2/include \ --with-libxslt-lib=$(BUILD_DIR)/libxslt/libxslt/.libs \ --with-libxslt-include=$(SRC_DIR)/libxslt \ --with-libexslt-lib=$(BUILD_DIR)/libxslt/libexslt/.libs \ --with-libexslt-include=$(SRC_DIR)/libxslt tclxslt: EXTRA_MAKE_ARGS = "LIBS=-lz -liconv" \ AM_CPPFLAGS="-I$(BUILD_DIR)/libxml2/include -I$(BUILD_DIR)/libxslt \ -I$(BUILD_DIR)/libxslt/libxslt -I$(BUILD_DIR)/libxslt/libexslt" $(dest:%=%/tclxslt): NAME = TclXSLT install/tclxslt: DOCS = $(LICENSE) $(SRC_DIR)/$*/RELNOTES tclxslt install/tclxslt: DOCBOOK_DOCS_DIR = $(SRC_DIR)/$*/docs install/tclxslt: DEMOS = $(SRC_DIR)/$*/tclxsltproc tclxslt: POST_MAKE += ln -fs ../../tcldom/docs/nroff.xsl $(DOCBOOK_DOCS_DIR) $(dest:%=%/tclxslt): DOCIDX = $*.html $(dest:%=%/tclxslt): README_INSTALLED = README.html $(cvs:%=%/tclxslt): PATCH_EXCL = |docs\/nroff\.xsl ### libxml2 & libxslt & docbook ### $(cvs:%=%/libxml2): POST_CVS = touch $(SRC_DIR)/$*/configure $(SRC_DIR)/libxml2/configure $(SRC_DIR)/libxslt/configure: \ PRE_AUTOCONF = cd $(SRC_DIR)/$* && \ if [ -n "$$(which aclocal-1.9)" -a -n "$$(which automake-1.9)" ]\; then \ export AUTOCONF=autoconf-2.59 AUTOM4TE=autom4te-2.59 && \ libtoolize-1.5.8 --copy --force && aclocal-1.9 && \ automake-1.9 --add-missing --force-missing --copy\; fi $(BUILD_DIR)/libxml2/Makefile: PRE_CONFIGURE = rm -f $(SRC_DIR)/$*/include/libxml/xmlversion.h $(BUILD_DIR)/libxml2/Makefile: EXTRA_CONFIGURE_ARGS = --without-python \ --disable-shared --with-pic --libdir=$(PREFIX)/lib $(BUILD_DIR)/libxslt/Makefile: EXTRA_CONFIGURE_ARGS = --without-python --without-crypto \ --disable-shared --with-pic --libdir=$(PREFIX)/lib \ --with-libxml-src=$(BUILD_DIR)/libxml2 libxslt: EXTRA_MAKE_ARGS = "LIBXML_CFLAGS=-I$(BUILD_DIR)/libxml2/include \ -I$(SRC_DIR)/libxml2/include" libxslt: POST_MAKE = $(MAKE) docbook-xsl xsltsl update/libxml2 update/libxslt: URL = http://xmlsoft.org/sources/ update/libxml2 update/libxslt: CVS_SERVER = anoncvs.gnome.org:/cvs/gnome $(cvs:%=%/libxml2): EXTRA_DIFF_ARGS = -x xmlversion.h update/docbook-xsl: URL = http://osdn.dl.sourceforge.net/sourceforge/docbook/ ### tdom ### $(cvs:%=%/tdom): POST_CVS = ln -fs $*/extensions/{tnc,tdomhtml} $(SRC_DIR) $(cvs:%=%/tdom): PATCH_EXCL_CONFDIR = |extensions\/tnc tdom: PRE_MAKE = ln -fs $(SRC_DIR)/$*/unix/*.c $(BUILD_DIR)/$* tdom: EXTRA_MAKE_ARGS = CPPFLAGS="-DXMLCALL=''" tdom: POST_MAKE = $(MAKE) tnc tdomhtml tdom: POST_INSTALL += && $(call fix_stub_config,tdom) && \ rm -f ./$(PREFIX)/bin/tcldomsh && \ rmdir -p ./$(PREFIX)/bin 2>&- || true && \ $(MAKE) -C $(CURDIR) install/tnc install/tdomhtml $(dest:%=%/tdom): NAME = tDOM $(dest:%=%/tdom): HOMEPAGE = http://www.tdom.org/ install/tdom: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/*.{html,css} install/tdom: DEMOS = $(SRC_DIR)/$*/apps/ $(dest:%=%/tdom): DOCIDX = index.html update/tdom: CVS_SERVER = cvs.tdom.org:/usr/local/pubcvs $(BUILD_DIR)/tnc/Makefile: EXTRA_CONFIGURE_ARGS = \ --with-tdom=$(BUILD_DIR)/tdom ### tix ### tix: POST_MAKE = if [ ! -d $(BUILD_DIR)/$*/man/html ]\; then \ mkdir -p $(BUILD_DIR)/$*/man/html && \ (cd $(SRC_DIR)/$*/man && $(TCLSH) ../tools/tix-man2html.tcl \ --htmldir=$(BUILD_DIR)/$*/man/html --srcdir=../.. && $(TCLSH) \ ../tools/man2html-fixindex.tcl $(BUILD_DIR)/$*/man/html && \ $(DO_RSYNC) index.html $(BUILD_DIR)/$*/man) \; fi $(dest:%=%/tix): README = $(SRC_DIR)/$*/ABOUT.html install/tix: DOCS = $(DOCS) $(SRC_DIR)/$*/{ChangeLog,*.html,docs} $(BUILD_DIR)/$*/man install/tix: MAN_DOCS = $(SRC_DIR)/$*/man/*.n install/tix: DEMOS = $(SRC_DIR)/$*/demos/ $(dest:%=%/tix): DOCIDX = index.html ### tktreectrl ### $(cvs:%=%/tktreectrl): POST_CVS = ln -f $(SRC_DIR)/$*/configure.ac $(SRC_DIR)/$*/configure.in && \ touch $(SRC_DIR)/$*/configure.ac $(dest:%=%/tktreectrl): NAME = Treectrl $(dest:%=%/tktreectrl): README = $(SRC_DIR)/$*/doc/treectrl.html install/tktreectrl: MAN_DOCS = $(SRC_DIR)/$*/doc/*.n install/tktreectrl: DEMOS = $(SRC_DIR)/$*/demos/ $(dest:%=%/tktreectrl): DOCIDX = treectrl.html $(dest:%=%/tktreectrl): WIKI = TkTreeCtrl ### tclpro ### tclcompiler: EXTRA_MAKE_ARGS = CPPFLAGS='-I$(SRC_DIR)/$* -I$(SRC_DIR)/tbcload' $(dest:%=%/tclcompiler): NAME = Compiler $(dest:%=%/tclcompiler): WIKI = TclPro $(dest:%=%/tclparser): NAME = Parser install/tclparser: DOCTOOL_DOCS_DIR = $(SRC_DIR)/$*/doc $(dest:%=%/tclparser): DOCIDX = parse.html $(dest:%=%/tclparser): WIKI = TclPro $(foreach t,$(tclpro),$(dest:%=%/$(t))): HOMEPAGE = http://tclpro.sourceforge.net/ $(tclpro:%=update/%) update/config: CVS_PROJ = tclpro ### ffidl ### ## ffidl fflib configuration: choose one: (ffcall is GPL!) ffidl-fflib := libffi #ffidl-fflib := ffcall $(cvs:%=%/ffidl): POST_CVS = ln -fsh ../../$(ffidl-fflib) $(SRC_DIR)/$*/lib-src && \ ln -fs GNUmakefile.in $(SRC_DIR)/$*/Makefile.in $(SRC_DIR)/ffidl/configure: AUTOCONF=autoconf-2.59b $(SRC_DIR)/ffidl/configure: PRE_AUTOCONF = cd $(SRC_DIR)/$* && rm -rf autom4te.cache && \ export AUTOCONF=autoconf-2.59b AUTOM4TE=autom4te-2.59b && autoheader-2.59b $(BUILD_DIR)/ffidl/Makefile: PRE_CONFIGURE = $(MAKE) $(ffidl-fflib) $(BUILD_DIR)/ffidl/Makefile: POST_CONFIGURE = ln -fsh ../$(ffidl-fflib) $(BUILD_DIR)/$* && \ ln -fs GNUmakefile $(BUILD_DIR)/$*/Makefile $(BUILD_DIR)/ffidl/Makefile: EXTRA_CONFIGURE_ARGS = --enable-$(ffidl-fflib) --disable-test ffidl: POST_INSTALL += && $(DO_STRIP_INSTALL_DYLIB) "./$(LIBDIR)/Ffidl"*/*.dylib install/ffidl: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/ install/ffidl: DEMOS = $(SRC_DIR)/$*/demos/*.tcl $(dest:%=%/ffidl): DOCIDX = ffidl.html $(dest:%=%/ffidl): HOMEPAGE = http://elf.org/ffidl/ update/ffidl: URL = http://rutherglen.ics.mq.edu.au/~steffen/tcltk/$*/ $(cvs:%=%/ffidl): EXTRA_DIFF_ARGS = -x Makefile.in -x lib-src fflibs := libffi ffcall $(cvs:%=%/libffi): POST_CVS = ln -f $(SRC_DIR)/$*/configure.ac $(SRC_DIR)/$*/configure.in && \ touch $(SRC_DIR)/$*/configure.ac && chmod +x $(SRC_DIR)/$*/ltconfig $(SRC_DIR)/libffi/configure: PRE_AUTOCONF = cd $(SRC_DIR)/$* && \ if [ -n "$$(which aclocal-1.9.3)" -a -n "$$(which automake-1.9.3)" ]\; then \ rm -rf autom4te.cache && export AUTOCONF=autoconf-2.59 AUTOM4TE=autom4te-2.59 && \ aclocal-1.9.3 -I . && automake-1.9.3 && autoheader-2.59\; fi $(fflibs:%=$(BUILD_DIR)/%/Makefile): EXTRA_CONFIGURE_ARGS = \ --disable-shared --with-pic --libdir=$(PREFIX)/lib $(BUILD_DIR)/ffcall/Makefile: PRE_CONFIGURE = defaults read com.apple.CrashReporter DialogType \ > /tmp/crashreporter_setting && defaults write com.apple.CrashReporter DialogType none $(BUILD_DIR)/ffcall/Makefile: POST_CONFIGURE = defaults write com.apple.CrashReporter DialogType \ $$(cat /tmp/crashreporter_setting) && rm -f /tmp/crashreporter_setting ffcall: EXTRA_MAKE_ARGS = -j1 update/libffi: CVS_SERVER = savannah.gnu.org:/cvsroot/gcc update/libffi: CVS_USER = :ext:anoncvs update/libffi: CVS_CO = gcc/libffi update/ffcall: URL = http://www.haible.de/bruno/gnu/ ### Launcher ### Launcher: MAKE_ENV += CC=$$(which gcc) Launcher: PRE_MAKE = if [ -d $(BUILD_DIR)/$* ]\; then chmod -R u+w $(BUILD_DIR)/$*\; fi $(dest:%=%/Launcher): VERSION = $$(awk '/CFBundleVersion/ {getline\; split($$0,a,"<[^>]*>")\; print a[2]}' \ $(SRC_DIR)/$*/$*.pbproj/project.pbxproj) package/Launcher: EXTRA_PACKAGE_ARGS += -a $(pkg:%=%/Launcher): ARCHIVE_DIR = /Applications/Utilities update/Launcher: URL = http://rutherglen.ics.mq.edu.au/~steffen/tcltk/$*/ $(dest:%=%/Launcher): HOMEPAGE = http://www.maths.mq.edu.au/~steffen/tcltk/Launcher/ $(dest:%=%/Launcher): WIKI = $(dest:%=%/Launcher): README_INSTALLED = /Applications/Utilities/Launcher.app/Contents/Resources/Readme.rtf ### equi4 ### $(equi4:%=update/%): CVS_SERVER = equi4.com:/home/cvs EQUI4 = http://www.equi4.com ### metakit ### $(BUILD_DIR)/metakit/Makefile: EXTRA_CONFIGURE_ARGS = \ --with-tcl=$(BUILD_DIR)/tcl/Tcl.framework/Headers,$(LIBDIR) metakit: EXTRA_MAKE_ARGS = libmk4.a tcl metakit: POST_MAKE = $(MAKE) oomk install/metakit: action:=install-tcl install/metakit: POST_INSTALL += && $(MAKE) -C $(CURDIR) install/oomk && \ $(DO_STRIP_INSTALL_DYLIB) "./$(LIBDIR)/Mk4tcl"/*.dylib install/metakit: DOCS = $(DOCS) $(SRC_DIR)/$*/{Metakit.html,CHANGES,WHATSNEW,doc} install/metakit: EXTRA_INSTALL_DOCS_ARGS = --exclude=api/ --exclude=python.* install/metakit: DEMOS = $(SRC_DIR)/$*/examples/ install/metakit: EXTRA_INSTALL_DEMOS_ARGS = --exclude=*.py --exclude=*.cpp $(dest:%=%/metakit): NAME = Mk4Tcl $(dest:%=%/metakit): HOMEPAGE = $(EQUI4)/metakit/tcl.html $(dest:%=%/metakit): DOCIDX = Metakit.html $(dest:%=%/metakit): WIKI = Metakit ### oomk ### $(dest:%=%/oomk): VERSION = $$(awk '/package ifneeded/ {print $$4}' $(SRC_DIR)/$*/lib/$*/pkgIndex.tcl) $(dest:%=%/oomk): LICENSE = $(dest:%=%/oomk): HOMEPAGE = $(EQUI4)/oomk.html install/oomk: DOCS = $(SRC_DIR)/$*/{README,lib/app-$*/$*.txt} install/oomk: DEMOS = $(SRC_DIR)/$*/lib/app-$*/example.tcl update/oomk: URL = $(EQUI4)/pub/sk/ update/oomk: DL_EXT = kit ### critcl ### install/critcl: POST_INSTALL += && mkdir -p "./$(LIBDIR)" && \ $(DO_RSYNC) --delete $(SRC_DIR)/$*/lib/$* "./$(LIBDIR)/" ### critlib ### install-embedded/critlib: POST_INSTALL += && rm -f ./$(PREFIX)/$*/*README* $(dest:%=%/critlib): VERSION = $$(awk '/Last updated on/ {gsub("/","-",$$5)\; print substr($$5,1,10)}' \ $(SRC_DIR)/$*/README.html) $(dest:%=%/critlib): NAME = CritLib $(dest:%=%/critlib): README = $(SRC_DIR)/$*/README.html $(dest:%=%/critlib): HOMEPAGE = $(EQUI4)/critlib/ install/critlib: INSTALL_DOCS = $(INSTALL_DOCS) && (cd $(SRC_DIR)/$* && for f in $$(ls lib)\; \ { $(DO_RSYNC) "$${f}.README" "$(INSTALL_ROOT)$(DOCDIR)/$(NAME)"\; } ) $(dest:%=%/critlib): WIKI = $(cvs:%=%/critlib): EXTRA_DIFF_ARGS = -x lib -x "critcl*" -x cblas -x rhtml_c -x xre_c update/critlib: URL = $(EQUI4)/$*/ ### carboncritlib ### $(dest:%=%/carboncritlib): VERSION = $$(awk '/^- das / {print $$3}' $(SRC_DIR)/$*/README.txt) $(dest:%=%/carboncritlib): NAME = CarbonCritLib $(dest:%=%/carboncritlib) update/carboncritlib: HOMEPAGE = http://rutherglen.ics.mq.edu.au/~steffen/tcltk/$*/ install/carboncritlib: INSTALL_DOCS = $(INSTALL_DOCS) && (cd $(INSTALL_ROOT)$(DOCDIR)/$(NAME) && \ ln -fs ../$(call min_rel_path,$(LIBDIR),$(DOCDIR))/$*/*.tcl .) $(cvs:%=%/carboncritlib): EXTRA_DIFF_ARGS = -x lib update/carboncritlib: URL = $(HOMEPAGE) ### tclkit & tclkit-X11 ### tclkit: TCLKIT_AQUA := 1 tclkit-X11: TCLKIT_AQUA := 0 tclkit tclkit-X11: TCLKIT_VERSION ?= 001 tclkit: POST_MAKE = $(MAKE) tclkit-X11 starkit install/tclkit: POST_INSTALL += && $(MAKE) -C $(CURDIR) $(action)/tclkit-X11 $(action)/starkit $(cvs:%=%/tclkit): POST_CVS = cd $(SRC_DIR)/$* && \ $(call url_get,$(EQUI4)/pub/tk/tars/runtime.kit) && \ $(call url_get,$(EQUI4)/pub/tk/tars/zlib.tar.gz) && \ $(call url_get,$(EQUI4)/pub/tk/8.4.9/tclkit-darwin-ppc.gz) $(dest:%=%/tclkit): VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(BUILD_DIR)/$*/src/tcl/generic/tcl.h\ ) $$(awk '{print $$3}' $(BUILD_DIR)/$*/tars/runtime.vfs/config.tcl) $(dest:%=%/tclkit): HOMEPAGE = $(EQUI4)/tclkit/ install/tclkit: INSTALL_DEMOS = $(INSTALL_DEMOS) && mkdir -p $(INSTALL_ROOT)$(DEMODIR)/$(NAME) && \ for f in $(starkit)\; do ln -fhs ../$(call min_rel_path,$(PREFIX)/bin,$(DEMODIR))/$$f \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME)/$$f.kit\; done archive/tclkit: ARCHIVE_DIR = $(PREFIX)/bin archive/tclkit: DONT_ARCHIVE = $(starkit) archive/tclkit: NAME = tclkit-darwin-ppc archive/tclkit: README = archive/tclkit: LICENSE = archive/tclkit: HOMEPAGE = archive/tclkit: VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(BUILD_DIR)/$*/src/tcl/generic/tcl.h) tclkit-X11: POST_MAKE = true $(cvs:%=%/tclkit-X11): PRE_CVS = ln -fsh tclkit $(SRC_DIR)/$* $(dest:%=%/tclkit-X11): VERSION = $(dest:%=%/tclkit-X11): README = $(dest:%=%/tclkit-X11): LICENSE = $(dest:%=%/tclkit-X11): HOMEPAGE = ### wishkit ### wishkit $(actions:%=%/wishkit): TARGET_BUILD_DIR = $(BUILD_DIR)/tk wishkit: EXTRA_MAKE_ARGS = INSTALL_ROOT=$(INSTALL_ROOT)/$(LIBDIR)/tmp/ wishkit: POST_INSTALL += && cd ./$(LIBDIR) && rm -rf Wishkit.app && chmod -R u+w tmp && \ mv -f tmp/Wish.app Wishkit.app && rmdir -p tmp && cd Wishkit.app/Contents && \ mv -f MacOS/Wish MacOS/Wishkit && \ awk 's==1 {sub("Wish","Wishkit")\; s=0}\; /CFBundleExecutable|CFBundleName/ {s=1}\; {print}' \ Info.plist > Info.plist.1 && mv -f Info.plist.1 Info.plist && \ (cd Frameworks/Tcl.framework/Resources/Scripts && mv init.tcl realinit.tcl && \ echo 'if {![interp issafe]} {set d [file dirname [file dirname [info nameofexecutable]]]\; \ set tcl_pkgPath [concat [lsearch -all -inline $$tcl_pkgPath [file join $$d *]] \ [list [file join $$d Frameworks]]]\; unset d}\; source [file join $$tcl_library realinit.tcl]' > init.tcl) && \ rm -rf lib/{docs,demos,oomk*,itk*,itcl*/libitclstub*,Memchan*/libMemchanstub*,Trf*/libTrfstub*,vfs*/{{ftp,http,tar,tclproc,test,webdav}vfs.tcl,vfsUrl.tcl}} \ Frameworks/Tcl.framework/{Resources/Scripts/{http1.0,ldAix,tclAppInit.c},{,Versions/Current/}{Headers,PrivateHeaders,libtclstub*,tclConfig.sh}} \ Frameworks/Tk.framework/{Resources/Scripts/{demos,images},{,Versions/Current/}{Headers,PrivateHeaders,libtkstub*,tkConfig.sh}} \ $$(ls Frameworks/Tcl.framework/Resources/Scripts/encoding/*.enc | \ egrep -v '/(ascii|cp1252|iso8859-(1|2|15)|macRoman)\.enc$$') && \ (cd lib/vfs* && egrep -v '(ftp|http|tar|tclproc|test|webdav|tk)vfs.tcl|vfsUrl.tcl' \ pkgIndex.tcl > pkgIndex.tcl.1 && mv -f pkgIndex.tcl.1 pkgIndex.tcl) && \ cd ../../../.. && mkdir -p ./$(PREFIX)/bin && cd ./$(PREFIX)/bin && \ printf '\#!/bin/sh\n"$$(dirname $$0)/' > wishkit && \ printf "$(call min_rel_path,$(LIBDIR),$(PREFIX)/bin)" >> wishkit && \ printf '/Wishkit.app/Contents/MacOS/Wishkit" "$$@"\n' >> wishkit && \ chmod +x wishkit && cd ../../.. $(dest:%=%/wishkit): VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(SRC_DIR)/tcl/generic/tcl.h) $(dest:%=%/wishkit): README = $(SRC_DIR)/tk/macosx/README $(dest:%=%/wishkit): LICENSE = $(SRC_DIR)/tk/license.terms $(dest:%=%/wishkit): WIKI = $(dest:%=%/wishkit): HOMEPAGE = $(EQUI4)/tclkit/ package/wishkit: EXTRA_PACKAGE_ARGS += -a archive/wishkit: ARCHIVE_DIR = $(LIBDIR)/Wishkit.app archive/wishkit: NAME = Wishkit.app archive/wishkit: README = archive/wishkit: LICENSE = archive/wishkit: HOMEPAGE = ### standalone ### standalone $(actions:%=%/standalone): TARGET_BUILD_DIR = $(BUILD_DIR)/tk install/standalone destroot/standalone: INSTALL_ROOT = $(INSTALL_ROOT_EMBEDDED) install/standalone: POST_INSTALL += && cd Wish.app/Contents/Frameworks && chmod -R u+w . && rm -rf \ Tcl.framework/{Resources/Scripts/{ldAix,tclAppInit.c},{,Versions/Current/}{Headers,PrivateHeaders,libtclstub*,tclConfig.sh}} \ Tk.framework/{Resources/Scripts/{demos,images},{,Versions/Current/}{Headers,PrivateHeaders,libtkstub*,tkConfig.sh}} && \ chmod -R u-w . && cd ../../.. $(dest:%=%/standalone): NAME = TclTkAquaStandalone $(dest:%=%/standalone): VERSION = $$(awk -F\" '/PATCH_LEVEL/ {print $$2}' $(SRC_DIR)/tcl/generic/tcl.h) $(dest:%=%/standalone): README = $(SRC_DIR)/tk/macosx/README $(dest:%=%/standalone): LICENSE = $(SRC_DIR)/tk/license.terms archive/standalone: ARCHIVE_DIR = / ### starkit ### $(starkit:%=update/%): URL = $(EQUI4)/pub/sk/ $(starkit:%=update/%): DL_EXT = kit $(foreach t,$(starkit),$(dest:%=%/$(t))): VERSION = $(foreach t,$(starkit),$(dest:%=%/$(t))): README = $(foreach t,$(starkit),$(dest:%=%/$(t))): LICENSE = $(foreach t,$(starkit),$(dest:%=%/$(t))): HOMEPAGE = ### e4graph ### $(SRC_DIR)/e4graph/all/configure: AUTOCONF=autoconf-2.52 $(BUILD_DIR)/e4graph/all/makefile.include: PRE_CONFIGURE = $(MAKE) expat \; $(MAKE) metakit \; \ $(DO_RSYNC) $(SRC_DIR)/$*/ $(BUILD_DIR)/$*/ $(BUILD_DIR)/e4graph/all/makefile.include: EXTRA_CONFIGURE_ARGS = \ --enable-tcl --enable-xml \ --with-metakit=$(SRC_DIR)/metakit --with-expat=$(BUILD_DIR)/expat e4graph: PRE_MAKE = $(DO_RSYNC) $(SRC_DIR)/$*/ $(BUILD_DIR)/$*/ \;\ ln -fs .libs/libexpat.a $(BUILD_DIR)/expat e4graph: EXTRA_MAKE_ARGS = METAKIT_LIB+='$(BUILD_DIR)/metakit' \ EXPAT_LIB+='$(BUILD_DIR)/expat' install/e4graph: EXTRA_INSTALL_ARGS = libdir=$(INSTALL_ROOT)$(LIBDIR)/e4graph TCL_PKG=$(INSTALL_ROOT)$(LIBDIR) e4graph: POST_INSTALL += && rm -f ./$(PREFIX)/bin/testcore{,s} ./$(LIBDIR)/$*/libe4graphs.a && \ $(call fix_pkgIndex,tgraph,sed 's/loadIfNotTcl843 \([^ ]*\)\]/loadIfNotTcl843 [file join $$$$dir \1]]/') && \ cd ./$(LIBDIR) && g=$$(ls -d tgraph*) && mv -f $*/* ./$${g}/ && rmdir -p $* && \ t=$(LIBDIR)/$${g} && cd ./$${g} && \ $(call fix_install_id,e4graph,$$$${t}) && \ $(call fix_install_id,e4xml,$$$${t}) && \ $(call fix_install_id,tgraph,$$$${t}) && \ $(call fix_install_id,txml,$$$${t}) && \ $(call fix_install_name,e4xml,e4graph,$$$${t}) && \ $(call fix_install_name,tgraph,e4graph,$$$${t}) && \ $(call fix_install_name,txml,e4graph,$$$${t}) && \ $(call fix_install_name,txml,tgraph,$$$${t}) && \ $(call fix_install_name,txml,e4xml,$$$${t}) && \ $(DO_STRIP_INSTALL_DYLIB) *.dylib.0.0.0 && \ cd ../../.. $(dest:%=%/e4graph): VERSION = $$(awk -F= '/^VERSION[ \t]*=/ {print $$2}' $(SRC_DIR)/$*/all/configure.in) $(dest:%=%/e4graph): README = $(SRC_DIR)/$*/readme.html $(dest:%=%/e4graph): NAME = e4Graph install/e4graph: DOCS = $(DOCS) $(SRC_DIR)/$*/docs install/e4graph: EXTRA_INSTALL_DOCS_ARGS = --exclude=java/ install/e4graph: DEMOS = $(SRC_DIR)/$*/tged $(dest:%=%/e4graph): DOCIDX = docs/index.html $(cvs:%=%/e4graph): PATCH_EXCL_CONFDIR = |all ### expat ### $(SRC_DIR)/expat/configure: PRE_AUTOCONF = cd $(SRC_DIR)/$* && export AUTOCONF=$(AUTOCONF) && ./buildconf.sh expat: POST_MAKE = rm -f $(BUILD_DIR)/$*/include \; \ ln -fhs $(SRC_DIR)/$*/lib $(BUILD_DIR)/$*/include ### xotcl ### xotcl: POST_INSTALL += && $(call fix_stub_config,xotcl) && \ $(DO_STRIP_INSTALL_DYLIB) "./$(LIBDIR)/$*"*/*.{a,dylib} && \ rm -f "./$(LIBDIR)/lib$*"*.dylib && ln -fs \ $(call min_rel_path,$(LIBDIR),$(PREFIX)/bin)/$$(basename $$(ls -d \ $(INSTALL_ROOT)$(LIBDIR)/$**))/apps/utils/{xotclsh,xowish} \ $(INSTALL_ROOT)$(PREFIX)/bin update/xotcl: URL = http://media.wu-wien.ac.at/download/ $(dest:%=%/xotcl): NAME = XOTcl $(dest:%=%/xotcl): LICENSE = $(SRC_DIR)/$*/COPYRIGHT $(dest:%=%/xotcl): VERSION = $$(awk -F, '/^define\(XOTclVersion/ {gsub("[^0-9.]","",$$2)\; print $$2}' \ $(SRC_DIR)/$*/configure.in) $(dest:%=%/xotcl): HOMEPAGE = http://www.xotcl.org/ install/xotcl: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/ $(BUILD_DIR)/$*/doc/ install/xotcl: EXTRA_INSTALL_DOCS_ARGS = --exclude=*tcl install/xotcl: INSTALL_DOCS = $(INSTALL_DOCS) && \ p="$(call min_rel_path,$(LIBDIR),$(DOCDIR)/$(NAME))/$$(basename $$(ls -d $(INSTALL_ROOT)$(LIBDIR)/$**))" && \ ln -fsh "$${p}/apps" $(INSTALL_ROOT)$(DOCDIR)/$(NAME) && \ ln -fsh "$${p}" $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/library install/xotcl: INSTALL_DEMOS = ln -fhs \ $(call min_rel_path,$(LIBDIR),$(DEMODIR))/$$(basename $$(ls -d $(INSTALL_ROOT)$(LIBDIR)/$**))/apps \ $(INSTALL_ROOT)$(DEMODIR)/$(NAME) $(dest:%=%/xotcl): DOCIDX = index.html ### swig ### $(SRC_DIR)/swig/configure: PRE_AUTOCONF = cd $(SRC_DIR)/$* && \ mkdir -p Tools/config && \ export LIBTOOL=libtool-1.5.14 AUTOCONF=autoconf-2.59 AUTOM4TE=autom4te-2.59 && \ aclocal-1.9 -I Tools/config && autoheader-2.59 && \ libtoolize-1.5.14 --force --copy && \ automake-1.9 --add-missing --copy --force-missing $(BUILD_DIR)/swig/Makefile: EXTRA_CONFIGURE_ARGS = --libdir=$(PREFIX)/lib \ --with-tclconfig=$(BUILD_DIR)/tcl/Tcl.framework \ --without-guile --without-php4 --without-ocaml \ --without-pike --without-chicken --without-cil-interpreter \ --without-csharp-compiler $(if $(wildcard /usr/lib/python2.2),--without-python) # --without-perl5 --without-ruby --without-java --without-javac swig: EXTRA_MAKE_ARGS = CPPFLAGS=-DOS_INLINE= CFLAGS=-Os CXXFLAGS=-Os swig: POST_INSTALL += && $(DO_STRIP_INSTALL_EXE) "./$(PREFIX)/bin"/$* && \ cd "./$(LIBDIR)/share"/$*/* && \ rm -rf chicken csharp guile mzscheme ocaml \ php4 pike modula3 allegrocl && \ cd ../../../.. # perl5 python ruby java install/swig: DOCS = $(DOCS) $(SRC_DIR)/$*/Doc/Manual install/swig: EXTRA_INSTALL_DOCS_ARGS = --exclude=Manual/README --exclude=*.py install/swig: DEMOS = $(BUILD_DIR)/$*/Examples/ $(SRC_DIR)/$*/Examples/ install/swig: EXTRA_INSTALL_DEMOS_ARGS = $(patsubst %,--exclude=%,\ ?hicken/ contract/ csharp/ ?uile/ modula3/ mzscheme/ ?caml/ ?hp4/ \ ?ike/ s-exp/ test-suite/ xml/ Common-Lisp/ Makefile.in check.list) update/swig: CVS_CO = SWIG $(dest:%=%/swig): NAME = SWIG $(dest:%=%/swig): VERSION = $$(awk -F, '/^AC_INIT/ {gsub("[^0-9.]","",$$2)\; print $$2}' \ $(SRC_DIR)/$*/configure.in) $(dest:%=%/swig): HOMEPAGE = http://www.swig.org/ $(dest:%=%/swig): DOCIDX = Manual/index.html $(cvs:%=%/swig): PATCH_EXCL = |Tools\/config\/config\.(guess|sub) ### sqlite & sqlite3 ### sqlite: action = $*.h libtcl$*.la doc sqlite3: action = all doc sqlite: EXTRA_MAKE_ARGS = TCL_FLAGS='-DUSE_TCL_STUBS -I$(BUILD_DIR)/tcl/Tcl.framework/Headers' \ LIBTCL='$(shell source "$(BUILD_DIR)/tcl/Tcl.framework/tclConfig.sh" && eval echo $${TCL_STUB_LIB_SPEC})' sqlite sqlite3: POST_INSTALL += && mkdir -p "./$(LIBDIR)/$*" && \ $(DO_RSYNC) --delete "$(BUILD_DIR)/$*/.libs/libtcl$*"*.dylib "./$(LIBDIR)/$*" && \ $(DO_STRIP_INSTALL_DYLIB) $$($(FIND) ./$(LIBDIR)/$* -name 'libtcl$**.dylib' -type f) && cd ./$(LIBDIR)/$* && \ echo 'load libtcl$*.dylib $*\; puts [open pkgIndex.tcl w] "package ifneeded $* [package provide $*] \[list load \[file join \$$dir libtcl$*.dylib\] $*\]"' \ | $(TCLSH) \; $(dest:%=%/sqlite): NAME = TclSQLite $(dest:%=%/sqlite3): NAME = TclSQLite3 $(dest:%=%/sqlite) $(dest:%=%/sqlite3): VERSION = $$(cat $(SRC_DIR)/$*/VERSION) $(dest:%=%/sqlite) $(dest:%=%/sqlite3): README = $(BUILD_DIR)/$*/doc/index.html $(dest:%=%/sqlite) $(dest:%=%/sqlite3): LICENSE = $(SRC_DIR)/$*/copyright.html $(dest:%=%/sqlite) $(dest:%=%/sqlite3): HOMEPAGE = http://www.sqlite.org/ $(dest:%=%/sqlite) $(dest:%=%/sqlite3): WIKI = SQLite install/sqlite install/sqlite3: DOCS = $(DOCS) $(BUILD_DIR)/$*/doc/ install/sqlite install/sqlite3: EXTRA_INSTALL_DOCS_ARGS = --exclude=arch.png --exclude=copyright-release.pdf $(dest:%=%/sqlite) $(dest:%=%/sqlite3): DOCIDX = index.html update/sqlite update/sqlite3: CVS_SERVER = www.sqlite.org:/sqlite update/sqlite3: CVS_CO = sqlite ### tcljava ### $(cvs:%=%/tcljava): POST_CVS = touch $(SRC_DIR)/$*/configure.in $(BUILD_DIR)/tcljava/Makefile: EXTRA_CONFIGURE_ARGS = --with-tcl=$(BUILD_DIR)/tcl/Deployment \ --with-thread=$(BUILD_DIR)/thread --with-jdk=/Library/Java/Home #--enable-tclblend --enable-jacl tcljava: EXTRA_MAKE_ARGS = TCLJAVA=tclblend tclblend.check tcljava: POST_MAKE = $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$* $(action) $(INSTALL_ARGS) \ TCLJAVA=jacl jacl.check && if [ $(SRC_DIR)/$*/demos -nt $(BUILD_DIR)/$*/bdemos ]\; \ then $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$* TCLJAVA=jacl demos\; fi $(dest:%=%/tcljava): NAME = TclJava $(dest:%=%/tcljava): VERSION = $$(awk -F= '/^TCLJAVA_VERSION[ \t]*=/ {print $$2}' $(SRC_DIR)/$*/configure.in) $(dest:%=%/tcljava): README = $(SRC_DIR)/$*/docs/website/index.html $(dest:%=%/tcljava): LICENSE = $(SRC_DIR)/$*/docs/license.html install/tcljava: INSTALL_DOCS = $(INSTALL_DOCS) && \ $(DO_RSYNC) --delete --exclude=/website --exclude=/contents.html \ $(SRC_DIR)/$*/docs/ $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/manual install/tcljava: DOCS = $(DOCS) $(SRC_DIR)/$*/docs/website/ install/tcljava: DEMOS = $(BUILD_DIR)/$*/bdemos/ $(dest:%=%/tcljava): DOCIDX = index.html ### tcludp ### $(BUILD_DIR)/tcludp/Makefile: CONFIGURE_ENV = PATH="$(SRC_DIR)/tcllib/apps:$${PATH}" $(dest:%=%/tcludp): NAME = TclUDP install/tcludp: DEMOS = $(SRC_DIR)/$*/demos/ install/tcludp: DOCTOOL_DOCS_DIR = $(SRC_DIR)/$*/doc install/tcludp: INSTALL_DOCS = $(INSTALL_DOCS) && \ $(DO_RSYNC) --delete $(SRC_DIR)/$*/doc/*.css $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/ && \ for f in $(INSTALL_ROOT)$(DOCDIR)/$(NAME)/*.html\; do\ sed -e 's|||' \ $$f > $$f.1 && mv -f $$f.1 $$f \; done ### TclCurl & curl ### $(BUILD_DIR)/TclCurl/Makefile: PRE_CONFIGURE = $(MAKE) curl $(BUILD_DIR)/TclCurl/Makefile: EXTRA_CONFIGURE_ARGS = --with-curlprefix=$(BUILD_DIR)/curl \ --with-curlinclude=$(SRC_DIR)/curl/include \ --with-libcurl=$(BUILD_DIR)/curl/lib/.libs install/TclCurl: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/*.html $(dest:%=%/TclCurl): HOMEPAGE = http://personal1.iddeo.es/andresgarci/tclcurl/english/ update/TclCurl: URL = http://personal1.iddeo.es/andresgarci/tclcurl/download/tarball/ $(BUILD_DIR)/curl/Makefile: EXTRA_CONFIGURE_ARGS = --with-ssl --enable-ipv6 \ --disable-shared --with-pic curl: POST_MAKE += ln -fsh src $(BUILD_DIR)/$*/bin && \ ln -fs ../curl-config $(BUILD_DIR)/$*/src && \ chmod +x $(BUILD_DIR)/$*/curl-config update/curl: URL = http://curl.haxx.se/download/ ### blt ### $(BUILD_DIR)/blt/Makefile: EXTRA_CONFIGURE_ARGS = --exec-prefix=$(PREFIX) --enable-stubs \ --with-blt=$(LIBDIR) --with-tcllibs=$(BUILD_DIR)/tcl/Tcl.framework \ --with-tklibs=$(BUILD_DIR)/tk/Tk.framework \ --with-tclincls=$(BUILD_DIR)/tcl/Tcl.framework/Headers \ --with-tkincls=$(BUILD_DIR)/tk/Tk.framework/Headers blt: action = -C $(BUILD_DIR)/$*/src/shared $(PKG_LIB_FILE) blt: EXTRA_MAKE_ARGS = CFLAGS="-Os -fno-common" SO_SUFFIX=.dylib version=$(SHORT_VERSION) \ TCLLIBPATH=/Library/Frameworks/Tcl.framework/Resources/Scripts blt: SHORT_VERSION=$$(awk -F\" '/BLT_VERSION/ {print $$2}' $(SRC_DIR)/$*/src/blt.h) blt: VERS_NAME = BLTlite$(SHORT_VERSION) blt: PKG_LIB_FILE = lib$(VERS_NAME).dylib blt: BLTLITE = {BLT,bgexec,bltdebug,spline,tree,vector,watch} blt: POST_MAKE = $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$*/man MAN_N="$$(echo $(BLTLITE).n)" $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS) blt: POST_INSTALL += && mkdir -p "./$(LIBDIR)/$(VERS_NAME)" && \ $(DO_RSYNC) --delete "$(BUILD_DIR)/$*/src/shared/$(PKG_LIB_FILE)" "./$(LIBDIR)/$(VERS_NAME)" && \ $(DO_STRIP_INSTALL_DYLIB) "./$(LIBDIR)/$(VERS_NAME)/$(PKG_LIB_FILE)" && cd "./$(LIBDIR)/$(VERS_NAME)" && \ echo 'load' $(PKG_LIB_FILE) \ 'BLT\; puts [open pkgIndex.tcl w] "package ifneeded BLT [package provide BLT] \[list load \[file join \$$dir' \ $(PKG_LIB_FILE) '\] BLT\]"' | $(TCLSH) \; $(dest:%=%/blt): NAME = BLTlite $(dest:%=%/blt): VERSION = $$(awk -F\" '/BLT_PATCH_LEVEL/ {print $$2}' $(SRC_DIR)/$*/src/blt.h) $(dest:%=%/blt): WIKI = BLT $(dest:%=%/blt): DOCIDX = BLT.html install/blt: DOCS = $(DOCS) $(SRC_DIR)/$*/NEWS $(SRC_DIR)/$*/html/$(BLTLITE).html install/blt: MAN_DOCS = $(BUILD_DIR)/$*/man/*.n install/blt: INSTALL_DOCS = $(INSTALL_DOCS) && \ $(DO_RSYNC) --delete $(EXTRA_INSTALL_MAN_DOCS_ARGS) $(BUILD_DIR)/$*/man/*.3 $(INSTALL_ROOT)$(PREFIX)/man/man3/ ### tcldes ### update/tcldes: POST_CVS = ln -f $(CURDIR)/patches/AGuideToTclDES.pdf $(SRC_DIR)/$*/doc/ install/tcldes: COPY_INSTALL_SRC = source/ install/tcldes: DOCS = $(DOCS) $(SRC_DIR)/$*/doc/*.{html,pdf} install/tcldes: MAN_DOCS = $(SRC_DIR)/$*/doc/*.n $(dest:%=%/tcldes): NAME = TclDES $(dest:%=%/tcldes): VERSION = $$(awk '/package ifneeded tclDES / {print $$4}' $(SRC_DIR)/$*/source/pkgIndex.tcl) $(dest:%=%/tcldes): WIKI = DES%20in%20Tcl update/tcldes: CVS_CO = TclDES ### tcltutorial ### install/tcltutorial: COPY_INSTALL_SRC = html/*.html install/tcltutorial: COPY_INSTALL_DST = $(DOCDIR)/$(NAME) install/tcltutorial: DOCS = $(dest:%=%/tcltutorial): NAME = TclTutorial $(dest:%=%/tcltutorial): VERSION = $$($(FIND) $(SRC_DIR)/$* -name ChangeLog -exec \ awk 'FNR==1 {print $$1}' {} \\\; | sort -nr | head -1) $(dest:%=%/tcltutorial): README = $(SRC_DIR)/$*/html/Tcl0.html $(dest:%=%/tcltutorial): HOMEPAGE = http://www.msen.com/~clif/TclTutor.html $(dest:%=%/tcltutorial): WIKI = Tcl%20Tutor $(dest:%=%/tcltutorial): DOCIDX = $*.html ### embedded ### install-embedded/tk: POST_INSTALL_EMBEDDED = \ rm -rf Wish.app && \ mv Applications/Utilities/Wish.app . && rm -rf Applications/Utilities/Wish\ Shell.app && \ rmdir -p Applications/Utilities 2>&- || true $(ext:%=install-embedded/%): POST_INSTALL_EMBEDDED = chmod +w Wish.app/Contents && \ mkdir -p Wish.app/Contents/lib && for f in ./$(LIBDIR)/*\; \ { if echo $$(basename $$f) | egrep -q -v -e '^(bin|lib|include|man)$$'\; \ then rm -rf Wish.app/Contents/lib/$$(basename $$f) && \ mv -f $$f Wish.app/Contents/lib\; fi\; \ } && rm -rf usr Library #---------------------------------------------------------------------------------------- # project specific dependencies # (disabled for now, depend on order in projects list instead) #tk: tcl #tk-X11: tcl #iwidgets: incrTcl #trfcrypt: trf #$(ext): core install/core #---------------------------------------------------------------------------------------- # TEA config need_config := $(foreach conf,$(NEED_CONFIG),$(cvs:%=%/$(conf))) $(need_config): POST_CVS = rm -rf $(SRC_DIR)/$*/config \; ln -fs ../tclconfig $(SRC_DIR)/$*/config $(need_config): PRE_CVS = rm -rf $(SRC_DIR)/$*/config $(cvs:%=%/config): POST_CVS = $(call update_config,$(SRC_DIR)/$*) $(cvs:%=%/config): PRE_CVS = $(call restore_config,$(SRC_DIR)/$*) $(cvs:%=%/tclconfig): POST_CVS = $(call update_config,$(SRC_DIR)/$*) \; \ ln -fs ../config/{installFile.tcl,mkinstalldirs} $(SRC_DIR)/$* $(cvs:%=%/tclconfig): PRE_CVS = $(call restore_config,$(SRC_DIR)/$*) \; \ rm -f $(SRC_DIR)/$*/{installFile.tcl,mkinstalldirs} $(NEED_CONFIG:%=update/%): update/tclconfig update/tclconfig: update/config #---------------------------------------------------------------------------------------- # build rules ### core_macosx ### $(core_macosx): %: $(checkout) $(pre_install) $(pre_make) $(MAKE_ENV) $(MAKE) -C $(SRC_DIR)/$*/macosx $(action) $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS) $(post_make) $(post_install) $(core_macosx:%=$(SRC_DIR)/%/unix/configure.in): $(SRC_DIR)/%/unix/configure.in: $(checkout) $(core_macosx:%=$(SRC_DIR)/%/unix/configure): $(SRC_DIR)/%/unix/configure: $(SRC_DIR)/%/unix/configure.in $(SRC_DIR)/%/unix/tcl.m4 $(SRC_DIR)/%/unix/aclocal.m4 @( $(PRE_AUTOCONF) ) && cd $(SRC_DIR)/$*/unix && echo "*** $* $(AUTOCONF) ***" && $(DO_AUTOCONF) ### core_man ### $(core_man:%_man=$(BUILD_DIR)_man/%/Makefile): \ $(BUILD_DIR)_man/%/Makefile: $(SRC_DIR)/%/unix/configure mkdir -p $(BUILD_DIR)_man/$* && cd $(BUILD_DIR)_man/$* && \ $(SRC_DIR)/$*/unix/configure --prefix=$(PREFIX) --enable-threads \ $(EXTRA_CONFIGURE_ARGS) $(core_man): %_man: $(BUILD_DIR)_man/%/Makefile $(pre_install) $(pre_make) $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)_man/$* doc $(action) $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS) $(post_make) $(post_install) ### tea ### define tea_autoconf @ac=1 && [ -e "$(SRC_DIR)/$*$(1)/configure" ] && \ ac="$$($(FIND) -E -H $(SRC_DIR)/$*$(1) -regex '.*/(configure\.(in|ac)|[^/]*\.m4)' -newer $(SRC_DIR)/$*$(1)/configure)"; \ ([ -n "$${ac}" ] && ( $(PRE_AUTOCONF) ) && cd $(SRC_DIR)/$*$(1) && \ echo "*** $* $(AUTOCONF) ***" && $(DO_AUTOCONF)) || [ -z "$${ac}" ] endef define tea_configure $(call tea_configure2,$(1),) endef define tea_configure2 @echo "*** $* configure ***" +$(PRE_CONFIGURE) mkdir -p $(BUILD_DIR)/$*$(2) && cd $(BUILD_DIR)/$*$(2) && \ chmod +x $(SRC_DIR)/$*$(1)/configure && \ $(CONFIGURE_ENV) $(SRC_DIR)/$*$(1)/configure \ --prefix=$(PREFIX) --libdir=$(LIBDIR) \ --with-tcl=$(BUILD_DIR)/tcl/Tcl.framework \ --with-tclinclude=$(BUILD_DIR)/tcl/Tcl.framework/Headers \ --with-tk=$(BUILD_DIR)/tk/Tk.framework \ --with-tkinclude=$(BUILD_DIR)/tk/Tk.framework/Headers \ --enable-threads $(EXTRA_CONFIGURE_ARGS) +$(POST_CONFIGURE) endef $(tea:%=$(SRC_DIR)/%/configure.in): $(SRC_DIR)/%/configure.in: $(checkout) $(tea_unix:%=$(SRC_DIR)/%/unix/configure.in): $(SRC_DIR)/%/unix/configure.in: $(checkout) $(tea:%=$(SRC_DIR)/%/configure): $(SRC_DIR)/%/configure: $(SRC_DIR)/%/configure.in FORCE $(call tea_autoconf,) $(tea_unix:%=$(SRC_DIR)/%/unix/configure): $(SRC_DIR)/%/unix/configure: $(SRC_DIR)/%/unix/configure.in FORCE $(call tea_autoconf,/unix) $(tea:%=$(BUILD_DIR)/%/Makefile): $(BUILD_DIR)/%/Makefile: $(SRC_DIR)/%/configure #$(SRC_DIR)/%/Makefile.in $(call tea_configure,) $(tea_unix:%=$(BUILD_DIR)/%/Makefile): $(BUILD_DIR)/%/Makefile: $(SRC_DIR)/%/unix/configure #$(SRC_DIR)/%/Makefile.in $(call tea_configure,/unix) $(tea) $(tea_unix): %: $(BUILD_DIR)/%/Makefile $(pre_install) $(pre_make) $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$* $(action) $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS) $(post_make) $(post_install) ### pbx ### $(pbx): %: $(checkout) $(pre_install) $(pre_make) cd $(SRC_DIR)/$*/$(PROJ_DIR) && $(PBXBUILD) -buildstyle Deployment $(EXTRA_PBXBUILD_ARGS) $(action) \ SYMROOT=$(BUILD_DIR)/$* $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS) $(MAKEOVERRIDES) $(AFTER_OVERRIDES) $(post_make) $(post_install) ### e4graph ### $(SRC_DIR)/e4graph/all/configure.in: $(SRC_DIR)/%/all/configure.in: $(checkout) $(SRC_DIR)/e4graph/all/configure: $(SRC_DIR)/%/all/configure: $(SRC_DIR)/%/all/configure.in FORCE $(call tea_autoconf,/all) $(BUILD_DIR)/e4graph/all/makefile.include: $(BUILD_DIR)/%/all/makefile.include: $(SRC_DIR)/%/all/configure chmod +x $(SRC_DIR)/$*/all/configure $(call tea_configure2,/all,/all) e4graph: %: $(BUILD_DIR)/%/all/makefile.include $(pre_install) $(pre_make) $(MAKE_ENV) $(MAKE) -C $(BUILD_DIR)/$*/all $(action) $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS) $(post_make) $(post_install) ### oomk ### oomk: %: @if [ ! -e $(TCLKIT) ]; then \ d=$$(dirname $(TCLKIT)) && mkdir -p $$d && cd $$d && \ if [ -e $(SRC_DIR)/tclkit/tclkit-darwin-ppc.gz ]; then \ $(DO_RSYNC) $(SRC_DIR)/tclkit/tclkit-darwin-ppc.gz . ; else \ $(call url_get,$(EQUI4)/pub/tk/8.4.6/tclkit-darwin-ppc.gz); fi && \ zcat tclkit-darwin-ppc.gz > tclkit && chmod +x tclkit && \ rm -f tclkit-darwin-ppc.gz; fi $(checkout) $(pre_make) if [ -z "$(INSTALL_ARGS)" -o ! -e $(BUILD_DIR)/$* ]; then \ mkdir -p $(BUILD_DIR)/$* && cd $(BUILD_DIR) && \ $(DO_RSYNC) --delete $(SRC_DIR)/$*/ $*; \ fi $(post_make) install/oomk: install/%: $(pre_install) $(pre_make) INSTALL_PATH="$(LIBDIR)" && \ TO="$(INSTALL_ROOT)$${INSTALL_PATH}/$*$(VERSION)" && \ mkdir -p "$(INSTALL_ROOT)$${INSTALL_PATH}" && \ $(DO_RSYNC) --delete $(BUILD_DIR)/$*/lib/$*/ "$${TO}" $(post_make) $(post_install) ### Launcher ### Launcher: %: $(checkout) $(pre_install) $(pre_make) $(MAKE_ENV) $(MAKE) -C $(SRC_DIR)/$* $(action) $(INSTALL_ARGS) $(EXTRA_MAKE_ARGS) $(post_make) $(post_install) ### tclkit ### tclkit tclkit-X11: %: $(checkout) $(pre_make) @if [ -z "$(INSTALL_ARGS)" -o ! -e $(BUILD_DIR)/$*/tclkit ]; then \ if [ ! -d $(SRC_DIR)/sdx ]; then $(MAKE) update/sdx; fi && \ mkdir -p $(BUILD_DIR)/$* && cd $(BUILD_DIR)/$* && \ rm -rf src tars && mkdir -p src tars && cd src && \ ln -fs $(SRC_DIR)/{tcl,tk} . && ln -fs $(SRC_DIR)/incrTcl itcl && \ ln -fs $(SRC_DIR)/metakit mk && ln -fs $(SRC_DIR)/tclvfs vfs && \ ln -fs $(SRC_DIR)/$* kit && cd .. && ln -fs src/kit/genkit . && \ rm -f tclkit && zcat src/kit/tclkit-darwin-ppc.gz > tclkit && chmod +x tclkit && \ cd tars && ln -fs ../src/kit/*.tar.gz . && \ $(SDX) unwrap ../src/kit/runtime.kit && \ cd runtime.vfs && ln -fs ../../src/kit/kitsh.vfs/boot.tcl . && \ echo "set ::vfs::tclkit_version $$(date '+%Y%m').$(TCLKIT_VERSION)" > config.tcl && \ ln -fs ../../src/kit/src/tclkit.ico . && cd lib && \ cd vfs && for f in $$(ls); do \ if [ "$$f" != "pkgIndex.tcl" -a -e ../../../../src/vfs/library/$$f ]; then \ ln -fs ../../../../src/vfs/library/$$f .; \ awk "/$$f/ {system(\"sed -e \\\"s/\\\\\\(\"\$$2\" \"\$$3\" *\\\\\\)[^ ][^ ]* /\\\\1\"\$$4\" /\\\" \ pkgIndex.tcl > pkgIndex.tcl.new; mv -f pkgIndex.tcl.new pkgIndex.tcl\")}" \ ../../../../src/vfs/library/pkgIndex.tcl; fi; done && cd .. && \ cd itcl* && for f in $$(ls); do \ if [ "$$f" != "pkgIndex.tcl" -a -e ../../../../src/itcl/itcl/library/$$f ]; then \ ln -fs ../../../../src/itcl/itcl/library/$$f .; fi; done && cd .. && \ v=$$(grep "TCL_VERSION=" "../../../src/tcl/unix/configure.in" | cut -d '=' -f 2) && \ mv tcl*/encoding . && rm -r tcl* && mkdir tcl$$v && cd tcl$$v && \ for f in $$(ls ../../../../src/tcl/library); do \ if ! echo $$f | egrep -q '^CVS|dde|encoding|http1\.0|reg$$'; then \ if [ -d ../../../../src/tcl/library/$$f ]; then \ mkdir $$f && cd $$f && ln -fs ../../../../../src/tcl/library/$$f/* . && rm -f CVS && cd ..; \ else ln -fs ../../../../src/tcl/library/$$f .; fi; fi; done && \ mv ../encoding . && cd encoding && for f in $$(ls); do \ ln -fs ../../../../../src/tcl/library/encoding/$$f .; done && cd ../.. && \ mv tk*/pkgIndex.tcl . && rm -r tk* && mkdir tk$$v && cd tk$$v && \ for f in $$(ls ../../../../src/tk/library); do \ if ! echo $$f | egrep -q '^CVS|demos|images$$'; then \ if [ -d ../../../../src/tk/library/$$f ]; then \ mkdir $$f && cd $$f && ln -fs ../../../../../src/tk/library/$$f/* . && rm -f CVS && cd ..; \ else ln -fs ../../../../src/tk/library/$$f .; fi; fi; done && \ mv ../pkgIndex.tcl . && cd .. && \ cd ../.. && $(SDX) wrap runtime.kit && cd .. && export DESTDIR= TCLKIT_AQUA=$(TCLKIT_AQUA) && \ $(TCLSH) genkit A && $(TCLSH) genkit B tcl && sh genkit B && \ $(DO_STRIP_DESTROOT_DYLIB) install/*/lib/{,itcl*/}*.dylib && \ unset DISPLAY && sh genkit D && sh genkit E && \ ln -f tclkit-$${HOSTNAME} tclkit; \ cd $(CURDIR) && $(POST_MAKE); fi install/tclkit install/tclkit-X11: install/%: $(pre_install) mkdir -p "$(INSTALL_ROOT)$(PREFIX)/bin" && \ $(DO_RSYNC) $(BUILD_DIR)/$*/tclkit $(INSTALL_ROOT)$(PREFIX)/bin/$* $(post_install) ### critlib & carboncritlib ### critlib carboncritlib: %: $(checkout) $(pre_make) mkdir -p $(BUILD_DIR)/$* && \ rm -f $(SRC_DIR)/$*/lib && ln -fs $(BUILD_DIR)/$* $(SRC_DIR)/$*/lib $(MAKE_ENV) $(MAKE) -C $(SRC_DIR)/$* CRITCL="$(CRITCL)" $(EXTRA_MAKE_ARGS) $(post_make) install/critlib install/carboncritlib: install/%: $(pre_install) if [ -d $(SRC_DIR)/$*/lib ]; then if [ -n "$$(ls $(SRC_DIR)/$*/lib/)" ]; then \ mkdir -p "$(INSTALL_ROOT)$(LIBDIR)" && cd $(SRC_DIR)/$* && \ $(DO_RSYNC) --delete lib/ "$(INSTALL_ROOT)$(LIBDIR)/$(NAME)"; \ for f in $$(ls lib); { \ $(DO_RSYNC) "$${f}.tcl" "$(INSTALL_ROOT)$(LIBDIR)/$(NAME)"; \ }; \ echo "set auto_path [lappend auto_path \$$dir]" > \ "$(INSTALL_ROOT)$(LIBDIR)/$(NAME)/pkgIndex.tcl"; \ fi; fi $(post_install) ### starkit ### $(starkit): %: $(checkout) $(pre_make) @if [ -z "$(INSTALL_ARGS)" -o ! -e $(BUILD_DIR)/$*/$*.kit ]; then \ mkdir -p $(BUILD_DIR)/$* && cd $(BUILD_DIR)/$* && \ $(DO_RSYNC) --delete $(SRC_DIR)/$*/ $*.vfs && \ $(SDX) wrap $*.kit; \ fi $(post_make) $(starkit:%=install/%): install/%: $(pre_install) @mkdir -p "$(INSTALL_ROOT)$(PREFIX)/bin" && \ $(DO_RSYNC) $(BUILD_DIR)/$*/$*.kit $(INSTALL_ROOT)$(PREFIX)/bin/$* $(post_install) ### wrappers ### $(wrappers:%=install/%): action := install-embedded $(wrappers): %: $(pre_install) $(pre_make) @if [ -n "$(action)" ]; then \ $(MAKE_ENV) $(MAKE) $($*:%=$(action)/%) $(EXTRA_MAKE_ARGS); fi $(post_make) $(post_install) ### copy install packages & auxiliary packages (download only) ### $(COPY_INSTALL) $(download): %: $(checkout) $(pre_make) $(post_make) $(COPY_INSTALL:%=install/%): install/%: $(pre_install) mkdir -p $(INSTALL_ROOT)$$(dirname $(COPY_INSTALL_DST)) && \ $(DO_RSYNC) $(SRC_DIR)/$*/$(COPY_INSTALL_SRC) $(INSTALL_ROOT)$(COPY_INSTALL_DST) $(post_make) $(post_install) #---------------------------------------------------------------------------------------- # destroot rules $(projects:%=destroot/%): destroot/%: @if [ -z "$(DONT_PACKAGE_THIS)" ]; then echo "*** $* destroot ***" && \ if [ \( -n "$(TARGET_BUILD_DIR)" -a ! -d "$(TARGET_BUILD_DIR)" \) \ -o "$(TARGET_SRC_DIR)" -nt "$(DESTROOT_DIR)/$*" \ -o ! -O "$(DESTROOT_DIR)/$*" ]; \ then if [ -d "$(DESTROOT_DIR)/$*" ]; then \ chmod -R u+w "$(DESTROOT_DIR)/$*" && rm -rf "$(DESTROOT_DIR)/$*"; fi && \ mkdir -p "$(DESTROOT_DIR)" && if [ $$(id -u) -eq 0 ]; then \ chown root:admin "$(DESTROOT_DIR)" && chmod 1775 "$(DESTROOT_DIR)"; fi && \ mkdir -p "$(DESTROOT_DIR)/$*" && \ $(MAKE) install/$* INSTALL_ROOT="$(DESTROOT_DIR)/$*/" && \ $(FIND) "$(DESTROOT_DIR)/$*" -type f -name "*.dylib*" \ -exec $(DO_STRIP_DESTROOT_DYLIB) {} \; && echo; fi && \ echo "Copying $* to install root:" && \ echo "$(DITTO) -rsrc \"$(DESTROOT_DIR)/$*/\" \"$(INSTALL_ROOT)/\"" && \ $(DITTO) -rsrc "$(DESTROOT_DIR)/$*/" "$(INSTALL_ROOT)/"; \ fi #---------------------------------------------------------------------------------------- # package & archive rules $(all:%=package/%): package/%: @if [ -z "$(DONT_PACKAGE_THIS)" ]; then echo "*** $* package ***" && \ export TMP="$(TMP_DIR)/tmp" && if [ -e "$${TMP}" ]; then \ chmod -R u+w "$${TMP}" && rm -rf "$${TMP}"; fi && mkdir -p "$${TMP}" && \ if [ $$(id -u) -eq 0 ]; then chown root:admin "$${TMP}" && chmod 1775 "$${TMP}"; fi && \ $(MAKE) destroot/$* INSTALL_ROOT="$${TMP}/" && \ mkdir -p "$(INSTALL_ROOT)" && if [ $$(id -u) -eq 0 ]; then \ chown root:admin "$(INSTALL_ROOT)" && chmod 1775 "$(INSTALL_ROOT)"; fi && \ if [ -n "$(PKG_ARCHIVE_DIR)" -a $$(id -u) -eq 0 ]; then mkdir -p "$(PKG_ARCHIVE_DIR)" && \ chown root:admin "$(PKG_ARCHIVE_DIR)" && chmod 1775 "$(PKG_ARCHIVE_DIR)"; fi && \ echo Tools/buildPackage -d \"$(INSTALL_ROOT)Packages\" -b \"$(ARCHIVE_DIR)\" \ -n \"$(NAME)\" -v \"$(VERSION)\" -r \"$(README)\" -l \"$(LICENSE)\" \ -t \"$(PKG_ARCHIVE_DIR)\" $(RELOCATABLE) $(EXTRA_PACKAGE_ARGS) $* && \ Tools/buildPackage -d "$(INSTALL_ROOT)Packages" -b "$(ARCHIVE_DIR)" \ -n "$(NAME)" -v "$(VERSION)" -r "$(README)" -l "$(LICENSE)" \ -t "$(PKG_ARCHIVE_DIR)" $(RELOCATABLE) $(EXTRA_PACKAGE_ARGS) $* && \ if [ -n "$(PKG_LIST)" -a -e "$(PKG_LIST).in" -a -n "$(HOMEPAGE)" ]; then \ echo "Adding entry to $(PKG_LIST)" && \ readme="$(README_INSTALLED)" && if [ "$${readme:0:1}" != "/" ]; then \ readme="$(DOCDIR)/$(PKGLISTNAME)/$(README_INSTALLED)"; fi && \ if [ -e "$${TMP}/$${readme}" ]; then \ readmesed="s|@README_[^@]*@||g"; else \ readmesed="s|@README_BEGIN@.*@README_END@||g"; fi && \ docs="$(DOCDIR)/$(PKGLISTNAME)" && \ if [ -d "$${TMP}/$${docs}" -o -L "$${TMP}/$${docs}" ]; then \ docsed="s|@DOCS_[^@]*@||g"; else \ docsed="s|@DOCS_BEGIN@.*@DOCS_END@||g"; fi && \ demos="$(DEMODIR)/$(PKGLISTNAME)" && \ if [ -d "$${TMP}/$${demos}" -o -L "$${TMP}/$${demos}" ]; then \ demosed="s|@DEMO_[^@]*@||g"; else \ demosed="s|@DEMO_BEGIN@.*@DEMO_END@||g"; fi && \ if [ -n "$(WIKI)" ]; then \ wikised="s|@WIKI_[^@]*@||g"; else \ wikised="s|@WIKI_BEGIN@.*@WIKI_END@||g"; fi && \ sed -e "s|@PROJ@|$(PKGLISTNAME)|g" -e "s|@VERS@|$(VERSION)|g" \ -e "s|@HOMEPAGE@|$(HOMEPAGE)|g" -e "s|@README@|$${readme}|g" \ -e "s|@DOCS@|$${docs}/$(DOCIDX)|g" -e "s|@DEMOS@|$${demos}/|g" \ -e "s|@WIKI@|$(WIKIBASEURL)$(WIKI)|g" \ -e "$${readmesed}" -e "$${docsed}" -e "$${demosed}" -e "$${wikised}" \ "$(PKG_LIST).in" >> "$(PKG_LIST)"; \ fi && \ chmod -R u+w "$${TMP}" && rm -rf "$${TMP}"; \ fi $(projects:%=archive/%): archive/%: @if [ -z "$(DONT_PACKAGE_THIS)" ]; then echo "*** $* archive ***" && \ export TMP="$(TMP_DIR)/tmp" && if [ -e "$${TMP}" ]; then \ chmod -R u+w "$${TMP}" && rm -rf "$${TMP}"; fi && mkdir -p "$${TMP}" && \ if [ $$(id -u) -eq 0 ]; then \ chown root:admin "$${TMP}" && chmod 1775 "$${TMP}"; fi && \ $(MAKE) destroot/$* INSTALL_ROOT="$${TMP}/dest/" && \ mv -f "$${TMP}/dest/$(ARCHIVE_DIR)" "$${TMP}/$(NAME)" && \ if [ -n "$(DONT_ARCHIVE)" ]; then \ ( cd "$${TMP}/$(NAME)" && rm -f $(DONT_ARCHIVE) ); fi && \ f="$(README)" && if [ -e "$$f" ]; then $(DO_RSYNC) "$$f" "$${TMP}/$(NAME)" && \ if [ $$(id -u) -eq 0 ]; then \ chown root:admin "$${TMP}/$(NAME)/$$(basename "$$f")"; fi; fi && \ f="$(LICENSE)" && if [ -e "$$f" ]; then $(DO_RSYNC) "$$f" "$${TMP}/$(NAME)" && \ if [ $$(id -u) -eq 0 ]; then \ chown root:admin "$${TMP}/$(NAME)/$$(basename "$$f")"; fi; fi && \ if [ -n "$(HOMEPAGE)" ]; then printf "[InternetShortcut]\nURL=$(HOMEPAGE)\n" >\ $${TMP}/$(NAME)/$(NAME).url; fi && \ mkdir -p "$(INSTALL_ROOT)" && if [ $$(id -u) -eq 0 ]; then \ chown root:admin "$(INSTALL_ROOT)" && chmod 1775 "$(INSTALL_ROOT)"; fi && \ echo "Archiving $(NAME) $(VERSION):" \ $$(echo $(README) | $(call strip_src_dir)) \ $$(echo $(LICENSE) | $(call strip_src_dir)) "$(HOMEPAGE)" && \ (cd "$${TMP}" && t="$(INSTALL_ROOT)/$(NAME)-$$(echo "$(VERSION)" \ | sed -e 's/ /_/g').tar" && $(TAR) cf "$${t}" "$(NAME)" && $(BZIP2) -f "$${t}") && \ chmod -R a+w "$${TMP}" && rm -rf "$${TMP}"; \ fi #---------------------------------------------------------------------------------------- # cvs/diff rules dont_update := $(NO_CVS:%=update/%) $(NO_CVS:%=diff/%) $(NO_CVS:%=patch/%) $(dont_update): DONT_UPDATE_THIS := 1 dont_diff := $(NO_TAR:%=diff/%) $(NO_TAR:%=patch/%) $(dont_diff): DONT_DIFF_THIS := 1 dont_download := $(NO_TAR:%=update/%) $(dont_download): DONT_DOWNLOAD_THIS := 1 $(cvs_diff:%=update/%): update/%: -@$(PRE_CVS) @if [ -z "$(DONT_UPDATE_THIS)" ]; then \ T=$(CVS_TAG); D=$(CVS_DATE); \ if echo $$T | grep -q -e "-D"; then D=; fi; \ if [ -d $(SRC_DIR)/$* ]; then \ echo "*** $* update $$T $$D ***"; \ cd $(SRC_DIR)/$* && eval $(DO_CVS) update -d -P -A $$T $$D $(CVS_UP) || true; \ else \ R=$(CVSROOT); \ echo "*** $* checkout $$T $$D from $$R ***"; \ if [ -n "$$(echo $$R | egrep '^:pserver')" ]; then \ if ! grep -q "$$R" ~/.cvspass; then \ echo "$$R A" >> ~/.cvspass; fi; fi && \ mkdir -p $(SRC_DIR) && cd $(SRC_DIR) && \ eval $(DO_CVS) -d$$R checkout -P -A $$T $$D -d $* $(CVS_CO) && \ if [ -n "$(SRC_ARCHIVE_DIR)" ]; then \ rm -rf $(SRC_ARCHIVE_DIR)/$* && mkdir -p $(SRC_ARCHIVE_DIR) && \ echo "Tarring sources" && $(DO_RSYNC) $* $(SRC_ARCHIVE_DIR)/ && \ (cd $(SRC_ARCHIVE_DIR) && $(TAR) cf $*.tar $* && $(BZIP2) -f $*.tar && rm -rf $*); fi && \ if [ -e $(CURDIR)/patches/$*.diff ]; then \ cd $* && $(DO_PATCH) -p0 < $(CURDIR)/patches/$*.diff && \ for f in $$(awk '/^--- \/dev\/null/ {getline; print $$2}' \ $(CURDIR)/patches/$*.diff); do $(CVSDO) add $$f; done && \ for f in $$(awk '/^\+\+\+ \/dev\/null/ {print f}; {f=$$2}' \ $(CURDIR)/patches/$*.diff); do $(CVSDO) remove $$f; done; fi; \ fi; \ else if [ -z "$(DONT_DOWNLOAD_THIS)" ]; then \ F=$*$(CVS_TAG); mkdir -p $(ORIG_DIR) $(SRC_ARCHIVE_DIR) && \ if [ ! -d $(SRC_DIR)/$* -o ! -d $(ORIG_DIR)/$$F ]; then \ if [ -d $(SRC_DIR)/$* ]; then \ $(MAKE) patch/$* && mv -f $(SRC_DIR)/$* $(SRC_DIR)/$*.old; fi && \ rm -f $$($(FIND) $(SRC_ARCHIVE_DIR) -maxdepth 1 -regex "$(SRC_ARCHIVE_DIR)/$*.*" -type d) 2>&- && \ rm -rf $$($(FIND) $(ORIG_DIR) -maxdepth 1 -regex "$(ORIG_DIR)/$*.*" -type d) 2>&- && \ cd $(SRC_ARCHIVE_DIR) && if [ ! -e $$F.$(DL_EXT) ]; then \ echo "*** $* download from $(URL)$$F.$(DL_EXT) ***" && \ $(call url_get,"$(URL)$$$$F.$(DL_EXT)"); fi && \ cd $(ORIG_DIR) && echo "*** $* extract $$F.$(DL_EXT) ***" && \ case $(DL_EXT) in \ tar.gz|tgz) $(TAR) zxf $(SRC_ARCHIVE_DIR)/$$F.$(DL_EXT);; \ tar) $(TAR) xf $(SRC_ARCHIVE_DIR)/$$F.$(DL_EXT);; \ kit) $(SDX) unwrap $(SRC_ARCHIVE_DIR)/$$F.$(DL_EXT);; \ \?) false;; \ esac && \ if [ ! -d $$F ]; then mv -f \ $$($(FIND) . -maxdepth 1 -regex "./$*.*" -type d) $$F; fi && \ mkdir -p $(SRC_DIR) && $(DO_RSYNC) $$F/ $(SRC_DIR)/$* && \ if [ -e $(CURDIR)/patches/$*.diff ]; then \ cd $(SRC_DIR)/$* && $(DO_PATCH) -p1 < $(CURDIR)/patches/$*.diff; fi; \ fi; \ fi; fi -+@$(POST_CVS) $(cvs_diff:%=diff/%): diff/%: -@$(PRE_CVS) @if [ -z "$(DONT_DIFF_THIS)" ]; then \ echo "*** $* diff ***"; \ if [ -z "$(DONT_UPDATE_THIS)" ]; then \ cd $(SRC_DIR)/$* && $(DO_CVS) diff -u -p -N || true; \ else \ d="$$($(FIND) $(ORIG_DIR) -maxdepth 1 -regex '$(ORIG_DIR)/$*.*' -type d)" && \ if [ -n "$d" ]; then $(DO_DIFF) -r -N $(EXTRA_DIFF_ARGS) "$d" $(SRC_DIR)/$* || true; fi; \ fi; \ fi -+@$(POST_CVS) $(cvs_diff:%=patch/%): patch/%: -@$(PRE_CVS) @if [ -z "$(DONT_DIFF_THIS)" ]; then \ echo "*** $* patch ***"; \ if [ -z "$(DONT_UPDATE_THIS)" ]; then \ cd $(SRC_DIR)/$* && $(DO_CVS) diff -u -p -N | \ awk '/^\? / {next}; /^Index: (((unix$(PATCH_EXCL_CONFDIR))\/)?configure$(PATCH_EXCL))$$/ {s=1; next}; /^Index: / {s=0}; s==0' \ > $(CURDIR)/patches/$*.diff.new || true; \ else \ d="$$($(FIND) $(ORIG_DIR) -maxdepth 1 -regex '$(ORIG_DIR)/$*.*' -type d)" && \ if [ -n "$$d" ]; then $(DO_DIFF) -r -N $(EXTRA_DIFF_ARGS) "$$d" $(SRC_DIR)/$* \ | sed -e 's#$(ORIG_DIR)#orig#' -e 's#$(SRC_DIR)/##' \ > $(CURDIR)/patches/$*.diff.new || true; fi; \ fi && cd $(CURDIR)/patches && $(FIND) . -name $*.diff.new -empty -delete && \ if [ -e $*.diff.new ]; then if [ ! -e $*.diff ] || ! $(DIFF) -q \ --ignore-matching-lines='^\+\+\+' --ignore-matching-lines='^---' --ignore-matching-lines='^diff' \ $*.diff $*.diff.new >/dev/null; then \ if [ ! -e $*.diff ]; then \ echo " New patch $*.diff" && mv -f $*.diff.new $*.diff && $(CVSDO) add $*.diff; \ else echo " Changed patch $*.diff" && mv -f $*.diff.new $*.diff; fi;\ else rm -f $*.diff.new; fi; \ elif [ -e $*.diff ]; then \ echo " Removed patch $*.diff" && rm -f $*.diff && $(CVSDO) remove $*.diff; fi;\ fi -+@$(POST_CVS) #---------------------------------------------------------------------------------------- # macros define redo_prebinding if [ ! -d usr/lib ]; then mkdir -p usr; ln -fs /usr/lib usr; \ ln -fs /usr/X11R6 usr; RM_USRLIB=1; fi; \ if [ ! -d System ]; then ln -fs /System .; RM_SYSTEM=1; fi; \ for f in $(1); { redo_prebinding -r . $$f; }; \ if [ -n "$${RM_USRLIB:-}" ]; then rm -f usr/lib; rm -f usr/X11R6; rmdir -p usr 2>&-; fi; \ if [ -n "$${RM_SYSTEM:-}" ]; then rm -f System; fi; true endef define fix_pkg $(call fix_pkg2,$(1),$(1),$(2)) endef define fix_pkg2 $(call fix_pkg_stub2,$(1),$(1),$(2)) && \ ( cd ./$(LIBDIR)/$(1)* && mv -f ../lib$(2)*.dylib . && \ sed -e 's|\.\.$(3)lib$(2)|lib$(2)|' pkgIndex.tcl > pkgIndex.tcl.1 && \ mv -f pkgIndex.tcl.1 pkgIndex.tcl ) endef define fix_pkg_stub $(call fix_pkg_stub2,$(1),$(1),$(2)) endef define fix_pkg_stub2 ( cd ./$(LIBDIR) && d=$$(ls -d $(1)*) && \ $(FIND) . -maxdepth 1 -name "lib$(2)stub*.a" -print -exec mv -f {} $$d \; ) endef define fix_pkgIndex cd ./$(LIBDIR)/$(1)* && \ $(2) pkgIndex.tcl > pkgIndex.tcl.1 && \ mv -f pkgIndex.tcl.1 pkgIndex.tcl && cd ../../.. endef define fix_stub_config $(call fix_stub_config2,$(1),$(1)) endef define fix_stub_config2 mkdir -p ./$(PREFIX)/lib && mv -f ./$(LIBDIR)/$(1)Config.sh ./$(PREFIX)/lib endef define update_config if [ -f $(1)/config.guess ]; then \ mv -f $(1)/config.guess $(1)/config.guess.orig && \ mv -f $(1)/config.sub $(1)/config.sub.orig; fi; \ $(DO_RSYNC) /usr/share/libtool/{config.guess,config.sub} $(1) endef define restore_config if [ -f $(1)/config.guess.orig ]; then \ mv -f $(1)/config.guess.orig $(1)/config.guess && \ mv -f $(1)/config.sub.orig $(1)/config.sub; fi endef define conf $$(if [ -e $(1) ]; then \ awk '/^$(2)( |\t)/ {if(sub(/^$(2)( |\t)+/,"")) print}' $(1) | head -1; fi) endef define url_get if [ -n "$$(which $(WGET))" ]; then $(DO_WGET) $(1); else $(DO_CURL) $(1); fi endef define fix_install_id install_name_tool -id $(2)/lib$(1).dylib lib$(1).dylib endef define fix_install_name install_name_tool -change $$(otool -L lib$(1).dylib | awk '/lib$(2)\.dylib.*[^:]$$/ {print $$1}') $(3)/lib$(2).dylib lib$(1).dylib endef define min_rel_path $$(echo "set s [file split {$(1)}]; set t [file split {$(2)}]; set i 1; \ while {[lindex \$$s \$$i] eq [lindex \$$t \$$i]} {incr i}; \ puts [eval file join [split [string repeat {.. } \ [expr {[llength \$$t] - \$$i}]]] [lrange \$$s \$$i end]]" | $(TCLSH)) endef define strip_src_dir sed -e 's|$(SRC_DIR)/||g' -e 's|$*/||g' endef #----------------------------------------------------------------------------------------