Hex Artifact Content
Not logged in

Artifact 1776157a16e618347897ae9059d64f90c85231eb:

File src/makemake.tcl part of check-in [007d0a9b3f] - Add a new "Skins" configuration page that allows the look and feel of the web interface to be changed to one of several prototypes at the click of a button. Currently, there are only two built-in prototypes. by drh on 2009-12-19 21:04:29. Also file src/makemake.tcl part of check-in [76bc05d739] - merge with trunk by btheado on 2009-12-30 20:33:59.

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 6b  sha1.  shun.  sk
0270: 69 6e 73 0a 20 20 73 74 61 74 0a 20 20 73 74 79  ins.  stat.  sty
0280: 6c 65 0a 20 20 73 79 6e 63 0a 20 20 74 61 67 0a  le.  sync.  tag.
0290: 20 20 74 68 5f 6d 61 69 6e 0a 20 20 74 69 6d 65    th_main.  time
02a0: 6c 69 6e 65 0a 20 20 74 6b 74 0a 20 20 74 6b 74  line.  tkt.  tkt
02b0: 73 65 74 75 70 0a 20 20 75 6e 64 6f 0a 20 20 75  setup.  undo.  u
02c0: 70 64 61 74 65 0a 20 20 75 72 6c 0a 20 20 75 73  pdate.  url.  us
02d0: 65 72 0a 20 20 76 65 72 69 66 79 0a 20 20 76 66  er.  verify.  vf
02e0: 69 6c 65 0a 20 20 77 69 6b 69 0a 20 20 77 69 6b  ile.  wiki.  wik
02f0: 69 66 6f 72 6d 61 74 0a 20 20 77 69 6e 68 74 74  iformat.  winhtt
0300: 70 0a 20 20 78 66 65 72 0a 20 20 7a 69 70 0a 7d  p.  xfer.  zip.}
0310: 0a 0a 23 20 4e 61 6d 65 20 6f 66 20 74 68 65 20  ..# Name of the 
0320: 66 69 6e 61 6c 20 61 70 70 6c 69 63 61 74 69 6f  final applicatio
0330: 6e 0a 23 0a 73 65 74 20 6e 61 6d 65 20 66 6f 73  n.#.set name fos
0340: 73 69 6c 0a 0a 70 75 74 73 20 7b 23 20 44 4f 20  sil..puts {# DO 
0350: 4e 4f 54 20 45 44 49 54 0a 23 0a 23 20 54 68 69  NOT EDIT.#.# Thi
0360: 73 20 66 69 6c 65 20 69 73 20 61 75 74 6f 6d 61  s file is automa
0370: 74 69 63 61 6c 6c 79 20 67 65 6e 65 72 61 74 65  tically generate
0380: 64 2e 20 20 49 6e 73 74 65 61 64 20 6f 66 20 65  d.  Instead of e
0390: 64 69 74 69 6e 67 20 74 68 69 73 0a 23 20 66 69  diting this.# fi
03a0: 6c 65 2c 20 65 64 69 74 20 22 6d 61 6b 65 6d 61  le, edit "makema
03b0: 6b 65 2e 74 63 6c 22 20 74 68 65 6e 20 72 75 6e  ke.tcl" then run
03c0: 20 22 74 63 6c 73 68 20 6d 61 6b 65 6d 61 6b 65   "tclsh makemake
03d0: 2e 74 63 6c 20 3e 6d 61 69 6e 2e 6d 6b 22 0a 23  .tcl >main.mk".#
03e0: 20 74 6f 20 72 65 67 65 6e 65 72 61 74 65 20 74   to regenerate t
03f0: 68 69 73 20 66 69 6c 65 2e 0a 23 0a 23 20 54 68  his file..#.# Th
0400: 69 73 20 66 69 6c 65 20 69 73 20 69 6e 63 6c 75  is file is inclu
0410: 64 65 64 20 62 79 20 6c 69 6e 75 78 2d 67 63 63  ded by linux-gcc
0420: 2e 6d 6b 20 6f 72 20 6c 69 6e 75 78 2d 6d 69 6e  .mk or linux-min
0430: 67 77 2e 6d 6b 20 6f 72 20 70 6f 73 73 69 62 6c  gw.mk or possibl
0440: 65 0a 23 20 73 6f 6d 65 20 6f 74 68 65 72 20 6d  e.# some other m
0450: 61 6b 65 66 69 6c 65 73 2e 20 20 54 68 69 73 20  akefiles.  This 
0460: 66 69 6c 65 20 63 6f 6e 74 61 69 6e 73 20 74 68  file contains th
0470: 65 20 72 75 6c 65 73 20 74 68 61 74 20 61 72 65  e rules that are
0480: 20 63 6f 6d 6d 6f 6e 0a 23 20 74 6f 20 62 75 69   common.# to bui
0490: 6c 64 69 6e 67 20 72 65 67 61 72 64 6c 65 73 73  lding regardless
04a0: 20 6f 66 20 74 68 65 20 74 61 72 67 65 74 2e 0a   of the target..
04b0: 23 0a 0a 58 54 43 43 20 3d 20 24 28 54 43 43 29  #..XTCC = $(TCC)
04c0: 20 24 28 43 46 4c 41 47 53 29 20 2d 49 2e 20 2d   $(CFLAGS) -I. -
04d0: 49 24 28 53 52 43 44 49 52 29 0a 0a 7d 0a 70 75  I$(SRCDIR)..}.pu
04e0: 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 53  ts -nonewline "S
04f0: 52 43 20 3d 22 0a 66 6f 72 65 61 63 68 20 73 20  RC =".foreach s 
0500: 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20  [lsort $src] {. 
0510: 20 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65   puts -nonewline
0520: 20 22 20 5c 5c 5c 6e 20 20 5c 24 28 53 52 43 44   " \\\n  \$(SRCD
0530: 49 52 29 2f 24 73 2e 63 22 0a 7d 0a 70 75 74 73  IR)/$s.c".}.puts
0540: 20 22 5c 6e 22 0a 70 75 74 73 20 2d 6e 6f 6e 65   "\n".puts -none
0550: 77 6c 69 6e 65 20 22 54 52 41 4e 53 5f 53 52 43  wline "TRANS_SRC
0560: 20 3d 22 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c   =".foreach s [l
0570: 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 70  sort $src] {.  p
0580: 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  uts -nonewline "
0590: 20 5c 5c 5c 6e 20 20 24 7b 73 7d 5f 2e 63 22 0a   \\\n  ${s}_.c".
05a0: 7d 0a 70 75 74 73 20 22 5c 6e 22 0a 70 75 74 73  }.puts "\n".puts
05b0: 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 4f 42 4a   -nonewline "OBJ
05c0: 20 3d 22 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c   =".foreach s [l
05d0: 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 70  sort $src] {.  p
05e0: 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22  uts -nonewline "
05f0: 20 5c 5c 5c 6e 20 20 24 73 2e 6f 22 0a 7d 0a 70   \\\n  $s.o".}.p
0600: 75 74 73 20 22 5c 6e 22 0a 70 75 74 73 20 22 41  uts "\n".puts "A
0610: 50 50 4e 41 4d 45 20 3d 20 24 6e 61 6d 65 5c 24  PPNAME = $name\$
0620: 28 45 29 22 0a 70 75 74 73 20 22 5c 6e 22 0a 0a  (E)".puts "\n"..
0630: 70 75 74 73 20 7b 0a 61 6c 6c 3a 09 24 28 41 50  puts {.all:.$(AP
0640: 50 4e 41 4d 45 29 0a 0a 69 6e 73 74 61 6c 6c 3a  PNAME)..install:
0650: 09 24 28 41 50 50 4e 41 4d 45 29 0a 09 6d 76 20  .$(APPNAME)..mv 
0660: 24 28 41 50 50 4e 41 4d 45 29 20 24 28 49 4e 53  $(APPNAME) $(INS
0670: 54 41 4c 4c 44 49 52 29 0a 0a 74 72 61 6e 73 6c  TALLDIR)..transl
0680: 61 74 65 3a 09 24 28 53 52 43 44 49 52 29 2f 74  ate:.$(SRCDIR)/t
0690: 72 61 6e 73 6c 61 74 65 2e 63 0a 09 24 28 42 43  ranslate.c..$(BC
06a0: 43 29 20 2d 6f 20 74 72 61 6e 73 6c 61 74 65 20  C) -o translate 
06b0: 24 28 53 52 43 44 49 52 29 2f 74 72 61 6e 73 6c  $(SRCDIR)/transl
06c0: 61 74 65 2e 63 0a 0a 6d 61 6b 65 68 65 61 64 65  ate.c..makeheade
06d0: 72 73 3a 09 24 28 53 52 43 44 49 52 29 2f 6d 61  rs:.$(SRCDIR)/ma
06e0: 6b 65 68 65 61 64 65 72 73 2e 63 0a 09 24 28 42  keheaders.c..$(B
06f0: 43 43 29 20 2d 6f 20 6d 61 6b 65 68 65 61 64 65  CC) -o makeheade
0700: 72 73 20 24 28 53 52 43 44 49 52 29 2f 6d 61 6b  rs $(SRCDIR)/mak
0710: 65 68 65 61 64 65 72 73 2e 63 0a 0a 6d 6b 69 6e  eheaders.c..mkin
0720: 64 65 78 3a 09 24 28 53 52 43 44 49 52 29 2f 6d  dex:.$(SRCDIR)/m
0730: 6b 69 6e 64 65 78 2e 63 0a 09 24 28 42 43 43 29  kindex.c..$(BCC)
0740: 20 2d 6f 20 6d 6b 69 6e 64 65 78 20 24 28 53 52   -o mkindex $(SR
0750: 43 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e 63 0a  CDIR)/mkindex.c.
0760: 0a 23 20 57 41 52 4e 49 4e 47 2e 20 44 41 4e 47  .# WARNING. DANG
0770: 45 52 2e 20 52 75 6e 6e 69 6e 67 20 74 68 65 20  ER. Running the 
0780: 74 65 73 74 73 75 69 74 65 20 6d 6f 64 69 66 69  testsuite modifi
0790: 65 73 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72  es the repositor
07a0: 79 20 74 68 65 0a 23 20 62 75 69 6c 64 20 69 73  y the.# build is
07b0: 20 64 6f 6e 65 20 66 72 6f 6d 2c 20 69 2e 65 2e   done from, i.e.
07c0: 20 74 68 65 20 63 68 65 63 6b 6f 75 74 20 62 65   the checkout be
07d0: 6c 6f 6e 67 73 20 74 6f 2e 20 44 6f 20 6e 6f 74  longs to. Do not
07e0: 20 73 79 6e 63 2f 70 75 73 68 0a 23 20 74 68 65   sync/push.# the
07f0: 20 72 65 70 6f 73 69 74 6f 72 79 20 61 66 74 65   repository afte
0800: 72 20 72 75 6e 6e 69 6e 67 20 74 68 65 20 74 65  r running the te
0810: 73 74 73 2e 0a 74 65 73 74 3a 09 24 28 41 50 50  sts..test:.$(APP
0820: 4e 41 4d 45 29 0a 09 24 28 54 43 4c 53 48 29 20  NAME)..$(TCLSH) 
0830: 74 65 73 74 2f 74 65 73 74 65 72 2e 74 63 6c 20  test/tester.tcl 
0840: 24 28 41 50 50 4e 41 4d 45 29 0a 0a 56 45 52 53  $(APPNAME)..VERS
0850: 49 4f 4e 2e 68 3a 09 24 28 53 52 43 44 49 52 29  ION.h:.$(SRCDIR)
0860: 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 2e 75 75 69  /../manifest.uui
0870: 64 20 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d  d $(SRCDIR)/../m
0880: 61 6e 69 66 65 73 74 0a 09 61 77 6b 20 27 7b 20  anifest..awk '{ 
0890: 70 72 69 6e 74 66 20 22 23 64 65 66 69 6e 65 20  printf "#define 
08a0: 4d 41 4e 49 46 45 53 54 5f 55 55 49 44 20 5c 22  MANIFEST_UUID \"
08b0: 25 73 5c 22 5c 6e 22 2c 20 24 24 31 7d 27 20 5c  %s\"\n", $$1}' \
08c0: 0a 09 09 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f  ...$(SRCDIR)/../
08d0: 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20 3e 56  manifest.uuid >V
08e0: 45 52 53 49 4f 4e 2e 68 0a 09 61 77 6b 20 27 7b  ERSION.h..awk '{
08f0: 20 70 72 69 6e 74 66 20 22 23 64 65 66 69 6e 65   printf "#define
0900: 20 4d 41 4e 49 46 45 53 54 5f 56 45 52 53 49 4f   MANIFEST_VERSIO
0910: 4e 20 5c 22 5b 25 2e 31 30 73 5d 5c 22 5c 6e 22  N \"[%.10s]\"\n"
0920: 2c 20 24 24 31 7d 27 20 5c 0a 09 09 24 28 53 52  , $$1}' \...$(SR
0930: 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73  CDIR)/../manifes
0940: 74 2e 75 75 69 64 20 3e 3e 56 45 52 53 49 4f 4e  t.uuid >>VERSION
0950: 2e 68 0a 09 61 77 6b 20 27 24 24 31 3d 3d 22 44  .h..awk '$$1=="D
0960: 22 7b 70 72 69 6e 74 66 20 22 23 64 65 66 69 6e  "{printf "#defin
0970: 65 20 4d 41 4e 49 46 45 53 54 5f 44 41 54 45 20  e MANIFEST_DATE 
0980: 5c 22 25 73 20 25 73 5c 22 5c 6e 22 2c 5c 0a 09  \"%s %s\"\n",\..
0990: 09 73 75 62 73 74 72 28 24 24 32 2c 31 2c 31 30  .substr($$2,1,10
09a0: 29 2c 73 75 62 73 74 72 28 24 24 32 2c 31 32 29  ),substr($$2,12)
09b0: 7d 27 20 5c 0a 09 09 24 28 53 52 43 44 49 52 29  }' \...$(SRCDIR)
09c0: 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 20 3e 3e 56  /../manifest >>V
09d0: 45 52 53 49 4f 4e 2e 68 0a 0a 24 28 41 50 50 4e  ERSION.h..$(APPN
09e0: 41 4d 45 29 3a 09 68 65 61 64 65 72 73 20 24 28  AME):.headers $(
09f0: 4f 42 4a 29 20 73 71 6c 69 74 65 33 2e 6f 20 74  OBJ) sqlite3.o t
0a00: 68 2e 6f 20 74 68 5f 6c 61 6e 67 2e 6f 0a 09 24  h.o th_lang.o..$
0a10: 28 54 43 43 29 20 2d 6f 20 24 28 41 50 50 4e 41  (TCC) -o $(APPNA
0a20: 4d 45 29 20 24 28 4f 42 4a 29 20 73 71 6c 69 74  ME) $(OBJ) sqlit
0a30: 65 33 2e 6f 20 74 68 2e 6f 20 74 68 5f 6c 61 6e  e3.o th.o th_lan
0a40: 67 2e 6f 20 24 28 4c 49 42 29 0a 0a 23 20 54 68  g.o $(LIB)..# Th
0a50: 69 73 20 72 75 6c 65 20 70 72 65 76 65 6e 74 73  is rule prevents
0a60: 20 6d 61 6b 65 20 66 72 6f 6d 20 75 73 69 6e 67   make from using
0a70: 20 69 74 73 20 64 65 66 61 75 6c 74 20 72 75 6c   its default rul
0a80: 65 73 20 74 6f 20 74 72 79 20 62 75 69 6c 64 0a  es to try build.
0a90: 23 20 61 6e 20 65 78 65 63 75 74 61 62 6c 65 20  # an executable 
0aa0: 6e 61 6d 65 64 20 22 6d 61 6e 69 66 65 73 74 22  named "manifest"
0ab0: 20 6f 75 74 20 6f 66 20 74 68 65 20 66 69 6c 65   out of the file
0ac0: 20 6e 61 6d 65 64 20 22 6d 61 6e 69 66 65 73 74   named "manifest
0ad0: 2e 63 22 0a 23 0a 24 28 53 52 43 44 49 52 29 2f  .c".#.$(SRCDIR)/
0ae0: 2e 2e 2f 6d 61 6e 69 66 65 73 74 3a 09 0a 09 23  ../manifest:...#
0af0: 20 6e 6f 6f 70 0a 0a 63 6c 65 61 6e 3a 09 0a 09   noop..clean:...
0b00: 72 6d 20 2d 66 20 2a 2e 6f 20 2a 5f 2e 63 20 24  rm -f *.o *_.c $
0b10: 28 41 50 50 4e 41 4d 45 29 20 56 45 52 53 49 4f  (APPNAME) VERSIO
0b20: 4e 2e 68 0a 09 72 6d 20 2d 66 20 74 72 61 6e 73  N.h..rm -f trans
0b30: 6c 61 74 65 20 6d 61 6b 65 68 65 61 64 65 72 73  late makeheaders
0b40: 20 6d 6b 69 6e 64 65 78 20 70 61 67 65 5f 69 6e   mkindex page_in
0b50: 64 65 78 2e 68 20 68 65 61 64 65 72 73 7d 0a 0a  dex.h headers}..
0b60: 73 65 74 20 68 66 69 6c 65 73 20 7b 7d 0a 66 6f  set hfiles {}.fo
0b70: 72 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24  reach s [lsort $
0b80: 73 72 63 5d 20 7b 6c 61 70 70 65 6e 64 20 68 66  src] {lappend hf
0b90: 69 6c 65 73 20 24 73 2e 68 7d 0a 70 75 74 73 20  iles $s.h}.puts 
0ba0: 22 5c 74 72 6d 20 2d 66 20 24 68 66 69 6c 65 73  "\trm -f $hfiles
0bb0: 5c 6e 22 0a 0a 73 65 74 20 6d 68 61 72 67 73 20  \n"..set mhargs 
0bc0: 7b 7d 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c 73  {}.foreach s [ls
0bd0: 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 61 70  ort $src] {.  ap
0be0: 70 65 6e 64 20 6d 68 61 72 67 73 20 22 20 24 7b  pend mhargs " ${
0bf0: 73 7d 5f 2e 63 3a 24 73 2e 68 22 0a 20 20 73 65  s}_.c:$s.h".  se
0c00: 74 20 65 78 74 72 61 5f 68 28 24 73 29 20 7b 7d  t extra_h($s) {}
0c10: 0a 7d 0a 61 70 70 65 6e 64 20 6d 68 61 72 67 73  .}.append mhargs
0c20: 20 22 20 5c 24 28 53 52 43 44 49 52 29 2f 73 71   " \$(SRCDIR)/sq
0c30: 6c 69 74 65 33 2e 68 22 0a 61 70 70 65 6e 64 20  lite3.h".append 
0c40: 6d 68 61 72 67 73 20 22 20 5c 24 28 53 52 43 44  mhargs " \$(SRCD
0c50: 49 52 29 2f 74 68 2e 68 22 0a 61 70 70 65 6e 64  IR)/th.h".append
0c60: 20 6d 68 61 72 67 73 20 22 20 56 45 52 53 49 4f   mhargs " VERSIO
0c70: 4e 2e 68 22 0a 70 75 74 73 20 22 70 61 67 65 5f  N.h".puts "page_
0c80: 69 6e 64 65 78 2e 68 3a 20 5c 24 28 54 52 41 4e  index.h: \$(TRAN
0c90: 53 5f 53 52 43 29 20 6d 6b 69 6e 64 65 78 22 0a  S_SRC) mkindex".
0ca0: 70 75 74 73 20 22 5c 74 2e 2f 6d 6b 69 6e 64 65  puts "\t./mkinde
0cb0: 78 20 5c 24 28 54 52 41 4e 53 5f 53 52 43 29 20  x \$(TRANS_SRC) 
0cc0: 3e 24 40 22 0a 70 75 74 73 20 22 68 65 61 64 65  >$@".puts "heade
0cd0: 72 73 3a 5c 74 70 61 67 65 5f 69 6e 64 65 78 2e  rs:\tpage_index.
0ce0: 68 20 6d 61 6b 65 68 65 61 64 65 72 73 20 56 45  h makeheaders VE
0cf0: 52 53 49 4f 4e 2e 68 22 0a 70 75 74 73 20 22 5c  RSION.h".puts "\
0d00: 74 2e 2f 6d 61 6b 65 68 65 61 64 65 72 73 20 24  t./makeheaders $
0d10: 6d 68 61 72 67 73 22 0a 70 75 74 73 20 22 5c 74  mhargs".puts "\t
0d20: 74 6f 75 63 68 20 68 65 61 64 65 72 73 22 0a 70  touch headers".p
0d30: 75 74 73 20 22 68 65 61 64 65 72 73 3a 20 4d 61  uts "headers: Ma
0d40: 6b 65 66 69 6c 65 22 0a 70 75 74 73 20 22 4d 61  kefile".puts "Ma
0d50: 6b 65 66 69 6c 65 3a 22 0a 73 65 74 20 65 78 74  kefile:".set ext
0d60: 72 61 5f 68 28 6d 61 69 6e 29 20 70 61 67 65 5f  ra_h(main) page_
0d70: 69 6e 64 65 78 2e 68 0a 0a 66 6f 72 65 61 63 68  index.h..foreach
0d80: 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20   s [lsort $src] 
0d90: 7b 0a 20 20 70 75 74 73 20 22 24 7b 73 7d 5f 2e  {.  puts "${s}_.
0da0: 63 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f 24  c:\t\$(SRCDIR)/$
0db0: 73 2e 63 20 74 72 61 6e 73 6c 61 74 65 22 0a 20  s.c translate". 
0dc0: 20 70 75 74 73 20 22 5c 74 2e 2f 74 72 61 6e 73   puts "\t./trans
0dd0: 6c 61 74 65 20 5c 24 28 53 52 43 44 49 52 29 2f  late \$(SRCDIR)/
0de0: 24 73 2e 63 20 3e 24 7b 73 7d 5f 2e 63 5c 6e 22  $s.c >${s}_.c\n"
0df0: 0a 20 20 70 75 74 73 20 22 24 73 2e 6f 3a 5c 74  .  puts "$s.o:\t
0e00: 24 7b 73 7d 5f 2e 63 20 24 73 2e 68 20 24 65 78  ${s}_.c $s.h $ex
0e10: 74 72 61 5f 68 28 24 73 29 20 5c 24 28 53 52 43  tra_h($s) \$(SRC
0e20: 44 49 52 29 2f 63 6f 6e 66 69 67 2e 68 22 0a 20  DIR)/config.h". 
0e30: 20 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 43   puts "\t\$(XTCC
0e40: 29 20 2d 6f 20 24 73 2e 6f 20 2d 63 20 24 7b 73  ) -o $s.o -c ${s
0e50: 7d 5f 2e 63 5c 6e 22 0a 20 20 70 75 74 73 20 22  }_.c\n".  puts "
0e60: 24 73 2e 68 3a 5c 74 68 65 61 64 65 72 73 22 0a  $s.h:\theaders".
0e70: 23 20 20 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b  #  puts "\t./mak
0e80: 65 68 65 61 64 65 72 73 20 24 6d 68 61 72 67 73  eheaders $mhargs
0e90: 5c 6e 5c 74 74 6f 75 63 68 20 68 65 61 64 65 72  \n\ttouch header
0ea0: 73 5c 6e 22 0a 23 20 20 70 75 74 73 20 22 5c 74  s\n".#  puts "\t
0eb0: 2e 2f 6d 61 6b 65 68 65 61 64 65 72 73 20 24 7b  ./makeheaders ${
0ec0: 73 7d 5f 2e 63 3a 24 7b 73 7d 2e 68 5c 6e 22 0a  s}_.c:${s}.h\n".
0ed0: 7d 0a 0a 0a 70 75 74 73 20 22 73 71 6c 69 74 65  }...puts "sqlite
0ee0: 33 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49 52 29  3.o:\t\$(SRCDIR)
0ef0: 2f 73 71 6c 69 74 65 33 2e 63 22 0a 73 65 74 20  /sqlite3.c".set 
0f00: 6f 70 74 20 7b 2d 44 53 51 4c 49 54 45 5f 4f 4d  opt {-DSQLITE_OM
0f10: 49 54 5f 4c 4f 41 44 5f 45 58 54 45 4e 53 49 4f  IT_LOAD_EXTENSIO
0f20: 4e 3d 31 7d 0a 61 70 70 65 6e 64 20 6f 70 74 20  N=1}.append opt 
0f30: 22 20 2d 44 53 51 4c 49 54 45 5f 54 48 52 45 41  " -DSQLITE_THREA
0f40: 44 53 41 46 45 3d 30 20 2d 44 53 51 4c 49 54 45  DSAFE=0 -DSQLITE
0f50: 5f 44 45 46 41 55 4c 54 5f 46 49 4c 45 5f 46 4f  _DEFAULT_FILE_FO
0f60: 52 4d 41 54 3d 34 22 0a 23 61 70 70 65 6e 64 20  RMAT=4".#append 
0f70: 6f 70 74 20 22 20 2d 44 53 51 4c 49 54 45 5f 45  opt " -DSQLITE_E
0f80: 4e 41 42 4c 45 5f 46 54 53 33 3d 31 22 0a 61 70  NABLE_FTS3=1".ap
0f90: 70 65 6e 64 20 6f 70 74 20 22 20 2d 44 6c 6f 63  pend opt " -Dloc
0fa0: 61 6c 74 69 6d 65 3d 66 6f 73 73 69 6c 5f 6c 6f  altime=fossil_lo
0fb0: 63 61 6c 74 69 6d 65 22 0a 70 75 74 73 20 22 5c  caltime".puts "\
0fc0: 74 5c 24 28 58 54 43 43 29 20 24 6f 70 74 20 2d  t\$(XTCC) $opt -
0fd0: 63 20 5c 24 28 53 52 43 44 49 52 29 2f 73 71 6c  c \$(SRCDIR)/sql
0fe0: 69 74 65 33 2e 63 20 2d 6f 20 73 71 6c 69 74 65  ite3.c -o sqlite
0ff0: 33 2e 6f 5c 6e 22 0a 0a 70 75 74 73 20 22 74 68  3.o\n"..puts "th
1000: 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f  .o:\t\$(SRCDIR)/
1010: 74 68 2e 63 22 0a 70 75 74 73 20 22 5c 74 5c 24  th.c".puts "\t\$
1020: 28 58 54 43 43 29 20 2d 49 5c 24 28 53 52 43 44  (XTCC) -I\$(SRCD
1030: 49 52 29 20 2d 63 20 5c 24 28 53 52 43 44 49 52  IR) -c \$(SRCDIR
1040: 29 2f 74 68 2e 63 20 2d 6f 20 74 68 2e 6f 5c 6e  )/th.c -o th.o\n
1050: 22 0a 0a 70 75 74 73 20 22 74 68 5f 6c 61 6e 67  "..puts "th_lang
1060: 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49 52 29 2f  .o:\t\$(SRCDIR)/
1070: 74 68 5f 6c 61 6e 67 2e 63 22 0a 70 75 74 73 20  th_lang.c".puts 
1080: 22 5c 74 5c 24 28 58 54 43 43 29 20 2d 49 5c 24  "\t\$(XTCC) -I\$
1090: 28 53 52 43 44 49 52 29 20 2d 63 20 5c 24 28 53  (SRCDIR) -c \$(S
10a0: 52 43 44 49 52 29 2f 74 68 5f 6c 61 6e 67 2e 63  RCDIR)/th_lang.c
10b0: 20 2d 6f 20 74 68 5f 6c 61 6e 67 2e 6f 5c 6e 22   -o th_lang.o\n"
10c0: 0a                                               .