Hex Artifact Content

Artifact 58689ba4b35cd27112f4423be330238b3f76e984:


0000: 23 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 23 20 50  # /bin/bash..# P
0010: 65 72 66 6f 72 6d 20 63 6f 6d 6d 6f 6e 20 62 75  erform common bu
0020: 69 6c 64 20 6f 70 74 69 6f 6e 73 0a 2e 20 2e 2f  ild options.. ./
0030: 62 75 69 6c 64 2d 63 6f 6d 6d 6f 6e 2e 73 68 0a  build-common.sh.
0040: 0a 23 20 43 6f 6d 70 69 6c 65 20 75 73 69 6e 67  .# Compile using
0050: 20 74 68 65 20 73 61 6d 65 20 6f 70 74 69 6f 6e   the same option
0060: 73 20 61 73 20 54 63 6c 0a 69 66 20 5b 20 2d 7a  s as Tcl.if [ -z
0070: 20 22 24 7b 54 43 4c 43 4f 4e 46 49 47 53 48 7d   "${TCLCONFIGSH}
0080: 22 20 5d 3b 20 74 68 65 6e 0a 09 54 43 4c 43 4f  " ]; then..TCLCO
0090: 4e 46 49 47 53 48 3d 22 24 28 66 69 6e 64 20 2f  NFIGSH="$(find /
00a0: 75 73 72 2f 6c 69 62 20 2f 75 73 72 2f 6c 69 62  usr/lib /usr/lib
00b0: 36 34 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 6c 69  64 /usr/local/li
00c0: 62 20 2f 75 73 72 2f 6c 6f 63 61 6c 2f 6c 69 62  b /usr/local/lib
00d0: 36 34 20 2f 6c 69 62 20 2f 6c 69 62 36 34 20 2d  64 /lib /lib64 -
00e0: 6e 61 6d 65 20 74 63 6c 43 6f 6e 66 69 67 2e 73  name tclConfig.s
00f0: 68 20 2d 70 72 69 6e 74 20 2d 71 75 69 74 29 22  h -print -quit)"
0100: 0a 66 69 0a 0a 2e 20 22 24 7b 54 43 4c 43 4f 4e  .fi... "${TCLCON
0110: 46 49 47 53 48 7d 22 0a 0a 65 63 68 6f 20 22 24  FIGSH}"..echo "$
0120: 7b 54 43 4c 5f 43 43 7d 20 2d 67 67 64 62 33 20  {TCL_CC} -ggdb3 
0130: 2d 66 50 49 43 20 2d 44 50 49 43 20 2d 57 61 6c  -fPIC -DPIC -Wal
0140: 6c 20 2d 44 55 53 45 5f 54 43 4c 5f 53 54 55 42  l -DUSE_TCL_STUB
0150: 53 3d 31 20 24 7b 54 43 4c 5f 44 45 46 53 7d 20  S=1 ${TCL_DEFS} 
0160: 24 7b 54 43 4c 5f 49 4e 43 4c 55 44 45 5f 53 50  ${TCL_INCLUDE_SP
0170: 45 43 7d 20 2d 73 68 61 72 65 64 20 2d 72 64 79  EC} -shared -rdy
0180: 6e 61 6d 69 63 20 2d 6f 20 74 75 61 70 69 2e 73  namic -o tuapi.s
0190: 6f 20 74 75 61 70 69 2e 63 20 24 7b 54 43 4c 5f  o tuapi.c ${TCL_
01a0: 53 54 55 42 5f 4c 49 42 5f 53 50 45 43 7d 22 0a  STUB_LIB_SPEC}".
01b0: 65 76 61 6c 20 24 7b 54 43 4c 5f 43 43 7d 20 2d  eval ${TCL_CC} -
01c0: 67 67 64 62 33 20 2d 66 50 49 43 20 2d 44 50 49  ggdb3 -fPIC -DPI
01d0: 43 20 2d 57 61 6c 6c 20 2d 44 55 53 45 5f 54 43  C -Wall -DUSE_TC
01e0: 4c 5f 53 54 55 42 53 3d 31 20 24 7b 54 43 4c 5f  L_STUBS=1 ${TCL_
01f0: 44 45 46 53 7d 20 24 7b 54 43 4c 5f 49 4e 43 4c  DEFS} ${TCL_INCL
0200: 55 44 45 5f 53 50 45 43 7d 20 2d 73 68 61 72 65  UDE_SPEC} -share
0210: 64 20 2d 72 64 79 6e 61 6d 69 63 20 2d 6f 20 74  d -rdynamic -o t
0220: 75 61 70 69 2e 73 6f 20 74 75 61 70 69 2e 63 20  uapi.so tuapi.c 
0230: 24 7b 54 43 4c 5f 53 54 55 42 5f 4c 49 42 5f 53  ${TCL_STUB_LIB_S
0240: 50 45 43 7d 0a 0a 65 63 68 6f 20 27 70 61 63 6b  PEC}..echo 'pack
0250: 61 67 65 20 69 66 6e 65 65 64 65 64 20 74 75 61  age ifneeded tua
0260: 70 69 20 27 22 24 7b 74 75 61 70 69 5f 76 65 72  pi '"${tuapi_ver
0270: 73 69 6f 6e 7d 22 27 20 5b 6c 69 73 74 20 6c 6f  sion}"' [list lo
0280: 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 64  ad [file join $d
0290: 69 72 20 74 75 61 70 69 2e 73 6f 5d 5d 27 20 3e  ir tuapi.so]]' >
02a0: 20 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a         pkgIndex.tcl.