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 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
|
# This sets the name that tkTable will define for itself when loaded
# If you change this, then the demos won't work, but it might be necessary
# for those with another built-in "table" command
#
# RCS: @(#) $Id: Makefile.in,v 1.9 2001/06/22 22:58:32 hobbs Exp $
#
TBL_COMMAND = table
TBL_RUNTIME = tkTable.tcl
SRC_DIR = @srcdir@
TOP_DIR = @srcdir@/..
LIB_DIR = $(TOP_DIR)/library
DOC_DIR = $(TOP_DIR)/doc
GENERIC_DIR = $(TOP_DIR)/generic
MAC_DIR = $(TOP_DIR)/mac
UNIX_DIR = $(TOP_DIR)/unix
WIN_DIR = $(TOP_DIR)/win
DEMO_DIR = $(TOP_DIR)/demos
TEST_DIR = $(TOP_DIR)/tests
# version info in Makefile and C format
include $(GENERIC_DIR)/version.h
PACKAGE = Tktable
OBJS = tkTable.o \
tkTableWin.o \
tkTableTag.o \
tkTableEdit.o \
tkTableCell.o \
tkTableCellSort.o \
tkTableCmds.o \
tkTableUtil.o
## PostScript is on the drawing board
#OBJS += tkTablePs.o
MANS = tkTable.n
HTML_MANS = tkTable.html
## Define this if you want to use STUBS
## This only works for the dynamic library
##
STUBS_FLAGS = -DUSE_TCL_STUBS -DUSE_TK_STUBS
#-------------------------------------------------
prefix = @prefix@
exec_prefix = @exec_prefix@
TCL_VERSION = @TCL_VERSION@
TK_VERSION = @TK_VERSION@
WISH = wish$(TK_VERSION)
TCL_SRC_DIR = @TCL_SRC_DIR@
TK_SRC_DIR = @TK_SRC_DIR@
TK_LIB_SPEC = @TK_LIB_SPEC@
TK_STUB_LIB_SPEC = @TK_STUB_LIB_SPEC@
TK_LIBS = @TK_LIBS@
## The *_BUILD*_LIB_SPEC variables replace the non-BUILD ones when
## compiling against an uninstalled version of Tcl (not the default).
TK_BUILD_LIB_SPEC = @TK_BUILD_LIB_SPEC@
TK_BUILD_STUB_LIB_SPEC = @TK_BUILD_STUB_LIB_SPEC@
# Remove _STUB when not wanting to build with stubs support
LIBS = $(TK_STUB_LIB_SPEC) $(TK_LIBS)
TBL_CFLAGS = -O
## NO_EMBEDDED_RUNTIME means that the tkTable.tcl file will not be embedded
## into the executable, thus the default tkTable.tcl library file will not
## be available when the library is loaded.
## If this is defined, the tkTable.tcl file must be available in a
## predefined set of directories (see docs).
#TBL_CFLAGS += -DNO_EMBEDDED_RUNTIME
## USE_EXIT_HANDLER is necessary for 8.1 before b3 and 8.0
## It is a work-around for the improper unloading of DLLs when exiting
#TBL_CFLAGS += -DUSE_EXIT_HANDLER
## NO_SORT_CELLS changes the behavior of certain commands (like curselection)
## to not sort the cells before returning them. If this is not important to
## you, it can cut save significant time for large return sets (> 1000 cells).
## You can always pass the data to [lsort -dictionary $cells] to get the same
## result.
#TBL_CFLAGS += -DNO_SORT_CELLS
## Experimental, not documented, not complete...
#TBL_CFLAGS += -DPROCS
## I use this for helping hunt down the slightest error
#TBL_CFLAGS += -g -Wall -Wno-implicit -Wshadow -pedantic \
-Wpointer-arith -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -Winline
## Jeff's magic extra debug flag
#TBL_CFLAGS += -DDEBUG
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
RM = rm -f
RANLIB = @TCL_RANLIB@
SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
SHLIB_LD = @TCL_SHLIB_LD@
SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
TCL_PREFIX = @TCL_PREFIX@
## HP cc sometimes requires -Aa for proper ansi compilation
TCL_CFLAGS = $(STUBS_FLAGS) $(TBL_CFLAGS) @TCL_DEFS@ @TCL_CFLAGS@
TCL_LD_FLAGS = @TCL_LD_FLAGS@
TK_LD_SEARCH_FLAGS = @TK_LD_SEARCH_FLAGS@
TK_XINCLUDES = @TK_XINCLUDES@
LIB_RUNTIME_DIR = @libdir@
INCLUDES = -I@includedir@ $(TK_XINCLUDES)\
-I$(TCL_SRC_DIR)/generic\
-I$(TK_SRC_DIR)/generic
DLL = $(PACKAGE)$(SHLIB_SUFFIX)
STATIC_LIB = $(PACKAGE).a
PKG_DIR = $(PACKAGE)$(TBL_VERSION)
STATIC_EXEC = tablewish
DLL_DIR = ${exec_prefix}/lib/$(PKG_DIR)
RUN_DIR = ${prefix}/lib/$(PKG_DIR)
CFLAGS = -I. -I$(GENERIC_DIR) $(INCLUDES)\
$(TCL_CFLAGS) $(SHLIB_CFLAGS)\
-DTBL_VERSION=\"$(TBL_VERSION)\"\
-DTBL_COMMAND=\"$(TBL_COMMAND)\"\
-DTBL_RUNTIME=\"$(TBL_RUNTIME)\"\
-DTBL_RUNTIME_DIR=\"$(RUN_DIR)\"
MAN_INSTALL_DIR = @mandir@/mann
##
## TARGETS
##
all: $(DLL) pkgIndex.tcl
$(DLL): $(OBJS)
$(SHLIB_LD) -o $@ $(OBJS) $(SHLIB_LD_LIBS) $(TK_LD_SEARCH_FLAGS)
# The megawish builds may not work anymore - I don't use anything but
# extensions nowadays.
tablewish: tkAppInit.o $(OBJS)
wish: tkAppInit.o $(OBJS)
$(CC) $(TK_LD_SEARCH_FLAGS) -o $(STATIC_EXEC) tkAppInit.o $(OBJS) \
$(LIBS)
static $(STATIC_LIB): $(OBJS) pkgIndex.tcl
$(RM) $(STATIC_LIB)
ar cr $(STATIC_LIB) $(OBJS)
$(RANLIB) $(STATIC_LIB)
tkTable.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTable.c \
$(GENERIC_DIR)/tkTableInitScript.h tkTable.tcl.h
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTableCell.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTableCell.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTableCellSort.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTableCellSort.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTableCmds.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTableCmds.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTableEdit.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTableEdit.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTableTag.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTableTag.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTablePs.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTablePs.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTableWin.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTableWin.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTableUtil.o: $(GENERIC_DIR)/tkTable.h $(GENERIC_DIR)/tkTableUtil.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(GENERIC_DIR)/$*.c -o $@
tkTable.tcl.h: $(LIB_DIR)/tkTable.tcl
sed -e '/^$\#/d' -e '/^$$/d' -e 's/\"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' <$(LIB_DIR)/tkTable.tcl > $@ || { $(RM) $@; exit 1; }
## If you are using stubs, this first one should work, as stubs are OK
## for 8.1+ (not 8.0 because of UTF calls). We require 8.2 because
## there is a missing X stub in 8.1 (nobody needs 8.1 anyway).
pkgIndex.tcl:
(echo 'if {[catch {package require Tcl 8.2}]} return';\
echo 'package ifneeded $(PACKAGE) $(TBL_VERSION)\
"package require Tk 8.2;\
[list load [file join $$dir $(DLL).$(TBL_VERSION)] $(PACKAGE)]"'\
) > pkgIndex.tcl
pkgIndex.tcl-NOSTUBS:
(echo 'if {[catch {package require Tcl $(TCL_VERSION)}]} return';\
echo 'package ifneeded $(PACKAGE) $(TBL_VERSION)\
"package require Tk $(TK_VERSION);\
[list load [file join $$dir $(DLL).$(TBL_VERSION)] $(PACKAGE)]"'\
) > pkgIndex.tcl
html:
nroff -man $(DOC_DIR)/tkTable.n | rman -f HTML >$(DOC_DIR)/tkTable.html
install: all
if test ! -d "$(DLL_DIR)"; then mkdir "$(DLL_DIR)"; fi
if test ! -d "$(RUN_DIR)"; then mkdir "$(RUN_DIR)"; fi
$(INSTALL_PROGRAM) $(DLL) "$(DLL_DIR)/$(DLL).$(TBL_VERSION)"
$(INSTALL_DATA) pkgIndex.tcl "$(DLL_DIR)/pkgIndex.tcl"
$(INSTALL_DATA) $(LIB_DIR)/tkTable.tcl "$(RUN_DIR)/tkTable.tcl"
$(INSTALL_DATA) $(DOC_DIR)/$(MANS) $(MAN_INSTALL_DIR)/
# Leaves behind created directories
uninstall:
$(RM) "$(DLL_DIR)/$(DLL).$(TBL_VERSION)" "$(DLL_DIR)/pkgIndex.tcl" "$(RUN_DIR)/tkTable.tcl" $(MAN_INSTALL_DIR)/$(MANS)
test: all
LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \
LIBPATH=`pwd`:${TCL_BIN_DIR}:${LIBPATH}; export LIBPATH; \
SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; export SHLIB_PATH; \
TK_TABLE_LIBRARY=$(LIB_DIR); export TK_TABLE_LIBRARY; \
$(WISH) $(TEST_DIR)/all.tcl -geometry +100+100 $(TESTFLAGS)
clean:
$(RM) $(OBJS) $(DLL) $(STATIC_LIB) $(STATIC_EXEC) core pkgIndex.tcl tkTable.tcl.h
distclean: clean
$(RM) Makefile config.cache config.log config.status $(DOC_DIR)/tkTable.html
cleanall: bindist-clean dist-clean distclean
COMPEXE = @COMPEXE@
COMPEXT = @COMPEXT@
COMPRESS = tar cvf - $(PKG_DIR) | $(COMPEXE) > $(PKG_DIR).tar.$(COMPEXT)
SYSID = @SYSID@
DIST_ROOT = /tmp/dist
DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
# A binary distribution varies from the regular install in that
# everything goes in one directory.
bindist:
if test ! -d "$(PKG_DIR)"; then mkdir "$(PKG_DIR)"; fi
if test ! -d "$(PKG_DIR)/demos"; then mkdir "$(PKG_DIR)/demos"; fi
$(INSTALL_PROGRAM) $(DLL) "$(PKG_DIR)/$(DLL).$(TBL_VERSION)"
$(INSTALL_DATA) pkgIndex.tcl "$(PKG_DIR)/pkgIndex.tcl"
$(INSTALL_DATA) $(LIB_DIR)/tkTable.tcl "$(PKG_DIR)/tkTable.tcl"
$(INSTALL_DATA) $(DOC_DIR)/$(HTML_MANS) $(PKG_DIR)/
$(INSTALL_DATA) $(DEMO_DIR)/*.tcl $(DEMO_DIR)/*.gif $(PKG_DIR)/demos/
(echo "TkTable $(TBL_VERSION)";\
echo "Install this directory next to lib/tcl8.x and lib/tk8.x";\
echo "You can then use TkTable with a simple:";\
echo " package require Tktable";\
) > $(PKG_DIR)/README.install
$(COMPRESS)
mv $(PKG_DIR).tar.$(COMPEXT) $(PKG_DIR)-$(SYSID).tar.$(COMPEXT)
bindist-clean:
rm -rf $(PKG_DIR) $(PKG_DIR)-$(SYSID).tar.$(COMPEXT)
$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in
autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure
dist-clean:
rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.$(COMPEXT)
dist: dist-clean html $(UNIX_DIR)/configure
mkdir -p $(DIST_DIR)
cp -p $(TOP_DIR)/*.txt $(TOP_DIR)/README* $(TOP_DIR)/ChangeLog \
$(DIST_DIR)
mkdir $(DIST_DIR)/demos
cp -p $(DEMO_DIR)/*.{tcl,gif} $(DIST_DIR)/demos
mkdir $(DIST_DIR)/doc
cp -p $(DOC_DIR)/*.{n,html} $(DIST_DIR)/doc
mkdir $(DIST_DIR)/generic
cp -p $(GENERIC_DIR)/*.[ch] $(DIST_DIR)/generic
mkdir $(DIST_DIR)/library
cp -p $(LIB_DIR)/*.tcl $(DIST_DIR)/library
mkdir $(DIST_DIR)/mac
cp -p $(MAC_DIR)/*.{mcp,h,r} $(DIST_DIR)/mac
mkdir $(DIST_DIR)/tests
cp -p $(TEST_DIR)/*.{tcl,test} $(DIST_DIR)/tests
mkdir $(DIST_DIR)/unix
cp $(UNIX_DIR)/Makefile.in $(UNIX_DIR)/install-sh \
$(UNIX_DIR)/configure $(UNIX_DIR)/configure.in \
$(DIST_DIR)/unix
chmod 664 $(DIST_DIR)/unix/Makefile.in
chmod 775 $(DIST_DIR)/unix/configure $(DIST_DIR)/unix/configure.in
chmod +x $(DIST_DIR)/unix/install-sh
mkdir $(DIST_DIR)/win
cp -p $(WIN_DIR)/makefile.vc $(DIST_DIR)/win
(cd $(DIST_ROOT); $(COMPRESS);)
|