Hex Artifact Content
Not logged in

Artifact af7720c58ef5ebc3cb435f4075aab0faebc328bc:

File src/makemake.tcl part of check-in [13e16c824a] - Create the interface between TH1 and the rest of fossil. Subscript is still being used, though. This is a preparatory step toward cutting over to TH1. by drh on 2008-02-13 16:21:58.

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 68 5f 6d    tagview.  th_m
0240: 61 69 6e 0a 20 20 74 69 6d 65 6c 69 6e 65 0a 20  ain.  timeline. 
0250: 20 74 6b 74 0a 20 20 74 6b 74 63 6f 6e 66 69 67   tkt.  tktconfig
0260: 0a 20 20 74 6b 74 73 65 74 75 70 0a 20 20 75 6e  .  tktsetup.  un
0270: 64 6f 0a 20 20 75 70 64 61 74 65 0a 20 20 75 72  do.  update.  ur
0280: 6c 0a 20 20 75 73 65 72 0a 20 20 76 65 72 69 66  l.  user.  verif
0290: 79 0a 20 20 76 66 69 6c 65 0a 20 20 77 69 6b 69  y.  vfile.  wiki
02a0: 0a 20 20 77 69 6b 69 66 6f 72 6d 61 74 0a 20 20  .  wikiformat.  
02b0: 78 66 65 72 0a 20 20 7a 69 70 0a 7d 0a 0a 23 20  xfer.  zip.}..# 
02c0: 4e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6e 61  Name of the fina
02d0: 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 0a 23 0a  l application.#.
02e0: 73 65 74 20 6e 61 6d 65 20 66 6f 73 73 69 6c 0a  set name fossil.
02f0: 0a 70 75 74 73 20 7b 23 20 44 4f 20 4e 4f 54 20  .puts {# DO NOT 
0300: 45 44 49 54 0a 23 0a 23 20 54 68 69 73 20 66 69  EDIT.#.# This fi
0310: 6c 65 20 69 73 20 61 75 74 6f 6d 61 74 69 63 61  le is automatica
0320: 6c 6c 79 20 67 65 6e 65 72 61 74 65 64 2e 20 20  lly generated.  
0330: 49 6e 73 74 65 61 64 20 6f 66 20 65 64 69 74 69  Instead of editi
0340: 6e 67 20 74 68 69 73 0a 23 20 66 69 6c 65 2c 20  ng this.# file, 
0350: 65 64 69 74 20 22 6d 61 6b 65 6d 61 6b 65 2e 74  edit "makemake.t
0360: 63 6c 22 20 74 68 65 6e 20 72 75 6e 20 22 74 63  cl" then run "tc
0370: 6c 73 68 20 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c  lsh makemake.tcl
0380: 20 3e 6d 61 69 6e 2e 6d 6b 22 0a 23 20 74 6f 20   >main.mk".# to 
0390: 72 65 67 65 6e 65 72 61 74 65 20 74 68 69 73 20  regenerate this 
03a0: 66 69 6c 65 2e 0a 23 0a 23 20 54 68 69 73 20 66  file..#.# This f
03b0: 69 6c 65 20 69 73 20 69 6e 63 6c 75 64 65 64 20  ile is included 
03c0: 62 79 20 6c 69 6e 75 78 2d 67 63 63 2e 6d 6b 20  by linux-gcc.mk 
03d0: 6f 72 20 6c 69 6e 75 78 2d 6d 69 6e 67 77 2e 6d  or linux-mingw.m
03e0: 6b 20 6f 72 20 70 6f 73 73 69 62 6c 65 0a 23 20  k or possible.# 
03f0: 73 6f 6d 65 20 6f 74 68 65 72 20 6d 61 6b 65 66  some other makef
0400: 69 6c 65 73 2e 20 20 54 68 69 73 20 66 69 6c 65  iles.  This file
0410: 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 72 75   contains the ru
0420: 6c 65 73 20 74 68 61 74 20 61 72 65 20 63 6f 6d  les that are com
0430: 6d 6f 6e 0a 23 20 74 6f 20 62 75 69 6c 64 69 6e  mon.# to buildin
0440: 67 20 72 65 67 61 72 64 6c 65 73 73 20 6f 66 20  g regardless of 
0450: 74 68 65 20 74 61 72 67 65 74 2e 0a 23 0a 0a 58  the target..#..X
0460: 54 43 43 20 3d 20 24 28 54 43 43 29 20 24 28 43  TCC = $(TCC) $(C
0470: 46 4c 41 47 53 29 20 2d 49 2e 20 2d 49 24 28 53  FLAGS) -I. -I$(S
0480: 52 43 44 49 52 29 0a 0a 7d 0a 70 75 74 73 20 2d  RCDIR)..}.puts -
0490: 6e 6f 6e 65 77 6c 69 6e 65 20 22 53 52 43 20 3d  nonewline "SRC =
04a0: 22 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f  ".foreach s [lso
04b0: 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 74  rt $src] {.  put
04c0: 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c  s -nonewline " \
04d0: 5c 5c 6e 20 20 5c 24 28 53 52 43 44 49 52 29 2f  \\n  \$(SRCDIR)/
04e0: 24 73 2e 63 22 0a 7d 0a 70 75 74 73 20 22 5c 6e  $s.c".}.puts "\n
04f0: 22 0a 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e  ".puts -nonewlin
0500: 65 20 22 54 52 41 4e 53 5f 53 52 43 20 3d 22 0a  e "TRANS_SRC =".
0510: 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74  foreach s [lsort
0520: 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 74 73 20   $src] {.  puts 
0530: 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c  -nonewline " \\\
0540: 6e 20 20 24 7b 73 7d 5f 2e 63 22 0a 7d 0a 70 75  n  ${s}_.c".}.pu
0550: 74 73 20 22 5c 6e 22 0a 70 75 74 73 20 2d 6e 6f  ts "\n".puts -no
0560: 6e 65 77 6c 69 6e 65 20 22 4f 42 4a 20 3d 22 0a  newline "OBJ =".
0570: 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74  foreach s [lsort
0580: 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 74 73 20   $src] {.  puts 
0590: 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c  -nonewline " \\\
05a0: 6e 20 20 24 73 2e 6f 22 0a 7d 0a 70 75 74 73 20  n  $s.o".}.puts 
05b0: 22 5c 6e 22 0a 70 75 74 73 20 22 41 50 50 4e 41  "\n".puts "APPNA
05c0: 4d 45 20 3d 20 24 6e 61 6d 65 5c 24 28 45 29 22  ME = $name\$(E)"
05d0: 0a 70 75 74 73 20 22 5c 6e 22 0a 0a 70 75 74 73  .puts "\n"..puts
05e0: 20 7b 0a 61 6c 6c 3a 09 24 28 41 50 50 4e 41 4d   {.all:.$(APPNAM
05f0: 45 29 0a 0a 69 6e 73 74 61 6c 6c 3a 09 24 28 41  E)..install:.$(A
0600: 50 50 4e 41 4d 45 29 0a 09 6d 76 20 24 28 41 50  PPNAME)..mv $(AP
0610: 50 4e 41 4d 45 29 20 24 28 49 4e 53 54 41 4c 4c  PNAME) $(INSTALL
0620: 44 49 52 29 0a 0a 74 72 61 6e 73 6c 61 74 65 3a  DIR)..translate:
0630: 09 24 28 53 52 43 44 49 52 29 2f 74 72 61 6e 73  .$(SRCDIR)/trans
0640: 6c 61 74 65 2e 63 0a 09 24 28 42 43 43 29 20 2d  late.c..$(BCC) -
0650: 6f 20 74 72 61 6e 73 6c 61 74 65 20 24 28 53 52  o translate $(SR
0660: 43 44 49 52 29 2f 74 72 61 6e 73 6c 61 74 65 2e  CDIR)/translate.
0670: 63 0a 0a 6d 61 6b 65 68 65 61 64 65 72 73 3a 09  c..makeheaders:.
0680: 24 28 53 52 43 44 49 52 29 2f 6d 61 6b 65 68 65  $(SRCDIR)/makehe
0690: 61 64 65 72 73 2e 63 0a 09 24 28 42 43 43 29 20  aders.c..$(BCC) 
06a0: 2d 6f 20 6d 61 6b 65 68 65 61 64 65 72 73 20 24  -o makeheaders $
06b0: 28 53 52 43 44 49 52 29 2f 6d 61 6b 65 68 65 61  (SRCDIR)/makehea
06c0: 64 65 72 73 2e 63 0a 0a 6d 6b 69 6e 64 65 78 3a  ders.c..mkindex:
06d0: 09 24 28 53 52 43 44 49 52 29 2f 6d 6b 69 6e 64  .$(SRCDIR)/mkind
06e0: 65 78 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f 20  ex.c..$(BCC) -o 
06f0: 6d 6b 69 6e 64 65 78 20 24 28 53 52 43 44 49 52  mkindex $(SRCDIR
0700: 29 2f 6d 6b 69 6e 64 65 78 2e 63 0a 0a 23 20 57  )/mkindex.c..# W
0710: 41 52 4e 49 4e 47 2e 20 44 41 4e 47 45 52 2e 20  ARNING. DANGER. 
0720: 52 75 6e 6e 69 6e 67 20 74 68 65 20 74 65 73 74  Running the test
0730: 73 75 69 74 65 20 6d 6f 64 69 66 69 65 73 20 74  suite modifies t
0740: 68 65 20 72 65 70 6f 73 69 74 6f 72 79 20 74 68  he repository th
0750: 65 0a 23 20 62 75 69 6c 64 20 69 73 20 64 6f 6e  e.# build is don
0760: 65 20 66 72 6f 6d 2c 20 69 2e 65 2e 20 74 68 65  e from, i.e. the
0770: 20 63 68 65 63 6b 6f 75 74 20 62 65 6c 6f 6e 67   checkout belong
0780: 73 20 74 6f 2e 20 44 6f 20 6e 6f 74 20 73 79 6e  s to. Do not syn
0790: 63 2f 70 75 73 68 0a 23 20 74 68 65 20 72 65 70  c/push.# the rep
07a0: 6f 73 69 74 6f 72 79 20 61 66 74 65 72 20 72 75  ository after ru
07b0: 6e 6e 69 6e 67 20 74 68 65 20 74 65 73 74 73 2e  nning the tests.
07c0: 0a 74 65 73 74 3a 09 24 28 41 50 50 4e 41 4d 45  .test:.$(APPNAME
07d0: 29 0a 09 24 28 54 43 4c 53 48 29 20 74 65 73 74  )..$(TCLSH) test
07e0: 2f 74 65 73 74 65 72 2e 74 63 6c 20 24 28 41 50  /tester.tcl $(AP
07f0: 50 4e 41 4d 45 29 0a 0a 56 45 52 53 49 4f 4e 2e  PNAME)..VERSION.
0800: 68 3a 09 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f  h:.$(SRCDIR)/../
0810: 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20 24 28  manifest.uuid $(
0820: 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66  SRCDIR)/../manif
0830: 65 73 74 0a 09 61 77 6b 20 27 7b 20 70 72 69 6e  est..awk '{ prin
0840: 74 66 20 22 23 64 65 66 69 6e 65 20 4d 41 4e 49  tf "#define MANI
0850: 46 45 53 54 5f 55 55 49 44 20 5c 22 25 73 5c 22  FEST_UUID \"%s\"
0860: 5c 6e 22 2c 20 24 24 31 7d 27 20 5c 0a 09 09 24  \n", $$1}' \...$
0870: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69  (SRCDIR)/../mani
0880: 66 65 73 74 2e 75 75 69 64 20 3e 56 45 52 53 49  fest.uuid >VERSI
0890: 4f 4e 2e 68 0a 09 61 77 6b 20 27 7b 20 70 72 69  ON.h..awk '{ pri
08a0: 6e 74 66 20 22 23 64 65 66 69 6e 65 20 4d 41 4e  ntf "#define MAN
08b0: 49 46 45 53 54 5f 56 45 52 53 49 4f 4e 20 5c 22  IFEST_VERSION \"
08c0: 5b 25 2e 31 30 73 5d 5c 22 5c 6e 22 2c 20 24 24  [%.10s]\"\n", $$
08d0: 31 7d 27 20 5c 0a 09 09 24 28 53 52 43 44 49 52  1}' \...$(SRCDIR
08e0: 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 2e 75 75  )/../manifest.uu
08f0: 69 64 20 3e 3e 56 45 52 53 49 4f 4e 2e 68 0a 09  id >>VERSION.h..
0900: 61 77 6b 20 27 24 24 31 3d 3d 22 44 22 7b 70 72  awk '$$1=="D"{pr
0910: 69 6e 74 66 20 22 23 64 65 66 69 6e 65 20 4d 41  intf "#define MA
0920: 4e 49 46 45 53 54 5f 44 41 54 45 20 5c 22 25 73  NIFEST_DATE \"%s
0930: 20 25 73 5c 22 5c 6e 22 2c 5c 0a 09 09 73 75 62   %s\"\n",\...sub
0940: 73 74 72 28 24 24 32 2c 31 2c 31 30 29 2c 73 75  str($$2,1,10),su
0950: 62 73 74 72 28 24 24 32 2c 31 32 29 7d 27 20 5c  bstr($$2,12)}' \
0960: 0a 09 09 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f  ...$(SRCDIR)/../
0970: 6d 61 6e 69 66 65 73 74 20 3e 3e 56 45 52 53 49  manifest >>VERSI
0980: 4f 4e 2e 68 0a 0a 24 28 41 50 50 4e 41 4d 45 29  ON.h..$(APPNAME)
0990: 3a 09 68 65 61 64 65 72 73 20 24 28 4f 42 4a 29  :.headers $(OBJ)
09a0: 20 73 71 6c 69 74 65 33 2e 6f 20 74 68 2e 6f 20   sqlite3.o th.o 
09b0: 74 68 5f 6c 61 6e 67 2e 6f 0a 09 24 28 54 43 43  th_lang.o..$(TCC
09c0: 29 20 2d 6f 20 24 28 41 50 50 4e 41 4d 45 29 20  ) -o $(APPNAME) 
09d0: 24 28 4f 42 4a 29 20 73 71 6c 69 74 65 33 2e 6f  $(OBJ) sqlite3.o
09e0: 20 74 68 2e 6f 20 74 68 5f 6c 61 6e 67 2e 6f 20   th.o th_lang.o 
09f0: 24 28 4c 49 42 29 0a 0a 23 20 54 68 69 73 20 72  $(LIB)..# This r
0a00: 75 6c 65 20 70 72 65 76 65 6e 74 73 20 6d 61 6b  ule prevents mak
0a10: 65 20 66 72 6f 6d 20 75 73 69 6e 67 20 69 74 73  e from using its
0a20: 20 64 65 66 61 75 6c 74 20 72 75 6c 65 73 20 74   default rules t
0a30: 6f 20 74 72 79 20 62 75 69 6c 64 0a 23 20 61 6e  o try build.# an
0a40: 20 65 78 65 63 75 74 61 62 6c 65 20 6e 61 6d 65   executable name
0a50: 64 20 22 6d 61 6e 69 66 65 73 74 22 20 6f 75 74  d "manifest" out
0a60: 20 6f 66 20 74 68 65 20 66 69 6c 65 20 6e 61 6d   of the file nam
0a70: 65 64 20 22 6d 61 6e 69 66 65 73 74 2e 63 22 0a  ed "manifest.c".
0a80: 23 0a 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d  #.$(SRCDIR)/../m
0a90: 61 6e 69 66 65 73 74 3a 09 0a 09 23 20 6e 6f 6f  anifest:...# noo
0aa0: 70 0a 0a 63 6c 65 61 6e 3a 09 0a 09 72 6d 20 2d  p..clean:...rm -
0ab0: 66 20 2a 2e 6f 20 2a 5f 2e 63 20 24 28 41 50 50  f *.o *_.c $(APP
0ac0: 4e 41 4d 45 29 20 56 45 52 53 49 4f 4e 2e 68 0a  NAME) VERSION.h.
0ad0: 09 72 6d 20 2d 66 20 74 72 61 6e 73 6c 61 74 65  .rm -f translate
0ae0: 20 6d 61 6b 65 68 65 61 64 65 72 73 20 6d 6b 69   makeheaders mki
0af0: 6e 64 65 78 20 70 61 67 65 5f 69 6e 64 65 78 2e  ndex page_index.
0b00: 68 20 68 65 61 64 65 72 73 7d 0a 0a 73 65 74 20  h headers}..set 
0b10: 68 66 69 6c 65 73 20 7b 7d 0a 66 6f 72 65 61 63  hfiles {}.foreac
0b20: 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d  h s [lsort $src]
0b30: 20 7b 6c 61 70 70 65 6e 64 20 68 66 69 6c 65 73   {lappend hfiles
0b40: 20 24 73 2e 68 7d 0a 70 75 74 73 20 22 5c 74 72   $s.h}.puts "\tr
0b50: 6d 20 2d 66 20 24 68 66 69 6c 65 73 5c 6e 22 0a  m -f $hfiles\n".
0b60: 0a 73 65 74 20 6d 68 61 72 67 73 20 7b 7d 0a 66  .set mhargs {}.f
0b70: 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20  oreach s [lsort 
0b80: 24 73 72 63 5d 20 7b 0a 20 20 61 70 70 65 6e 64  $src] {.  append
0b90: 20 6d 68 61 72 67 73 20 22 20 24 7b 73 7d 5f 2e   mhargs " ${s}_.
0ba0: 63 3a 24 73 2e 68 22 0a 20 20 73 65 74 20 65 78  c:$s.h".  set ex
0bb0: 74 72 61 5f 68 28 24 73 29 20 7b 7d 0a 7d 0a 61  tra_h($s) {}.}.a
0bc0: 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22 20 5c  ppend mhargs " \
0bd0: 24 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65  $(SRCDIR)/sqlite
0be0: 33 2e 68 22 0a 61 70 70 65 6e 64 20 6d 68 61 72  3.h".append mhar
0bf0: 67 73 20 22 20 5c 24 28 53 52 43 44 49 52 29 2f  gs " \$(SRCDIR)/
0c00: 74 68 2e 68 22 0a 61 70 70 65 6e 64 20 6d 68 61  th.h".append mha
0c10: 72 67 73 20 22 20 2e 2f 56 45 52 53 49 4f 4e 2e  rgs " ./VERSION.
0c20: 68 22 0a 70 75 74 73 20 22 68 65 61 64 65 72 73  h".puts "headers
0c30: 3a 5c 74 6d 61 6b 65 68 65 61 64 65 72 73 20 6d  :\tmakeheaders m
0c40: 6b 69 6e 64 65 78 20 5c 24 28 54 52 41 4e 53 5f  kindex \$(TRANS_
0c50: 53 52 43 29 20 2e 2f 56 45 52 53 49 4f 4e 2e 68  SRC) ./VERSION.h
0c60: 22 0a 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b 65  ".puts "\t./make
0c70: 68 65 61 64 65 72 73 20 24 6d 68 61 72 67 73 22  headers $mhargs"
0c80: 0a 70 75 74 73 20 22 5c 74 2e 2f 6d 6b 69 6e 64  .puts "\t./mkind
0c90: 65 78 20 5c 24 28 54 52 41 4e 53 5f 53 52 43 29  ex \$(TRANS_SRC)
0ca0: 20 3e 70 61 67 65 5f 69 6e 64 65 78 2e 68 22 0a   >page_index.h".
0cb0: 70 75 74 73 20 22 5c 74 74 6f 75 63 68 20 68 65  puts "\ttouch he
0cc0: 61 64 65 72 73 5c 6e 22 0a 73 65 74 20 65 78 74  aders\n".set ext
0cd0: 72 61 5f 68 28 6d 61 69 6e 29 20 70 61 67 65 5f  ra_h(main) page_
0ce0: 69 6e 64 65 78 2e 68 0a 0a 66 6f 72 65 61 63 68  index.h..foreach
0cf0: 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20   s [lsort $src] 
0d00: 7b 0a 20 20 70 75 74 73 20 22 24 7b 73 7d 5f 2e  {.  puts "${s}_.
0d10: 63 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 24  c:\t\$(SRCDIR)/$
0d20: 73 2e 63 20 5c 24 28 53 52 43 44 49 52 29 2f 56  s.c \$(SRCDIR)/V
0d30: 45 52 53 49 4f 4e 20 74 72 61 6e 73 6c 61 74 65  ERSION translate
0d40: 22 0a 20 20 70 75 74 73 20 22 5c 74 2e 2f 74 72  ".  puts "\t./tr
0d50: 61 6e 73 6c 61 74 65 20 5c 24 28 53 52 43 44 49  anslate \$(SRCDI
0d60: 52 29 2f 24 73 2e 63 20 7c 20 73 65 64 20 2d 66  R)/$s.c | sed -f
0d70: 20 5c 24 28 53 52 43 44 49 52 29 2f 56 45 52 53   \$(SRCDIR)/VERS
0d80: 49 4f 4e 20 3e 24 7b 73 7d 5f 2e 63 5c 6e 22 0a  ION >${s}_.c\n".
0d90: 20 20 70 75 74 73 20 22 24 73 2e 6f 3a 5c 74 24    puts "$s.o:\t$
0da0: 7b 73 7d 5f 2e 63 20 24 73 2e 68 20 24 65 78 74  {s}_.c $s.h $ext
0db0: 72 61 5f 68 28 24 73 29 20 5c 24 28 53 52 43 44  ra_h($s) \$(SRCD
0dc0: 49 52 29 2f 63 6f 6e 66 69 67 2e 68 22 0a 20 20  IR)/config.h".  
0dd0: 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 43 29  puts "\t\$(XTCC)
0de0: 20 2d 6f 20 24 73 2e 6f 20 2d 63 20 24 7b 73 7d   -o $s.o -c ${s}
0df0: 5f 2e 63 5c 6e 22 0a 20 20 70 75 74 73 20 22 24  _.c\n".  puts "$
0e00: 73 2e 68 3a 5c 74 6d 61 6b 65 68 65 61 64 65 72  s.h:\tmakeheader
0e10: 73 22 0a 20 20 70 75 74 73 20 22 5c 74 2e 2f 6d  s".  puts "\t./m
0e20: 61 6b 65 68 65 61 64 65 72 73 20 24 6d 68 61 72  akeheaders $mhar
0e30: 67 73 5c 6e 5c 74 74 6f 75 63 68 20 68 65 61 64  gs\n\ttouch head
0e40: 65 72 73 5c 6e 22 0a 7d 0a 0a 0a 70 75 74 73 20  ers\n".}...puts 
0e50: 22 73 71 6c 69 74 65 33 2e 6f 3a 5c 74 5c 24 28  "sqlite3.o:\t\$(
0e60: 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33 2e  SRCDIR)/sqlite3.
0e70: 63 22 0a 73 65 74 20 6f 70 74 20 7b 2d 44 53 51  c".set opt {-DSQ
0e80: 4c 49 54 45 5f 4f 4d 49 54 5f 4c 4f 41 44 5f 45  LITE_OMIT_LOAD_E
0e90: 58 54 45 4e 53 49 4f 4e 3d 31 20 2d 44 53 51 4c  XTENSION=1 -DSQL
0ea0: 49 54 45 5f 50 52 49 56 41 54 45 3d 7d 0a 61 70  ITE_PRIVATE=}.ap
0eb0: 70 65 6e 64 20 6f 70 74 20 22 20 2d 44 53 51 4c  pend opt " -DSQL
0ec0: 49 54 45 5f 54 48 52 45 41 44 53 41 46 45 3d 30  ITE_THREADSAFE=0
0ed0: 20 2d 44 53 51 4c 49 54 45 5f 44 45 46 41 55 4c   -DSQLITE_DEFAUL
0ee0: 54 5f 46 49 4c 45 5f 46 4f 52 4d 41 54 3d 34 22  T_FILE_FORMAT=4"
0ef0: 0a 61 70 70 65 6e 64 20 6f 70 74 20 22 20 2d 44  .append opt " -D
0f00: 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45 5f 46 54  SQLITE_ENABLE_FT
0f10: 53 33 3d 31 22 0a 70 75 74 73 20 22 5c 74 5c 24  S3=1".puts "\t\$
0f20: 28 58 54 43 43 29 20 24 6f 70 74 20 2d 63 20 5c  (XTCC) $opt -c \
0f30: 24 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65  $(SRCDIR)/sqlite
0f40: 33 2e 63 20 2d 6f 20 73 71 6c 69 74 65 33 2e 6f  3.c -o sqlite3.o
0f50: 5c 6e 22 0a 0a 70 75 74 73 20 22 74 68 2e 6f 3a  \n"..puts "th.o:
0f60: 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 74 68 2e  \t\$(SRCDIR)/th.
0f70: 63 22 0a 70 75 74 73 20 22 5c 74 5c 24 28 58 54  c".puts "\t\$(XT
0f80: 43 43 29 20 2d 49 5c 24 28 53 52 43 44 49 52 29  CC) -I\$(SRCDIR)
0f90: 20 2d 63 20 5c 24 28 53 52 43 44 49 52 29 2f 74   -c \$(SRCDIR)/t
0fa0: 68 2e 63 20 2d 6f 20 74 68 2e 6f 5c 6e 22 0a 0a  h.c -o th.o\n"..
0fb0: 70 75 74 73 20 22 74 68 5f 6c 61 6e 67 2e 6f 3a  puts "th_lang.o:
0fc0: 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 74 68 5f  \t\$(SRCDIR)/th_
0fd0: 6c 61 6e 67 2e 63 22 0a 70 75 74 73 20 22 5c 74  lang.c".puts "\t
0fe0: 5c 24 28 58 54 43 43 29 20 2d 49 5c 24 28 53 52  \$(XTCC) -I\$(SR
0ff0: 43 44 49 52 29 20 2d 63 20 5c 24 28 53 52 43 44  CDIR) -c \$(SRCD
1000: 49 52 29 2f 74 68 5f 6c 61 6e 67 2e 63 20 2d 6f  IR)/th_lang.c -o
1010: 20 74 68 5f 6c 61 6e 67 2e 6f 5c 6e 22 0a         th_lang.o\n".