Hex Artifact Content
Not logged in

Artifact 27a44eb21780506d7dbb9148cca0a7df5a74eaac:

File src/makemake.tcl part of check-in [007d1ce44f] - Rename admin_sql_page.c to admin.c. Refactor the strxform functions into SQL functions. Refactor the db_generic_query_view() routine. Fix multiple security vulnerabilities. Bring the code closer into compliance with style guidelines. by drh on 2008-02-07 15:08:02.

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 3a  ll source files:
0070: 0a 23 0a 73 65 74 20 73 72 63 20 7b 0a 20 20 61  .#.set src {.  a
0080: 64 64 0a 20 20 61 64 6d 69 6e 0a 20 20 62 61 67  dd.  admin.  bag
0090: 0a 20 20 62 6c 6f 62 0a 20 20 62 72 61 6e 63 68  .  blob.  branch
00a0: 0a 20 20 62 72 6f 77 73 65 0a 20 20 63 67 69 0a  .  browse.  cgi.
00b0: 20 20 63 68 65 63 6b 69 6e 0a 20 20 63 68 65 63    checkin.  chec
00c0: 6b 6f 75 74 0a 20 20 63 6c 65 61 72 73 69 67 6e  kout.  clearsign
00d0: 0a 20 20 63 6c 6f 6e 65 0a 20 20 63 6f 6d 66 6f  .  clone.  comfo
00e0: 72 6d 61 74 0a 20 20 63 6f 6e 73 74 72 75 63 74  rmat.  construct
00f0: 0a 20 20 63 6f 6e 74 65 6e 74 0a 20 20 64 62 0a  .  content.  db.
0100: 20 20 64 65 6c 74 61 0a 20 20 64 65 6c 74 61 63    delta.  deltac
0110: 6d 64 0a 20 20 64 65 73 63 65 6e 64 65 6e 74 73  md.  descendents
0120: 0a 20 20 64 69 66 66 0a 20 20 64 69 66 66 63 6d  .  diff.  diffcm
0130: 64 0a 20 20 65 6e 63 6f 64 65 0a 20 20 66 69 6c  d.  encode.  fil
0140: 65 0a 20 20 68 74 74 70 0a 20 20 69 6e 66 6f 0a  e.  http.  info.
0150: 20 20 6c 6f 67 69 6e 0a 20 20 6d 61 69 6e 0a 20    login.  main. 
0160: 20 6d 61 6e 69 66 65 73 74 0a 20 20 6d 64 35 0a   manifest.  md5.
0170: 20 20 6d 65 72 67 65 0a 20 20 6d 65 72 67 65 33    merge.  merge3
0180: 0a 20 20 6d 79 5f 70 61 67 65 0a 20 20 6e 61 6d  .  my_page.  nam
0190: 65 0a 20 20 70 69 76 6f 74 0a 20 20 70 71 75 65  e.  pivot.  pque
01a0: 75 65 0a 20 20 70 72 69 6e 74 66 0a 20 20 72 65  ue.  printf.  re
01b0: 62 75 69 6c 64 0a 20 20 72 73 73 0a 20 20 73 63  build.  rss.  sc
01c0: 68 65 6d 61 0a 20 20 73 65 74 75 70 0a 20 20 73  hema.  setup.  s
01d0: 68 61 31 0a 20 20 73 74 79 6c 65 0a 20 20 73 75  ha1.  style.  su
01e0: 62 73 63 72 69 70 74 0a 20 20 73 79 6e 63 0a 20  bscript.  sync. 
01f0: 20 74 61 67 0a 20 20 74 61 67 76 69 65 77 0a 20   tag.  tagview. 
0200: 20 74 69 6d 65 6c 69 6e 65 0a 20 20 74 6b 74 0a   timeline.  tkt.
0210: 20 20 74 6b 74 63 6f 6e 66 69 67 0a 20 20 74 6b    tktconfig.  tk
0220: 74 73 65 74 75 70 0a 20 20 75 6e 64 6f 0a 20 20  tsetup.  undo.  
0230: 75 70 64 61 74 65 0a 20 20 75 72 6c 0a 20 20 75  update.  url.  u
0240: 73 65 72 0a 20 20 76 65 72 69 66 79 0a 20 20 76  ser.  verify.  v
0250: 66 69 6c 65 0a 20 20 77 69 6b 69 0a 20 20 77 69  file.  wiki.  wi
0260: 6b 69 66 6f 72 6d 61 74 0a 20 20 78 66 65 72 0a  kiformat.  xfer.
0270: 20 20 7a 69 70 0a 7d 0a 0a 23 20 4e 61 6d 65 20    zip.}..# Name 
0280: 6f 66 20 74 68 65 20 66 69 6e 61 6c 20 61 70 70  of the final app
0290: 6c 69 63 61 74 69 6f 6e 0a 23 0a 73 65 74 20 6e  lication.#.set n
02a0: 61 6d 65 20 66 6f 73 73 69 6c 0a 0a 70 75 74 73  ame fossil..puts
02b0: 20 7b 23 20 44 4f 20 4e 4f 54 20 45 44 49 54 0a   {# DO NOT EDIT.
02c0: 23 0a 23 20 54 68 69 73 20 66 69 6c 65 20 69 73  #.# This file is
02d0: 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 67   automatically g
02e0: 65 6e 65 72 61 74 65 64 2e 20 20 49 6e 73 74 65  enerated.  Inste
02f0: 61 64 20 6f 66 20 65 64 69 74 69 6e 67 20 74 68  ad of editing th
0300: 69 73 0a 23 20 66 69 6c 65 2c 20 65 64 69 74 20  is.# file, edit 
0310: 22 6d 61 6b 65 6d 61 6b 65 2e 74 63 6c 22 20 74  "makemake.tcl" t
0320: 68 65 6e 20 72 75 6e 20 22 74 63 6c 73 68 20 6d  hen run "tclsh m
0330: 61 6b 65 6d 61 6b 65 2e 74 63 6c 20 3e 6d 61 69  akemake.tcl >mai
0340: 6e 2e 6d 6b 22 0a 23 20 74 6f 20 72 65 67 65 6e  n.mk".# to regen
0350: 65 72 61 74 65 20 74 68 69 73 20 66 69 6c 65 2e  erate this file.
0360: 0a 23 0a 23 20 54 68 69 73 20 66 69 6c 65 20 69  .#.# This file i
0370: 73 20 69 6e 63 6c 75 64 65 64 20 62 79 20 6c 69  s included by li
0380: 6e 75 78 2d 67 63 63 2e 6d 6b 20 6f 72 20 6c 69  nux-gcc.mk or li
0390: 6e 75 78 2d 6d 69 6e 67 77 2e 6d 6b 20 6f 72 20  nux-mingw.mk or 
03a0: 70 6f 73 73 69 62 6c 65 0a 23 20 73 6f 6d 65 20  possible.# some 
03b0: 6f 74 68 65 72 20 6d 61 6b 65 66 69 6c 65 73 2e  other makefiles.
03c0: 20 20 54 68 69 73 20 66 69 6c 65 20 63 6f 6e 74    This file cont
03d0: 61 69 6e 73 20 74 68 65 20 72 75 6c 65 73 20 74  ains the rules t
03e0: 68 61 74 20 61 72 65 20 63 6f 6d 6d 6f 6e 0a 23  hat are common.#
03f0: 20 74 6f 20 62 75 69 6c 64 69 6e 67 20 72 65 67   to building reg
0400: 61 72 64 6c 65 73 73 20 6f 66 20 74 68 65 20 74  ardless of the t
0410: 61 72 67 65 74 2e 0a 23 0a 0a 58 54 43 43 20 3d  arget..#..XTCC =
0420: 20 24 28 54 43 43 29 20 24 28 43 46 4c 41 47 53   $(TCC) $(CFLAGS
0430: 29 20 2d 49 2e 20 2d 49 24 28 53 52 43 44 49 52  ) -I. -I$(SRCDIR
0440: 29 0a 0a 7d 0a 70 75 74 73 20 2d 6e 6f 6e 65 77  )..}.puts -nonew
0450: 6c 69 6e 65 20 22 53 52 43 20 3d 22 0a 66 6f 72  line "SRC =".for
0460: 65 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73  each s [lsort $s
0470: 72 63 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f  rc] {.  puts -no
0480: 6e 65 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20  newline " \\\n  
0490: 5c 24 28 53 52 43 44 49 52 29 2f 24 73 2e 63 22  \$(SRCDIR)/$s.c"
04a0: 0a 7d 0a 70 75 74 73 20 22 5c 6e 22 0a 70 75 74  .}.puts "\n".put
04b0: 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 20 22 54 52  s -nonewline "TR
04c0: 41 4e 53 5f 53 52 43 20 3d 22 0a 66 6f 72 65 61  ANS_SRC =".forea
04d0: 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63  ch s [lsort $src
04e0: 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f 6e 65  ] {.  puts -none
04f0: 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 24 7b  wline " \\\n  ${
0500: 73 7d 5f 2e 63 22 0a 7d 0a 70 75 74 73 20 22 5c  s}_.c".}.puts "\
0510: 6e 22 0a 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69  n".puts -nonewli
0520: 6e 65 20 22 4f 42 4a 20 3d 22 0a 66 6f 72 65 61  ne "OBJ =".forea
0530: 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72 63  ch s [lsort $src
0540: 5d 20 7b 0a 20 20 70 75 74 73 20 2d 6e 6f 6e 65  ] {.  puts -none
0550: 77 6c 69 6e 65 20 22 20 5c 5c 5c 6e 20 20 24 73  wline " \\\n  $s
0560: 2e 6f 22 0a 7d 0a 70 75 74 73 20 22 5c 6e 22 0a  .o".}.puts "\n".
0570: 70 75 74 73 20 22 41 50 50 4e 41 4d 45 20 3d 20  puts "APPNAME = 
0580: 24 6e 61 6d 65 5c 24 28 45 29 22 0a 70 75 74 73  $name\$(E)".puts
0590: 20 22 5c 6e 22 0a 0a 70 75 74 73 20 7b 0a 61 6c   "\n"..puts {.al
05a0: 6c 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a 0a 69  l:.$(APPNAME)..i
05b0: 6e 73 74 61 6c 6c 3a 09 24 28 41 50 50 4e 41 4d  nstall:.$(APPNAM
05c0: 45 29 0a 09 6d 76 20 24 28 41 50 50 4e 41 4d 45  E)..mv $(APPNAME
05d0: 29 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 29 0a  ) $(INSTALLDIR).
05e0: 0a 74 72 61 6e 73 6c 61 74 65 3a 09 24 28 53 52  .translate:.$(SR
05f0: 43 44 49 52 29 2f 74 72 61 6e 73 6c 61 74 65 2e  CDIR)/translate.
0600: 63 0a 09 24 28 42 43 43 29 20 2d 6f 20 74 72 61  c..$(BCC) -o tra
0610: 6e 73 6c 61 74 65 20 24 28 53 52 43 44 49 52 29  nslate $(SRCDIR)
0620: 2f 74 72 61 6e 73 6c 61 74 65 2e 63 0a 0a 6d 61  /translate.c..ma
0630: 6b 65 68 65 61 64 65 72 73 3a 09 24 28 53 52 43  keheaders:.$(SRC
0640: 44 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73  DIR)/makeheaders
0650: 2e 63 0a 09 24 28 42 43 43 29 20 2d 6f 20 6d 61  .c..$(BCC) -o ma
0660: 6b 65 68 65 61 64 65 72 73 20 24 28 53 52 43 44  keheaders $(SRCD
0670: 49 52 29 2f 6d 61 6b 65 68 65 61 64 65 72 73 2e  IR)/makeheaders.
0680: 63 0a 0a 6d 6b 69 6e 64 65 78 3a 09 24 28 53 52  c..mkindex:.$(SR
0690: 43 44 49 52 29 2f 6d 6b 69 6e 64 65 78 2e 63 0a  CDIR)/mkindex.c.
06a0: 09 24 28 42 43 43 29 20 2d 6f 20 6d 6b 69 6e 64  .$(BCC) -o mkind
06b0: 65 78 20 24 28 53 52 43 44 49 52 29 2f 6d 6b 69  ex $(SRCDIR)/mki
06c0: 6e 64 65 78 2e 63 0a 0a 23 20 57 41 52 4e 49 4e  ndex.c..# WARNIN
06d0: 47 2e 20 44 41 4e 47 45 52 2e 20 52 75 6e 6e 69  G. DANGER. Runni
06e0: 6e 67 20 74 68 65 20 74 65 73 74 73 75 69 74 65  ng the testsuite
06f0: 20 6d 6f 64 69 66 69 65 73 20 74 68 65 20 72 65   modifies the re
0700: 70 6f 73 69 74 6f 72 79 20 74 68 65 0a 23 20 62  pository the.# b
0710: 75 69 6c 64 20 69 73 20 64 6f 6e 65 20 66 72 6f  uild is done fro
0720: 6d 2c 20 69 2e 65 2e 20 74 68 65 20 63 68 65 63  m, i.e. the chec
0730: 6b 6f 75 74 20 62 65 6c 6f 6e 67 73 20 74 6f 2e  kout belongs to.
0740: 20 44 6f 20 6e 6f 74 20 73 79 6e 63 2f 70 75 73   Do not sync/pus
0750: 68 0a 23 20 74 68 65 20 72 65 70 6f 73 69 74 6f  h.# the reposito
0760: 72 79 20 61 66 74 65 72 20 72 75 6e 6e 69 6e 67  ry after running
0770: 20 74 68 65 20 74 65 73 74 73 2e 0a 74 65 73 74   the tests..test
0780: 3a 09 24 28 41 50 50 4e 41 4d 45 29 0a 09 24 28  :.$(APPNAME)..$(
0790: 54 43 4c 53 48 29 20 74 65 73 74 2f 74 65 73 74  TCLSH) test/test
07a0: 65 72 2e 74 63 6c 20 24 28 41 50 50 4e 41 4d 45  er.tcl $(APPNAME
07b0: 29 0a 0a 56 45 52 53 49 4f 4e 2e 68 3a 09 24 28  )..VERSION.h:.$(
07c0: 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66  SRCDIR)/../manif
07d0: 65 73 74 2e 75 75 69 64 20 24 28 53 52 43 44 49  est.uuid $(SRCDI
07e0: 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 0a 09  R)/../manifest..
07f0: 61 77 6b 20 27 7b 20 70 72 69 6e 74 66 20 22 23  awk '{ printf "#
0800: 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53 54 5f  define MANIFEST_
0810: 55 55 49 44 20 5c 22 25 73 5c 22 5c 6e 22 2c 20  UUID \"%s\"\n", 
0820: 24 24 31 7d 27 20 5c 0a 09 09 24 28 53 52 43 44  $$1}' \...$(SRCD
0830: 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66 65 73 74 2e  IR)/../manifest.
0840: 75 75 69 64 20 3e 56 45 52 53 49 4f 4e 2e 68 0a  uuid >VERSION.h.
0850: 09 61 77 6b 20 27 7b 20 70 72 69 6e 74 66 20 22  .awk '{ printf "
0860: 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53 54  #define MANIFEST
0870: 5f 56 45 52 53 49 4f 4e 20 5c 22 5b 25 2e 31 30  _VERSION \"[%.10
0880: 73 5d 5c 22 5c 6e 22 2c 20 24 24 31 7d 27 20 5c  s]\"\n", $$1}' \
0890: 0a 09 09 24 28 53 52 43 44 49 52 29 2f 2e 2e 2f  ...$(SRCDIR)/../
08a0: 6d 61 6e 69 66 65 73 74 2e 75 75 69 64 20 3e 3e  manifest.uuid >>
08b0: 56 45 52 53 49 4f 4e 2e 68 0a 09 61 77 6b 20 27  VERSION.h..awk '
08c0: 24 24 31 3d 3d 22 44 22 7b 70 72 69 6e 74 66 20  $$1=="D"{printf 
08d0: 22 23 64 65 66 69 6e 65 20 4d 41 4e 49 46 45 53  "#define MANIFES
08e0: 54 5f 44 41 54 45 20 5c 22 25 73 20 25 73 5c 22  T_DATE \"%s %s\"
08f0: 5c 6e 22 2c 5c 0a 09 09 73 75 62 73 74 72 28 24  \n",\...substr($
0900: 24 32 2c 31 2c 31 30 29 2c 73 75 62 73 74 72 28  $2,1,10),substr(
0910: 24 24 32 2c 31 32 29 7d 27 20 5c 0a 09 09 24 28  $$2,12)}' \...$(
0920: 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69 66  SRCDIR)/../manif
0930: 65 73 74 20 3e 3e 56 45 52 53 49 4f 4e 2e 68 0a  est >>VERSION.h.
0940: 0a 24 28 41 50 50 4e 41 4d 45 29 3a 09 68 65 61  .$(APPNAME):.hea
0950: 64 65 72 73 20 24 28 4f 42 4a 29 20 73 71 6c 69  ders $(OBJ) sqli
0960: 74 65 33 2e 6f 0a 09 24 28 54 43 43 29 20 2d 6f  te3.o..$(TCC) -o
0970: 20 24 28 41 50 50 4e 41 4d 45 29 20 24 28 4f 42   $(APPNAME) $(OB
0980: 4a 29 20 73 71 6c 69 74 65 33 2e 6f 20 24 28 4c  J) sqlite3.o $(L
0990: 49 42 29 0a 0a 23 20 54 68 69 73 20 72 75 6c 65  IB)..# This rule
09a0: 20 70 72 65 76 65 6e 74 73 20 6d 61 6b 65 20 66   prevents make f
09b0: 72 6f 6d 20 75 73 69 6e 67 20 69 74 73 20 64 65  rom using its de
09c0: 66 61 75 6c 74 20 72 75 6c 65 73 20 74 6f 20 74  fault rules to t
09d0: 72 79 20 62 75 69 6c 64 0a 23 20 61 6e 20 65 78  ry build.# an ex
09e0: 65 63 75 74 61 62 6c 65 20 6e 61 6d 65 64 20 22  ecutable named "
09f0: 6d 61 6e 69 66 65 73 74 22 20 6f 75 74 20 6f 66  manifest" out of
0a00: 20 74 68 65 20 66 69 6c 65 20 6e 61 6d 65 64 20   the file named 
0a10: 22 6d 61 6e 69 66 65 73 74 2e 63 22 0a 23 0a 24  "manifest.c".#.$
0a20: 28 53 52 43 44 49 52 29 2f 2e 2e 2f 6d 61 6e 69  (SRCDIR)/../mani
0a30: 66 65 73 74 3a 09 0a 09 23 20 6e 6f 6f 70 0a 0a  fest:...# noop..
0a40: 63 6c 65 61 6e 3a 09 0a 09 72 6d 20 2d 66 20 2a  clean:...rm -f *
0a50: 2e 6f 20 2a 5f 2e 63 20 24 28 41 50 50 4e 41 4d  .o *_.c $(APPNAM
0a60: 45 29 20 56 45 52 53 49 4f 4e 2e 68 0a 09 72 6d  E) VERSION.h..rm
0a70: 20 2d 66 20 74 72 61 6e 73 6c 61 74 65 20 6d 61   -f translate ma
0a80: 6b 65 68 65 61 64 65 72 73 20 6d 6b 69 6e 64 65  keheaders mkinde
0a90: 78 20 70 61 67 65 5f 69 6e 64 65 78 2e 68 20 68  x page_index.h h
0aa0: 65 61 64 65 72 73 7d 0a 0a 73 65 74 20 68 66 69  eaders}..set hfi
0ab0: 6c 65 73 20 7b 7d 0a 66 6f 72 65 61 63 68 20 73  les {}.foreach s
0ac0: 20 5b 6c 73 6f 72 74 20 24 73 72 63 5d 20 7b 6c   [lsort $src] {l
0ad0: 61 70 70 65 6e 64 20 68 66 69 6c 65 73 20 24 73  append hfiles $s
0ae0: 2e 68 7d 0a 70 75 74 73 20 22 5c 74 72 6d 20 2d  .h}.puts "\trm -
0af0: 66 20 24 68 66 69 6c 65 73 5c 6e 22 0a 0a 73 65  f $hfiles\n"..se
0b00: 74 20 6d 68 61 72 67 73 20 7b 7d 0a 66 6f 72 65  t mhargs {}.fore
0b10: 61 63 68 20 73 20 5b 6c 73 6f 72 74 20 24 73 72  ach s [lsort $sr
0b20: 63 5d 20 7b 0a 20 20 61 70 70 65 6e 64 20 6d 68  c] {.  append mh
0b30: 61 72 67 73 20 22 20 24 7b 73 7d 5f 2e 63 3a 24  args " ${s}_.c:$
0b40: 73 2e 68 22 0a 20 20 73 65 74 20 65 78 74 72 61  s.h".  set extra
0b50: 5f 68 28 24 73 29 20 7b 7d 0a 7d 0a 61 70 70 65  _h($s) {}.}.appe
0b60: 6e 64 20 6d 68 61 72 67 73 20 22 20 5c 24 28 53  nd mhargs " \$(S
0b70: 52 43 44 49 52 29 2f 73 71 6c 69 74 65 33 2e 68  RCDIR)/sqlite3.h
0b80: 20 2e 2f 56 45 52 53 49 4f 4e 2e 68 22 0a 70 75   ./VERSION.h".pu
0b90: 74 73 20 22 68 65 61 64 65 72 73 3a 5c 74 6d 61  ts "headers:\tma
0ba0: 6b 65 68 65 61 64 65 72 73 20 6d 6b 69 6e 64 65  keheaders mkinde
0bb0: 78 20 5c 24 28 54 52 41 4e 53 5f 53 52 43 29 20  x \$(TRANS_SRC) 
0bc0: 2e 2f 56 45 52 53 49 4f 4e 2e 68 22 0a 70 75 74  ./VERSION.h".put
0bd0: 73 20 22 5c 74 2e 2f 6d 61 6b 65 68 65 61 64 65  s "\t./makeheade
0be0: 72 73 20 24 6d 68 61 72 67 73 22 0a 70 75 74 73  rs $mhargs".puts
0bf0: 20 22 5c 74 2e 2f 6d 6b 69 6e 64 65 78 20 5c 24   "\t./mkindex \$
0c00: 28 54 52 41 4e 53 5f 53 52 43 29 20 3e 70 61 67  (TRANS_SRC) >pag
0c10: 65 5f 69 6e 64 65 78 2e 68 22 0a 70 75 74 73 20  e_index.h".puts 
0c20: 22 5c 74 74 6f 75 63 68 20 68 65 61 64 65 72 73  "\ttouch headers
0c30: 5c 6e 22 0a 73 65 74 20 65 78 74 72 61 5f 68 28  \n".set extra_h(
0c40: 6d 61 69 6e 29 20 70 61 67 65 5f 69 6e 64 65 78  main) page_index
0c50: 2e 68 0a 0a 66 6f 72 65 61 63 68 20 73 20 5b 6c  .h..foreach s [l
0c60: 73 6f 72 74 20 24 73 72 63 5d 20 7b 0a 20 20 70  sort $src] {.  p
0c70: 75 74 73 20 22 24 7b 73 7d 5f 2e 63 3a 5c 74 5c  uts "${s}_.c:\t\
0c80: 24 28 53 52 43 44 49 52 29 2f 24 73 2e 63 20 5c  $(SRCDIR)/$s.c \
0c90: 24 28 53 52 43 44 49 52 29 2f 56 45 52 53 49 4f  $(SRCDIR)/VERSIO
0ca0: 4e 20 74 72 61 6e 73 6c 61 74 65 22 0a 20 20 70  N translate".  p
0cb0: 75 74 73 20 22 5c 74 2e 2f 74 72 61 6e 73 6c 61  uts "\t./transla
0cc0: 74 65 20 5c 24 28 53 52 43 44 49 52 29 2f 24 73  te \$(SRCDIR)/$s
0cd0: 2e 63 20 7c 20 73 65 64 20 2d 66 20 5c 24 28 53  .c | sed -f \$(S
0ce0: 52 43 44 49 52 29 2f 56 45 52 53 49 4f 4e 20 3e  RCDIR)/VERSION >
0cf0: 24 7b 73 7d 5f 2e 63 5c 6e 22 0a 20 20 70 75 74  ${s}_.c\n".  put
0d00: 73 20 22 24 73 2e 6f 3a 5c 74 24 7b 73 7d 5f 2e  s "$s.o:\t${s}_.
0d10: 63 20 24 73 2e 68 20 24 65 78 74 72 61 5f 68 28  c $s.h $extra_h(
0d20: 24 73 29 20 5c 24 28 53 52 43 44 49 52 29 2f 63  $s) \$(SRCDIR)/c
0d30: 6f 6e 66 69 67 2e 68 22 0a 20 20 70 75 74 73 20  onfig.h".  puts 
0d40: 22 5c 74 5c 24 28 58 54 43 43 29 20 2d 6f 20 24  "\t\$(XTCC) -o $
0d50: 73 2e 6f 20 2d 63 20 24 7b 73 7d 5f 2e 63 5c 6e  s.o -c ${s}_.c\n
0d60: 22 0a 20 20 70 75 74 73 20 22 24 73 2e 68 3a 5c  ".  puts "$s.h:\
0d70: 74 6d 61 6b 65 68 65 61 64 65 72 73 22 0a 20 20  tmakeheaders".  
0d80: 70 75 74 73 20 22 5c 74 2e 2f 6d 61 6b 65 68 65  puts "\t./makehe
0d90: 61 64 65 72 73 20 24 6d 68 61 72 67 73 5c 6e 5c  aders $mhargs\n\
0da0: 74 74 6f 75 63 68 20 68 65 61 64 65 72 73 5c 6e  ttouch headers\n
0db0: 22 0a 7d 0a 0a 0a 70 75 74 73 20 22 73 71 6c 69  ".}...puts "sqli
0dc0: 74 65 33 2e 6f 3a 5c 74 5c 24 28 53 52 43 44 49  te3.o:\t\$(SRCDI
0dd0: 52 29 2f 73 71 6c 69 74 65 33 2e 63 22 0a 73 65  R)/sqlite3.c".se
0de0: 74 20 6f 70 74 20 7b 2d 44 53 51 4c 49 54 45 5f  t opt {-DSQLITE_
0df0: 4f 4d 49 54 5f 4c 4f 41 44 5f 45 58 54 45 4e 53  OMIT_LOAD_EXTENS
0e00: 49 4f 4e 3d 31 20 2d 44 53 51 4c 49 54 45 5f 50  ION=1 -DSQLITE_P
0e10: 52 49 56 41 54 45 3d 7d 0a 61 70 70 65 6e 64 20  RIVATE=}.append 
0e20: 6f 70 74 20 22 20 2d 44 53 51 4c 49 54 45 5f 54  opt " -DSQLITE_T
0e30: 48 52 45 41 44 53 41 46 45 3d 30 20 2d 44 53 51  HREADSAFE=0 -DSQ
0e40: 4c 49 54 45 5f 44 45 46 41 55 4c 54 5f 46 49 4c  LITE_DEFAULT_FIL
0e50: 45 5f 46 4f 52 4d 41 54 3d 34 22 0a 61 70 70 65  E_FORMAT=4".appe
0e60: 6e 64 20 6f 70 74 20 22 20 2d 44 53 51 4c 49 54  nd opt " -DSQLIT
0e70: 45 5f 45 4e 41 42 4c 45 5f 46 54 53 33 3d 31 22  E_ENABLE_FTS3=1"
0e80: 0a 70 75 74 73 20 22 5c 74 5c 24 28 58 54 43 43  .puts "\t\$(XTCC
0e90: 29 20 24 6f 70 74 20 2d 63 20 5c 24 28 53 52 43  ) $opt -c \$(SRC
0ea0: 44 49 52 29 2f 73 71 6c 69 74 65 33 2e 63 20 2d  DIR)/sqlite3.c -
0eb0: 6f 20 73 71 6c 69 74 65 33 2e 6f 5c 6e 22 0a     o sqlite3.o\n".