Hex Artifact Content
Not logged in

Artifact 86961397302eee7a1a1b7351bb373c124aa8882b:

File src/makemake.tcl part of check-in [8c8f8616a6] - Add an "finfo" command to give file history. by drh on 2009-10-31 15:07:45.

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 6c 6c 72 65 70 6f 0a 20 20 62 61 67 0a 20 20  allrepo.  bag.  
00d0: 62 6c 6f 62 0a 20 20 62 72 61 6e 63 68 0a 20 20  blob.  branch.  
00e0: 62 72 6f 77 73 65 0a 20 20 63 61 70 74 63 68 61  browse.  captcha
00f0: 0a 20 20 63 67 69 0a 20 20 63 68 65 63 6b 69 6e  .  cgi.  checkin
0100: 0a 20 20 63 68 65 63 6b 6f 75 74 0a 20 20 63 6c  .  checkout.  cl
0110: 65 61 72 73 69 67 6e 0a 20 20 63 6c 6f 6e 65 0a  earsign.  clone.
0120: 20 20 63 6f 6d 66 6f 72 6d 61 74 0a 20 20 63 6f    comformat.  co
0130: 6e 66 69 67 75 72 65 0a 20 20 63 6f 6e 73 74 72  nfigure.  constr
0140: 75 63 74 0a 20 20 63 6f 6e 74 65 6e 74 0a 20 20  uct.  content.  
0150: 64 62 0a 20 20 64 65 6c 74 61 0a 20 20 64 65 6c  db.  delta.  del
0160: 74 61 63 6d 64 0a 20 20 64 65 73 63 65 6e 64 61  tacmd.  descenda
0170: 6e 74 73 0a 20 20 64 69 66 66 0a 20 20 64 69 66  nts.  diff.  dif
0180: 66 63 6d 64 0a 20 20 64 6f 63 0a 20 20 65 6e 63  fcmd.  doc.  enc
0190: 6f 64 65 0a 20 20 66 69 6c 65 0a 20 20 66 69 6e  ode.  file.  fin
01a0: 66 6f 0a 20 20 68 74 74 70 0a 20 20 68 74 74 70  fo.  http.  http
01b0: 5f 73 6f 63 6b 65 74 0a 20 20 68 74 74 70 5f 74  _socket.  http_t
01c0: 72 61 6e 73 70 6f 72 74 0a 20 20 69 6e 66 6f 0a  ransport.  info.
01d0: 20 20 6c 6f 67 69 6e 0a 20 20 6d 61 69 6e 0a 20    login.  main. 
01e0: 20 6d 61 6e 69 66 65 73 74 0a 20 20 6d 64 35 0a   manifest.  md5.
01f0: 20 20 6d 65 72 67 65 0a 20 20 6d 65 72 67 65 33    merge.  merge3
0200: 0a 20 20 6e 61 6d 65 0a 20 20 70 69 76 6f 74 0a  .  name.  pivot.
0210: 20 20 70 71 75 65 75 65 0a 20 20 70 72 69 6e 74    pqueue.  print
0220: 66 0a 20 20 72 65 62 75 69 6c 64 0a 20 20 72 65  f.  rebuild.  re
0230: 70 6f 72 74 0a 20 20 72 73 73 0a 20 20 72 73 74  port.  rss.  rst
0240: 61 74 73 0a 20 20 73 63 68 65 6d 61 0a 20 20 73  ats.  schema.  s
0250: 65 61 72 63 68 0a 20 20 73 65 74 75 70 0a 20 20  earch.  setup.  
0260: 73 68 61 31 0a 20 20 73 68 75 6e 0a 20 20 73 74  sha1.  shun.  st
0270: 61 74 0a 20 20 73 74 79 6c 65 0a 20 20 73 79 6e  at.  style.  syn
0280: 63 0a 20 20 74 61 67 0a 20 20 74 68 5f 6d 61 69  c.  tag.  th_mai
0290: 6e 0a 20 20 74 69 6d 65 6c 69 6e 65 0a 20 20 74  n.  timeline.  t
02a0: 6b 74 0a 20 20 74 6b 74 73 65 74 75 70 0a 20 20  kt.  tktsetup.  
02b0: 75 6e 64 6f 0a 20 20 75 70 64 61 74 65 0a 20 20  undo.  update.  
02c0: 75 72 6c 0a 20 20 75 73 65 72 0a 20 20 76 65 72  url.  user.  ver
02d0: 69 66 79 0a 20 20 76 66 69 6c 65 0a 20 20 77 69  ify.  vfile.  wi
02e0: 6b 69 0a 20 20 77 69 6b 69 66 6f 72 6d 61 74 0a  ki.  wikiformat.
02f0: 20 20 77 69 6e 68 74 74 70 0a 20 20 78 66 65 72    winhttp.  xfer
0300: 0a 20 20 7a 69 70 0a 7d 0a 0a 23 20 4e 61 6d 65  .  zip.}..# Name
0310: 20 6f 66 20 74 68 65 20 66 69 6e 61 6c 20 61 70   of the final ap
0320: 70 6c 69 63 61 74 69 6f 6e 0a 23 0a 73 65 74 20  plication.#.set 
0330: 6e 61 6d 65 20 66 6f 73 73 69 6c 0a 0a 70 75 74  name fossil..put
0340: 73 20 7b 23 20 44 4f 20 4e 4f 54 20 45 44 49 54  s {# DO NOT EDIT
0350: 0a 23 0a 23 20 54 68 69 73 20 66 69 6c 65 20 69  .#.# This file i
0360: 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20  s automatically 
0370: 67 65 6e 65 72 61 74 65 64 2e 20 20 49 6e 73 74  generated.  Inst
0380: 65 61 64 20 6f 66 20 65 64 69 74 69 6e 67 20 74  ead of editing t
0390: 68 69 73 0a 23 20 66 69 6c 65 2c 20 65 64 69 74  his.# file, edit
03a0: 20 22 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 22 20   "makemake.tcl" 
03b0: 74 68 65 6e 20 72 75 6e 20 22 74 63 6c 73 68 20  then run "tclsh 
03c0: 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 20 3e 6d 61  makemake.tcl >ma
03d0: 69 6e 2e 6d 6b 22 0a 23 20 74 6f 20 72 65 67 65  in.mk".# to rege
03e0: 6e 65 72 61 74 65 20 74 68 69 73 20 66 69 6c 65  nerate this file
03f0: 2e 0a 23 0a 23 20 54 68 69 73 20 66 69 6c 65 20  ..#.# This file 
0400: 69 73 20 69 6e 63 6c 75 64 65 64 20 62 79 20 6c  is included by l
0410: 69 6e 75 78 2d 67 63 63 2e 6d 6b 20 6f 72 20 6c  inux-gcc.mk or l
0420: 69 6e 75 78 2d 6d 69 6e 67 77 2e 6d 6b 20 6f 72  inux-mingw.mk or
0430: 20 70 6f 73 73 69 62 6c 65 0a 23 20 73 6f 6d 65   possible.# some
0440: 20 6f 74 68 65 72 20 6d 61 6b 65 66 69 6c 65 73   other makefiles
0450: 2e 20 20 54 68 69 73 20 66 69 6c 65 20 63 6f 6e  .  This file con
0460: 74 61 69 6e 73 20 74 68 65 20 72 75 6c 65 73 20  tains the rules 
0470: 74 68 61 74 20 61 72 65 20 63 6f 6d 6d 6f 6e 0a  that are common.
0480: 23 20 74 6f 20 62 75 69 6c 64 69 6e 67 20 72 65  # to building re
0490: 67 61 72 64 6c 65 73 73 20 6f 66 20 74 68 65 20  gardless of the 
04a0: 74 61 72 67 65 74 2e 0a 23 0a 0a 58 54 43 43 20  target..#..XTCC 
04b0: 3d 20 24 28 54 43 43 29 20 24 28 43 46 4c 41 47  = $(TCC) $(CFLAG
04c0: 53 29 20 2d 49 2e 20 2d 49 24 28 53 52 43 44 49  S) -I. -I$(SRCDI
04d0: 52 29 0a 0a 7d 0a 70 75 74 73 20 2d 6e 6f 6e 65  R)..}.puts -none
04e0: 77 6c 69 6e 65 20 22 53 52 43 20 3d 22 0a 66 6f  wline "SRC =".fo
04f0: 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24  reach s [lsort $
0500: 73 72 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e  src] {.  puts -n
0510: 6f 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20  onewline " \\\n 
0520: 20 5c 24 28 53 52 43 44 49 52 29 2f 24 73 2e 63   \$(SRCDIR)/$s.c
0530: 22 0a 7d 0a 70 75 74 73 20 22 5c 6e 22 0a 70 75  ".}.puts "\n".pu
0540: 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 54  ts -nonewline "T
0550: 52 41 4e 53 5f 53 52 43 20 3d 22 0a 66 6f 72 65  RANS_SRC =".fore
0560: 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72  ach s [lsort $sr
0570: 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f 6e  c] {.  puts -non
0580: 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 24  ewline " \\\n  $
0590: 7b 73 7d 5f 2e 63 22 0a 7d 0a 70 75 74 73 20 22  {s}_.c".}.puts "
05a0: 5c 6e 22 0a 70 75 74 73 20 2d 6e 6f 6e 65 77 6c  \n".puts -nonewl
05b0: 69 6e 65 20 22 4f 42 4a 20 3d 22 0a 66 6f 72 65  ine "OBJ =".fore
05c0: 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72  ach s [lsort $sr
05d0: 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f 6e  c] {.  puts -non
05e0: 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 24  ewline " \\\n  $
05f0: 73 2e 6f 22 0a 7d 0a 70 75 74 73 20 22 5c 6e 22  s.o".}.puts "\n"
0600: 0a 70 75 74 73 20 22 41 50 50 4e 41 4d 45 20 3d  .puts "APPNAME =
0610: 20 24 6e 61 6d 65 5c 24 28 45 29 22 0a 70 75 74   $name\$(E)".put
0620: 73 20 22 5c 6e 22 0a 0a 70 75 74 73 20 7b 0a 61  s "\n"..puts {.a
0630: 6c 6c 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a 0a  ll:.$(APPNAME)..
0640: 69 6e 73 74 61 6c 6c 3a 09 24 28 41 50 50 4e 41  install:.$(APPNA
0650: 4d 45 29 0a 09 6d 76 20 24 28 41 50 50 4e 41 4d  ME)..mv $(APPNAM
0660: 45 29 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 29  E) $(INSTALLDIR)
0670: 0a 0a 74 72 61 6e 73 6c 61 74 65 3a 09 24 28 53  ..translate:.$(S
0680: 52 43 44 49 52 29 2f 74 72 61 6e 73 6c 61 74 65  RCDIR)/translate
0690: 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f 20 74 72  .c..$(BCC) -o tr
06a0: 61 6e 73 6c 61 74 65 20 24 28 53 52 43 44 49 52  anslate $(SRCDIR
06b0: 29 2f 74 72 61 6e 73 6c 61 74 65 2e 63 0a 0a 6d  )/translate.c..m
06c0: 61 6b 65 68 65 61 64 65 72 73 3a 09 24 28 53 52  akeheaders:.$(SR
06d0: 43 44 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72  CDIR)/makeheader
06e0: 73 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f 20 6d  s.c..$(BCC) -o m
06f0: 61 6b 65 68 65 61 64 65 72 73 20 24 28 53 52 43  akeheaders $(SRC
0700: 44 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73  DIR)/makeheaders
0710: 2e 63 0a 0a 6d 6b 69 6e 64 65 78 3a 09 24 28 53  .c..mkindex:.$(S
0720: 52 43 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e 63  RCDIR)/mkindex.c
0730: 0a 09 24 28 42 43 43 29 20 2d 6f 20 6d 6b 69 6e  ..$(BCC) -o mkin
0740: 64 65 78 20 24 28 53 52 43 44 49 52 29 2f 6d 6b  dex $(SRCDIR)/mk
0750: 69 6e 64 65 78 2e 63 0a 0a 23 20 57 41 52 4e 49  index.c..# WARNI
0760: 4e 47 2e 20 44 41 4e 47 45 52 2e 20 52 75 6e 6e  NG. DANGER. Runn
0770: 69 6e 67 20 74 68 65 20 74 65 73 74 73 75 69 74  ing the testsuit
0780: 65 20 6d 6f 64 69 66 69 65 73 20 74 68 65 20 72  e modifies the r
0790: 65 70 6f 73 69 74 6f 72 79 20 74 68 65 0a 23 20  epository the.# 
07a0: 62 75 69 6c 64 20 69 73 20 64 6f 6e 65 20 66 72  build is done fr
07b0: 6f 6d 2c 20 69 2e 65 2e 20 74 68 65 20 63 68 65  om, i.e. the che
07c0: 63 6b 6f 75 74 20 62 65 6c 6f 6e 67 73 20 74 6f  ckout belongs to
07d0: 2e 20 44 6f 20 6e 6f 74 20 73 79 6e 63 2f 70 75  . Do not sync/pu
07e0: 73 68 0a 23 20 74 68 65 20 72 65 70 6f 73 69 74  sh.# the reposit
07f0: 6f 72 79 20 61 66 74 65 72 20 72 75 6e 6e 69 6e  ory after runnin
0800: 67 20 74 68 65 20 74 65 73 74 73 2e 0a 74 65 73  g the tests..tes
0810: 74 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a 09 24  t:.$(APPNAME)..$
0820: 28 54 43 4c 53 48 29 20 74 65 73 74 2f 74 65 73  (TCLSH) test/tes
0830: 74 65 72 2e 74 63 6c 20 24 28 41 50 50 4e 41 4d  ter.tcl $(APPNAM
0840: 45 29 0a 0a 56 45 52 53 49 4f 4e 2e 68 3a 09 24  E)..VERSION.h:.$
0850: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69  (SRCDIR)/../mani
0860: 66 65 73 74 2e 75 75 69 64 20 24 28 53 52 43 44  fest.uuid $(SRCD
0870: 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 0a  IR)/../manifest.
0880: 09 61 77 6b 20 27 7b 20 70 72 69 6e 74 66 20 22  .awk '{ printf "
0890: 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53 54  #define MANIFEST
08a0: 5f 55 55 49 44 20 5c 22 25 73 5c 22 5c 6e 22 2c  _UUID \"%s\"\n",
08b0: 20 24 24 31 7d 27 20 5c 0a 09 09 24 28 53 52 43   $$1}' \...$(SRC
08c0: 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74  DIR)/../manifest
08d0: 2e 75 75 69 64 20 3e 56 45 52 53 49 4f 4e 2e 68  .uuid >VERSION.h
08e0: 0a 09 61 77 6b 20 27 7b 20 70 72 69 6e 74 66 20  ..awk '{ printf 
08f0: 22 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53  "#define MANIFES
0900: 54 5f 56 45 52 53 49 4f 4e 20 5c 22 5b 25 2e 31  T_VERSION \"[%.1
0910: 30 73 5d 5c 22 5c 6e 22 2c 20 24 24 31 7d 27 20  0s]\"\n", $$1}' 
0920: 5c 0a 09 09 24 28 53 52 43 44 49 52 29 2f 2e 2e  \...$(SRCDIR)/..
0930: 2f 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20 3e  /manifest.uuid >
0940: 3e 56 45 52 53 49 4f 4e 2e 68 0a 09 61 77 6b 20  >VERSION.h..awk 
0950: 27 24 24 31 3d 3d 22 44 22 7b 70 72 69 6e 74 66  '$$1=="D"{printf
0960: 20 22 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45   "#define MANIFE
0970: 53 54 5f 44 41 54 45 20 5c 22 25 73 20 25 73 5c  ST_DATE \"%s %s\
0980: 22 5c 6e 22 2c 5c 0a 09 09 73 75 62 73 74 72 28  "\n",\...substr(
0990: 24 24 32 2c 31 2c 31 30 29 2c 73 75 62 73 74 72  $$2,1,10),substr
09a0: 28 24 24 32 2c 31 32 29 7d 27 20 5c 0a 09 09 24  ($$2,12)}' \...$
09b0: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69  (SRCDIR)/../mani
09c0: 66 65 73 74 20 3e 3e 56 45 52 53 49 4f 4e 2e 68  fest >>VERSION.h
09d0: 0a 0a 24 28 41 50 50 4e 41 4d 45 29 3a 09 68 65  ..$(APPNAME):.he
09e0: 61 64 65 72 73 20 24 28 4f 42 4a 29 20 73 71 6c  aders $(OBJ) sql
09f0: 69 74 65 33 2e 6f 20 74 68 2e 6f 20 74 68 5f 6c  ite3.o th.o th_l
0a00: 61 6e 67 2e 6f 0a 09 24 28 54 43 43 29 20 2d 6f  ang.o..$(TCC) -o
0a10: 20 24 28 41 50 50 4e 41 4d 45 29 20 24 28 4f 42   $(APPNAME) $(OB
0a20: 4a 29 20 73 71 6c 69 74 65 33 2e 6f 20 74 68 2e  J) sqlite3.o th.
0a30: 6f 20 74 68 5f 6c 61 6e 67 2e 6f 20 24 28 4c 49  o th_lang.o $(LI
0a40: 42 29 0a 0a 23 20 54 68 69 73 20 72 75 6c 65 20  B)..# This rule 
0a50: 70 72 65 76 65 6e 74 73 20 6d 61 6b 65 20 66 72  prevents make fr
0a60: 6f 6d 20 75 73 69 6e 67 20 69 74 73 20 64 65 66  om using its def
0a70: 61 75 6c 74 20 72 75 6c 65 73 20 74 6f 20 74 72  ault rules to tr
0a80: 79 20 62 75 69 6c 64 0a 23 20 61 6e 20 65 78 65  y build.# an exe
0a90: 63 75 74 61 62 6c 65 20 6e 61 6d 65 64 20 22 6d  cutable named "m
0aa0: 61 6e 69 66 65 73 74 22 20 6f 75 74 20 6f 66 20  anifest" out of 
0ab0: 74 68 65 20 66 69 6c 65 20 6e 61 6d 65 64 20 22  the file named "
0ac0: 6d 61 6e 69 66 65 73 74 2e 63 22 0a 23 0a 24 28  manifest.c".#.$(
0ad0: 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66  SRCDIR)/../manif
0ae0: 65 73 74 3a 09 0a 09 23 20 6e 6f 6f 70 0a 0a 63  est:...# noop..c
0af0: 6c 65 61 6e 3a 09 0a 09 72 6d 20 2d 66 20 2a 2e  lean:...rm -f *.
0b00: 6f 20 2a 5f 2e 63 20 24 28 41 50 50 4e 41 4d 45  o *_.c $(APPNAME
0b10: 29 20 56 45 52 53 49 4f 4e 2e 68 0a 09 72 6d 20  ) VERSION.h..rm 
0b20: 2d 66 20 74 72 61 6e 73 6c 61 74 65 20 6d 61 6b  -f translate mak
0b30: 65 68 65 61 64 65 72 73 20 6d 6b 69 6e 64 65 78  eheaders mkindex
0b40: 20 70 61 67 65 5f 69 6e 64 65 78 2e 68 20 68 65   page_index.h he
0b50: 61 64 65 72 73 7d 0a 0a 73 65 74 20 68 66 69 6c  aders}..set hfil
0b60: 65 73 20 7b 7d 0a 66 6f 72 65 61 63 68 20 73 20  es {}.foreach s 
0b70: 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 6c 61  [lsort $src] {la
0b80: 70 70 65 6e 64 20 68 66 69 6c 65 73 20 24 73 2e  ppend hfiles $s.
0b90: 68 7d 0a 70 75 74 73 20 22 5c 74 72 6d 20 2d 66  h}.puts "\trm -f
0ba0: 20 24 68 66 69 6c 65 73 5c 6e 22 0a 0a 73 65 74   $hfiles\n"..set
0bb0: 20 6d 68 61 72 67 73 20 7b 7d 0a 66 6f 72 65 61   mhargs {}.forea
0bc0: 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63  ch s [lsort $src
0bd0: 5d 20 7b 0a 20 20 61 70 70 65 6e 64 20 6d 68 61  ] {.  append mha
0be0: 72 67 73 20 22 20 24 7b 73 7d 5f 2e 63 3a 24 73  rgs " ${s}_.c:$s
0bf0: 2e 68 22 0a 20 20 73 65 74 20 65 78 74 72 61 5f  .h".  set extra_
0c00: 68 28 24 73 29 20 7b 7d 0a 7d 0a 61 70 70 65 6e  h($s) {}.}.appen
0c10: 64 20 6d 68 61 72 67 73 20 22 20 5c 24 28 53 52  d mhargs " \$(SR
0c20: 43 44 49 52 29 2f 73 71 6c 69 74 65 33 2e 68 22  CDIR)/sqlite3.h"
0c30: 0a 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22  .append mhargs "
0c40: 20 5c 24 28 53 52 43 44 49 52 29 2f 74 68 2e 68   \$(SRCDIR)/th.h
0c50: 22 0a 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20  ".append mhargs 
0c60: 22 20 56 45 52 53 49 4f 4e 2e 68 22 0a 70 75 74  " VERSION.h".put
0c70: 73 20 22 70 61 67 65 5f 69 6e 64 65 78 2e 68 3a  s "page_index.h:
0c80: 20 5c 24 28 54 52 41 4e 53 5f 53 52 43 29 20 6d   \$(TRANS_SRC) m
0c90: 6b 69 6e 64 65 78 22 0a 70 75 74 73 20 22 5c 74  kindex".puts "\t
0ca0: 2e 2f 6d 6b 69 6e 64 65 78 20 5c 24 28 54 52 41  ./mkindex \$(TRA
0cb0: 4e 53 5f 53 52 43 29 20 3e 24 40 22 0a 70 75 74  NS_SRC) >$@".put
0cc0: 73 20 22 68 65 61 64 65 72 73 3a 5c 74 70 61 67  s "headers:\tpag
0cd0: 65 5f 69 6e 64 65 78 2e 68 20 6d 61 6b 65 68 65  e_index.h makehe
0ce0: 61 64 65 72 73 20 56 45 52 53 49 4f 4e 2e 68 22  aders VERSION.h"
0cf0: 0a 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b 65 68  .puts "\t./makeh
0d00: 65 61 64 65 72 73 20 24 6d 68 61 72 67 73 22 0a  eaders $mhargs".
0d10: 70 75 74 73 20 22 5c 74 74 6f 75 63 68 20 68 65  puts "\ttouch he
0d20: 61 64 65 72 73 22 0a 70 75 74 73 20 22 68 65 61  aders".puts "hea
0d30: 64 65 72 73 3a 20 4d 61 6b 65 66 69 6c 65 22 0a  ders: Makefile".
0d40: 70 75 74 73 20 22 4d 61 6b 65 66 69 6c 65 3a 22  puts "Makefile:"
0d50: 0a 73 65 74 20 65 78 74 72 61 5f 68 28 6d 61 69  .set extra_h(mai
0d60: 6e 29 20 70 61 67 65 5f 69 6e 64 65 78 2e 68 0a  n) page_index.h.
0d70: 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72  .foreach s [lsor
0d80: 74 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 74 73  t $src] {.  puts
0d90: 20 22 24 7b 73 7d 5f 2e 63 3a 5c 74 5c 24 28 53   "${s}_.c:\t\$(S
0da0: 52 43 44 49 52 29 2f 24 73 2e 63 20 74 72 61 6e  RCDIR)/$s.c tran
0db0: 73 6c 61 74 65 22 0a 20 20 70 75 74 73 20 22 5c  slate".  puts "\
0dc0: 74 2e 2f 74 72 61 6e 73 6c 61 74 65 20 5c 24 28  t./translate \$(
0dd0: 53 52 43 44 49 52 29 2f 24 73 2e 63 20 3e 24 7b  SRCDIR)/$s.c >${
0de0: 73 7d 5f 2e 63 5c 6e 22 0a 20 20 70 75 74 73 20  s}_.c\n".  puts 
0df0: 22 24 73 2e 6f 3a 5c 74 24 7b 73 7d 5f 2e 63 20  "$s.o:\t${s}_.c 
0e00: 24 73 2e 68 20 24 65 78 74 72 61 5f 68 28 24 73  $s.h $extra_h($s
0e10: 29 20 5c 24 28 53 52 43 44 49 52 29 2f 63 6f 6e  ) \$(SRCDIR)/con
0e20: 66 69 67 2e 68 22 0a 20 20 70 75 74 73 20 22 5c  fig.h".  puts "\
0e30: 74 5c 24 28 58 54 43 43 29 20 2d 6f 20 24 73 2e  t\$(XTCC) -o $s.
0e40: 6f 20 2d 63 20 24 7b 73 7d 5f 2e 63 5c 6e 22 0a  o -c ${s}_.c\n".
0e50: 20 20 70 75 74 73 20 22 24 73 2e 68 3a 5c 74 68    puts "$s.h:\th
0e60: 65 61 64 65 72 73 22 0a 23 20 20 70 75 74 73 20  eaders".#  puts 
0e70: 22 5c 74 2e 2f 6d 61 6b 65 68 65 61 64 65 72 73  "\t./makeheaders
0e80: 20 24 6d 68 61 72 67 73 5c 6e 5c 74 74 6f 75 63   $mhargs\n\ttouc
0e90: 68 20 68 65 61 64 65 72 73 5c 6e 22 0a 23 20 20  h headers\n".#  
0ea0: 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b 65 68 65  puts "\t./makehe
0eb0: 61 64 65 72 73 20 24 7b 73 7d 5f 2e 63 3a 24 7b  aders ${s}_.c:${
0ec0: 73 7d 2e 68 5c 6e 22 0a 7d 0a 0a 0a 70 75 74 73  s}.h\n".}...puts
0ed0: 20 22 73 71 6c 69 74 65 33 2e 6f 3a 5c 74 5c 24   "sqlite3.o:\t\$
0ee0: 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33  (SRCDIR)/sqlite3
0ef0: 2e 63 22 0a 73 65 74 20 6f 70 74 20 7b 2d 44 53  .c".set opt {-DS
0f00: 51 4c 49 54 45 5f 4f 4d 49 54 5f 4c 4f 41 44 5f  QLITE_OMIT_LOAD_
0f10: 45 58 54 45 4e 53 49 4f 4e 3d 31 7d 0a 61 70 70  EXTENSION=1}.app
0f20: 65 6e 64 20 6f 70 74 20 22 20 2d 44 53 51 4c 49  end opt " -DSQLI
0f30: 54 45 5f 54 48 52 45 41 44 53 41 46 45 3d 30 20  TE_THREADSAFE=0 
0f40: 2d 44 53 51 4c 49 54 45 5f 44 45 46 41 55 4c 54  -DSQLITE_DEFAULT
0f50: 5f 46 49 4c 45 5f 46 4f 52 4d 41 54 3d 34 22 0a  _FILE_FORMAT=4".
0f60: 23 61 70 70 65 6e 64 20 6f 70 74 20 22 20 2d 44  #append opt " -D
0f70: 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45 5f 46 54  SQLITE_ENABLE_FT
0f80: 53 33 3d 31 22 0a 61 70 70 65 6e 64 20 6f 70 74  S3=1".append opt
0f90: 20 22 20 2d 44 6c 6f 63 61 6c 74 69 6d 65 3d 66   " -Dlocaltime=f
0fa0: 6f 73 73 69 6c 5f 6c 6f 63 61 6c 74 69 6d 65 22  ossil_localtime"
0fb0: 0a 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 43  .puts "\t\$(XTCC
0fc0: 29 20 24 6f 70 74 20 2d 63 20 5c 24 28 53 52 43  ) $opt -c \$(SRC
0fd0: 44 49 52 29 2f 73 71 6c 69 74 65 33 2e 63 20 2d  DIR)/sqlite3.c -
0fe0: 6f 20 73 71 6c 69 74 65 33 2e 6f 5c 6e 22 0a 0a  o sqlite3.o\n"..
0ff0: 70 75 74 73 20 22 74 68 2e 6f 3a 5c 74 5c 24 28  puts "th.o:\t\$(
1000: 53 52 43 44 49 52 29 2f 74 68 2e 63 22 0a 70 75  SRCDIR)/th.c".pu
1010: 74 73 20 22 5c 74 5c 24 28 58 54 43 43 29 20 2d  ts "\t\$(XTCC) -
1020: 49 5c 24 28 53 52 43 44 49 52 29 20 2d 63 20 5c  I\$(SRCDIR) -c \
1030: 24 28 53 52 43 44 49 52 29 2f 74 68 2e 63 20 2d  $(SRCDIR)/th.c -
1040: 6f 20 74 68 2e 6f 5c 6e 22 0a 0a 70 75 74 73 20  o th.o\n"..puts 
1050: 22 74 68 5f 6c 61 6e 67 2e 6f 3a 5c 74 5c 24 28  "th_lang.o:\t\$(
1060: 53 52 43 44 49 52 29 2f 74 68 5f 6c 61 6e 67 2e  SRCDIR)/th_lang.
1070: 63 22 0a 70 75 74 73 20 22 5c 74 5c 24 28 58 54  c".puts "\t\$(XT
1080: 43 43 29 20 2d 49 5c 24 28 53 52 43 44 49 52 29  CC) -I\$(SRCDIR)
1090: 20 2d 63 20 5c 24 28 53 52 43 44 49 52 29 2f 74   -c \$(SRCDIR)/t
10a0: 68 5f 6c 61 6e 67 2e 63 20 2d 6f 20 74 68 5f 6c  h_lang.c -o th_l
10b0: 61 6e 67 2e 6f 5c 6e 22 0a                       ang.o\n".