Hex Artifact Content
Not logged in

Artifact 251e142ac887233b1484ef56cdd1b0b25013bad7:

File src/makemake.tcl part of check-in [4ee9e31a2d] - Add the TH1 code to the source tree and makefile. But do not yet make any calls to TH1. by drh on 2008-02-13 15:04: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 65 6e 74 73 0a 20 20 64 69  descendents.  di
0160: 66 66 0a 20 20 64 69 66 66 63 6d 64 0a 20 20 65  ff.  diffcmd.  e
0170: 6e 63 6f 64 65 0a 20 20 66 69 6c 65 0a 20 20 68  ncode.  file.  h
0180: 74 74 70 0a 20 20 69 6e 66 6f 0a 20 20 6c 6f 67  ttp.  info.  log
0190: 69 6e 0a 20 20 6d 61 69 6e 0a 20 20 6d 61 6e 69  in.  main.  mani
01a0: 66 65 73 74 0a 20 20 6d 64 35 0a 20 20 6d 65 72  fest.  md5.  mer
01b0: 67 65 0a 20 20 6d 65 72 67 65 33 0a 20 20 6d 79  ge.  merge3.  my
01c0: 5f 70 61 67 65 0a 20 20 6e 61 6d 65 0a 20 20 70  _page.  name.  p
01d0: 69 76 6f 74 0a 20 20 70 71 75 65 75 65 0a 20 20  ivot.  pqueue.  
01e0: 70 72 69 6e 74 66 0a 20 20 72 65 62 75 69 6c 64  printf.  rebuild
01f0: 0a 20 20 72 73 73 0a 20 20 73 63 68 65 6d 61 0a  .  rss.  schema.
0200: 20 20 73 65 74 75 70 0a 20 20 73 68 61 31 0a 20    setup.  sha1. 
0210: 20 73 74 79 6c 65 0a 20 20 73 75 62 73 63 72 69   style.  subscri
0220: 70 74 0a 20 20 73 79 6e 63 0a 20 20 74 61 67 0a  pt.  sync.  tag.
0230: 20 20 74 61 67 76 69 65 77 0a 20 20 74 69 6d 65    tagview.  time
0240: 6c 69 6e 65 0a 20 20 74 6b 74 0a 20 20 74 6b 74  line.  tkt.  tkt
0250: 63 6f 6e 66 69 67 0a 20 20 74 6b 74 73 65 74 75  config.  tktsetu
0260: 70 0a 20 20 75 6e 64 6f 0a 20 20 75 70 64 61 74  p.  undo.  updat
0270: 65 0a 20 20 75 72 6c 0a 20 20 75 73 65 72 0a 20  e.  url.  user. 
0280: 20 76 65 72 69 66 79 0a 20 20 76 66 69 6c 65 0a   verify.  vfile.
0290: 20 20 77 69 6b 69 0a 20 20 77 69 6b 69 66 6f 72    wiki.  wikifor
02a0: 6d 61 74 0a 20 20 78 66 65 72 0a 20 20 7a 69 70  mat.  xfer.  zip
02b0: 0a 7d 0a 0a 23 20 4e 61 6d 65 20 6f 66 20 74 68  .}..# Name of th
02c0: 65 20 66 69 6e 61 6c 20 61 70 70 6c 69 63 61 74  e final applicat
02d0: 69 6f 6e 0a 23 0a 73 65 74 20 6e 61 6d 65 20 66  ion.#.set name f
02e0: 6f 73 73 69 6c 0a 0a 70 75 74 73 20 7b 23 20 44  ossil..puts {# D
02f0: 4f 20 4e 4f 54 20 45 44 49 54 0a 23 0a 23 20 54  O NOT EDIT.#.# T
0300: 68 69 73 20 66 69 6c 65 20 69 73 20 61 75 74 6f  his file is auto
0310: 6d 61 74 69 63 61 6c 6c 79 20 67 65 6e 65 72 61  matically genera
0320: 74 65 64 2e 20 20 49 6e 73 74 65 61 64 20 6f 66  ted.  Instead of
0330: 20 65 64 69 74 69 6e 67 20 74 68 69 73 0a 23 20   editing this.# 
0340: 66 69 6c 65 2c 20 65 64 69 74 20 22 6d 61 6b 65  file, edit "make
0350: 6d 61 6b 65 2e 74 63 6c 22 20 74 68 65 6e 20 72  make.tcl" then r
0360: 75 6e 20 22 74 63 6c 73 68 20 6d 61 6b 65 6d 61  un "tclsh makema
0370: 6b 65 2e 74 63 6c 20 3e 6d 61 69 6e 2e 6d 6b 22  ke.tcl >main.mk"
0380: 0a 23 20 74 6f 20 72 65 67 65 6e 65 72 61 74 65  .# to regenerate
0390: 20 74 68 69 73 20 66 69 6c 65 2e 0a 23 0a 23 20   this file..#.# 
03a0: 54 68 69 73 20 66 69 6c 65 20 69 73 20 69 6e 63  This file is inc
03b0: 6c 75 64 65 64 20 62 79 20 6c 69 6e 75 78 2d 67  luded by linux-g
03c0: 63 63 2e 6d 6b 20 6f 72 20 6c 69 6e 75 78 2d 6d  cc.mk or linux-m
03d0: 69 6e 67 77 2e 6d 6b 20 6f 72 20 70 6f 73 73 69  ingw.mk or possi
03e0: 62 6c 65 0a 23 20 73 6f 6d 65 20 6f 74 68 65 72  ble.# some other
03f0: 20 6d 61 6b 65 66 69 6c 65 73 2e 20 20 54 68 69   makefiles.  Thi
0400: 73 20 66 69 6c 65 20 63 6f 6e 74 61 69 6e 73 20  s file contains 
0410: 74 68 65 20 72 75 6c 65 73 20 74 68 61 74 20 61  the rules that a
0420: 72 65 20 63 6f 6d 6d 6f 6e 0a 23 20 74 6f 20 62  re common.# to b
0430: 75 69 6c 64 69 6e 67 20 72 65 67 61 72 64 6c 65  uilding regardle
0440: 73 73 20 6f 66 20 74 68 65 20 74 61 72 67 65 74  ss of the target
0450: 2e 0a 23 0a 0a 58 54 43 43 20 3d 20 24 28 54 43  ..#..XTCC = $(TC
0460: 43 29 20 24 28 43 46 4c 41 47 53 29 20 2d 49 2e  C) $(CFLAGS) -I.
0470: 20 2d 49 24 28 53 52 43 44 49 52 29 0a 0a 7d 0a   -I$(SRCDIR)..}.
0480: 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20  puts -nonewline 
0490: 22 53 52 43 20 3d 22 0a 66 6f 72 65 61 63 68 20  "SRC =".foreach 
04a0: 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b  s [lsort $src] {
04b0: 0a 20 20 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69  .  puts -nonewli
04c0: 6e 65 20 22 20 5c 5c 5c 6e 20 20 5c 24 28 53 52  ne " \\\n  \$(SR
04d0: 43 44 49 52 29 2f 24 73 2e 63 22 0a 7d 0a 70 75  CDIR)/$s.c".}.pu
04e0: 74 73 20 22 5c 6e 22 0a 70 75 74 73 20 2d 6e 6f  ts "\n".puts -no
04f0: 6e 65 77 6c 69 6e 65 20 22 54 52 41 4e 53 5f 53  newline "TRANS_S
0500: 52 43 20 3d 22 0a 66 6f 72 65 61 63 68 20 73 20  RC =".foreach s 
0510: 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20  [lsort $src] {. 
0520: 20 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65   puts -nonewline
0530: 20 22 20 5c 5c 5c 6e 20 20 24 7b 73 7d 5f 2e 63   " \\\n  ${s}_.c
0540: 22 0a 7d 0a 70 75 74 73 20 22 5c 6e 22 0a 70 75  ".}.puts "\n".pu
0550: 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 4f  ts -nonewline "O
0560: 42 4a 20 3d 22 0a 66 6f 72 65 61 63 68 20 73 20  BJ =".foreach s 
0570: 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20  [lsort $src] {. 
0580: 20 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65   puts -nonewline
0590: 20 22 20 5c 5c 5c 6e 20 20 24 73 2e 6f 22 0a 7d   " \\\n  $s.o".}
05a0: 0a 70 75 74 73 20 22 5c 6e 22 0a 70 75 74 73 20  .puts "\n".puts 
05b0: 22 41 50 50 4e 41 4d 45 20 3d 20 24 6e 61 6d 65  "APPNAME = $name
05c0: 5c 24 28 45 29 22 0a 70 75 74 73 20 22 5c 6e 22  \$(E)".puts "\n"
05d0: 0a 0a 70 75 74 73 20 7b 0a 61 6c 6c 3a 09 24 28  ..puts {.all:.$(
05e0: 41 50 50 4e 41 4d 45 29 0a 0a 69 6e 73 74 61 6c  APPNAME)..instal
05f0: 6c 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a 09 6d  l:.$(APPNAME)..m
0600: 76 20 24 28 41 50 50 4e 41 4d 45 29 20 24 28 49  v $(APPNAME) $(I
0610: 4e 53 54 41 4c 4c 44 49 52 29 0a 0a 74 72 61 6e  NSTALLDIR)..tran
0620: 73 6c 61 74 65 3a 09 24 28 53 52 43 44 49 52 29  slate:.$(SRCDIR)
0630: 2f 74 72 61 6e 73 6c 61 74 65 2e 63 0a 09 24 28  /translate.c..$(
0640: 42 43 43 29 20 2d 6f 20 74 72 61 6e 73 6c 61 74  BCC) -o translat
0650: 65 20 24 28 53 52 43 44 49 52 29 2f 74 72 61 6e  e $(SRCDIR)/tran
0660: 73 6c 61 74 65 2e 63 0a 0a 6d 61 6b 65 68 65 61  slate.c..makehea
0670: 64 65 72 73 3a 09 24 28 53 52 43 44 49 52 29 2f  ders:.$(SRCDIR)/
0680: 6d 61 6b 65 68 65 61 64 65 72 73 2e 63 0a 09 24  makeheaders.c..$
0690: 28 42 43 43 29 20 2d 6f 20 6d 61 6b 65 68 65 61  (BCC) -o makehea
06a0: 64 65 72 73 20 24 28 53 52 43 44 49 52 29 2f 6d  ders $(SRCDIR)/m
06b0: 61 6b 65 68 65 61 64 65 72 73 2e 63 0a 0a 6d 6b  akeheaders.c..mk
06c0: 69 6e 64 65 78 3a 09 24 28 53 52 43 44 49 52 29  index:.$(SRCDIR)
06d0: 2f 6d 6b 69 6e 64 65 78 2e 63 0a 09 24 28 42 43  /mkindex.c..$(BC
06e0: 43 29 20 2d 6f 20 6d 6b 69 6e 64 65 78 20 24 28  C) -o mkindex $(
06f0: 53 52 43 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e  SRCDIR)/mkindex.
0700: 63 0a 0a 23 20 57 41 52 4e 49 4e 47 2e 20 44 41  c..# WARNING. DA
0710: 4e 47 45 52 2e 20 52 75 6e 6e 69 6e 67 20 74 68  NGER. Running th
0720: 65 20 74 65 73 74 73 75 69 74 65 20 6d 6f 64 69  e testsuite modi
0730: 66 69 65 73 20 74 68 65 20 72 65 70 6f 73 69 74  fies the reposit
0740: 6f 72 79 20 74 68 65 0a 23 20 62 75 69 6c 64 20  ory the.# build 
0750: 69 73 20 64 6f 6e 65 20 66 72 6f 6d 2c 20 69 2e  is done from, i.
0760: 65 2e 20 74 68 65 20 63 68 65 63 6b 6f 75 74 20  e. the checkout 
0770: 62 65 6c 6f 6e 67 73 20 74 6f 2e 20 44 6f 20 6e  belongs to. Do n
0780: 6f 74 20 73 79 6e 63 2f 70 75 73 68 0a 23 20 74  ot sync/push.# t
0790: 68 65 20 72 65 70 6f 73 69 74 6f 72 79 20 61 66  he repository af
07a0: 74 65 72 20 72 75 6e 6e 69 6e 67 20 74 68 65 20  ter running the 
07b0: 74 65 73 74 73 2e 0a 74 65 73 74 3a 09 24 28 41  tests..test:.$(A
07c0: 50 50 4e 41 4d 45 29 0a 09 24 28 54 43 4c 53 48  PPNAME)..$(TCLSH
07d0: 29 20 74 65 73 74 2f 74 65 73 74 65 72 2e 74 63  ) test/tester.tc
07e0: 6c 20 24 28 41 50 50 4e 41 4d 45 29 0a 0a 56 45  l $(APPNAME)..VE
07f0: 52 53 49 4f 4e 2e 68 3a 09 24 28 53 52 43 44 49  RSION.h:.$(SRCDI
0800: 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 2e 75  R)/../manifest.u
0810: 75 69 64 20 24 28 53 52 43 44 49 52 29 2f 2e 2e  uid $(SRCDIR)/..
0820: 2f 6d 61 6e 69 66 65 73 74 0a 09 61 77 6b 20 27  /manifest..awk '
0830: 7b 20 70 72 69 6e 74 66 20 22 23 64 65 66 69 6e  { printf "#defin
0840: 65 20 4d 41 4e 49 46 45 53 54 5f 55 55 49 44 20  e MANIFEST_UUID 
0850: 5c 22 25 73 5c 22 5c 6e 22 2c 20 24 24 31 7d 27  \"%s\"\n", $$1}'
0860: 20 5c 0a 09 09 24 28 53 52 43 44 49 52 29 2f 2e   \...$(SRCDIR)/.
0870: 2e 2f 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20  ./manifest.uuid 
0880: 3e 56 45 52 53 49 4f 4e 2e 68 0a 09 61 77 6b 20  >VERSION.h..awk 
0890: 27 7b 20 70 72 69 6e 74 66 20 22 23 64 65 66 69  '{ printf "#defi
08a0: 6e 65 20 4d 41 4e 49 46 45 53 54 5f 56 45 52 53  ne MANIFEST_VERS
08b0: 49 4f 4e 20 5c 22 5b 25 2e 31 30 73 5d 5c 22 5c  ION \"[%.10s]\"\
08c0: 6e 22 2c 20 24 24 31 7d 27 20 5c 0a 09 09 24 28  n", $$1}' \...$(
08d0: 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66  SRCDIR)/../manif
08e0: 65 73 74 2e 75 75 69 64 20 3e 3e 56 45 52 53 49  est.uuid >>VERSI
08f0: 4f 4e 2e 68 0a 09 61 77 6b 20 27 24 24 31 3d 3d  ON.h..awk '$$1==
0900: 22 44 22 7b 70 72 69 6e 74 66 20 22 23 64 65 66  "D"{printf "#def
0910: 69 6e 65 20 4d 41 4e 49 46 45 53 54 5f 44 41 54  ine MANIFEST_DAT
0920: 45 20 5c 22 25 73 20 25 73 5c 22 5c 6e 22 2c 5c  E \"%s %s\"\n",\
0930: 0a 09 09 73 75 62 73 74 72 28 24 24 32 2c 31 2c  ...substr($$2,1,
0940: 31 30 29 2c 73 75 62 73 74 72 28 24 24 32 2c 31  10),substr($$2,1
0950: 32 29 7d 27 20 5c 0a 09 09 24 28 53 52 43 44 49  2)}' \...$(SRCDI
0960: 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 20 3e  R)/../manifest >
0970: 3e 56 45 52 53 49 4f 4e 2e 68 0a 0a 24 28 41 50  >VERSION.h..$(AP
0980: 50 4e 41 4d 45 29 3a 09 68 65 61 64 65 72 73 20  PNAME):.headers 
0990: 24 28 4f 42 4a 29 20 73 71 6c 69 74 65 33 2e 6f  $(OBJ) sqlite3.o
09a0: 20 74 68 2e 6f 20 74 68 5f 6c 61 6e 67 2e 6f 0a   th.o th_lang.o.
09b0: 09 24 28 54 43 43 29 20 2d 6f 20 24 28 41 50 50  .$(TCC) -o $(APP
09c0: 4e 41 4d 45 29 20 24 28 4f 42 4a 29 20 73 71 6c  NAME) $(OBJ) sql
09d0: 69 74 65 33 2e 6f 20 74 68 2e 6f 20 74 68 5f 6c  ite3.o th.o th_l
09e0: 61 6e 67 2e 6f 20 24 28 4c 49 42 29 0a 0a 23 20  ang.o $(LIB)..# 
09f0: 54 68 69 73 20 72 75 6c 65 20 70 72 65 76 65 6e  This rule preven
0a00: 74 73 20 6d 61 6b 65 20 66 72 6f 6d 20 75 73 69  ts make from usi
0a10: 6e 67 20 69 74 73 20 64 65 66 61 75 6c 74 20 72  ng its default r
0a20: 75 6c 65 73 20 74 6f 20 74 72 79 20 62 75 69 6c  ules to try buil
0a30: 64 0a 23 20 61 6e 20 65 78 65 63 75 74 61 62 6c  d.# an executabl
0a40: 65 20 6e 61 6d 65 64 20 22 6d 61 6e 69 66 65 73  e named "manifes
0a50: 74 22 20 6f 75 74 20 6f 66 20 74 68 65 20 66 69  t" out of the fi
0a60: 6c 65 20 6e 61 6d 65 64 20 22 6d 61 6e 69 66 65  le named "manife
0a70: 73 74 2e 63 22 0a 23 0a 24 28 53 52 43 44 49 52  st.c".#.$(SRCDIR
0a80: 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 3a 09 0a  )/../manifest:..
0a90: 09 23 20 6e 6f 6f 70 0a 0a 63 6c 65 61 6e 3a 09  .# noop..clean:.
0aa0: 0a 09 72 6d 20 2d 66 20 2a 2e 6f 20 2a 5f 2e 63  ..rm -f *.o *_.c
0ab0: 20 24 28 41 50 50 4e 41 4d 45 29 20 56 45 52 53   $(APPNAME) VERS
0ac0: 49 4f 4e 2e 68 0a 09 72 6d 20 2d 66 20 74 72 61  ION.h..rm -f tra
0ad0: 6e 73 6c 61 74 65 20 6d 61 6b 65 68 65 61 64 65  nslate makeheade
0ae0: 72 73 20 6d 6b 69 6e 64 65 78 20 70 61 67 65 5f  rs mkindex page_
0af0: 69 6e 64 65 78 2e 68 20 68 65 61 64 65 72 73 7d  index.h headers}
0b00: 0a 0a 73 65 74 20 68 66 69 6c 65 73 20 7b 7d 0a  ..set hfiles {}.
0b10: 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74  foreach s [lsort
0b20: 20 24 73 72 63 5d 20 7b 6c 61 70 70 65 6e 64 20   $src] {lappend 
0b30: 68 66 69 6c 65 73 20 24 73 2e 68 7d 0a 70 75 74  hfiles $s.h}.put
0b40: 73 20 22 5c 74 72 6d 20 2d 66 20 24 68 66 69 6c  s "\trm -f $hfil
0b50: 65 73 5c 6e 22 0a 0a 73 65 74 20 6d 68 61 72 67  es\n"..set mharg
0b60: 73 20 7b 7d 0a 66 6f 72 65 61 63 68 20 73 20 5b  s {}.foreach s [
0b70: 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20  lsort $src] {.  
0b80: 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22 20  append mhargs " 
0b90: 24 7b 73 7d 5f 2e 63 3a 24 73 2e 68 22 0a 20 20  ${s}_.c:$s.h".  
0ba0: 73 65 74 20 65 78 74 72 61 5f 68 28 24 73 29 20  set extra_h($s) 
0bb0: 7b 7d 0a 7d 0a 61 70 70 65 6e 64 20 6d 68 61 72  {}.}.append mhar
0bc0: 67 73 20 22 20 5c 24 28 53 52 43 44 49 52 29 2f  gs " \$(SRCDIR)/
0bd0: 73 71 6c 69 74 65 33 2e 68 22 0a 61 70 70 65 6e  sqlite3.h".appen
0be0: 64 20 6d 68 61 72 67 73 20 22 20 5c 24 28 53 52  d mhargs " \$(SR
0bf0: 43 44 49 52 29 2f 74 68 2e 68 22 0a 61 70 70 65  CDIR)/th.h".appe
0c00: 6e 64 20 6d 68 61 72 67 73 20 22 20 2e 2f 56 45  nd mhargs " ./VE
0c10: 52 53 49 4f 4e 2e 68 22 0a 70 75 74 73 20 22 68  RSION.h".puts "h
0c20: 65 61 64 65 72 73 3a 5c 74 6d 61 6b 65 68 65 61  eaders:\tmakehea
0c30: 64 65 72 73 20 6d 6b 69 6e 64 65 78 20 5c 24 28  ders mkindex \$(
0c40: 54 52 41 4e 53 5f 53 52 43 29 20 2e 2f 56 45 52  TRANS_SRC) ./VER
0c50: 53 49 4f 4e 2e 68 22 0a 70 75 74 73 20 22 5c 74  SION.h".puts "\t
0c60: 2e 2f 6d 61 6b 65 68 65 61 64 65 72 73 20 24 6d  ./makeheaders $m
0c70: 68 61 72 67 73 22 0a 70 75 74 73 20 22 5c 74 2e  hargs".puts "\t.
0c80: 2f 6d 6b 69 6e 64 65 78 20 5c 24 28 54 52 41 4e  /mkindex \$(TRAN
0c90: 53 5f 53 52 43 29 20 3e 70 61 67 65 5f 69 6e 64  S_SRC) >page_ind
0ca0: 65 78 2e 68 22 0a 70 75 74 73 20 22 5c 74 74 6f  ex.h".puts "\tto
0cb0: 75 63 68 20 68 65 61 64 65 72 73 5c 6e 22 0a 73  uch headers\n".s
0cc0: 65 74 20 65 78 74 72 61 5f 68 28 6d 61 69 6e 29  et extra_h(main)
0cd0: 20 70 61 67 65 5f 69 6e 64 65 78 2e 68 0a 0a 66   page_index.h..f
0ce0: 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20  oreach s [lsort 
0cf0: 24 73 72 63 5d 20 7b 0a 20 20 70 75 74 73 20 22  $src] {.  puts "
0d00: 24 7b 73 7d 5f 2e 63 3a 5c 74 5c 24 28 53 52 43  ${s}_.c:\t\$(SRC
0d10: 44 49 52 29 2f 24 73 2e 63 20 5c 24 28 53 52 43  DIR)/$s.c \$(SRC
0d20: 44 49 52 29 2f 56 45 52 53 49 4f 4e 20 74 72 61  DIR)/VERSION tra
0d30: 6e 73 6c 61 74 65 22 0a 20 20 70 75 74 73 20 22  nslate".  puts "
0d40: 5c 74 2e 2f 74 72 61 6e 73 6c 61 74 65 20 5c 24  \t./translate \$
0d50: 28 53 52 43 44 49 52 29 2f 24 73 2e 63 20 7c 20  (SRCDIR)/$s.c | 
0d60: 73 65 64 20 2d 66 20 5c 24 28 53 52 43 44 49 52  sed -f \$(SRCDIR
0d70: 29 2f 56 45 52 53 49 4f 4e 20 3e 24 7b 73 7d 5f  )/VERSION >${s}_
0d80: 2e 63 5c 6e 22 0a 20 20 70 75 74 73 20 22 24 73  .c\n".  puts "$s
0d90: 2e 6f 3a 5c 74 24 7b 73 7d 5f 2e 63 20 24 73 2e  .o:\t${s}_.c $s.
0da0: 68 20 24 65 78 74 72 61 5f 68 28 24 73 29 20 5c  h $extra_h($s) \
0db0: 24 28 53 52 43 44 49 52 29 2f 63 6f 6e 66 69 67  $(SRCDIR)/config
0dc0: 2e 68 22 0a 20 20 70 75 74 73 20 22 5c 74 5c 24  .h".  puts "\t\$
0dd0: 28 58 54 43 43 29 20 2d 6f 20 24 73 2e 6f 20 2d  (XTCC) -o $s.o -
0de0: 63 20 24 7b 73 7d 5f 2e 63 5c 6e 22 0a 20 20 70  c ${s}_.c\n".  p
0df0: 75 74 73 20 22 24 73 2e 68 3a 5c 74 6d 61 6b 65  uts "$s.h:\tmake
0e00: 68 65 61 64 65 72 73 22 0a 20 20 70 75 74 73 20  headers".  puts 
0e10: 22 5c 74 2e 2f 6d 61 6b 65 68 65 61 64 65 72 73  "\t./makeheaders
0e20: 20 24 6d 68 61 72 67 73 5c 6e 5c 74 74 6f 75 63   $mhargs\n\ttouc
0e30: 68 20 68 65 61 64 65 72 73 5c 6e 22 0a 7d 0a 0a  h headers\n".}..
0e40: 0a 70 75 74 73 20 22 73 71 6c 69 74 65 33 2e 6f  .puts "sqlite3.o
0e50: 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 73 71  :\t\$(SRCDIR)/sq
0e60: 6c 69 74 65 33 2e 63 22 0a 73 65 74 20 6f 70 74  lite3.c".set opt
0e70: 20 7b 2d 44 53 51 4c 49 54 45 5f 4f 4d 49 54 5f   {-DSQLITE_OMIT_
0e80: 4c 4f 41 44 5f 45 58 54 45 4e 53 49 4f 4e 3d 31  LOAD_EXTENSION=1
0e90: 20 2d 44 53 51 4c 49 54 45 5f 50 52 49 56 41 54   -DSQLITE_PRIVAT
0ea0: 45 3d 7d 0a 61 70 70 65 6e 64 20 6f 70 74 20 22  E=}.append opt "
0eb0: 20 2d 44 53 51 4c 49 54 45 5f 54 48 52 45 41 44   -DSQLITE_THREAD
0ec0: 53 41 46 45 3d 30 20 2d 44 53 51 4c 49 54 45 5f  SAFE=0 -DSQLITE_
0ed0: 44 45 46 41 55 4c 54 5f 46 49 4c 45 5f 46 4f 52  DEFAULT_FILE_FOR
0ee0: 4d 41 54 3d 34 22 0a 61 70 70 65 6e 64 20 6f 70  MAT=4".append op
0ef0: 74 20 22 20 2d 44 53 51 4c 49 54 45 5f 45 4e 41  t " -DSQLITE_ENA
0f00: 42 4c 45 5f 46 54 53 33 3d 31 22 0a 70 75 74 73  BLE_FTS3=1".puts
0f10: 20 22 5c 74 5c 24 28 58 54 43 43 29 20 24 6f 70   "\t\$(XTCC) $op
0f20: 74 20 2d 63 20 5c 24 28 53 52 43 44 49 52 29 2f  t -c \$(SRCDIR)/
0f30: 73 71 6c 69 74 65 33 2e 63 20 2d 6f 20 73 71 6c  sqlite3.c -o sql
0f40: 69 74 65 33 2e 6f 5c 6e 22 0a 0a 70 75 74 73 20  ite3.o\n"..puts 
0f50: 22 74 68 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49  "th.o:\t\$(SRCDI
0f60: 52 29 2f 74 68 2e 63 22 0a 70 75 74 73 20 22 5c  R)/th.c".puts "\
0f70: 74 5c 24 28 58 54 43 43 29 20 2d 49 5c 24 28 53  t\$(XTCC) -I\$(S
0f80: 52 43 44 49 52 29 20 2d 63 20 5c 24 28 53 52 43  RCDIR) -c \$(SRC
0f90: 44 49 52 29 2f 74 68 2e 63 20 2d 6f 20 74 68 2e  DIR)/th.c -o th.
0fa0: 6f 5c 6e 22 0a 0a 70 75 74 73 20 22 74 68 5f 6c  o\n"..puts "th_l
0fb0: 61 6e 67 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49  ang.o:\t\$(SRCDI
0fc0: 52 29 2f 74 68 5f 6c 61 6e 67 2e 63 22 0a 70 75  R)/th_lang.c".pu
0fd0: 74 73 20 22 5c 74 5c 24 28 58 54 43 43 29 20 2d  ts "\t\$(XTCC) -
0fe0: 49 5c 24 28 53 52 43 44 49 52 29 20 2d 63 20 5c  I\$(SRCDIR) -c \
0ff0: 24 28 53 52 43 44 49 52 29 2f 74 68 5f 6c 61 6e  $(SRCDIR)/th_lan
1000: 67 2e 63 20 2d 6f 20 74 68 5f 6c 61 6e 67 2e 6f  g.c -o th_lang.o
1010: 5c 6e 22 0a                                      \n".