Artifact eb02515e497346d9361a39de7918c350aef803cb:
File
src/makemake.tcl
part of check-in
[55342eb9fb]
- The bug report generator compiles but still does not work right.
by
drh on
2008-05-17 14:49:49.
0000: 23 21 2f 75 73 72 2f 62 69 6e 2f 74 63 6c 73 68 #!/usr/bin/tclsh
0010: 0a 23 0a 23 20 52 75 6e 20 74 68 69 73 20 54 43 .#.# Run this TC
0020: 4c 20 73 63 72 69 70 74 20 74 6f 20 67 65 6e 65 L script to gene
0030: 72 61 74 65 20 74 68 65 20 22 6d 61 69 6e 2e 6d rate the "main.m
0040: 6b 22 20 6d 61 6b 65 66 69 6c 65 2e 0a 23 0a 0a k" makefile..#..
0050: 23 20 42 61 73 65 6e 61 6d 65 73 20 6f 66 20 61 # Basenames of a
0060: 6c 6c 20 73 6f 75 72 63 65 20 66 69 6c 65 73 20 ll source files
0070: 74 68 61 74 20 67 65 74 20 70 72 65 70 72 6f 63 that get preproc
0080: 65 73 73 65 64 20 75 73 69 6e 67 0a 23 20 22 74 essed using.# "t
0090: 72 61 6e 73 6c 61 74 65 22 20 61 6e 64 20 22 6d ranslate" and "m
00a0: 61 6b 65 68 65 61 64 65 72 73 22 0a 23 0a 73 65 akeheaders".#.se
00b0: 74 20 73 72 63 20 7b 0a 20 20 61 64 64 0a 20 20 t src {. add.
00c0: 61 64 6d 69 6e 0a 20 20 62 61 67 0a 20 20 62 6c admin. bag. bl
00d0: 6f 62 0a 20 20 62 72 61 6e 63 68 0a 20 20 62 72 ob. branch. br
00e0: 6f 77 73 65 0a 20 20 63 67 69 0a 20 20 63 68 65 owse. cgi. che
00f0: 63 6b 69 6e 0a 20 20 63 68 65 63 6b 6f 75 74 0a ckin. checkout.
0100: 20 20 63 6c 65 61 72 73 69 67 6e 0a 20 20 63 6c clearsign. cl
0110: 6f 6e 65 0a 20 20 63 6f 6d 66 6f 72 6d 61 74 0a one. comformat.
0120: 20 20 63 6f 6e 73 74 72 75 63 74 0a 20 20 63 6f construct. co
0130: 6e 74 65 6e 74 0a 20 20 64 62 0a 20 20 64 65 6c ntent. db. del
0140: 74 61 0a 20 20 64 65 6c 74 61 63 6d 64 0a 20 20 ta. deltacmd.
0150: 64 65 73 63 65 6e 64 61 6e 74 73 0a 20 20 64 69 descendants. di
0160: 66 66 0a 20 20 64 69 66 66 63 6d 64 0a 20 20 64 ff. diffcmd. d
0170: 6f 63 0a 20 20 65 6e 63 6f 64 65 0a 20 20 66 69 oc. encode. fi
0180: 6c 65 0a 20 20 68 74 74 70 0a 20 20 69 6e 66 6f le. http. info
0190: 0a 20 20 6c 6f 67 69 6e 0a 20 20 6d 61 69 6e 0a . login. main.
01a0: 20 20 6d 61 6e 69 66 65 73 74 0a 20 20 6d 64 35 manifest. md5
01b0: 0a 20 20 6d 65 72 67 65 0a 20 20 6d 65 72 67 65 . merge. merge
01c0: 33 0a 20 20 6d 79 5f 70 61 67 65 0a 20 20 6e 61 3. my_page. na
01d0: 6d 65 0a 20 20 70 69 76 6f 74 0a 20 20 70 71 75 me. pivot. pqu
01e0: 65 75 65 0a 20 20 70 72 69 6e 74 66 0a 20 20 72 eue. printf. r
01f0: 65 62 75 69 6c 64 0a 20 20 72 65 70 6f 72 74 0a ebuild. report.
0200: 20 20 72 73 73 0a 20 20 73 63 68 65 6d 61 0a 20 rss. schema.
0210: 20 73 65 74 75 70 0a 20 20 73 68 61 31 0a 20 20 setup. sha1.
0220: 73 74 61 74 0a 20 20 73 74 79 6c 65 0a 20 20 73 stat. style. s
0230: 79 6e 63 0a 20 20 74 61 67 0a 20 20 74 61 67 76 ync. tag. tagv
0240: 69 65 77 0a 20 20 74 68 5f 6d 61 69 6e 0a 20 20 iew. th_main.
0250: 74 69 6d 65 6c 69 6e 65 0a 20 20 74 6b 74 0a 20 timeline. tkt.
0260: 20 74 6b 74 63 6f 6e 66 69 67 0a 20 20 74 6b 74 tktconfig. tkt
0270: 73 65 74 75 70 0a 20 20 75 6e 64 6f 0a 20 20 75 setup. undo. u
0280: 70 64 61 74 65 0a 20 20 75 72 6c 0a 20 20 75 73 pdate. url. us
0290: 65 72 0a 20 20 76 65 72 69 66 79 0a 20 20 76 66 er. verify. vf
02a0: 69 6c 65 0a 20 20 77 69 6b 69 0a 20 20 77 69 6b ile. wiki. wik
02b0: 69 66 6f 72 6d 61 74 0a 20 20 78 66 65 72 0a 20 iformat. xfer.
02c0: 20 7a 69 70 0a 7d 0a 0a 23 20 4e 61 6d 65 20 6f zip.}..# Name o
02d0: 66 20 74 68 65 20 66 69 6e 61 6c 20 61 70 70 6c f the final appl
02e0: 69 63 61 74 69 6f 6e 0a 23 0a 73 65 74 20 6e 61 ication.#.set na
02f0: 6d 65 20 66 6f 73 73 69 6c 0a 0a 70 75 74 73 20 me fossil..puts
0300: 7b 23 20 44 4f 20 4e 4f 54 20 45 44 49 54 0a 23 {# DO NOT EDIT.#
0310: 0a 23 20 54 68 69 73 20 66 69 6c 65 20 69 73 20 .# This file is
0320: 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 67 65 automatically ge
0330: 6e 65 72 61 74 65 64 2e 20 20 49 6e 73 74 65 61 nerated. Instea
0340: 64 20 6f 66 20 65 64 69 74 69 6e 67 20 74 68 69 d of editing thi
0350: 73 0a 23 20 66 69 6c 65 2c 20 65 64 69 74 20 22 s.# file, edit "
0360: 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 22 20 74 68 makemake.tcl" th
0370: 65 6e 20 72 75 6e 20 22 74 63 6c 73 68 20 6d 61 en run "tclsh ma
0380: 6b 65 6d 61 6b 65 2e 74 63 6c 20 3e 6d 61 69 6e kemake.tcl >main
0390: 2e 6d 6b 22 0a 23 20 74 6f 20 72 65 67 65 6e 65 .mk".# to regene
03a0: 72 61 74 65 20 74 68 69 73 20 66 69 6c 65 2e 0a rate this file..
03b0: 23 0a 23 20 54 68 69 73 20 66 69 6c 65 20 69 73 #.# This file is
03c0: 20 69 6e 63 6c 75 64 65 64 20 62 79 20 6c 69 6e included by lin
03d0: 75 78 2d 67 63 63 2e 6d 6b 20 6f 72 20 6c 69 6e ux-gcc.mk or lin
03e0: 75 78 2d 6d 69 6e 67 77 2e 6d 6b 20 6f 72 20 70 ux-mingw.mk or p
03f0: 6f 73 73 69 62 6c 65 0a 23 20 73 6f 6d 65 20 6f ossible.# some o
0400: 74 68 65 72 20 6d 61 6b 65 66 69 6c 65 73 2e 20 ther makefiles.
0410: 20 54 68 69 73 20 66 69 6c 65 20 63 6f 6e 74 61 This file conta
0420: 69 6e 73 20 74 68 65 20 72 75 6c 65 73 20 74 68 ins the rules th
0430: 61 74 20 61 72 65 20 63 6f 6d 6d 6f 6e 0a 23 20 at are common.#
0440: 74 6f 20 62 75 69 6c 64 69 6e 67 20 72 65 67 61 to building rega
0450: 72 64 6c 65 73 73 20 6f 66 20 74 68 65 20 74 61 rdless of the ta
0460: 72 67 65 74 2e 0a 23 0a 0a 58 54 43 43 20 3d 20 rget..#..XTCC =
0470: 24 28 54 43 43 29 20 24 28 43 46 4c 41 47 53 29 $(TCC) $(CFLAGS)
0480: 20 2d 49 2e 20 2d 49 24 28 53 52 43 44 49 52 29 -I. -I$(SRCDIR)
0490: 0a 0a 7d 0a 70 75 74 73 20 2d 6e 6f 6e 65 77 6c ..}.puts -nonewl
04a0: 69 6e 65 20 22 53 52 43 20 3d 22 0a 66 6f 72 65 ine "SRC =".fore
04b0: 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 ach s [lsort $sr
04c0: 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f 6e c] {. puts -non
04d0: 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 5c ewline " \\\n \
04e0: 24 28 53 52 43 44 49 52 29 2f 24 73 2e 63 22 0a $(SRCDIR)/$s.c".
04f0: 7d 0a 70 75 74 73 20 22 5c 6e 22 0a 70 75 74 73 }.puts "\n".puts
0500: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 54 52 41 -nonewline "TRA
0510: 4e 53 5f 53 52 43 20 3d 22 0a 66 6f 72 65 61 63 NS_SRC =".foreac
0520: 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d h s [lsort $src]
0530: 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f 6e 65 77 {. puts -nonew
0540: 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 24 7b 73 line " \\\n ${s
0550: 7d 5f 2e 63 22 0a 7d 0a 70 75 74 73 20 22 5c 6e }_.c".}.puts "\n
0560: 22 0a 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e ".puts -nonewlin
0570: 65 20 22 4f 42 4a 20 3d 22 0a 66 6f 72 65 61 63 e "OBJ =".foreac
0580: 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d h s [lsort $src]
0590: 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f 6e 65 77 {. puts -nonew
05a0: 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 24 73 2e line " \\\n $s.
05b0: 6f 22 0a 7d 0a 70 75 74 73 20 22 5c 6e 22 0a 70 o".}.puts "\n".p
05c0: 75 74 73 20 22 41 50 50 4e 41 4d 45 20 3d 20 24 uts "APPNAME = $
05d0: 6e 61 6d 65 5c 24 28 45 29 22 0a 70 75 74 73 20 name\$(E)".puts
05e0: 22 5c 6e 22 0a 0a 70 75 74 73 20 7b 0a 61 6c 6c "\n"..puts {.all
05f0: 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a 0a 69 6e :.$(APPNAME)..in
0600: 73 74 61 6c 6c 3a 09 24 28 41 50 50 4e 41 4d 45 stall:.$(APPNAME
0610: 29 0a 09 6d 76 20 24 28 41 50 50 4e 41 4d 45 29 )..mv $(APPNAME)
0620: 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 29 0a 0a $(INSTALLDIR)..
0630: 74 72 61 6e 73 6c 61 74 65 3a 09 24 28 53 52 43 translate:.$(SRC
0640: 44 49 52 29 2f 74 72 61 6e 73 6c 61 74 65 2e 63 DIR)/translate.c
0650: 0a 09 24 28 42 43 43 29 20 2d 6f 20 74 72 61 6e ..$(BCC) -o tran
0660: 73 6c 61 74 65 20 24 28 53 52 43 44 49 52 29 2f slate $(SRCDIR)/
0670: 74 72 61 6e 73 6c 61 74 65 2e 63 0a 0a 6d 61 6b translate.c..mak
0680: 65 68 65 61 64 65 72 73 3a 09 24 28 53 52 43 44 eheaders:.$(SRCD
0690: 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e IR)/makeheaders.
06a0: 63 0a 09 24 28 42 43 43 29 20 2d 6f 20 6d 61 6b c..$(BCC) -o mak
06b0: 65 68 65 61 64 65 72 73 20 24 28 53 52 43 44 49 eheaders $(SRCDI
06c0: 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e 63 R)/makeheaders.c
06d0: 0a 0a 6d 6b 69 6e 64 65 78 3a 09 24 28 53 52 43 ..mkindex:.$(SRC
06e0: 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e 63 0a 09 DIR)/mkindex.c..
06f0: 24 28 42 43 43 29 20 2d 6f 20 6d 6b 69 6e 64 65 $(BCC) -o mkinde
0700: 78 20 24 28 53 52 43 44 49 52 29 2f 6d 6b 69 6e x $(SRCDIR)/mkin
0710: 64 65 78 2e 63 0a 0a 23 20 57 41 52 4e 49 4e 47 dex.c..# WARNING
0720: 2e 20 44 41 4e 47 45 52 2e 20 52 75 6e 6e 69 6e . DANGER. Runnin
0730: 67 20 74 68 65 20 74 65 73 74 73 75 69 74 65 20 g the testsuite
0740: 6d 6f 64 69 66 69 65 73 20 74 68 65 20 72 65 70 modifies the rep
0750: 6f 73 69 74 6f 72 79 20 74 68 65 0a 23 20 62 75 ository the.# bu
0760: 69 6c 64 20 69 73 20 64 6f 6e 65 20 66 72 6f 6d ild is done from
0770: 2c 20 69 2e 65 2e 20 74 68 65 20 63 68 65 63 6b , i.e. the check
0780: 6f 75 74 20 62 65 6c 6f 6e 67 73 20 74 6f 2e 20 out belongs to.
0790: 44 6f 20 6e 6f 74 20 73 79 6e 63 2f 70 75 73 68 Do not sync/push
07a0: 0a 23 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 .# the repositor
07b0: 79 20 61 66 74 65 72 20 72 75 6e 6e 69 6e 67 20 y after running
07c0: 74 68 65 20 74 65 73 74 73 2e 0a 74 65 73 74 3a the tests..test:
07d0: 09 24 28 41 50 50 4e 41 4d 45 29 0a 09 24 28 54 .$(APPNAME)..$(T
07e0: 43 4c 53 48 29 20 74 65 73 74 2f 74 65 73 74 65 CLSH) test/teste
07f0: 72 2e 74 63 6c 20 24 28 41 50 50 4e 41 4d 45 29 r.tcl $(APPNAME)
0800: 0a 0a 56 45 52 53 49 4f 4e 2e 68 3a 09 24 28 53 ..VERSION.h:.$(S
0810: 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 RCDIR)/../manife
0820: 73 74 2e 75 75 69 64 20 24 28 53 52 43 44 49 52 st.uuid $(SRCDIR
0830: 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 0a 09 61 )/../manifest..a
0840: 77 6b 20 27 7b 20 70 72 69 6e 74 66 20 22 23 64 wk '{ printf "#d
0850: 65 66 69 6e 65 20 4d 41 4e 49 46 45 53 54 5f 55 efine MANIFEST_U
0860: 55 49 44 20 5c 22 25 73 5c 22 5c 6e 22 2c 20 24 UID \"%s\"\n", $
0870: 24 31 7d 27 20 5c 0a 09 09 24 28 53 52 43 44 49 $1}' \...$(SRCDI
0880: 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 2e 75 R)/../manifest.u
0890: 75 69 64 20 3e 56 45 52 53 49 4f 4e 2e 68 0a 09 uid >VERSION.h..
08a0: 61 77 6b 20 27 7b 20 70 72 69 6e 74 66 20 22 23 awk '{ printf "#
08b0: 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53 54 5f define MANIFEST_
08c0: 56 45 52 53 49 4f 4e 20 5c 22 5b 25 2e 31 30 73 VERSION \"[%.10s
08d0: 5d 5c 22 5c 6e 22 2c 20 24 24 31 7d 27 20 5c 0a ]\"\n", $$1}' \.
08e0: 09 09 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d ..$(SRCDIR)/../m
08f0: 61 6e 69 66 65 73 74 2e 75 75 69 64 20 3e 3e 56 anifest.uuid >>V
0900: 45 52 53 49 4f 4e 2e 68 0a 09 61 77 6b 20 27 24 ERSION.h..awk '$
0910: 24 31 3d 3d 22 44 22 7b 70 72 69 6e 74 66 20 22 $1=="D"{printf "
0920: 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53 54 #define MANIFEST
0930: 5f 44 41 54 45 20 5c 22 25 73 20 25 73 5c 22 5c _DATE \"%s %s\"\
0940: 6e 22 2c 5c 0a 09 09 73 75 62 73 74 72 28 24 24 n",\...substr($$
0950: 32 2c 31 2c 31 30 29 2c 73 75 62 73 74 72 28 24 2,1,10),substr($
0960: 24 32 2c 31 32 29 7d 27 20 5c 0a 09 09 24 28 53 $2,12)}' \...$(S
0970: 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 RCDIR)/../manife
0980: 73 74 20 3e 3e 56 45 52 53 49 4f 4e 2e 68 0a 0a st >>VERSION.h..
0990: 24 28 41 50 50 4e 41 4d 45 29 3a 09 68 65 61 64 $(APPNAME):.head
09a0: 65 72 73 20 24 28 4f 42 4a 29 20 73 71 6c 69 74 ers $(OBJ) sqlit
09b0: 65 33 2e 6f 20 74 68 2e 6f 20 74 68 5f 6c 61 6e e3.o th.o th_lan
09c0: 67 2e 6f 0a 09 24 28 54 43 43 29 20 2d 6f 20 24 g.o..$(TCC) -o $
09d0: 28 41 50 50 4e 41 4d 45 29 20 24 28 4f 42 4a 29 (APPNAME) $(OBJ)
09e0: 20 73 71 6c 69 74 65 33 2e 6f 20 74 68 2e 6f 20 sqlite3.o th.o
09f0: 74 68 5f 6c 61 6e 67 2e 6f 20 24 28 4c 49 42 29 th_lang.o $(LIB)
0a00: 0a 0a 23 20 54 68 69 73 20 72 75 6c 65 20 70 72 ..# This rule pr
0a10: 65 76 65 6e 74 73 20 6d 61 6b 65 20 66 72 6f 6d events make from
0a20: 20 75 73 69 6e 67 20 69 74 73 20 64 65 66 61 75 using its defau
0a30: 6c 74 20 72 75 6c 65 73 20 74 6f 20 74 72 79 20 lt rules to try
0a40: 62 75 69 6c 64 0a 23 20 61 6e 20 65 78 65 63 75 build.# an execu
0a50: 74 61 62 6c 65 20 6e 61 6d 65 64 20 22 6d 61 6e table named "man
0a60: 69 66 65 73 74 22 20 6f 75 74 20 6f 66 20 74 68 ifest" out of th
0a70: 65 20 66 69 6c 65 20 6e 61 6d 65 64 20 22 6d 61 e file named "ma
0a80: 6e 69 66 65 73 74 2e 63 22 0a 23 0a 24 28 53 52 nifest.c".#.$(SR
0a90: 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 CDIR)/../manifes
0aa0: 74 3a 09 0a 09 23 20 6e 6f 6f 70 0a 0a 63 6c 65 t:...# noop..cle
0ab0: 61 6e 3a 09 0a 09 72 6d 20 2d 66 20 2a 2e 6f 20 an:...rm -f *.o
0ac0: 2a 5f 2e 63 20 24 28 41 50 50 4e 41 4d 45 29 20 *_.c $(APPNAME)
0ad0: 56 45 52 53 49 4f 4e 2e 68 0a 09 72 6d 20 2d 66 VERSION.h..rm -f
0ae0: 20 74 72 61 6e 73 6c 61 74 65 20 6d 61 6b 65 68 translate makeh
0af0: 65 61 64 65 72 73 20 6d 6b 69 6e 64 65 78 20 70 eaders mkindex p
0b00: 61 67 65 5f 69 6e 64 65 78 2e 68 20 68 65 61 64 age_index.h head
0b10: 65 72 73 7d 0a 0a 73 65 74 20 68 66 69 6c 65 73 ers}..set hfiles
0b20: 20 7b 7d 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c {}.foreach s [l
0b30: 73 6f 72 74 20 24 73 72 63 5d 20 7b 6c 61 70 70 sort $src] {lapp
0b40: 65 6e 64 20 68 66 69 6c 65 73 20 24 73 2e 68 7d end hfiles $s.h}
0b50: 0a 70 75 74 73 20 22 5c 74 72 6d 20 2d 66 20 24 .puts "\trm -f $
0b60: 68 66 69 6c 65 73 5c 6e 22 0a 0a 73 65 74 20 6d hfiles\n"..set m
0b70: 68 61 72 67 73 20 7b 7d 0a 66 6f 72 65 61 63 68 hargs {}.foreach
0b80: 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 s [lsort $src]
0b90: 7b 0a 20 20 61 70 70 65 6e 64 20 6d 68 61 72 67 {. append mharg
0ba0: 73 20 22 20 24 7b 73 7d 5f 2e 63 3a 24 73 2e 68 s " ${s}_.c:$s.h
0bb0: 22 0a 20 20 73 65 74 20 65 78 74 72 61 5f 68 28 ". set extra_h(
0bc0: 24 73 29 20 7b 7d 0a 7d 0a 61 70 70 65 6e 64 20 $s) {}.}.append
0bd0: 6d 68 61 72 67 73 20 22 20 5c 24 28 53 52 43 44 mhargs " \$(SRCD
0be0: 49 52 29 2f 73 71 6c 69 74 65 33 2e 68 22 0a 61 IR)/sqlite3.h".a
0bf0: 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22 20 5c ppend mhargs " \
0c00: 24 28 53 52 43 44 49 52 29 2f 74 68 2e 68 22 0a $(SRCDIR)/th.h".
0c10: 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22 20 append mhargs "
0c20: 2e 2f 56 45 52 53 49 4f 4e 2e 68 22 0a 70 75 74 ./VERSION.h".put
0c30: 73 20 22 68 65 61 64 65 72 73 3a 5c 74 6d 61 6b s "headers:\tmak
0c40: 65 68 65 61 64 65 72 73 20 6d 6b 69 6e 64 65 78 eheaders mkindex
0c50: 20 5c 24 28 54 52 41 4e 53 5f 53 52 43 29 20 2e \$(TRANS_SRC) .
0c60: 2f 56 45 52 53 49 4f 4e 2e 68 22 0a 70 75 74 73 /VERSION.h".puts
0c70: 20 22 5c 74 2e 2f 6d 61 6b 65 68 65 61 64 65 72 "\t./makeheader
0c80: 73 20 24 6d 68 61 72 67 73 22 0a 70 75 74 73 20 s $mhargs".puts
0c90: 22 5c 74 2e 2f 6d 6b 69 6e 64 65 78 20 5c 24 28 "\t./mkindex \$(
0ca0: 54 52 41 4e 53 5f 53 52 43 29 20 3e 70 61 67 65 TRANS_SRC) >page
0cb0: 5f 69 6e 64 65 78 2e 68 22 0a 70 75 74 73 20 22 _index.h".puts "
0cc0: 5c 74 74 6f 75 63 68 20 68 65 61 64 65 72 73 5c \ttouch headers\
0cd0: 6e 22 0a 73 65 74 20 65 78 74 72 61 5f 68 28 6d n".set extra_h(m
0ce0: 61 69 6e 29 20 70 61 67 65 5f 69 6e 64 65 78 2e ain) page_index.
0cf0: 68 0a 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 h..foreach s [ls
0d00: 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 ort $src] {. pu
0d10: 74 73 20 22 24 7b 73 7d 5f 2e 63 3a 5c 74 5c 24 ts "${s}_.c:\t\$
0d20: 28 53 52 43 44 49 52 29 2f 24 73 2e 63 20 5c 24 (SRCDIR)/$s.c \$
0d30: 28 53 52 43 44 49 52 29 2f 56 45 52 53 49 4f 4e (SRCDIR)/VERSION
0d40: 20 74 72 61 6e 73 6c 61 74 65 22 0a 20 20 70 75 translate". pu
0d50: 74 73 20 22 5c 74 2e 2f 74 72 61 6e 73 6c 61 74 ts "\t./translat
0d60: 65 20 5c 24 28 53 52 43 44 49 52 29 2f 24 73 2e e \$(SRCDIR)/$s.
0d70: 63 20 7c 20 73 65 64 20 2d 66 20 5c 24 28 53 52 c | sed -f \$(SR
0d80: 43 44 49 52 29 2f 56 45 52 53 49 4f 4e 20 3e 24 CDIR)/VERSION >$
0d90: 7b 73 7d 5f 2e 63 5c 6e 22 0a 20 20 70 75 74 73 {s}_.c\n". puts
0da0: 20 22 24 73 2e 6f 3a 5c 74 24 7b 73 7d 5f 2e 63 "$s.o:\t${s}_.c
0db0: 20 24 73 2e 68 20 24 65 78 74 72 61 5f 68 28 24 $s.h $extra_h($
0dc0: 73 29 20 5c 24 28 53 52 43 44 49 52 29 2f 63 6f s) \$(SRCDIR)/co
0dd0: 6e 66 69 67 2e 68 22 0a 20 20 70 75 74 73 20 22 nfig.h". puts "
0de0: 5c 74 5c 24 28 58 54 43 43 29 20 2d 6f 20 24 73 \t\$(XTCC) -o $s
0df0: 2e 6f 20 2d 63 20 24 7b 73 7d 5f 2e 63 5c 6e 22 .o -c ${s}_.c\n"
0e00: 0a 20 20 70 75 74 73 20 22 24 73 2e 68 3a 5c 74 . puts "$s.h:\t
0e10: 6d 61 6b 65 68 65 61 64 65 72 73 22 0a 20 20 70 makeheaders". p
0e20: 75 74 73 20 22 5c 74 2e 2f 6d 61 6b 65 68 65 61 uts "\t./makehea
0e30: 64 65 72 73 20 24 6d 68 61 72 67 73 5c 6e 5c 74 ders $mhargs\n\t
0e40: 74 6f 75 63 68 20 68 65 61 64 65 72 73 5c 6e 22 touch headers\n"
0e50: 0a 7d 0a 0a 0a 70 75 74 73 20 22 73 71 6c 69 74 .}...puts "sqlit
0e60: 65 33 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49 52 e3.o:\t\$(SRCDIR
0e70: 29 2f 73 71 6c 69 74 65 33 2e 63 22 0a 73 65 74 )/sqlite3.c".set
0e80: 20 6f 70 74 20 7b 2d 44 53 51 4c 49 54 45 5f 4f opt {-DSQLITE_O
0e90: 4d 49 54 5f 4c 4f 41 44 5f 45 58 54 45 4e 53 49 MIT_LOAD_EXTENSI
0ea0: 4f 4e 3d 31 20 2d 44 53 51 4c 49 54 45 5f 50 52 ON=1 -DSQLITE_PR
0eb0: 49 56 41 54 45 3d 7d 0a 61 70 70 65 6e 64 20 6f IVATE=}.append o
0ec0: 70 74 20 22 20 2d 44 53 51 4c 49 54 45 5f 54 48 pt " -DSQLITE_TH
0ed0: 52 45 41 44 53 41 46 45 3d 30 20 2d 44 53 51 4c READSAFE=0 -DSQL
0ee0: 49 54 45 5f 44 45 46 41 55 4c 54 5f 46 49 4c 45 ITE_DEFAULT_FILE
0ef0: 5f 46 4f 52 4d 41 54 3d 34 22 0a 61 70 70 65 6e _FORMAT=4".appen
0f00: 64 20 6f 70 74 20 22 20 2d 44 53 51 4c 49 54 45 d opt " -DSQLITE
0f10: 5f 45 4e 41 42 4c 45 5f 46 54 53 33 3d 31 22 0a _ENABLE_FTS3=1".
0f20: 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 43 29 puts "\t\$(XTCC)
0f30: 20 24 6f 70 74 20 2d 63 20 5c 24 28 53 52 43 44 $opt -c \$(SRCD
0f40: 49 52 29 2f 73 71 6c 69 74 65 33 2e 63 20 2d 6f IR)/sqlite3.c -o
0f50: 20 73 71 6c 69 74 65 33 2e 6f 5c 6e 22 0a 0a 70 sqlite3.o\n"..p
0f60: 75 74 73 20 22 74 68 2e 6f 3a 5c 74 5c 24 28 53 uts "th.o:\t\$(S
0f70: 52 43 44 49 52 29 2f 74 68 2e 63 22 0a 70 75 74 RCDIR)/th.c".put
0f80: 73 20 22 5c 74 5c 24 28 58 54 43 43 29 20 2d 49 s "\t\$(XTCC) -I
0f90: 5c 24 28 53 52 43 44 49 52 29 20 2d 63 20 5c 24 \$(SRCDIR) -c \$
0fa0: 28 53 52 43 44 49 52 29 2f 74 68 2e 63 20 2d 6f (SRCDIR)/th.c -o
0fb0: 20 74 68 2e 6f 5c 6e 22 0a 0a 70 75 74 73 20 22 th.o\n"..puts "
0fc0: 74 68 5f 6c 61 6e 67 2e 6f 3a 5c 74 5c 24 28 53 th_lang.o:\t\$(S
0fd0: 52 43 44 49 52 29 2f 74 68 5f 6c 61 6e 67 2e 63 RCDIR)/th_lang.c
0fe0: 22 0a 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 ".puts "\t\$(XTC
0ff0: 43 29 20 2d 49 5c 24 28 53 52 43 44 49 52 29 20 C) -I\$(SRCDIR)
1000: 2d 63 20 5c 24 28 53 52 43 44 49 52 29 2f 74 68 -c \$(SRCDIR)/th
1010: 5f 6c 61 6e 67 2e 63 20 2d 6f 20 74 68 5f 6c 61 _lang.c -o th_la
1020: 6e 67 2e 6f 5c 6e 22 0a ng.o\n".