Hex Artifact Content
Not logged in

Artifact 69c89366448d87596688cbf6a64d663b3af658d6:

File src/makemake.tcl part of check-in [5cf1206dfa] - Separate the new /doc method out into its own source file. by drh on 2008-05-15 20:18:32.

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 73 73 0a 20 20 73  ebuild.  rss.  s
0200: 63 68 65 6d 61 0a 20 20 73 65 74 75 70 0a 20 20  chema.  setup.  
0210: 73 68 61 31 0a 20 20 73 74 61 74 0a 20 20 73 74  sha1.  stat.  st
0220: 79 6c 65 0a 20 20 73 79 6e 63 0a 20 20 74 61 67  yle.  sync.  tag
0230: 0a 20 20 74 61 67 76 69 65 77 0a 20 20 74 68 5f  .  tagview.  th_
0240: 6d 61 69 6e 0a 20 20 74 69 6d 65 6c 69 6e 65 0a  main.  timeline.
0250: 20 20 74 6b 74 0a 20 20 74 6b 74 63 6f 6e 66 69    tkt.  tktconfi
0260: 67 0a 20 20 74 6b 74 73 65 74 75 70 0a 20 20 75  g.  tktsetup.  u
0270: 6e 64 6f 0a 20 20 75 70 64 61 74 65 0a 20 20 75  ndo.  update.  u
0280: 72 6c 0a 20 20 75 73 65 72 0a 20 20 76 65 72 69  rl.  user.  veri
0290: 66 79 0a 20 20 76 66 69 6c 65 0a 20 20 77 69 6b  fy.  vfile.  wik
02a0: 69 0a 20 20 77 69 6b 69 66 6f 72 6d 61 74 0a 20  i.  wikiformat. 
02b0: 20 78 66 65 72 0a 20 20 7a 69 70 0a 7d 0a 0a 23   xfer.  zip.}..#
02c0: 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6e   Name of the fin
02d0: 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 0a 23  al application.#
02e0: 0a 73 65 74 20 6e 61 6d 65 20 66 6f 73 73 69 6c  .set name fossil
02f0: 0a 0a 70 75 74 73 20 7b 23 20 44 4f 20 4e 4f 54  ..puts {# DO NOT
0300: 20 45 44 49 54 0a 23 0a 23 20 54 68 69 73 20 66   EDIT.#.# This f
0310: 69 6c 65 20 69 73 20 61 75 74 6f 6d 61 74 69 63  ile is automatic
0320: 61 6c 6c 79 20 67 65 6e 65 72 61 74 65 64 2e 20  ally generated. 
0330: 20 49 6e 73 74 65 61 64 20 6f 66 20 65 64 69 74   Instead of edit
0340: 69 6e 67 20 74 68 69 73 0a 23 20 66 69 6c 65 2c  ing this.# file,
0350: 20 65 64 69 74 20 22 6d 61 6b 65 6d 61 6b 65 2e   edit "makemake.
0360: 74 63 6c 22 20 74 68 65 6e 20 72 75 6e 20 22 74  tcl" then run "t
0370: 63 6c 73 68 20 6d 61 6b 65 6d 61 6b 65 2e 74 63  clsh makemake.tc
0380: 6c 20 3e 6d 61 69 6e 2e 6d 6b 22 0a 23 20 74 6f  l >main.mk".# to
0390: 20 72 65 67 65 6e 65 72 61 74 65 20 74 68 69 73   regenerate this
03a0: 20 66 69 6c 65 2e 0a 23 0a 23 20 54 68 69 73 20   file..#.# This 
03b0: 66 69 6c 65 20 69 73 20 69 6e 63 6c 75 64 65 64  file is included
03c0: 20 62 79 20 6c 69 6e 75 78 2d 67 63 63 2e 6d 6b   by linux-gcc.mk
03d0: 20 6f 72 20 6c 69 6e 75 78 2d 6d 69 6e 67 77 2e   or linux-mingw.
03e0: 6d 6b 20 6f 72 20 70 6f 73 73 69 62 6c 65 0a 23  mk or possible.#
03f0: 20 73 6f 6d 65 20 6f 74 68 65 72 20 6d 61 6b 65   some other make
0400: 66 69 6c 65 73 2e 20 20 54 68 69 73 20 66 69 6c  files.  This fil
0410: 65 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 72  e contains the r
0420: 75 6c 65 73 20 74 68 61 74 20 61 72 65 20 63 6f  ules that are co
0430: 6d 6d 6f 6e 0a 23 20 74 6f 20 62 75 69 6c 64 69  mmon.# to buildi
0440: 6e 67 20 72 65 67 61 72 64 6c 65 73 73 20 6f 66  ng regardless of
0450: 20 74 68 65 20 74 61 72 67 65 74 2e 0a 23 0a 0a   the target..#..
0460: 58 54 43 43 20 3d 20 24 28 54 43 43 29 20 24 28  XTCC = $(TCC) $(
0470: 43 46 4c 41 47 53 29 20 2d 49 2e 20 2d 49 24 28  CFLAGS) -I. -I$(
0480: 53 52 43 44 49 52 29 0a 0a 7d 0a 70 75 74 73 20  SRCDIR)..}.puts 
0490: 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 53 52 43 20  -nonewline "SRC 
04a0: 3d 22 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73  =".foreach s [ls
04b0: 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 70 75  ort $src] {.  pu
04c0: 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20  ts -nonewline " 
04d0: 5c 5c 5c 6e 20 20 5c 24 28 53 52 43 44 49 52 29  \\\n  \$(SRCDIR)
04e0: 2f 24 73 2e 63 22 0a 7d 0a 70 75 74 73 20 22 5c  /$s.c".}.puts "\
04f0: 6e 22 0a 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69  n".puts -nonewli
0500: 6e 65 20 22 54 52 41 4e 53 5f 53 52 43 20 3d 22  ne "TRANS_SRC ="
0510: 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72  .foreach s [lsor
0520: 74 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 74 73  t $src] {.  puts
0530: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c 5c   -nonewline " \\
0540: 5c 6e 20 20 24 7b 73 7d 5f 2e 63 22 0a 7d 0a 70  \n  ${s}_.c".}.p
0550: 75 74 73 20 22 5c 6e 22 0a 70 75 74 73 20 2d 6e  uts "\n".puts -n
0560: 6f 6e 65 77 6c 69 6e 65 20 22 4f 42 4a 20 3d 22  onewline "OBJ ="
0570: 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72  .foreach s [lsor
0580: 74 20 24 73 72 63 5d 20 7b 0a 20 20 70 75 74 73  t $src] {.  puts
0590: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 5c 5c   -nonewline " \\
05a0: 5c 6e 20 20 24 73 2e 6f 22 0a 7d 0a 70 75 74 73  \n  $s.o".}.puts
05b0: 20 22 5c 6e 22 0a 70 75 74 73 20 22 41 50 50 4e   "\n".puts "APPN
05c0: 41 4d 45 20 3d 20 24 6e 61 6d 65 5c 24 28 45 29  AME = $name\$(E)
05d0: 22 0a 70 75 74 73 20 22 5c 6e 22 0a 0a 70 75 74  ".puts "\n"..put
05e0: 73 20 7b 0a 61 6c 6c 3a 09 24 28 41 50 50 4e 41  s {.all:.$(APPNA
05f0: 4d 45 29 0a 0a 69 6e 73 74 61 6c 6c 3a 09 24 28  ME)..install:.$(
0600: 41 50 50 4e 41 4d 45 29 0a 09 6d 76 20 24 28 41  APPNAME)..mv $(A
0610: 50 50 4e 41 4d 45 29 20 24 28 49 4e 53 54 41 4c  PPNAME) $(INSTAL
0620: 4c 44 49 52 29 0a 0a 74 72 61 6e 73 6c 61 74 65  LDIR)..translate
0630: 3a 09 24 28 53 52 43 44 49 52 29 2f 74 72 61 6e  :.$(SRCDIR)/tran
0640: 73 6c 61 74 65 2e 63 0a 09 24 28 42 43 43 29 20  slate.c..$(BCC) 
0650: 2d 6f 20 74 72 61 6e 73 6c 61 74 65 20 24 28 53  -o translate $(S
0660: 52 43 44 49 52 29 2f 74 72 61 6e 73 6c 61 74 65  RCDIR)/translate
0670: 2e 63 0a 0a 6d 61 6b 65 68 65 61 64 65 72 73 3a  .c..makeheaders:
0680: 09 24 28 53 52 43 44 49 52 29 2f 6d 61 6b 65 68  .$(SRCDIR)/makeh
0690: 65 61 64 65 72 73 2e 63 0a 09 24 28 42 43 43 29  eaders.c..$(BCC)
06a0: 20 2d 6f 20 6d 61 6b 65 68 65 61 64 65 72 73 20   -o makeheaders 
06b0: 24 28 53 52 43 44 49 52 29 2f 6d 61 6b 65 68 65  $(SRCDIR)/makehe
06c0: 61 64 65 72 73 2e 63 0a 0a 6d 6b 69 6e 64 65 78  aders.c..mkindex
06d0: 3a 09 24 28 53 52 43 44 49 52 29 2f 6d 6b 69 6e  :.$(SRCDIR)/mkin
06e0: 64 65 78 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f  dex.c..$(BCC) -o
06f0: 20 6d 6b 69 6e 64 65 78 20 24 28 53 52 43 44 49   mkindex $(SRCDI
0700: 52 29 2f 6d 6b 69 6e 64 65 78 2e 63 0a 0a 23 20  R)/mkindex.c..# 
0710: 57 41 52 4e 49 4e 47 2e 20 44 41 4e 47 45 52 2e  WARNING. DANGER.
0720: 20 52 75 6e 6e 69 6e 67 20 74 68 65 20 74 65 73   Running the tes
0730: 74 73 75 69 74 65 20 6d 6f 64 69 66 69 65 73 20  tsuite modifies 
0740: 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 20 74  the repository t
0750: 68 65 0a 23 20 62 75 69 6c 64 20 69 73 20 64 6f  he.# build is do
0760: 6e 65 20 66 72 6f 6d 2c 20 69 2e 65 2e 20 74 68  ne from, i.e. th
0770: 65 20 63 68 65 63 6b 6f 75 74 20 62 65 6c 6f 6e  e checkout belon
0780: 67 73 20 74 6f 2e 20 44 6f 20 6e 6f 74 20 73 79  gs to. Do not sy
0790: 6e 63 2f 70 75 73 68 0a 23 20 74 68 65 20 72 65  nc/push.# the re
07a0: 70 6f 73 69 74 6f 72 79 20 61 66 74 65 72 20 72  pository after r
07b0: 75 6e 6e 69 6e 67 20 74 68 65 20 74 65 73 74 73  unning the tests
07c0: 2e 0a 74 65 73 74 3a 09 24 28 41 50 50 4e 41 4d  ..test:.$(APPNAM
07d0: 45 29 0a 09 24 28 54 43 4c 53 48 29 20 74 65 73  E)..$(TCLSH) tes
07e0: 74 2f 74 65 73 74 65 72 2e 74 63 6c 20 24 28 41  t/tester.tcl $(A
07f0: 50 50 4e 41 4d 45 29 0a 0a 56 45 52 53 49 4f 4e  PPNAME)..VERSION
0800: 2e 68 3a 09 24 28 53 52 43 44 49 52 29 2f 2e 2e  .h:.$(SRCDIR)/..
0810: 2f 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20 24  /manifest.uuid $
0820: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69  (SRCDIR)/../mani
0830: 66 65 73 74 0a 09 61 77 6b 20 27 7b 20 70 72 69  fest..awk '{ pri
0840: 6e 74 66 20 22 23 64 65 66 69 6e 65 20 4d 41 4e  ntf "#define MAN
0850: 49 46 45 53 54 5f 55 55 49 44 20 5c 22 25 73 5c  IFEST_UUID \"%s\
0860: 22 5c 6e 22 2c 20 24 24 31 7d 27 20 5c 0a 09 09  "\n", $$1}' \...
0870: 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e  $(SRCDIR)/../man
0880: 69 66 65 73 74 2e 75 75 69 64 20 3e 56 45 52 53  ifest.uuid >VERS
0890: 49 4f 4e 2e 68 0a 09 61 77 6b 20 27 7b 20 70 72  ION.h..awk '{ pr
08a0: 69 6e 74 66 20 22 23 64 65 66 69 6e 65 20 4d 41  intf "#define MA
08b0: 4e 49 46 45 53 54 5f 56 45 52 53 49 4f 4e 20 5c  NIFEST_VERSION \
08c0: 22 5b 25 2e 31 30 73 5d 5c 22 5c 6e 22 2c 20 24  "[%.10s]\"\n", $
08d0: 24 31 7d 27 20 5c 0a 09 09 24 28 53 52 43 44 49  $1}' \...$(SRCDI
08e0: 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 2e 75  R)/../manifest.u
08f0: 75 69 64 20 3e 3e 56 45 52 53 49 4f 4e 2e 68 0a  uid >>VERSION.h.
0900: 09 61 77 6b 20 27 24 24 31 3d 3d 22 44 22 7b 70  .awk '$$1=="D"{p
0910: 72 69 6e 74 66 20 22 23 64 65 66 69 6e 65 20 4d  rintf "#define M
0920: 41 4e 49 46 45 53 54 5f 44 41 54 45 20 5c 22 25  ANIFEST_DATE \"%
0930: 73 20 25 73 5c 22 5c 6e 22 2c 5c 0a 09 09 73 75  s %s\"\n",\...su
0940: 62 73 74 72 28 24 24 32 2c 31 2c 31 30 29 2c 73  bstr($$2,1,10),s
0950: 75 62 73 74 72 28 24 24 32 2c 31 32 29 7d 27 20  ubstr($$2,12)}' 
0960: 5c 0a 09 09 24 28 53 52 43 44 49 52 29 2f 2e 2e  \...$(SRCDIR)/..
0970: 2f 6d 61 6e 69 66 65 73 74 20 3e 3e 56 45 52 53  /manifest >>VERS
0980: 49 4f 4e 2e 68 0a 0a 24 28 41 50 50 4e 41 4d 45  ION.h..$(APPNAME
0990: 29 3a 09 68 65 61 64 65 72 73 20 24 28 4f 42 4a  ):.headers $(OBJ
09a0: 29 20 73 71 6c 69 74 65 33 2e 6f 20 74 68 2e 6f  ) sqlite3.o th.o
09b0: 20 74 68 5f 6c 61 6e 67 2e 6f 0a 09 24 28 54 43   th_lang.o..$(TC
09c0: 43 29 20 2d 6f 20 24 28 41 50 50 4e 41 4d 45 29  C) -o $(APPNAME)
09d0: 20 24 28 4f 42 4a 29 20 73 71 6c 69 74 65 33 2e   $(OBJ) sqlite3.
09e0: 6f 20 74 68 2e 6f 20 74 68 5f 6c 61 6e 67 2e 6f  o th.o th_lang.o
09f0: 20 24 28 4c 49 42 29 0a 0a 23 20 54 68 69 73 20   $(LIB)..# This 
0a00: 72 75 6c 65 20 70 72 65 76 65 6e 74 73 20 6d 61  rule prevents ma
0a10: 6b 65 20 66 72 6f 6d 20 75 73 69 6e 67 20 69 74  ke from using it
0a20: 73 20 64 65 66 61 75 6c 74 20 72 75 6c 65 73 20  s default rules 
0a30: 74 6f 20 74 72 79 20 62 75 69 6c 64 0a 23 20 61  to try build.# a
0a40: 6e 20 65 78 65 63 75 74 61 62 6c 65 20 6e 61 6d  n executable nam
0a50: 65 64 20 22 6d 61 6e 69 66 65 73 74 22 20 6f 75  ed "manifest" ou
0a60: 74 20 6f 66 20 74 68 65 20 66 69 6c 65 20 6e 61  t of the file na
0a70: 6d 65 64 20 22 6d 61 6e 69 66 65 73 74 2e 63 22  med "manifest.c"
0a80: 0a 23 0a 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f  .#.$(SRCDIR)/../
0a90: 6d 61 6e 69 66 65 73 74 3a 09 0a 09 23 20 6e 6f  manifest:...# no
0aa0: 6f 70 0a 0a 63 6c 65 61 6e 3a 09 0a 09 72 6d 20  op..clean:...rm 
0ab0: 2d 66 20 2a 2e 6f 20 2a 5f 2e 63 20 24 28 41 50  -f *.o *_.c $(AP
0ac0: 50 4e 41 4d 45 29 20 56 45 52 53 49 4f 4e 2e 68  PNAME) VERSION.h
0ad0: 0a 09 72 6d 20 2d 66 20 74 72 61 6e 73 6c 61 74  ..rm -f translat
0ae0: 65 20 6d 61 6b 65 68 65 61 64 65 72 73 20 6d 6b  e makeheaders mk
0af0: 69 6e 64 65 78 20 70 61 67 65 5f 69 6e 64 65 78  index page_index
0b00: 2e 68 20 68 65 61 64 65 72 73 7d 0a 0a 73 65 74  .h headers}..set
0b10: 20 68 66 69 6c 65 73 20 7b 7d 0a 66 6f 72 65 61   hfiles {}.forea
0b20: 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63  ch s [lsort $src
0b30: 5d 20 7b 6c 61 70 70 65 6e 64 20 68 66 69 6c 65  ] {lappend hfile
0b40: 73 20 24 73 2e 68 7d 0a 70 75 74 73 20 22 5c 74  s $s.h}.puts "\t
0b50: 72 6d 20 2d 66 20 24 68 66 69 6c 65 73 5c 6e 22  rm -f $hfiles\n"
0b60: 0a 0a 73 65 74 20 6d 68 61 72 67 73 20 7b 7d 0a  ..set mhargs {}.
0b70: 66 6f 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74  foreach s [lsort
0b80: 20 24 73 72 63 5d 20 7b 0a 20 20 61 70 70 65 6e   $src] {.  appen
0b90: 64 20 6d 68 61 72 67 73 20 22 20 24 7b 73 7d 5f  d mhargs " ${s}_
0ba0: 2e 63 3a 24 73 2e 68 22 0a 20 20 73 65 74 20 65  .c:$s.h".  set e
0bb0: 78 74 72 61 5f 68 28 24 73 29 20 7b 7d 0a 7d 0a  xtra_h($s) {}.}.
0bc0: 61 70 70 65 6e 64 20 6d 68 61 72 67 73 20 22 20  append mhargs " 
0bd0: 5c 24 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74  \$(SRCDIR)/sqlit
0be0: 65 33 2e 68 22 0a 61 70 70 65 6e 64 20 6d 68 61  e3.h".append mha
0bf0: 72 67 73 20 22 20 5c 24 28 53 52 43 44 49 52 29  rgs " \$(SRCDIR)
0c00: 2f 74 68 2e 68 22 0a 61 70 70 65 6e 64 20 6d 68  /th.h".append mh
0c10: 61 72 67 73 20 22 20 2e 2f 56 45 52 53 49 4f 4e  args " ./VERSION
0c20: 2e 68 22 0a 70 75 74 73 20 22 68 65 61 64 65 72  .h".puts "header
0c30: 73 3a 5c 74 6d 61 6b 65 68 65 61 64 65 72 73 20  s:\tmakeheaders 
0c40: 6d 6b 69 6e 64 65 78 20 5c 24 28 54 52 41 4e 53  mkindex \$(TRANS
0c50: 5f 53 52 43 29 20 2e 2f 56 45 52 53 49 4f 4e 2e  _SRC) ./VERSION.
0c60: 68 22 0a 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b  h".puts "\t./mak
0c70: 65 68 65 61 64 65 72 73 20 24 6d 68 61 72 67 73  eheaders $mhargs
0c80: 22 0a 70 75 74 73 20 22 5c 74 2e 2f 6d 6b 69 6e  ".puts "\t./mkin
0c90: 64 65 78 20 5c 24 28 54 52 41 4e 53 5f 53 52 43  dex \$(TRANS_SRC
0ca0: 29 20 3e 70 61 67 65 5f 69 6e 64 65 78 2e 68 22  ) >page_index.h"
0cb0: 0a 70 75 74 73 20 22 5c 74 74 6f 75 63 68 20 68  .puts "\ttouch h
0cc0: 65 61 64 65 72 73 5c 6e 22 0a 73 65 74 20 65 78  eaders\n".set ex
0cd0: 74 72 61 5f 68 28 6d 61 69 6e 29 20 70 61 67 65  tra_h(main) page
0ce0: 5f 69 6e 64 65 78 2e 68 0a 0a 66 6f 72 65 61 63  _index.h..foreac
0cf0: 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d  h s [lsort $src]
0d00: 20 7b 0a 20 20 70 75 74 73 20 22 24 7b 73 7d 5f   {.  puts "${s}_
0d10: 2e 63 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f  .c:\t\$(SRCDIR)/
0d20: 24 73 2e 63 20 5c 24 28 53 52 43 44 49 52 29 2f  $s.c \$(SRCDIR)/
0d30: 56 45 52 53 49 4f 4e 20 74 72 61 6e 73 6c 61 74  VERSION translat
0d40: 65 22 0a 20 20 70 75 74 73 20 22 5c 74 2e 2f 74  e".  puts "\t./t
0d50: 72 61 6e 73 6c 61 74 65 20 5c 24 28 53 52 43 44  ranslate \$(SRCD
0d60: 49 52 29 2f 24 73 2e 63 20 7c 20 73 65 64 20 2d  IR)/$s.c | sed -
0d70: 66 20 5c 24 28 53 52 43 44 49 52 29 2f 56 45 52  f \$(SRCDIR)/VER
0d80: 53 49 4f 4e 20 3e 24 7b 73 7d 5f 2e 63 5c 6e 22  SION >${s}_.c\n"
0d90: 0a 20 20 70 75 74 73 20 22 24 73 2e 6f 3a 5c 74  .  puts "$s.o:\t
0da0: 24 7b 73 7d 5f 2e 63 20 24 73 2e 68 20 24 65 78  ${s}_.c $s.h $ex
0db0: 74 72 61 5f 68 28 24 73 29 20 5c 24 28 53 52 43  tra_h($s) \$(SRC
0dc0: 44 49 52 29 2f 63 6f 6e 66 69 67 2e 68 22 0a 20  DIR)/config.h". 
0dd0: 20 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 43   puts "\t\$(XTCC
0de0: 29 20 2d 6f 20 24 73 2e 6f 20 2d 63 20 24 7b 73  ) -o $s.o -c ${s
0df0: 7d 5f 2e 63 5c 6e 22 0a 20 20 70 75 74 73 20 22  }_.c\n".  puts "
0e00: 24 73 2e 68 3a 5c 74 6d 61 6b 65 68 65 61 64 65  $s.h:\tmakeheade
0e10: 72 73 22 0a 20 20 70 75 74 73 20 22 5c 74 2e 2f  rs".  puts "\t./
0e20: 6d 61 6b 65 68 65 61 64 65 72 73 20 24 6d 68 61  makeheaders $mha
0e30: 72 67 73 5c 6e 5c 74 74 6f 75 63 68 20 68 65 61  rgs\n\ttouch hea
0e40: 64 65 72 73 5c 6e 22 0a 7d 0a 0a 0a 70 75 74 73  ders\n".}...puts
0e50: 20 22 73 71 6c 69 74 65 33 2e 6f 3a 5c 74 5c 24   "sqlite3.o:\t\$
0e60: 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33  (SRCDIR)/sqlite3
0e70: 2e 63 22 0a 73 65 74 20 6f 70 74 20 7b 2d 44 53  .c".set opt {-DS
0e80: 51 4c 49 54 45 5f 4f 4d 49 54 5f 4c 4f 41 44 5f  QLITE_OMIT_LOAD_
0e90: 45 58 54 45 4e 53 49 4f 4e 3d 31 20 2d 44 53 51  EXTENSION=1 -DSQ
0ea0: 4c 49 54 45 5f 50 52 49 56 41 54 45 3d 7d 0a 61  LITE_PRIVATE=}.a
0eb0: 70 70 65 6e 64 20 6f 70 74 20 22 20 2d 44 53 51  ppend opt " -DSQ
0ec0: 4c 49 54 45 5f 54 48 52 45 41 44 53 41 46 45 3d  LITE_THREADSAFE=
0ed0: 30 20 2d 44 53 51 4c 49 54 45 5f 44 45 46 41 55  0 -DSQLITE_DEFAU
0ee0: 4c 54 5f 46 49 4c 45 5f 46 4f 52 4d 41 54 3d 34  LT_FILE_FORMAT=4
0ef0: 22 0a 61 70 70 65 6e 64 20 6f 70 74 20 22 20 2d  ".append opt " -
0f00: 44 53 51 4c 49 54 45 5f 45 4e 41 42 4c 45 5f 46  DSQLITE_ENABLE_F
0f10: 54 53 33 3d 31 22 0a 70 75 74 73 20 22 5c 74 5c  TS3=1".puts "\t\
0f20: 24 28 58 54 43 43 29 20 24 6f 70 74 20 2d 63 20  $(XTCC) $opt -c 
0f30: 5c 24 28 53 52 43 44 49 52 29 2f 73 71 6c 69 74  \$(SRCDIR)/sqlit
0f40: 65 33 2e 63 20 2d 6f 20 73 71 6c 69 74 65 33 2e  e3.c -o sqlite3.
0f50: 6f 5c 6e 22 0a 0a 70 75 74 73 20 22 74 68 2e 6f  o\n"..puts "th.o
0f60: 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 74 68  :\t\$(SRCDIR)/th
0f70: 2e 63 22 0a 70 75 74 73 20 22 5c 74 5c 24 28 58  .c".puts "\t\$(X
0f80: 54 43 43 29 20 2d 49 5c 24 28 53 52 43 44 49 52  TCC) -I\$(SRCDIR
0f90: 29 20 2d 63 20 5c 24 28 53 52 43 44 49 52 29 2f  ) -c \$(SRCDIR)/
0fa0: 74 68 2e 63 20 2d 6f 20 74 68 2e 6f 5c 6e 22 0a  th.c -o th.o\n".
0fb0: 0a 70 75 74 73 20 22 74 68 5f 6c 61 6e 67 2e 6f  .puts "th_lang.o
0fc0: 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 74 68  :\t\$(SRCDIR)/th
0fd0: 5f 6c 61 6e 67 2e 63 22 0a 70 75 74 73 20 22 5c  _lang.c".puts "\
0fe0: 74 5c 24 28 58 54 43 43 29 20 2d 49 5c 24 28 53  t\$(XTCC) -I\$(S
0ff0: 52 43 44 49 52 29 20 2d 63 20 5c 24 28 53 52 43  RCDIR) -c \$(SRC
1000: 44 49 52 29 2f 74 68 5f 6c 61 6e 67 2e 63 20 2d  DIR)/th_lang.c -
1010: 6f 20 74 68 5f 6c 61 6e 67 2e 6f 5c 6e 22 0a     o th_lang.o\n".