Hex Artifact Content
Not logged in

Artifact f6bd7d70e32d1f559707cc01fd155d9633ec4ed6:

File src/makemake.tcl part of check-in [ecd1f09632] - Initial commit of Creole Wiki Parser extension. by robert on 2009-05-08 09:52:38.

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