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
128
129
130
131
|
$NetBSD: patch-af,v 1.6 2008/08/19 16:14:24 joerg Exp $
--- ../tk/unix/Makefile.in.orig 2000-08-09 21:21:48.000000000 -0500
+++ ../tk/unix/Makefile.in
@@ -69,8 +69,8 @@ STANDALONE_SRCS = tkx.c
STANDALONE_OBJS = tkx.o
-LIBTCLX = ../../tcl/unix/${TCLX_STLIB_NAME}
-TCL = ../../tcl/unix/tcl
+LIBTCLX = ${PREFIX}/lib/${TCLX_STLIB_NAME}
+TCL = ${TCLX_EXEC_PREFIX}/bin/tcl
HELP_DIR = @HELP_DIR@/tk
@@ -96,29 +96,30 @@ static: wishx.static tktest.static
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/} -ltclx83 -ltk -ltcl -lX11 -lm \
+ ${TCL_LIBS}
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 -ltclx83 -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
@@ -158,15 +159,17 @@ help.tmp:
#
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/} -ltclx83 -ltk -ltcl -lX11 -lm \
+ ${TCL_LIBS}
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
@@ -207,9 +210,8 @@ buildhelp:
mkdir -p @HELP_DIR@ ;\
fi
mkdir -p ${HELP_DIR}
- ${BLDMANHELP} ${TK_SRC_DIR}/doc ${TCLX_TOOLS_SRC_DIR}/tkmanpages \
+ ${TCLX_EXEC_PREFIX}/bin/tcl ../../unix/tools/bldmanhelp.tcl ${TK_SRC_DIR}/doc ${TCLX_TOOLS_SRC_DIR}/tkmanpages \
${HELP_DIR} Tk.brf
- ${INSTCOPY} ${HELP_DIR} ${INSTALL_ROOT}${TKX_INST_RUNTIME}/help
#------------------------------------------------------------------------------
@@ -221,26 +223,25 @@ install-libraries: install-runtime inst
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}
+ ${BSD_INSTALL_DATA_DIR} ${INSTALL_ROOT}${TKX_INST_RUNTIME:S|/tkX|/tclX|}/help
+ cd ${HELP_DIR} && pax -r -w . cd ${INSTALL_ROOT}${TKX_INST_RUNTIME:S|/tkX|/tclX|}/help
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${INSTALL_ROOT}${TKX_INST_RUNTIME:S|/tkX|/tclX|}/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:
|