sqlmath 0.0.1 → 2021.11.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.npmignore +10 -0
  2. package/CHANGELOG.md +53 -2
  3. package/LICENSE +16 -22
  4. package/README.md +18 -219
  5. package/_binary_sqlmath_napi8_darwin_x64.node +0 -0
  6. package/_binary_sqlmath_napi8_linux_x64.node +0 -0
  7. package/_binary_sqlmath_napi8_win32_x64.node +0 -0
  8. package/jslint.mjs +10998 -0
  9. package/package.json +23 -8
  10. package/sqlmath.mjs +1713 -0
  11. package/.gitconfig +0 -25
  12. package/.github/workflows/ci.yml +0 -61
  13. package/.gitignore +0 -24
  14. package/extension-functions.c +0 -2047
  15. package/jslint_ci.sh +0 -1968
  16. package/node_sqlite3.cc +0 -11877
  17. package/sqlite-autoconf-3360000/INSTALL +0 -370
  18. package/sqlite-autoconf-3360000/Makefile.am +0 -20
  19. package/sqlite-autoconf-3360000/Makefile.fallback +0 -19
  20. package/sqlite-autoconf-3360000/Makefile.in +0 -1028
  21. package/sqlite-autoconf-3360000/Makefile.msc +0 -1037
  22. package/sqlite-autoconf-3360000/README.txt +0 -113
  23. package/sqlite-autoconf-3360000/Replace.cs +0 -223
  24. package/sqlite-autoconf-3360000/aclocal.m4 +0 -10199
  25. package/sqlite-autoconf-3360000/compile +0 -347
  26. package/sqlite-autoconf-3360000/config.guess +0 -1480
  27. package/sqlite-autoconf-3360000/config.sub +0 -1801
  28. package/sqlite-autoconf-3360000/configure +0 -16135
  29. package/sqlite-autoconf-3360000/configure.ac +0 -285
  30. package/sqlite-autoconf-3360000/depcomp +0 -791
  31. package/sqlite-autoconf-3360000/install-sh +0 -508
  32. package/sqlite-autoconf-3360000/ltmain.sh +0 -11156
  33. package/sqlite-autoconf-3360000/missing +0 -215
  34. package/sqlite-autoconf-3360000/shell.c +0 -22381
  35. package/sqlite-autoconf-3360000/sqlite3.1 +0 -286
  36. package/sqlite-autoconf-3360000/sqlite3.c +0 -235517
  37. package/sqlite-autoconf-3360000/sqlite3.h +0 -12353
  38. package/sqlite-autoconf-3360000/sqlite3.pc.in +0 -13
  39. package/sqlite-autoconf-3360000/sqlite3.rc +0 -83
  40. package/sqlite-autoconf-3360000/sqlite3ext.h +0 -663
  41. package/sqlite-autoconf-3360000/sqlite3rc.h +0 -3
  42. package/sqlite-autoconf-3360000/tea/Makefile.in +0 -440
  43. package/sqlite-autoconf-3360000/tea/README +0 -36
  44. package/sqlite-autoconf-3360000/tea/aclocal.m4 +0 -9
  45. package/sqlite-autoconf-3360000/tea/configure +0 -9989
  46. package/sqlite-autoconf-3360000/tea/configure.ac +0 -201
  47. package/sqlite-autoconf-3360000/tea/doc/sqlite3.n +0 -15
  48. package/sqlite-autoconf-3360000/tea/generic/tclsqlite3.c +0 -4016
  49. package/sqlite-autoconf-3360000/tea/license.terms +0 -6
  50. package/sqlite-autoconf-3360000/tea/pkgIndex.tcl.in +0 -7
  51. package/sqlite-autoconf-3360000/tea/tclconfig/install-sh +0 -528
  52. package/sqlite-autoconf-3360000/tea/tclconfig/tcl.m4 +0 -4168
  53. package/sqlite-autoconf-3360000/tea/win/makefile.vc +0 -419
  54. package/sqlite-autoconf-3360000/tea/win/nmakehlp.c +0 -815
  55. package/sqlite-autoconf-3360000/tea/win/rules.vc +0 -711
  56. package/sqlmath.js +0 -238
  57. package/test/backup.test.js +0 -279
  58. package/test/blob.test.js +0 -54
  59. package/test/cache.test.js +0 -42
  60. package/test/constants.test.js +0 -44
  61. package/test/database_fail.test.js +0 -153
  62. package/test/each.test.js +0 -39
  63. package/test/exec.test.js +0 -39
  64. package/test/extension.test.js +0 -26
  65. package/test/extension_functions.test.js +0 -29
  66. package/test/fts-content.test.js +0 -13
  67. package/test/interrupt.test.js +0 -80
  68. package/test/issue-108.test.js +0 -28
  69. package/test/json.test.js +0 -22
  70. package/test/map.test.js +0 -63
  71. package/test/named_columns.test.js +0 -38
  72. package/test/named_params.test.js +0 -69
  73. package/test/null_error.test.js +0 -41
  74. package/test/nw/.gitignore +0 -3
  75. package/test/nw/Makefile +0 -39
  76. package/test/nw/index.html +0 -14
  77. package/test/nw/package.json +0 -9
  78. package/test/open_close.test.js +0 -187
  79. package/test/other_objects.test.js +0 -98
  80. package/test/parallel_insert.test.js +0 -44
  81. package/test/prepare.test.js +0 -427
  82. package/test/profile.test.js +0 -57
  83. package/test/rerun.test.js +0 -50
  84. package/test/scheduling.test.js +0 -44
  85. package/test/serialization.test.js +0 -104
  86. package/test/support/createdb-electron.js +0 -10
  87. package/test/support/createdb.js +0 -47
  88. package/test/support/elmo.png +0 -0
  89. package/test/support/helper.js +0 -37
  90. package/test/support/script.sql +0 -70
  91. package/test/trace.test.js +0 -67
  92. package/test/unicode.test.js +0 -114
  93. package/test/upsert.test.js +0 -27
  94. package/test/verbose.test.js +0 -60
  95. package/test.js +0 -141
  96. package/test.slr.mjs +0 -212
@@ -1,711 +0,0 @@
1
- #------------------------------------------------------------------------------
2
- # rules.vc --
3
- #
4
- # Microsoft Visual C++ makefile include for decoding the commandline
5
- # macros. This file does not need editing to build Tcl.
6
- #
7
- # See the file "license.terms" for information on usage and redistribution
8
- # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9
- #
10
- # Copyright (c) 2001-2003 David Gravereaux.
11
- # Copyright (c) 2003-2008 Patrick Thoyts
12
- #------------------------------------------------------------------------------
13
-
14
- !ifndef _RULES_VC
15
- _RULES_VC = 1
16
-
17
- cc32 = $(CC) # built-in default.
18
- link32 = link
19
- lib32 = lib
20
- rc32 = $(RC) # built-in default.
21
-
22
- !ifndef INSTALLDIR
23
- ### Assume the normal default.
24
- _INSTALLDIR = C:\Program Files\Tcl
25
- !else
26
- ### Fix the path separators.
27
- _INSTALLDIR = $(INSTALLDIR:/=\)
28
- !endif
29
-
30
- #----------------------------------------------------------
31
- # Set the proper copy method to avoid overwrite questions
32
- # to the user when copying files and selecting the right
33
- # "delete all" method.
34
- #----------------------------------------------------------
35
-
36
- !if "$(OS)" == "Windows_NT"
37
- RMDIR = rmdir /S /Q
38
- ERRNULL = 2>NUL
39
- !if ![ver | find "4.0" > nul]
40
- CPY = echo y | xcopy /i >NUL
41
- COPY = copy >NUL
42
- !else
43
- CPY = xcopy /i /y >NUL
44
- COPY = copy /y >NUL
45
- !endif
46
- !else # "$(OS)" != "Windows_NT"
47
- CPY = xcopy /i >_JUNK.OUT # On Win98 NUL does not work here.
48
- COPY = copy >_JUNK.OUT # On Win98 NUL does not work here.
49
- RMDIR = deltree /Y
50
- NULL = \NUL # Used in testing directory existence
51
- ERRNULL = >NUL # Win9x shell cannot redirect stderr
52
- !endif
53
- MKDIR = mkdir
54
-
55
- #------------------------------------------------------------------------------
56
- # Determine the host and target architectures and compiler version.
57
- #------------------------------------------------------------------------------
58
-
59
- _HASH=^#
60
- _VC_MANIFEST_EMBED_EXE=
61
- _VC_MANIFEST_EMBED_DLL=
62
- VCVER=0
63
- !if ![echo VCVERSION=_MSC_VER > vercl.x] \
64
- && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
65
- && ![echo ARCH=IX86 >> vercl.x] \
66
- && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
67
- && ![echo ARCH=AMD64 >> vercl.x] \
68
- && ![echo $(_HASH)endif >> vercl.x] \
69
- && ![cl -nologo -TC -P vercl.x $(ERRNULL)]
70
- !include vercl.i
71
- !if ![echo VCVER= ^\> vercl.vc] \
72
- && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
73
- !include vercl.vc
74
- !endif
75
- !endif
76
- !if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
77
- !endif
78
-
79
- !if ![reg query HKLM\Hardware\Description\System\CentralProcessor\0 /v Identifier | findstr /i x86]
80
- NATIVE_ARCH=IX86
81
- !else
82
- NATIVE_ARCH=AMD64
83
- !endif
84
-
85
- # Since MSVC8 we must deal with manifest resources.
86
- !if $(VCVERSION) >= 1400
87
- _VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1
88
- _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2
89
- !endif
90
-
91
- !ifndef MACHINE
92
- MACHINE=$(ARCH)
93
- !endif
94
-
95
- !ifndef CFG_ENCODING
96
- CFG_ENCODING = \"cp1252\"
97
- !endif
98
-
99
- !message ===============================================================================
100
-
101
- #----------------------------------------------------------
102
- # build the helper app we need to overcome nmake's limiting
103
- # environment.
104
- #----------------------------------------------------------
105
-
106
- !if !exist(nmakehlp.exe)
107
- !if [$(cc32) -nologo nmakehlp.c -link -subsystem:console > nul]
108
- !endif
109
- !endif
110
-
111
- #----------------------------------------------------------
112
- # Test for compiler features
113
- #----------------------------------------------------------
114
-
115
- ### test for optimizations
116
- !if [nmakehlp -c -Ot]
117
- !message *** Compiler has 'Optimizations'
118
- OPTIMIZING = 1
119
- !else
120
- !message *** Compiler does not have 'Optimizations'
121
- OPTIMIZING = 0
122
- !endif
123
-
124
- OPTIMIZATIONS =
125
-
126
- !if [nmakehlp -c -Ot]
127
- OPTIMIZATIONS = $(OPTIMIZATIONS) -Ot
128
- !endif
129
-
130
- !if [nmakehlp -c -Oi]
131
- OPTIMIZATIONS = $(OPTIMIZATIONS) -Oi
132
- !endif
133
-
134
- !if [nmakehlp -c -Op]
135
- OPTIMIZATIONS = $(OPTIMIZATIONS) -Op
136
- !endif
137
-
138
- !if [nmakehlp -c -fp:strict]
139
- OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:strict
140
- !endif
141
-
142
- !if [nmakehlp -c -Gs]
143
- OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs
144
- !endif
145
-
146
- !if [nmakehlp -c -GS]
147
- OPTIMIZATIONS = $(OPTIMIZATIONS) -GS
148
- !endif
149
-
150
- !if [nmakehlp -c -GL]
151
- OPTIMIZATIONS = $(OPTIMIZATIONS) -GL
152
- !endif
153
-
154
- DEBUGFLAGS =
155
-
156
- !if [nmakehlp -c -RTC1]
157
- DEBUGFLAGS = $(DEBUGFLAGS) -RTC1
158
- !elseif [nmakehlp -c -GZ]
159
- DEBUGFLAGS = $(DEBUGFLAGS) -GZ
160
- !endif
161
-
162
- COMPILERFLAGS =-W3 -DUNICODE -D_UNICODE
163
-
164
- # In v13 -GL and -YX are incompatible.
165
- !if [nmakehlp -c -YX]
166
- !if ![nmakehlp -c -GL]
167
- OPTIMIZATIONS = $(OPTIMIZATIONS) -YX
168
- !endif
169
- !endif
170
-
171
- !if "$(MACHINE)" == "IX86"
172
- ### test for pentium errata
173
- !if [nmakehlp -c -QI0f]
174
- !message *** Compiler has 'Pentium 0x0f fix'
175
- COMPILERFLAGS = $(COMPILERFLAGS) -QI0f
176
- !else
177
- !message *** Compiler does not have 'Pentium 0x0f fix'
178
- !endif
179
- !endif
180
-
181
- !if "$(MACHINE)" == "IA64"
182
- ### test for Itanium errata
183
- !if [nmakehlp -c -QIA64_Bx]
184
- !message *** Compiler has 'B-stepping errata workarounds'
185
- COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx
186
- !else
187
- !message *** Compiler does not have 'B-stepping errata workarounds'
188
- !endif
189
- !endif
190
-
191
- !if "$(MACHINE)" == "IX86"
192
- ### test for -align:4096, when align:512 will do.
193
- !if [nmakehlp -l -opt:nowin98]
194
- !message *** Linker has 'Win98 alignment problem'
195
- ALIGN98_HACK = 1
196
- !else
197
- !message *** Linker does not have 'Win98 alignment problem'
198
- ALIGN98_HACK = 0
199
- !endif
200
- !else
201
- ALIGN98_HACK = 0
202
- !endif
203
-
204
- LINKERFLAGS =
205
-
206
- !if [nmakehlp -l -ltcg]
207
- LINKERFLAGS =-ltcg
208
- !endif
209
-
210
- #----------------------------------------------------------
211
- # Decode the options requested.
212
- #----------------------------------------------------------
213
-
214
- !if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"]
215
- STATIC_BUILD = 0
216
- TCL_THREADS = 1
217
- DEBUG = 0
218
- SYMBOLS = 0
219
- PROFILE = 0
220
- PGO = 0
221
- MSVCRT = 0
222
- LOIMPACT = 0
223
- TCL_USE_STATIC_PACKAGES = 0
224
- USE_THREAD_ALLOC = 1
225
- UNCHECKED = 0
226
- !else
227
- !if [nmakehlp -f $(OPTS) "static"]
228
- !message *** Doing static
229
- STATIC_BUILD = 1
230
- !else
231
- STATIC_BUILD = 0
232
- !endif
233
- !if [nmakehlp -f $(OPTS) "msvcrt"]
234
- !message *** Doing msvcrt
235
- MSVCRT = 1
236
- !else
237
- MSVCRT = 0
238
- !endif
239
- !if [nmakehlp -f $(OPTS) "staticpkg"]
240
- !message *** Doing staticpkg
241
- TCL_USE_STATIC_PACKAGES = 1
242
- !else
243
- TCL_USE_STATIC_PACKAGES = 0
244
- !endif
245
- !if [nmakehlp -f $(OPTS) "nothreads"]
246
- !message *** Compile explicitly for non-threaded tcl
247
- TCL_THREADS = 0
248
- !else
249
- TCL_THREADS = 1
250
- USE_THREAD_ALLOC= 1
251
- !endif
252
- !if [nmakehlp -f $(OPTS) "symbols"]
253
- !message *** Doing symbols
254
- DEBUG = 1
255
- !else
256
- DEBUG = 0
257
- !endif
258
- !if [nmakehlp -f $(OPTS) "pdbs"]
259
- !message *** Doing pdbs
260
- SYMBOLS = 1
261
- !else
262
- SYMBOLS = 0
263
- !endif
264
- !if [nmakehlp -f $(OPTS) "profile"]
265
- !message *** Doing profile
266
- PROFILE = 1
267
- !else
268
- PROFILE = 0
269
- !endif
270
- !if [nmakehlp -f $(OPTS) "pgi"]
271
- !message *** Doing profile guided optimization instrumentation
272
- PGO = 1
273
- !elseif [nmakehlp -f $(OPTS) "pgo"]
274
- !message *** Doing profile guided optimization
275
- PGO = 2
276
- !else
277
- PGO = 0
278
- !endif
279
- !if [nmakehlp -f $(OPTS) "loimpact"]
280
- !message *** Doing loimpact
281
- LOIMPACT = 1
282
- !else
283
- LOIMPACT = 0
284
- !endif
285
- !if [nmakehlp -f $(OPTS) "thrdalloc"]
286
- !message *** Doing thrdalloc
287
- USE_THREAD_ALLOC = 1
288
- !endif
289
- !if [nmakehlp -f $(OPTS) "tclalloc"]
290
- !message *** Doing tclalloc
291
- USE_THREAD_ALLOC = 0
292
- !endif
293
- !if [nmakehlp -f $(OPTS) "unchecked"]
294
- !message *** Doing unchecked
295
- UNCHECKED = 1
296
- !else
297
- UNCHECKED = 0
298
- !endif
299
- !endif
300
-
301
-
302
- !if !$(STATIC_BUILD)
303
- # Make sure we don't build overly fat DLLs.
304
- MSVCRT = 1
305
- # We shouldn't statically put the extensions inside the shell when dynamic.
306
- TCL_USE_STATIC_PACKAGES = 0
307
- !endif
308
-
309
-
310
- #----------------------------------------------------------
311
- # Figure-out how to name our intermediate and output directories.
312
- # We wouldn't want different builds to use the same .obj files
313
- # by accident.
314
- #----------------------------------------------------------
315
-
316
- #----------------------------------------
317
- # Naming convention:
318
- # t = full thread support.
319
- # s = static library (as opposed to an
320
- # import library)
321
- # g = linked to the debug enabled C
322
- # run-time.
323
- # x = special static build when it
324
- # links to the dynamic C run-time.
325
- #----------------------------------------
326
- SUFX = tsgx
327
-
328
- !if $(DEBUG)
329
- BUILDDIRTOP = Debug
330
- !else
331
- BUILDDIRTOP = Release
332
- !endif
333
-
334
- !if "$(MACHINE)" != "IX86"
335
- BUILDDIRTOP =$(BUILDDIRTOP)_$(MACHINE)
336
- !endif
337
- !if $(VCVER) > 6
338
- BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
339
- !endif
340
-
341
- !if !$(DEBUG) || $(DEBUG) && $(UNCHECKED)
342
- SUFX = $(SUFX:g=)
343
- !endif
344
-
345
- TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX
346
-
347
- !if !$(STATIC_BUILD)
348
- TMP_DIRFULL = $(TMP_DIRFULL:Static=)
349
- SUFX = $(SUFX:s=)
350
- EXT = dll
351
- !if $(MSVCRT)
352
- TMP_DIRFULL = $(TMP_DIRFULL:X=)
353
- SUFX = $(SUFX:x=)
354
- !endif
355
- !else
356
- TMP_DIRFULL = $(TMP_DIRFULL:Dynamic=)
357
- EXT = lib
358
- !if !$(MSVCRT)
359
- TMP_DIRFULL = $(TMP_DIRFULL:X=)
360
- SUFX = $(SUFX:x=)
361
- !endif
362
- !endif
363
-
364
- !if !$(TCL_THREADS)
365
- TMP_DIRFULL = $(TMP_DIRFULL:Threaded=)
366
- SUFX = $(SUFX:t=)
367
- !endif
368
-
369
- !ifndef TMP_DIR
370
- TMP_DIR = $(TMP_DIRFULL)
371
- !ifndef OUT_DIR
372
- OUT_DIR = .\$(BUILDDIRTOP)
373
- !endif
374
- !else
375
- !ifndef OUT_DIR
376
- OUT_DIR = $(TMP_DIR)
377
- !endif
378
- !endif
379
-
380
-
381
- #----------------------------------------------------------
382
- # Decode the statistics requested.
383
- #----------------------------------------------------------
384
-
385
- !if "$(STATS)" == "" || [nmakehlp -f "$(STATS)" "none"]
386
- TCL_MEM_DEBUG = 0
387
- TCL_COMPILE_DEBUG = 0
388
- !else
389
- !if [nmakehlp -f $(STATS) "memdbg"]
390
- !message *** Doing memdbg
391
- TCL_MEM_DEBUG = 1
392
- !else
393
- TCL_MEM_DEBUG = 0
394
- !endif
395
- !if [nmakehlp -f $(STATS) "compdbg"]
396
- !message *** Doing compdbg
397
- TCL_COMPILE_DEBUG = 1
398
- !else
399
- TCL_COMPILE_DEBUG = 0
400
- !endif
401
- !endif
402
-
403
-
404
- #----------------------------------------------------------
405
- # Decode the checks requested.
406
- #----------------------------------------------------------
407
-
408
- !if "$(CHECKS)" == "" || [nmakehlp -f "$(CHECKS)" "none"]
409
- TCL_NO_DEPRECATED = 0
410
- WARNINGS = -W3
411
- !else
412
- !if [nmakehlp -f $(CHECKS) "nodep"]
413
- !message *** Doing nodep check
414
- TCL_NO_DEPRECATED = 1
415
- !else
416
- TCL_NO_DEPRECATED = 0
417
- !endif
418
- !if [nmakehlp -f $(CHECKS) "fullwarn"]
419
- !message *** Doing full warnings check
420
- WARNINGS = -W4
421
- !if [nmakehlp -l -warn:3]
422
- LINKERFLAGS = $(LINKERFLAGS) -warn:3
423
- !endif
424
- !else
425
- WARNINGS = -W3
426
- !endif
427
- !if [nmakehlp -f $(CHECKS) "64bit"] && [nmakehlp -c -Wp64]
428
- !message *** Doing 64bit portability warnings
429
- WARNINGS = $(WARNINGS) -Wp64
430
- !endif
431
- !endif
432
-
433
- !if $(PGO) > 1
434
- !if [nmakehlp -l -ltcg:pgoptimize]
435
- LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize
436
- !else
437
- MSG=^
438
- This compiler does not support profile guided optimization.
439
- !error $(MSG)
440
- !endif
441
- !elseif $(PGO) > 0
442
- !if [nmakehlp -l -ltcg:pginstrument]
443
- LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument
444
- !else
445
- MSG=^
446
- This compiler does not support profile guided optimization.
447
- !error $(MSG)
448
- !endif
449
- !endif
450
-
451
- #----------------------------------------------------------
452
- # Set our defines now armed with our options.
453
- #----------------------------------------------------------
454
-
455
- OPTDEFINES = -DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) -DSTDC_HEADERS
456
-
457
- !if $(TCL_MEM_DEBUG)
458
- OPTDEFINES = $(OPTDEFINES) -DTCL_MEM_DEBUG
459
- !endif
460
- !if $(TCL_COMPILE_DEBUG)
461
- OPTDEFINES = $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS
462
- !endif
463
- !if $(TCL_THREADS)
464
- OPTDEFINES = $(OPTDEFINES) -DTCL_THREADS=1
465
- !if $(USE_THREAD_ALLOC)
466
- OPTDEFINES = $(OPTDEFINES) -DUSE_THREAD_ALLOC=1
467
- !endif
468
- !endif
469
- !if $(STATIC_BUILD)
470
- OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD
471
- !endif
472
- !if $(TCL_NO_DEPRECATED)
473
- OPTDEFINES = $(OPTDEFINES) -DTCL_NO_DEPRECATED
474
- !endif
475
-
476
- !if !$(DEBUG)
477
- OPTDEFINES = $(OPTDEFINES) -DNDEBUG
478
- !if $(OPTIMIZING)
479
- OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_OPTIMIZED
480
- !endif
481
- !endif
482
- !if $(PROFILE)
483
- OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_PROFILED
484
- !endif
485
- !if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
486
- OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT
487
- !endif
488
- !if $(VCVERSION) < 1300
489
- OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64
490
- !endif
491
-
492
- #----------------------------------------------------------
493
- # Locate the Tcl headers to build against
494
- #----------------------------------------------------------
495
-
496
- !if "$(PROJECT)" == "tcl"
497
-
498
- _TCL_H = ..\generic\tcl.h
499
-
500
- !else
501
-
502
- # If INSTALLDIR set to tcl root dir then reset to the lib dir.
503
- !if exist("$(_INSTALLDIR)\include\tcl.h")
504
- _INSTALLDIR=$(_INSTALLDIR)\lib
505
- !endif
506
-
507
- !if !defined(TCLDIR)
508
- !if exist("$(_INSTALLDIR)\..\include\tcl.h")
509
- TCLINSTALL = 1
510
- _TCLDIR = $(_INSTALLDIR)\..
511
- _TCL_H = $(_INSTALLDIR)\..\include\tcl.h
512
- TCLDIR = $(_INSTALLDIR)\..
513
- !else
514
- MSG=^
515
- Failed to find tcl.h. Set the TCLDIR macro.
516
- !error $(MSG)
517
- !endif
518
- !else
519
- _TCLDIR = $(TCLDIR:/=\)
520
- !if exist("$(_TCLDIR)\include\tcl.h")
521
- TCLINSTALL = 1
522
- _TCL_H = $(_TCLDIR)\include\tcl.h
523
- !elseif exist("$(_TCLDIR)\generic\tcl.h")
524
- TCLINSTALL = 0
525
- _TCL_H = $(_TCLDIR)\generic\tcl.h
526
- !else
527
- MSG =^
528
- Failed to find tcl.h. The TCLDIR macro does not appear correct.
529
- !error $(MSG)
530
- !endif
531
- !endif
532
- !endif
533
-
534
- #--------------------------------------------------------------
535
- # Extract various version numbers from tcl headers
536
- # The generated file is then included in the makefile.
537
- #--------------------------------------------------------------
538
-
539
- !if [echo REM = This file is generated from rules.vc > versions.vc]
540
- !endif
541
- !if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
542
- && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
543
- !endif
544
- !if [echo TCL_MINOR_VERSION = \>> versions.vc] \
545
- && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
546
- !endif
547
- !if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
548
- && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
549
- !endif
550
-
551
- # If building the tcl core then we need additional package versions
552
- !if "$(PROJECT)" == "tcl"
553
- !if [echo PKG_HTTP_VER = \>> versions.vc] \
554
- && [nmakehlp -V ..\library\http\pkgIndex.tcl http >> versions.vc]
555
- !endif
556
- !if [echo PKG_TCLTEST_VER = \>> versions.vc] \
557
- && [nmakehlp -V ..\library\tcltest\pkgIndex.tcl tcltest >> versions.vc]
558
- !endif
559
- !if [echo PKG_MSGCAT_VER = \>> versions.vc] \
560
- && [nmakehlp -V ..\library\msgcat\pkgIndex.tcl msgcat >> versions.vc]
561
- !endif
562
- !if [echo PKG_PLATFORM_VER = \>> versions.vc] \
563
- && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform " >> versions.vc]
564
- !endif
565
- !if [echo PKG_SHELL_VER = \>> versions.vc] \
566
- && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform::shell" >> versions.vc]
567
- !endif
568
- !if [echo PKG_DDE_VER = \>> versions.vc] \
569
- && [nmakehlp -V ..\library\dde\pkgIndex.tcl "dde " >> versions.vc]
570
- !endif
571
- !if [echo PKG_REG_VER =\>> versions.vc] \
572
- && [nmakehlp -V ..\library\reg\pkgIndex.tcl registry >> versions.vc]
573
- !endif
574
- !endif
575
-
576
- !include versions.vc
577
-
578
- #--------------------------------------------------------------
579
- # Setup tcl version dependent stuff headers
580
- #--------------------------------------------------------------
581
-
582
- !if "$(PROJECT)" != "tcl"
583
-
584
- TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
585
-
586
- !if $(TCL_VERSION) < 81
587
- TCL_DOES_STUBS = 0
588
- !else
589
- TCL_DOES_STUBS = 1
590
- !endif
591
-
592
- !if $(TCLINSTALL)
593
- TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
594
- !if !exist($(TCLSH)) && $(TCL_THREADS)
595
- TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe"
596
- !endif
597
- TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
598
- TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
599
- TCL_LIBRARY = $(_TCLDIR)\lib
600
- TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib"
601
- TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib"
602
- COFFBASE = \must\have\tcl\sources\to\build\this\target
603
- TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
604
- TCL_INCLUDES = -I"$(_TCLDIR)\include"
605
- !else
606
- TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe"
607
- !if !exist($(TCLSH)) && $(TCL_THREADS)
608
- TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX).exe"
609
- !endif
610
- TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
611
- TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
612
- TCL_LIBRARY = $(_TCLDIR)\library
613
- TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib"
614
- TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib"
615
- COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
616
- TCLTOOLSDIR = $(_TCLDIR)\tools
617
- TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
618
- !endif
619
-
620
- !endif
621
-
622
- #-------------------------------------------------------------------------
623
- # Locate the Tk headers to build against
624
- #-------------------------------------------------------------------------
625
-
626
- !if "$(PROJECT)" == "tk"
627
- _TK_H = ..\generic\tk.h
628
- _INSTALLDIR = $(_INSTALLDIR)\..
629
- !endif
630
-
631
- !ifdef PROJECT_REQUIRES_TK
632
- !if !defined(TKDIR)
633
- !if exist("$(_INSTALLDIR)\..\include\tk.h")
634
- TKINSTALL = 1
635
- _TKDIR = $(_INSTALLDIR)\..
636
- _TK_H = $(_TKDIR)\include\tk.h
637
- TKDIR = $(_TKDIR)
638
- !elseif exist("$(_TCLDIR)\include\tk.h")
639
- TKINSTALL = 1
640
- _TKDIR = $(_TCLDIR)
641
- _TK_H = $(_TKDIR)\include\tk.h
642
- TKDIR = $(_TKDIR)
643
- !endif
644
- !else
645
- _TKDIR = $(TKDIR:/=\)
646
- !if exist("$(_TKDIR)\include\tk.h")
647
- TKINSTALL = 1
648
- _TK_H = $(_TKDIR)\include\tk.h
649
- !elseif exist("$(_TKDIR)\generic\tk.h")
650
- TKINSTALL = 0
651
- _TK_H = $(_TKDIR)\generic\tk.h
652
- !else
653
- MSG =^
654
- Failed to find tk.h. The TKDIR macro does not appear correct.
655
- !error $(MSG)
656
- !endif
657
- !endif
658
- !endif
659
-
660
- #-------------------------------------------------------------------------
661
- # Extract Tk version numbers
662
- #-------------------------------------------------------------------------
663
-
664
- !if defined(PROJECT_REQUIRES_TK) || "$(PROJECT)" == "tk"
665
-
666
- !if [echo TK_MAJOR_VERSION = \>> versions.vc] \
667
- && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
668
- !endif
669
- !if [echo TK_MINOR_VERSION = \>> versions.vc] \
670
- && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
671
- !endif
672
- !if [echo TK_PATCH_LEVEL = \>> versions.vc] \
673
- && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
674
- !endif
675
-
676
- !include versions.vc
677
-
678
- TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
679
- TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
680
-
681
- !if "$(PROJECT)" != "tk"
682
- !if $(TKINSTALL)
683
- WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX).exe"
684
- TKSTUBLIB = "$(_TKDIR)\lib\tkstub$(TK_VERSION).lib"
685
- TKIMPLIB = "$(_TKDIR)\lib\tk$(TK_VERSION)$(SUFX).lib"
686
- TK_INCLUDES = -I"$(_TKDIR)\include"
687
- !else
688
- WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe"
689
- TKSTUBLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib"
690
- TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib"
691
- TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
692
- !endif
693
- !endif
694
-
695
- !endif
696
-
697
- #----------------------------------------------------------
698
- # Display stats being used.
699
- #----------------------------------------------------------
700
-
701
- !message *** Intermediate directory will be '$(TMP_DIR)'
702
- !message *** Output directory will be '$(OUT_DIR)'
703
- !message *** Suffix for binaries will be '$(SUFX)'
704
- !message *** Optional defines are '$(OPTDEFINES)'
705
- !message *** Compiler version $(VCVER). Target machine is $(MACHINE)
706
- !message *** Host architecture is $(NATIVE_ARCH)
707
- !message *** Compiler options '$(COMPILERFLAGS) $(OPTIMIZATIONS) $(DEBUGFLAGS) $(WARNINGS)'
708
- !message *** Link options '$(LINKERFLAGS)'
709
-
710
- !endif
711
-