Fossil

Check-in [aff93fb6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:make it possible to do both Linux and Win builds without doing clean first
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:aff93fb6b8e316426781da70eb18195861a53c85
User & Date: ron 2010-02-21 10:45:44
Context
2010-02-23
15:28
Fix the width of the graph canvas so that it does not overlap and disable hyperlinks in the check-in comment text. Ticket [ddd45723b9a2]. check-in: 847ae1fe user: drh tags: trunk
2010-02-21
10:45
make it possible to do both Linux and Win builds without doing clean first check-in: aff93fb6 user: ron tags: trunk
2010-02-19
17:57
timeline.rss now supports n=### param, like the /timeline page does. This feature is arguable (could lead to DoS), but i want it for harvesting an activity timeline which includes older commits. check-in: 65a46db3 user: stephan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.

1
2
3
4
5
6
7

8
9
10
11
12
13
14
#!/usr/bin/make
#
#### The toplevel directory of the source tree.  Fossil can be built
#    in a directory that is separate from the source tree.  Just change
#    the following to point from the build directory to the src/ folder.
#
SRCDIR = ./src


#### C Compiler and options for use in building executables that
#    will run on the platform that is doing the build.  This is used
#    to compile code-generator programs as part of the build process.
#    See TCC below for the C compiler for building the finished binary.
#
BCC = gcc -g -O2







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/make
#
#### The toplevel directory of the source tree.  Fossil can be built
#    in a directory that is separate from the source tree.  Just change
#    the following to point from the build directory to the src/ folder.
#
SRCDIR = ./src
OBJDIR = ./obj

#### C Compiler and options for use in building executables that
#    will run on the platform that is doing the build.  This is used
#    to compile code-generator programs as part of the build process.
#    See TCC below for the C compiler for building the finished binary.
#
BCC = gcc -g -O2

Changes to Makefile.w32.

1
2
3
4
5
6
7

8
9
10
11
12
13
14
#!/usr/bin/make
#
#### The toplevel directory of the source tree.  Fossil can be built
#    in a directory that is separate from the source tree.  Just change
#    the following to point from the build directory to the src/ folder.
#
SRCDIR = ./src


#### C Compiler and options for use in building executables that
#    will run on the platform that is doing the build.  This is used
#    to compile code-generator programs as part of the build process.
#    See TCC below for the C compiler for building the finished binary.
#
BCC = gcc -g -O2







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/make
#
#### The toplevel directory of the source tree.  Fossil can be built
#    in a directory that is separate from the source tree.  Just change
#    the following to point from the build directory to the src/ folder.
#
SRCDIR = ./src
OBJDIR = ./wobj

#### C Compiler and options for use in building executables that
#    will run on the platform that is doing the build.  This is used
#    to compile code-generator programs as part of the build process.
#    See TCC below for the C compiler for building the finished binary.
#
BCC = gcc -g -O2

Changes to src/main.mk.

155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242



243
244
245
246
247
248
249
...
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
  wiki_.c \
  wikiformat_.c \
  winhttp_.c \
  xfer_.c \
  zip_.c

OBJ = \
  add.o \
  allrepo.o \
  bag.o \
  blob.o \
  branch.o \
  browse.o \
  captcha.o \
  cgi.o \
  checkin.o \
  checkout.o \
  clearsign.o \
  clone.o \
  comformat.o \
  configure.o \
  construct.o \
  content.o \
  db.o \
  delta.o \
  deltacmd.o \
  descendants.o \
  diff.o \
  diffcmd.o \
  doc.o \
  encode.o \
  file.o \
  finfo.o \
  graph.o \
  http.o \
  http_socket.o \
  http_ssl.o \
  http_transport.o \
  info.o \
  login.o \
  main.o \
  manifest.o \
  md5.o \
  merge.o \
  merge3.o \
  name.o \
  pivot.o \
  pqueue.o \
  printf.o \
  rebuild.o \
  report.o \
  rss.o \
  rstats.o \
  schema.o \
  search.o \
  setup.o \
  sha1.o \
  shun.o \
  skins.o \
  stat.o \
  style.o \
  sync.o \
  tag.o \
  th_main.o \
  timeline.o \
  tkt.o \
  tktsetup.o \
  undo.o \
  update.o \
  url.o \
  user.o \
  verify.o \
  vfile.o \
  wiki.o \
  wikiformat.o \
  winhttp.o \
  xfer.o \
  zip.o

APPNAME = fossil$(E)



all:	$(APPNAME)

install:	$(APPNAME)
	mv $(APPNAME) $(INSTALLDIR)




translate:	$(SRCDIR)/translate.c
	$(BCC) -o translate $(SRCDIR)/translate.c

makeheaders:	$(SRCDIR)/makeheaders.c
	$(BCC) -o makeheaders $(SRCDIR)/makeheaders.c

mkindex:	$(SRCDIR)/mkindex.c
................................................................................
	$(TCLSH) test/tester.tcl $(APPNAME)

VERSION.h:	$(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest
	awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}'  $(SRCDIR)/../manifest.uuid >VERSION.h
	awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}'  $(SRCDIR)/../manifest.uuid >>VERSION.h
	awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n", substr($$2,1,10),substr($$2,12)}'  $(SRCDIR)/../manifest >>VERSION.h

$(APPNAME):	headers $(OBJ) sqlite3.o th.o th_lang.o
	$(TCC) -o $(APPNAME) $(OBJ) sqlite3.o th.o th_lang.o $(LIB)

# This rule prevents make from using its default rules to try build
# an executable named "manifest" out of the file named "manifest.c"
#
$(SRCDIR)/../manifest:	
	# noop

clean:	
	rm -f *.o *_.c $(APPNAME) VERSION.h
	rm -f translate makeheaders mkindex page_index.h headers
	rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h

page_index.h: $(TRANS_SRC) mkindex
	./mkindex $(TRANS_SRC) >$@
headers:	page_index.h makeheaders VERSION.h
	./makeheaders  add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
	touch headers
headers: Makefile
Makefile:
add_.c:	$(SRCDIR)/add.c translate
	./translate $(SRCDIR)/add.c >add_.c

add.o:	add_.c add.h  $(SRCDIR)/config.h
	$(XTCC) -o add.o -c add_.c

add.h:	headers
allrepo_.c:	$(SRCDIR)/allrepo.c translate
	./translate $(SRCDIR)/allrepo.c >allrepo_.c

allrepo.o:	allrepo_.c allrepo.h  $(SRCDIR)/config.h
	$(XTCC) -o allrepo.o -c allrepo_.c

allrepo.h:	headers
bag_.c:	$(SRCDIR)/bag.c translate
	./translate $(SRCDIR)/bag.c >bag_.c

bag.o:	bag_.c bag.h  $(SRCDIR)/config.h
	$(XTCC) -o bag.o -c bag_.c

bag.h:	headers
blob_.c:	$(SRCDIR)/blob.c translate
	./translate $(SRCDIR)/blob.c >blob_.c

blob.o:	blob_.c blob.h  $(SRCDIR)/config.h
	$(XTCC) -o blob.o -c blob_.c

blob.h:	headers
branch_.c:	$(SRCDIR)/branch.c translate
	./translate $(SRCDIR)/branch.c >branch_.c

branch.o:	branch_.c branch.h  $(SRCDIR)/config.h
	$(XTCC) -o branch.o -c branch_.c

branch.h:	headers
browse_.c:	$(SRCDIR)/browse.c translate
	./translate $(SRCDIR)/browse.c >browse_.c

browse.o:	browse_.c browse.h  $(SRCDIR)/config.h
	$(XTCC) -o browse.o -c browse_.c

browse.h:	headers
captcha_.c:	$(SRCDIR)/captcha.c translate
	./translate $(SRCDIR)/captcha.c >captcha_.c

captcha.o:	captcha_.c captcha.h  $(SRCDIR)/config.h
	$(XTCC) -o captcha.o -c captcha_.c

captcha.h:	headers
cgi_.c:	$(SRCDIR)/cgi.c translate
	./translate $(SRCDIR)/cgi.c >cgi_.c

cgi.o:	cgi_.c cgi.h  $(SRCDIR)/config.h
	$(XTCC) -o cgi.o -c cgi_.c

cgi.h:	headers
checkin_.c:	$(SRCDIR)/checkin.c translate
	./translate $(SRCDIR)/checkin.c >checkin_.c

checkin.o:	checkin_.c checkin.h  $(SRCDIR)/config.h
	$(XTCC) -o checkin.o -c checkin_.c

checkin.h:	headers
checkout_.c:	$(SRCDIR)/checkout.c translate
	./translate $(SRCDIR)/checkout.c >checkout_.c

checkout.o:	checkout_.c checkout.h  $(SRCDIR)/config.h
	$(XTCC) -o checkout.o -c checkout_.c

checkout.h:	headers
clearsign_.c:	$(SRCDIR)/clearsign.c translate
	./translate $(SRCDIR)/clearsign.c >clearsign_.c

clearsign.o:	clearsign_.c clearsign.h  $(SRCDIR)/config.h
	$(XTCC) -o clearsign.o -c clearsign_.c

clearsign.h:	headers
clone_.c:	$(SRCDIR)/clone.c translate
	./translate $(SRCDIR)/clone.c >clone_.c

clone.o:	clone_.c clone.h  $(SRCDIR)/config.h
	$(XTCC) -o clone.o -c clone_.c

clone.h:	headers
comformat_.c:	$(SRCDIR)/comformat.c translate
	./translate $(SRCDIR)/comformat.c >comformat_.c

comformat.o:	comformat_.c comformat.h  $(SRCDIR)/config.h
	$(XTCC) -o comformat.o -c comformat_.c

comformat.h:	headers
configure_.c:	$(SRCDIR)/configure.c translate
	./translate $(SRCDIR)/configure.c >configure_.c

configure.o:	configure_.c configure.h  $(SRCDIR)/config.h
	$(XTCC) -o configure.o -c configure_.c

configure.h:	headers
construct_.c:	$(SRCDIR)/construct.c translate
	./translate $(SRCDIR)/construct.c >construct_.c

construct.o:	construct_.c construct.h  $(SRCDIR)/config.h
	$(XTCC) -o construct.o -c construct_.c

construct.h:	headers
content_.c:	$(SRCDIR)/content.c translate
	./translate $(SRCDIR)/content.c >content_.c

content.o:	content_.c content.h  $(SRCDIR)/config.h
	$(XTCC) -o content.o -c content_.c

content.h:	headers
db_.c:	$(SRCDIR)/db.c translate
	./translate $(SRCDIR)/db.c >db_.c

db.o:	db_.c db.h  $(SRCDIR)/config.h
	$(XTCC) -o db.o -c db_.c

db.h:	headers
delta_.c:	$(SRCDIR)/delta.c translate
	./translate $(SRCDIR)/delta.c >delta_.c

delta.o:	delta_.c delta.h  $(SRCDIR)/config.h
	$(XTCC) -o delta.o -c delta_.c

delta.h:	headers
deltacmd_.c:	$(SRCDIR)/deltacmd.c translate
	./translate $(SRCDIR)/deltacmd.c >deltacmd_.c

deltacmd.o:	deltacmd_.c deltacmd.h  $(SRCDIR)/config.h
	$(XTCC) -o deltacmd.o -c deltacmd_.c

deltacmd.h:	headers
descendants_.c:	$(SRCDIR)/descendants.c translate
	./translate $(SRCDIR)/descendants.c >descendants_.c

descendants.o:	descendants_.c descendants.h  $(SRCDIR)/config.h
	$(XTCC) -o descendants.o -c descendants_.c

descendants.h:	headers
diff_.c:	$(SRCDIR)/diff.c translate
	./translate $(SRCDIR)/diff.c >diff_.c

diff.o:	diff_.c diff.h  $(SRCDIR)/config.h
	$(XTCC) -o diff.o -c diff_.c

diff.h:	headers
diffcmd_.c:	$(SRCDIR)/diffcmd.c translate
	./translate $(SRCDIR)/diffcmd.c >diffcmd_.c

diffcmd.o:	diffcmd_.c diffcmd.h  $(SRCDIR)/config.h
	$(XTCC) -o diffcmd.o -c diffcmd_.c

diffcmd.h:	headers
doc_.c:	$(SRCDIR)/doc.c translate
	./translate $(SRCDIR)/doc.c >doc_.c

doc.o:	doc_.c doc.h  $(SRCDIR)/config.h
	$(XTCC) -o doc.o -c doc_.c

doc.h:	headers
encode_.c:	$(SRCDIR)/encode.c translate
	./translate $(SRCDIR)/encode.c >encode_.c

encode.o:	encode_.c encode.h  $(SRCDIR)/config.h
	$(XTCC) -o encode.o -c encode_.c

encode.h:	headers
file_.c:	$(SRCDIR)/file.c translate
	./translate $(SRCDIR)/file.c >file_.c

file.o:	file_.c file.h  $(SRCDIR)/config.h
	$(XTCC) -o file.o -c file_.c

file.h:	headers
finfo_.c:	$(SRCDIR)/finfo.c translate
	./translate $(SRCDIR)/finfo.c >finfo_.c

finfo.o:	finfo_.c finfo.h  $(SRCDIR)/config.h
	$(XTCC) -o finfo.o -c finfo_.c

finfo.h:	headers
graph_.c:	$(SRCDIR)/graph.c translate
	./translate $(SRCDIR)/graph.c >graph_.c

graph.o:	graph_.c graph.h  $(SRCDIR)/config.h
	$(XTCC) -o graph.o -c graph_.c

graph.h:	headers
http_.c:	$(SRCDIR)/http.c translate
	./translate $(SRCDIR)/http.c >http_.c

http.o:	http_.c http.h  $(SRCDIR)/config.h
	$(XTCC) -o http.o -c http_.c

http.h:	headers
http_socket_.c:	$(SRCDIR)/http_socket.c translate
	./translate $(SRCDIR)/http_socket.c >http_socket_.c

http_socket.o:	http_socket_.c http_socket.h  $(SRCDIR)/config.h
	$(XTCC) -o http_socket.o -c http_socket_.c

http_socket.h:	headers
http_ssl_.c:	$(SRCDIR)/http_ssl.c translate
	./translate $(SRCDIR)/http_ssl.c >http_ssl_.c

http_ssl.o:	http_ssl_.c http_ssl.h  $(SRCDIR)/config.h
	$(XTCC) -o http_ssl.o -c http_ssl_.c

http_ssl.h:	headers
http_transport_.c:	$(SRCDIR)/http_transport.c translate
	./translate $(SRCDIR)/http_transport.c >http_transport_.c

http_transport.o:	http_transport_.c http_transport.h  $(SRCDIR)/config.h
	$(XTCC) -o http_transport.o -c http_transport_.c

http_transport.h:	headers
info_.c:	$(SRCDIR)/info.c translate
	./translate $(SRCDIR)/info.c >info_.c

info.o:	info_.c info.h  $(SRCDIR)/config.h
	$(XTCC) -o info.o -c info_.c

info.h:	headers
login_.c:	$(SRCDIR)/login.c translate
	./translate $(SRCDIR)/login.c >login_.c

login.o:	login_.c login.h  $(SRCDIR)/config.h
	$(XTCC) -o login.o -c login_.c

login.h:	headers
main_.c:	$(SRCDIR)/main.c translate
	./translate $(SRCDIR)/main.c >main_.c

main.o:	main_.c main.h page_index.h $(SRCDIR)/config.h
	$(XTCC) -o main.o -c main_.c

main.h:	headers
manifest_.c:	$(SRCDIR)/manifest.c translate
	./translate $(SRCDIR)/manifest.c >manifest_.c

manifest.o:	manifest_.c manifest.h  $(SRCDIR)/config.h
	$(XTCC) -o manifest.o -c manifest_.c

manifest.h:	headers
md5_.c:	$(SRCDIR)/md5.c translate
	./translate $(SRCDIR)/md5.c >md5_.c

md5.o:	md5_.c md5.h  $(SRCDIR)/config.h
	$(XTCC) -o md5.o -c md5_.c

md5.h:	headers
merge_.c:	$(SRCDIR)/merge.c translate
	./translate $(SRCDIR)/merge.c >merge_.c

merge.o:	merge_.c merge.h  $(SRCDIR)/config.h
	$(XTCC) -o merge.o -c merge_.c

merge.h:	headers
merge3_.c:	$(SRCDIR)/merge3.c translate
	./translate $(SRCDIR)/merge3.c >merge3_.c

merge3.o:	merge3_.c merge3.h  $(SRCDIR)/config.h
	$(XTCC) -o merge3.o -c merge3_.c

merge3.h:	headers
name_.c:	$(SRCDIR)/name.c translate
	./translate $(SRCDIR)/name.c >name_.c

name.o:	name_.c name.h  $(SRCDIR)/config.h
	$(XTCC) -o name.o -c name_.c

name.h:	headers
pivot_.c:	$(SRCDIR)/pivot.c translate
	./translate $(SRCDIR)/pivot.c >pivot_.c

pivot.o:	pivot_.c pivot.h  $(SRCDIR)/config.h
	$(XTCC) -o pivot.o -c pivot_.c

pivot.h:	headers
pqueue_.c:	$(SRCDIR)/pqueue.c translate
	./translate $(SRCDIR)/pqueue.c >pqueue_.c

pqueue.o:	pqueue_.c pqueue.h  $(SRCDIR)/config.h
	$(XTCC) -o pqueue.o -c pqueue_.c

pqueue.h:	headers
printf_.c:	$(SRCDIR)/printf.c translate
	./translate $(SRCDIR)/printf.c >printf_.c

printf.o:	printf_.c printf.h  $(SRCDIR)/config.h
	$(XTCC) -o printf.o -c printf_.c

printf.h:	headers
rebuild_.c:	$(SRCDIR)/rebuild.c translate
	./translate $(SRCDIR)/rebuild.c >rebuild_.c

rebuild.o:	rebuild_.c rebuild.h  $(SRCDIR)/config.h
	$(XTCC) -o rebuild.o -c rebuild_.c

rebuild.h:	headers
report_.c:	$(SRCDIR)/report.c translate
	./translate $(SRCDIR)/report.c >report_.c

report.o:	report_.c report.h  $(SRCDIR)/config.h
	$(XTCC) -o report.o -c report_.c

report.h:	headers
rss_.c:	$(SRCDIR)/rss.c translate
	./translate $(SRCDIR)/rss.c >rss_.c

rss.o:	rss_.c rss.h  $(SRCDIR)/config.h
	$(XTCC) -o rss.o -c rss_.c

rss.h:	headers
rstats_.c:	$(SRCDIR)/rstats.c translate
	./translate $(SRCDIR)/rstats.c >rstats_.c

rstats.o:	rstats_.c rstats.h  $(SRCDIR)/config.h
	$(XTCC) -o rstats.o -c rstats_.c

rstats.h:	headers
schema_.c:	$(SRCDIR)/schema.c translate
	./translate $(SRCDIR)/schema.c >schema_.c

schema.o:	schema_.c schema.h  $(SRCDIR)/config.h
	$(XTCC) -o schema.o -c schema_.c

schema.h:	headers
search_.c:	$(SRCDIR)/search.c translate
	./translate $(SRCDIR)/search.c >search_.c

search.o:	search_.c search.h  $(SRCDIR)/config.h
	$(XTCC) -o search.o -c search_.c

search.h:	headers
setup_.c:	$(SRCDIR)/setup.c translate
	./translate $(SRCDIR)/setup.c >setup_.c

setup.o:	setup_.c setup.h  $(SRCDIR)/config.h
	$(XTCC) -o setup.o -c setup_.c

setup.h:	headers
sha1_.c:	$(SRCDIR)/sha1.c translate
	./translate $(SRCDIR)/sha1.c >sha1_.c

sha1.o:	sha1_.c sha1.h  $(SRCDIR)/config.h
	$(XTCC) -o sha1.o -c sha1_.c

sha1.h:	headers
shun_.c:	$(SRCDIR)/shun.c translate
	./translate $(SRCDIR)/shun.c >shun_.c

shun.o:	shun_.c shun.h  $(SRCDIR)/config.h
	$(XTCC) -o shun.o -c shun_.c

shun.h:	headers
skins_.c:	$(SRCDIR)/skins.c translate
	./translate $(SRCDIR)/skins.c >skins_.c

skins.o:	skins_.c skins.h  $(SRCDIR)/config.h
	$(XTCC) -o skins.o -c skins_.c

skins.h:	headers
stat_.c:	$(SRCDIR)/stat.c translate
	./translate $(SRCDIR)/stat.c >stat_.c

stat.o:	stat_.c stat.h  $(SRCDIR)/config.h
	$(XTCC) -o stat.o -c stat_.c

stat.h:	headers
style_.c:	$(SRCDIR)/style.c translate
	./translate $(SRCDIR)/style.c >style_.c

style.o:	style_.c style.h  $(SRCDIR)/config.h
	$(XTCC) -o style.o -c style_.c

style.h:	headers
sync_.c:	$(SRCDIR)/sync.c translate
	./translate $(SRCDIR)/sync.c >sync_.c

sync.o:	sync_.c sync.h  $(SRCDIR)/config.h
	$(XTCC) -o sync.o -c sync_.c

sync.h:	headers
tag_.c:	$(SRCDIR)/tag.c translate
	./translate $(SRCDIR)/tag.c >tag_.c

tag.o:	tag_.c tag.h  $(SRCDIR)/config.h
	$(XTCC) -o tag.o -c tag_.c

tag.h:	headers
th_main_.c:	$(SRCDIR)/th_main.c translate
	./translate $(SRCDIR)/th_main.c >th_main_.c

th_main.o:	th_main_.c th_main.h  $(SRCDIR)/config.h
	$(XTCC) -o th_main.o -c th_main_.c

th_main.h:	headers
timeline_.c:	$(SRCDIR)/timeline.c translate
	./translate $(SRCDIR)/timeline.c >timeline_.c

timeline.o:	timeline_.c timeline.h  $(SRCDIR)/config.h
	$(XTCC) -o timeline.o -c timeline_.c

timeline.h:	headers
tkt_.c:	$(SRCDIR)/tkt.c translate
	./translate $(SRCDIR)/tkt.c >tkt_.c

tkt.o:	tkt_.c tkt.h  $(SRCDIR)/config.h
	$(XTCC) -o tkt.o -c tkt_.c

tkt.h:	headers
tktsetup_.c:	$(SRCDIR)/tktsetup.c translate
	./translate $(SRCDIR)/tktsetup.c >tktsetup_.c

tktsetup.o:	tktsetup_.c tktsetup.h  $(SRCDIR)/config.h
	$(XTCC) -o tktsetup.o -c tktsetup_.c

tktsetup.h:	headers
undo_.c:	$(SRCDIR)/undo.c translate
	./translate $(SRCDIR)/undo.c >undo_.c

undo.o:	undo_.c undo.h  $(SRCDIR)/config.h
	$(XTCC) -o undo.o -c undo_.c

undo.h:	headers
update_.c:	$(SRCDIR)/update.c translate
	./translate $(SRCDIR)/update.c >update_.c

update.o:	update_.c update.h  $(SRCDIR)/config.h
	$(XTCC) -o update.o -c update_.c

update.h:	headers
url_.c:	$(SRCDIR)/url.c translate
	./translate $(SRCDIR)/url.c >url_.c

url.o:	url_.c url.h  $(SRCDIR)/config.h
	$(XTCC) -o url.o -c url_.c

url.h:	headers
user_.c:	$(SRCDIR)/user.c translate
	./translate $(SRCDIR)/user.c >user_.c

user.o:	user_.c user.h  $(SRCDIR)/config.h
	$(XTCC) -o user.o -c user_.c

user.h:	headers
verify_.c:	$(SRCDIR)/verify.c translate
	./translate $(SRCDIR)/verify.c >verify_.c

verify.o:	verify_.c verify.h  $(SRCDIR)/config.h
	$(XTCC) -o verify.o -c verify_.c

verify.h:	headers
vfile_.c:	$(SRCDIR)/vfile.c translate
	./translate $(SRCDIR)/vfile.c >vfile_.c

vfile.o:	vfile_.c vfile.h  $(SRCDIR)/config.h
	$(XTCC) -o vfile.o -c vfile_.c

vfile.h:	headers
wiki_.c:	$(SRCDIR)/wiki.c translate
	./translate $(SRCDIR)/wiki.c >wiki_.c

wiki.o:	wiki_.c wiki.h  $(SRCDIR)/config.h
	$(XTCC) -o wiki.o -c wiki_.c

wiki.h:	headers
wikiformat_.c:	$(SRCDIR)/wikiformat.c translate
	./translate $(SRCDIR)/wikiformat.c >wikiformat_.c

wikiformat.o:	wikiformat_.c wikiformat.h  $(SRCDIR)/config.h
	$(XTCC) -o wikiformat.o -c wikiformat_.c

wikiformat.h:	headers
winhttp_.c:	$(SRCDIR)/winhttp.c translate
	./translate $(SRCDIR)/winhttp.c >winhttp_.c

winhttp.o:	winhttp_.c winhttp.h  $(SRCDIR)/config.h
	$(XTCC) -o winhttp.o -c winhttp_.c

winhttp.h:	headers
xfer_.c:	$(SRCDIR)/xfer.c translate
	./translate $(SRCDIR)/xfer.c >xfer_.c

xfer.o:	xfer_.c xfer.h  $(SRCDIR)/config.h
	$(XTCC) -o xfer.o -c xfer_.c

xfer.h:	headers
zip_.c:	$(SRCDIR)/zip.c translate
	./translate $(SRCDIR)/zip.c >zip_.c

zip.o:	zip_.c zip.h  $(SRCDIR)/config.h
	$(XTCC) -o zip.o -c zip_.c

zip.h:	headers
sqlite3.o:	$(SRCDIR)/sqlite3.c
	$(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -c $(SRCDIR)/sqlite3.c -o sqlite3.o

th.o:	$(SRCDIR)/th.c
	$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o th.o

th_lang.o:	$(SRCDIR)/th_lang.c
	$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_lang.c -o th_lang.o








|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|





|




>
>
>







 







|
|








|













|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|





|
|


|
|

|
|

|
|

155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
...
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
  wiki_.c \
  wikiformat_.c \
  winhttp_.c \
  xfer_.c \
  zip_.c

OBJ = \
 $(OBJDIR)/add.o \
 $(OBJDIR)/allrepo.o \
 $(OBJDIR)/bag.o \
 $(OBJDIR)/blob.o \
 $(OBJDIR)/branch.o \
 $(OBJDIR)/browse.o \
 $(OBJDIR)/captcha.o \
 $(OBJDIR)/cgi.o \
 $(OBJDIR)/checkin.o \
 $(OBJDIR)/checkout.o \
 $(OBJDIR)/clearsign.o \
 $(OBJDIR)/clone.o \
 $(OBJDIR)/comformat.o \
 $(OBJDIR)/configure.o \
 $(OBJDIR)/construct.o \
 $(OBJDIR)/content.o \
 $(OBJDIR)/db.o \
 $(OBJDIR)/delta.o \
 $(OBJDIR)/deltacmd.o \
 $(OBJDIR)/descendants.o \
 $(OBJDIR)/diff.o \
 $(OBJDIR)/diffcmd.o \
 $(OBJDIR)/doc.o \
 $(OBJDIR)/encode.o \
 $(OBJDIR)/file.o \
 $(OBJDIR)/finfo.o \
 $(OBJDIR)/graph.o \
 $(OBJDIR)/http.o \
 $(OBJDIR)/http_socket.o \
 $(OBJDIR)/http_ssl.o \
 $(OBJDIR)/http_transport.o \
 $(OBJDIR)/info.o \
 $(OBJDIR)/login.o \
 $(OBJDIR)/main.o \
 $(OBJDIR)/manifest.o \
 $(OBJDIR)/md5.o \
 $(OBJDIR)/merge.o \
 $(OBJDIR)/merge3.o \
 $(OBJDIR)/name.o \
 $(OBJDIR)/pivot.o \
 $(OBJDIR)/pqueue.o \
 $(OBJDIR)/printf.o \
 $(OBJDIR)/rebuild.o \
 $(OBJDIR)/report.o \
 $(OBJDIR)/rss.o \
 $(OBJDIR)/rstats.o \
 $(OBJDIR)/schema.o \
 $(OBJDIR)/search.o \
 $(OBJDIR)/setup.o \
 $(OBJDIR)/sha1.o \
 $(OBJDIR)/shun.o \
 $(OBJDIR)/skins.o \
 $(OBJDIR)/stat.o \
 $(OBJDIR)/style.o \
 $(OBJDIR)/sync.o \
 $(OBJDIR)/tag.o \
 $(OBJDIR)/th_main.o \
 $(OBJDIR)/timeline.o \
 $(OBJDIR)/tkt.o \
 $(OBJDIR)/tktsetup.o \
 $(OBJDIR)/undo.o \
 $(OBJDIR)/update.o \
 $(OBJDIR)/url.o \
 $(OBJDIR)/user.o \
 $(OBJDIR)/verify.o \
 $(OBJDIR)/vfile.o \
 $(OBJDIR)/wiki.o \
 $(OBJDIR)/wikiformat.o \
 $(OBJDIR)/winhttp.o \
 $(OBJDIR)/xfer.o \
 $(OBJDIR)/zip.o

APPNAME = fossil$(E)



all:	$(OBJDIR) $(APPNAME)

install:	$(APPNAME)
	mv $(APPNAME) $(INSTALLDIR)

$(OBJDIR):
	-mkdir $(OBJDIR)

translate:	$(SRCDIR)/translate.c
	$(BCC) -o translate $(SRCDIR)/translate.c

makeheaders:	$(SRCDIR)/makeheaders.c
	$(BCC) -o makeheaders $(SRCDIR)/makeheaders.c

mkindex:	$(SRCDIR)/mkindex.c
................................................................................
	$(TCLSH) test/tester.tcl $(APPNAME)

VERSION.h:	$(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest
	awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}'  $(SRCDIR)/../manifest.uuid >VERSION.h
	awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}'  $(SRCDIR)/../manifest.uuid >>VERSION.h
	awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n", substr($$2,1,10),substr($$2,12)}'  $(SRCDIR)/../manifest >>VERSION.h

$(APPNAME):	headers $(OBJ) $(OBJDIR)/sqlite3.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o
	$(TCC) -o $(APPNAME) $(OBJ) $(OBJDIR)/sqlite3.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(LIB)

# This rule prevents make from using its default rules to try build
# an executable named "manifest" out of the file named "manifest.c"
#
$(SRCDIR)/../manifest:	
	# noop

clean:	
	rm -f $(OBJDIR)/*.o *_.c $(APPNAME) VERSION.h
	rm -f translate makeheaders mkindex page_index.h headers
	rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h

page_index.h: $(TRANS_SRC) mkindex
	./mkindex $(TRANS_SRC) >$@
headers:	page_index.h makeheaders VERSION.h
	./makeheaders  add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
	touch headers
headers: Makefile
Makefile:
add_.c:	$(SRCDIR)/add.c translate
	./translate $(SRCDIR)/add.c >add_.c

$(OBJDIR)/add.o:	add_.c add.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/add.o -c add_.c

add.h:	headers
allrepo_.c:	$(SRCDIR)/allrepo.c translate
	./translate $(SRCDIR)/allrepo.c >allrepo_.c

$(OBJDIR)/allrepo.o:	allrepo_.c allrepo.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/allrepo.o -c allrepo_.c

allrepo.h:	headers
bag_.c:	$(SRCDIR)/bag.c translate
	./translate $(SRCDIR)/bag.c >bag_.c

$(OBJDIR)/bag.o:	bag_.c bag.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/bag.o -c bag_.c

bag.h:	headers
blob_.c:	$(SRCDIR)/blob.c translate
	./translate $(SRCDIR)/blob.c >blob_.c

$(OBJDIR)/blob.o:	blob_.c blob.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/blob.o -c blob_.c

blob.h:	headers
branch_.c:	$(SRCDIR)/branch.c translate
	./translate $(SRCDIR)/branch.c >branch_.c

$(OBJDIR)/branch.o:	branch_.c branch.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/branch.o -c branch_.c

branch.h:	headers
browse_.c:	$(SRCDIR)/browse.c translate
	./translate $(SRCDIR)/browse.c >browse_.c

$(OBJDIR)/browse.o:	browse_.c browse.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/browse.o -c browse_.c

browse.h:	headers
captcha_.c:	$(SRCDIR)/captcha.c translate
	./translate $(SRCDIR)/captcha.c >captcha_.c

$(OBJDIR)/captcha.o:	captcha_.c captcha.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/captcha.o -c captcha_.c

captcha.h:	headers
cgi_.c:	$(SRCDIR)/cgi.c translate
	./translate $(SRCDIR)/cgi.c >cgi_.c

$(OBJDIR)/cgi.o:	cgi_.c cgi.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/cgi.o -c cgi_.c

cgi.h:	headers
checkin_.c:	$(SRCDIR)/checkin.c translate
	./translate $(SRCDIR)/checkin.c >checkin_.c

$(OBJDIR)/checkin.o:	checkin_.c checkin.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/checkin.o -c checkin_.c

checkin.h:	headers
checkout_.c:	$(SRCDIR)/checkout.c translate
	./translate $(SRCDIR)/checkout.c >checkout_.c

$(OBJDIR)/checkout.o:	checkout_.c checkout.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/checkout.o -c checkout_.c

checkout.h:	headers
clearsign_.c:	$(SRCDIR)/clearsign.c translate
	./translate $(SRCDIR)/clearsign.c >clearsign_.c

$(OBJDIR)/clearsign.o:	clearsign_.c clearsign.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/clearsign.o -c clearsign_.c

clearsign.h:	headers
clone_.c:	$(SRCDIR)/clone.c translate
	./translate $(SRCDIR)/clone.c >clone_.c

$(OBJDIR)/clone.o:	clone_.c clone.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/clone.o -c clone_.c

clone.h:	headers
comformat_.c:	$(SRCDIR)/comformat.c translate
	./translate $(SRCDIR)/comformat.c >comformat_.c

$(OBJDIR)/comformat.o:	comformat_.c comformat.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/comformat.o -c comformat_.c

comformat.h:	headers
configure_.c:	$(SRCDIR)/configure.c translate
	./translate $(SRCDIR)/configure.c >configure_.c

$(OBJDIR)/configure.o:	configure_.c configure.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/configure.o -c configure_.c

configure.h:	headers
construct_.c:	$(SRCDIR)/construct.c translate
	./translate $(SRCDIR)/construct.c >construct_.c

$(OBJDIR)/construct.o:	construct_.c construct.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/construct.o -c construct_.c

construct.h:	headers
content_.c:	$(SRCDIR)/content.c translate
	./translate $(SRCDIR)/content.c >content_.c

$(OBJDIR)/content.o:	content_.c content.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/content.o -c content_.c

content.h:	headers
db_.c:	$(SRCDIR)/db.c translate
	./translate $(SRCDIR)/db.c >db_.c

$(OBJDIR)/db.o:	db_.c db.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/db.o -c db_.c

db.h:	headers
delta_.c:	$(SRCDIR)/delta.c translate
	./translate $(SRCDIR)/delta.c >delta_.c

$(OBJDIR)/delta.o:	delta_.c delta.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/delta.o -c delta_.c

delta.h:	headers
deltacmd_.c:	$(SRCDIR)/deltacmd.c translate
	./translate $(SRCDIR)/deltacmd.c >deltacmd_.c

$(OBJDIR)/deltacmd.o:	deltacmd_.c deltacmd.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/deltacmd.o -c deltacmd_.c

deltacmd.h:	headers
descendants_.c:	$(SRCDIR)/descendants.c translate
	./translate $(SRCDIR)/descendants.c >descendants_.c

$(OBJDIR)/descendants.o:	descendants_.c descendants.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/descendants.o -c descendants_.c

descendants.h:	headers
diff_.c:	$(SRCDIR)/diff.c translate
	./translate $(SRCDIR)/diff.c >diff_.c

$(OBJDIR)/diff.o:	diff_.c diff.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/diff.o -c diff_.c

diff.h:	headers
diffcmd_.c:	$(SRCDIR)/diffcmd.c translate
	./translate $(SRCDIR)/diffcmd.c >diffcmd_.c

$(OBJDIR)/diffcmd.o:	diffcmd_.c diffcmd.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/diffcmd.o -c diffcmd_.c

diffcmd.h:	headers
doc_.c:	$(SRCDIR)/doc.c translate
	./translate $(SRCDIR)/doc.c >doc_.c

$(OBJDIR)/doc.o:	doc_.c doc.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/doc.o -c doc_.c

doc.h:	headers
encode_.c:	$(SRCDIR)/encode.c translate
	./translate $(SRCDIR)/encode.c >encode_.c

$(OBJDIR)/encode.o:	encode_.c encode.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/encode.o -c encode_.c

encode.h:	headers
file_.c:	$(SRCDIR)/file.c translate
	./translate $(SRCDIR)/file.c >file_.c

$(OBJDIR)/file.o:	file_.c file.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/file.o -c file_.c

file.h:	headers
finfo_.c:	$(SRCDIR)/finfo.c translate
	./translate $(SRCDIR)/finfo.c >finfo_.c

$(OBJDIR)/finfo.o:	finfo_.c finfo.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/finfo.o -c finfo_.c

finfo.h:	headers
graph_.c:	$(SRCDIR)/graph.c translate
	./translate $(SRCDIR)/graph.c >graph_.c

$(OBJDIR)/graph.o:	graph_.c graph.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/graph.o -c graph_.c

graph.h:	headers
http_.c:	$(SRCDIR)/http.c translate
	./translate $(SRCDIR)/http.c >http_.c

$(OBJDIR)/http.o:	http_.c http.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/http.o -c http_.c

http.h:	headers
http_socket_.c:	$(SRCDIR)/http_socket.c translate
	./translate $(SRCDIR)/http_socket.c >http_socket_.c

$(OBJDIR)/http_socket.o:	http_socket_.c http_socket.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/http_socket.o -c http_socket_.c

http_socket.h:	headers
http_ssl_.c:	$(SRCDIR)/http_ssl.c translate
	./translate $(SRCDIR)/http_ssl.c >http_ssl_.c

$(OBJDIR)/http_ssl.o:	http_ssl_.c http_ssl.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/http_ssl.o -c http_ssl_.c

http_ssl.h:	headers
http_transport_.c:	$(SRCDIR)/http_transport.c translate
	./translate $(SRCDIR)/http_transport.c >http_transport_.c

$(OBJDIR)/http_transport.o:	http_transport_.c http_transport.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/http_transport.o -c http_transport_.c

http_transport.h:	headers
info_.c:	$(SRCDIR)/info.c translate
	./translate $(SRCDIR)/info.c >info_.c

$(OBJDIR)/info.o:	info_.c info.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/info.o -c info_.c

info.h:	headers
login_.c:	$(SRCDIR)/login.c translate
	./translate $(SRCDIR)/login.c >login_.c

$(OBJDIR)/login.o:	login_.c login.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/login.o -c login_.c

login.h:	headers
main_.c:	$(SRCDIR)/main.c translate
	./translate $(SRCDIR)/main.c >main_.c

$(OBJDIR)/main.o:	main_.c main.h page_index.h $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/main.o -c main_.c

main.h:	headers
manifest_.c:	$(SRCDIR)/manifest.c translate
	./translate $(SRCDIR)/manifest.c >manifest_.c

$(OBJDIR)/manifest.o:	manifest_.c manifest.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/manifest.o -c manifest_.c

manifest.h:	headers
md5_.c:	$(SRCDIR)/md5.c translate
	./translate $(SRCDIR)/md5.c >md5_.c

$(OBJDIR)/md5.o:	md5_.c md5.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/md5.o -c md5_.c

md5.h:	headers
merge_.c:	$(SRCDIR)/merge.c translate
	./translate $(SRCDIR)/merge.c >merge_.c

$(OBJDIR)/merge.o:	merge_.c merge.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/merge.o -c merge_.c

merge.h:	headers
merge3_.c:	$(SRCDIR)/merge3.c translate
	./translate $(SRCDIR)/merge3.c >merge3_.c

$(OBJDIR)/merge3.o:	merge3_.c merge3.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/merge3.o -c merge3_.c

merge3.h:	headers
name_.c:	$(SRCDIR)/name.c translate
	./translate $(SRCDIR)/name.c >name_.c

$(OBJDIR)/name.o:	name_.c name.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/name.o -c name_.c

name.h:	headers
pivot_.c:	$(SRCDIR)/pivot.c translate
	./translate $(SRCDIR)/pivot.c >pivot_.c

$(OBJDIR)/pivot.o:	pivot_.c pivot.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/pivot.o -c pivot_.c

pivot.h:	headers
pqueue_.c:	$(SRCDIR)/pqueue.c translate
	./translate $(SRCDIR)/pqueue.c >pqueue_.c

$(OBJDIR)/pqueue.o:	pqueue_.c pqueue.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/pqueue.o -c pqueue_.c

pqueue.h:	headers
printf_.c:	$(SRCDIR)/printf.c translate
	./translate $(SRCDIR)/printf.c >printf_.c

$(OBJDIR)/printf.o:	printf_.c printf.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/printf.o -c printf_.c

printf.h:	headers
rebuild_.c:	$(SRCDIR)/rebuild.c translate
	./translate $(SRCDIR)/rebuild.c >rebuild_.c

$(OBJDIR)/rebuild.o:	rebuild_.c rebuild.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/rebuild.o -c rebuild_.c

rebuild.h:	headers
report_.c:	$(SRCDIR)/report.c translate
	./translate $(SRCDIR)/report.c >report_.c

$(OBJDIR)/report.o:	report_.c report.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/report.o -c report_.c

report.h:	headers
rss_.c:	$(SRCDIR)/rss.c translate
	./translate $(SRCDIR)/rss.c >rss_.c

$(OBJDIR)/rss.o:	rss_.c rss.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/rss.o -c rss_.c

rss.h:	headers
rstats_.c:	$(SRCDIR)/rstats.c translate
	./translate $(SRCDIR)/rstats.c >rstats_.c

$(OBJDIR)/rstats.o:	rstats_.c rstats.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/rstats.o -c rstats_.c

rstats.h:	headers
schema_.c:	$(SRCDIR)/schema.c translate
	./translate $(SRCDIR)/schema.c >schema_.c

$(OBJDIR)/schema.o:	schema_.c schema.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/schema.o -c schema_.c

schema.h:	headers
search_.c:	$(SRCDIR)/search.c translate
	./translate $(SRCDIR)/search.c >search_.c

$(OBJDIR)/search.o:	search_.c search.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/search.o -c search_.c

search.h:	headers
setup_.c:	$(SRCDIR)/setup.c translate
	./translate $(SRCDIR)/setup.c >setup_.c

$(OBJDIR)/setup.o:	setup_.c setup.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/setup.o -c setup_.c

setup.h:	headers
sha1_.c:	$(SRCDIR)/sha1.c translate
	./translate $(SRCDIR)/sha1.c >sha1_.c

$(OBJDIR)/sha1.o:	sha1_.c sha1.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/sha1.o -c sha1_.c

sha1.h:	headers
shun_.c:	$(SRCDIR)/shun.c translate
	./translate $(SRCDIR)/shun.c >shun_.c

$(OBJDIR)/shun.o:	shun_.c shun.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/shun.o -c shun_.c

shun.h:	headers
skins_.c:	$(SRCDIR)/skins.c translate
	./translate $(SRCDIR)/skins.c >skins_.c

$(OBJDIR)/skins.o:	skins_.c skins.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/skins.o -c skins_.c

skins.h:	headers
stat_.c:	$(SRCDIR)/stat.c translate
	./translate $(SRCDIR)/stat.c >stat_.c

$(OBJDIR)/stat.o:	stat_.c stat.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/stat.o -c stat_.c

stat.h:	headers
style_.c:	$(SRCDIR)/style.c translate
	./translate $(SRCDIR)/style.c >style_.c

$(OBJDIR)/style.o:	style_.c style.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/style.o -c style_.c

style.h:	headers
sync_.c:	$(SRCDIR)/sync.c translate
	./translate $(SRCDIR)/sync.c >sync_.c

$(OBJDIR)/sync.o:	sync_.c sync.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/sync.o -c sync_.c

sync.h:	headers
tag_.c:	$(SRCDIR)/tag.c translate
	./translate $(SRCDIR)/tag.c >tag_.c

$(OBJDIR)/tag.o:	tag_.c tag.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/tag.o -c tag_.c

tag.h:	headers
th_main_.c:	$(SRCDIR)/th_main.c translate
	./translate $(SRCDIR)/th_main.c >th_main_.c

$(OBJDIR)/th_main.o:	th_main_.c th_main.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/th_main.o -c th_main_.c

th_main.h:	headers
timeline_.c:	$(SRCDIR)/timeline.c translate
	./translate $(SRCDIR)/timeline.c >timeline_.c

$(OBJDIR)/timeline.o:	timeline_.c timeline.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/timeline.o -c timeline_.c

timeline.h:	headers
tkt_.c:	$(SRCDIR)/tkt.c translate
	./translate $(SRCDIR)/tkt.c >tkt_.c

$(OBJDIR)/tkt.o:	tkt_.c tkt.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/tkt.o -c tkt_.c

tkt.h:	headers
tktsetup_.c:	$(SRCDIR)/tktsetup.c translate
	./translate $(SRCDIR)/tktsetup.c >tktsetup_.c

$(OBJDIR)/tktsetup.o:	tktsetup_.c tktsetup.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/tktsetup.o -c tktsetup_.c

tktsetup.h:	headers
undo_.c:	$(SRCDIR)/undo.c translate
	./translate $(SRCDIR)/undo.c >undo_.c

$(OBJDIR)/undo.o:	undo_.c undo.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/undo.o -c undo_.c

undo.h:	headers
update_.c:	$(SRCDIR)/update.c translate
	./translate $(SRCDIR)/update.c >update_.c

$(OBJDIR)/update.o:	update_.c update.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/update.o -c update_.c

update.h:	headers
url_.c:	$(SRCDIR)/url.c translate
	./translate $(SRCDIR)/url.c >url_.c

$(OBJDIR)/url.o:	url_.c url.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/url.o -c url_.c

url.h:	headers
user_.c:	$(SRCDIR)/user.c translate
	./translate $(SRCDIR)/user.c >user_.c

$(OBJDIR)/user.o:	user_.c user.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/user.o -c user_.c

user.h:	headers
verify_.c:	$(SRCDIR)/verify.c translate
	./translate $(SRCDIR)/verify.c >verify_.c

$(OBJDIR)/verify.o:	verify_.c verify.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/verify.o -c verify_.c

verify.h:	headers
vfile_.c:	$(SRCDIR)/vfile.c translate
	./translate $(SRCDIR)/vfile.c >vfile_.c

$(OBJDIR)/vfile.o:	vfile_.c vfile.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/vfile.o -c vfile_.c

vfile.h:	headers
wiki_.c:	$(SRCDIR)/wiki.c translate
	./translate $(SRCDIR)/wiki.c >wiki_.c

$(OBJDIR)/wiki.o:	wiki_.c wiki.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/wiki.o -c wiki_.c

wiki.h:	headers
wikiformat_.c:	$(SRCDIR)/wikiformat.c translate
	./translate $(SRCDIR)/wikiformat.c >wikiformat_.c

$(OBJDIR)/wikiformat.o:	wikiformat_.c wikiformat.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/wikiformat.o -c wikiformat_.c

wikiformat.h:	headers
winhttp_.c:	$(SRCDIR)/winhttp.c translate
	./translate $(SRCDIR)/winhttp.c >winhttp_.c

$(OBJDIR)/winhttp.o:	winhttp_.c winhttp.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/winhttp.o -c winhttp_.c

winhttp.h:	headers
xfer_.c:	$(SRCDIR)/xfer.c translate
	./translate $(SRCDIR)/xfer.c >xfer_.c

$(OBJDIR)/xfer.o:	xfer_.c xfer.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/xfer.o -c xfer_.c

xfer.h:	headers
zip_.c:	$(SRCDIR)/zip.c translate
	./translate $(SRCDIR)/zip.c >zip_.c

$(OBJDIR)/zip.o:	zip_.c zip.h  $(SRCDIR)/config.h
	$(XTCC) -o $(OBJDIR)/zip.o -c zip_.c

zip.h:	headers
$(OBJDIR)/sqlite3.o:	$(SRCDIR)/sqlite3.c
	$(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o

$(OBJDIR)/th.o:	$(SRCDIR)/th.c
	$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o

$(OBJDIR)/th_lang.o:	$(SRCDIR)/th_lang.c
	$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_lang.c -o $(OBJDIR)/th_lang.o

Changes to src/makemake.tcl.

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124



125
126
127
128
129
130
131
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
puts -nonewline "TRANS_SRC ="
foreach s [lsort $src] {
  puts -nonewline " \\\n  ${s}_.c"
}
puts "\n"
puts -nonewline "OBJ ="
foreach s [lsort $src] {
  puts -nonewline " \\\n  $s.o"
}
puts "\n"
puts "APPNAME = $name\$(E)"
puts "\n"

puts {
all:	$(APPNAME)

install:	$(APPNAME)
	mv $(APPNAME) $(INSTALLDIR)




translate:	$(SRCDIR)/translate.c
	$(BCC) -o translate $(SRCDIR)/translate.c

makeheaders:	$(SRCDIR)/makeheaders.c
	$(BCC) -o makeheaders $(SRCDIR)/makeheaders.c

mkindex:	$(SRCDIR)/mkindex.c
................................................................................
		$(SRCDIR)/../manifest.uuid >VERSION.h
	awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}' \
		$(SRCDIR)/../manifest.uuid >>VERSION.h
	awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n",\
		substr($$2,1,10),substr($$2,12)}' \
		$(SRCDIR)/../manifest >>VERSION.h

$(APPNAME):	headers $(OBJ) sqlite3.o th.o th_lang.o
	$(TCC) -o $(APPNAME) $(OBJ) sqlite3.o th.o th_lang.o $(LIB)

# This rule prevents make from using its default rules to try build
# an executable named "manifest" out of the file named "manifest.c"
#
$(SRCDIR)/../manifest:	
	# noop

clean:	
	rm -f *.o *_.c $(APPNAME) VERSION.h
	rm -f translate makeheaders mkindex page_index.h headers}

set hfiles {}
foreach s [lsort $src] {lappend hfiles $s.h}
puts "\trm -f $hfiles\n"

set mhargs {}
................................................................................
puts "headers: Makefile"
puts "Makefile:"
set extra_h(main) page_index.h

foreach s [lsort $src] {
  puts "${s}_.c:\t\$(SRCDIR)/$s.c translate"
  puts "\t./translate \$(SRCDIR)/$s.c >${s}_.c\n"
  puts "$s.o:\t${s}_.c $s.h $extra_h($s) \$(SRCDIR)/config.h"
  puts "\t\$(XTCC) -o $s.o -c ${s}_.c\n"
  puts "$s.h:\theaders"
#  puts "\t./makeheaders $mhargs\n\ttouch headers\n"
#  puts "\t./makeheaders ${s}_.c:${s}.h\n"
}


puts "sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1}
append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
#append opt " -DSQLITE_ENABLE_FTS3=1"
append opt " -Dlocaltime=fossil_localtime"
puts "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o sqlite3.o\n"

puts "th.o:\t\$(SRCDIR)/th.c"
puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o th.o\n"

puts "th_lang.o:\t\$(SRCDIR)/th_lang.c"
puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o th_lang.o\n"







|






|




>
>
>







 







|
|








|







 







|
|






|




|

|
|

|
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
...
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
puts -nonewline "TRANS_SRC ="
foreach s [lsort $src] {
  puts -nonewline " \\\n  ${s}_.c"
}
puts "\n"
puts -nonewline "OBJ ="
foreach s [lsort $src] {
  puts -nonewline " \\\n \$(OBJDIR)/$s.o"
}
puts "\n"
puts "APPNAME = $name\$(E)"
puts "\n"

puts {
all:	$(OBJDIR) $(APPNAME)

install:	$(APPNAME)
	mv $(APPNAME) $(INSTALLDIR)

$(OBJDIR):
	-mkdir $(OBJDIR)

translate:	$(SRCDIR)/translate.c
	$(BCC) -o translate $(SRCDIR)/translate.c

makeheaders:	$(SRCDIR)/makeheaders.c
	$(BCC) -o makeheaders $(SRCDIR)/makeheaders.c

mkindex:	$(SRCDIR)/mkindex.c
................................................................................
		$(SRCDIR)/../manifest.uuid >VERSION.h
	awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}' \
		$(SRCDIR)/../manifest.uuid >>VERSION.h
	awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n",\
		substr($$2,1,10),substr($$2,12)}' \
		$(SRCDIR)/../manifest >>VERSION.h

$(APPNAME):	headers $(OBJ) $(OBJDIR)/sqlite3.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o
	$(TCC) -o $(APPNAME) $(OBJ) $(OBJDIR)/sqlite3.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(LIB)

# This rule prevents make from using its default rules to try build
# an executable named "manifest" out of the file named "manifest.c"
#
$(SRCDIR)/../manifest:	
	# noop

clean:	
	rm -f $(OBJDIR)/*.o *_.c $(APPNAME) VERSION.h
	rm -f translate makeheaders mkindex page_index.h headers}

set hfiles {}
foreach s [lsort $src] {lappend hfiles $s.h}
puts "\trm -f $hfiles\n"

set mhargs {}
................................................................................
puts "headers: Makefile"
puts "Makefile:"
set extra_h(main) page_index.h

foreach s [lsort $src] {
  puts "${s}_.c:\t\$(SRCDIR)/$s.c translate"
  puts "\t./translate \$(SRCDIR)/$s.c >${s}_.c\n"
  puts "\$(OBJDIR)/$s.o:\t${s}_.c $s.h $extra_h($s) \$(SRCDIR)/config.h"
  puts "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c ${s}_.c\n"
  puts "$s.h:\theaders"
#  puts "\t./makeheaders $mhargs\n\ttouch headers\n"
#  puts "\t./makeheaders ${s}_.c:${s}.h\n"
}


puts "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c"
set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1}
append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4"
#append opt " -DSQLITE_ENABLE_FTS3=1"
append opt " -Dlocaltime=fossil_localtime"
puts "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n"

puts "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c"
puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n"

puts "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c"
puts "\t\$(XTCC) -I\$(SRCDIR) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n"