1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
$NetBSD: patch-af,v 1.4 2004/05/12 17:56:45 minskim Exp $
--- ../tk/unix/Makefile.in.orig Mon Feb 7 00:54:01 2000
+++ ../tk/unix/Makefile.in
@@ -65,8 +65,8 @@
STANDALONE_OBJS = tkx.o
-LIBTCLX = ../../tcl/unix/${TCLX_STLIB_NAME}
-TCL = ../../tcl/unix/tcl
+LIBTCLX = ${PREFIX}/lib/${TCLX_STLIB_NAME}
+TCL = ${PREFIX}/bin/tcl
HELP_DIR = ${srcbasedir}/tk/help
@@ -92,29 +92,29 @@
standalone: wishx.standalone tktest.standalone hello
wishx: tkXAppInit.o @TKX_SHLIB_BUILD_REF@ @TKX_STLIB_BUILD_REF@ ${TCL} Makefile
- ${CC} ${LD_SWITCHES} tkXAppInit.o ${ALL_LIBS} \
- -o $@ || (rm -f $@; exit 1)
+ ${LD} tkXAppInit.o -o $@ -Wl,-R ${PREFIX}/lib -Wl,-R${X11BASE}/lib \
+ -L${PREFIX}/lib -L${X11BASE}/lib \
+ ${TKX_SHLIB_NAME:C/\.so.*/.la/} -ltclx82 -ltk -ltcl -lX11 -lm
wishx.static: tkXAppInit.o ${TKX_STLIB_NAME} ${LIBTCLX} Makefile
- ${CC} ${LD_SWITCHES} tkXAppInit.o ${STATIC_LIBS} -o $@ || \
+ ${LD} ${LD_SWITCHES} tkXAppInit.o ${STATIC_LIBS} -o $@ || \
(rm -f $@; exit 1)
wishx.standalone: tkXAppInitSA.o ${TKX_STLIB_NAME} ${LIBTCLX} Makefile
- ${CC} ${LD_SWITCHES} tkXAppInitSA.o ${STATIC_LIBS} -o $@ || \
+ ${LD} ${LD_SWITCHES} tkXAppInitSA.o ${STATIC_LIBS} -o $@ || \
(rm -f $@; exit 1)
${TKX_STLIB_NAME}: ${OBJS}
- ${AR} cr ${TKX_STLIB_NAME} ${OBJS}
- ${RANLIB} ${TKX_STLIB_NAME}
+# ${AR} cr ${TKX_STLIB_NAME} ${OBJS}
+# ${RANLIB} ${TKX_STLIB_NAME}
@TKX_SHLIB_BUILD_TARGET@: ${SOBJS}
- rm -f ${TKX_SHLIB_NAME}
- ${TCL_SHLIB_LD} -o ${TKX_SHLIB_NAME} ${SOBJS} \
- ${TK_BUILD_STUB_LIB_SPEC} ${TCLX_BUILD_LIB_SPEC} \
- ${TCL_BUILD_STUB_LIB_SPEC} ${TCL_SHLIB_LD_LIBS}
+ ${LIBTOOL} --mode=link @CC@ -o ${TKX_SHLIB_NAME:C/\.so.*/.la/} ${SOBJS:.o=.lo} \
+ -Wl,-R${PREFIX}/lib -Wl,-R${X11BASE}/lib -rpath ${PREFIX}/lib \
+ -L${PREFIX}/lib -L${X11BASE}/lib -ltclx82 -ltk -ltcl -lX11 -lm -version-info 1:0
hello: hello.c
- ${CC} ${LD_SWITCHES} -o $@ hello.c ${STATIC_LIBS}
+ ${LD} ${LD_SWITCHES} -o $@ hello.c ${STATIC_LIBS}
#------------------------------------------------------------------------------
# We need the "help" directory here so that the help command will work before
@@ -154,15 +154,16 @@
#
tktest: ${TEST_OBJS} @TKX_SHLIB_BUILD_REF@ @TKX_STLIB_BUILD_REF@ ${TCL}
- ${CC} ${LD_SWITCHES} ${TEST_OBJS} ${ALL_LIBS} \
- -o $@ || (rm -f $@; exit 1)
+ ${LD} ${TEST_OBJS} -o $@ -Wl,-R${PREFIX}/lib -Wl,-R${X11BASE}/lib \
+ -L${PREFIX}/lib -L${X11BASE}/lib \
+ ${TKX_SHLIB_NAME:C/\.so.*/.la/} -ltclx82 -ltk -ltcl -lX11 -lm
tktest.static: ${TEST_OBJS} @TKX_STLIB_BUILD_REF@ ${TCL}
- ${CC} ${LD_SWITCHES} ${TEST_OBJS} ${STATIC_LIBS} \
+ ${LD} ${LD_SWITCHES} ${TEST_OBJS} ${STATIC_LIBS} \
-o $@ || (rm -f $@; exit 1)
tktest.standalone: ${TEST_SAOBJS} @TKX_STLIB_BUILD_REF@ ${TCL}
- ${CC} ${LD_SWITCHES} ${TEST_SAOBJS} ${STATIC_LIBS} \
+ ${LD} ${LD_SWITCHES} ${TEST_SAOBJS} ${STATIC_LIBS} \
-o $@ || (rm -f $@; exit 1)
tkTest.o: ${TK_SRC_DIR}/generic/tkTest.c
@@ -199,7 +200,7 @@
buildhelp:
rm -rf ${HELP_DIR} help help.tmp
mkdir ${HELP_DIR}
- ${BLDMANHELP} ${TK_SRC_DIR}/doc ${TCLX_TOOLS_SRC_DIR}/tkmanpages \
+ ${PREFIX}/bin/tcl ../../unix/tools/bldmanhelp.tcl ${TK_SRC_DIR}/doc ${TCLX_TOOLS_SRC_DIR}/tkmanpages \
${HELP_DIR} Tk.brf
#------------------------------------------------------------------------------
@@ -212,27 +213,24 @@
install-doc:
-install-misc: buildhelp
- ${INSTCOPY} ${TKX_UNIX_SRC_DIR}/tkXAppInit.c \
+install-misc:
+ -${BSD_INSTALL_DATA_DIR} ${INSTALL_ROOT}${TKX_INST_RUNTIME}
+ ${BSD_INSTALL_DATA} ${TKX_UNIX_SRC_DIR}/tkXAppInit.c \
${INSTALL_ROOT}${TKX_INST_RUNTIME}
- ${INSTCOPY} ${HELP_DIR} ${INSTALL_ROOT}${TKX_INST_RUNTIME}/help
+ cd ${HELP_DIR} && ${GTAR} cf - . | (cd ${INSTALL_ROOT}${TCLX_INST_RUNTIME}/help && ${GTAR} xf -)
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${INSTALL_ROOT}${TCLX_INST_RUNTIME}/help
install-runtime:
- ${INSTCOPY} tkx.tcl ${INSTALL_ROOT}${TKX_INST_RUNTIME}
+ -${BSD_INSTALL_DATA_DIR} ${INSTALL_ROOT}${TKX_INST_RUNTIME}
+ ${BSD_INSTALL_DATA} tkx.tcl ${INSTALL_ROOT}${TKX_INST_RUNTIME}
install-exec:
- ${INSTCOPY} wishx ${INSTALL_ROOT}${TKX_INST_BIN}
- ${STRIP} ${INSTALL_ROOT}${TKX_INST_BIN}/wishx
- if test "X@TKX_STLIB_BUILD_REF@" != "X"; then \
- ${INSTCOPY} ${TKX_STLIB_NAME} ${INSTALL_ROOT}${TKX_INST_LIB}; \
- ${RANLIB} ${INSTALL_ROOT}${TKX_INST_LIB}/${TKX_STLIB_NAME}; \
- fi
- ${INSTCOPY} tkxConfig.sh ${INSTALL_ROOT}${TKX_INST_LIB}
- if test "@SHARED_BUILD@" = "1"; then \
- ${INSTCOPY} ${TKX_SHLIB_NAME} ${INSTALL_ROOT}${TKX_INST_LIB} ;\
- ${INSTCOPY} pkgIndex.tcl ${INSTALL_ROOT}${TKX_EXEC_RUNTIME} ;\
- fi
- ${INSTCOPY} tclhelp ${INSTALL_ROOT}${TKX_INST_BIN}
+ -${BSD_INSTALL_DATA_DIR} ${INSTALL_ROOT}${TKX_INST_RUNTIME}
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} wishx ${INSTALL_ROOT}${TKX_INST_BIN}
+ ${BSD_INSTALL_DATA} tkxConfig.sh ${INSTALL_ROOT}${TKX_INST_LIB}
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${TKX_SHLIB_NAME:C/\.so.*/.la/} ${INSTALL_ROOT}${TKX_INST_LIB}
+ ${BSD_INSTALL_DATA} pkgIndex.tcl ${INSTALL_ROOT}${TKX_EXEC_RUNTIME}
+ ${BSD_INSTALL_SCRIPT} tclhelp ${INSTALL_ROOT}${TKX_INST_BIN}
#------------------------------------------------------------------------------
config:
|