Fossil SCM

fossil-scm / tools / makemake.tcl
Blame History Raw 2147 lines
1
#!/usr/bin/tclsh
2
#
3
# ### Run this Tcl script EVERY time you modify it in any way! ###
4
# ### It must be run from the directory it lives in so that ###
5
# ### directories resolve properly! ###
6
#
7
# This Tcl script generates make files for various platforms. The makefiles
8
# then need to be committed.
9
#
10
# If you modify this file then:
11
#
12
# 1. cd tools; tclsh makemake.tcl
13
#
14
# 2. if errors are reported, fix them and go to step 1
15
#
16
# 3. if "fossil diff" reports changes in any of the generated
17
# files, commit the changed files to the repo
18
#
19
# Files generated include:
20
#
21
# src/main.mk # makefile for all unix systems
22
# win/Makefile.mingw # makefile for mingw on windows
23
# win/Makefile.* # makefiles for other windows compilers
24
#
25
# Add new source files by listing the files (without their .c suffix)
26
# in the "src" variable. Add new resource files to the "extra_files"
27
# variable. There are other variables that you can alter, down to
28
# the "STOP HERE" comment. The stuff below "STOP HERE" should rarely need
29
# to change. After modification, go to step 1 above.
30
#
31
# Delete unused source files in the "src" variable, then go to step 1 above.
32
#
33
#############################################################################
34
35
# $srcDir is used to set the target source dir in several places. Not
36
# all code-generation bits use $srcDir and instead hard-code, so
37
# replacing it only here (should it ever changes) is not suffiient.
38
#
39
set srcDir ../src
40
41
# Directory $srcDirExt houses single-file source code solutions which
42
# are imported directly into the fossil source tree.
43
set srcDirExt ../extsrc
44
45
# Basenames of all source files that get preprocessed using
46
# "translate" and "makeheaders". To add new C-language source files to the
47
# project, simply add the basename to this list and rerun this script.
48
#
49
# Set the separate extra_files variable further down for how to add non-C
50
# files, such as string and BLOB resources.
51
#
52
53
set src {
54
add
55
ajax
56
alerts
57
allrepo
58
attach
59
backlink
60
backoffice
61
bag
62
bisect
63
blob
64
branch
65
browse
66
builtin
67
bundle
68
cache
69
capabilities
70
captcha
71
cgi
72
chat
73
checkin
74
checkout
75
clearsign
76
clone
77
color
78
comformat
79
configure
80
content
81
cookies
82
db
83
delta
84
deltacmd
85
deltafunc
86
descendants
87
diff
88
diffcmd
89
dispatch
90
doc
91
encode
92
etag
93
event
94
extcgi
95
export
96
file
97
fileedit
98
finfo
99
foci
100
forum
101
fshell
102
fusefs
103
fuzz
104
glob
105
graph
106
gzip
107
hname
108
hook
109
http
110
http_socket
111
http_transport
112
import
113
info
114
interwiki
115
json
116
json_artifact
117
json_branch
118
json_config
119
json_diff
120
json_dir
121
json_finfo
122
json_login
123
json_query
124
json_report
125
json_status
126
json_tag
127
json_timeline
128
json_user
129
json_wiki
130
leaf
131
loadctrl
132
login
133
lookslike
134
main
135
manifest
136
markdown
137
markdown_html
138
match
139
md5
140
merge
141
merge3
142
moderate
143
name
144
patch
145
path
146
piechart
147
pikchrshow
148
pivot
149
popen
150
pqueue
151
printf
152
publish
153
purge
154
rebuild
155
regexp
156
repolist
157
report
158
robot
159
rss
160
schema
161
search
162
security_audit
163
setup
164
setupuser
165
sha1
166
sha1hard
167
sha3
168
shun
169
sitemap
170
skins
171
smtp
172
sqlcmd
173
stash
174
stat
175
statrep
176
style
177
sync
178
tag
179
tar
180
terminal
181
th_main
182
timeline
183
tkt
184
tktsetup
185
undo
186
unicode
187
unversioned
188
update
189
url
190
user
191
utf8
192
util
193
verify
194
vfile
195
wiki
196
wikiformat
197
winfile
198
winhttp
199
xfer
200
xfersetup
201
xsystem
202
zip
203
http_ssl
204
}
205
206
# Source files which live under $srcDirExt, but only those for which
207
# we need to run makeheaders. External sources which have their own
208
# header fle further down for how to add non-C
209
# files, such as string and BLOB resources.
210
#
211
212
set src {
213
add
214
ajax
215
alerts
216
allrepo
217
attach
218
backlink
219
backoffice
220
bag
221
bisect
222
blob
223
branch
224
browse
225
builtin
226
bundle
227
cache
228
capabilities
229
captcha
230
cgi
231
chat
232
checkin
233
checkout
234
clearsign
235
clone
236
color
237
comformat
238
configure
239
content
240
cookies
241
db
242
delta
243
deltacmd
244
deltafunc
245
descendants
246
diff
247
diffcmd
248
dispatch
249
doc
250
encode
251
etag
252
event
253
extcgi
254
export
255
file
256
fileedit
257
finfo
258
foci
259
forum
260
fshell
261
fusefs
262
fuzz
263
glob
264
graph
265
gzip
266
hname
267
hook
268
http
269
http_socket
270
http_transport
271
import
272
info
273
interwiki
274
json
275
json_artifact
276
json_branch
277
json_config
278
json_diff
279
json_dir
280
json_finfo
281
json_login
282
json_query
283
json_report
284
json_status
285
json_tag
286
json_timeline
287
json_user
288
json_wiki
289
leaf
290
loadctrl
291
login
292
lookslike
293
main
294
manifest
295
markdown
296
markdown_html
297
match
298
md5
299
merge
300
merge3
301
moderate
302
name
303
patch
304
path
305
piechart
306
pikchrshow
307
pivot
308
popen
309
pqueue
310
printf
311
publish
312
purge
313
rebuild
314
regexp
315
repolist
316
report
317
robot
318
rss
319
schema
320
search
321
security_audit
322
ssqlite3_register_tmstmpvfs
323
}
324
#lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1
325
#lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4
326
#lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI
327
#lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096
328
329
# Options used to compile the Pikchr library.
330
#
331
set PIKCHn/tclsh
332
#
333
# ### Run this Tcl script EVERY time you modify it in any way! ###
334
# ### It must be run from the directory it lives in so that ###
335
# ### directories resolve properly! ###
336
#
337
# This Tcl script generates make files for various platforms. The makefiles
338
# then need to be committed.
339
#
340
# If you modify this file then:
341
#
342
# 1. cd tools; tclsh makemake.tcl
343
#
344
# 2. if errors are reported, fix them and go to step 1
345
#
346
# 3. if "fossil diff" reports changes in any of the generated
347
# files, commit the changed files to the repo
348
#
349
# Files generated include:
350
#
351
# src/main.mk # makefile for all unix systems
352
# win/Makefile.mingw # makefile for mingw on windows
353
# win/Makefile.* # makefiles for other windows compilers
354
#
355
# Add new source files by listing the files (without their .c suffix)
356
# in the "src" variable. Add new resource files to the "extra_files"
357
# variable. There are other variables that you can alter, down to
358
# the "STOP HERE" comment. The stuff below "STOP HERE" should rarely need
359
# to change. After modification, go to step 1 above.
360
#
361
# Delete unused source files in the "src" variable, then go to step 1 above.
362
#
363
#############################################################################
364
365
# $srcDir is used to set the target source dir in several places. Not
366
# all code-generation bits use $srcDir and instead hard-code, "] \
367
<<<NEXT_LINE>>> \\] {
368
all: $(APPNAME)
369
370
install: all
371
mkdir -p $(INSTALLDIR)
372
cp $(APPNAME) $(INSTALLDIR)
373
374
codecheck: $(TRANS_SRC) $(OBJDIR)/codecheck1
375
$(OBJDIR)/codecheck1 $(TRANS_SRC)
376
377
$(OBJDIR)/translate: $(SRCDIR_tools)/translate.c
378
-mkdir -p $(OBJDIR)
379
$(XBCC) -o $(OBJDIR)/translate $(SRCDIR_tools)/translate.c
380
381
$(OBJDIR)/makeheaders: $(SRCDIR_tools)/makeheaders.c
382
-mkdir -p $(OBJDIR)
383
$(XBCC) -o $(OBJDIR)/makeheaders $(SRCDIR_tools)/makeheaders.c
384
385
$(OBJDIR)/mkindex: $(SRCDIR_tools)/mkindex.c
386
-mkdir -p $(OBJDIR)
387
$(XBCC) -o $(OBJDIR)/mkindex $(SRCDIR_tools)/mkindex.c
388
389
$(OBJDIR)/mkbuiltin: $(SRCDIR_tools)/mkbuiltin.c
390
-mkdir -p $(OBJDIR)
391
$(XBCC) -o $(OBJDIR)/mkbuiltin $(SRCDIR_tools)/mkbuiltin.c
392
393
$(OBJDIR)/mkversion: $(SRCDIR_tools)/mkversion.c
394
-mkdir -p $(OBJDIR)
395
$(XBCC) -o $(OBJDIR)/mkversion $(SRCDIR_tools)/mkversion.c
396
397
$(OBJDIR)/codecheck1: $(SRCDIR_tools)/codecheck1.c
398
-mkdir -p $(OBJDIR)
399
$(XBCC) -o $(OBJDIR)/codecheck1 $(SRCDIR_tools)/codecheck1.c
400
401
# Run the test suite.
402
# Other flags that can be included in TESTFLAGS are:
403
#
404
# -halt Stop testing after the first failed test
405
# -keep Keep the temporary workspace for debugging
406
# -prot Write a detailed log of the tests to the file ./prot
407
# -verbose Include even more details in the output
408
# -quiet Hide most output from the terminal
409
# -strict Treat known bugs as failures
410
#
411
# TESTFLAGS can also include names of specific test files to limit
412
# the run to just those test cases.
413
#
414
test: $(APPNAME)
415
$(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) $(TESTFLAGS)
416
417
$(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion $(OBJDIR)/phony.h
418
$(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid <<<NEXT_LINE>>>
419
$(SRCDIR)/../manifest <<<NEXT_LINE>>>
420
$(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
421
422
$(OBJDIR)/phony.h:
423
# Force rebuild of VERSION.h every time we run "make"
424
425
# Setup the options used to compile the included SQLite library.
426
SQLITE_OPTIONS = <<<SQLITE_OPTIONS>>>
427
428
# Setup the options used to compile the included SQLite shell.
429
SHELL_OPTIONS = <<<SHELL_OPTIONS>>>
430
431
# Setup the options used to compile the included Pi
432
# The### Use 'system' SQo limit
433
# the run to just tkbuiltin: $(SRCDIR_tools)/mkbuiltin.c
434
-mkdir -p $(OBJDIR)
435
$(XBCC) -o $(OBJDIR)/mkbuiltin $(SRCDIR_tools)/mkbuiltin.c
436
437
$(OBJDIR)/mkversion: $(SRCDIR_tools)/mkversion.c
438
-mkdir -p $(OBJDIR)
439
$(XBCC) -o $(OBJDIR)/mkversion $(SRCDIR_tools)/mkversion.c
440
441
$(OBJDIR)/codecheck1: $(SRCDIR_tools)/codecheck1.c
442
-mkdir -p $(OBJDIR)
443
$(XBCC) -o $(OBJDIR)/codecheck1 $(SRCDIR_tools)/codecheck1.c
444
445
# Run the test suite.
446
# Other flags that can be included in TESTFLAGS are:
447
#
448
# -halt Stop testing after the first failed test
449
# -keep Keep the temporary workspace for debugging
450
# -prot Write a detailed log of the tests to the file ./prot
451
# -verbose Include even more details in the output
452
# -quiet Hide most output from the terminal
453
# -strict Treat known bugs as failures
454
#
455
# TESTFLAGS can also include names of specific test files to limit
456
# the run to just those test cases.
457
#
458
test: $(APPNAME)
459
$(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) $(TESTFLAGS)
460
461
$(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion $(OBJDIR)/phony.h
462
$(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid <<<NEXT_LINE>>>
463
$(SRCDIR)/../manifest <<<NEXT_LINE>>>
464
$(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
465
466
$(OBJDIR)/phony.h:
467
# Force rebuild of VERSION.h every time we run "make"
468
469
# Setup the options used to compile the included SQLite library.
470
SQLITE_OPTIONS = <<<SQLITE_OPTIONS>>>
471
472
# Setup the options used to compile the included SQLite shell.
473
SHELL_OPTIONS = <<<SHELL_OPTIONS>>>
474
475
# Setup the options used to compile the included Pikchr formatter.
476
PIKCHR_OPTIONS = <<<PIKCHR_OPTIONS>>>
477
TMSTMPVFS_OPTIONS = <<<TMSTMPVFS_OPTIONS>>>
478
479
# The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
480
# If it is set to 1, then there is no need to build or link
481
# the sqlite3.o object. Instead, the system SQLite will be linked
482
# using -lsqlite3.
483
#
484
# Closely related is SQLITE3_ORIGIN, with the same numeric mapshel files, commit the chang#!iable may be undefined, set to 0 or 1.
485
# If it is set to 1, then there is no need to build or link
486
# the sqlite3.o object. Instead, the system SQLite will be linked
487
# using -lsqlite3.
488
#
489
# Closely related is SQLITE3_ORIGIN, with the same 0/1 mapping,
490
# plus a value of 2 means that we are building a client-provided
491
# sqlite3.c.
492
SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
493
SQLITE3_OBJ.1 = $(OBJDIR)/sqlite3-see.o
494
# SQLITE3_OBJ.2 is set by the configure process
495
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
496
SQLITE3_OBJ = $(SQLITE3_OBJ.$(SQLITE3_ORIGIN))
497
498
# The USE_SEE variable may be undefined, 0 or 1. If undefined or 0,
499
# in-tree SQLite is used. If 1, then sqlite3-see.c (not part of the
500
# source tree) is used and extra flags are provided to enable the
501
# SQLite Encryption Extension.
502
SQLITE3_SRC.0 = $(SRCDIR_extsrc)/sqlite3.c
503
SQLITE3_SRC.1 = $(SRCDIR_extsrc)/sqlite3-see.c
504
# SQLITE3_SRC.2 is set by top-level configure/makefile process.
505
SQLITE3_SRC. = $(SRCDIR_extsrc)/sqlite3.c
506
SQLITE3_SRC = $(SQLITE3_SRC.$(SQLITE3_ORIGIN))
507
SQLITE3_SHELL_SRC.0 = $(SRCDIR_extsrc)/shell.c
508
SQLITE3_SHELL_SRC.1 = $(SRCDIR_extsrc)/shell-see.c
509
# SQLITE3_SHELL_SRC.2 comes from the configure process
510
SQLITE3_SHELL_SRC. = $(SRCDIR_extsrc)/shell.c
511
SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
512
SEE_FLAGS.0 =
513
SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
514
SEE_FLAGS. =
515
SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
516
}
517
518
writeln [string map [list <<<NEXT_LINE>>> \\] {
519
EXTRAOBJ = <<<NEXT_LINE>>>
520
$(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) <<<NEXT_LINE>>>
521
$(OBJDIR)/pikchr.o <<<NEXT_LINE>>>
522
$(OBJDIR)/tmstmpvfs.o <<<NEXT_LINE>>>
523
$(OBJDIR)/shell.o <<<NEXT_LINE>>>
524
$(OBJDIR)/th.o <<<NEXT_LINE>>>
525
$(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
526
$(OBJDIR)/th_tcl.o <<<NEXT_LINE>>>
527
$(OBJDIR)/cson_amalgamation.o
528
}]
529
530
writeln {
531
zlib: $(ZLIBTARGETS)
532
$(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) CC=$(PREFIX)$(TCCEXE) $(ZLIBCONFIG) -f win32/Makefile.gcc libz.a
533
534
clean-zlib:
535
$(MAKE) -C $(ZLIBDIR) PREFIX=$(PREFIX) CC=$(PREFIX)$(TCCEXE) -f win32/Makefile.gcc clean
536
537
BLDTARGETS = zlib
538
539
openssl: $(BLDTARGETS)
540
cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) $(SSLCONFIG)
541
sed -i -e 's/^PERL=C:\\.*$$/PERL=perl.exe/i' $(OPENSSLLIBDIR)/Makefile
542
$(MAKE) -C $(OPENSSLLIBDIR) PREFIX=$(PREFIX) CC=$(PREFIX)$(TCCEXE) build_libs
543
544
clean-openssl:
545
$(MAKE) -C $(OPENSSLLIBDIR) PREFIX=$(PREFIX) CC=$(PREFIX)$(TCCEXE) clean
546
547
tcl:
548
cd $(TCLSRCDIR)/win;./configure
549
$(MAKE) -C $(TCLSRCDIR)/win PREFIX=$(PREFIX) CC=$(PREFIX)$(TCCEXE) $(TCLTARGET)
550
551
clean-tcl:
552
$(MAKE) -C $(TCLSRCDIR)/win PREFIX=$(PREFIX) CC=$(PREFIX)$(TCCEXE) distclean
553
554
APPTARGETS += $(BLDTARGETS)
555
556
ifdef FOSSIL_BUILD_SSL
557
APPTARGETS += openssl
558
endif
559
560
$(APPNAME): $(APPTARGETS) $(OBJDIR)/headers $(CODECHECK1) $(EXTRAOBJ) $(OBJ) $(OBJDIR)/fossil.o
561
$(CODECHECK1) $(TRANS_SRC)
562
$(TCC) -o $@ $(EXTRAOBJ) $(OBJ) $(OBJDIR)/fossil.o $(LIB)
563
564
# This rule prevents make from using its default rules to try build
565
# an executable named "manifest" out of the file named "manifest.c"
566
#
567
$(SRCDIR)/../manifest:
568
# noop
569
570
clean:
571
ifdef USE_WINDOWS
572
$(RM) $(subst /,\,$(APPNAME))
573
$(RMDIR) $(subst /,\,$(OBJDIR))
574
else
575
$(RM) $(APPNAME)
576
$(RMDIR) $(OBJDIR)
577
endif
578
579
setup: $(OBJDIR) $(APPNAME)
580
$(MAKENSIS) ./setup/fossil.nsi
581
582
innosetup: $(OBJDIR) $(APPNAME)
583
$(INNOSETUP) ./setup/fossil.iss -DAppVersion=$(shell $(CAT) ./VERSION)
584
}
585
586
set mhargs {}
587
foreach s [lsort $src] {
588
if {[string length $mhargs] > 0} {append mhargs " <<<NEXT_LINE>>>"}
589
append mhargs "\$(OBJDIR)/${s}_.c:\$(OBJDIR)/$s.h"
590
set extra_h($s) { }
591
}
592
foreach s [lsort $src_ext] {
593
if {[string length $mhargs] > 0} {append mhargs " <<<NEXT_LINE>>>"}
594
append mhargs "\$(SRCDIR_extsrc)/${s}.c:\$(OBJDIR)/$s.h"
595
set extra_h($s) { }
596
}
597
append mhargs " <<<NEXT_LINE>>>\$(SRCDIR_extsrc)/sqlite3.h"
598
append mhargs " <<<NEXT_LINE>>>\$(SRCDIR)/th.h"
599
append mhargs " <<<NEXT_LINE>>>\$(OBJDIR)/VERSION.h"
600
set mhargs [string map [list <<<NEXT_LINE>>> \\\n\t] $mhargs]
601
writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(MKINDEX)"
602
writeln "\t\$(MKINDEX) \$(TRANS_SRC) >\$@\n"
603
604
writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)"
605
writeln "\t\$(MKBUILTIN) --prefix \$(SRCDIR)/ \$(EXTRA_FILES) >\$@\n"
606
607
writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h"
608
writeln "\t\$(MAKEHEADERS) $mhargs"
609
writeln "\techo Done >\$(OBJDIR)/headers\n"
610
writeln "\$(OBJDIR)/headers: Makefile\n"
611
writeln "Makefile:\n"
612
set extra_h(main) " \$(OBJDIR)/page_index.h "
613
set extra_h(builtin) " \$(OBJDIR)/builtin_data.h "
614
615
foreach s [lsort $src] {
616
writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(TRANSLATE)"
617
writeln "\t\$(TRANSLATE) \$(SRCDIR)/$s.c >\$@\n"
618
writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h$extra_h($s)\$(SRCDIR)/config.h"
619
writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n"
620
writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n"
621
}
622
623
writeln {MINGW_OPTIONS = -D_HAVE__MINGW_H
624
}
625
626
set SQLITE_WIN32_OPTIONS $SQLITE_OPTIONS
627
lappend SQLITE_WIN32_OPTIONS -DSQLITE_WIN32_NO_ANSI
628
629
set MINGW_SQLITE_OPTIONS $SQLITE_WIN32_OPTIONS
630
lappend MINGW_SQLITE_OPTIONS {$(MINGW_OPTIONS)}
631
lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H
632
lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE
633
634
set MINGW_PIKCHR_OPTIONS $PIKCHR_OPTIONS
635
set MINGW_TMSTMPVFS_OPTIONS $TMSTMPVFS_OPTIONS
636
637
set j " \\\n "
638
writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n"
639
writeln "SHELL_OPTIONS = [join $SHELL_WIN32_OPTIONS $j]\n"
640
writeln "PIKCHR_OPTIONS = [join $MINGW_PIKCHR_OPTIONS $j]\n"
641
writeln "TMSTMPVFS_OPTIONS = [join $MINGW_TMSTMPVFS_OPTIONS $j]\n"
642
643
writeln "\$(SQLITE3_OBJ):\t\$(SQLITE3_SRC) \$(SRCDIR)/../win/Makefile.mingw"
644
writeln "\t\$(XTCC) \$(SQLITE_OPTIONS) \$(SQLITE_CFLAGS) \$(SEE_FLAGS) \\"
645
writeln "\t\t-c \$(SQLITE3_SRC) -o \$@\n"
646
647
writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR_extsrc)/cson_amalgamation.c"
648
writeln "\t\$(XTCC) -c \$(SRCDIR_extsrc)/cson_amalgamation.c -o \$@\n"
649
writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n"
650
651
writeln "\$(OBJDIR)/shell.o:\t\$(SQLITE3_SHELL_SRC) \$(SRCDIR_extsrc)/sqlite3.h \$(SRCDIR)/../win/Makefile.mingw"
652
writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) \$(SEE_FLAGS) -c \$(SQLITE3_SHELL_SRC) -o \$@\n"
653
654
writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
655
writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$@\n"
656
657
writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
658
writeln "\t\$(XTCC) -c \$(SRCDIR)/th_lang.c -o \$@\n"
659
660
writeln "\$(OBJDIR)/th_tcl.o:\t\$(SRCDIR)/th_tcl.c"
661
writeln "\t\$(XTCC) -c \$(SRCDIR)/th_tcl.c -o \$@\n"
662
663
writeln "\$(OBJDIR)/pikchr.o:\t\$(SRCDIR_extsrc)/pikchr.c"
664
writeln "\t\$(XTCC) \$(PIKCHR_OPTIONS) -c \$(SRCDIR_extsrc)/pikchr.c -o \$@\n"
665
666
writeln "\$(OBJDIR)/tmstmpvfs.o:\t\$(SRCDIR_extsrc)/tmstmpvfs.c"
667
writeln "\t\$(XTCC) \$(TMSTMPVS_OPTIONS) -c \$(SRCDIR_extsrc)/tmstmpvfs.c -o \$@\n"
668
669
close $output_file
670
#
671
# End of the win/Makefile.mingw output
672
##############################################################################
673
##############################################################################
674
##############################################################################
675
# Begin win/Makefile.dmc output
676
#
677
puts "building ../win/Makefile.dmc"
678
set output_file [open ../win/Makefile.dmc w]
679
fconfigure $output_file -translation binary
680
681
writeln {#
682
##############################################################################
683
# WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "tools/makemake.tcl")
684
##############################################################################
685
#
686
# This file is automatically generated. Instead of editing this
687
# file, edit "makemake.tcl" then run "tclsh makemake.tcl"
688
# to regenerate this file.
689
#
690
B = ..
691
SRCDIR = $B\src
692
SRCDIR_extsrc = $B\extsrc
693
SRCDIR_tools = $B\tools
694
OBJDIR = .
695
O = .obj
696
E = .exe
697
698
699
# Maybe DMDIR, SSL or INCL needs adjustment
700
DMDIR = c:\DM
701
INCL = -I. -I$(SRCDIR) -I$(SRCDIR_extsrc) -I$B\win\include -I$(DMDIR)\extra\include
702
703
#SSL = -DFOSSIL_ENABLE_SSL=1
704
SSL =
705
706
CFLAGS = -o
707
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
708
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
709
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 dnsapi
710
}
711
writeln "SQLITE_OPTIONS = [join $SQLITE_OPTIONS { }]\n"
712
writeln "SHELL_OPTIONS = [join $SHELL_WIN32_OPTIONS { }]\n"
713
writeln "PIKCHR_OPTIONS = [join $PIKCHR_OPTIONS { }]\n"
714
writeln "TMSTMPVFS_OPTIONS = [join $TMSTMPVFS_OPTIONS { }]\n"
715
writeln -nonewline "SRC ="
716
foreach s [lsort $src] {
717
writeln -nonewline " ${s}_.c"
718
}
719
writeln "\n"
720
writeln -nonewline "OBJ = "
721
foreach s [lsort $src] {
722
writeln -nonewline "\$(OBJDIR)\\$s\$O "
723
}
724
writeln "\$(OBJDIR)\\shell\$O \$(OBJDIR)\\sqlite3\$O \$(OBJDIR)\\th\$O \$(OBJDIR)\\th_lang\$O"
725
writeln {
726
727
RC=$(DMDIR)\bin\rcc
728
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
729
730
APPNAME = $(OBJDIR)\fossil$(E)
731
732
all: $(APPNAME)
733
734
$(APPNAME) : translate$E mkindex$E codecheck1$E headers $(OBJ) $(OBJDIR)\link
735
cd $(OBJDIR)
736
codecheck1$E $(SRC)
737
$(DMDIR)\bin\link @link
738
739
$(OBJDIR)\fossil.res: $B\win\fossil.rc
740
$(RC) $(RCFLAGS) -o$@ $**
741
742
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res}
743
writeln -nonewline "\t+echo "
744
foreach s [lsort $src] {
745
writeln -nonewline "$s "
746
}
747
writeln "shell sqlite3 th th_lang > \$@"
748
writeln "\t+echo fossil >> \$@"
749
writeln "\t+echo fossil >> \$@"
750
writeln "\t+echo \$(LIBS) >> \$@"
751
writeln "\t+echo. >> \$@"
752
writeln "\t+echo fossil >> \$@"
753
754
writeln {
755
translate$E: $(SRCDIR_tools)\translate.c
756
$(BCC) -o$@ $**
757
758
makeheaders$E: $(SRCDIR_tools)\makeheaders.c
759
$(BCC) -o$@ $**
760
761
mkindex$E: $(SRCDIR_tools)\mkindex.c
762
$(BCC) -o$@ $**
763
764
mkbuiltin$E: $(SRCDIR_tools)\mkbuiltin.c
765
$(BCC) -o$@ $**
766
767
mkversion$E: $(SRCDIR_tools)\mkversion.c
768
$(BCC) -o$@ $**
769
770
codecheck1$E: $(SRCDIR_tools)\codecheck1.c
771
$(BCC) -o$@ $**
772
773
$(OBJDIR)\shell$O : $(SRCDIR_extsrc)\shell.c
774
$(TCC) -o$@ -c $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) $**
775
776
$(OBJDIR)\sqlite3$O : $(SRCDIR_extsrc)\sqlite3.c
777
$(TCC) -o$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $**
778
779
$(OBJDIR)\th$O : $(SRCDIR)\th.c
780
$(TCC) -o$@ -c $**
781
782
$(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c
783
$(TCC) -o$@ -c $**
784
785
$(OBJDIR)\cson_amalgamation.h : $(SRCDIR_extsrc)\cson_amalgamation.h
786
cp $@ $@
787
788
VERSION.h : mkversion$E $B\manifest.uuid $B\manifest $B\VERSION
789
+$** > $@
790
791
page_index.h: mkindex$E $(SRC)
792
+$** > $@
793
794
builtin_data.h: mkbuiltin$E $(EXTRA_FILES)
795
mkbuiltin$E --prefix $(SRCDIR)/ $(EXTRA_FILES) > $@
796
797
clean:
798
-del $(OBJDIR)\*.obj
799
-del *.obj *_.c *.h *.map
800
801
realclean:
802
-del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E mkbuiltin$E
803
804
$(OBJDIR)\json$O : $(SRCDIR)\json_detail.h
805
$(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h
806
$(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h
807
$(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h
808
$(OBJDIR)\json_diff$O : $(SRCDIR)\json_detail.h
809
$(OBJDIR)\json_dir$O : $(SRCDIR)\json_detail.h
810
$(OBJDIR)\json_finfo$O : $(SRCDIR)\json_detail.h
811
$(OBJDIR)\json_login$O : $(SRCDIR)\json_detail.h
812
$(OBJDIR)\json_query$O : $(SRCDIR)\json_detail.h
813
$(OBJDIR)\json_report$O : $(SRCDIR)\json_detail.h
814
$(OBJDIR)\json_status$O : $(SRCDIR)\json_detail.h
815
$(OBJDIR)\json_tag$O : $(SRCDIR)\json_detail.h
816
$(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
817
$(OBJDIR)\json_user$O : $(SRCDIR)\json_detail.h
818
$(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
819
820
}
821
foreach s [lsort $src] {
822
writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
823
writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
824
writeln "${s}_.c : \$(SRCDIR)\\$s.c"
825
writeln "\t+translate\$E \$** > \$@\n"
826
}
827
828
writeln -nonewline "headers: makeheaders\$E page_index.h builtin_data.h VERSION.h\n\t +makeheaders\$E "
829
foreach s [lsort $src] {
830
writeln -nonewline "${s}_.c:$s.h "
831
}
832
foreach s [lsort $src_ext] {
833
writeln -nonewline "\$(SRCDIR_extsrc)\\${s}.c:$s.h "
834
}
835
writeln "\$(SRCDIR_extsrc)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h \$(SRCDIR_extsrc)\\cson_amalgamation.h"
836
writeln "\t@copy /Y nul: headers"
837
838
close $output_file
839
#
840
# End of the win/Makefile.dmc output
841
##############################################################################
842
##############################################################################
843
##############################################################################
844
# Begin win/Makefile.msc output
845
#
846
puts "building ../win/Makefile.msc"
847
set output_file [open ../win/Makefile.msc w]
848
fconfigure $output_file -translation binary
849
850
writeln {#
851
##############################################################################
852
# WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "tools/makemake.tcl")
853
##############################################################################
854
#
855
#
856
# This file is automatically generated. Instead of editing this
857
# file, edit "makemake.tcl" then run "tclsh makemake.tcl"
858
# to regenerate this file.
859
#
860
B = ..
861
SRCDIR = $(B)\src
862
SRCDIR_extsrc = $(B)\extsrc
863
SRCDIR_tools = $(B)\tools
864
T = .
865
OBJDIR = $(T)
866
OX = $(OBJDIR)
867
O = .obj
868
E = .exe
869
P = .pdb
870
DBGOPTS = /Od
871
872
INSTALLDIR = .
873
!ifdef DESTDIR
874
INSTALLDIR = $(DESTDIR)\$(INSTALLDIR)
875
!endif
876
877
# When building out of source, this Makefile needs to know the path to the base
878
# top-level directory for this project. Pass it on NMAKE command line via make
879
# variable B:
880
# NMAKE /f "path\to\this\Makefile" B="path/to/fossil/root"
881
#
882
# NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too.
883
#
884
!if !exist("$(B)\.fossil-settings")
885
!error Please specify path to project base directory: B="path/to/fossil"
886
!endif
887
888
# Perl is only necessary if OpenSSL support is enabled and it is built from
889
# source code. The PERLDIR environment variable, if it exists, should point
890
# to the directory containing the main Perl executable specified here (i.e.
891
# "perl.exe").
892
PERL = perl.exe
893
894
# Enable use of available compiler optimizations?
895
!ifndef OPTIMIZATIONS
896
OPTIMIZATIONS = 2
897
!endif
898
899
# Enable debugging symbols?
900
!ifndef DEBUG
901
DEBUG = 0
902
!endif
903
!ifdef FOSSIL_DEBUG
904
DEBUG = 1
905
!endif
906
907
# Build the OpenSSL libraries?
908
!ifndef FOSSIL_BUILD_SSL
909
FOSSIL_BUILD_SSL = 0
910
!endif
911
912
# Build the included zlib library?
913
!ifndef FOSSIL_BUILD_ZLIB
914
FOSSIL_BUILD_ZLIB = 1
915
!endif
916
917
# Link everything except SQLite dynamically?
918
!ifndef FOSSIL_DYNAMIC_BUILD
919
FOSSIL_DYNAMIC_BUILD = 0
920
!endif
921
922
# Enable relative paths in external diff/gdiff?
923
!ifndef FOSSIL_ENABLE_EXEC_REL_PATHS
924
FOSSIL_ENABLE_EXEC_REL_PATHS = 0
925
!endif
926
927
# Enable the JSON API?
928
!ifndef FOSSIL_ENABLE_JSON
929
FOSSIL_ENABLE_JSON = 0
930
!endif
931
932
# Enable OpenSSL support?
933
!ifndef FOSSIL_ENABLE_SSL
934
FOSSIL_ENABLE_SSL = 0
935
!endif
936
937
# Enable the Tcl integration subsystem?
938
!ifndef FOSSIL_ENABLE_TCL
939
FOSSIL_ENABLE_TCL = 0
940
!endif
941
942
# Enable TH1 scripts in embedded documentation files?
943
!ifndef FOSSIL_ENABLE_TH1_DOCS
944
FOSSIL_ENABLE_TH1_DOCS = 0
945
!endif
946
947
# Enable TH1 hooks for commands and web pages?
948
!ifndef FOSSIL_ENABLE_TH1_HOOKS
949
FOSSIL_ENABLE_TH1_HOOKS = 0
950
!endif
951
952
# Enable support for Windows XP with Visual Studio 201x?
953
!ifndef FOSSIL_ENABLE_WINXP
954
FOSSIL_ENABLE_WINXP = 0
955
!endif
956
957
# Enable support for the SQLite Encryption Extension?
958
!ifndef USE_SEE
959
USE_SEE = 0
960
!endif
961
962
!if $(FOSSIL_ENABLE_SSL)!=0
963
SSLDIR = $(B)\compat\openssl
964
SSLINCDIR = $(SSLDIR)\include
965
!if $(FOSSIL_DYNAMIC_BUILD)!=0
966
SSLLIBDIR = $(SSLDIR)
967
!else
968
SSLLIBDIR = $(SSLDIR)
969
!endif
970
SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib
971
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
972
!message Using 'x64' platform for OpenSSL...
973
SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers
974
!if $(FOSSIL_DYNAMIC_BUILD)!=0
975
SSLCONFIG = $(SSLCONFIG) shared
976
!else
977
SSLCONFIG = $(SSLCONFIG) no-shared
978
!endif
979
!elseif "$(PLATFORM)"=="ia64"
980
!message Using 'ia64' platform for OpenSSL...
981
SSLCONFIG = VC-WIN64I no-asm no-ssl3 no-weak-ssl-ciphers
982
!if $(FOSSIL_DYNAMIC_BUILD)!=0
983
SSLCONFIG = $(SSLCONFIG) shared
984
!else
985
SSLCONFIG = $(SSLCONFIG) no-shared
986
!endif
987
!else
988
!message Assuming 'x86' platform for OpenSSL...
989
SSLCONFIG = VC-WIN32 no-asm no-ssl3 no-weak-ssl-ciphers
990
!if $(FOSSIL_DYNAMIC_BUILD)!=0
991
SSLCONFIG = $(SSLCONFIG) shared
992
!else
993
SSLCONFIG = $(SSLCONFIG) no-shared
994
!endif
995
!endif
996
!endif
997
998
!if $(FOSSIL_ENABLE_TCL)!=0
999
TCLDIR = $(B)\compat\tcl-8.6
1000
TCLSRCDIR = $(TCLDIR)
1001
TCLINCDIR = $(TCLSRCDIR)\generic
1002
!endif
1003
1004
# zlib options
1005
ZINCDIR = $(B)\compat\zlib
1006
ZLIBDIR = $(B)\compat\zlib
1007
1008
!if $(FOSSIL_DYNAMIC_BUILD)!=0
1009
ZLIB = zdll.lib
1010
!else
1011
ZLIB = zlib.lib
1012
!endif
1013
1014
INCL = /I. /I"$(OX)" /I"$(SRCDIR)" /I"$(SRCDIR_extsrc)" /I"$(B)\win\include"
1015
1016
INCL = $(INCL) /I"$(ZINCDIR)"
1017
1018
!if $(FOSSIL_ENABLE_SSL)!=0
1019
INCL = $(INCL) /I"$(SSLINCDIR)"
1020
!endif
1021
1022
!if $(FOSSIL_ENABLE_TCL)!=0
1023
INCL = $(INCL) /I"$(TCLINCDIR)"
1024
!endif
1025
1026
CFLAGS = /nologo /W2 /WX /utf-8
1027
LDFLAGS =
1028
1029
CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS
1030
CFLAGS = $(CFLAGS) /D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_NONSTDC_NO_WARNINGS
1031
1032
!if $(FOSSIL_DYNAMIC_BUILD)!=0
1033
LDFLAGS = $(LDFLAGS) /MANIFEST
1034
!else
1035
LDFLAGS = $(LDFLAGS) /NODEFAULTLIB:msvcrt /MANIFEST:NO
1036
!endif
1037
1038
!if $(FOSSIL_ENABLE_WINXP)!=0
1039
XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1
1040
CFLAGS = $(CFLAGS) $(XPCFLAGS)
1041
#
1042
# NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and
1043
# explicit initialization is redundant, but is required for post-built edits.
1044
#
1045
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1046
XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
1047
!else
1048
XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01
1049
!endif
1050
LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1051
#
1052
# NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS
1053
# is applied in a separate post-build step, see below for more information.
1054
#
1055
!if $(FOSSIL_ENABLE_SSL)!=0
1056
SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS)
1057
!endif
1058
!endif
1059
1060
!if $(FOSSIL_DYNAMIC_BUILD)!=0
1061
!if $(DEBUG)!=0
1062
CRTFLAGS = /MDd
1063
!else
1064
CRTFLAGS = /MD
1065
!endif
1066
!else
1067
!if $(DEBUG)!=0
1068
CRTFLAGS = /MTd
1069
!else
1070
CRTFLAGS = /MT
1071
!endif
1072
!endif
1073
1074
!if $(OPTIMIZATIONS)>3
1075
RELOPTS = /Os
1076
!elseif $(OPTIMIZATIONS)>2
1077
RELOPTS = /Ox
1078
!elseif $(OPTIMIZATIONS)>1
1079
RELOPTS = /O2
1080
!elseif $(OPTIMIZATIONS)>0
1081
RELOPTS = /O1
1082
!else
1083
RELOPTS =
1084
!endif
1085
1086
!if $(DEBUG)!=0
1087
CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) $(DBGOPTS) /DFOSSIL_DEBUG /DTH_MEMDEBUG
1088
LDFLAGS = $(LDFLAGS) /DEBUG
1089
!else
1090
CFLAGS = $(CFLAGS) $(CRTFLAGS) $(RELOPTS)
1091
!endif
1092
1093
BCC = $(CC) $(CFLAGS)
1094
TCC = $(CC) /c $(CFLAGS) $(MSCDEF) $(INCL)
1095
RCC = $(RC) /D_WIN32 /D_MSC_VER $(MSCDEF) $(INCL)
1096
MTC = mt
1097
LIBS = ws2_32.lib advapi32.lib dnsapi.lib
1098
LIBDIR =
1099
1100
!if $(FOSSIL_DYNAMIC_BUILD)!=0
1101
TCC = $(TCC) /DFOSSIL_DYNAMIC_BUILD=1
1102
RCC = $(RCC) /DFOSSIL_DYNAMIC_BUILD=1
1103
!endif
1104
1105
LIBS = $(LIBS) $(ZLIB)
1106
LIBDIR = $(LIBDIR) /LIBPATH:"$(ZLIBDIR)"
1107
1108
!if $(FOSSIL_ENABLE_JSON)!=0
1109
TCC = $(TCC) /DFOSSIL_ENABLE_JSON=1
1110
RCC = $(RCC) /DFOSSIL_ENABLE_JSON=1
1111
!endif
1112
1113
!if $(FOSSIL_ENABLE_SSL)!=0
1114
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1115
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1116
LIBS = $(LIBS) $(SSLLIB)
1117
LIBDIR = $(LIBDIR) /LIBPATH:"$(SSLLIBDIR)"
1118
!endif
1119
1120
!if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
1121
TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1122
RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1123
!endif
1124
1125
!if $(FOSSIL_ENABLE_TH1_DOCS)!=0
1126
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1127
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1128
!endif
1129
1130
!if $(FOSSIL_ENABLE_TH1_HOOKS)!=0
1131
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1132
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1133
!endif
1134
1135
!if $(FOSSIL_ENABLE_TCL)!=0
1136
TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
1137
RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
1138
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1139
RCC = $(RCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1140
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
1141
RCC = $(RCC) /DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
1142
TCC = $(TCC) /DUSE_TCL_STUBS=1
1143
RCC = $(RCC) /DUSE_TCL_STUBS=1
1144
!endif
1145
1146
!if $(USE_SEE)!=0
1147
TCC = $(TCC) /DUSE_SEE=1
1148
RCC = $(RCC) /DUSE_SEE=1
1149
!endif
1150
}
1151
regsub -all {[-]D} [join $SQLITE_WIN32_OPTIONS { }] {/D} MSC_SQLITE_OPTIONS
1152
set j " \\\n "
1153
writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n"
1154
1155
regsub -all {[-]D} [join $SHELL_WIN32_OPTIONS { }] {/D} MSC_SHELL_OPTIONS
1156
set j " \\\n "
1157
writeln "SHELL_OPTIONS = [join $MSC_SHELL_OPTIONS $j]\n"
1158
1159
regsub -all {[-]D} [join $PIKCHR_OPTIONS { }] {/D} MSC_PIKCHR_OPTIONS
1160
set j " \\\n "
1161
writeln "PIKCHR_OPTIONS = [join $MSC_PIKCHR_OPTIONS $j]\n"
1162
1163
regsub -all {[-]D} [join $TMSTMPVFS_OPTIONS { }] {/D} MSC_TMSTMPVFS_OPTIONS
1164
set j " \\\n "
1165
writeln "TMSTMPVFS_OPTIONS = [join $MSC_TMSTMPVFS_OPTIONS $j]\n"
1166
1167
writeln -nonewline "SRC = "
1168
set i 0
1169
foreach s [lsort $src] {
1170
if {$i > 0} {
1171
writeln " \\"
1172
writeln -nonewline " "
1173
}
1174
writeln -nonewline "\"\$(OX)\\${s}_.c\""; incr i
1175
}
1176
foreach s [lsort $src_ext] {
1177
writeln " \\"
1178
writeln -nonewline " "
1179
writeln -nonewline "\"\$(SRCDIR_extsrc)\\${s}.c\""; incr i
1180
}
1181
writeln "\n"
1182
writeln -nonewline "EXTRA_FILES = "
1183
set i 0
1184
foreach s [lsort $extra_files] {
1185
if {$i > 0} {
1186
writeln " \\"
1187
writeln -nonewline " "
1188
}
1189
set s [regsub -all / $s \\]
1190
writeln -nonewline "\"\$(SRCDIR)\\${s}\""; incr i
1191
}
1192
writeln "\n"
1193
set AdditionalObj [list shell sqlite3 th th_lang th_tcl cson_amalgamation pikchr tmstmpvfs]
1194
writeln -nonewline "OBJ = "
1195
set i 0
1196
foreach s [lsort [concat $src $AdditionalObj]] {
1197
if {$i > 0} {
1198
writeln " \\"
1199
writeln -nonewline " "
1200
}
1201
writeln -nonewline "\"\$(OX)\\$s\$O\""; incr i
1202
}
1203
if {$i > 0} {
1204
writeln " \\"
1205
}
1206
writeln -nonewline " \"\$(OX)\\fossil.res\"\n\n"
1207
writeln [string map [list <<<NEXT_LINE>>> \\] {
1208
!ifndef BASEAPPNAME
1209
BASEAPPNAME = fossil
1210
!endif
1211
1212
APPNAME = $(OX)\$(BASEAPPNAME)$(E)
1213
PDBNAME = $(OX)\$(BASEAPPNAME)$(P)
1214
APPTARGETS =
1215
1216
all: "$(OX)" "$(APPNAME)"
1217
1218
$(BASEAPPNAME): "$(APPNAME)"
1219
1220
$(BASEAPPNAME)$(E): "$(APPNAME)"
1221
1222
install: "$(APPNAME)"
1223
echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)"\*
1224
!if $(DEBUG)!=0
1225
echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)"\*
1226
!endif
1227
1228
$(OX):
1229
@-mkdir $@
1230
1231
zlib:
1232
@echo Building zlib from "$(ZLIBDIR)"...
1233
!if $(FOSSIL_ENABLE_WINXP)!=0
1234
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
1235
!else
1236
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
1237
!endif
1238
1239
clean-zlib:
1240
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd
1241
1242
!if $(FOSSIL_ENABLE_SSL)!=0
1243
openssl:
1244
@echo Building OpenSSL from "$(SSLDIR)"...
1245
!if $(FOSSIL_ENABLE_WINXP)!=0
1246
@echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration...
1247
!endif
1248
!ifdef PERLDIR
1249
@pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd
1250
!else
1251
@pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd
1252
!endif
1253
@pushd "$(SSLDIR)" && $(MAKE) && popd
1254
!if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0
1255
#
1256
# NOTE: Appending custom linker flags to the OpenSSL default linker flags is
1257
# somewhat difficult, as summarized in this Fossil Forum post:
1258
#
1259
# https://fossil-scm.org/forum/forumpost/a9a2d6af28b
1260
#
1261
# Therefore the custom linker flags required for Windows XP dynamic builds are
1262
# applied in a separate post-build step.
1263
#
1264
# If the build stops here, or if the custom linker flags are outside the scope
1265
# of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking
1266
# the OpenSSL makefile by hand.
1267
#
1268
# Also note that this step changes the subsystem for the OpenSSL DLLs from
1269
# WINDOWS to CONSOLE, but which has no effect on DLLs.
1270
#
1271
@echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs...
1272
@for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) <<<NEXT_LINE>>>
1273
do @( <<<NEXT_LINE>>>
1274
echo %F & <<<NEXT_LINE>>>
1275
link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 <<<NEXT_LINE>>>
1276
)
1277
!endif
1278
1279
clean-openssl:
1280
@pushd "$(SSLDIR)" && $(MAKE) clean && popd
1281
!endif
1282
1283
!if $(FOSSIL_BUILD_ZLIB)!=0
1284
APPTARGETS = $(APPTARGETS) zlib
1285
!endif
1286
1287
!if $(FOSSIL_ENABLE_SSL)!=0
1288
!if $(FOSSIL_BUILD_SSL)!=0
1289
APPTARGETS = $(APPTARGETS) openssl
1290
!endif
1291
!endif
1292
1293
"$(APPNAME)" : $(APPTARGETS) "$(OBJDIR)\translate$E" "$(OBJDIR)\mkindex$E" "$(OBJDIR)\codecheck1$E" "$(OX)\headers" $(OBJ) "$(OX)\linkopts"
1294
"$(OBJDIR)\codecheck1$E" $(SRC)
1295
link $(LDFLAGS) /OUT:$@ /PDB:$(@D)\ $(LIBDIR) Wsetargv.obj "$(OX)\fossil.res" @"$(OX)\linkopts"
1296
if exist "$(B)\win\fossil.exe.manifest" <<<NEXT_LINE>>>
1297
$(MTC) -nologo -manifest "$(B)\win\fossil.exe.manifest" -outputresource:$@;1
1298
1299
"$(OX)\linkopts": "$(B)\win\Makefile.msc"}]
1300
set redir {>}
1301
foreach s [lsort [concat $src $AdditionalObj]] {
1302
writeln "\techo \"\$(OX)\\$s.obj\" $redir \$@"
1303
set redir {>>}
1304
}
1305
set redir {>>}
1306
writeln "\techo \$(LIBS) $redir \$@"
1307
writeln {
1308
"$(OBJDIR)\translate$E": "$(SRCDIR_tools)\translate.c"
1309
$(BCC) /Fe$@ /Fo$(@D)\ /Fd$(@D)\ $**
1310
1311
"$(OBJDIR)\makeheaders$E": "$(SRCDIR_tools)\makeheaders.c"
1312
$(BCC) /Fe$@ /Fo$(@D)\ /Fd$(@D)\ $**
1313
1314
"$(OBJDIR)\mkindex$E": "$(SRCDIR_tools)\mkindex.c"
1315
$(BCC) /Fe$@ /Fo$(@D)\ /Fd$(@D)\ $**
1316
1317
"$(OBJDIR)\mkbuiltin$E": "$(SRCDIR_tools)\mkbuiltin.c"
1318
$(BCC) /Fe$@ /Fo$(@D)\ /Fd$(@D)\ $**
1319
1320
"$(OBJDIR)\mkversion$E": "$(SRCDIR_tools)\mkversion.c"
1321
$(BCC) /Fe$@ /Fo$(@D)\ /Fd$(@D)\ $**
1322
1323
"$(OBJDIR)\codecheck1$E": "$(SRCDIR_tools)\codecheck1.c"
1324
$(BCC) /Fe$@ /Fo$(@D)\ /Fd$(@D)\ $**
1325
1326
!if $(USE_SEE)!=0
1327
SEE_FLAGS = /DSQLITE_HAS_CODEC=1 /DSQLITE_SHELL_DBKEY_PROC=fossil_key
1328
SQLITE3_SHELL_SRC = $(SRCDIR)\shell-see.c
1329
SQLITE3_SRC = $(SRCDIR_extsrc)\sqlite3-see.c
1330
!else
1331
SEE_FLAGS =
1332
SQLITE3_SHELL_SRC = $(SRCDIR_extsrc)\shell.c
1333
SQLITE3_SRC = $(SRCDIR_extsrc)\sqlite3.c
1334
!endif
1335
1336
"$(OX)\shell$O" : "$(SQLITE3_SHELL_SRC)" "$(B)\win\Makefile.msc"
1337
$(TCC) /Fo$@ /Fd$(@D)\ $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) $(SEE_FLAGS) -c "$(SQLITE3_SHELL_SRC)"
1338
1339
"$(OX)\sqlite3$O" : "$(SQLITE3_SRC)" "$(B)\win\Makefile.msc"
1340
$(TCC) /Fo$@ /Fd$(@D)\ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $(SEE_FLAGS) "$(SQLITE3_SRC)"
1341
1342
"$(OX)\th$O" : "$(SRCDIR)\th.c"
1343
$(TCC) /Fo$@ /Fd$(@D)\ -c $**
1344
1345
"$(OX)\th_lang$O" : "$(SRCDIR)\th_lang.c"
1346
$(TCC) /Fo$@ /Fd$(@D)\ -c $**
1347
1348
"$(OX)\th_tcl$O" : "$(SRCDIR)\th_tcl.c"
1349
$(TCC) /Fo$@ /Fd$(@D)\ -c $**
1350
1351
"$(OX)\pikchr$O" : "$(SRCDIR_extsrc)\pikchr.c"
1352
$(TCC) $(PIKCHR_OPTIONS) /Fo$@ /Fd$(@D)\ -c $**
1353
1354
"$(OX)\tmstmpvfs$O" : "$(SRCDIR_extsrc)\tmstmpvfs.c"
1355
$(TCC) $(TMSTMPVFS_OPTIONS) /Fo$@ /Fd$(@D)\ -c $**
1356
1357
"$(OX)\VERSION.h" : "$(OBJDIR)\mkversion$E" "$(B)\manifest.uuid" "$(B)\manifest" "$(B)\VERSION" "$(B)\phony.h"
1358
"$(OBJDIR)\mkversion$E" "$(B)\manifest.uuid" "$(B)\manifest" "$(B)\VERSION" > $@
1359
1360
"$(B)\phony.h" :
1361
rem Force rebuild of VERSION.h whenever nmake is run
1362
1363
"$(OX)\cson_amalgamation$O" : "$(SRCDIR_extsrc)\cson_amalgamation.c"
1364
$(TCC) /Fo$@ /Fd$(@D)\ -c $**
1365
1366
"$(OX)\page_index.h": "$(OBJDIR)\mkindex$E" $(SRC)
1367
$** > $@
1368
1369
"$(OX)\builtin_data.h": "$(OBJDIR)\mkbuiltin$E" "$(OX)\builtin_data.reslist"
1370
"$(OBJDIR)\mkbuiltin$E" --prefix "$(SRCDIR)/" --reslist "$(OX)\builtin_data.reslist" > $@
1371
1372
cleanx:
1373
-del "$(OX)\*.obj" 2>NUL
1374
-del "$(OBJDIR)\*.obj" 2>NUL
1375
-del "$(OX)\*_.c" 2>NUL
1376
-del "$(OX)\*.h" 2>NUL
1377
-del "$(OX)\*.ilk" 2>NUL
1378
-del "$(OX)\*.map" 2>NUL
1379
-del "$(OX)\*.res" 2>NUL
1380
-del "$(OX)\*.reslist" 2>NUL
1381
-del "$(OX)\headers" 2>NUL
1382
-del "$(OX)\linkopts" 2>NUL
1383
-del "$(OX)\vc*.pdb" 2>NUL
1384
1385
clean: cleanx
1386
-del "$(APPNAME)" 2>NUL
1387
-del "$(PDBNAME)" 2>NUL
1388
-del "$(OBJDIR)\translate$E" 2>NUL
1389
-del "$(OBJDIR)\translate$P" 2>NUL
1390
-del "$(OBJDIR)\mkindex$E" 2>NUL
1391
-del "$(OBJDIR)\mkindex$P" 2>NUL
1392
-del "$(OBJDIR)\makeheaders$E" 2>NUL
1393
-del "$(OBJDIR)\makeheaders$P" 2>NUL
1394
-del "$(OBJDIR)\mkversion$E" 2>NUL
1395
-del "$(OBJDIR)\mkversion$P" 2>NUL
1396
-del "$(OBJDIR)\mkcss$E" 2>NUL
1397
-del "$(OBJDIR)\mkcss$P" 2>NUL
1398
-del "$(OBJDIR)\codecheck1$E" 2>NUL
1399
-del "$(OBJDIR)\codecheck1$P" 2>NUL
1400
-del "$(OBJDIR)\mkbuiltin$E" 2>NUL
1401
-del "$(OBJDIR)\mkbuiltin$P" 2>NUL
1402
1403
realclean: clean
1404
1405
"$(OBJDIR)\json$O" : "$(SRCDIR)\json_detail.h"
1406
"$(OBJDIR)\json_artifact$O" : "$(SRCDIR)\json_detail.h"
1407
"$(OBJDIR)\json_branch$O" : "$(SRCDIR)\json_detail.h"
1408
"$(OBJDIR)\json_config$O" : "$(SRCDIR)\json_detail.h"
1409
"$(OBJDIR)\json_diff$O" : "$(SRCDIR)\json_detail.h"
1410
"$(OBJDIR)\json_dir$O" : "$(SRCDIR)\json_detail.h"
1411
"$(OBJDIR)\json_finfo$O" : "$(SRCDIR)\json_detail.h"
1412
"$(OBJDIR)\json_login$O" : "$(SRCDIR)\json_detail.h"
1413
"$(OBJDIR)\json_query$O" : "$(SRCDIR)\json_detail.h"
1414
"$(OBJDIR)\json_report$O" : "$(SRCDIR)\json_detail.h"
1415
"$(OBJDIR)\json_status$O" : "$(SRCDIR)\json_detail.h"
1416
"$(OBJDIR)\json_tag$O" : "$(SRCDIR)\json_detail.h"
1417
"$(OBJDIR)\json_timeline$O" : "$(SRCDIR)\json_detail.h"
1418
"$(OBJDIR)\json_user$O" : "$(SRCDIR)\json_detail.h"
1419
"$(OBJDIR)\json_wiki$O" : "$(SRCDIR)\json_detail.h"
1420
}
1421
1422
writeln {"$(OX)\builtin_data.reslist": $(EXTRA_FILES) "$(B)\win\Makefile.msc"}
1423
set redir {>}
1424
foreach s [lsort $extra_files] {
1425
writeln "\techo \"\$(SRCDIR)\\${s}\" $redir \$@"
1426
set redir {>>}
1427
}
1428
1429
foreach s [lsort $src] {
1430
set extra_h($s) {}
1431
}
1432
set extra_h(builtin) " \"\$(OX)\\builtin_data.h\""
1433
set extra_h(dispatch) " \"\$(OX)\\page_index.h\""
1434
1435
writeln ""
1436
foreach s [lsort $src] {
1437
writeln "\"\$(OX)\\$s\$O\" : \"\$(OX)\\${s}_.c\" \"\$(OX)\\${s}.h\"$extra_h($s)"
1438
writeln "\t\$(TCC) /Fo\$@ /Fd\$(@D)\\ -c \"\$(OX)\\${s}_.c\"\n"
1439
writeln "\"\$(OX)\\${s}_.c\" : \"\$(SRCDIR)\\$s.c\""
1440
writeln "\t\"\$(OBJDIR)\\translate\$E\" \$** > \$@\n"
1441
}
1442
1443
writeln "\"\$(OX)\\fossil.res\" : \"\$(B)\\win\\fossil.rc\""
1444
writeln "\t\$(RCC) /fo \$@ \$**\n"
1445
1446
writeln "\"\$(OX)\\headers\": \"\$(OBJDIR)\\makeheaders\$E\" \"\$(OX)\\page_index.h\" \"\$(OX)\\builtin_data.h\" \"\$(OX)\\VERSION.h\""
1447
writeln -nonewline "\t\"\$(OBJDIR)\\makeheaders\$E\" "
1448
set i 0
1449
foreach s [lsort $src] {
1450
if {$i > 0} {
1451
writeln " \\"
1452
writeln -nonewline "\t\t\t"
1453
}
1454
writeln -nonewline "\"\$(OX)\\${s}_.c\":\"\$(OX)\\$s.h\""; incr i
1455
}
1456
foreach s [lsort $src_ext] {
1457
writeln " \\"
1458
writeln -nonewline "\t\t\t"
1459
writeln -nonewline "\"\$(SRCDIR_extsrc)\\${s}.c\":\"\$(OX)\\$s.h\""; incr i
1460
}
1461
writeln " \\\n\t\t\t\"\$(SRCDIR_extsrc)\\sqlite3.h\" \\"
1462
writeln "\t\t\t\"\$(SRCDIR)\\th.h\" \\"
1463
writeln "\t\t\t\"\$(OX)\\VERSION.h\" \\"
1464
writeln "\t\t\t\"\$(SRCDIR_extsrc)\\cson_amalgamation.h\""
1465
writeln "\t@copy /Y nul: $@"
1466
1467
1468
close $output_file
1469
#
1470
# End of the win/Makefile.msc output
1471
##############################################################################
1472
##############################################################################
1473
th_langiable may be undefined, set to run
1474
1475
# The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1 ###
1476
#
1477
# This Tcl script generates make files for various platforms. The makefiles
1478
# then need to be committed.
1479
#
1480
# If you modify this file then:
1481
#
1482
# 1. cd tools; tclsh makemake.tcl
1483
#
1484
# 2. if errors are reported, fix them and go to step 1
1485
#
1486
# 3. if "fossil diff" reports changes in any of the generated
1487
# files, commit the changed files to the repo
1488
#
1489
# Files generated include:
1490
#
1491
# src/main.mk # makefile for all unix systems
1492
# win/Makefile.mingw # makefile for mingw on windows
1493
# win/Makefile.* # makefiles for other windows compilers
1494
#
1495
# Add new source files by listing the files (without their .c suffix)
1496
# in the "src" variable. Add new resource files to the "extra_files"
1497
# variable. There are other variables that you can alter, down to
1498
# the "STOP HERE" comment. The stuff below "STOP HERE" should rarely need
1499
# to change. After modification, go to step 1 above.
1500
#
1501
# Delete unused source files in the "src" variable, then go to step 1 above.
1502
#
1503
#############################################################################
1504
1505
# $srcDir is used to set the target source dir in several places. Not
1506
# all code-generation bits use $srcDir and instead hard-code, so
1507
# replacing it only here (should it ever changes) is not sufficient.
1508
#
1509
set srcDir ../src
1510
1511
# Directory $srcDirExt houses single-file source code solutions which
1512
# are imported directly into the fossil source tree.
1513
set srcDirExt ../extsrc
1514
1515
# Basenames of all source files that get preprocessed using
1516
# "translate" and "makeheaders". To add new C-language source files to the
1517
# project, simply add the basename to this list and rerun this script.
1518
#
1519
# Set the separate extra_files variable further #!/usr/bin/tclsh
1520
#
1521
# json_dir$O" : "$R)/builtin_data.h:\$(SRCDIR_extsrc)/tmstmpvfs.c $(-c json_dir$O" : "$R)/builtin_data.h:\c -o $@
1522
1523
$(SRCDIR_extsrc)/pikchr.js: $(SRCDIR_extsrc)/pikchr.c $(MAKEFILE_LIST)
1524
$(EMCC_WRAPPER) -o $@ $(EMCC_OPT) --no-entry <<<NEXT_LINE>>>
1525
-sEXPORTED_RUNTIME_METHODS=cwrap,ccall,setValue,getValue,stackSave,stackAlloc,stackRestore <<<NEXT_LINE>>>
1526
-sEXPORTED_FUNCTIONS=_pikchr,_pikchr_version $(SRCDIR_extsrc)/pikchr.c <<<NEXT_LINE>>>
1527
-sENVIRONMENT=web <<<NEXT_LINE>>>
1528
-sMODULARIZE <<<NEXT_LINE>>>
1529
-sEXPORT_NAME=initPikchrModule <<<NEXT_LINE>>>
1530
--minify 0
1531
$(TCLSH) $(TOPDIR)/tools/randomize-js-names.tcl $(SRCDIR_extsrc)
1532
@chmod -x $(SRCDIR_extsrc)/pikchr.wasm
1533
wasm: $(SRCDIR_extsrc)/pikchr.js
1534
1535
#
1536
# compile_commands.json support...
1537
#
1538
# We have to avoid applying compile_commands support to the in-tree
1539
# tools, as those compile with BCC, which may differ from TCC.
1540
# e.g. BCC might be gcc (which does not support -MJ ...) while TCC is
1541
# clang (which does).
1542
#
1543
# What follows is more verbose than strictly necessary because we're
1544
# limited to POSIX make syntax.
1545
all:
1546
compile-commands-dir.yes = $(OBJDIR)
1547
compile-commands-dir.no =
1548
compile-commands-dir = $(compile-commands-dir.$(MAKE_COMPILATION_DB))
1549
compile-command-args.yes = -MJ $(TOPDIR)/$(compile-commands-dir)/$(@F:.o=.o.json)
1550
compile-command-args.no =
1551
TCCFLAGS += $(compile-command-args.$(MAKE_COMPILATION_DB))
1552
compile_commands.json = $(TOPDIR)/compile_commands.json
1553
# compile_commands.json is a concatenation of the .o.json files
1554
# generated by the compilation process via TCCFLAGS. We have a
1555
# potential race condition in parallel builds, where a .o.json file is
1556
# not yet written to completion before compile_commands.json is
1557
# processed. How to resolve that in a way compatible with POSIX make
1558
# is unclear.
1559
#
1560
# This obscure sed bit ensures that the resulting JSON array does not
1561
# have a trailing comma.
1562
$(compile_commands.json): $(OBJ)
1563
@-rm -f $@
1564
@{ echo '['; cat $(compile-commands-dir)/*.o.json | tr '\n' ' ' | sed -e 's/, $$//'; echo ']'; } > $@
1565
@echo "Generated $@"
1566
compile-commands.no:
1567
compile-commands.yes: $(compile_commands.json)
1568
all: compile-commands.$(MAKE_COMPILATION_DB)
1569
clean: compile-commands-clean
1570
compile-commands-clean:
1571
rm -fr $(compile_commands.json)
1572
1573
#
1574
# End compile_commands.json support
1575
#
1576
1577
#
1578
# The list of all the targets that do not correspond to real files. This stops
1579
# 'make' from getting confused when someone makes an error in a rule.
1580
#
1581
1582
.PHONY: all install test clean
1583
.PHONY: compile-commands-clean compile-commands-dir
1584
}]
1585
1586
close $output_file
1587
#
1588
# End of the main.mk output
1589
##############################################################################
1590
##############################################################################
1591
##############################################################################
1592
# Begin win/Makefile.mingw output
1593
#
1594
puts "building ../win/Makefile.mingw"
1595
set output_file [open ../win/Makefile.mingw w]
1596
fconfigure $output_file -translation binary
1597
1598
writeln {#!/usr/bin/make
1599
#
1600
##############################################################################
1601
# WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "tools/makemake.tcl")
1602
##############################################################################
1603
#
1604
# This file is automatically generated. Instead of editing this
1605
# file, edit "makemake.tcl" then run "tclsh makemake.tcl"
1606
# to regenerate this file.
1607
#
1608
# This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using
1609
# MinGW or MinGW-w64.
1610
#
1611
# Some of the special options which can be passed to make
1612
# USE_WINDOWS=1 if building under a windows command prompt
1613
# X64=1 if using an unprefixed 64-bit mingw compiler
1614
#
1615
1616
#### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers.
1617
# By default, this is an empty string (i.e. use the native compiler).
1618
#
1619
PREFIX =
1620
# PREFIX = mingw32-
1621
# PREFIX = i686-pc-mingw32-
1622
# PREFIX = i686-w64-mingw32-
1623
# PREFIX = x86_64-w64-mingw32-
1624
1625
#### The toplevel directory of the source tree. Fossil can be built
1626
# in a directory that is separate from the source tree. Just change
1627
# the following to point from the build directory to the src/ folder.
1628
#
1629
SRCDIR = src
1630
SRCDIR_extsrc = extsrc
1631
SRCDIR_tools = tools
1632
1633
#### The directory into which object code files should be written.
1634
#
1635
OBJDIR = wbld
1636
1637
#### C compiler for use in building executables that will run on
1638
# the platform that is doing the build. This is used to compile
1639
# code-generator programs as part of the build process. See TCC
1640
# and TCCEXE below for the C compiler for building the finished
1641
# binary.
1642
#
1643
BCCEXE = gcc
1644
1645
#### C Compiler and options for use in building executables that
1646
# will run on the platform that is doing the build. This is used
1647
# to compile code-generator programs as part of the build process.
1648
# See TCC below for the C compiler for building the finished binary.
1649
#
1650
BCC = $(BCCEXE)
1651
1652
#### Enable compiling with debug symbols (much larger binary)
1653
#
1654
# FOSSIL_ENABLE_SYMBOLS = 1
1655
1656
#### Enable JSON (https://www.json.org) support using "cson"
1657
#
1658
# FOSSIL_ENABLE_JSON = 1
1659
1660
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
1661
#
1662
# FOSSIL_ENABLE_SSL = 1
1663
1664
#### Automatically build OpenSSL when building Fossil (causes rebuild
1665
# issues when building incrementally).
1666
#
1667
# FOSSIL_BUILD_SSL = 1
1668
1669
#### Enable relative paths in external diff/gdiff
1670
#
1671
# FOSSIL_ENABLE_EXEC_REL_PATHS = 1
1672
1673
#### Enable TH1 scripts in embedded documentation files
1674
#
1675
# FOSSIL_ENABLE_TH1_DOCS = 1
1676
1677
#### Enable hooks for commands and web pages via TH1
1678
#
1679
# FOSSIL_ENABLE_TH1_HOOKS = 1
1680
1681
#### Enable scripting support via Tcl/Tk
1682
#
1683
# FOSSIL_ENABLE_TCL = 1
1684
1685
#### Load Tcl using the stubs library mechanism
1686
#
1687
# FOSSIL_ENABLE_TCL_STUBS = 1
1688
1689
#### Load Tcl using the private stubs mechanism
1690
#
1691
# FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1
1692
1693
#### Use 'system' SQLite
1694
#
1695
# USE_SYSTEM_SQLITE = 1
1696
1697
#### Use POSIX memory APIs from "sys/mman.h"
1698
#
1699
# USE_MMAN_H = 1
1700
1701
#### Use the SQLite Encryption Extension
1702
#
1703
# USE_SEE = 1
1704
1705
#### Use the Tcl source directory instead of the install directory?
1706
# This is useful when Tcl has been compiled statically with MinGW.
1707
#
1708
FOSSIL_TCL_SOURCE = 1
1709
1710
#### Check if the workaround for the MinGW command line handling needs to
1711
# be enabled by default. This check may be somewhat fragile due to the
1712
# use of "findstring".
1713
#
1714
ifndef MINGW_IS_32BIT_ONLY
1715
ifeq (,$(findstring w64-mingw32,$(PREFIX)))
1716
MINGW_IS_32BIT_ONLY = 1
1717
endif
1718
endif
1719
1720
#### The directories where the zlib include and library files are located.
1721
#
1722
ZINCDIR = $(SRCDIR)/../compat/zlib
1723
ZLIBDIR = $(SRCDIR)/../compat/zlib
1724
1725
#### Make an attempt to detect if Fossil is being built for the x64 processor
1726
# architecture. This check may be somewhat fragile due to "findstring".
1727
#
1728
ifndef X64
1729
ifneq (,$(findstring x86_64-w64-mingw32,$(PREFIX)))
1730
X64 = 1
1731
endif
1732
endif
1733
1734
#### Determine if the optimized assembly routines provided with zlib should be
1735
# used, taking into account whether zlib is actually enabled and the target
1736
# processor architecture.
1737
#
1738
ifndef X64
1739
SSLCONFIG = mingw
1740
ZLIBCONFIG =
1741
ZLIBTARGETS =
1742
else
1743
SSLCONFIG = mingw64
1744
ZLIBCONFIG =
1745
ZLIBTARGETS =
1746
endif
1747
1748
#### Disable creation of the OpenSSL shared libraries. Also, disable support
1749
# for SSLv3 (i.e. thereby forcing the use of TLS).
1750
#
1751
SSLCONFIG += no-ssl3 no-weak-ssl-ciphers no-shared
1752
1753
#### When using zlib, make sure that OpenSSL is configured to use the zlib
1754
# that Fossil knows about (i.e. the one within the source tree).
1755
#
1756
SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib
1757
1758
#### The directories where the OpenSSL include and library files are located.
1759
#
1760
OPENSSLDIR = $(SRCDIR)/../compat/openssl
1761
OPENSSLINCDIR = $(OPENSSLDIR)/include
1762
OPENSSLLIBDIR = $(OPENSSLDIR)
1763
1764
#### Either the directory where the Tcl library is installed or the Tcl
1765
# source code directory resides (depending on the value of the macro
1766
# FOSSIL_TCL_SOURCE). If this points to the Tcl install directory,
1767
# this directory must have "include" and "lib" sub-directories. If
1768
# this points to the Tcl source code directory, this directory must
1769
# have "generic" and "win" sub-directories. The recommended usage
1770
# here is to use the Sysinternals junction tool to create a hard
1771
# link between a "tcl-8.x" sub-directory of the Fossil source code
1772
# directory and the target Tcl directory. This removes the need to
1773
# hard-code the necessary paths in this Makefile.
1774
#
1775
TCLDIR = $(SRCDIR)/../compat/tcl-8.6
1776
1777
#### The Tcl source code directory. This defaults to the same value as
1778
# TCLDIR macro (above), which may not be correct. This value will
1779
# only be used if the FOSSIL_TCL_SOURCE macro is defined.
1780
#
1781
TCLSRCDIR = $(TCLDIR)
1782
1783
#### The Tcl include and library directories. These values will only be
1784
# used if the FOSSIL_TCL_SOURCE macro is not defined.
1785
#
1786
TCLINCDIR = $(TCLDIR)/include
1787
TCLLIBDIR = $(TCLDIR)/lib
1788
1789
#### Tcl: Which Tcl library do we want to use (8.4, 8.5, 8.6, etc)?
1790
#
1791
ifdef FOSSIL_ENABLE_TCL_STUBS
1792
ifndef FOSSIL_ENABLE_TCL_PRIVATE_STUBS
1793
LIBTCL = -ltclstub86
1794
endif
1795
TCLTARGET = libtclstub86.a
1796
else
1797
LIBTCL = -ltcl86
1798
TCLTARGET = binaries
1799
endif
1800
1801
#### C compiler for use in building executables that will run on the
1802
# target platform. This is usually the same as BCCEXE, unless you
1803
# are cross-compiling. This C compiler builds the finished binary
1804
# for fossil. See BCC and BCCEXE above for the C compiler for
1805
# building intermediate code-generator tools.
1806
#
1807
TCCEXE = gcc
1808
1809
#### C compiler and options for use in building executables that will
1810
# run on the target platform. This is usually the almost the same
1811
# as BCC, unless you are cross-compiling. This C compiler builds
1812
# the finished binary for fossil. The BCC compiler above is used
1813
# for building intermediate code-generator tools.
1814
#
1815
TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
1816
TCC += -I$(SRCDIR_extsrc)
1817
1818
#### Add the necessary command line options to build with debugging
1819
# symbols, if enabled.
1820
#
1821
ifdef FOSSIL_ENABLE_SYMBOLS
1822
TCC += -g
1823
else
1824
TCC += -Os
1825
endif
1826
1827
TCC += -L$(ZLIBDIR) -I$(ZINCDIR)
1828
1829
#### Compile resources for use in building executables that will run
1830
# on the target platform.
1831
#
1832
RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR)
1833
RCC += -I$(SRCDIR_extsrc)
1834
1835
# With HTTPS support
1836
ifdef FOSSIL_ENABLE_SSL
1837
TCC += -L$(OPENSSLLIBDIR) -I$(OPENSSLINCDIR)
1838
RCC += -I$(OPENSSLINCDIR)
1839
endif
1840
1841
# With Tcl support
1842
ifdef FOSSIL_ENABLE_TCL
1843
ifdef FOSSIL_TCL_SOURCE
1844
TCC += -L$(TCLSRCDIR)/win -I$(TCLSRCDIR)/generic -I$(TCLSRCDIR)/win
1845
RCC += -I$(TCLSRCDIR)/generic -I$(TCLSRCDIR)/win
1846
else
1847
TCC += -L$(TCLLIBDIR) -I$(TCLINCDIR)
1848
RCC += -I$(TCLINCDIR)
1849
endif
1850
endif
1851
1852
# With MinGW command line handling workaround
1853
ifdef MINGW_IS_32BIT_ONLY
1854
TCC += -DBROKEN_MINGW_CMDLINE=1
1855
RCC += -DBROKEN_MINGW_CMDLINE=1
1856
endif
1857
1858
# With HTTPS support
1859
ifdef FOSSIL_ENABLE_SSL
1860
TCC += -DFOSSIL_ENABLE_SSL=1
1861
RCC += -DFOSSIL_ENABLE_SSL=1
1862
endif
1863
1864
# With relative paths in external diff/gdiff
1865
ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
1866
TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1867
RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1868
endif
1869
1870
# With TH1 embedded docs support
1871
ifdef FOSSIL_ENABLE_TH1_DOCS
1872
TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
1873
RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
1874
endif
1875
1876
# With TH1 hook support
1877
ifdef FOSSIL_ENABLE_TH1_HOOKS
1878
TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
1879
RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
1880
endif
1881
1882
# With Tcl support
1883
ifdef FOSSIL_ENABLE_TCL
1884
TCC += -DFOSSIL_ENABLE_TCL=1
1885
RCC += -DFOSSIL_ENABLE_TCL=1
1886
# Either statically linked or via stubs
1887
ifdef FOSSIL_ENABLE_TCL_STUBS
1888
TCC += -DFOSSIL_ENABLE_TCL_STUBS=1 -DUSE_TCL_STUBS
1889
RCC += -DFOSSIL_ENABLE_TCL_STUBS=1 -DUSE_TCL_STUBS
1890
ifdef FOSSIL_ENABLE_TCL_PRIVATE_STUBS
1891
TCC += -DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
1892
RCC += -DFOSSIL_ENABLE_TCL_PRIVATE_STUBS=1
1893
endif
1894
else
1895
TCC += -DSTATIC_BUILD
1896
RCC += -DSTATIC_BUILD
1897
endif
1898
endif
1899
1900
# With JSON support
1901
ifdef FOSSIL_ENABLE_JSON
1902
TCC += -DFOSSIL_ENABLE_JSON=1
1903
RCC += -DFOSSIL_ENABLE_JSON=1
1904
endif
1905
1906
# With "sys/mman.h" support
1907
ifdef USE_MMAN_H
1908
TCC += -DUSE_MMAN_H=1
1909
RCC += -DUSE_MMAN_H=1
1910
endif
1911
1912
# With SQLite Encryption Extension support
1913
ifdef USE_SEE
1914
TCC += -DUSE_SEE=1
1915
RCC += -DUSE_SEE=1
1916
endif
1917
1918
#### The option -static has no effect on MinGW(-w64), only dynamic
1919
# executables can be built when linking with MSVCRT. OpenSSL
1920
# (optional) and zlib (required) however are always linked in
1921
# statically. Therefore, the FOSSIL_DYNAMIC_BUILD option does
1922
# not really apply to MinGW (i.e. since ALL external libraries
1923
# are NOT linked dynamically).
1924
#
1925
# LIB = -static
1926
1927
#### MinGW: If available, use the Unicode capable runtime startup code.
1928
#
1929
ifndef MINGW_IS_32BIT_ONLY
1930
LIB += -municode
1931
endif
1932
1933
#### SQLite: If enabled, use the system SQLite library.
1934
#
1935
ifdef USE_SYSTEM_SQLITE
1936
LIB += -lsqlite3
1937
endif
1938
1939
#### OpenSSL: Add the necessary libraries required, if enabled.
1940
#
1941
ifdef FOSSIL_ENABLE_SSL
1942
LIB += -lssl -lcrypto -lgdi32 -lcrypt32
1943
endif
1944
1945
#### Tcl: Add the necessary libraries required, if enabled.
1946
#
1947
ifdef FOSSIL_ENABLE_TCL
1948
LIB += $(LIBTCL)
1949
endif
1950
1951
#### Extra arguments for linking the finished binary. Fossil needs
1952
# to link against the Z-Lib compression library. There are no
1953
# other mandatory dependencies.
1954
#
1955
LIB += -lmingwex
1956
1957
#### zlib is required.
1958
#
1959
LIB += -lz
1960
1961
#### These libraries MUST appear in the same order as they do for Tcl
1962
# or linking with it will not work (exact reason unknown).
1963
#
1964
ifdef FOSSIL_ENABLE_TCL
1965
ifdef FOSSIL_ENABLE_TCL_STUBS
1966
LIB += -lkernel32 -lws2_32
1967
else
1968
LIB += -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32
1969
endif
1970
else
1971
LIB += -lkernel32 -lws2_32
1972
endif
1973
1974
#### Library required for DNS lookups.
1975
#
1976
LIB += -ldnsapi
1977
1978
#### Tcl shell for use in running the fossil test suite. This is only
1979
# used for testing.
1980
#
1981
TCLSH = tclsh
1982
1983
#### Nullsoft installer MakeNSIS location
1984
#
1985
MAKENSIS = "$(PROGRAMFILES)\NSIS\MakeNSIS.exe"
1986
1987
#### Inno Setup executable location
1988
#
1989
INNOSETUP = "$(PROGRAMFILES)\Inno Setup 5\ISCC.exe"
1990
1991
#### Include a configuration file that can override any one of these settings.
1992
#
1993
-include config.w32
1994
1995
# STOP HERE
1996
# You should not need to change anything below this line
1997
#--------------------------------------------------------
1998
XBCC = $(BCC) $(CFLAGS)
1999
XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
2000
}
2001
writeln -nonewline "SRC ="
2002
foreach s [lsort $src] {
2003
writeln -nonewline " \\\n \$(SRCDIR)/$s.c"
2004
}
2005
writeln "\n"
2006
writeln -nonewline "EXTRA_FILES ="
2007
foreach s [lsort $extra_files] {
2008
writeln -nonewline " \\\n \$(SRCDIR)/$s"
2009
}
2010
writeln "\n"
2011
writeln -nonewline "TRANS_SRC ="
2012
foreach s [lsort $src] {
2013
writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c"
2014
}
2015
writeln "\n"
2016
writeln -nonewline "OBJ ="
2017
foreach s [lsort $src] {
2018
writeln -nonewline " \\\n \$(OBJDIR)/$s.o"
2019
}
2020
writeln "\n"
2021
writeln "APPNAME = ${name}.exe"
2022
writeln "APPTARGETS ="
2023
writeln {
2024
#### If the USE_WINDOWS variable exists, it is assumed that we are building
2025
# inside of a Windows-style shell; otherwise, it is assumed that we are
2026
# building inside of a Unix-style shell. Note that the "move" command is
2027
# broken when attempting to use it from the Windows shell via MinGW make
2028
# because the SHELL variable is only used for certain commands that are
2029
# recognized internally by make.
2030
#
2031
ifdef USE_WINDOWS
2032
TRANSLATE = $(subst /,\,$(OBJDIR)/translate.exe)
2033
MAKEHEADERS = $(subst /,\,$(OBJDIR)/makeheaders.exe)
2034
MKINDEX = $(subst /,\,$(OBJDIR)/mkindex.exe)
2035
MKBUILTIN = $(subst /,\,$(OBJDIR)/mkbuiltin.exe)
2036
MKVERSION = $(subst /,\,$(OBJDIR)/mkversion.exe)
2037
CODECHECK1 = $(subst /,\,$(OBJDIR)/codecheck1.exe)
2038
CAT = type
2039
CP = copy
2040
GREP = find
2041
MV = copy
2042
RM = del /Q
2043
MKDIR = -mkdir
2044
RMDIR = rmdir /S /Q
2045
else
2046
TRANSLATE = $(OBJDIR)/translate.exe
2047
MAKEHEADERS = $(OBJDIR)/makeheaders.exe
2048
MKINDEX = $(OBJDIR)/mkindex.exe
2049
MKBUILTIN = $(OBJDIR)/mkbuiltin.exe
2050
MKVERSION = $(OBJDIR)/mkversion.exe
2051
CODECHECK1 = $(OBJDIR)/codecheck1.exe
2052
CAT = cat
2053
CP = cp
2054
GREP = grep
2055
MV = mv
2056
RM = rm -f
2057
MKDIR = -mkdir -p
2058
RMDIR = rm -rf
2059
endif}
2060
2061
writeln {
2062
all: $(OBJDIR) $(APPNAME)
2063
2064
$(OBJDIR)/fossil.o: $(SRCDIR)/../win/fossil.rc $(OBJDIR)/VERSION.h
2065
ifdef USE_WINDOWS
2066
$(CP) $(subst /,\,$(SRCDIR)\..\win\fossil.rc) $(subst /,\,$(OBJDIR))
2067
$(CP) $(subst /,\,$(SRCDIR)\..\win\fossil.ico) $(subst /,\,$(OBJDIR))
2068
$(CP) $(subst /,\,$(SRCDIR)\..\win\fossil.exe.manifest) $(subst /,\,$(OBJDIR))
2069
else
2070
$(CP) $(SRCDIR)/../win/fossil.rc $(OBJDIR)
2071
$(CP) $(SRCDIR)/../win/fossil.ico $(OBJDIR)
2072
$(CP) $(SRCDIR)/../win/fossil.exe.manifest $(OBJDIR)
2073
endif
2074
$(RCC) $(OBJDIR)/fossil.rc -o $(OBJDIR)/fossil.o
2075
2076
install: $(OBJDIR) $(APPNAME)
2077
ifdef USE_WINDOWS
2078
$(MKDIR) $(subst /,\,$(INSTALLDIR))
2079
$(CP) $(subst /,\,$(APPNAME)) $(subst /,\,$(INSTALLDIR))
2080
else
2081
$(MKDIR) $(INSTALLDIR)
2082
$(CP) $(APPNAME) $(INSTALLDIR)
2083
endif
2084
2085
$(OBJDIR):
2086
ifdef USE_WINDOWS
2087
$(MKDIR) $(subst /,\,$(OBJDIR))
2088
else
2089
$(MKDIR) $(OBJDIR)
2090
endif
2091
2092
$(TRANSLATE): $(SRCDIR_tools)/translate.c
2093
$(XBCC) -o $@ $(SRCDIR_tools)/translate.c
2094
2095
$(MAKEHEADERS): $(SRCDIR_tools)/makeheaders.c
2096
$(XBCC) -o $@ $(SRCDIR_tools)/makeheaders.c
2097
2098
$(MKINDEX): $(SRCDIR_tools)/mkindex.c
2099
$(XBCC) -o $@ $(SRCDIR_tools)/mkindex.c
2100
2101
$(MKBUILTIN): $(SRCDIR_tools)/mkbuiltin.c
2102
$(XBCC) -o $@ $(SRCDIR_tools)/mkbuiltin.c
2103
2104
$(MKVERSION): $(SRCDIR_tools)/mkversion.c
2105
$(XBCC) -o $@ $(SRCDIR_tools)/mkversion.c
2106
2107
$(CODECHECK1): $(SRCDIR_tools)/codecheck1.c
2108
$(XBCC) -o $@ $(SRCDIR_tools)/codecheck1.c
2109
2110
# WARNING. DANGER. Running the test suite modifies the repository the
2111
# build is done from, i.e. the checkout belongs to. Do not sync/push
2112
# the repository after running the tests.
2113
test: $(OBJDIR) $(APPNAME)
2114
$(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME)
2115
2116
$(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(MKVERSION) $(OBJDIR)/phony.h
2117
$(MKVERSION) $(SRCDIR)/../manifest.uuid $shel files, commit the chang#!iable may be undefined, set to 0 or 1.
2118
# If it is set to 1, then there is no need to build or link
2119
# the sqlite3.o object. Instead, the system SQLite will be linked
2120
# using -lsqlite3.
2121
#
2122
# Closely related is SQLITE3_ORIGIN, with the same 0/1 mapping,
2123
# plus a value of 2 means that we are building a client-provided
2124
# sqlite3.c.
2125
SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
2126
SQLITE3_OBJ.1 = $(OBJDIR)/sqlite3-see.o
2127
# SQLITE3_OBJ.2 is set by the configure process
2128
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
2129
SQLITE3_OBJ = $(SQLITE3_OBJ.$(SQLITE3_ORIGIN))
2130
2131
# The USE_SEE variable may be undefined, 0 or 1. If undefined or 0,
2132
# in-tree SQLite is used. If 1, then sqlite3-see.c (not part of the
2133
# source tree) is used and extra flags are provided to enable the
2134
# SQLite Encryption Extension.
2135
SQLITE3_SRC.0 = $(SRCDIR_extsrc)/sqlite3.c
2136
SQLITE3_SRC.1 = $(SRCDIR_extsrc)/sqlite3-see.c
2137
# SQLITE3_SRC.2 is set by top-level configure/makefile process.
2138
SQLITE3_SRC. = $(SRCDIR_extsrc)/sqlite3.c
2139
SQLITE3_SRC = $(SQLITE3_SRC.$(SQLITE3_ORIGIN))
2140
SQLITE3_SHELL_SRC.0 = $(SRCDIR_extsrc)/shell.c
2141
SQLITE3_SHELL_SRC.1 = $(SRCDIR_extsrc)/shell-see.c
2142
# SQLITE3_SHELL_SRC.2 comes from the configure process
2143
SQLITE3_SHELL_SRC. = $(SRCDIR_extsrc)/shell.c
2144
SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
2145
SEE_FLAGS.0 =
2146
SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
2147
SEE_FL

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button