Hex Artifact Content
Not logged in

Artifact 263645557b303818d39c662d6b8682a40b46f425:

File src/makemake.tcl part of check-in [737e76a69f] - Refactor the HTTP client logic to make it much easier to add support for "file:" and "https:" URLs on push, pull, sync, and clone. by drh on 2009-03-30 00:31:56.

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 61 6c 6c 72 65 70 6f 0a  admin.  allrepo.
00d0: 20 20 62 61 67 0a 20 20 62 6c 6f 62 0a 20 20 62    bag.  blob.  b
00e0: 72 61 6e 63 68 0a 20 20 62 72 6f 77 73 65 0a 20  ranch.  browse. 
00f0: 20 63 67 69 0a 20 20 63 68 65 63 6b 69 6e 0a 20   cgi.  checkin. 
0100: 20 63 68 65 63 6b 6f 75 74 0a 20 20 63 6c 65 61   checkout.  clea
0110: 72 73 69 67 6e 0a 20 20 63 6c 6f 6e 65 0a 20 20  rsign.  clone.  
0120: 63 6f 6d 66 6f 72 6d 61 74 0a 20 20 63 6f 6e 66  comformat.  conf
0130: 69 67 75 72 65 0a 20 20 63 6f 6e 73 74 72 75 63  igure.  construc
0140: 74 0a 20 20 63 6f 6e 74 65 6e 74 0a 20 20 64 62  t.  content.  db
0150: 0a 20 20 64 65 6c 74 61 0a 20 20 64 65 6c 74 61  .  delta.  delta
0160: 63 6d 64 0a 20 20 64 65 73 63 65 6e 64 61 6e 74  cmd.  descendant
0170: 73 0a 20 20 64 69 66 66 0a 20 20 64 69 66 66 63  s.  diff.  diffc
0180: 6d 64 0a 20 20 64 6f 63 0a 20 20 65 6e 63 6f 64  md.  doc.  encod
0190: 65 0a 20 20 66 69 6c 65 0a 20 20 68 74 74 70 0a  e.  file.  http.
01a0: 20 20 68 74 74 70 5f 73 6f 63 6b 65 74 0a 20 20    http_socket.  
01b0: 68 74 74 70 5f 74 72 61 6e 73 70 6f 72 74 0a 20  http_transport. 
01c0: 20 69 6e 66 6f 0a 20 20 6c 6f 67 69 6e 0a 20 20   info.  login.  
01d0: 6d 61 69 6e 0a 20 20 6d 61 6e 69 66 65 73 74 0a  main.  manifest.
01e0: 20 20 6d 64 35 0a 20 20 6d 65 72 67 65 0a 20 20    md5.  merge.  
01f0: 6d 65 72 67 65 33 0a 20 20 6d 79 5f 70 61 67 65  merge3.  my_page
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 74 75 70 0a 20 20 73 68 61 31 0a 20 20 73 68  etup.  sha1.  sh
0260: 75 6e 0a 20 20 73 74 61 74 0a 20 20 73 74 79 6c  un.  stat.  styl
0270: 65 0a 20 20 73 79 6e 63 0a 20 20 74 61 67 0a 20  e.  sync.  tag. 
0280: 20 74 61 67 76 69 65 77 0a 20 20 74 68 5f 6d 61   tagview.  th_ma
0290: 69 6e 0a 20 20 74 69 6d 65 6c 69 6e 65 0a 20 20  in.  timeline.  
02a0: 74 6b 74 0a 20 20 74 6b 74 73 65 74 75 70 0a 20  tkt.  tktsetup. 
02b0: 20 75 6e 64 6f 0a 20 20 75 70 64 61 74 65 0a 20   undo.  update. 
02c0: 20 75 72 6c 0a 20 20 75 73 65 72 0a 20 20 76 65   url.  user.  ve
02d0: 72 69 66 79 0a 20 20 76 66 69 6c 65 0a 20 20 77  rify.  vfile.  w
02e0: 69 6b 69 0a 20 20 77 69 6b 69 66 6f 72 6d 61 74  iki.  wikiformat
02f0: 0a 20 20 77 69 6e 68 74 74 70 0a 20 20 78 66 65  .  winhttp.  xfe
0300: 72 0a 20 20 7a 69 70 0a 7d 0a 0a 23 20 4e 61 6d  r.  zip.}..# Nam
0310: 65 20 6f 66 20 74 68 65 20 66 69 6e 61 6c 20 61  e of the final a
0320: 70 70 6c 69 63 61 74 69 6f 6e 0a 23 0a 73 65 74  pplication.#.set
0330: 20 6e 61 6d 65 20 66 6f 73 73 69 6c 0a 0a 70 75   name fossil..pu
0340: 74 73 20 7b 23 20 44 4f 20 4e 4f 54 20 45 44 49  ts {# DO NOT EDI
0350: 54 0a 23 0a 23 20 54 68 69 73 20 66 69 6c 65 20  T.#.# This file 
0360: 69 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79  is automatically
0370: 20 67 65 6e 65 72 61 74 65 64 2e 20 20 49 6e 73   generated.  Ins
0380: 74 65 61 64 20 6f 66 20 65 64 69 74 69 6e 67 20  tead of editing 
0390: 74 68 69 73 0a 23 20 66 69 6c 65 2c 20 65 64 69  this.# file, edi
03a0: 74 20 22 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 22  t "makemake.tcl"
03b0: 20 74 68 65 6e 20 72 75 6e 20 22 74 63 6c 73 68   then run "tclsh
03c0: 20 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 20 3e 6d   makemake.tcl >m
03d0: 61 69 6e 2e 6d 6b 22 0a 23 20 74 6f 20 72 65 67  ain.mk".# to reg
03e0: 65 6e 65 72 61 74 65 20 74 68 69 73 20 66 69 6c  enerate this fil
03f0: 65 2e 0a 23 0a 23 20 54 68 69 73 20 66 69 6c 65  e..#.# This file
0400: 20 69 73 20 69 6e 63 6c 75 64 65 64 20 62 79 20   is included by 
0410: 6c 69 6e 75 78 2d 67 63 63 2e 6d 6b 20 6f 72 20  linux-gcc.mk or 
0420: 6c 69 6e 75 78 2d 6d 69 6e 67 77 2e 6d 6b 20 6f  linux-mingw.mk o
0430: 72 20 70 6f 73 73 69 62 6c 65 0a 23 20 73 6f 6d  r possible.# som
0440: 65 20 6f 74 68 65 72 20 6d 61 6b 65 66 69 6c 65  e other makefile
0450: 73 2e 20 20 54 68 69 73 20 66 69 6c 65 20 63 6f  s.  This file co
0460: 6e 74 61 69 6e 73 20 74 68 65 20 72 75 6c 65 73  ntains the rules
0470: 20 74 68 61 74 20 61 72 65 20 63 6f 6d 6d 6f 6e   that are common
0480: 0a 23 20 74 6f 20 62 75 69 6c 64 69 6e 67 20 72  .# to building r
0490: 65 67 61 72 64 6c 65 73 73 20 6f 66 20 74 68 65  egardless of the
04a0: 20 74 61 72 67 65 74 2e 0a 23 0a 0a 58 54 43 43   target..#..XTCC
04b0: 20 3d 20 24 28 54 43 43 29 20 24 28 43 46 4c 41   = $(TCC) $(CFLA
04c0: 47 53 29 20 2d 49 2e 20 2d 49 24 28 53 52 43 44  GS) -I. -I$(SRCD
04d0: 49 52 29 0a 0a 7d 0a 70 75 74 73 20 2d 6e 6f 6e  IR)..}.puts -non
04e0: 65 77 6c 69 6e 65 20 22 53 52 43 20 3d 22 0a 66  ewline "SRC =".f
04f0: 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20  oreach s [lsort 
0500: 24 73 72 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d  $src] {.  puts -
0510: 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e  nonewline " \\\n
0520: 20 20 5c 24 28 53 52 43 44 49 52 29 2f 24 73 2e    \$(SRCDIR)/$s.
0530: 63 22 0a 7d 0a 70 75 74 73 20 22 5c 6e 22 0a 70  c".}.puts "\n".p
0540: 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  uts -nonewline "
0550: 54 52 41 4e 53 5f 53 52 43 20 3d 22 0a 66 6f 72  TRANS_SRC =".for
0560: 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73  each s [lsort $s
0570: 72 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f  rc] {.  puts -no
0580: 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20  newline " \\\n  
0590: 24 7b 73 7d 5f 2e 63 22 0a 7d 0a 70 75 74 73 20  ${s}_.c".}.puts 
05a0: 22 5c 6e 22 0a 70 75 74 73 20 2d 6e 6f 6e 65 77  "\n".puts -nonew
05b0: 6c 69 6e 65 20 22 4f 42 4a 20 3d 22 0a 66 6f 72  line "OBJ =".for
05c0: 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73  each s [lsort $s
05d0: 72 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f  rc] {.  puts -no
05e0: 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20  newline " \\\n  
05f0: 24 73 2e 6f 22 0a 7d 0a 70 75 74 73 20 22 5c 6e  $s.o".}.puts "\n
0600: 22 0a 70 75 74 73 20 22 41 50 50 4e 41 4d 45 20  ".puts "APPNAME 
0610: 3d 20 24 6e 61 6d 65 5c 24 28 45 29 22 0a 70 75  = $name\$(E)".pu
0620: 74 73 20 22 5c 6e 22 0a 0a 70 75 74 73 20 7b 0a  ts "\n"..puts {.
0630: 61 6c 6c 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a  all:.$(APPNAME).
0640: 0a 69 6e 73 74 61 6c 6c 3a 09 24 28 41 50 50 4e  .install:.$(APPN
0650: 41 4d 45 29 0a 09 6d 76 20 24 28 41 50 50 4e 41  AME)..mv $(APPNA
0660: 4d 45 29 20 24 28 49 4e 53 54 41 4c 4c 44 49 52  ME) $(INSTALLDIR
0670: 29 0a 0a 74 72 61 6e 73 6c 61 74 65 3a 09 24 28  )..translate:.$(
0680: 53 52 43 44 49 52 29 2f 74 72 61 6e 73 6c 61 74  SRCDIR)/translat
0690: 65 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f 20 74  e.c..$(BCC) -o t
06a0: 72 61 6e 73 6c 61 74 65 20 24 28 53 52 43 44 49  ranslate $(SRCDI
06b0: 52 29 2f 74 72 61 6e 73 6c 61 74 65 2e 63 0a 0a  R)/translate.c..
06c0: 6d 61 6b 65 68 65 61 64 65 72 73 3a 09 24 28 53  makeheaders:.$(S
06d0: 52 43 44 49 52 29 2f 6d 61 6b 65 68 65 61 64 65  RCDIR)/makeheade
06e0: 72 73 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f 20  rs.c..$(BCC) -o 
06f0: 6d 61 6b 65 68 65 61 64 65 72 73 20 24 28 53 52  makeheaders $(SR
0700: 43 44 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72  CDIR)/makeheader
0710: 73 2e 63 0a 0a 6d 6b 69 6e 64 65 78 3a 09 24 28  s.c..mkindex:.$(
0720: 53 52 43 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e  SRCDIR)/mkindex.
0730: 63 0a 09 24 28 42 43 43 29 20 2d 6f 20 6d 6b 69  c..$(BCC) -o mki
0740: 6e 64 65 78 20 24 28 53 52 43 44 49 52 29 2f 6d  ndex $(SRCDIR)/m
0750: 6b 69 6e 64 65 78 2e 63 0a 0a 23 20 57 41 52 4e  kindex.c..# WARN
0760: 49 4e 47 2e 20 44 41 4e 47 45 52 2e 20 52 75 6e  ING. DANGER. Run
0770: 6e 69 6e 67 20 74 68 65 20 74 65 73 74 73 75 69  ning the testsui
0780: 74 65 20 6d 6f 64 69 66 69 65 73 20 74 68 65 20  te modifies the 
0790: 72 65 70 6f 73 69 74 6f 72 79 20 74 68 65 0a 23  repository the.#
07a0: 20 62 75 69 6c 64 20 69 73 20 64 6f 6e 65 20 66   build is done f
07b0: 72 6f 6d 2c 20 69 2e 65 2e 20 74 68 65 20 63 68  rom, i.e. the ch
07c0: 65 63 6b 6f 75 74 20 62 65 6c 6f 6e 67 73 20 74  eckout belongs t
07d0: 6f 2e 20 44 6f 20 6e 6f 74 20 73 79 6e 63 2f 70  o. Do not sync/p
07e0: 75 73 68 0a 23 20 74 68 65 20 72 65 70 6f 73 69  ush.# the reposi
07f0: 74 6f 72 79 20 61 66 74 65 72 20 72 75 6e 6e 69  tory after runni
0800: 6e 67 20 74 68 65 20 74 65 73 74 73 2e 0a 74 65  ng the tests..te
0810: 73 74 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a 09  st:.$(APPNAME)..
0820: 24 28 54 43 4c 53 48 29 20 74 65 73 74 2f 74 65  $(TCLSH) test/te
0830: 73 74 65 72 2e 74 63 6c 20 24 28 41 50 50 4e 41  ster.tcl $(APPNA
0840: 4d 45 29 0a 0a 56 45 52 53 49 4f 4e 2e 68 3a 09  ME)..VERSION.h:.
0850: 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e  $(SRCDIR)/../man
0860: 69 66 65 73 74 2e 75 75 69 64 20 24 28 53 52 43  ifest.uuid $(SRC
0870: 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74  DIR)/../manifest
0880: 0a 09 61 77 6b 20 27 7b 20 70 72 69 6e 74 66 20  ..awk '{ printf 
0890: 22 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53  "#define MANIFES
08a0: 54 5f 55 55 49 44 20 5c 22 25 73 5c 22 5c 6e 22  T_UUID \"%s\"\n"
08b0: 2c 20 24 24 31 7d 27 20 5c 0a 09 09 24 28 53 52  , $$1}' \...$(SR
08c0: 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73  CDIR)/../manifes
08d0: 74 2e 75 75 69 64 20 3e 56 45 52 53 49 4f 4e 2e  t.uuid >VERSION.
08e0: 68 0a 09 61 77 6b 20 27 7b 20 70 72 69 6e 74 66  h..awk '{ printf
08f0: 20 22 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45   "#define MANIFE
0900: 53 54 5f 56 45 52 53 49 4f 4e 20 5c 22 5b 25 2e  ST_VERSION \"[%.
0910: 31 30 73 5d 5c 22 5c 6e 22 2c 20 24 24 31 7d 27  10s]\"\n", $$1}'
0920: 20 5c 0a 09 09 24 28 53 52 43 44 49 52 29 2f 2e   \...$(SRCDIR)/.
0930: 2e 2f 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20  ./manifest.uuid 
0940: 3e 3e 56 45 52 53 49 4f 4e 2e 68 0a 09 61 77 6b  >>VERSION.h..awk
0950: 20 27 24 24 31 3d 3d 22 44 22 7b 70 72 69 6e 74   '$$1=="D"{print
0960: 66 20 22 23 64 65 66 69 6e 65 20 4d 41 4e 49 46  f "#define MANIF
0970: 45 53 54 5f 44 41 54 45 20 5c 22 25 73 20 25 73  EST_DATE \"%s %s
0980: 5c 22 5c 6e 22 2c 5c 0a 09 09 73 75 62 73 74 72  \"\n",\...substr
0990: 28 24 24 32 2c 31 2c 31 30 29 2c 73 75 62 73 74  ($$2,1,10),subst
09a0: 72 28 24 24 32 2c 31 32 29 7d 27 20 5c 0a 09 09  r($$2,12)}' \...
09b0: 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e  $(SRCDIR)/../man
09c0: 69 66 65 73 74 20 3e 3e 56 45 52 53 49 4f 4e 2e  ifest >>VERSION.
09d0: 68 0a 0a 24 28 41 50 50 4e 41 4d 45 29 3a 09 68  h..$(APPNAME):.h
09e0: 65 61 64 65 72 73 20 24 28 4f 42 4a 29 20 73 71  eaders $(OBJ) sq
09f0: 6c 69 74 65 33 2e 6f 20 74 68 2e 6f 20 74 68 5f  lite3.o th.o th_
0a00: 6c 61 6e 67 2e 6f 0a 09 24 28 54 43 43 29 20 2d  lang.o..$(TCC) -
0a10: 6f 20 24 28 41 50 50 4e 41 4d 45 29 20 24 28 4f  o $(APPNAME) $(O
0a20: 42 4a 29 20 73 71 6c 69 74 65 33 2e 6f 20 74 68  BJ) sqlite3.o th
0a30: 2e 6f 20 74 68 5f 6c 61 6e 67 2e 6f 20 24 28 4c  .o th_lang.o $(L
0a40: 49 42 29 0a 0a 23 20 54 68 69 73 20 72 75 6c 65  IB)..# This rule
0a50: 20 70 72 65 76 65 6e 74 73 20 6d 61 6b 65 20 66   prevents make f
0a60: 72 6f 6d 20 75 73 69 6e 67 20 69 74 73 20 64 65  rom using its de
0a70: 66 61 75 6c 74 20 72 75 6c 65 73 20 74 6f 20 74  fault rules to t
0a80: 72 79 20 62 75 69 6c 64 0a 23 20 61 6e 20 65 78  ry build.# an ex
0a90: 65 63 75 74 61 62 6c 65 20 6e 61 6d 65 64 20 22  ecutable named "
0aa0: 6d 61 6e 69 66 65 73 74 22 20 6f 75 74 20 6f 66  manifest" out of
0ab0: 20 74 68 65 20 66 69 6c 65 20 6e 61 6d 65 64 20   the file named 
0ac0: 22 6d 61 6e 69 66 65 73 74 2e 63 22 0a 23 0a 24  "manifest.c".#.$
0ad0: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69  (SRCDIR)/../mani
0ae0: 66 65 73 74 3a 09 0a 09 23 20 6e 6f 6f 70 0a 0a  fest:...# noop..
0af0: 63 6c 65 61 6e 3a 09 0a 09 72 6d 20 2d 66 20 2a  clean:...rm -f *
0b00: 2e 6f 20 2a 5f 2e 63 20 24 28 41 50 50 4e 41 4d  .o *_.c $(APPNAM
0b10: 45 29 20 56 45 52 53 49 4f 4e 2e 68 0a 09 72 6d  E) VERSION.h..rm
0b20: 20 2d 66 20 74 72 61 6e 73 6c 61 74 65 20 6d 61   -f translate ma
0b30: 6b 65 68 65 61 64 65 72 73 20 6d 6b 69 6e 64 65  keheaders mkinde
0b40: 78 20 70 61 67 65 5f 69 6e 64 65 78 2e 68 20 68  x page_index.h h
0b50: 65 61 64 65 72 73 7d 0a 0a 73 65 74 20 68 66 69  eaders}..set hfi
0b60: 6c 65 73 20 7b 7d 0a 66 6f 72 65 61 63 68 20 73  les {}.foreach s
0b70: 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 6c   [lsort $src] {l
0b80: 61 70 70 65 6e 64 20 68 66 69 6c 65 73 20 24 73  append hfiles $s
0b90: 2e 68 7d 0a 70 75 74 73 20 22 5c 74 72 6d 20 2d  .h}.puts "\trm -
0ba0: 66 20 24 68 66 69 6c 65 73 5c 6e 22 0a 0a 73 65  f $hfiles\n"..se
0bb0: 74 20 6d 68 61 72 67 73 20 7b 7d 0a 66 6f 72 65  t mhargs {}.fore
0bc0: 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72  ach s [lsort $sr
0bd0: 63 5d 20 7b 0a 20 20 61 70 70 65 6e 64 20 6d 68  c] {.  append mh
0be0: 61 72 67 73 20 22 20 24 7b 73 7d 5f 2e 63 3a 24  args " ${s}_.c:$
0bf0: 73 2e 68 22 0a 20 20 73 65 74 20 65 78 74 72 61  s.h".  set extra
0c00: 5f 68 28 24 73 29 20 7b 7d 0a 7d 0a 61 70 70 65  _h($s) {}.}.appe
0c10: 6e 64 20 6d 68 61 72 67 73 20 22 20 5c 24 28 53  nd mhargs " \$(S
0c20: 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33 2e 68  RCDIR)/sqlite3.h
0c30: 22 0a 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20  ".append mhargs 
0c40: 22 20 5c 24 28 53 52 43 44 49 52 29 2f 74 68 2e  " \$(SRCDIR)/th.
0c50: 68 22 0a 61 70 70 65 6e 64 20 6d 68 61 72 67 73  h".append mhargs
0c60: 20 22 20 56 45 52 53 49 4f 4e 2e 68 22 0a 70 75   " VERSION.h".pu
0c70: 74 73 20 22 70 61 67 65 5f 69 6e 64 65 78 2e 68  ts "page_index.h
0c80: 3a 20 5c 24 28 54 52 41 4e 53 5f 53 52 43 29 20  : \$(TRANS_SRC) 
0c90: 6d 6b 69 6e 64 65 78 22 0a 70 75 74 73 20 22 5c  mkindex".puts "\
0ca0: 74 2e 2f 6d 6b 69 6e 64 65 78 20 5c 24 28 54 52  t./mkindex \$(TR
0cb0: 41 4e 53 5f 53 52 43 29 20 3e 24 40 22 0a 70 75  ANS_SRC) >$@".pu
0cc0: 74 73 20 22 68 65 61 64 65 72 73 3a 5c 74 70 61  ts "headers:\tpa
0cd0: 67 65 5f 69 6e 64 65 78 2e 68 20 6d 61 6b 65 68  ge_index.h makeh
0ce0: 65 61 64 65 72 73 20 56 45 52 53 49 4f 4e 2e 68  eaders VERSION.h
0cf0: 22 0a 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b 65  ".puts "\t./make
0d00: 68 65 61 64 65 72 73 20 24 6d 68 61 72 67 73 22  headers $mhargs"
0d10: 0a 70 75 74 73 20 22 5c 74 74 6f 75 63 68 20 68  .puts "\ttouch h
0d20: 65 61 64 65 72 73 22 0a 70 75 74 73 20 22 68 65  eaders".puts "he
0d30: 61 64 65 72 73 3a 20 4d 61 6b 65 66 69 6c 65 22  aders: Makefile"
0d40: 0a 70 75 74 73 20 22 4d 61 6b 65 66 69 6c 65 3a  .puts "Makefile:
0d50: 22 0a 73 65 74 20 65 78 74 72 61 5f 68 28 6d 61  ".set extra_h(ma
0d60: 69 6e 29 20 70 61 67 65 5f 69 6e 64 65 78 2e 68  in) page_index.h
0d70: 0a 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f  ..foreach s [lso
0d80: 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 74  rt $src] {.  put
0d90: 73 20 22 24 7b 73 7d 5f 2e 63 3a 5c 74 5c 24 28  s "${s}_.c:\t\$(
0da0: 53 52 43 44 49 52 29 2f 24 73 2e 63 20 5c 24 28  SRCDIR)/$s.c \$(
0db0: 53 52 43 44 49 52 29 2f 56 45 52 53 49 4f 4e 20  SRCDIR)/VERSION 
0dc0: 74 72 61 6e 73 6c 61 74 65 22 0a 20 20 70 75 74  translate".  put
0dd0: 73 20 22 5c 74 2e 2f 74 72 61 6e 73 6c 61 74 65  s "\t./translate
0de0: 20 5c 24 28 53 52 43 44 49 52 29 2f 24 73 2e 63   \$(SRCDIR)/$s.c
0df0: 20 7c 20 73 65 64 20 2d 66 20 5c 24 28 53 52 43   | sed -f \$(SRC
0e00: 44 49 52 29 2f 56 45 52 53 49 4f 4e 20 3e 24 7b  DIR)/VERSION >${
0e10: 73 7d 5f 2e 63 5c 6e 22 0a 20 20 70 75 74 73 20  s}_.c\n".  puts 
0e20: 22 24 73 2e 6f 3a 5c 74 24 7b 73 7d 5f 2e 63 20  "$s.o:\t${s}_.c 
0e30: 24 73 2e 68 20 24 65 78 74 72 61 5f 68 28 24 73  $s.h $extra_h($s
0e40: 29 20 5c 24 28 53 52 43 44 49 52 29 2f 63 6f 6e  ) \$(SRCDIR)/con
0e50: 66 69 67 2e 68 22 0a 20 20 70 75 74 73 20 22 5c  fig.h".  puts "\
0e60: 74 5c 24 28 58 54 43 43 29 20 2d 6f 20 24 73 2e  t\$(XTCC) -o $s.
0e70: 6f 20 2d 63 20 24 7b 73 7d 5f 2e 63 5c 6e 22 0a  o -c ${s}_.c\n".
0e80: 20 20 70 75 74 73 20 22 24 73 2e 68 3a 5c 74 68    puts "$s.h:\th
0e90: 65 61 64 65 72 73 22 0a 23 20 20 70 75 74 73 20  eaders".#  puts 
0ea0: 22 5c 74 2e 2f 6d 61 6b 65 68 65 61 64 65 72 73  "\t./makeheaders
0eb0: 20 24 6d 68 61 72 67 73 5c 6e 5c 74 74 6f 75 63   $mhargs\n\ttouc
0ec0: 68 20 68 65 61 64 65 72 73 5c 6e 22 0a 23 20 20  h headers\n".#  
0ed0: 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b 65 68 65  puts "\t./makehe
0ee0: 61 64 65 72 73 20 24 7b 73 7d 5f 2e 63 3a 24 7b  aders ${s}_.c:${
0ef0: 73 7d 2e 68 5c 6e 22 0a 7d 0a 0a 0a 70 75 74 73  s}.h\n".}...puts
0f00: 20 22 73 71 6c 69 74 65 33 2e 6f 3a 5c 74 5c 24   "sqlite3.o:\t\$
0f10: 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33  (SRCDIR)/sqlite3
0f20: 2e 63 22 0a 73 65 74 20 6f 70 74 20 7b 2d 44 53  .c".set opt {-DS
0f30: 51 4c 49 54 45 5f 4f 4d 49 54 5f 4c 4f 41 44 5f  QLITE_OMIT_LOAD_
0f40: 45 58 54 45 4e 53 49 4f 4e 3d 31 20 2d 44 53 51  EXTENSION=1 -DSQ
0f50: 4c 49 54 45 5f 50 52 49 56 41 54 45 3d 7d 0a 61  LITE_PRIVATE=}.a
0f60: 70 70 65 6e 64 20 6f 70 74 20 22 20 2d 44 53 51  ppend opt " -DSQ
0f70: 4c 49 54 45 5f 54 48 52 45 41 44 53 41 46 45 3d  LITE_THREADSAFE=
0f80: 30 20 2d 44 53 51 4c 49 54 45 5f 44 45 46 41 55  0 -DSQLITE_DEFAU
0f90: 4c 54 5f 46 49 4c 45 5f 46 4f 52 4d 41 54 3d 34  LT_FILE_FORMAT=4
0fa0: 22 0a 61 70 70 65 6e 64 20 6f 70 74 20 22 20 2d  ".append opt " -
0fb0: 44 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45 5f 46  DSQLITE_ENABLE_F
0fc0: 54 53 33 3d 31 20 2d 44 6c 6f 63 61 6c 74 69 6d  TS3=1 -Dlocaltim
0fd0: 65 3d 66 6f 73 73 69 6c 5f 6c 6f 63 61 6c 74 69  e=fossil_localti
0fe0: 6d 65 22 0a 70 75 74 73 20 22 5c 74 5c 24 28 58  me".puts "\t\$(X
0ff0: 54 43 43 29 20 24 6f 70 74 20 2d 63 20 5c 24 28  TCC) $opt -c \$(
1000: 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33 2e  SRCDIR)/sqlite3.
1010: 63 20 2d 6f 20 73 71 6c 69 74 65 33 2e 6f 5c 6e  c -o sqlite3.o\n
1020: 22 0a 0a 70 75 74 73 20 22 74 68 2e 6f 3a 5c 74  "..puts "th.o:\t
1030: 5c 24 28 53 52 43 44 49 52 29 2f 74 68 2e 63 22  \$(SRCDIR)/th.c"
1040: 0a 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 43  .puts "\t\$(XTCC
1050: 29 20 2d 49 5c 24 28 53 52 43 44 49 52 29 20 2d  ) -I\$(SRCDIR) -
1060: 63 20 5c 24 28 53 52 43 44 49 52 29 2f 74 68 2e  c \$(SRCDIR)/th.
1070: 63 20 2d 6f 20 74 68 2e 6f 5c 6e 22 0a 0a 70 75  c -o th.o\n"..pu
1080: 74 73 20 22 74 68 5f 6c 61 6e 67 2e 6f 3a 5c 74  ts "th_lang.o:\t
1090: 5c 24 28 53 52 43 44 49 52 29 2f 74 68 5f 6c 61  \$(SRCDIR)/th_la
10a0: 6e 67 2e 63 22 0a 70 75 74 73 20 22 5c 74 5c 24  ng.c".puts "\t\$
10b0: 28 58 54 43 43 29 20 2d 49 5c 24 28 53 52 43 44  (XTCC) -I\$(SRCD
10c0: 49 52 29 20 2d 63 20 5c 24 28 53 52 43 44 49 52  IR) -c \$(SRCDIR
10d0: 29 2f 74 68 5f 6c 61 6e 67 2e 63 20 2d 6f 20 74  )/th_lang.c -o t
10e0: 68 5f 6c 61 6e 67 2e 6f 5c 6e 22 0a              h_lang.o\n".