1 # 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile.sfw 1.11 08/05/15 SMI" 26 27 VER=tcl8.4.18 28 VER64=$(VER)-64 29 30 include ../Makefile.lib 31 32 all: real-all 33 34 all32: $(VER)/unix/config.status 35 (cd $(VER)/unix; env \ 36 CC=$(CC) "CFLAGS=$(CFLAGS) $(XREGSFLAG) -xstrconst $(XPG6MODE)" \ 37 "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk $(ZDEFS) $(ZTEXT) $(ZCOMBRELOC)" \ 38 PATH=$(SFW_PATH) \ 39 MAKE=$(CCSMAKE) \ 40 $(CCSMAKE)) 41 @find . -name core -exec rm -f {} \; 42 43 all64: $(VER64)/unix/config.status 44 (cd $(VER64)/unix; env \ 45 CC=$(CC64) "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) -xstrconst $(XPG6MODE)" \ 46 "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk $(ZDEFS) $(ZTEXT) $(ZCOMBRELOC)" \ 47 PATH=$(SFW_PATH) \ 48 MAKE=$(CCSMAKE) \ 49 $(CCSMAKE)) 50 @find . -name core -exec rm -f {} \; 51 52 # Build and execute TCL tests 53 test: test32 test64 54 55 test32: 56 (cd $(VER)/unix; env \ 57 CC=$(CC) "CFLAGS=$(CFLAGS) $(XREGSFLAG) -xstrconst $(XPG6MODE)" \ 58 PATH=$(SFW_PATH) \ 59 MAKE=$(CCSMAKE) \ 60 $(CCSMAKE) test) 61 @find . -name core -exec rm -f {} \; 62 63 test64: 64 (cd $(VER64)/unix; env \ 65 CC=$(CC64) "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) -xstrconst $(XPG6MODE)" \ 66 PATH=$(SFW_PATH) \ 67 MAKE=$(CCSMAKE) \ 68 $(CCSMAKE) test) 69 @find . -name core -exec rm -f {} \; 70 71 install: all 72 $(SHELL) ./install-sfw 73 MACH64=$(MACH64) $(SHELL) ./install-sfw-64 74 75 real-all: all32 all64 76 77 $(VER)/unix/config.status: $(VER)/unix/configure 78 (cd $(VER)/unix; env \ 79 CC=$(CC) "CFLAGS=$(CFLAGS) $(XREGSFLAG) -xstrconst $(XPG6MODE)" \ 80 "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk $(ZDEFS) $(ZTEXT) $(ZCOMBRELOC)" \ 81 PATH=$(SFW_PATH) \ 82 MAKE=$(CCSMAKE) \ 83 ./configure --prefix=/usr \ 84 --mandir=/usr/share/man \ 85 --enable-shared \ 86 --enable-man-symlinks \ 87 --enable-threads) 88 89 $(VER64)/unix/config.status: $(VER64)/unix/configure 90 (cd $(VER64)/unix; env \ 91 CC=$(CC64) "CFLAGS=$(CFLAGS64) $(XREGSFLAG64) -xstrconst $(XPG6MODE)" \ 92 "LD_OPTIONS=-M $(SRC)/cmd/mapfile_noexstk $(ZDEFS) $(ZTEXT) $(ZCOMBRELOC)" \ 93 PATH=$(SFW_PATH) \ 94 MAKE=$(CCSMAKE) \ 95 ./configure --prefix=/usr \ 96 --bindir=/usr/bin/$(MACH64) \ 97 --libdir=/usr/lib/$(MACH64) \ 98 --mandir=/usr/share/man \ 99 --enable-shared \ 100 --enable-man-symlinks \ 101 --enable-64bit \ 102 --enable-threads) 103 104 # man.patch patches tcl8.4.14/unix/installManPage. It adds a "sed" 105 # command that will update all the manpages as they are installed to 106 # include the required Sun interface taxonomy level and change the 107 # manpage sections as follows: 108 # n -> 1t 109 # 3 -> 3tcl 110 # This is because Tcl's default manpage sections do not match Sun usage. 111 # This patch also corrects an error where the manpage section is 112 # taken as the filename's last letter, instead of all the letters 113 # following the ".". 114 # 115 # makefile.patch patches tcl8.4.14/unix/Makefile.in. It changes the 116 # manpage filename extensions as per the section changes listed above. 117 # This patch also adds a needed "-lc" to the link options. 118 # 119 # We also rename the pages as described above. 120 121 $(VER)/unix/configure: $(VER)-src.tar.gz 122 gzip -dc $(VER)-src.tar.gz | tar xopf - 123 touch $(VER)/unix/configure 124 (cd $(VER); \ 125 gpatch -p1 < ../man.patch; \ 126 gpatch -p1 < ../makefile.patch) 127 (cd $(VER)/doc; \ 128 for i in *.n ; do manbase="$$(basename "$$i" .n)"; mv "$$i" "$${manbase}.1t"; done ; \ 129 for i in *.3 ; do manbase="$$(basename "$$i" .3)"; mv "$$i" "$${manbase}.3tcl"; done) 130 131 $(VER64)/unix/configure: $(VER)-src.tar.gz 132 mkdir -p tmp 133 gzip -dc $(VER)-src.tar.gz | (cd tmp; tar xopf -) 134 rm -rf $(VER64) 135 mv tmp/$(VER) $(VER64) 136 rmdir tmp 137 (cd $(VER64); \ 138 gpatch -p1 < ../man.patch; \ 139 gpatch -p1 < ../makefile.patch; \ 140 gpatch -p1 < ../tcl64bit.patch) 141 (cd $(VER64)/unix ; autoreconf -f) 142 (cd $(VER64)/doc; \ 143 for i in *.n ; do manbase="$$(basename "$$i" .n)"; mv "$$i" "$${manbase}.1t"; done ; \ 144 for i in *.3 ; do manbase="$$(basename "$$i" .3)"; mv "$$i" "$${manbase}.3tcl"; done) 145 146 clean: 147 -rm -rf $(VER) \ 148 $(VER64) 149 150 install_h: 151 152 include ../Makefile.targ 153