Fossil SCM
Merge in trunk changes, and especially the change that separates the "diff.tcl" script out into a separate file in the source tree, making it easier to edit and debug.
Commit
917e5cb617a19ea1030b5f77ba0844a6745d865f
Parent
cbd4dca6807d95d…
18 files changed
+1
+7
+7
+1
-733
+2
-2
+22
-1
+78
-10
+17
-2
+61
+4
+6
-2
+31
-29
+1
-1
+6
-3
+18
-6
+28
-2
+21
-1
+2
~
src/builtin.c
+
src/diff.tcl
~
src/diff.tcl
~
src/diffcmd.c
~
src/export.c
~
src/main.mk
~
src/makemake.tcl
~
src/manifest.c
~
src/mkbuiltin.c
~
src/setup.c
~
src/style.c
~
src/timeline.c
~
src/xfer.c
~
win/Makefile.PellesCGMake
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.msc
~
win/fossil.exe.manifest
+1
| --- a/src/builtin.c | ||
| +++ b/src/builtin.c | ||
| @@ -0,0 +1 @@ | ||
| 1 | +sizeof(aBuiltinFilesizeof(aBuiltinFil/if(==0 ) |
| --- a/src/builtin.c | |
| +++ b/src/builtin.c | |
| @@ -0,0 +1 @@ | |
| --- a/src/builtin.c | |
| +++ b/src/builtin.c | |
| @@ -0,0 +1 @@ | |
| 1 | sizeof(aBuiltinFilesizeof(aBuiltinFil/if(==0 ) |
+7
| --- a/src/diff.tcl | ||
| +++ b/src/diff.tcl | ||
| @@ -0,0 +1,7 @@ | ||
| 1 | +prev_next_diff { prev_next } { | |
| 2 | +active 1.0 end] | |
| 3 | + if {$prev_nex# # Right xNext if {$idx ne ""} { | |
| 4 | + while 1 { | |
| 5 | + lassign [$wB tag prevrange $tagB $idx 1.0] a b | |
| 6 | + if {$b ne "" && [$wB compare $b == "$idx - 1 l lineend"]# # Right xNext idx0 [lindex $range 1] | |
| 7 | + if { |
| --- a/src/diff.tcl | |
| +++ b/src/diff.tcl | |
| @@ -0,0 +1,7 @@ | |
| --- a/src/diff.tcl | |
| +++ b/src/diff.tcl | |
| @@ -0,0 +1,7 @@ | |
| 1 | prev_next_diff { prev_next } { |
| 2 | active 1.0 end] |
| 3 | if {$prev_nex# # Right xNext if {$idx ne ""} { |
| 4 | while 1 { |
| 5 | lassign [$wB tag prevrange $tagB $idx 1.0] a b |
| 6 | if {$b ne "" && [$wB compare $b == "$idx - 1 l lineend"]# # Right xNext idx0 [lindex $range 1] |
| 7 | if { |
+7
| --- a/src/diff.tcl | ||
| +++ b/src/diff.tcl | ||
| @@ -0,0 +1,7 @@ | ||
| 1 | +prev_next_diff { prev_next } { | |
| 2 | +active 1.0 end] | |
| 3 | + if {$prev_nex# # Right xNext if {$idx ne ""} { | |
| 4 | + while 1 { | |
| 5 | + lassign [$wB tag prevrange $tagB $idx 1.0] a b | |
| 6 | + if {$b ne "" && [$wB compare $b == "$idx - 1 l lineend"]# # Right xNext idx0 [lindex $range 1] | |
| 7 | + if { |
| --- a/src/diff.tcl | |
| +++ b/src/diff.tcl | |
| @@ -0,0 +1,7 @@ | |
| --- a/src/diff.tcl | |
| +++ b/src/diff.tcl | |
| @@ -0,0 +1,7 @@ | |
| 1 | prev_next_diff { prev_next } { |
| 2 | active 1.0 end] |
| 3 | if {$prev_nex# # Right xNext if {$idx ne ""} { |
| 4 | while 1 { |
| 5 | lassign [$wB tag prevrange $tagB $idx 1.0] a b |
| 6 | if {$b ne "" && [$wB compare $b == "$idx - 1 l lineend"]# # Right xNext idx0 [lindex $range 1] |
| 7 | if { |
+1
-733
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -617,742 +617,10 @@ | ||
| 617 | 617 | zName = "diff-command"; |
| 618 | 618 | } |
| 619 | 619 | return db_get(zName, zDefault); |
| 620 | 620 | } |
| 621 | 621 | |
| 622 | -/* A Tcl/Tk script used to render diff output. | |
| 623 | -*/ | |
| 624 | -static const char zDiffScript[] = | |
| 625 | -@ set prog { | |
| 626 | -@ package require Tk | |
| 627 | -@ | |
| 628 | -@ array set CFG { | |
| 629 | -@ TITLE {Fossil Diff} | |
| 630 | -@ LN_COL_BG #dddddd | |
| 631 | -@ LN_COL_FG #444444 | |
| 632 | -@ TXT_COL_BG #ffffff | |
| 633 | -@ TXT_COL_FG #000000 | |
| 634 | -@ MKR_COL_BG #444444 | |
| 635 | -@ MKR_COL_FG #dddddd | |
| 636 | -@ CHNG_BG #d0d0ff | |
| 637 | -@ ADD_BG #c0ffc0 | |
| 638 | -@ RM_BG #ffc0c0 | |
| 639 | -@ HR_FG #888888 | |
| 640 | -@ HR_PAD_TOP 4 | |
| 641 | -@ HR_PAD_BTM 8 | |
| 642 | -@ FN_BG #444444 | |
| 643 | -@ FN_FG #ffffff | |
| 644 | -@ FN_PAD 5 | |
| 645 | -@ ERR_FG #ee0000 | |
| 646 | -@ PADX 5 | |
| 647 | -@ WIDTH 80 | |
| 648 | -@ HEIGHT 45 | |
| 649 | -@ LB_HEIGHT 25 | |
| 650 | -@ } | |
| 651 | -@ | |
| 652 | -@ if {![namespace exists ttk]} { | |
| 653 | -@ interp alias {} ::ttk::scrollbar {} ::scrollbar | |
| 654 | -@ interp alias {} ::ttk::menubutton {} ::menubutton | |
| 655 | -@ } | |
| 656 | -@ | |
| 657 | -@ proc dehtml {x} { | |
| 658 | -@ set x [regsub -all {<[^>]*>} $x {}] | |
| 659 | -@ return [string map {& & < < > > ' ' " \"} $x] | |
| 660 | -@ } | |
| 661 | -@ | |
| 662 | -@ proc cols {} { | |
| 663 | -@ return [list .lnA .txtA .mkr .lnB .txtB] | |
| 664 | -@ } | |
| 665 | -@ | |
| 666 | -@ proc colType {c} { | |
| 667 | -@ regexp {[a-z]+} $c type | |
| 668 | -@ return $type | |
| 669 | -@ } | |
| 670 | -@ | |
| 671 | -@ proc getLine {difftxt N iivar} { | |
| 672 | -@ upvar $iivar ii | |
| 673 | -@ if {$ii>=$N} {return -1} | |
| 674 | -@ set x [lindex $difftxt $ii] | |
| 675 | -@ incr ii | |
| 676 | -@ return $x | |
| 677 | -@ } | |
| 678 | -@ | |
| 679 | -@ proc readDiffs {fossilcmd} { | |
| 680 | -@ global difftxt | |
| 681 | -@ if {![info exists difftxt]} { | |
| 682 | -@ set in [open $fossilcmd r] | |
| 683 | -@ fconfigure $in -encoding utf-8 | |
| 684 | -@ set difftxt [split [read $in] \n] | |
| 685 | -@ close $in | |
| 686 | -@ } | |
| 687 | -@ set N [llength $difftxt] | |
| 688 | -@ set ii 0 | |
| 689 | -@ set nDiffs 0 | |
| 690 | -@ array set widths {txt 0 ln 0 mkr 0} | |
| 691 | -@ while {[set line [getLine $difftxt $N ii]] != -1} { | |
| 692 | -@ set fn2 {} | |
| 693 | -@ if {![regexp {^=+ (.*?) =+ versus =+ (.*?) =+$} $line all fn fn2] | |
| 694 | -@ && ![regexp {^=+ (.*?) =+$} $line all fn] | |
| 695 | -@ } { | |
| 696 | -@ continue | |
| 697 | -@ } | |
| 698 | -@ set errMsg "" | |
| 699 | -@ set line [getLine $difftxt $N ii] | |
| 700 | -@ if {[string compare -length 6 $line "<table"] | |
| 701 | -@ && ![regexp {<p[^>]*>(.+)} $line - errMsg]} { | |
| 702 | -@ continue | |
| 703 | -@ } | |
| 704 | -@ incr nDiffs | |
| 705 | -@ set idx [expr {$nDiffs > 1 ? [.txtA index end] : "1.0"}] | |
| 706 | -@ .wfiles.lb insert end $fn | |
| 707 | -@ | |
| 708 | -@ foreach c [cols] { | |
| 709 | -@ if {$nDiffs > 1} { | |
| 710 | -@ $c insert end \n - | |
| 711 | -@ } | |
| 712 | -@ if {[colType $c] eq "txt"} { | |
| 713 | -@ $c insert end $fn\n fn | |
| 714 | -@ if {$fn2!=""} {set fn $fn2} | |
| 715 | -@ } else { | |
| 716 | -@ $c insert end \n fn | |
| 717 | -@ } | |
| 718 | -@ $c insert end \n - | |
| 719 | -@ | |
| 720 | -@ if {$errMsg ne ""} continue | |
| 721 | -@ while {[getLine $difftxt $N ii] ne "<pre>"} continue | |
| 722 | -@ set type [colType $c] | |
| 723 | -@ set str {} | |
| 724 | -@ while {[set line [getLine $difftxt $N ii]] ne "</pre>"} { | |
| 725 | -@ set len [string length [dehtml $line]] | |
| 726 | -@ if {$len > $widths($type)} { | |
| 727 | -@ set widths($type) $len | |
| 728 | -@ } | |
| 729 | -@ append str $line\n | |
| 730 | -@ } | |
| 731 | -@ | |
| 732 | -@ set re {<span class="diff([a-z]+)">([^<]*)</span>} | |
| 733 | -@ # Use \r as separator since it can't appear in the diff output (it gets | |
| 734 | -@ # converted to a space). | |
| 735 | -@ set str [regsub -all $re $str "\r\\1\r\\2\r"] | |
| 736 | -@ foreach {pre class mid} [split $str \r] { | |
| 737 | -@ if {$class ne ""} { | |
| 738 | -@ $c insert end [dehtml $pre] - [dehtml $mid] [list $class -] | |
| 739 | -@ } else { | |
| 740 | -@ $c insert end [dehtml $pre] - | |
| 741 | -@ } | |
| 742 | -@ } | |
| 743 | -@ } | |
| 744 | -@ | |
| 745 | -@ if {$errMsg ne ""} { | |
| 746 | -@ foreach c {.txtA .txtB} {$c insert end [string trim $errMsg] err} | |
| 747 | -@ foreach c [cols] {$c insert end \n -} | |
| 748 | -@ } | |
| 749 | -@ } | |
| 750 | -@ | |
| 751 | -@ foreach c [cols] { | |
| 752 | -@ set type [colType $c] | |
| 753 | -@ if {$type ne "txt"} { | |
| 754 | -@ $c config -width $widths($type) | |
| 755 | -@ } | |
| 756 | -@ $c config -state disabled | |
| 757 | -@ } | |
| 758 | -@ if {$nDiffs <= [.wfiles.lb cget -height]} { | |
| 759 | -@ .wfiles.lb config -height $nDiffs | |
| 760 | -@ grid remove .wfiles.sb | |
| 761 | -@ } | |
| 762 | -@ | |
| 763 | -@ return $nDiffs | |
| 764 | -@ } | |
| 765 | -@ | |
| 766 | -@ proc viewDiff {idx} { | |
| 767 | -@ .txtA yview $idx | |
| 768 | -@ .txtA xview moveto 0 | |
| 769 | -@ } | |
| 770 | -@ | |
| 771 | -@ proc cycleDiffs {{reverse 0}} { | |
| 772 | -@ if {$reverse} { | |
| 773 | -@ set range [.txtA tag prevrange fn @0,0 1.0] | |
| 774 | -@ if {$range eq ""} { | |
| 775 | -@ viewDiff {fn.last -1c} | |
| 776 | -@ } else { | |
| 777 | -@ viewDiff [lindex $range 0] | |
| 778 | -@ } | |
| 779 | -@ } else { | |
| 780 | -@ set range [.txtA tag nextrange fn {@0,0 +1c} end] | |
| 781 | -@ if {$range eq "" || [lindex [.txtA yview] 1] == 1} { | |
| 782 | -@ viewDiff fn.first | |
| 783 | -@ } else { | |
| 784 | -@ viewDiff [lindex $range 0] | |
| 785 | -@ } | |
| 786 | -@ } | |
| 787 | -@ } | |
| 788 | -@ | |
| 789 | -@ proc prev_next_diff { prev_next } { | |
| 790 | -@ set range [.txtA tag nextrange active 1.0 end] | |
| 791 | -@ if {$prev_next eq "prev"} { | |
| 792 | -@ set idx0 [lindex $range 0] | |
| 793 | -@ if {$idx0 eq ""} {set idx0 end} | |
| 794 | -@ if {[.txtA compare $idx0 > @0,[winfo height .txtA]]} { | |
| 795 | -@ set idx0 [.txtA index @0,[winfo height .txtA]] | |
| 796 | -@ } | |
| 797 | -@ set idx "" | |
| 798 | -@ foreach tag [list add rm chng fn] { | |
| 799 | -@ foreach w [list .txtA .txtB] { | |
| 800 | -@ lassign [$w tag prevrange $tag $idx0 1.0] a b | |
| 801 | -@ if { $idx eq "" || ($a ne "" && [$w compare $a > $idx]) } { | |
| 802 | -@ set idx $a | |
| 803 | -@ set idx_end $b | |
| 804 | -@ set tagB $tag | |
| 805 | -@ set wB $w | |
| 806 | -@ } | |
| 807 | -@ } | |
| 808 | -@ } | |
| 809 | -@ if {$idx ne ""} { | |
| 810 | -@ while 1 { | |
| 811 | -@ lassign [$wB tag prevrange $tagB $idx 1.0] a b | |
| 812 | -@ if {$b ne "" && [$wB compare $b == "$idx - 1 l lineend"]} { | |
| 813 | -@ set idx $a | |
| 814 | -@ } else { | |
| 815 | -@ break | |
| 816 | -@ } | |
| 817 | -@ } | |
| 818 | -@ } | |
| 819 | -@ } else { | |
| 820 | -@ set idx0 [lindex $range 1] | |
| 821 | -@ if { $idx0 eq "" } { set idx0 1.0 } | |
| 822 | -@ if { [.txtA compare $idx0 < @0,0] } { | |
| 823 | -@ set idx0 [.txtA index @0,0] | |
| 824 | -@ } | |
| 825 | -@ set idx "" | |
| 826 | -@ foreach tag [list add rm chng fn] { | |
| 827 | -@ foreach w [list .txtA .txtB] { | |
| 828 | -@ lassign [$w tag nextrange $tag $idx0 end] a b | |
| 829 | -@ if { $idx eq "" || ($a ne "" && [$w compare $a < $idx]) } { | |
| 830 | -@ set idx $a | |
| 831 | -@ set idx_end $b | |
| 832 | -@ set tagB $tag | |
| 833 | -@ set wB $w | |
| 834 | -@ } | |
| 835 | -@ } | |
| 836 | -@ } | |
| 837 | -@ if { $idx ne "" } { | |
| 838 | -@ while 1 { | |
| 839 | -@ lassign [$wB tag nextrange $tagB $idx_end end] a b | |
| 840 | -@ if { $a ne "" && [$wB compare $a == "$idx_end + 1 l linestart"] } { | |
| 841 | -@ set idx_end $b | |
| 842 | -@ } else { | |
| 843 | -@ break | |
| 844 | -@ } | |
| 845 | -@ } | |
| 846 | -@ } | |
| 847 | -@ } | |
| 848 | -@ if { $idx eq "" } { | |
| 849 | -@ bell | |
| 850 | -@ return | |
| 851 | -@ } | |
| 852 | -@ set idx [.txtA index "$idx linestart"] | |
| 853 | -@ if { $tagB ne "fn" } { | |
| 854 | -@ set idx_end [.txtA index "$idx_end +1l linestart"] | |
| 855 | -@ } | |
| 856 | -@ .txtA tag remove active 1.0 end | |
| 857 | -@ .txtA tag add active $idx $idx_end | |
| 858 | -@ .txtA tag configure active -borderwidth 2 -relief raised\ | |
| 859 | -@ -background #eeeeee -foreground black | |
| 860 | -@ if { $tagB ne "fn" } { | |
| 861 | -@ .txtA tag lower active | |
| 862 | -@ } else { | |
| 863 | -@ .txtA tag raise active | |
| 864 | -@ } | |
| 865 | -@ .txtA see 1.0 | |
| 866 | -@ .txtA see $idx | |
| 867 | -@ } | |
| 868 | -@ | |
| 869 | -@ proc searchText {} { | |
| 870 | -@ set rangeA [.txtA tag nextrange search 1.0 end] | |
| 871 | -@ set rangeB [.txtB tag nextrange search 1.0 end] | |
| 872 | -@ set idx0 [lindex $rangeA 1] | |
| 873 | -@ if { $idx0 eq "" } { set idx0 [lindex $rangeB 1] } | |
| 874 | -@ if { $idx0 eq "" } { set idx0 1.0 } | |
| 875 | -@ set word [.bb.search get] | |
| 876 | -@ if { [.txtA compare $idx0 < @0,0] } { | |
| 877 | -@ set idx0 [.txtA index @0,0] | |
| 878 | -@ } | |
| 879 | -@ if { [info exists ::this_does_not_find] } { | |
| 880 | -@ if { $::this_does_not_find eq [list $idx0 $word] } { | |
| 881 | -@ set idx0 1.0 | |
| 882 | -@ } | |
| 883 | -@ unset ::this_does_not_find | |
| 884 | -@ } | |
| 885 | -@ set idx "" | |
| 886 | -@ foreach w [list .txtA .txtB] { | |
| 887 | -@ foreach regexp [list 0 1] { | |
| 888 | -@ switch $regexp { | |
| 889 | -@ 0 { set rexFlag "-exact" } | |
| 890 | -@ 1 { set rexFlag "-regexp" } | |
| 891 | -@ } | |
| 892 | -@ set err [catch { | |
| 893 | -@ $w search -nocase $rexFlag -count count $word $idx0 end | |
| 894 | -@ } idx_i] | |
| 895 | -@ if {!$err && $idx_i ne "" | |
| 896 | -@ && ($idx eq "" || [$w compare $idx_i < $idx])} { | |
| 897 | -@ set idx $idx_i | |
| 898 | -@ set countB $count | |
| 899 | -@ set wB $w | |
| 900 | -@ } | |
| 901 | -@ } | |
| 902 | -@ } | |
| 903 | -@ .txtA tag remove search 1.0 end | |
| 904 | -@ .txtB tag remove search 1.0 end | |
| 905 | -@ if { $idx eq "" } { | |
| 906 | -@ bell | |
| 907 | -@ set ::this_does_not_find [list $idx0 $word] | |
| 908 | -@ return | |
| 909 | -@ } | |
| 910 | -@ set idx_end [$wB index "$idx + $countB c"] | |
| 911 | -@ $wB tag add search $idx $idx_end | |
| 912 | -@ $wB tag configure search -borderwidth 2 -relief raised\ | |
| 913 | -@ -background orange -foreground black | |
| 914 | -@ $wB tag raise search | |
| 915 | -@ $wB see 1.0 | |
| 916 | -@ $wB see $idx | |
| 917 | -@ } | |
| 918 | -@ | |
| 919 | -@ proc reopen { action } { | |
| 920 | -@ if { ![regexp {[|]\s*(.*)} $::fossilcmd {} cmdList] } { return } | |
| 921 | -@ set f [lindex $cmdList 0] | |
| 922 | -@ set args_with_arg \ | |
| 923 | -@ [list binary branch context c diff-binary from r to W width] | |
| 924 | -@ set skip_args [list html internal i side-by-side y tk] | |
| 925 | -@ lassign "" argsDict files | |
| 926 | -@ for { set i 2 } { $i < [llength $cmdList] } { incr i } { | |
| 927 | -@ if { [string match "-*" [lindex $cmdList $i]] } { | |
| 928 | -@ set n [string trimleft [lindex $cmdList $i] "-"] | |
| 929 | -@ if { $n in $args_with_arg } { | |
| 930 | -@ dict set argsDict $n [lindex $cmdList $i+1] | |
| 931 | -@ incr i | |
| 932 | -@ } elseif { $n ni $skip_args } { | |
| 933 | -@ dict set argsDict $n 1 | |
| 934 | -@ } | |
| 935 | -@ } else { | |
| 936 | -@ lappend files [lindex $cmdList $i] | |
| 937 | -@ } | |
| 938 | -@ } | |
| 939 | -@ switch $action { | |
| 940 | -@ togglewhitespace { | |
| 941 | -@ if { [dict exists $argsDict w] | |
| 942 | -@ || [dict exists $argsDict ignore-all-space] } { | |
| 943 | -@ dict unset argsDict w | |
| 944 | -@ dict unset argsDict ignore-all-space | |
| 945 | -@ } else { | |
| 946 | -@ dict set argsDict w 1 | |
| 947 | -@ } | |
| 948 | -@ } | |
| 949 | -@ onefile { | |
| 950 | -@ set range [.txtA tag nextrange fn "@0,0" "@0,[winfo height .txtA] +1l"] | |
| 951 | -@ if { $range eq "" } { return } | |
| 952 | -@ set file [string trim [.txtA get {*}$range]] | |
| 953 | -@ set files [list $file] | |
| 954 | -@ regexp -line {local-root:\s+(.*)} [exec $f info] {} dir | |
| 955 | -@ cd $dir | |
| 956 | -@ } | |
| 957 | -@ allfiles { | |
| 958 | -@ set files "" | |
| 959 | -@ } | |
| 960 | -@ prev - | |
| 961 | -@ next { | |
| 962 | -@ set widget [focus] | |
| 963 | -@ if { $widget eq ".txtA" } { | |
| 964 | -@ set from_to from | |
| 965 | -@ if { ![dict exists $argsDict from] } { | |
| 966 | -@ dict set argsDict from current | |
| 967 | -@ } | |
| 968 | -@ } elseif { $widget eq ".txtB" } { | |
| 969 | -@ set from_to to | |
| 970 | -@ if { ![dict exists $argsDict to] } { | |
| 971 | -@ dict set argsDict to ckout | |
| 972 | -@ } | |
| 973 | -@ } else { | |
| 974 | -@ tk_messageBox -message "Click on one of the panes to select it" | |
| 975 | -@ return | |
| 976 | -@ } | |
| 977 | -@ lassign "" parent child current tag | |
| 978 | -@ set err [catch { exec $f info [dict get $argsDict $from_to] } info] | |
| 979 | -@ if { $err } { | |
| 980 | -@ if { [dict get $argsDict $from_to] eq "ckout" } { | |
| 981 | -@ set err [catch { exec $f info } info] | |
| 982 | -@ if { !$err } { regexp {checkout:\s+(\S+)} $info {} parent } | |
| 983 | -@ } else { | |
| 984 | -@ bell | |
| 985 | -@ return | |
| 986 | -@ } | |
| 987 | -@ } else { | |
| 988 | -@ regexp {uuid:\s+(\S+)\s+(\S+)} $info {} current date | |
| 989 | -@ regexp {parent:\s+(\S+)} $info {} parent | |
| 990 | -@ regexp {child:\s+(\S+)} $info {} child | |
| 991 | -@ } | |
| 992 | -@ if { [llength $files] == 1 } { | |
| 993 | -@ set file [lindex $files 0] | |
| 994 | -@ set err [catch { exec $f finfo -b -limit 100 $file } info] | |
| 995 | -@ if { $err } { | |
| 996 | -@ bell | |
| 997 | -@ return | |
| 998 | -@ } | |
| 999 | -@ if { $current eq "" } { | |
| 1000 | -@ if { $action eq "prev" } { | |
| 1001 | -@ regexp {^\S+} $info tag | |
| 1002 | -@ } | |
| 1003 | -@ } else { | |
| 1004 | -@ set current [string range $current 0 9] | |
| 1005 | -@ set prev "" | |
| 1006 | -@ set found 0 | |
| 1007 | -@ foreach line [split $info \n] { | |
| 1008 | -@ regexp {(\S+)\s+(\S+)} $line {} currentL dateL | |
| 1009 | -@ if { $found } { | |
| 1010 | -@ set tag $currentL | |
| 1011 | -@ break | |
| 1012 | -@ } elseif { $currentL eq $current || $dateL < $date } { | |
| 1013 | -@ if { $action eq "next" } { | |
| 1014 | -@ set tag $prev | |
| 1015 | -@ break | |
| 1016 | -@ } | |
| 1017 | -@ set found 1 | |
| 1018 | -@ } | |
| 1019 | -@ set prev $currentL | |
| 1020 | -@ } | |
| 1021 | -@ } | |
| 1022 | -@ } else { | |
| 1023 | -@ if { $action eq "prev" } { | |
| 1024 | -@ set tag $parent | |
| 1025 | -@ } else { | |
| 1026 | -@ set tag $child | |
| 1027 | -@ } | |
| 1028 | -@ } | |
| 1029 | -@ if { $tag eq "" && $action eq "prev" } { | |
| 1030 | -@ bell | |
| 1031 | -@ return | |
| 1032 | -@ } | |
| 1033 | -@ if { $tag ne "" } { | |
| 1034 | -@ dict set argsDict $from_to $tag | |
| 1035 | -@ } else { | |
| 1036 | -@ dict unset argsDict $from_to | |
| 1037 | -@ } | |
| 1038 | -@ if { $from_to eq "to" && ![dict exists $argsDict from] } { | |
| 1039 | -@ dict set argsDict from current | |
| 1040 | -@ } | |
| 1041 | -@ } | |
| 1042 | -@ } | |
| 1043 | -@ | |
| 1044 | -@ set f_args "" | |
| 1045 | -@ dict for "n v" $argsDict { | |
| 1046 | -@ if { $n in $args_with_arg } { | |
| 1047 | -@ lappend f_args -$n $v | |
| 1048 | -@ } else { | |
| 1049 | -@ lappend f_args -$n | |
| 1050 | -@ } | |
| 1051 | -@ } | |
| 1052 | -@ lappend f_args {*}$files | |
| 1053 | -@ | |
| 1054 | -@ # note: trying to put two contiguous "-" gives an error | |
| 1055 | -@ exec $f diff -tk {*}$f_args & | |
| 1056 | -@ exit | |
| 1057 | -@ } | |
| 1058 | -@ | |
| 1059 | -@ proc fossil_ui {} { | |
| 1060 | -@ if { ![regexp {[|]\s*(.*)} $::fossilcmd {} cmdList] } { return } | |
| 1061 | -@ set f [lindex $cmdList 0] | |
| 1062 | -@ exec $f ui & | |
| 1063 | -@ } | |
| 1064 | -@ | |
| 1065 | -@ proc searchToggle {} { | |
| 1066 | -@ set err [catch { pack info .bb.search }] | |
| 1067 | -@ if { $err } { | |
| 1068 | -@ pack .bb.search -side left -padx 5 -after .bb.files | |
| 1069 | -@ tk::TabToWindow .bb.search | |
| 1070 | -@ } else { | |
| 1071 | -@ .txtA tag remove search 1.0 end | |
| 1072 | -@ .txtB tag remove search 1.0 end | |
| 1073 | -@ pack forget .bb.search | |
| 1074 | -@ focus . | |
| 1075 | -@ } | |
| 1076 | -@ } | |
| 1077 | -@ | |
| 1078 | -@ proc xvis {col} { | |
| 1079 | -@ set view [$col xview] | |
| 1080 | -@ return [expr {[lindex $view 1]-[lindex $view 0]}] | |
| 1081 | -@ } | |
| 1082 | -@ | |
| 1083 | -@ proc scroll-x {args} { | |
| 1084 | -@ set c .txt[expr {[xvis .txtA] < [xvis .txtB] ? "A" : "B"}] | |
| 1085 | -@ eval $c xview $args | |
| 1086 | -@ } | |
| 1087 | -@ | |
| 1088 | -@ interp alias {} scroll-y {} .txtA yview | |
| 1089 | -@ | |
| 1090 | -@ proc noop {args} {} | |
| 1091 | -@ | |
| 1092 | -@ proc enableSync {axis} { | |
| 1093 | -@ update idletasks | |
| 1094 | -@ interp alias {} sync-$axis {} | |
| 1095 | -@ rename _sync-$axis sync-$axis | |
| 1096 | -@ } | |
| 1097 | -@ | |
| 1098 | -@ proc disableSync {axis} { | |
| 1099 | -@ rename sync-$axis _sync-$axis | |
| 1100 | -@ interp alias {} sync-$axis {} noop | |
| 1101 | -@ } | |
| 1102 | -@ | |
| 1103 | -@ proc sync-x {col first last} { | |
| 1104 | -@ disableSync x | |
| 1105 | -@ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] | |
| 1106 | -@ foreach side {A B} { | |
| 1107 | -@ set sb .sbx$side | |
| 1108 | -@ set xview [.txt$side xview] | |
| 1109 | -@ if {[lindex $xview 0] > 0 || [lindex $xview 1] < 1} { | |
| 1110 | -@ grid $sb | |
| 1111 | -@ eval $sb set $xview | |
| 1112 | -@ } else { | |
| 1113 | -@ grid remove $sb | |
| 1114 | -@ } | |
| 1115 | -@ } | |
| 1116 | -@ enableSync x | |
| 1117 | -@ } | |
| 1118 | -@ | |
| 1119 | -@ proc sync-y {first last} { | |
| 1120 | -@ disableSync y | |
| 1121 | -@ foreach c [cols] { | |
| 1122 | -@ $c yview moveto $first | |
| 1123 | -@ } | |
| 1124 | -@ if {$first > 0 || $last < 1} { | |
| 1125 | -@ grid .sby | |
| 1126 | -@ .sby set $first $last | |
| 1127 | -@ } else { | |
| 1128 | -@ grid remove .sby | |
| 1129 | -@ } | |
| 1130 | -@ enableSync y | |
| 1131 | -@ } | |
| 1132 | -@ | |
| 1133 | -@ wm withdraw . | |
| 1134 | -@ wm title . $CFG(TITLE) | |
| 1135 | -@ wm iconname . $CFG(TITLE) | |
| 1136 | -@ bind . <q> exit | |
| 1137 | -@ bind . <Destroy> {after 0 exit} | |
| 1138 | -@ bind . <Tab> {cycleDiffs; break} | |
| 1139 | -@ bind . <<PrevWindow>> {cycleDiffs 1; break} | |
| 1140 | -@ bind . <Return> { | |
| 1141 | -@ event generate .bb.files <1> | |
| 1142 | -@ event generate .bb.files <ButtonRelease-1> | |
| 1143 | -@ break | |
| 1144 | -@ } | |
| 1145 | -@ foreach {key axis args} { | |
| 1146 | -@ Up y {scroll -5 units} | |
| 1147 | -@ Down y {scroll 5 units} | |
| 1148 | -@ Left x {scroll -5 units} | |
| 1149 | -@ Right x {scroll 5 units} | |
| 1150 | -@ Prior y {scroll -1 page} | |
| 1151 | -@ Next y {scroll 1 page} | |
| 1152 | -@ Home y {moveto 0} | |
| 1153 | -@ End y {moveto 1} | |
| 1154 | -@ } { | |
| 1155 | -@ bind . <$key> "scroll-$axis $args; break" | |
| 1156 | -@ bind . <Shift-$key> continue | |
| 1157 | -@ } | |
| 1158 | -@ | |
| 1159 | -@ frame .bb | |
| 1160 | -@ ::ttk::menubutton .bb.files -text "Files" | |
| 1161 | -@ toplevel .wfiles | |
| 1162 | -@ wm withdraw .wfiles | |
| 1163 | -@ update idletasks | |
| 1164 | -@ wm transient .wfiles . | |
| 1165 | -@ wm overrideredirect .wfiles 1 | |
| 1166 | -@ listbox .wfiles.lb -width 0 -height $CFG(LB_HEIGHT) -activestyle none \ | |
| 1167 | -@ -yscroll {.wfiles.sb set} | |
| 1168 | -@ ::ttk::scrollbar .wfiles.sb -command {.wfiles.lb yview} | |
| 1169 | -@ grid .wfiles.lb .wfiles.sb -sticky ns | |
| 1170 | -@ bind .bb.files <1> { | |
| 1171 | -@ set x [winfo rootx %W] | |
| 1172 | -@ set y [expr {[winfo rooty %W]+[winfo height %W]}] | |
| 1173 | -@ wm geometry .wfiles +$x+$y | |
| 1174 | -@ wm deiconify .wfiles | |
| 1175 | -@ focus .wfiles.lb | |
| 1176 | -@ } | |
| 1177 | -@ bind .wfiles <FocusOut> {wm withdraw .wfiles} | |
| 1178 | -@ bind .wfiles <Escape> {focus .} | |
| 1179 | -@ foreach evt {1 Return} { | |
| 1180 | -@ bind .wfiles.lb <$evt> { | |
| 1181 | -@ catch { | |
| 1182 | -@ set idx [lindex [.txtA tag ranges fn] [expr {[%W curselection]*2}]] | |
| 1183 | -@ viewDiff $idx | |
| 1184 | -@ } | |
| 1185 | -@ focus . | |
| 1186 | -@ break | |
| 1187 | -@ } | |
| 1188 | -@ } | |
| 1189 | -@ bind .wfiles.lb <Motion> { | |
| 1190 | -@ %W selection clear 0 end | |
| 1191 | -@ %W selection set @%x,%y | |
| 1192 | -@ } | |
| 1193 | -@ | |
| 1194 | -@ foreach {side syncCol} {A .txtB B .txtA} { | |
| 1195 | -@ set ln .ln$side | |
| 1196 | -@ text $ln | |
| 1197 | -@ $ln tag config - -justify right | |
| 1198 | -@ | |
| 1199 | -@ set txt .txt$side | |
| 1200 | -@ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ | |
| 1201 | -@ -xscroll "sync-x $syncCol" | |
| 1202 | -@ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5 | |
| 1203 | -@ foreach tag {add rm chng} { | |
| 1204 | -@ $txt tag config $tag -background $CFG([string toupper $tag]_BG) | |
| 1205 | -@ $txt tag lower $tag | |
| 1206 | -@ } | |
| 1207 | -@ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ | |
| 1208 | -@ -justify center | |
| 1209 | -@ $txt tag config err -foreground $CFG(ERR_FG) | |
| 1210 | -@ } | |
| 1211 | -@ text .mkr | |
| 1212 | -@ | |
| 1213 | -@ foreach c [cols] { | |
| 1214 | -@ set keyPrefix [string toupper [colType $c]]_COL_ | |
| 1215 | -@ if {[tk windowingsystem] eq "win32"} {$c config -font {courier 9}} | |
| 1216 | -@ $c config -bg $CFG(${keyPrefix}BG) -fg $CFG(${keyPrefix}FG) -borderwidth 0 \ | |
| 1217 | -@ -padx $CFG(PADX) -yscroll sync-y | |
| 1218 | -@ $c tag config hr -spacing1 $CFG(HR_PAD_TOP) -spacing3 $CFG(HR_PAD_BTM) \ | |
| 1219 | -@ -foreground $CFG(HR_FG) | |
| 1220 | -@ $c tag config fn -spacing1 $CFG(FN_PAD) -spacing3 $CFG(FN_PAD) | |
| 1221 | -@ bindtags $c ". $c Text all" | |
| 1222 | -@ bind $c <1> {focus %W} | |
| 1223 | -@ } | |
| 1224 | -@ | |
| 1225 | -@ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical | |
| 1226 | -@ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal | |
| 1227 | -@ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal | |
| 1228 | -@ frame .spacer | |
| 1229 | -@ | |
| 1230 | -@ if {[readDiffs $fossilcmd] == 0} { | |
| 1231 | -@ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" | |
| 1232 | -@ #exit | |
| 1233 | -@ } | |
| 1234 | -@ update idletasks | |
| 1235 | -@ | |
| 1236 | -@ proc saveDiff {} { | |
| 1237 | -@ set fn [tk_getSaveFile] | |
| 1238 | -@ if {$fn==""} return | |
| 1239 | -@ set out [open $fn wb] | |
| 1240 | -@ puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'" | |
| 1241 | -@ puts $out "# to see the graphical diff.\n#" | |
| 1242 | -@ puts $out "set fossilcmd {}" | |
| 1243 | -@ puts $out "set prog [list $::prog]" | |
| 1244 | -@ puts $out "set difftxt \173" | |
| 1245 | -@ foreach e $::difftxt {puts $out [list $e]} | |
| 1246 | -@ puts $out "\175" | |
| 1247 | -@ puts $out "eval \$prog" | |
| 1248 | -@ close $out | |
| 1249 | -@ } | |
| 1250 | -@ proc invertDiff {} { | |
| 1251 | -@ global CFG | |
| 1252 | -@ array set x [grid info .txtA] | |
| 1253 | -@ if {$x(-column)==1} { | |
| 1254 | -@ grid config .lnB -column 0 | |
| 1255 | -@ grid config .txtB -column 1 | |
| 1256 | -@ .txtB tag config add -background $CFG(RM_BG) | |
| 1257 | -@ grid config .lnA -column 3 | |
| 1258 | -@ grid config .txtA -column 4 | |
| 1259 | -@ .txtA tag config rm -background $CFG(ADD_BG) | |
| 1260 | -@ } else { | |
| 1261 | -@ grid config .lnA -column 0 | |
| 1262 | -@ grid config .txtA -column 1 | |
| 1263 | -@ .txtA tag config rm -background $CFG(RM_BG) | |
| 1264 | -@ grid config .lnB -column 3 | |
| 1265 | -@ grid config .txtB -column 4 | |
| 1266 | -@ .txtB tag config add -background $CFG(ADD_BG) | |
| 1267 | -@ } | |
| 1268 | -@ .mkr config -state normal | |
| 1269 | -@ set clt [.mkr search -all < 1.0 end] | |
| 1270 | -@ set cgt [.mkr search -all > 1.0 end] | |
| 1271 | -@ foreach c $clt {.mkr replace $c "$c +1 chars" >} | |
| 1272 | -@ foreach c $cgt {.mkr replace $c "$c +1 chars" <} | |
| 1273 | -@ .mkr config -state disabled | |
| 1274 | -@ } | |
| 1275 | -@ proc bind_key_do { cmd } { | |
| 1276 | -@ if { [focus] eq ".bb.search" } { return -code continue } | |
| 1277 | -@ uplevel #0 $cmd | |
| 1278 | -@ return -code break | |
| 1279 | -@ } | |
| 1280 | -@ ::ttk::menubutton .bb.actions -text "Actions" -menu .bb.actions.m | |
| 1281 | -@ menu .bb.actions.m -tearoff 0 | |
| 1282 | -@ .bb.actions.m add command -label "Go to previous diff" -acc "p" -command "prev_next_diff prev" | |
| 1283 | -@ .bb.actions.m add command -label "Go to next diff" -acc "n" -command "prev_next_diff next" | |
| 1284 | -@ .bb.actions.m add separator | |
| 1285 | -@ .bb.actions.m add command -label "Search" -acc "f" -command "searchToggle;" | |
| 1286 | -@ .bb.actions.m add command -label "Toggle whitespace" -acc "w" -command "reopen togglewhitespace" | |
| 1287 | -@ .bb.actions.m add separator | |
| 1288 | -@ .bb.actions.m add command -label "View one file" -acc "1" -command "reopen onefile" | |
| 1289 | -@ .bb.actions.m add command -label "View all files" -acc "a" -command "reopen allfiles" | |
| 1290 | -@ .bb.actions.m add separator | |
| 1291 | -@ .bb.actions.m add command -label "Older version" -acc "Shift-P" -command "reopen prev" | |
| 1292 | -@ .bb.actions.m add command -label "Newer version" -acc "Shift-N" -command "reopen next" | |
| 1293 | -@ .bb.actions.m add command -label "Fossil ui" -acc "u" -command "fossil_ui" | |
| 1294 | -@ ::ttk::button .bb.quit -text {Quit} -command exit | |
| 1295 | -@ ::ttk::button .bb.invert -text {Invert} -command invertDiff | |
| 1296 | -@ ::ttk::button .bb.save -text {Save As...} -command saveDiff | |
| 1297 | -@ ::ttk::entry .bb.search -width 12 | |
| 1298 | -@ | |
| 1299 | -@ bind .bb.search <Return> "searchText; break" | |
| 1300 | -@ bind .bb.search <Escape> "searchToggle; break" | |
| 1301 | -@ | |
| 1302 | -@ bind . <Key-f> [list bind_key_do "searchToggle"] | |
| 1303 | -@ bind . <Key-w> [list bind_key_do "reopen togglewhitespace"] | |
| 1304 | -@ bind . <Key-1> [list bind_key_do "reopen onefile"] | |
| 1305 | -@ bind . <Key-a> [list bind_key_do "reopen allfiles"] | |
| 1306 | -@ bind . <Key-P> [list bind_key_do "reopen prev"] | |
| 1307 | -@ bind . <Key-N> [list bind_key_do "reopen next"] | |
| 1308 | -@ bind . <Key-u> [list bind_key_do "fossil_ui"] | |
| 1309 | -@ | |
| 1310 | -@ lassign [list "(current)" "(ckout)"] from to | |
| 1311 | -@ if { [regexp {[|]\s*(.*)} $::fossilcmd {} cmdList] } { | |
| 1312 | -@ set f [lindex $cmdList 0] | |
| 1313 | -@ if { [regexp {([-][-]?from|-r)\s+(\S+)} [join $cmdList " "] {} {} from] } { | |
| 1314 | -@ set err [catch { exec $f info $from } info] | |
| 1315 | -@ if { !$err } { | |
| 1316 | -@ regexp {uuid:\s+(\S+)\s+(\S+)\s+(\S+)} $info {} from date time | |
| 1317 | -@ set from "\[[string range $from 0 9]\] $date $time" | |
| 1318 | -@ } | |
| 1319 | -@ } | |
| 1320 | -@ if { [regexp {([-][-]?to)\s+(\S+)} [join $cmdList " "] {} {} to] } { | |
| 1321 | -@ set err [catch { exec $f info $to } info] | |
| 1322 | -@ if { !$err } { | |
| 1323 | -@ regexp {uuid:\s+(\S+)\s+(\S+)\s+(\S+)} $info {} to date time | |
| 1324 | -@ set to "\[[string range $to 0 9]\] $date $time" | |
| 1325 | -@ } | |
| 1326 | -@ } | |
| 1327 | -@ } | |
| 1328 | -@ | |
| 1329 | -@ ttk::label .bb.from -text $from | |
| 1330 | -@ ttk::label .bb.to -text $to | |
| 1331 | -@ | |
| 1332 | -@ pack .bb.from -side left -padx "2 25" | |
| 1333 | -@ pack .bb.quit .bb.invert -side left | |
| 1334 | -@ if {$fossilcmd!=""} {pack .bb.save -side left} | |
| 1335 | -@ pack .bb.files -side left | |
| 1336 | -@ pack .bb.actions -side left | |
| 1337 | -@ pack .bb.to -side left -padx "25 2" | |
| 1338 | -@ grid rowconfigure . 1 -weight 1 | |
| 1339 | -@ grid columnconfigure . 1 -weight 1 | |
| 1340 | -@ grid columnconfigure . 4 -weight 1 | |
| 1341 | -@ grid .bb -row 0 -columnspan 7 | |
| 1342 | -@ eval grid [cols] -row 1 -sticky nsew | |
| 1343 | -@ grid .sby -row 1 -column 5 -sticky ns | |
| 1344 | -@ grid .sbxA -row 2 -columnspan 2 -sticky ew | |
| 1345 | -@ grid .spacer -row 2 -column 2 | |
| 1346 | -@ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew | |
| 1347 | -@ | |
| 1348 | -@ .spacer config -height [winfo height .sbxA] | |
| 1349 | -@ wm deiconify . | |
| 1350 | -@ } | |
| 1351 | -@ eval $prog | |
| 1352 | -; | |
| 1353 | - | |
| 1354 | 622 | /* |
| 1355 | 623 | ** Show diff output in a Tcl/Tk window, in response to the --tk option |
| 1356 | 624 | ** to the diff command. |
| 1357 | 625 | ** |
| 1358 | 626 | ** If fossil has direct access to a Tcl interpreter (either loaded |
| @@ -1386,11 +654,11 @@ | ||
| 1386 | 654 | int j; |
| 1387 | 655 | blob_append(&script, " ", 1); |
| 1388 | 656 | for(j=0; z[j]; j++) blob_appendf(&script, "\\%03o", (unsigned char)z[j]); |
| 1389 | 657 | } |
| 1390 | 658 | } |
| 1391 | - blob_appendf(&script, "}\n%s", zDiffScript); | |
| 659 | + blob_appendf(&script, "}\n%s", builtin_file("diff.tcl", 0)); | |
| 1392 | 660 | if( zTempFile ){ |
| 1393 | 661 | blob_write_to_file(&script, zTempFile); |
| 1394 | 662 | fossil_print("To see diff, run: tclsh \"%s\"\n", zTempFile); |
| 1395 | 663 | }else{ |
| 1396 | 664 | #if defined(FOSSIL_ENABLE_TCL) |
| 1397 | 665 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -617,742 +617,10 @@ | |
| 617 | zName = "diff-command"; |
| 618 | } |
| 619 | return db_get(zName, zDefault); |
| 620 | } |
| 621 | |
| 622 | /* A Tcl/Tk script used to render diff output. |
| 623 | */ |
| 624 | static const char zDiffScript[] = |
| 625 | @ set prog { |
| 626 | @ package require Tk |
| 627 | @ |
| 628 | @ array set CFG { |
| 629 | @ TITLE {Fossil Diff} |
| 630 | @ LN_COL_BG #dddddd |
| 631 | @ LN_COL_FG #444444 |
| 632 | @ TXT_COL_BG #ffffff |
| 633 | @ TXT_COL_FG #000000 |
| 634 | @ MKR_COL_BG #444444 |
| 635 | @ MKR_COL_FG #dddddd |
| 636 | @ CHNG_BG #d0d0ff |
| 637 | @ ADD_BG #c0ffc0 |
| 638 | @ RM_BG #ffc0c0 |
| 639 | @ HR_FG #888888 |
| 640 | @ HR_PAD_TOP 4 |
| 641 | @ HR_PAD_BTM 8 |
| 642 | @ FN_BG #444444 |
| 643 | @ FN_FG #ffffff |
| 644 | @ FN_PAD 5 |
| 645 | @ ERR_FG #ee0000 |
| 646 | @ PADX 5 |
| 647 | @ WIDTH 80 |
| 648 | @ HEIGHT 45 |
| 649 | @ LB_HEIGHT 25 |
| 650 | @ } |
| 651 | @ |
| 652 | @ if {![namespace exists ttk]} { |
| 653 | @ interp alias {} ::ttk::scrollbar {} ::scrollbar |
| 654 | @ interp alias {} ::ttk::menubutton {} ::menubutton |
| 655 | @ } |
| 656 | @ |
| 657 | @ proc dehtml {x} { |
| 658 | @ set x [regsub -all {<[^>]*>} $x {}] |
| 659 | @ return [string map {& & < < > > ' ' " \"} $x] |
| 660 | @ } |
| 661 | @ |
| 662 | @ proc cols {} { |
| 663 | @ return [list .lnA .txtA .mkr .lnB .txtB] |
| 664 | @ } |
| 665 | @ |
| 666 | @ proc colType {c} { |
| 667 | @ regexp {[a-z]+} $c type |
| 668 | @ return $type |
| 669 | @ } |
| 670 | @ |
| 671 | @ proc getLine {difftxt N iivar} { |
| 672 | @ upvar $iivar ii |
| 673 | @ if {$ii>=$N} {return -1} |
| 674 | @ set x [lindex $difftxt $ii] |
| 675 | @ incr ii |
| 676 | @ return $x |
| 677 | @ } |
| 678 | @ |
| 679 | @ proc readDiffs {fossilcmd} { |
| 680 | @ global difftxt |
| 681 | @ if {![info exists difftxt]} { |
| 682 | @ set in [open $fossilcmd r] |
| 683 | @ fconfigure $in -encoding utf-8 |
| 684 | @ set difftxt [split [read $in] \n] |
| 685 | @ close $in |
| 686 | @ } |
| 687 | @ set N [llength $difftxt] |
| 688 | @ set ii 0 |
| 689 | @ set nDiffs 0 |
| 690 | @ array set widths {txt 0 ln 0 mkr 0} |
| 691 | @ while {[set line [getLine $difftxt $N ii]] != -1} { |
| 692 | @ set fn2 {} |
| 693 | @ if {![regexp {^=+ (.*?) =+ versus =+ (.*?) =+$} $line all fn fn2] |
| 694 | @ && ![regexp {^=+ (.*?) =+$} $line all fn] |
| 695 | @ } { |
| 696 | @ continue |
| 697 | @ } |
| 698 | @ set errMsg "" |
| 699 | @ set line [getLine $difftxt $N ii] |
| 700 | @ if {[string compare -length 6 $line "<table"] |
| 701 | @ && ![regexp {<p[^>]*>(.+)} $line - errMsg]} { |
| 702 | @ continue |
| 703 | @ } |
| 704 | @ incr nDiffs |
| 705 | @ set idx [expr {$nDiffs > 1 ? [.txtA index end] : "1.0"}] |
| 706 | @ .wfiles.lb insert end $fn |
| 707 | @ |
| 708 | @ foreach c [cols] { |
| 709 | @ if {$nDiffs > 1} { |
| 710 | @ $c insert end \n - |
| 711 | @ } |
| 712 | @ if {[colType $c] eq "txt"} { |
| 713 | @ $c insert end $fn\n fn |
| 714 | @ if {$fn2!=""} {set fn $fn2} |
| 715 | @ } else { |
| 716 | @ $c insert end \n fn |
| 717 | @ } |
| 718 | @ $c insert end \n - |
| 719 | @ |
| 720 | @ if {$errMsg ne ""} continue |
| 721 | @ while {[getLine $difftxt $N ii] ne "<pre>"} continue |
| 722 | @ set type [colType $c] |
| 723 | @ set str {} |
| 724 | @ while {[set line [getLine $difftxt $N ii]] ne "</pre>"} { |
| 725 | @ set len [string length [dehtml $line]] |
| 726 | @ if {$len > $widths($type)} { |
| 727 | @ set widths($type) $len |
| 728 | @ } |
| 729 | @ append str $line\n |
| 730 | @ } |
| 731 | @ |
| 732 | @ set re {<span class="diff([a-z]+)">([^<]*)</span>} |
| 733 | @ # Use \r as separator since it can't appear in the diff output (it gets |
| 734 | @ # converted to a space). |
| 735 | @ set str [regsub -all $re $str "\r\\1\r\\2\r"] |
| 736 | @ foreach {pre class mid} [split $str \r] { |
| 737 | @ if {$class ne ""} { |
| 738 | @ $c insert end [dehtml $pre] - [dehtml $mid] [list $class -] |
| 739 | @ } else { |
| 740 | @ $c insert end [dehtml $pre] - |
| 741 | @ } |
| 742 | @ } |
| 743 | @ } |
| 744 | @ |
| 745 | @ if {$errMsg ne ""} { |
| 746 | @ foreach c {.txtA .txtB} {$c insert end [string trim $errMsg] err} |
| 747 | @ foreach c [cols] {$c insert end \n -} |
| 748 | @ } |
| 749 | @ } |
| 750 | @ |
| 751 | @ foreach c [cols] { |
| 752 | @ set type [colType $c] |
| 753 | @ if {$type ne "txt"} { |
| 754 | @ $c config -width $widths($type) |
| 755 | @ } |
| 756 | @ $c config -state disabled |
| 757 | @ } |
| 758 | @ if {$nDiffs <= [.wfiles.lb cget -height]} { |
| 759 | @ .wfiles.lb config -height $nDiffs |
| 760 | @ grid remove .wfiles.sb |
| 761 | @ } |
| 762 | @ |
| 763 | @ return $nDiffs |
| 764 | @ } |
| 765 | @ |
| 766 | @ proc viewDiff {idx} { |
| 767 | @ .txtA yview $idx |
| 768 | @ .txtA xview moveto 0 |
| 769 | @ } |
| 770 | @ |
| 771 | @ proc cycleDiffs {{reverse 0}} { |
| 772 | @ if {$reverse} { |
| 773 | @ set range [.txtA tag prevrange fn @0,0 1.0] |
| 774 | @ if {$range eq ""} { |
| 775 | @ viewDiff {fn.last -1c} |
| 776 | @ } else { |
| 777 | @ viewDiff [lindex $range 0] |
| 778 | @ } |
| 779 | @ } else { |
| 780 | @ set range [.txtA tag nextrange fn {@0,0 +1c} end] |
| 781 | @ if {$range eq "" || [lindex [.txtA yview] 1] == 1} { |
| 782 | @ viewDiff fn.first |
| 783 | @ } else { |
| 784 | @ viewDiff [lindex $range 0] |
| 785 | @ } |
| 786 | @ } |
| 787 | @ } |
| 788 | @ |
| 789 | @ proc prev_next_diff { prev_next } { |
| 790 | @ set range [.txtA tag nextrange active 1.0 end] |
| 791 | @ if {$prev_next eq "prev"} { |
| 792 | @ set idx0 [lindex $range 0] |
| 793 | @ if {$idx0 eq ""} {set idx0 end} |
| 794 | @ if {[.txtA compare $idx0 > @0,[winfo height .txtA]]} { |
| 795 | @ set idx0 [.txtA index @0,[winfo height .txtA]] |
| 796 | @ } |
| 797 | @ set idx "" |
| 798 | @ foreach tag [list add rm chng fn] { |
| 799 | @ foreach w [list .txtA .txtB] { |
| 800 | @ lassign [$w tag prevrange $tag $idx0 1.0] a b |
| 801 | @ if { $idx eq "" || ($a ne "" && [$w compare $a > $idx]) } { |
| 802 | @ set idx $a |
| 803 | @ set idx_end $b |
| 804 | @ set tagB $tag |
| 805 | @ set wB $w |
| 806 | @ } |
| 807 | @ } |
| 808 | @ } |
| 809 | @ if {$idx ne ""} { |
| 810 | @ while 1 { |
| 811 | @ lassign [$wB tag prevrange $tagB $idx 1.0] a b |
| 812 | @ if {$b ne "" && [$wB compare $b == "$idx - 1 l lineend"]} { |
| 813 | @ set idx $a |
| 814 | @ } else { |
| 815 | @ break |
| 816 | @ } |
| 817 | @ } |
| 818 | @ } |
| 819 | @ } else { |
| 820 | @ set idx0 [lindex $range 1] |
| 821 | @ if { $idx0 eq "" } { set idx0 1.0 } |
| 822 | @ if { [.txtA compare $idx0 < @0,0] } { |
| 823 | @ set idx0 [.txtA index @0,0] |
| 824 | @ } |
| 825 | @ set idx "" |
| 826 | @ foreach tag [list add rm chng fn] { |
| 827 | @ foreach w [list .txtA .txtB] { |
| 828 | @ lassign [$w tag nextrange $tag $idx0 end] a b |
| 829 | @ if { $idx eq "" || ($a ne "" && [$w compare $a < $idx]) } { |
| 830 | @ set idx $a |
| 831 | @ set idx_end $b |
| 832 | @ set tagB $tag |
| 833 | @ set wB $w |
| 834 | @ } |
| 835 | @ } |
| 836 | @ } |
| 837 | @ if { $idx ne "" } { |
| 838 | @ while 1 { |
| 839 | @ lassign [$wB tag nextrange $tagB $idx_end end] a b |
| 840 | @ if { $a ne "" && [$wB compare $a == "$idx_end + 1 l linestart"] } { |
| 841 | @ set idx_end $b |
| 842 | @ } else { |
| 843 | @ break |
| 844 | @ } |
| 845 | @ } |
| 846 | @ } |
| 847 | @ } |
| 848 | @ if { $idx eq "" } { |
| 849 | @ bell |
| 850 | @ return |
| 851 | @ } |
| 852 | @ set idx [.txtA index "$idx linestart"] |
| 853 | @ if { $tagB ne "fn" } { |
| 854 | @ set idx_end [.txtA index "$idx_end +1l linestart"] |
| 855 | @ } |
| 856 | @ .txtA tag remove active 1.0 end |
| 857 | @ .txtA tag add active $idx $idx_end |
| 858 | @ .txtA tag configure active -borderwidth 2 -relief raised\ |
| 859 | @ -background #eeeeee -foreground black |
| 860 | @ if { $tagB ne "fn" } { |
| 861 | @ .txtA tag lower active |
| 862 | @ } else { |
| 863 | @ .txtA tag raise active |
| 864 | @ } |
| 865 | @ .txtA see 1.0 |
| 866 | @ .txtA see $idx |
| 867 | @ } |
| 868 | @ |
| 869 | @ proc searchText {} { |
| 870 | @ set rangeA [.txtA tag nextrange search 1.0 end] |
| 871 | @ set rangeB [.txtB tag nextrange search 1.0 end] |
| 872 | @ set idx0 [lindex $rangeA 1] |
| 873 | @ if { $idx0 eq "" } { set idx0 [lindex $rangeB 1] } |
| 874 | @ if { $idx0 eq "" } { set idx0 1.0 } |
| 875 | @ set word [.bb.search get] |
| 876 | @ if { [.txtA compare $idx0 < @0,0] } { |
| 877 | @ set idx0 [.txtA index @0,0] |
| 878 | @ } |
| 879 | @ if { [info exists ::this_does_not_find] } { |
| 880 | @ if { $::this_does_not_find eq [list $idx0 $word] } { |
| 881 | @ set idx0 1.0 |
| 882 | @ } |
| 883 | @ unset ::this_does_not_find |
| 884 | @ } |
| 885 | @ set idx "" |
| 886 | @ foreach w [list .txtA .txtB] { |
| 887 | @ foreach regexp [list 0 1] { |
| 888 | @ switch $regexp { |
| 889 | @ 0 { set rexFlag "-exact" } |
| 890 | @ 1 { set rexFlag "-regexp" } |
| 891 | @ } |
| 892 | @ set err [catch { |
| 893 | @ $w search -nocase $rexFlag -count count $word $idx0 end |
| 894 | @ } idx_i] |
| 895 | @ if {!$err && $idx_i ne "" |
| 896 | @ && ($idx eq "" || [$w compare $idx_i < $idx])} { |
| 897 | @ set idx $idx_i |
| 898 | @ set countB $count |
| 899 | @ set wB $w |
| 900 | @ } |
| 901 | @ } |
| 902 | @ } |
| 903 | @ .txtA tag remove search 1.0 end |
| 904 | @ .txtB tag remove search 1.0 end |
| 905 | @ if { $idx eq "" } { |
| 906 | @ bell |
| 907 | @ set ::this_does_not_find [list $idx0 $word] |
| 908 | @ return |
| 909 | @ } |
| 910 | @ set idx_end [$wB index "$idx + $countB c"] |
| 911 | @ $wB tag add search $idx $idx_end |
| 912 | @ $wB tag configure search -borderwidth 2 -relief raised\ |
| 913 | @ -background orange -foreground black |
| 914 | @ $wB tag raise search |
| 915 | @ $wB see 1.0 |
| 916 | @ $wB see $idx |
| 917 | @ } |
| 918 | @ |
| 919 | @ proc reopen { action } { |
| 920 | @ if { ![regexp {[|]\s*(.*)} $::fossilcmd {} cmdList] } { return } |
| 921 | @ set f [lindex $cmdList 0] |
| 922 | @ set args_with_arg \ |
| 923 | @ [list binary branch context c diff-binary from r to W width] |
| 924 | @ set skip_args [list html internal i side-by-side y tk] |
| 925 | @ lassign "" argsDict files |
| 926 | @ for { set i 2 } { $i < [llength $cmdList] } { incr i } { |
| 927 | @ if { [string match "-*" [lindex $cmdList $i]] } { |
| 928 | @ set n [string trimleft [lindex $cmdList $i] "-"] |
| 929 | @ if { $n in $args_with_arg } { |
| 930 | @ dict set argsDict $n [lindex $cmdList $i+1] |
| 931 | @ incr i |
| 932 | @ } elseif { $n ni $skip_args } { |
| 933 | @ dict set argsDict $n 1 |
| 934 | @ } |
| 935 | @ } else { |
| 936 | @ lappend files [lindex $cmdList $i] |
| 937 | @ } |
| 938 | @ } |
| 939 | @ switch $action { |
| 940 | @ togglewhitespace { |
| 941 | @ if { [dict exists $argsDict w] |
| 942 | @ || [dict exists $argsDict ignore-all-space] } { |
| 943 | @ dict unset argsDict w |
| 944 | @ dict unset argsDict ignore-all-space |
| 945 | @ } else { |
| 946 | @ dict set argsDict w 1 |
| 947 | @ } |
| 948 | @ } |
| 949 | @ onefile { |
| 950 | @ set range [.txtA tag nextrange fn "@0,0" "@0,[winfo height .txtA] +1l"] |
| 951 | @ if { $range eq "" } { return } |
| 952 | @ set file [string trim [.txtA get {*}$range]] |
| 953 | @ set files [list $file] |
| 954 | @ regexp -line {local-root:\s+(.*)} [exec $f info] {} dir |
| 955 | @ cd $dir |
| 956 | @ } |
| 957 | @ allfiles { |
| 958 | @ set files "" |
| 959 | @ } |
| 960 | @ prev - |
| 961 | @ next { |
| 962 | @ set widget [focus] |
| 963 | @ if { $widget eq ".txtA" } { |
| 964 | @ set from_to from |
| 965 | @ if { ![dict exists $argsDict from] } { |
| 966 | @ dict set argsDict from current |
| 967 | @ } |
| 968 | @ } elseif { $widget eq ".txtB" } { |
| 969 | @ set from_to to |
| 970 | @ if { ![dict exists $argsDict to] } { |
| 971 | @ dict set argsDict to ckout |
| 972 | @ } |
| 973 | @ } else { |
| 974 | @ tk_messageBox -message "Click on one of the panes to select it" |
| 975 | @ return |
| 976 | @ } |
| 977 | @ lassign "" parent child current tag |
| 978 | @ set err [catch { exec $f info [dict get $argsDict $from_to] } info] |
| 979 | @ if { $err } { |
| 980 | @ if { [dict get $argsDict $from_to] eq "ckout" } { |
| 981 | @ set err [catch { exec $f info } info] |
| 982 | @ if { !$err } { regexp {checkout:\s+(\S+)} $info {} parent } |
| 983 | @ } else { |
| 984 | @ bell |
| 985 | @ return |
| 986 | @ } |
| 987 | @ } else { |
| 988 | @ regexp {uuid:\s+(\S+)\s+(\S+)} $info {} current date |
| 989 | @ regexp {parent:\s+(\S+)} $info {} parent |
| 990 | @ regexp {child:\s+(\S+)} $info {} child |
| 991 | @ } |
| 992 | @ if { [llength $files] == 1 } { |
| 993 | @ set file [lindex $files 0] |
| 994 | @ set err [catch { exec $f finfo -b -limit 100 $file } info] |
| 995 | @ if { $err } { |
| 996 | @ bell |
| 997 | @ return |
| 998 | @ } |
| 999 | @ if { $current eq "" } { |
| 1000 | @ if { $action eq "prev" } { |
| 1001 | @ regexp {^\S+} $info tag |
| 1002 | @ } |
| 1003 | @ } else { |
| 1004 | @ set current [string range $current 0 9] |
| 1005 | @ set prev "" |
| 1006 | @ set found 0 |
| 1007 | @ foreach line [split $info \n] { |
| 1008 | @ regexp {(\S+)\s+(\S+)} $line {} currentL dateL |
| 1009 | @ if { $found } { |
| 1010 | @ set tag $currentL |
| 1011 | @ break |
| 1012 | @ } elseif { $currentL eq $current || $dateL < $date } { |
| 1013 | @ if { $action eq "next" } { |
| 1014 | @ set tag $prev |
| 1015 | @ break |
| 1016 | @ } |
| 1017 | @ set found 1 |
| 1018 | @ } |
| 1019 | @ set prev $currentL |
| 1020 | @ } |
| 1021 | @ } |
| 1022 | @ } else { |
| 1023 | @ if { $action eq "prev" } { |
| 1024 | @ set tag $parent |
| 1025 | @ } else { |
| 1026 | @ set tag $child |
| 1027 | @ } |
| 1028 | @ } |
| 1029 | @ if { $tag eq "" && $action eq "prev" } { |
| 1030 | @ bell |
| 1031 | @ return |
| 1032 | @ } |
| 1033 | @ if { $tag ne "" } { |
| 1034 | @ dict set argsDict $from_to $tag |
| 1035 | @ } else { |
| 1036 | @ dict unset argsDict $from_to |
| 1037 | @ } |
| 1038 | @ if { $from_to eq "to" && ![dict exists $argsDict from] } { |
| 1039 | @ dict set argsDict from current |
| 1040 | @ } |
| 1041 | @ } |
| 1042 | @ } |
| 1043 | @ |
| 1044 | @ set f_args "" |
| 1045 | @ dict for "n v" $argsDict { |
| 1046 | @ if { $n in $args_with_arg } { |
| 1047 | @ lappend f_args -$n $v |
| 1048 | @ } else { |
| 1049 | @ lappend f_args -$n |
| 1050 | @ } |
| 1051 | @ } |
| 1052 | @ lappend f_args {*}$files |
| 1053 | @ |
| 1054 | @ # note: trying to put two contiguous "-" gives an error |
| 1055 | @ exec $f diff -tk {*}$f_args & |
| 1056 | @ exit |
| 1057 | @ } |
| 1058 | @ |
| 1059 | @ proc fossil_ui {} { |
| 1060 | @ if { ![regexp {[|]\s*(.*)} $::fossilcmd {} cmdList] } { return } |
| 1061 | @ set f [lindex $cmdList 0] |
| 1062 | @ exec $f ui & |
| 1063 | @ } |
| 1064 | @ |
| 1065 | @ proc searchToggle {} { |
| 1066 | @ set err [catch { pack info .bb.search }] |
| 1067 | @ if { $err } { |
| 1068 | @ pack .bb.search -side left -padx 5 -after .bb.files |
| 1069 | @ tk::TabToWindow .bb.search |
| 1070 | @ } else { |
| 1071 | @ .txtA tag remove search 1.0 end |
| 1072 | @ .txtB tag remove search 1.0 end |
| 1073 | @ pack forget .bb.search |
| 1074 | @ focus . |
| 1075 | @ } |
| 1076 | @ } |
| 1077 | @ |
| 1078 | @ proc xvis {col} { |
| 1079 | @ set view [$col xview] |
| 1080 | @ return [expr {[lindex $view 1]-[lindex $view 0]}] |
| 1081 | @ } |
| 1082 | @ |
| 1083 | @ proc scroll-x {args} { |
| 1084 | @ set c .txt[expr {[xvis .txtA] < [xvis .txtB] ? "A" : "B"}] |
| 1085 | @ eval $c xview $args |
| 1086 | @ } |
| 1087 | @ |
| 1088 | @ interp alias {} scroll-y {} .txtA yview |
| 1089 | @ |
| 1090 | @ proc noop {args} {} |
| 1091 | @ |
| 1092 | @ proc enableSync {axis} { |
| 1093 | @ update idletasks |
| 1094 | @ interp alias {} sync-$axis {} |
| 1095 | @ rename _sync-$axis sync-$axis |
| 1096 | @ } |
| 1097 | @ |
| 1098 | @ proc disableSync {axis} { |
| 1099 | @ rename sync-$axis _sync-$axis |
| 1100 | @ interp alias {} sync-$axis {} noop |
| 1101 | @ } |
| 1102 | @ |
| 1103 | @ proc sync-x {col first last} { |
| 1104 | @ disableSync x |
| 1105 | @ $col xview moveto [expr {$first*[xvis $col]/($last-$first)}] |
| 1106 | @ foreach side {A B} { |
| 1107 | @ set sb .sbx$side |
| 1108 | @ set xview [.txt$side xview] |
| 1109 | @ if {[lindex $xview 0] > 0 || [lindex $xview 1] < 1} { |
| 1110 | @ grid $sb |
| 1111 | @ eval $sb set $xview |
| 1112 | @ } else { |
| 1113 | @ grid remove $sb |
| 1114 | @ } |
| 1115 | @ } |
| 1116 | @ enableSync x |
| 1117 | @ } |
| 1118 | @ |
| 1119 | @ proc sync-y {first last} { |
| 1120 | @ disableSync y |
| 1121 | @ foreach c [cols] { |
| 1122 | @ $c yview moveto $first |
| 1123 | @ } |
| 1124 | @ if {$first > 0 || $last < 1} { |
| 1125 | @ grid .sby |
| 1126 | @ .sby set $first $last |
| 1127 | @ } else { |
| 1128 | @ grid remove .sby |
| 1129 | @ } |
| 1130 | @ enableSync y |
| 1131 | @ } |
| 1132 | @ |
| 1133 | @ wm withdraw . |
| 1134 | @ wm title . $CFG(TITLE) |
| 1135 | @ wm iconname . $CFG(TITLE) |
| 1136 | @ bind . <q> exit |
| 1137 | @ bind . <Destroy> {after 0 exit} |
| 1138 | @ bind . <Tab> {cycleDiffs; break} |
| 1139 | @ bind . <<PrevWindow>> {cycleDiffs 1; break} |
| 1140 | @ bind . <Return> { |
| 1141 | @ event generate .bb.files <1> |
| 1142 | @ event generate .bb.files <ButtonRelease-1> |
| 1143 | @ break |
| 1144 | @ } |
| 1145 | @ foreach {key axis args} { |
| 1146 | @ Up y {scroll -5 units} |
| 1147 | @ Down y {scroll 5 units} |
| 1148 | @ Left x {scroll -5 units} |
| 1149 | @ Right x {scroll 5 units} |
| 1150 | @ Prior y {scroll -1 page} |
| 1151 | @ Next y {scroll 1 page} |
| 1152 | @ Home y {moveto 0} |
| 1153 | @ End y {moveto 1} |
| 1154 | @ } { |
| 1155 | @ bind . <$key> "scroll-$axis $args; break" |
| 1156 | @ bind . <Shift-$key> continue |
| 1157 | @ } |
| 1158 | @ |
| 1159 | @ frame .bb |
| 1160 | @ ::ttk::menubutton .bb.files -text "Files" |
| 1161 | @ toplevel .wfiles |
| 1162 | @ wm withdraw .wfiles |
| 1163 | @ update idletasks |
| 1164 | @ wm transient .wfiles . |
| 1165 | @ wm overrideredirect .wfiles 1 |
| 1166 | @ listbox .wfiles.lb -width 0 -height $CFG(LB_HEIGHT) -activestyle none \ |
| 1167 | @ -yscroll {.wfiles.sb set} |
| 1168 | @ ::ttk::scrollbar .wfiles.sb -command {.wfiles.lb yview} |
| 1169 | @ grid .wfiles.lb .wfiles.sb -sticky ns |
| 1170 | @ bind .bb.files <1> { |
| 1171 | @ set x [winfo rootx %W] |
| 1172 | @ set y [expr {[winfo rooty %W]+[winfo height %W]}] |
| 1173 | @ wm geometry .wfiles +$x+$y |
| 1174 | @ wm deiconify .wfiles |
| 1175 | @ focus .wfiles.lb |
| 1176 | @ } |
| 1177 | @ bind .wfiles <FocusOut> {wm withdraw .wfiles} |
| 1178 | @ bind .wfiles <Escape> {focus .} |
| 1179 | @ foreach evt {1 Return} { |
| 1180 | @ bind .wfiles.lb <$evt> { |
| 1181 | @ catch { |
| 1182 | @ set idx [lindex [.txtA tag ranges fn] [expr {[%W curselection]*2}]] |
| 1183 | @ viewDiff $idx |
| 1184 | @ } |
| 1185 | @ focus . |
| 1186 | @ break |
| 1187 | @ } |
| 1188 | @ } |
| 1189 | @ bind .wfiles.lb <Motion> { |
| 1190 | @ %W selection clear 0 end |
| 1191 | @ %W selection set @%x,%y |
| 1192 | @ } |
| 1193 | @ |
| 1194 | @ foreach {side syncCol} {A .txtB B .txtA} { |
| 1195 | @ set ln .ln$side |
| 1196 | @ text $ln |
| 1197 | @ $ln tag config - -justify right |
| 1198 | @ |
| 1199 | @ set txt .txt$side |
| 1200 | @ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ |
| 1201 | @ -xscroll "sync-x $syncCol" |
| 1202 | @ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5 |
| 1203 | @ foreach tag {add rm chng} { |
| 1204 | @ $txt tag config $tag -background $CFG([string toupper $tag]_BG) |
| 1205 | @ $txt tag lower $tag |
| 1206 | @ } |
| 1207 | @ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ |
| 1208 | @ -justify center |
| 1209 | @ $txt tag config err -foreground $CFG(ERR_FG) |
| 1210 | @ } |
| 1211 | @ text .mkr |
| 1212 | @ |
| 1213 | @ foreach c [cols] { |
| 1214 | @ set keyPrefix [string toupper [colType $c]]_COL_ |
| 1215 | @ if {[tk windowingsystem] eq "win32"} {$c config -font {courier 9}} |
| 1216 | @ $c config -bg $CFG(${keyPrefix}BG) -fg $CFG(${keyPrefix}FG) -borderwidth 0 \ |
| 1217 | @ -padx $CFG(PADX) -yscroll sync-y |
| 1218 | @ $c tag config hr -spacing1 $CFG(HR_PAD_TOP) -spacing3 $CFG(HR_PAD_BTM) \ |
| 1219 | @ -foreground $CFG(HR_FG) |
| 1220 | @ $c tag config fn -spacing1 $CFG(FN_PAD) -spacing3 $CFG(FN_PAD) |
| 1221 | @ bindtags $c ". $c Text all" |
| 1222 | @ bind $c <1> {focus %W} |
| 1223 | @ } |
| 1224 | @ |
| 1225 | @ ::ttk::scrollbar .sby -command {.txtA yview} -orient vertical |
| 1226 | @ ::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal |
| 1227 | @ ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal |
| 1228 | @ frame .spacer |
| 1229 | @ |
| 1230 | @ if {[readDiffs $fossilcmd] == 0} { |
| 1231 | @ tk_messageBox -type ok -title $CFG(TITLE) -message "No changes" |
| 1232 | @ #exit |
| 1233 | @ } |
| 1234 | @ update idletasks |
| 1235 | @ |
| 1236 | @ proc saveDiff {} { |
| 1237 | @ set fn [tk_getSaveFile] |
| 1238 | @ if {$fn==""} return |
| 1239 | @ set out [open $fn wb] |
| 1240 | @ puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'" |
| 1241 | @ puts $out "# to see the graphical diff.\n#" |
| 1242 | @ puts $out "set fossilcmd {}" |
| 1243 | @ puts $out "set prog [list $::prog]" |
| 1244 | @ puts $out "set difftxt \173" |
| 1245 | @ foreach e $::difftxt {puts $out [list $e]} |
| 1246 | @ puts $out "\175" |
| 1247 | @ puts $out "eval \$prog" |
| 1248 | @ close $out |
| 1249 | @ } |
| 1250 | @ proc invertDiff {} { |
| 1251 | @ global CFG |
| 1252 | @ array set x [grid info .txtA] |
| 1253 | @ if {$x(-column)==1} { |
| 1254 | @ grid config .lnB -column 0 |
| 1255 | @ grid config .txtB -column 1 |
| 1256 | @ .txtB tag config add -background $CFG(RM_BG) |
| 1257 | @ grid config .lnA -column 3 |
| 1258 | @ grid config .txtA -column 4 |
| 1259 | @ .txtA tag config rm -background $CFG(ADD_BG) |
| 1260 | @ } else { |
| 1261 | @ grid config .lnA -column 0 |
| 1262 | @ grid config .txtA -column 1 |
| 1263 | @ .txtA tag config rm -background $CFG(RM_BG) |
| 1264 | @ grid config .lnB -column 3 |
| 1265 | @ grid config .txtB -column 4 |
| 1266 | @ .txtB tag config add -background $CFG(ADD_BG) |
| 1267 | @ } |
| 1268 | @ .mkr config -state normal |
| 1269 | @ set clt [.mkr search -all < 1.0 end] |
| 1270 | @ set cgt [.mkr search -all > 1.0 end] |
| 1271 | @ foreach c $clt {.mkr replace $c "$c +1 chars" >} |
| 1272 | @ foreach c $cgt {.mkr replace $c "$c +1 chars" <} |
| 1273 | @ .mkr config -state disabled |
| 1274 | @ } |
| 1275 | @ proc bind_key_do { cmd } { |
| 1276 | @ if { [focus] eq ".bb.search" } { return -code continue } |
| 1277 | @ uplevel #0 $cmd |
| 1278 | @ return -code break |
| 1279 | @ } |
| 1280 | @ ::ttk::menubutton .bb.actions -text "Actions" -menu .bb.actions.m |
| 1281 | @ menu .bb.actions.m -tearoff 0 |
| 1282 | @ .bb.actions.m add command -label "Go to previous diff" -acc "p" -command "prev_next_diff prev" |
| 1283 | @ .bb.actions.m add command -label "Go to next diff" -acc "n" -command "prev_next_diff next" |
| 1284 | @ .bb.actions.m add separator |
| 1285 | @ .bb.actions.m add command -label "Search" -acc "f" -command "searchToggle;" |
| 1286 | @ .bb.actions.m add command -label "Toggle whitespace" -acc "w" -command "reopen togglewhitespace" |
| 1287 | @ .bb.actions.m add separator |
| 1288 | @ .bb.actions.m add command -label "View one file" -acc "1" -command "reopen onefile" |
| 1289 | @ .bb.actions.m add command -label "View all files" -acc "a" -command "reopen allfiles" |
| 1290 | @ .bb.actions.m add separator |
| 1291 | @ .bb.actions.m add command -label "Older version" -acc "Shift-P" -command "reopen prev" |
| 1292 | @ .bb.actions.m add command -label "Newer version" -acc "Shift-N" -command "reopen next" |
| 1293 | @ .bb.actions.m add command -label "Fossil ui" -acc "u" -command "fossil_ui" |
| 1294 | @ ::ttk::button .bb.quit -text {Quit} -command exit |
| 1295 | @ ::ttk::button .bb.invert -text {Invert} -command invertDiff |
| 1296 | @ ::ttk::button .bb.save -text {Save As...} -command saveDiff |
| 1297 | @ ::ttk::entry .bb.search -width 12 |
| 1298 | @ |
| 1299 | @ bind .bb.search <Return> "searchText; break" |
| 1300 | @ bind .bb.search <Escape> "searchToggle; break" |
| 1301 | @ |
| 1302 | @ bind . <Key-f> [list bind_key_do "searchToggle"] |
| 1303 | @ bind . <Key-w> [list bind_key_do "reopen togglewhitespace"] |
| 1304 | @ bind . <Key-1> [list bind_key_do "reopen onefile"] |
| 1305 | @ bind . <Key-a> [list bind_key_do "reopen allfiles"] |
| 1306 | @ bind . <Key-P> [list bind_key_do "reopen prev"] |
| 1307 | @ bind . <Key-N> [list bind_key_do "reopen next"] |
| 1308 | @ bind . <Key-u> [list bind_key_do "fossil_ui"] |
| 1309 | @ |
| 1310 | @ lassign [list "(current)" "(ckout)"] from to |
| 1311 | @ if { [regexp {[|]\s*(.*)} $::fossilcmd {} cmdList] } { |
| 1312 | @ set f [lindex $cmdList 0] |
| 1313 | @ if { [regexp {([-][-]?from|-r)\s+(\S+)} [join $cmdList " "] {} {} from] } { |
| 1314 | @ set err [catch { exec $f info $from } info] |
| 1315 | @ if { !$err } { |
| 1316 | @ regexp {uuid:\s+(\S+)\s+(\S+)\s+(\S+)} $info {} from date time |
| 1317 | @ set from "\[[string range $from 0 9]\] $date $time" |
| 1318 | @ } |
| 1319 | @ } |
| 1320 | @ if { [regexp {([-][-]?to)\s+(\S+)} [join $cmdList " "] {} {} to] } { |
| 1321 | @ set err [catch { exec $f info $to } info] |
| 1322 | @ if { !$err } { |
| 1323 | @ regexp {uuid:\s+(\S+)\s+(\S+)\s+(\S+)} $info {} to date time |
| 1324 | @ set to "\[[string range $to 0 9]\] $date $time" |
| 1325 | @ } |
| 1326 | @ } |
| 1327 | @ } |
| 1328 | @ |
| 1329 | @ ttk::label .bb.from -text $from |
| 1330 | @ ttk::label .bb.to -text $to |
| 1331 | @ |
| 1332 | @ pack .bb.from -side left -padx "2 25" |
| 1333 | @ pack .bb.quit .bb.invert -side left |
| 1334 | @ if {$fossilcmd!=""} {pack .bb.save -side left} |
| 1335 | @ pack .bb.files -side left |
| 1336 | @ pack .bb.actions -side left |
| 1337 | @ pack .bb.to -side left -padx "25 2" |
| 1338 | @ grid rowconfigure . 1 -weight 1 |
| 1339 | @ grid columnconfigure . 1 -weight 1 |
| 1340 | @ grid columnconfigure . 4 -weight 1 |
| 1341 | @ grid .bb -row 0 -columnspan 7 |
| 1342 | @ eval grid [cols] -row 1 -sticky nsew |
| 1343 | @ grid .sby -row 1 -column 5 -sticky ns |
| 1344 | @ grid .sbxA -row 2 -columnspan 2 -sticky ew |
| 1345 | @ grid .spacer -row 2 -column 2 |
| 1346 | @ grid .sbxB -row 2 -column 3 -columnspan 2 -sticky ew |
| 1347 | @ |
| 1348 | @ .spacer config -height [winfo height .sbxA] |
| 1349 | @ wm deiconify . |
| 1350 | @ } |
| 1351 | @ eval $prog |
| 1352 | ; |
| 1353 | |
| 1354 | /* |
| 1355 | ** Show diff output in a Tcl/Tk window, in response to the --tk option |
| 1356 | ** to the diff command. |
| 1357 | ** |
| 1358 | ** If fossil has direct access to a Tcl interpreter (either loaded |
| @@ -1386,11 +654,11 @@ | |
| 1386 | int j; |
| 1387 | blob_append(&script, " ", 1); |
| 1388 | for(j=0; z[j]; j++) blob_appendf(&script, "\\%03o", (unsigned char)z[j]); |
| 1389 | } |
| 1390 | } |
| 1391 | blob_appendf(&script, "}\n%s", zDiffScript); |
| 1392 | if( zTempFile ){ |
| 1393 | blob_write_to_file(&script, zTempFile); |
| 1394 | fossil_print("To see diff, run: tclsh \"%s\"\n", zTempFile); |
| 1395 | }else{ |
| 1396 | #if defined(FOSSIL_ENABLE_TCL) |
| 1397 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -617,742 +617,10 @@ | |
| 617 | zName = "diff-command"; |
| 618 | } |
| 619 | return db_get(zName, zDefault); |
| 620 | } |
| 621 | |
| 622 | /* |
| 623 | ** Show diff output in a Tcl/Tk window, in response to the --tk option |
| 624 | ** to the diff command. |
| 625 | ** |
| 626 | ** If fossil has direct access to a Tcl interpreter (either loaded |
| @@ -1386,11 +654,11 @@ | |
| 654 | int j; |
| 655 | blob_append(&script, " ", 1); |
| 656 | for(j=0; z[j]; j++) blob_appendf(&script, "\\%03o", (unsigned char)z[j]); |
| 657 | } |
| 658 | } |
| 659 | blob_appendf(&script, "}\n%s", builtin_file("diff.tcl", 0)); |
| 660 | if( zTempFile ){ |
| 661 | blob_write_to_file(&script, zTempFile); |
| 662 | fossil_print("To see diff, run: tclsh \"%s\"\n", zTempFile); |
| 663 | }else{ |
| 664 | #if defined(FOSSIL_ENABLE_TCL) |
| 665 |
+2
-2
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -71,12 +71,12 @@ | ||
| 71 | 71 | /* |
| 72 | 72 | ** Found beginning of email address. Look for the end and extract |
| 73 | 73 | ** the part. |
| 74 | 74 | */ |
| 75 | 75 | zEmail = mprintf("%s", &zContact[i]); |
| 76 | - for(i=0; zEmail[i] && zEmail[i]!='>'; i++){} | |
| 77 | - if( zEmail[i]=='>' ) zEmail[i+1] = 0; | |
| 76 | + for(j=0; zEmail[j] && zEmail[j]!='>'; j++){} | |
| 77 | + if( zEmail[j]=='>' ) zEmail[j+1] = 0; | |
| 78 | 78 | }else{ |
| 79 | 79 | /* |
| 80 | 80 | ** Found an end marker for email, but nothing else. |
| 81 | 81 | */ |
| 82 | 82 | zEmail = mprintf("<%s>", zUser); |
| 83 | 83 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -71,12 +71,12 @@ | |
| 71 | /* |
| 72 | ** Found beginning of email address. Look for the end and extract |
| 73 | ** the part. |
| 74 | */ |
| 75 | zEmail = mprintf("%s", &zContact[i]); |
| 76 | for(i=0; zEmail[i] && zEmail[i]!='>'; i++){} |
| 77 | if( zEmail[i]=='>' ) zEmail[i+1] = 0; |
| 78 | }else{ |
| 79 | /* |
| 80 | ** Found an end marker for email, but nothing else. |
| 81 | */ |
| 82 | zEmail = mprintf("<%s>", zUser); |
| 83 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -71,12 +71,12 @@ | |
| 71 | /* |
| 72 | ** Found beginning of email address. Look for the end and extract |
| 73 | ** the part. |
| 74 | */ |
| 75 | zEmail = mprintf("%s", &zContact[i]); |
| 76 | for(j=0; zEmail[j] && zEmail[j]!='>'; j++){} |
| 77 | if( zEmail[j]=='>' ) zEmail[j+1] = 0; |
| 78 | }else{ |
| 79 | /* |
| 80 | ** Found an end marker for email, but nothing else. |
| 81 | */ |
| 82 | zEmail = mprintf("<%s>", zUser); |
| 83 |
+22
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -20,10 +20,11 @@ | ||
| 20 | 20 | $(SRCDIR)/bag.c \ |
| 21 | 21 | $(SRCDIR)/bisect.c \ |
| 22 | 22 | $(SRCDIR)/blob.c \ |
| 23 | 23 | $(SRCDIR)/branch.c \ |
| 24 | 24 | $(SRCDIR)/browse.c \ |
| 25 | + $(SRCDIR)/builtin.c \ | |
| 25 | 26 | $(SRCDIR)/cache.c \ |
| 26 | 27 | $(SRCDIR)/captcha.c \ |
| 27 | 28 | $(SRCDIR)/cgi.c \ |
| 28 | 29 | $(SRCDIR)/checkin.c \ |
| 29 | 30 | $(SRCDIR)/checkout.c \ |
| @@ -124,19 +125,23 @@ | ||
| 124 | 125 | $(SRCDIR)/wysiwyg.c \ |
| 125 | 126 | $(SRCDIR)/xfer.c \ |
| 126 | 127 | $(SRCDIR)/xfersetup.c \ |
| 127 | 128 | $(SRCDIR)/zip.c |
| 128 | 129 | |
| 130 | +EXTRA_FILES = \ | |
| 131 | + $(SRCDIR)/diff.tcl | |
| 132 | + | |
| 129 | 133 | TRANS_SRC = \ |
| 130 | 134 | $(OBJDIR)/add_.c \ |
| 131 | 135 | $(OBJDIR)/allrepo_.c \ |
| 132 | 136 | $(OBJDIR)/attach_.c \ |
| 133 | 137 | $(OBJDIR)/bag_.c \ |
| 134 | 138 | $(OBJDIR)/bisect_.c \ |
| 135 | 139 | $(OBJDIR)/blob_.c \ |
| 136 | 140 | $(OBJDIR)/branch_.c \ |
| 137 | 141 | $(OBJDIR)/browse_.c \ |
| 142 | + $(OBJDIR)/builtin_.c \ | |
| 138 | 143 | $(OBJDIR)/cache_.c \ |
| 139 | 144 | $(OBJDIR)/captcha_.c \ |
| 140 | 145 | $(OBJDIR)/cgi_.c \ |
| 141 | 146 | $(OBJDIR)/checkin_.c \ |
| 142 | 147 | $(OBJDIR)/checkout_.c \ |
| @@ -246,10 +251,11 @@ | ||
| 246 | 251 | $(OBJDIR)/bag.o \ |
| 247 | 252 | $(OBJDIR)/bisect.o \ |
| 248 | 253 | $(OBJDIR)/blob.o \ |
| 249 | 254 | $(OBJDIR)/branch.o \ |
| 250 | 255 | $(OBJDIR)/browse.o \ |
| 256 | + $(OBJDIR)/builtin.o \ | |
| 251 | 257 | $(OBJDIR)/cache.o \ |
| 252 | 258 | $(OBJDIR)/captcha.o \ |
| 253 | 259 | $(OBJDIR)/cgi.o \ |
| 254 | 260 | $(OBJDIR)/checkin.o \ |
| 255 | 261 | $(OBJDIR)/checkout.o \ |
| @@ -375,10 +381,13 @@ | ||
| 375 | 381 | $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c |
| 376 | 382 | |
| 377 | 383 | $(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c |
| 378 | 384 | $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c |
| 379 | 385 | |
| 386 | +$(OBJDIR)/mkbuiltin: $(SRCDIR)/mkbuiltin.c | |
| 387 | + $(BCC) -o $(OBJDIR)/mkbuiltin $(SRCDIR)/mkbuiltin.c | |
| 388 | + | |
| 380 | 389 | $(OBJDIR)/mkversion: $(SRCDIR)/mkversion.c |
| 381 | 390 | $(BCC) -o $(OBJDIR)/mkversion $(SRCDIR)/mkversion.c |
| 382 | 391 | |
| 383 | 392 | $(OBJDIR)/codecheck1: $(SRCDIR)/codecheck1.c |
| 384 | 393 | $(BCC) -o $(OBJDIR)/codecheck1 $(SRCDIR)/codecheck1.c |
| @@ -452,19 +461,24 @@ | ||
| 452 | 461 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 453 | 462 | |
| 454 | 463 | |
| 455 | 464 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 456 | 465 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 457 | -$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h | |
| 466 | + | |
| 467 | +$(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES) | |
| 468 | + $(OBJDIR)/mkbuiltin $(EXTRA_FILES) >$@ | |
| 469 | + | |
| 470 | +$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h | |
| 458 | 471 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \ |
| 459 | 472 | $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \ |
| 460 | 473 | $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \ |
| 461 | 474 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 462 | 475 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 463 | 476 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 464 | 477 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 465 | 478 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 479 | + $(OBJDIR)/builtin_.c:$(OBJDIR)/builtin.h \ | |
| 466 | 480 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 467 | 481 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 468 | 482 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 469 | 483 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 470 | 484 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| @@ -627,10 +641,17 @@ | ||
| 627 | 641 | |
| 628 | 642 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 629 | 643 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 630 | 644 | |
| 631 | 645 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 646 | +$(OBJDIR)/builtin_.c: $(SRCDIR)/builtin.c $(OBJDIR)/translate | |
| 647 | + $(OBJDIR)/translate $(SRCDIR)/builtin.c >$(OBJDIR)/builtin_.c | |
| 648 | + | |
| 649 | +$(OBJDIR)/builtin.o: $(OBJDIR)/builtin_.c $(OBJDIR)/builtin.h $(OBJDIR)/builtin_data.h $(SRCDIR)/config.h | |
| 650 | + $(XTCC) -o $(OBJDIR)/builtin.o -c $(OBJDIR)/builtin_.c | |
| 651 | + | |
| 652 | +$(OBJDIR)/builtin.h: $(OBJDIR)/headers | |
| 632 | 653 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate |
| 633 | 654 | $(OBJDIR)/translate $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 634 | 655 | |
| 635 | 656 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 636 | 657 | $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c |
| 637 | 658 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -20,10 +20,11 @@ | |
| 20 | $(SRCDIR)/bag.c \ |
| 21 | $(SRCDIR)/bisect.c \ |
| 22 | $(SRCDIR)/blob.c \ |
| 23 | $(SRCDIR)/branch.c \ |
| 24 | $(SRCDIR)/browse.c \ |
| 25 | $(SRCDIR)/cache.c \ |
| 26 | $(SRCDIR)/captcha.c \ |
| 27 | $(SRCDIR)/cgi.c \ |
| 28 | $(SRCDIR)/checkin.c \ |
| 29 | $(SRCDIR)/checkout.c \ |
| @@ -124,19 +125,23 @@ | |
| 124 | $(SRCDIR)/wysiwyg.c \ |
| 125 | $(SRCDIR)/xfer.c \ |
| 126 | $(SRCDIR)/xfersetup.c \ |
| 127 | $(SRCDIR)/zip.c |
| 128 | |
| 129 | TRANS_SRC = \ |
| 130 | $(OBJDIR)/add_.c \ |
| 131 | $(OBJDIR)/allrepo_.c \ |
| 132 | $(OBJDIR)/attach_.c \ |
| 133 | $(OBJDIR)/bag_.c \ |
| 134 | $(OBJDIR)/bisect_.c \ |
| 135 | $(OBJDIR)/blob_.c \ |
| 136 | $(OBJDIR)/branch_.c \ |
| 137 | $(OBJDIR)/browse_.c \ |
| 138 | $(OBJDIR)/cache_.c \ |
| 139 | $(OBJDIR)/captcha_.c \ |
| 140 | $(OBJDIR)/cgi_.c \ |
| 141 | $(OBJDIR)/checkin_.c \ |
| 142 | $(OBJDIR)/checkout_.c \ |
| @@ -246,10 +251,11 @@ | |
| 246 | $(OBJDIR)/bag.o \ |
| 247 | $(OBJDIR)/bisect.o \ |
| 248 | $(OBJDIR)/blob.o \ |
| 249 | $(OBJDIR)/branch.o \ |
| 250 | $(OBJDIR)/browse.o \ |
| 251 | $(OBJDIR)/cache.o \ |
| 252 | $(OBJDIR)/captcha.o \ |
| 253 | $(OBJDIR)/cgi.o \ |
| 254 | $(OBJDIR)/checkin.o \ |
| 255 | $(OBJDIR)/checkout.o \ |
| @@ -375,10 +381,13 @@ | |
| 375 | $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c |
| 376 | |
| 377 | $(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c |
| 378 | $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c |
| 379 | |
| 380 | $(OBJDIR)/mkversion: $(SRCDIR)/mkversion.c |
| 381 | $(BCC) -o $(OBJDIR)/mkversion $(SRCDIR)/mkversion.c |
| 382 | |
| 383 | $(OBJDIR)/codecheck1: $(SRCDIR)/codecheck1.c |
| 384 | $(BCC) -o $(OBJDIR)/codecheck1 $(SRCDIR)/codecheck1.c |
| @@ -452,19 +461,24 @@ | |
| 452 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 453 | |
| 454 | |
| 455 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 456 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 457 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 458 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \ |
| 459 | $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \ |
| 460 | $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \ |
| 461 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 462 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 463 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 464 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 465 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 466 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 467 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 468 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 469 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 470 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| @@ -627,10 +641,17 @@ | |
| 627 | |
| 628 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 629 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 630 | |
| 631 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 632 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate |
| 633 | $(OBJDIR)/translate $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 634 | |
| 635 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 636 | $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c |
| 637 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -20,10 +20,11 @@ | |
| 20 | $(SRCDIR)/bag.c \ |
| 21 | $(SRCDIR)/bisect.c \ |
| 22 | $(SRCDIR)/blob.c \ |
| 23 | $(SRCDIR)/branch.c \ |
| 24 | $(SRCDIR)/browse.c \ |
| 25 | $(SRCDIR)/builtin.c \ |
| 26 | $(SRCDIR)/cache.c \ |
| 27 | $(SRCDIR)/captcha.c \ |
| 28 | $(SRCDIR)/cgi.c \ |
| 29 | $(SRCDIR)/checkin.c \ |
| 30 | $(SRCDIR)/checkout.c \ |
| @@ -124,19 +125,23 @@ | |
| 125 | $(SRCDIR)/wysiwyg.c \ |
| 126 | $(SRCDIR)/xfer.c \ |
| 127 | $(SRCDIR)/xfersetup.c \ |
| 128 | $(SRCDIR)/zip.c |
| 129 | |
| 130 | EXTRA_FILES = \ |
| 131 | $(SRCDIR)/diff.tcl |
| 132 | |
| 133 | TRANS_SRC = \ |
| 134 | $(OBJDIR)/add_.c \ |
| 135 | $(OBJDIR)/allrepo_.c \ |
| 136 | $(OBJDIR)/attach_.c \ |
| 137 | $(OBJDIR)/bag_.c \ |
| 138 | $(OBJDIR)/bisect_.c \ |
| 139 | $(OBJDIR)/blob_.c \ |
| 140 | $(OBJDIR)/branch_.c \ |
| 141 | $(OBJDIR)/browse_.c \ |
| 142 | $(OBJDIR)/builtin_.c \ |
| 143 | $(OBJDIR)/cache_.c \ |
| 144 | $(OBJDIR)/captcha_.c \ |
| 145 | $(OBJDIR)/cgi_.c \ |
| 146 | $(OBJDIR)/checkin_.c \ |
| 147 | $(OBJDIR)/checkout_.c \ |
| @@ -246,10 +251,11 @@ | |
| 251 | $(OBJDIR)/bag.o \ |
| 252 | $(OBJDIR)/bisect.o \ |
| 253 | $(OBJDIR)/blob.o \ |
| 254 | $(OBJDIR)/branch.o \ |
| 255 | $(OBJDIR)/browse.o \ |
| 256 | $(OBJDIR)/builtin.o \ |
| 257 | $(OBJDIR)/cache.o \ |
| 258 | $(OBJDIR)/captcha.o \ |
| 259 | $(OBJDIR)/cgi.o \ |
| 260 | $(OBJDIR)/checkin.o \ |
| 261 | $(OBJDIR)/checkout.o \ |
| @@ -375,10 +381,13 @@ | |
| 381 | $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c |
| 382 | |
| 383 | $(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c |
| 384 | $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c |
| 385 | |
| 386 | $(OBJDIR)/mkbuiltin: $(SRCDIR)/mkbuiltin.c |
| 387 | $(BCC) -o $(OBJDIR)/mkbuiltin $(SRCDIR)/mkbuiltin.c |
| 388 | |
| 389 | $(OBJDIR)/mkversion: $(SRCDIR)/mkversion.c |
| 390 | $(BCC) -o $(OBJDIR)/mkversion $(SRCDIR)/mkversion.c |
| 391 | |
| 392 | $(OBJDIR)/codecheck1: $(SRCDIR)/codecheck1.c |
| 393 | $(BCC) -o $(OBJDIR)/codecheck1 $(SRCDIR)/codecheck1.c |
| @@ -452,19 +461,24 @@ | |
| 461 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 462 | |
| 463 | |
| 464 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 465 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 466 | |
| 467 | $(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES) |
| 468 | $(OBJDIR)/mkbuiltin $(EXTRA_FILES) >$@ |
| 469 | |
| 470 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 471 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \ |
| 472 | $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \ |
| 473 | $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \ |
| 474 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 475 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 476 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 477 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 478 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 479 | $(OBJDIR)/builtin_.c:$(OBJDIR)/builtin.h \ |
| 480 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 481 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 482 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 483 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 484 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| @@ -627,10 +641,17 @@ | |
| 641 | |
| 642 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 643 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 644 | |
| 645 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 646 | $(OBJDIR)/builtin_.c: $(SRCDIR)/builtin.c $(OBJDIR)/translate |
| 647 | $(OBJDIR)/translate $(SRCDIR)/builtin.c >$(OBJDIR)/builtin_.c |
| 648 | |
| 649 | $(OBJDIR)/builtin.o: $(OBJDIR)/builtin_.c $(OBJDIR)/builtin.h $(OBJDIR)/builtin_data.h $(SRCDIR)/config.h |
| 650 | $(XTCC) -o $(OBJDIR)/builtin.o -c $(OBJDIR)/builtin_.c |
| 651 | |
| 652 | $(OBJDIR)/builtin.h: $(OBJDIR)/headers |
| 653 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(OBJDIR)/translate |
| 654 | $(OBJDIR)/translate $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 655 | |
| 656 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 657 | $(XTCC) -o $(OBJDIR)/cache.o -c $(OBJDIR)/cache_.c |
| 658 |
+78
-10
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -12,12 +12,15 @@ | ||
| 12 | 12 | # tclsh makemake.tcl |
| 13 | 13 | # |
| 14 | 14 | ############################################################################# |
| 15 | 15 | |
| 16 | 16 | # Basenames of all source files that get preprocessed using |
| 17 | -# "translate" and "makeheaders". To add new source files to the | |
| 17 | +# "translate" and "makeheaders". To add new C-language source files to the | |
| 18 | 18 | # project, simply add the basename to this list and rerun this script. |
| 19 | +# | |
| 20 | +# Set the separate extra_files variable further down for how to add non-C | |
| 21 | +# files, such as string and BLOB resources. | |
| 19 | 22 | # |
| 20 | 23 | set src { |
| 21 | 24 | add |
| 22 | 25 | allrepo |
| 23 | 26 | attach |
| @@ -24,10 +27,11 @@ | ||
| 24 | 27 | bag |
| 25 | 28 | bisect |
| 26 | 29 | blob |
| 27 | 30 | branch |
| 28 | 31 | browse |
| 32 | + builtin | |
| 29 | 33 | cache |
| 30 | 34 | captcha |
| 31 | 35 | cgi |
| 32 | 36 | checkin |
| 33 | 37 | checkout |
| @@ -128,10 +132,16 @@ | ||
| 128 | 132 | xfer |
| 129 | 133 | xfersetup |
| 130 | 134 | zip |
| 131 | 135 | http_ssl |
| 132 | 136 | } |
| 137 | + | |
| 138 | +# Additional resource files that get built into the executable. | |
| 139 | +# | |
| 140 | +set extra_files { | |
| 141 | + diff.tcl | |
| 142 | +} | |
| 133 | 143 | |
| 134 | 144 | # Options used to compile the included SQLite library. |
| 135 | 145 | # |
| 136 | 146 | set SQLITE_OPTIONS { |
| 137 | 147 | -DNDEBUG=1 |
| @@ -217,10 +227,15 @@ | ||
| 217 | 227 | } |
| 218 | 228 | writeln -nonewline "SRC =" |
| 219 | 229 | foreach s [lsort $src] { |
| 220 | 230 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 221 | 231 | } |
| 232 | +writeln "\n" | |
| 233 | +writeln -nonewline "EXTRA_FILES =" | |
| 234 | +foreach s [lsort $extra_files] { | |
| 235 | + writeln -nonewline " \\\n \$(SRCDIR)/$s" | |
| 236 | +} | |
| 222 | 237 | writeln "\n" |
| 223 | 238 | writeln -nonewline "TRANS_SRC =" |
| 224 | 239 | foreach s [lsort $src] { |
| 225 | 240 | writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c" |
| 226 | 241 | } |
| @@ -256,10 +271,13 @@ | ||
| 256 | 271 | $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c |
| 257 | 272 | |
| 258 | 273 | $(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c |
| 259 | 274 | $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c |
| 260 | 275 | |
| 276 | +$(OBJDIR)/mkbuiltin: $(SRCDIR)/mkbuiltin.c | |
| 277 | + $(BCC) -o $(OBJDIR)/mkbuiltin $(SRCDIR)/mkbuiltin.c | |
| 278 | + | |
| 261 | 279 | $(OBJDIR)/mkversion: $(SRCDIR)/mkversion.c |
| 262 | 280 | $(BCC) -o $(OBJDIR)/mkversion $(SRCDIR)/mkversion.c |
| 263 | 281 | |
| 264 | 282 | $(OBJDIR)/codecheck1: $(SRCDIR)/codecheck1.c |
| 265 | 283 | $(BCC) -o $(OBJDIR)/codecheck1 $(SRCDIR)/codecheck1.c |
| @@ -336,18 +354,23 @@ | ||
| 336 | 354 | append mhargs "\$(SRCDIR)/th.h <<<NEXT_LINE>>>" |
| 337 | 355 | #append mhargs "\$(SRCDIR)/cson_amalgamation.h <<<NEXT_LINE>>>" |
| 338 | 356 | append mhargs "\$(OBJDIR)/VERSION.h" |
| 339 | 357 | set mhargs [string map [list <<<NEXT_LINE>>> \\\n\t] $mhargs] |
| 340 | 358 | writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex" |
| 341 | -writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@" | |
| 342 | -writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h" | |
| 359 | +writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@\n" | |
| 360 | + | |
| 361 | +writeln "\$(OBJDIR)/builtin_data.h: \$(OBJDIR)/mkbuiltin \$(EXTRA_FILES)" | |
| 362 | +writeln "\t\$(OBJDIR)/mkbuiltin \$(EXTRA_FILES) >$@\n" | |
| 363 | + | |
| 364 | +writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h" | |
| 343 | 365 | writeln "\t\$(OBJDIR)/makeheaders $mhargs" |
| 344 | 366 | writeln "\ttouch \$(OBJDIR)/headers" |
| 345 | 367 | writeln "\$(OBJDIR)/headers: Makefile" |
| 346 | 368 | writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/json_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h" |
| 347 | 369 | writeln "Makefile:" |
| 348 | 370 | set extra_h(main) " \$(OBJDIR)/page_index.h " |
| 371 | +set extra_h(builtin) " \$(OBJDIR)/builtin_data.h " | |
| 349 | 372 | |
| 350 | 373 | foreach s [lsort $src] { |
| 351 | 374 | writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate" |
| 352 | 375 | writeln "\t\$(OBJDIR)/translate \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n" |
| 353 | 376 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h$extra_h($s)\$(SRCDIR)/config.h" |
| @@ -733,10 +756,15 @@ | ||
| 733 | 756 | } |
| 734 | 757 | writeln -nonewline "SRC =" |
| 735 | 758 | foreach s [lsort $src] { |
| 736 | 759 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 737 | 760 | } |
| 761 | +writeln "\n" | |
| 762 | +writeln -nonewline "EXTRA_FILES =" | |
| 763 | +foreach s [lsort $extra_files] { | |
| 764 | + writeln -nonewline " \\\n \$(SRCDIR)/$s" | |
| 765 | +} | |
| 738 | 766 | writeln "\n" |
| 739 | 767 | writeln -nonewline "TRANS_SRC =" |
| 740 | 768 | foreach s [lsort $src] { |
| 741 | 769 | writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c" |
| 742 | 770 | } |
| @@ -759,10 +787,11 @@ | ||
| 759 | 787 | # |
| 760 | 788 | ifdef USE_WINDOWS |
| 761 | 789 | TRANSLATE = $(subst /,\,$(OBJDIR)/translate.exe) |
| 762 | 790 | MAKEHEADERS = $(subst /,\,$(OBJDIR)/makeheaders.exe) |
| 763 | 791 | MKINDEX = $(subst /,\,$(OBJDIR)/mkindex.exe) |
| 792 | +MKBUILTIN = $(subst /,\,$(OBJDIR)/mkbuiltin.exe) | |
| 764 | 793 | VERSION = $(subst /,\,$(OBJDIR)/version.exe) |
| 765 | 794 | CODECHECK1 = $(subst /,\,$(OBJDIR)/codecheck1.exe) |
| 766 | 795 | CAT = type |
| 767 | 796 | CP = copy |
| 768 | 797 | GREP = find |
| @@ -772,10 +801,11 @@ | ||
| 772 | 801 | RMDIR = rmdir /S /Q |
| 773 | 802 | else |
| 774 | 803 | TRANSLATE = $(OBJDIR)/translate.exe |
| 775 | 804 | MAKEHEADERS = $(OBJDIR)/makeheaders.exe |
| 776 | 805 | MKINDEX = $(OBJDIR)/mkindex.exe |
| 806 | +MKBUILTIN = $(OBJDIR)/mkbuiltin.exe | |
| 777 | 807 | VERSION = $(OBJDIR)/version.exe |
| 778 | 808 | CODECHECK1 = $(OBJDIR)/codecheck1.exe |
| 779 | 809 | CAT = cat |
| 780 | 810 | CP = cp |
| 781 | 811 | GREP = grep |
| @@ -825,10 +855,13 @@ | ||
| 825 | 855 | $(BCC) -o $(MAKEHEADERS) $(SRCDIR)/makeheaders.c |
| 826 | 856 | |
| 827 | 857 | $(MKINDEX): $(SRCDIR)/mkindex.c |
| 828 | 858 | $(BCC) -o $(MKINDEX) $(SRCDIR)/mkindex.c |
| 829 | 859 | |
| 860 | +$(MKBUILTIN): $(SRCDIR)/mkbuiltin.c | |
| 861 | + $(BCC) -o $(MKBUILTIN) $(SRCDIR)/mkbuiltin.c | |
| 862 | + | |
| 830 | 863 | $(VERSION): $(SRCDIR)/mkversion.c |
| 831 | 864 | $(BCC) -o $(VERSION) $(SRCDIR)/mkversion.c |
| 832 | 865 | |
| 833 | 866 | $(CODECHECK1): $(SRCDIR)/codecheck1.c |
| 834 | 867 | $(BCC) -o $(CODECHECK1) $(SRCDIR)/codecheck1.c |
| @@ -935,16 +968,24 @@ | ||
| 935 | 968 | append mhargs " \\\n\t\t\$(SRCDIR)/sqlite3.h" |
| 936 | 969 | append mhargs " \\\n\t\t\$(SRCDIR)/th.h" |
| 937 | 970 | append mhargs " \\\n\t\t\$(OBJDIR)/VERSION.h" |
| 938 | 971 | writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(MKINDEX)" |
| 939 | 972 | writeln "\t\$(MKINDEX) \$(TRANS_SRC) >$@\n" |
| 940 | -writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h" | |
| 973 | + | |
| 974 | +writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)" | |
| 975 | +writeln "\t\$(MKBUILTIN) \$(EXTRA_FILES) >$@\n" | |
| 976 | + | |
| 977 | +writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h" | |
| 941 | 978 | writeln "\t\$(MAKEHEADERS) $mhargs" |
| 942 | 979 | writeln "\techo Done >\$(OBJDIR)/headers\n" |
| 943 | 980 | writeln "\$(OBJDIR)/headers: Makefile\n" |
| 944 | 981 | writeln "Makefile:\n" |
| 945 | 982 | set extra_h(main) " \$(OBJDIR)/page_index.h " |
| 983 | +set extra_h(builtin) " \$(OBJDIR)/builtin_data.h " | |
| 984 | + | |
| 985 | +writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)" | |
| 986 | +writeln "\t\$(MKBUILTIN) \$(EXTRA_FILES) >\$(OBJDIR)/builtin_data.h\n" | |
| 946 | 987 | |
| 947 | 988 | foreach s [lsort $src] { |
| 948 | 989 | writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(TRANSLATE)" |
| 949 | 990 | writeln "\t\$(TRANSLATE) \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n" |
| 950 | 991 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h$extra_h($s)\$(SRCDIR)/config.h" |
| @@ -1079,10 +1120,13 @@ | ||
| 1079 | 1120 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 1080 | 1121 | $(BCC) -o$@ $** |
| 1081 | 1122 | |
| 1082 | 1123 | mkindex$E: $(SRCDIR)\mkindex.c |
| 1083 | 1124 | $(BCC) -o$@ $** |
| 1125 | + | |
| 1126 | +mkbuiltin$E: $(SRCDIR)\mkbuiltin.c | |
| 1127 | + $(BCC) -o$@ $** | |
| 1084 | 1128 | |
| 1085 | 1129 | mkversion$E: $(SRCDIR)\mkversion.c |
| 1086 | 1130 | $(BCC) -o$@ $** |
| 1087 | 1131 | |
| 1088 | 1132 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -1107,16 +1151,19 @@ | ||
| 1107 | 1151 | +$** > $@ |
| 1108 | 1152 | |
| 1109 | 1153 | page_index.h: mkindex$E $(SRC) |
| 1110 | 1154 | +$** > $@ |
| 1111 | 1155 | |
| 1156 | +builtin_data.h: mkbuiltin$E $(EXTRA_FILES) | |
| 1157 | + +$** > $@ | |
| 1158 | + | |
| 1112 | 1159 | clean: |
| 1113 | 1160 | -del $(OBJDIR)\*.obj |
| 1114 | 1161 | -del *.obj *_.c *.h *.map |
| 1115 | 1162 | |
| 1116 | 1163 | realclean: |
| 1117 | - -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E | |
| 1164 | + -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E mkbuiltin$E | |
| 1118 | 1165 | |
| 1119 | 1166 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 1120 | 1167 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 1121 | 1168 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 1122 | 1169 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -1139,11 +1186,11 @@ | ||
| 1139 | 1186 | writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n" |
| 1140 | 1187 | writeln "${s}_.c : \$(SRCDIR)\\$s.c" |
| 1141 | 1188 | writeln "\t+translate\$E \$** > \$@\n" |
| 1142 | 1189 | } |
| 1143 | 1190 | |
| 1144 | -writeln -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E " | |
| 1191 | +writeln -nonewline "headers: makeheaders\$E page_index.h builtin_data.h VERSION.h\n\t +makeheaders\$E " | |
| 1145 | 1192 | foreach s [lsort $src] { |
| 1146 | 1193 | writeln -nonewline "${s}_.c:$s.h " |
| 1147 | 1194 | } |
| 1148 | 1195 | writeln "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h \$(SRCDIR)\\cson_amalgamation.h" |
| 1149 | 1196 | writeln "\t@copy /Y nul: headers" |
| @@ -1356,10 +1403,20 @@ | ||
| 1356 | 1403 | writeln " \\" |
| 1357 | 1404 | writeln -nonewline " " |
| 1358 | 1405 | } |
| 1359 | 1406 | writeln -nonewline "${s}_.c"; incr i |
| 1360 | 1407 | } |
| 1408 | +writeln "\n" | |
| 1409 | +writeln -nonewline "EXTRA_FILES = " | |
| 1410 | +set i 0 | |
| 1411 | +foreach s [lsort $extra_files] { | |
| 1412 | + if {$i > 0} { | |
| 1413 | + writeln " \\" | |
| 1414 | + writeln -nonewline " " | |
| 1415 | + } | |
| 1416 | + writeln -nonewline "\$(SRCDIR)\\${s}"; incr i | |
| 1417 | +} | |
| 1361 | 1418 | writeln "\n" |
| 1362 | 1419 | set AdditionalObj [list shell sqlite3 th th_lang th_tcl cson_amalgamation] |
| 1363 | 1420 | writeln -nonewline "OBJ = " |
| 1364 | 1421 | set i 0 |
| 1365 | 1422 | foreach s [lsort [concat $src $AdditionalObj]] { |
| @@ -1443,10 +1500,13 @@ | ||
| 1443 | 1500 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 1444 | 1501 | $(BCC) $** |
| 1445 | 1502 | |
| 1446 | 1503 | mkindex$E: $(SRCDIR)\mkindex.c |
| 1447 | 1504 | $(BCC) $** |
| 1505 | + | |
| 1506 | +mkbuiltin$E: $(SRCDIR)\mkbuiltin.c | |
| 1507 | + $(BCC) $** | |
| 1448 | 1508 | |
| 1449 | 1509 | mkversion$E: $(SRCDIR)\mkversion.c |
| 1450 | 1510 | $(BCC) $** |
| 1451 | 1511 | |
| 1452 | 1512 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -1476,10 +1536,13 @@ | ||
| 1476 | 1536 | $(TCC) /Fo$@ /c $** |
| 1477 | 1537 | |
| 1478 | 1538 | page_index.h: mkindex$E $(SRC) |
| 1479 | 1539 | $** > $@ |
| 1480 | 1540 | |
| 1541 | +builtin_data.h: mkbuiltin$E $(EXTRA_FILES) | |
| 1542 | + $** > $@ | |
| 1543 | + | |
| 1481 | 1544 | clean: |
| 1482 | 1545 | -del $(OX)\*.obj |
| 1483 | 1546 | -del *.obj |
| 1484 | 1547 | -del *_.c |
| 1485 | 1548 | -del *.h |
| @@ -1501,10 +1564,12 @@ | ||
| 1501 | 1564 | -del makeheaders$P |
| 1502 | 1565 | -del mkversion$E |
| 1503 | 1566 | -del mkversion$P |
| 1504 | 1567 | -del codecheck1$E |
| 1505 | 1568 | -del codecheck1$P |
| 1569 | + -del mkbuiltin$E | |
| 1570 | + -del mkbuiltin$P | |
| 1506 | 1571 | |
| 1507 | 1572 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 1508 | 1573 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 1509 | 1574 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 1510 | 1575 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -1528,11 +1593,11 @@ | ||
| 1528 | 1593 | } |
| 1529 | 1594 | |
| 1530 | 1595 | writeln "fossil.res : \$B\\win\\fossil.rc" |
| 1531 | 1596 | writeln "\t\$(RCC) /fo \$@ \$**\n" |
| 1532 | 1597 | |
| 1533 | -writeln "headers: makeheaders\$E page_index.h VERSION.h" | |
| 1598 | +writeln "headers: makeheaders\$E page_index.h builtin_data.h VERSION.h" | |
| 1534 | 1599 | writeln -nonewline "\tmakeheaders\$E " |
| 1535 | 1600 | set i 0 |
| 1536 | 1601 | foreach s [lsort $src] { |
| 1537 | 1602 | if {$i > 0} { |
| 1538 | 1603 | writeln " \\" |
| @@ -1638,11 +1703,11 @@ | ||
| 1638 | 1703 | RC=$(PellesCDir)\bin\porc.exe |
| 1639 | 1704 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 1640 | 1705 | |
| 1641 | 1706 | # define the special utilities files, needed to generate |
| 1642 | 1707 | # the automatically generated source files |
| 1643 | -UTILS=translate.exe mkindex.exe makeheaders.exe | |
| 1708 | +UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe | |
| 1644 | 1709 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 1645 | 1710 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) |
| 1646 | 1711 | |
| 1647 | 1712 | # define the SQLite files, which need special flags on compile |
| 1648 | 1713 | SQLITESRC=sqlite3.c |
| @@ -1677,11 +1742,11 @@ | ||
| 1677 | 1742 | # main target file is the application |
| 1678 | 1743 | APPLICATION=fossil.exe |
| 1679 | 1744 | |
| 1680 | 1745 | # define the standard make target |
| 1681 | 1746 | .PHONY: default |
| 1682 | -default: page_index.h headers $(APPLICATION) | |
| 1747 | +default: page_index.h builtin_data.h headers $(APPLICATION) | |
| 1683 | 1748 | |
| 1684 | 1749 | # symbolic target to generate the source generate utils |
| 1685 | 1750 | .PHONY: utils |
| 1686 | 1751 | utils: $(UTILS) |
| 1687 | 1752 | |
| @@ -1702,17 +1767,20 @@ | ||
| 1702 | 1767 | translate.exe $< >$@ |
| 1703 | 1768 | |
| 1704 | 1769 | # generate the index source, containing all web references,.. |
| 1705 | 1770 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 1706 | 1771 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 1772 | + | |
| 1773 | +builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe | |
| 1774 | + mkbuiltin.exe $(EXTRA_FILES) >$@ | |
| 1707 | 1775 | |
| 1708 | 1776 | # extracting version info from manifest |
| 1709 | 1777 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 1710 | 1778 | version.exe ..\manifest.uuid ..\manifest ..\VERSION > $@ |
| 1711 | 1779 | |
| 1712 | 1780 | # generate the simplified headers |
| 1713 | -headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h | |
| 1781 | +headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h | |
| 1714 | 1782 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h |
| 1715 | 1783 | echo Done >$@ |
| 1716 | 1784 | |
| 1717 | 1785 | # compile C sources with relevant options |
| 1718 | 1786 | |
| 1719 | 1787 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -12,12 +12,15 @@ | |
| 12 | # tclsh makemake.tcl |
| 13 | # |
| 14 | ############################################################################# |
| 15 | |
| 16 | # Basenames of all source files that get preprocessed using |
| 17 | # "translate" and "makeheaders". To add new source files to the |
| 18 | # project, simply add the basename to this list and rerun this script. |
| 19 | # |
| 20 | set src { |
| 21 | add |
| 22 | allrepo |
| 23 | attach |
| @@ -24,10 +27,11 @@ | |
| 24 | bag |
| 25 | bisect |
| 26 | blob |
| 27 | branch |
| 28 | browse |
| 29 | cache |
| 30 | captcha |
| 31 | cgi |
| 32 | checkin |
| 33 | checkout |
| @@ -128,10 +132,16 @@ | |
| 128 | xfer |
| 129 | xfersetup |
| 130 | zip |
| 131 | http_ssl |
| 132 | } |
| 133 | |
| 134 | # Options used to compile the included SQLite library. |
| 135 | # |
| 136 | set SQLITE_OPTIONS { |
| 137 | -DNDEBUG=1 |
| @@ -217,10 +227,15 @@ | |
| 217 | } |
| 218 | writeln -nonewline "SRC =" |
| 219 | foreach s [lsort $src] { |
| 220 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 221 | } |
| 222 | writeln "\n" |
| 223 | writeln -nonewline "TRANS_SRC =" |
| 224 | foreach s [lsort $src] { |
| 225 | writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c" |
| 226 | } |
| @@ -256,10 +271,13 @@ | |
| 256 | $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c |
| 257 | |
| 258 | $(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c |
| 259 | $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c |
| 260 | |
| 261 | $(OBJDIR)/mkversion: $(SRCDIR)/mkversion.c |
| 262 | $(BCC) -o $(OBJDIR)/mkversion $(SRCDIR)/mkversion.c |
| 263 | |
| 264 | $(OBJDIR)/codecheck1: $(SRCDIR)/codecheck1.c |
| 265 | $(BCC) -o $(OBJDIR)/codecheck1 $(SRCDIR)/codecheck1.c |
| @@ -336,18 +354,23 @@ | |
| 336 | append mhargs "\$(SRCDIR)/th.h <<<NEXT_LINE>>>" |
| 337 | #append mhargs "\$(SRCDIR)/cson_amalgamation.h <<<NEXT_LINE>>>" |
| 338 | append mhargs "\$(OBJDIR)/VERSION.h" |
| 339 | set mhargs [string map [list <<<NEXT_LINE>>> \\\n\t] $mhargs] |
| 340 | writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex" |
| 341 | writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@" |
| 342 | writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h" |
| 343 | writeln "\t\$(OBJDIR)/makeheaders $mhargs" |
| 344 | writeln "\ttouch \$(OBJDIR)/headers" |
| 345 | writeln "\$(OBJDIR)/headers: Makefile" |
| 346 | writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/json_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h" |
| 347 | writeln "Makefile:" |
| 348 | set extra_h(main) " \$(OBJDIR)/page_index.h " |
| 349 | |
| 350 | foreach s [lsort $src] { |
| 351 | writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate" |
| 352 | writeln "\t\$(OBJDIR)/translate \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n" |
| 353 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h$extra_h($s)\$(SRCDIR)/config.h" |
| @@ -733,10 +756,15 @@ | |
| 733 | } |
| 734 | writeln -nonewline "SRC =" |
| 735 | foreach s [lsort $src] { |
| 736 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 737 | } |
| 738 | writeln "\n" |
| 739 | writeln -nonewline "TRANS_SRC =" |
| 740 | foreach s [lsort $src] { |
| 741 | writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c" |
| 742 | } |
| @@ -759,10 +787,11 @@ | |
| 759 | # |
| 760 | ifdef USE_WINDOWS |
| 761 | TRANSLATE = $(subst /,\,$(OBJDIR)/translate.exe) |
| 762 | MAKEHEADERS = $(subst /,\,$(OBJDIR)/makeheaders.exe) |
| 763 | MKINDEX = $(subst /,\,$(OBJDIR)/mkindex.exe) |
| 764 | VERSION = $(subst /,\,$(OBJDIR)/version.exe) |
| 765 | CODECHECK1 = $(subst /,\,$(OBJDIR)/codecheck1.exe) |
| 766 | CAT = type |
| 767 | CP = copy |
| 768 | GREP = find |
| @@ -772,10 +801,11 @@ | |
| 772 | RMDIR = rmdir /S /Q |
| 773 | else |
| 774 | TRANSLATE = $(OBJDIR)/translate.exe |
| 775 | MAKEHEADERS = $(OBJDIR)/makeheaders.exe |
| 776 | MKINDEX = $(OBJDIR)/mkindex.exe |
| 777 | VERSION = $(OBJDIR)/version.exe |
| 778 | CODECHECK1 = $(OBJDIR)/codecheck1.exe |
| 779 | CAT = cat |
| 780 | CP = cp |
| 781 | GREP = grep |
| @@ -825,10 +855,13 @@ | |
| 825 | $(BCC) -o $(MAKEHEADERS) $(SRCDIR)/makeheaders.c |
| 826 | |
| 827 | $(MKINDEX): $(SRCDIR)/mkindex.c |
| 828 | $(BCC) -o $(MKINDEX) $(SRCDIR)/mkindex.c |
| 829 | |
| 830 | $(VERSION): $(SRCDIR)/mkversion.c |
| 831 | $(BCC) -o $(VERSION) $(SRCDIR)/mkversion.c |
| 832 | |
| 833 | $(CODECHECK1): $(SRCDIR)/codecheck1.c |
| 834 | $(BCC) -o $(CODECHECK1) $(SRCDIR)/codecheck1.c |
| @@ -935,16 +968,24 @@ | |
| 935 | append mhargs " \\\n\t\t\$(SRCDIR)/sqlite3.h" |
| 936 | append mhargs " \\\n\t\t\$(SRCDIR)/th.h" |
| 937 | append mhargs " \\\n\t\t\$(OBJDIR)/VERSION.h" |
| 938 | writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(MKINDEX)" |
| 939 | writeln "\t\$(MKINDEX) \$(TRANS_SRC) >$@\n" |
| 940 | writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h" |
| 941 | writeln "\t\$(MAKEHEADERS) $mhargs" |
| 942 | writeln "\techo Done >\$(OBJDIR)/headers\n" |
| 943 | writeln "\$(OBJDIR)/headers: Makefile\n" |
| 944 | writeln "Makefile:\n" |
| 945 | set extra_h(main) " \$(OBJDIR)/page_index.h " |
| 946 | |
| 947 | foreach s [lsort $src] { |
| 948 | writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(TRANSLATE)" |
| 949 | writeln "\t\$(TRANSLATE) \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n" |
| 950 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h$extra_h($s)\$(SRCDIR)/config.h" |
| @@ -1079,10 +1120,13 @@ | |
| 1079 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 1080 | $(BCC) -o$@ $** |
| 1081 | |
| 1082 | mkindex$E: $(SRCDIR)\mkindex.c |
| 1083 | $(BCC) -o$@ $** |
| 1084 | |
| 1085 | mkversion$E: $(SRCDIR)\mkversion.c |
| 1086 | $(BCC) -o$@ $** |
| 1087 | |
| 1088 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -1107,16 +1151,19 @@ | |
| 1107 | +$** > $@ |
| 1108 | |
| 1109 | page_index.h: mkindex$E $(SRC) |
| 1110 | +$** > $@ |
| 1111 | |
| 1112 | clean: |
| 1113 | -del $(OBJDIR)\*.obj |
| 1114 | -del *.obj *_.c *.h *.map |
| 1115 | |
| 1116 | realclean: |
| 1117 | -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E |
| 1118 | |
| 1119 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 1120 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 1121 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 1122 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -1139,11 +1186,11 @@ | |
| 1139 | writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n" |
| 1140 | writeln "${s}_.c : \$(SRCDIR)\\$s.c" |
| 1141 | writeln "\t+translate\$E \$** > \$@\n" |
| 1142 | } |
| 1143 | |
| 1144 | writeln -nonewline "headers: makeheaders\$E page_index.h VERSION.h\n\t +makeheaders\$E " |
| 1145 | foreach s [lsort $src] { |
| 1146 | writeln -nonewline "${s}_.c:$s.h " |
| 1147 | } |
| 1148 | writeln "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h \$(SRCDIR)\\cson_amalgamation.h" |
| 1149 | writeln "\t@copy /Y nul: headers" |
| @@ -1356,10 +1403,20 @@ | |
| 1356 | writeln " \\" |
| 1357 | writeln -nonewline " " |
| 1358 | } |
| 1359 | writeln -nonewline "${s}_.c"; incr i |
| 1360 | } |
| 1361 | writeln "\n" |
| 1362 | set AdditionalObj [list shell sqlite3 th th_lang th_tcl cson_amalgamation] |
| 1363 | writeln -nonewline "OBJ = " |
| 1364 | set i 0 |
| 1365 | foreach s [lsort [concat $src $AdditionalObj]] { |
| @@ -1443,10 +1500,13 @@ | |
| 1443 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 1444 | $(BCC) $** |
| 1445 | |
| 1446 | mkindex$E: $(SRCDIR)\mkindex.c |
| 1447 | $(BCC) $** |
| 1448 | |
| 1449 | mkversion$E: $(SRCDIR)\mkversion.c |
| 1450 | $(BCC) $** |
| 1451 | |
| 1452 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -1476,10 +1536,13 @@ | |
| 1476 | $(TCC) /Fo$@ /c $** |
| 1477 | |
| 1478 | page_index.h: mkindex$E $(SRC) |
| 1479 | $** > $@ |
| 1480 | |
| 1481 | clean: |
| 1482 | -del $(OX)\*.obj |
| 1483 | -del *.obj |
| 1484 | -del *_.c |
| 1485 | -del *.h |
| @@ -1501,10 +1564,12 @@ | |
| 1501 | -del makeheaders$P |
| 1502 | -del mkversion$E |
| 1503 | -del mkversion$P |
| 1504 | -del codecheck1$E |
| 1505 | -del codecheck1$P |
| 1506 | |
| 1507 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 1508 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 1509 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 1510 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -1528,11 +1593,11 @@ | |
| 1528 | } |
| 1529 | |
| 1530 | writeln "fossil.res : \$B\\win\\fossil.rc" |
| 1531 | writeln "\t\$(RCC) /fo \$@ \$**\n" |
| 1532 | |
| 1533 | writeln "headers: makeheaders\$E page_index.h VERSION.h" |
| 1534 | writeln -nonewline "\tmakeheaders\$E " |
| 1535 | set i 0 |
| 1536 | foreach s [lsort $src] { |
| 1537 | if {$i > 0} { |
| 1538 | writeln " \\" |
| @@ -1638,11 +1703,11 @@ | |
| 1638 | RC=$(PellesCDir)\bin\porc.exe |
| 1639 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 1640 | |
| 1641 | # define the special utilities files, needed to generate |
| 1642 | # the automatically generated source files |
| 1643 | UTILS=translate.exe mkindex.exe makeheaders.exe |
| 1644 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 1645 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) |
| 1646 | |
| 1647 | # define the SQLite files, which need special flags on compile |
| 1648 | SQLITESRC=sqlite3.c |
| @@ -1677,11 +1742,11 @@ | |
| 1677 | # main target file is the application |
| 1678 | APPLICATION=fossil.exe |
| 1679 | |
| 1680 | # define the standard make target |
| 1681 | .PHONY: default |
| 1682 | default: page_index.h headers $(APPLICATION) |
| 1683 | |
| 1684 | # symbolic target to generate the source generate utils |
| 1685 | .PHONY: utils |
| 1686 | utils: $(UTILS) |
| 1687 | |
| @@ -1702,17 +1767,20 @@ | |
| 1702 | translate.exe $< >$@ |
| 1703 | |
| 1704 | # generate the index source, containing all web references,.. |
| 1705 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 1706 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 1707 | |
| 1708 | # extracting version info from manifest |
| 1709 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 1710 | version.exe ..\manifest.uuid ..\manifest ..\VERSION > $@ |
| 1711 | |
| 1712 | # generate the simplified headers |
| 1713 | headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h |
| 1714 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h |
| 1715 | echo Done >$@ |
| 1716 | |
| 1717 | # compile C sources with relevant options |
| 1718 | |
| 1719 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -12,12 +12,15 @@ | |
| 12 | # tclsh makemake.tcl |
| 13 | # |
| 14 | ############################################################################# |
| 15 | |
| 16 | # Basenames of all source files that get preprocessed using |
| 17 | # "translate" and "makeheaders". To add new C-language source files to the |
| 18 | # project, simply add the basename to this list and rerun this script. |
| 19 | # |
| 20 | # Set the separate extra_files variable further down for how to add non-C |
| 21 | # files, such as string and BLOB resources. |
| 22 | # |
| 23 | set src { |
| 24 | add |
| 25 | allrepo |
| 26 | attach |
| @@ -24,10 +27,11 @@ | |
| 27 | bag |
| 28 | bisect |
| 29 | blob |
| 30 | branch |
| 31 | browse |
| 32 | builtin |
| 33 | cache |
| 34 | captcha |
| 35 | cgi |
| 36 | checkin |
| 37 | checkout |
| @@ -128,10 +132,16 @@ | |
| 132 | xfer |
| 133 | xfersetup |
| 134 | zip |
| 135 | http_ssl |
| 136 | } |
| 137 | |
| 138 | # Additional resource files that get built into the executable. |
| 139 | # |
| 140 | set extra_files { |
| 141 | diff.tcl |
| 142 | } |
| 143 | |
| 144 | # Options used to compile the included SQLite library. |
| 145 | # |
| 146 | set SQLITE_OPTIONS { |
| 147 | -DNDEBUG=1 |
| @@ -217,10 +227,15 @@ | |
| 227 | } |
| 228 | writeln -nonewline "SRC =" |
| 229 | foreach s [lsort $src] { |
| 230 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 231 | } |
| 232 | writeln "\n" |
| 233 | writeln -nonewline "EXTRA_FILES =" |
| 234 | foreach s [lsort $extra_files] { |
| 235 | writeln -nonewline " \\\n \$(SRCDIR)/$s" |
| 236 | } |
| 237 | writeln "\n" |
| 238 | writeln -nonewline "TRANS_SRC =" |
| 239 | foreach s [lsort $src] { |
| 240 | writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c" |
| 241 | } |
| @@ -256,10 +271,13 @@ | |
| 271 | $(BCC) -o $(OBJDIR)/makeheaders $(SRCDIR)/makeheaders.c |
| 272 | |
| 273 | $(OBJDIR)/mkindex: $(SRCDIR)/mkindex.c |
| 274 | $(BCC) -o $(OBJDIR)/mkindex $(SRCDIR)/mkindex.c |
| 275 | |
| 276 | $(OBJDIR)/mkbuiltin: $(SRCDIR)/mkbuiltin.c |
| 277 | $(BCC) -o $(OBJDIR)/mkbuiltin $(SRCDIR)/mkbuiltin.c |
| 278 | |
| 279 | $(OBJDIR)/mkversion: $(SRCDIR)/mkversion.c |
| 280 | $(BCC) -o $(OBJDIR)/mkversion $(SRCDIR)/mkversion.c |
| 281 | |
| 282 | $(OBJDIR)/codecheck1: $(SRCDIR)/codecheck1.c |
| 283 | $(BCC) -o $(OBJDIR)/codecheck1 $(SRCDIR)/codecheck1.c |
| @@ -336,18 +354,23 @@ | |
| 354 | append mhargs "\$(SRCDIR)/th.h <<<NEXT_LINE>>>" |
| 355 | #append mhargs "\$(SRCDIR)/cson_amalgamation.h <<<NEXT_LINE>>>" |
| 356 | append mhargs "\$(OBJDIR)/VERSION.h" |
| 357 | set mhargs [string map [list <<<NEXT_LINE>>> \\\n\t] $mhargs] |
| 358 | writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(OBJDIR)/mkindex" |
| 359 | writeln "\t\$(OBJDIR)/mkindex \$(TRANS_SRC) >$@\n" |
| 360 | |
| 361 | writeln "\$(OBJDIR)/builtin_data.h: \$(OBJDIR)/mkbuiltin \$(EXTRA_FILES)" |
| 362 | writeln "\t\$(OBJDIR)/mkbuiltin \$(EXTRA_FILES) >$@\n" |
| 363 | |
| 364 | writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h" |
| 365 | writeln "\t\$(OBJDIR)/makeheaders $mhargs" |
| 366 | writeln "\ttouch \$(OBJDIR)/headers" |
| 367 | writeln "\$(OBJDIR)/headers: Makefile" |
| 368 | writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/json_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h" |
| 369 | writeln "Makefile:" |
| 370 | set extra_h(main) " \$(OBJDIR)/page_index.h " |
| 371 | set extra_h(builtin) " \$(OBJDIR)/builtin_data.h " |
| 372 | |
| 373 | foreach s [lsort $src] { |
| 374 | writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(OBJDIR)/translate" |
| 375 | writeln "\t\$(OBJDIR)/translate \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n" |
| 376 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h$extra_h($s)\$(SRCDIR)/config.h" |
| @@ -733,10 +756,15 @@ | |
| 756 | } |
| 757 | writeln -nonewline "SRC =" |
| 758 | foreach s [lsort $src] { |
| 759 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 760 | } |
| 761 | writeln "\n" |
| 762 | writeln -nonewline "EXTRA_FILES =" |
| 763 | foreach s [lsort $extra_files] { |
| 764 | writeln -nonewline " \\\n \$(SRCDIR)/$s" |
| 765 | } |
| 766 | writeln "\n" |
| 767 | writeln -nonewline "TRANS_SRC =" |
| 768 | foreach s [lsort $src] { |
| 769 | writeln -nonewline " \\\n \$(OBJDIR)/${s}_.c" |
| 770 | } |
| @@ -759,10 +787,11 @@ | |
| 787 | # |
| 788 | ifdef USE_WINDOWS |
| 789 | TRANSLATE = $(subst /,\,$(OBJDIR)/translate.exe) |
| 790 | MAKEHEADERS = $(subst /,\,$(OBJDIR)/makeheaders.exe) |
| 791 | MKINDEX = $(subst /,\,$(OBJDIR)/mkindex.exe) |
| 792 | MKBUILTIN = $(subst /,\,$(OBJDIR)/mkbuiltin.exe) |
| 793 | VERSION = $(subst /,\,$(OBJDIR)/version.exe) |
| 794 | CODECHECK1 = $(subst /,\,$(OBJDIR)/codecheck1.exe) |
| 795 | CAT = type |
| 796 | CP = copy |
| 797 | GREP = find |
| @@ -772,10 +801,11 @@ | |
| 801 | RMDIR = rmdir /S /Q |
| 802 | else |
| 803 | TRANSLATE = $(OBJDIR)/translate.exe |
| 804 | MAKEHEADERS = $(OBJDIR)/makeheaders.exe |
| 805 | MKINDEX = $(OBJDIR)/mkindex.exe |
| 806 | MKBUILTIN = $(OBJDIR)/mkbuiltin.exe |
| 807 | VERSION = $(OBJDIR)/version.exe |
| 808 | CODECHECK1 = $(OBJDIR)/codecheck1.exe |
| 809 | CAT = cat |
| 810 | CP = cp |
| 811 | GREP = grep |
| @@ -825,10 +855,13 @@ | |
| 855 | $(BCC) -o $(MAKEHEADERS) $(SRCDIR)/makeheaders.c |
| 856 | |
| 857 | $(MKINDEX): $(SRCDIR)/mkindex.c |
| 858 | $(BCC) -o $(MKINDEX) $(SRCDIR)/mkindex.c |
| 859 | |
| 860 | $(MKBUILTIN): $(SRCDIR)/mkbuiltin.c |
| 861 | $(BCC) -o $(MKBUILTIN) $(SRCDIR)/mkbuiltin.c |
| 862 | |
| 863 | $(VERSION): $(SRCDIR)/mkversion.c |
| 864 | $(BCC) -o $(VERSION) $(SRCDIR)/mkversion.c |
| 865 | |
| 866 | $(CODECHECK1): $(SRCDIR)/codecheck1.c |
| 867 | $(BCC) -o $(CODECHECK1) $(SRCDIR)/codecheck1.c |
| @@ -935,16 +968,24 @@ | |
| 968 | append mhargs " \\\n\t\t\$(SRCDIR)/sqlite3.h" |
| 969 | append mhargs " \\\n\t\t\$(SRCDIR)/th.h" |
| 970 | append mhargs " \\\n\t\t\$(OBJDIR)/VERSION.h" |
| 971 | writeln "\$(OBJDIR)/page_index.h: \$(TRANS_SRC) \$(MKINDEX)" |
| 972 | writeln "\t\$(MKINDEX) \$(TRANS_SRC) >$@\n" |
| 973 | |
| 974 | writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)" |
| 975 | writeln "\t\$(MKBUILTIN) \$(EXTRA_FILES) >$@\n" |
| 976 | |
| 977 | writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(MAKEHEADERS) \$(OBJDIR)/VERSION.h" |
| 978 | writeln "\t\$(MAKEHEADERS) $mhargs" |
| 979 | writeln "\techo Done >\$(OBJDIR)/headers\n" |
| 980 | writeln "\$(OBJDIR)/headers: Makefile\n" |
| 981 | writeln "Makefile:\n" |
| 982 | set extra_h(main) " \$(OBJDIR)/page_index.h " |
| 983 | set extra_h(builtin) " \$(OBJDIR)/builtin_data.h " |
| 984 | |
| 985 | writeln "\$(OBJDIR)/builtin_data.h:\t\$(MKBUILTIN) \$(EXTRA_FILES)" |
| 986 | writeln "\t\$(MKBUILTIN) \$(EXTRA_FILES) >\$(OBJDIR)/builtin_data.h\n" |
| 987 | |
| 988 | foreach s [lsort $src] { |
| 989 | writeln "\$(OBJDIR)/${s}_.c:\t\$(SRCDIR)/$s.c \$(TRANSLATE)" |
| 990 | writeln "\t\$(TRANSLATE) \$(SRCDIR)/$s.c >\$(OBJDIR)/${s}_.c\n" |
| 991 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h$extra_h($s)\$(SRCDIR)/config.h" |
| @@ -1079,10 +1120,13 @@ | |
| 1120 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 1121 | $(BCC) -o$@ $** |
| 1122 | |
| 1123 | mkindex$E: $(SRCDIR)\mkindex.c |
| 1124 | $(BCC) -o$@ $** |
| 1125 | |
| 1126 | mkbuiltin$E: $(SRCDIR)\mkbuiltin.c |
| 1127 | $(BCC) -o$@ $** |
| 1128 | |
| 1129 | mkversion$E: $(SRCDIR)\mkversion.c |
| 1130 | $(BCC) -o$@ $** |
| 1131 | |
| 1132 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -1107,16 +1151,19 @@ | |
| 1151 | +$** > $@ |
| 1152 | |
| 1153 | page_index.h: mkindex$E $(SRC) |
| 1154 | +$** > $@ |
| 1155 | |
| 1156 | builtin_data.h: mkbuiltin$E $(EXTRA_FILES) |
| 1157 | +$** > $@ |
| 1158 | |
| 1159 | clean: |
| 1160 | -del $(OBJDIR)\*.obj |
| 1161 | -del *.obj *_.c *.h *.map |
| 1162 | |
| 1163 | realclean: |
| 1164 | -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E mkbuiltin$E |
| 1165 | |
| 1166 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 1167 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 1168 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 1169 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -1139,11 +1186,11 @@ | |
| 1186 | writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n" |
| 1187 | writeln "${s}_.c : \$(SRCDIR)\\$s.c" |
| 1188 | writeln "\t+translate\$E \$** > \$@\n" |
| 1189 | } |
| 1190 | |
| 1191 | writeln -nonewline "headers: makeheaders\$E page_index.h builtin_data.h VERSION.h\n\t +makeheaders\$E " |
| 1192 | foreach s [lsort $src] { |
| 1193 | writeln -nonewline "${s}_.c:$s.h " |
| 1194 | } |
| 1195 | writeln "\$(SRCDIR)\\sqlite3.h \$(SRCDIR)\\th.h VERSION.h \$(SRCDIR)\\cson_amalgamation.h" |
| 1196 | writeln "\t@copy /Y nul: headers" |
| @@ -1356,10 +1403,20 @@ | |
| 1403 | writeln " \\" |
| 1404 | writeln -nonewline " " |
| 1405 | } |
| 1406 | writeln -nonewline "${s}_.c"; incr i |
| 1407 | } |
| 1408 | writeln "\n" |
| 1409 | writeln -nonewline "EXTRA_FILES = " |
| 1410 | set i 0 |
| 1411 | foreach s [lsort $extra_files] { |
| 1412 | if {$i > 0} { |
| 1413 | writeln " \\" |
| 1414 | writeln -nonewline " " |
| 1415 | } |
| 1416 | writeln -nonewline "\$(SRCDIR)\\${s}"; incr i |
| 1417 | } |
| 1418 | writeln "\n" |
| 1419 | set AdditionalObj [list shell sqlite3 th th_lang th_tcl cson_amalgamation] |
| 1420 | writeln -nonewline "OBJ = " |
| 1421 | set i 0 |
| 1422 | foreach s [lsort [concat $src $AdditionalObj]] { |
| @@ -1443,10 +1500,13 @@ | |
| 1500 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 1501 | $(BCC) $** |
| 1502 | |
| 1503 | mkindex$E: $(SRCDIR)\mkindex.c |
| 1504 | $(BCC) $** |
| 1505 | |
| 1506 | mkbuiltin$E: $(SRCDIR)\mkbuiltin.c |
| 1507 | $(BCC) $** |
| 1508 | |
| 1509 | mkversion$E: $(SRCDIR)\mkversion.c |
| 1510 | $(BCC) $** |
| 1511 | |
| 1512 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -1476,10 +1536,13 @@ | |
| 1536 | $(TCC) /Fo$@ /c $** |
| 1537 | |
| 1538 | page_index.h: mkindex$E $(SRC) |
| 1539 | $** > $@ |
| 1540 | |
| 1541 | builtin_data.h: mkbuiltin$E $(EXTRA_FILES) |
| 1542 | $** > $@ |
| 1543 | |
| 1544 | clean: |
| 1545 | -del $(OX)\*.obj |
| 1546 | -del *.obj |
| 1547 | -del *_.c |
| 1548 | -del *.h |
| @@ -1501,10 +1564,12 @@ | |
| 1564 | -del makeheaders$P |
| 1565 | -del mkversion$E |
| 1566 | -del mkversion$P |
| 1567 | -del codecheck1$E |
| 1568 | -del codecheck1$P |
| 1569 | -del mkbuiltin$E |
| 1570 | -del mkbuiltin$P |
| 1571 | |
| 1572 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 1573 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 1574 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 1575 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -1528,11 +1593,11 @@ | |
| 1593 | } |
| 1594 | |
| 1595 | writeln "fossil.res : \$B\\win\\fossil.rc" |
| 1596 | writeln "\t\$(RCC) /fo \$@ \$**\n" |
| 1597 | |
| 1598 | writeln "headers: makeheaders\$E page_index.h builtin_data.h VERSION.h" |
| 1599 | writeln -nonewline "\tmakeheaders\$E " |
| 1600 | set i 0 |
| 1601 | foreach s [lsort $src] { |
| 1602 | if {$i > 0} { |
| 1603 | writeln " \\" |
| @@ -1638,11 +1703,11 @@ | |
| 1703 | RC=$(PellesCDir)\bin\porc.exe |
| 1704 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 1705 | |
| 1706 | # define the special utilities files, needed to generate |
| 1707 | # the automatically generated source files |
| 1708 | UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe |
| 1709 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 1710 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) |
| 1711 | |
| 1712 | # define the SQLite files, which need special flags on compile |
| 1713 | SQLITESRC=sqlite3.c |
| @@ -1677,11 +1742,11 @@ | |
| 1742 | # main target file is the application |
| 1743 | APPLICATION=fossil.exe |
| 1744 | |
| 1745 | # define the standard make target |
| 1746 | .PHONY: default |
| 1747 | default: page_index.h builtin_data.h headers $(APPLICATION) |
| 1748 | |
| 1749 | # symbolic target to generate the source generate utils |
| 1750 | .PHONY: utils |
| 1751 | utils: $(UTILS) |
| 1752 | |
| @@ -1702,17 +1767,20 @@ | |
| 1767 | translate.exe $< >$@ |
| 1768 | |
| 1769 | # generate the index source, containing all web references,.. |
| 1770 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 1771 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 1772 | |
| 1773 | builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe |
| 1774 | mkbuiltin.exe $(EXTRA_FILES) >$@ |
| 1775 | |
| 1776 | # extracting version info from manifest |
| 1777 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 1778 | version.exe ..\manifest.uuid ..\manifest ..\VERSION > $@ |
| 1779 | |
| 1780 | # generate the simplified headers |
| 1781 | headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h |
| 1782 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h |
| 1783 | echo Done >$@ |
| 1784 | |
| 1785 | # compile C sources with relevant options |
| 1786 | |
| 1787 |
+17
-2
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -361,10 +361,11 @@ | ||
| 361 | 361 | char *z; |
| 362 | 362 | int n; |
| 363 | 363 | char *zUuid; |
| 364 | 364 | int sz = 0; |
| 365 | 365 | int isRepeat, hasSelfRefTag = 0; |
| 366 | + Blob bUuid = BLOB_INITIALIZER; | |
| 366 | 367 | static Bag seen; |
| 367 | 368 | const char *zErr = 0; |
| 368 | 369 | |
| 369 | 370 | if( rid==0 ){ |
| 370 | 371 | isRepeat = 1; |
| @@ -404,10 +405,15 @@ | ||
| 404 | 405 | if( verify_z_card(z, n)==2 ){ |
| 405 | 406 | blob_reset(pContent); |
| 406 | 407 | blob_appendf(pErr, "incorrect Z-card cksum"); |
| 407 | 408 | return 0; |
| 408 | 409 | } |
| 410 | + | |
| 411 | + /* Store the UUID (before modifying the blob) only for error | |
| 412 | + ** reporting purposes. | |
| 413 | + */ | |
| 414 | + sha1sum_blob(pContent, &bUuid); | |
| 409 | 415 | |
| 410 | 416 | /* Allocate a Manifest object to hold the parsed control artifact. |
| 411 | 417 | */ |
| 412 | 418 | p = fossil_malloc( sizeof(*p) ); |
| 413 | 419 | memset(p, 0, sizeof(*p)); |
| @@ -945,13 +951,18 @@ | ||
| 945 | 951 | if( !seenZ ) SYNTAX("missing Z-card on control"); |
| 946 | 952 | p->type = CFTYPE_CONTROL; |
| 947 | 953 | } |
| 948 | 954 | md5sum_init(); |
| 949 | 955 | if( !isRepeat ) g.parseCnt[p->type]++; |
| 956 | + blob_reset(&bUuid); | |
| 950 | 957 | return p; |
| 951 | 958 | |
| 952 | 959 | manifest_syntax_error: |
| 960 | + if(bUuid.nUsed){ | |
| 961 | + blob_appendf(pErr, "manifest [%.40s] ", blob_str(&bUuid)); | |
| 962 | + blob_reset(&bUuid); | |
| 963 | + } | |
| 953 | 964 | if( zErr ){ |
| 954 | 965 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 955 | 966 | }else{ |
| 956 | 967 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| 957 | 968 | } |
| @@ -1734,11 +1745,14 @@ | ||
| 1734 | 1745 | |
| 1735 | 1746 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1736 | 1747 | blob_reset(pContent); |
| 1737 | 1748 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1738 | 1749 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1739 | - if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "syntax error in manifest"); | |
| 1750 | + if( (flags & MC_NO_ERRORS)==0 ){ | |
| 1751 | + fossil_error(1, "syntax error in manifest [%s]", | |
| 1752 | + db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1753 | + } | |
| 1740 | 1754 | return 0; |
| 1741 | 1755 | } |
| 1742 | 1756 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1743 | 1757 | manifest_destroy(p); |
| 1744 | 1758 | assert( blob_is_reset(pContent) ); |
| @@ -1747,11 +1761,12 @@ | ||
| 1747 | 1761 | } |
| 1748 | 1762 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1749 | 1763 | manifest_destroy(p); |
| 1750 | 1764 | assert( blob_is_reset(pContent) ); |
| 1751 | 1765 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1752 | - fossil_error(1, "cannot fetch baseline manifest"); | |
| 1766 | + fossil_error(1, "cannot fetch baseline for manifest [%s]", | |
| 1767 | + db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1753 | 1768 | } |
| 1754 | 1769 | return 0; |
| 1755 | 1770 | } |
| 1756 | 1771 | db_begin_transaction(); |
| 1757 | 1772 | if( p->type==CFTYPE_MANIFEST ){ |
| 1758 | 1773 | |
| 1759 | 1774 | ADDED src/mkbuiltin.c |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -361,10 +361,11 @@ | |
| 361 | char *z; |
| 362 | int n; |
| 363 | char *zUuid; |
| 364 | int sz = 0; |
| 365 | int isRepeat, hasSelfRefTag = 0; |
| 366 | static Bag seen; |
| 367 | const char *zErr = 0; |
| 368 | |
| 369 | if( rid==0 ){ |
| 370 | isRepeat = 1; |
| @@ -404,10 +405,15 @@ | |
| 404 | if( verify_z_card(z, n)==2 ){ |
| 405 | blob_reset(pContent); |
| 406 | blob_appendf(pErr, "incorrect Z-card cksum"); |
| 407 | return 0; |
| 408 | } |
| 409 | |
| 410 | /* Allocate a Manifest object to hold the parsed control artifact. |
| 411 | */ |
| 412 | p = fossil_malloc( sizeof(*p) ); |
| 413 | memset(p, 0, sizeof(*p)); |
| @@ -945,13 +951,18 @@ | |
| 945 | if( !seenZ ) SYNTAX("missing Z-card on control"); |
| 946 | p->type = CFTYPE_CONTROL; |
| 947 | } |
| 948 | md5sum_init(); |
| 949 | if( !isRepeat ) g.parseCnt[p->type]++; |
| 950 | return p; |
| 951 | |
| 952 | manifest_syntax_error: |
| 953 | if( zErr ){ |
| 954 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 955 | }else{ |
| 956 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| 957 | } |
| @@ -1734,11 +1745,14 @@ | |
| 1734 | |
| 1735 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1736 | blob_reset(pContent); |
| 1737 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1738 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1739 | if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "syntax error in manifest"); |
| 1740 | return 0; |
| 1741 | } |
| 1742 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1743 | manifest_destroy(p); |
| 1744 | assert( blob_is_reset(pContent) ); |
| @@ -1747,11 +1761,12 @@ | |
| 1747 | } |
| 1748 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1749 | manifest_destroy(p); |
| 1750 | assert( blob_is_reset(pContent) ); |
| 1751 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1752 | fossil_error(1, "cannot fetch baseline manifest"); |
| 1753 | } |
| 1754 | return 0; |
| 1755 | } |
| 1756 | db_begin_transaction(); |
| 1757 | if( p->type==CFTYPE_MANIFEST ){ |
| 1758 | |
| 1759 | DDED src/mkbuiltin.c |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -361,10 +361,11 @@ | |
| 361 | char *z; |
| 362 | int n; |
| 363 | char *zUuid; |
| 364 | int sz = 0; |
| 365 | int isRepeat, hasSelfRefTag = 0; |
| 366 | Blob bUuid = BLOB_INITIALIZER; |
| 367 | static Bag seen; |
| 368 | const char *zErr = 0; |
| 369 | |
| 370 | if( rid==0 ){ |
| 371 | isRepeat = 1; |
| @@ -404,10 +405,15 @@ | |
| 405 | if( verify_z_card(z, n)==2 ){ |
| 406 | blob_reset(pContent); |
| 407 | blob_appendf(pErr, "incorrect Z-card cksum"); |
| 408 | return 0; |
| 409 | } |
| 410 | |
| 411 | /* Store the UUID (before modifying the blob) only for error |
| 412 | ** reporting purposes. |
| 413 | */ |
| 414 | sha1sum_blob(pContent, &bUuid); |
| 415 | |
| 416 | /* Allocate a Manifest object to hold the parsed control artifact. |
| 417 | */ |
| 418 | p = fossil_malloc( sizeof(*p) ); |
| 419 | memset(p, 0, sizeof(*p)); |
| @@ -945,13 +951,18 @@ | |
| 951 | if( !seenZ ) SYNTAX("missing Z-card on control"); |
| 952 | p->type = CFTYPE_CONTROL; |
| 953 | } |
| 954 | md5sum_init(); |
| 955 | if( !isRepeat ) g.parseCnt[p->type]++; |
| 956 | blob_reset(&bUuid); |
| 957 | return p; |
| 958 | |
| 959 | manifest_syntax_error: |
| 960 | if(bUuid.nUsed){ |
| 961 | blob_appendf(pErr, "manifest [%.40s] ", blob_str(&bUuid)); |
| 962 | blob_reset(&bUuid); |
| 963 | } |
| 964 | if( zErr ){ |
| 965 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 966 | }else{ |
| 967 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| 968 | } |
| @@ -1734,11 +1745,14 @@ | |
| 1745 | |
| 1746 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1747 | blob_reset(pContent); |
| 1748 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1749 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1750 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1751 | fossil_error(1, "syntax error in manifest [%s]", |
| 1752 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1753 | } |
| 1754 | return 0; |
| 1755 | } |
| 1756 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1757 | manifest_destroy(p); |
| 1758 | assert( blob_is_reset(pContent) ); |
| @@ -1747,11 +1761,12 @@ | |
| 1761 | } |
| 1762 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1763 | manifest_destroy(p); |
| 1764 | assert( blob_is_reset(pContent) ); |
| 1765 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1766 | fossil_error(1, "cannot fetch baseline for manifest [%s]", |
| 1767 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1768 | } |
| 1769 | return 0; |
| 1770 | } |
| 1771 | db_begin_transaction(); |
| 1772 | if( p->type==CFTYPE_MANIFEST ){ |
| 1773 | |
| 1774 | DDED src/mkbuiltin.c |
+61
| --- a/src/mkbuiltin.c | ||
| +++ b/src/mkbuiltin.c | ||
| @@ -0,0 +1,61 @@ | ||
| 1 | +/* | |
| 2 | +** Con = argc-1/* | |
| 3 | + /* | |
| 4 | +** Con = argc-1/* | |
| 5 | +** Const/* | |
| 6 | +** Copyright (st/* | |
| 7 | +** Copyright (c) 2014 D. Richard Hipp | |
| 8 | +** | |
| 9 | +** This program is free software; you can redistribute it and/or | |
| 10 | +** modify it under the terms of the Simplif Copvoid *a, const v*)a; | |
| 11 | + Resource *pB = esource*)b; | |
| 12 | + return strcmp(pA->zName, pB->zName) nRes = argc - 1; | |
| 13 | + aRes = malloc( nRes*sizeof(aRes[0]) ); | |
| 14 | + if( aRes==0t (c) 2014 D. Richard Hip/return 1; | |
| 15 | + } | |
| 16 | +aRes[ireturn nErr; | |
| 17 | +} | |
| 18 | +const char *zTail; | |
| 19 | + int nSlash = 0; | |
| 20 | + zTail = z; | |
| 21 | + while( z && z[0] ){ | |
| 22 | + if( z[0]=='/' || z[0]=='\\' ){ | |
| 23 | + nSlash++; | |
| 24 | + if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1]; | |
| 25 | + } | |
| 26 | + z++; | |
| 27 | + }zTail); | |
| 28 | + for(j=Tail;/* | |
| 29 | +** Con = argc-1/* | |
| 30 | +** Const/* | |
| 31 | +** Copyright (st/* | |
| 32 | +** Copyright (c) 20gc-1/* | |
| 33 | +** Const** Const/* | |
| 34 | +** Copyright (st/* | |
| 35 | +** Copyright (c) 2014 D. Richard Hipp | |
| 36 | +** | |
| 37 | +** This program is free software; you can redistribute it and/or | |
| 38 | +** modify it under the terms of the Simplif Copvoid *a, const v*)a; | |
| 39 | + Resource *pB = esource*)b; | |
| 40 | + return strcmp(pA->zName, pB->zName) nRes = argc - 1; | |
| 41 | + aRes = malloc( nRes*sizeof(aRes[0]) ); | |
| 42 | + if( aRes==0t (c) 2014 D. Richard Hip/return 1; | |
| 43 | + } | |
| 44 | +aRes[ireturn nErr; | |
| 45 | +} | |
| 46 | +const char *zTail; | |
| 47 | + int nSlash = 0; | |
| 48 | + zTail = z; | |
| 49 | + while( z && z[0] ){ | |
| 50 | + if( z[0]=='/' || z[0]=='\\' ){ | |
| 51 | + nSlash++; | |
| 52 | + if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1]; | |
| 53 | + } | |
| 54 | + z++; | |
| 55 | + }zTail); | |
| 56 | + for(j=Tail;/* | |
| 57 | +** Con = argc-1/* | |
| 58 | +** Const/* | |
| 59 | +** Copyright (st/* | |
| 60 | +** Copyright (c) 20gc-1/* | |
| 61 | +** Const |
| --- a/src/mkbuiltin.c | |
| +++ b/src/mkbuiltin.c | |
| @@ -0,0 +1,61 @@ | |
| --- a/src/mkbuiltin.c | |
| +++ b/src/mkbuiltin.c | |
| @@ -0,0 +1,61 @@ | |
| 1 | /* |
| 2 | ** Con = argc-1/* |
| 3 | /* |
| 4 | ** Con = argc-1/* |
| 5 | ** Const/* |
| 6 | ** Copyright (st/* |
| 7 | ** Copyright (c) 2014 D. Richard Hipp |
| 8 | ** |
| 9 | ** This program is free software; you can redistribute it and/or |
| 10 | ** modify it under the terms of the Simplif Copvoid *a, const v*)a; |
| 11 | Resource *pB = esource*)b; |
| 12 | return strcmp(pA->zName, pB->zName) nRes = argc - 1; |
| 13 | aRes = malloc( nRes*sizeof(aRes[0]) ); |
| 14 | if( aRes==0t (c) 2014 D. Richard Hip/return 1; |
| 15 | } |
| 16 | aRes[ireturn nErr; |
| 17 | } |
| 18 | const char *zTail; |
| 19 | int nSlash = 0; |
| 20 | zTail = z; |
| 21 | while( z && z[0] ){ |
| 22 | if( z[0]=='/' || z[0]=='\\' ){ |
| 23 | nSlash++; |
| 24 | if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1]; |
| 25 | } |
| 26 | z++; |
| 27 | }zTail); |
| 28 | for(j=Tail;/* |
| 29 | ** Con = argc-1/* |
| 30 | ** Const/* |
| 31 | ** Copyright (st/* |
| 32 | ** Copyright (c) 20gc-1/* |
| 33 | ** Const** Const/* |
| 34 | ** Copyright (st/* |
| 35 | ** Copyright (c) 2014 D. Richard Hipp |
| 36 | ** |
| 37 | ** This program is free software; you can redistribute it and/or |
| 38 | ** modify it under the terms of the Simplif Copvoid *a, const v*)a; |
| 39 | Resource *pB = esource*)b; |
| 40 | return strcmp(pA->zName, pB->zName) nRes = argc - 1; |
| 41 | aRes = malloc( nRes*sizeof(aRes[0]) ); |
| 42 | if( aRes==0t (c) 2014 D. Richard Hip/return 1; |
| 43 | } |
| 44 | aRes[ireturn nErr; |
| 45 | } |
| 46 | const char *zTail; |
| 47 | int nSlash = 0; |
| 48 | zTail = z; |
| 49 | while( z && z[0] ){ |
| 50 | if( z[0]=='/' || z[0]=='\\' ){ |
| 51 | nSlash++; |
| 52 | if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1]; |
| 53 | } |
| 54 | z++; |
| 55 | }zTail); |
| 56 | for(j=Tail;/* |
| 57 | ** Con = argc-1/* |
| 58 | ** Const/* |
| 59 | ** Copyright (st/* |
| 60 | ** Copyright (c) 20gc-1/* |
| 61 | ** Const |
+4
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1075,10 +1075,14 @@ | ||
| 1075 | 1075 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 1076 | 1076 | @ even for relatively small projects.</p> |
| 1077 | 1077 | @ |
| 1078 | 1078 | @ <p>Additional parameters that control this behavior:</p> |
| 1079 | 1079 | @ <blockquote> |
| 1080 | + onoff_attribute("Enable hyperlinks for humans (as deduced from the UserAgent " | |
| 1081 | + " HTTP header string)", | |
| 1082 | + "auto-hyperlink-ishuman", "ahis", 0, 0); | |
| 1083 | + @ <br> | |
| 1080 | 1084 | onoff_attribute("Require mouse movement before enabling hyperlinks", |
| 1081 | 1085 | "auto-hyperlink-mouseover", "ahmo", 0, 0); |
| 1082 | 1086 | @ <br> |
| 1083 | 1087 | entry_attribute("Delay before enabling hyperlinks (milliseconds)", 5, |
| 1084 | 1088 | "auto-hyperlink-delay", "ah-delay", "10", 0); |
| 1085 | 1089 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1075,10 +1075,14 @@ | |
| 1075 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 1076 | @ even for relatively small projects.</p> |
| 1077 | @ |
| 1078 | @ <p>Additional parameters that control this behavior:</p> |
| 1079 | @ <blockquote> |
| 1080 | onoff_attribute("Require mouse movement before enabling hyperlinks", |
| 1081 | "auto-hyperlink-mouseover", "ahmo", 0, 0); |
| 1082 | @ <br> |
| 1083 | entry_attribute("Delay before enabling hyperlinks (milliseconds)", 5, |
| 1084 | "auto-hyperlink-delay", "ah-delay", "10", 0); |
| 1085 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1075,10 +1075,14 @@ | |
| 1075 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 1076 | @ even for relatively small projects.</p> |
| 1077 | @ |
| 1078 | @ <p>Additional parameters that control this behavior:</p> |
| 1079 | @ <blockquote> |
| 1080 | onoff_attribute("Enable hyperlinks for humans (as deduced from the UserAgent " |
| 1081 | " HTTP header string)", |
| 1082 | "auto-hyperlink-ishuman", "ahis", 0, 0); |
| 1083 | @ <br> |
| 1084 | onoff_attribute("Require mouse movement before enabling hyperlinks", |
| 1085 | "auto-hyperlink-mouseover", "ahmo", 0, 0); |
| 1086 | @ <br> |
| 1087 | entry_attribute("Delay before enabling hyperlinks (milliseconds)", 5, |
| 1088 | "auto-hyperlink-delay", "ah-delay", "10", 0); |
| 1089 |
+6
-2
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -182,18 +182,22 @@ | ||
| 182 | 182 | @ var isOperaMini = Object.prototype.toString.call(window.operamini) |
| 183 | 183 | @ === "[object OperaMini]"; |
| 184 | 184 | @ if( isOperaMini ){ |
| 185 | 185 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 186 | 186 | @ } |
| 187 | + }else if( db_get_boolean("auto-hyperlink-ishuman",0) && g.isHuman ){ | |
| 188 | + /* Active hyperlinks after a delay */ | |
| 189 | + @ setTimeout("setAllHrefs();",%d(nDelay)); | |
| 187 | 190 | }else if( db_get_boolean("auto-hyperlink-mouseover",0) ){ |
| 188 | - /* Require mouse movement prior to activating hyperlinks */ | |
| 191 | + /* Require mouse movement before starting the teim that will | |
| 192 | + ** activating hyperlinks */ | |
| 189 | 193 | @ document.getElementsByTagName("body")[0].onmousemove=function(){ |
| 190 | 194 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 191 | 195 | @ this.onmousemove = null; |
| 192 | 196 | @ } |
| 193 | 197 | }else{ |
| 194 | - /* Active hyperlinks right away */ | |
| 198 | + /* Active hyperlinks after a delay */ | |
| 195 | 199 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 196 | 200 | } |
| 197 | 201 | @ </script> |
| 198 | 202 | } |
| 199 | 203 | |
| 200 | 204 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -182,18 +182,22 @@ | |
| 182 | @ var isOperaMini = Object.prototype.toString.call(window.operamini) |
| 183 | @ === "[object OperaMini]"; |
| 184 | @ if( isOperaMini ){ |
| 185 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 186 | @ } |
| 187 | }else if( db_get_boolean("auto-hyperlink-mouseover",0) ){ |
| 188 | /* Require mouse movement prior to activating hyperlinks */ |
| 189 | @ document.getElementsByTagName("body")[0].onmousemove=function(){ |
| 190 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 191 | @ this.onmousemove = null; |
| 192 | @ } |
| 193 | }else{ |
| 194 | /* Active hyperlinks right away */ |
| 195 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 196 | } |
| 197 | @ </script> |
| 198 | } |
| 199 | |
| 200 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -182,18 +182,22 @@ | |
| 182 | @ var isOperaMini = Object.prototype.toString.call(window.operamini) |
| 183 | @ === "[object OperaMini]"; |
| 184 | @ if( isOperaMini ){ |
| 185 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 186 | @ } |
| 187 | }else if( db_get_boolean("auto-hyperlink-ishuman",0) && g.isHuman ){ |
| 188 | /* Active hyperlinks after a delay */ |
| 189 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 190 | }else if( db_get_boolean("auto-hyperlink-mouseover",0) ){ |
| 191 | /* Require mouse movement before starting the teim that will |
| 192 | ** activating hyperlinks */ |
| 193 | @ document.getElementsByTagName("body")[0].onmousemove=function(){ |
| 194 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 195 | @ this.onmousemove = null; |
| 196 | @ } |
| 197 | }else{ |
| 198 | /* Active hyperlinks after a delay */ |
| 199 | @ setTimeout("setAllHrefs();",%d(nDelay)); |
| 200 | } |
| 201 | @ </script> |
| 202 | } |
| 203 | |
| 204 |
+31
-29
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1702,11 +1702,11 @@ | ||
| 1702 | 1702 | } |
| 1703 | 1703 | |
| 1704 | 1704 | /* |
| 1705 | 1705 | ** COMMAND: timeline |
| 1706 | 1706 | ** |
| 1707 | -** Usage: %fossil timeline ?WHEN? ?BASELINE|DATETIME? ?OPTIONS? | |
| 1707 | +** Usage: %fossil timeline ?WHEN? ?CHECKIN|DATETIME? ?OPTIONS? | |
| 1708 | 1708 | ** |
| 1709 | 1709 | ** Print a summary of activity going backwards in date and time |
| 1710 | 1710 | ** specified or from the current date and time if no arguments |
| 1711 | 1711 | ** are given. The WHEN argument can be any unique abbreviation |
| 1712 | 1712 | ** of one of these keywords: |
| @@ -1722,10 +1722,12 @@ | ||
| 1722 | 1722 | ** for the current version or "now" for the current time. |
| 1723 | 1723 | ** |
| 1724 | 1724 | ** Options: |
| 1725 | 1725 | ** -n|--limit N Output the first N entries (default 20 lines). |
| 1726 | 1726 | ** N=0 means no limit. |
| 1727 | +** -p|--path PATH Output items affecting PATH only. | |
| 1728 | +** PATH can be a file or a sub directory. | |
| 1727 | 1729 | ** --offset P skip P changes |
| 1728 | 1730 | ** -t|--type TYPE Output items from the given types only, such as: |
| 1729 | 1731 | ** ci = file commits only |
| 1730 | 1732 | ** e = events only |
| 1731 | 1733 | ** t = tickets only |
| @@ -1739,11 +1741,11 @@ | ||
| 1739 | 1741 | ** -R REPO_FILE Specifies the repository db to use. Default is |
| 1740 | 1742 | ** the current checkout's repository. |
| 1741 | 1743 | */ |
| 1742 | 1744 | void timeline_cmd(void){ |
| 1743 | 1745 | Stmt q; |
| 1744 | - int n, k, width, i; | |
| 1746 | + int n, k, width; | |
| 1745 | 1747 | const char *zLimit; |
| 1746 | 1748 | const char *zWidth; |
| 1747 | 1749 | const char *zOffset; |
| 1748 | 1750 | const char *zType; |
| 1749 | 1751 | char *zOrigin; |
| @@ -1763,10 +1765,12 @@ | ||
| 1763 | 1765 | } |
| 1764 | 1766 | db_find_and_open_repository(0, 0); |
| 1765 | 1767 | zLimit = find_option("limit","n",1); |
| 1766 | 1768 | zWidth = find_option("width","W",1); |
| 1767 | 1769 | zType = find_option("type","t",1); |
| 1770 | + zFilePattern = find_option("path","p",1); | |
| 1771 | + | |
| 1768 | 1772 | if( !zLimit ){ |
| 1769 | 1773 | zLimit = find_option("count",0,1); |
| 1770 | 1774 | } |
| 1771 | 1775 | if( zLimit ){ |
| 1772 | 1776 | n = atoi(zLimit); |
| @@ -1785,39 +1789,37 @@ | ||
| 1785 | 1789 | iOffset = zOffset ? atoi(zOffset) : 0; |
| 1786 | 1790 | |
| 1787 | 1791 | /* We should be done with options.. */ |
| 1788 | 1792 | verify_all_options(); |
| 1789 | 1793 | |
| 1790 | - zOrigin = "now"; | |
| 1791 | - zFilePattern = 0; | |
| 1792 | - for(i=2; i<g.argc; i++){ | |
| 1793 | - char *zArg = g.argv[i]; | |
| 1794 | - k = strlen(zArg); | |
| 1795 | - if( mode==0 ){ | |
| 1796 | - if( strncmp(zArg,"before",k)==0 ){ | |
| 1797 | - mode = 1; | |
| 1798 | - }else if( strncmp(zArg,"after",k)==0 && k>1 ){ | |
| 1799 | - mode = 2; | |
| 1800 | - }else if( strncmp(zArg,"descendants",k)==0 ){ | |
| 1801 | - mode = 3; | |
| 1802 | - }else if( strncmp(zArg,"children",k)==0 ){ | |
| 1803 | - mode = 3; | |
| 1804 | - }else if( strncmp(zArg,"ancestors",k)==0 && k>1 ){ | |
| 1805 | - mode = 4; | |
| 1806 | - }else if( strncmp(zArg,"parents",k)==0 ){ | |
| 1807 | - mode = 4; | |
| 1808 | - } | |
| 1809 | - if( mode ){ | |
| 1810 | - if( i<g.argc-1 ) zOrigin = g.argv[++i]; | |
| 1811 | - continue; | |
| 1812 | - } | |
| 1813 | - } | |
| 1814 | - if( zFilePattern==0 ){ | |
| 1815 | - zFilePattern = zArg; | |
| 1794 | + if( g.argc>=4 ){ | |
| 1795 | + k = strlen(g.argv[2]); | |
| 1796 | + if( strncmp(g.argv[2],"before",k)==0 ){ | |
| 1797 | + mode = 1; | |
| 1798 | + }else if( strncmp(g.argv[2],"after",k)==0 && k>1 ){ | |
| 1799 | + mode = 2; | |
| 1800 | + }else if( strncmp(g.argv[2],"descendants",k)==0 ){ | |
| 1801 | + mode = 3; | |
| 1802 | + }else if( strncmp(g.argv[2],"children",k)==0 ){ | |
| 1803 | + mode = 3; | |
| 1804 | + }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){ | |
| 1805 | + mode = 4; | |
| 1806 | + }else if( strncmp(g.argv[2],"parents",k)==0 ){ | |
| 1807 | + mode = 4; | |
| 1808 | + }else if(!zType && !zLimit){ | |
| 1809 | + usage("?WHEN? ?CHECKIN|DATETIME? ?-n|--limit #? ?-t|--type TYPE? " | |
| 1810 | + "?-W|--width WIDTH? ?-p|--path PATH"); | |
| 1811 | + } | |
| 1812 | + if( '-' != *g.argv[3] ){ | |
| 1813 | + zOrigin = g.argv[3]; | |
| 1816 | 1814 | }else{ |
| 1817 | - usage("?WHEN? ?CHECKIN|DATETIME? ?FILE? ?OPTIONS?"); | |
| 1815 | + zOrigin = "now"; | |
| 1818 | 1816 | } |
| 1817 | + }else if( g.argc==3 ){ | |
| 1818 | + zOrigin = g.argv[2]; | |
| 1819 | + }else{ | |
| 1820 | + zOrigin = "now"; | |
| 1819 | 1821 | } |
| 1820 | 1822 | k = strlen(zOrigin); |
| 1821 | 1823 | blob_zero(&uuid); |
| 1822 | 1824 | blob_append(&uuid, zOrigin, -1); |
| 1823 | 1825 | if( fossil_strcmp(zOrigin, "now")==0 ){ |
| 1824 | 1826 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1702,11 +1702,11 @@ | |
| 1702 | } |
| 1703 | |
| 1704 | /* |
| 1705 | ** COMMAND: timeline |
| 1706 | ** |
| 1707 | ** Usage: %fossil timeline ?WHEN? ?BASELINE|DATETIME? ?OPTIONS? |
| 1708 | ** |
| 1709 | ** Print a summary of activity going backwards in date and time |
| 1710 | ** specified or from the current date and time if no arguments |
| 1711 | ** are given. The WHEN argument can be any unique abbreviation |
| 1712 | ** of one of these keywords: |
| @@ -1722,10 +1722,12 @@ | |
| 1722 | ** for the current version or "now" for the current time. |
| 1723 | ** |
| 1724 | ** Options: |
| 1725 | ** -n|--limit N Output the first N entries (default 20 lines). |
| 1726 | ** N=0 means no limit. |
| 1727 | ** --offset P skip P changes |
| 1728 | ** -t|--type TYPE Output items from the given types only, such as: |
| 1729 | ** ci = file commits only |
| 1730 | ** e = events only |
| 1731 | ** t = tickets only |
| @@ -1739,11 +1741,11 @@ | |
| 1739 | ** -R REPO_FILE Specifies the repository db to use. Default is |
| 1740 | ** the current checkout's repository. |
| 1741 | */ |
| 1742 | void timeline_cmd(void){ |
| 1743 | Stmt q; |
| 1744 | int n, k, width, i; |
| 1745 | const char *zLimit; |
| 1746 | const char *zWidth; |
| 1747 | const char *zOffset; |
| 1748 | const char *zType; |
| 1749 | char *zOrigin; |
| @@ -1763,10 +1765,12 @@ | |
| 1763 | } |
| 1764 | db_find_and_open_repository(0, 0); |
| 1765 | zLimit = find_option("limit","n",1); |
| 1766 | zWidth = find_option("width","W",1); |
| 1767 | zType = find_option("type","t",1); |
| 1768 | if( !zLimit ){ |
| 1769 | zLimit = find_option("count",0,1); |
| 1770 | } |
| 1771 | if( zLimit ){ |
| 1772 | n = atoi(zLimit); |
| @@ -1785,39 +1789,37 @@ | |
| 1785 | iOffset = zOffset ? atoi(zOffset) : 0; |
| 1786 | |
| 1787 | /* We should be done with options.. */ |
| 1788 | verify_all_options(); |
| 1789 | |
| 1790 | zOrigin = "now"; |
| 1791 | zFilePattern = 0; |
| 1792 | for(i=2; i<g.argc; i++){ |
| 1793 | char *zArg = g.argv[i]; |
| 1794 | k = strlen(zArg); |
| 1795 | if( mode==0 ){ |
| 1796 | if( strncmp(zArg,"before",k)==0 ){ |
| 1797 | mode = 1; |
| 1798 | }else if( strncmp(zArg,"after",k)==0 && k>1 ){ |
| 1799 | mode = 2; |
| 1800 | }else if( strncmp(zArg,"descendants",k)==0 ){ |
| 1801 | mode = 3; |
| 1802 | }else if( strncmp(zArg,"children",k)==0 ){ |
| 1803 | mode = 3; |
| 1804 | }else if( strncmp(zArg,"ancestors",k)==0 && k>1 ){ |
| 1805 | mode = 4; |
| 1806 | }else if( strncmp(zArg,"parents",k)==0 ){ |
| 1807 | mode = 4; |
| 1808 | } |
| 1809 | if( mode ){ |
| 1810 | if( i<g.argc-1 ) zOrigin = g.argv[++i]; |
| 1811 | continue; |
| 1812 | } |
| 1813 | } |
| 1814 | if( zFilePattern==0 ){ |
| 1815 | zFilePattern = zArg; |
| 1816 | }else{ |
| 1817 | usage("?WHEN? ?CHECKIN|DATETIME? ?FILE? ?OPTIONS?"); |
| 1818 | } |
| 1819 | } |
| 1820 | k = strlen(zOrigin); |
| 1821 | blob_zero(&uuid); |
| 1822 | blob_append(&uuid, zOrigin, -1); |
| 1823 | if( fossil_strcmp(zOrigin, "now")==0 ){ |
| 1824 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1702,11 +1702,11 @@ | |
| 1702 | } |
| 1703 | |
| 1704 | /* |
| 1705 | ** COMMAND: timeline |
| 1706 | ** |
| 1707 | ** Usage: %fossil timeline ?WHEN? ?CHECKIN|DATETIME? ?OPTIONS? |
| 1708 | ** |
| 1709 | ** Print a summary of activity going backwards in date and time |
| 1710 | ** specified or from the current date and time if no arguments |
| 1711 | ** are given. The WHEN argument can be any unique abbreviation |
| 1712 | ** of one of these keywords: |
| @@ -1722,10 +1722,12 @@ | |
| 1722 | ** for the current version or "now" for the current time. |
| 1723 | ** |
| 1724 | ** Options: |
| 1725 | ** -n|--limit N Output the first N entries (default 20 lines). |
| 1726 | ** N=0 means no limit. |
| 1727 | ** -p|--path PATH Output items affecting PATH only. |
| 1728 | ** PATH can be a file or a sub directory. |
| 1729 | ** --offset P skip P changes |
| 1730 | ** -t|--type TYPE Output items from the given types only, such as: |
| 1731 | ** ci = file commits only |
| 1732 | ** e = events only |
| 1733 | ** t = tickets only |
| @@ -1739,11 +1741,11 @@ | |
| 1741 | ** -R REPO_FILE Specifies the repository db to use. Default is |
| 1742 | ** the current checkout's repository. |
| 1743 | */ |
| 1744 | void timeline_cmd(void){ |
| 1745 | Stmt q; |
| 1746 | int n, k, width; |
| 1747 | const char *zLimit; |
| 1748 | const char *zWidth; |
| 1749 | const char *zOffset; |
| 1750 | const char *zType; |
| 1751 | char *zOrigin; |
| @@ -1763,10 +1765,12 @@ | |
| 1765 | } |
| 1766 | db_find_and_open_repository(0, 0); |
| 1767 | zLimit = find_option("limit","n",1); |
| 1768 | zWidth = find_option("width","W",1); |
| 1769 | zType = find_option("type","t",1); |
| 1770 | zFilePattern = find_option("path","p",1); |
| 1771 | |
| 1772 | if( !zLimit ){ |
| 1773 | zLimit = find_option("count",0,1); |
| 1774 | } |
| 1775 | if( zLimit ){ |
| 1776 | n = atoi(zLimit); |
| @@ -1785,39 +1789,37 @@ | |
| 1789 | iOffset = zOffset ? atoi(zOffset) : 0; |
| 1790 | |
| 1791 | /* We should be done with options.. */ |
| 1792 | verify_all_options(); |
| 1793 | |
| 1794 | if( g.argc>=4 ){ |
| 1795 | k = strlen(g.argv[2]); |
| 1796 | if( strncmp(g.argv[2],"before",k)==0 ){ |
| 1797 | mode = 1; |
| 1798 | }else if( strncmp(g.argv[2],"after",k)==0 && k>1 ){ |
| 1799 | mode = 2; |
| 1800 | }else if( strncmp(g.argv[2],"descendants",k)==0 ){ |
| 1801 | mode = 3; |
| 1802 | }else if( strncmp(g.argv[2],"children",k)==0 ){ |
| 1803 | mode = 3; |
| 1804 | }else if( strncmp(g.argv[2],"ancestors",k)==0 && k>1 ){ |
| 1805 | mode = 4; |
| 1806 | }else if( strncmp(g.argv[2],"parents",k)==0 ){ |
| 1807 | mode = 4; |
| 1808 | }else if(!zType && !zLimit){ |
| 1809 | usage("?WHEN? ?CHECKIN|DATETIME? ?-n|--limit #? ?-t|--type TYPE? " |
| 1810 | "?-W|--width WIDTH? ?-p|--path PATH"); |
| 1811 | } |
| 1812 | if( '-' != *g.argv[3] ){ |
| 1813 | zOrigin = g.argv[3]; |
| 1814 | }else{ |
| 1815 | zOrigin = "now"; |
| 1816 | } |
| 1817 | }else if( g.argc==3 ){ |
| 1818 | zOrigin = g.argv[2]; |
| 1819 | }else{ |
| 1820 | zOrigin = "now"; |
| 1821 | } |
| 1822 | k = strlen(zOrigin); |
| 1823 | blob_zero(&uuid); |
| 1824 | blob_append(&uuid, zOrigin, -1); |
| 1825 | if( fossil_strcmp(zOrigin, "now")==0 ){ |
| 1826 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -201,11 +201,11 @@ | ||
| 201 | 201 | if( rid==0 ){ |
| 202 | 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | 203 | blob_reset(&content); |
| 204 | 204 | }else{ |
| 205 | 205 | if( !isPriv ) content_make_public(rid); |
| 206 | - manifest_crosslink(rid, &content, MC_NONE|MC_NO_ERRORS); | |
| 206 | + manifest_crosslink(rid, &content, MC_NO_ERRORS); | |
| 207 | 207 | } |
| 208 | 208 | assert( blob_is_reset(&content) ); |
| 209 | 209 | remote_has(rid); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -201,11 +201,11 @@ | |
| 201 | if( rid==0 ){ |
| 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | blob_reset(&content); |
| 204 | }else{ |
| 205 | if( !isPriv ) content_make_public(rid); |
| 206 | manifest_crosslink(rid, &content, MC_NONE|MC_NO_ERRORS); |
| 207 | } |
| 208 | assert( blob_is_reset(&content) ); |
| 209 | remote_has(rid); |
| 210 | } |
| 211 | |
| 212 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -201,11 +201,11 @@ | |
| 201 | if( rid==0 ){ |
| 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | blob_reset(&content); |
| 204 | }else{ |
| 205 | if( !isPriv ) content_make_public(rid); |
| 206 | manifest_crosslink(rid, &content, MC_NO_ERRORS); |
| 207 | } |
| 208 | assert( blob_is_reset(&content) ); |
| 209 | remote_has(rid); |
| 210 | } |
| 211 | |
| 212 |
+6
-3
| --- win/Makefile.PellesCGMake | ||
| +++ win/Makefile.PellesCGMake | ||
| @@ -75,11 +75,11 @@ | ||
| 75 | 75 | RC=$(PellesCDir)\bin\porc.exe |
| 76 | 76 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 77 | 77 | |
| 78 | 78 | # define the special utilities files, needed to generate |
| 79 | 79 | # the automatically generated source files |
| 80 | -UTILS=translate.exe mkindex.exe makeheaders.exe | |
| 80 | +UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe | |
| 81 | 81 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 82 | 82 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) |
| 83 | 83 | |
| 84 | 84 | # define the SQLite files, which need special flags on compile |
| 85 | 85 | SQLITESRC=sqlite3.c |
| @@ -114,11 +114,11 @@ | ||
| 114 | 114 | # main target file is the application |
| 115 | 115 | APPLICATION=fossil.exe |
| 116 | 116 | |
| 117 | 117 | # define the standard make target |
| 118 | 118 | .PHONY: default |
| 119 | -default: page_index.h headers $(APPLICATION) | |
| 119 | +default: page_index.h builtin_data.h headers $(APPLICATION) | |
| 120 | 120 | |
| 121 | 121 | # symbolic target to generate the source generate utils |
| 122 | 122 | .PHONY: utils |
| 123 | 123 | utils: $(UTILS) |
| 124 | 124 | |
| @@ -139,17 +139,20 @@ | ||
| 139 | 139 | translate.exe $< >$@ |
| 140 | 140 | |
| 141 | 141 | # generate the index source, containing all web references,.. |
| 142 | 142 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 143 | 143 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 144 | + | |
| 145 | +builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe | |
| 146 | + mkbuiltin.exe $(EXTRA_FILES) >$@ | |
| 144 | 147 | |
| 145 | 148 | # extracting version info from manifest |
| 146 | 149 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 147 | 150 | version.exe ..\manifest.uuid ..\manifest ..\VERSION > $@ |
| 148 | 151 | |
| 149 | 152 | # generate the simplified headers |
| 150 | -headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h | |
| 153 | +headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h | |
| 151 | 154 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h |
| 152 | 155 | echo Done >$@ |
| 153 | 156 | |
| 154 | 157 | # compile C sources with relevant options |
| 155 | 158 | |
| 156 | 159 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -75,11 +75,11 @@ | |
| 75 | RC=$(PellesCDir)\bin\porc.exe |
| 76 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 77 | |
| 78 | # define the special utilities files, needed to generate |
| 79 | # the automatically generated source files |
| 80 | UTILS=translate.exe mkindex.exe makeheaders.exe |
| 81 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 82 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) |
| 83 | |
| 84 | # define the SQLite files, which need special flags on compile |
| 85 | SQLITESRC=sqlite3.c |
| @@ -114,11 +114,11 @@ | |
| 114 | # main target file is the application |
| 115 | APPLICATION=fossil.exe |
| 116 | |
| 117 | # define the standard make target |
| 118 | .PHONY: default |
| 119 | default: page_index.h headers $(APPLICATION) |
| 120 | |
| 121 | # symbolic target to generate the source generate utils |
| 122 | .PHONY: utils |
| 123 | utils: $(UTILS) |
| 124 | |
| @@ -139,17 +139,20 @@ | |
| 139 | translate.exe $< >$@ |
| 140 | |
| 141 | # generate the index source, containing all web references,.. |
| 142 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 143 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 144 | |
| 145 | # extracting version info from manifest |
| 146 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 147 | version.exe ..\manifest.uuid ..\manifest ..\VERSION > $@ |
| 148 | |
| 149 | # generate the simplified headers |
| 150 | headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h |
| 151 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h |
| 152 | echo Done >$@ |
| 153 | |
| 154 | # compile C sources with relevant options |
| 155 | |
| 156 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -75,11 +75,11 @@ | |
| 75 | RC=$(PellesCDir)\bin\porc.exe |
| 76 | RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION) |
| 77 | |
| 78 | # define the special utilities files, needed to generate |
| 79 | # the automatically generated source files |
| 80 | UTILS=translate.exe mkindex.exe makeheaders.exe mkbuiltin.exe |
| 81 | UTILS_OBJ=$(UTILS:.exe=.obj) |
| 82 | UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) |
| 83 | |
| 84 | # define the SQLite files, which need special flags on compile |
| 85 | SQLITESRC=sqlite3.c |
| @@ -114,11 +114,11 @@ | |
| 114 | # main target file is the application |
| 115 | APPLICATION=fossil.exe |
| 116 | |
| 117 | # define the standard make target |
| 118 | .PHONY: default |
| 119 | default: page_index.h builtin_data.h headers $(APPLICATION) |
| 120 | |
| 121 | # symbolic target to generate the source generate utils |
| 122 | .PHONY: utils |
| 123 | utils: $(UTILS) |
| 124 | |
| @@ -139,17 +139,20 @@ | |
| 139 | translate.exe $< >$@ |
| 140 | |
| 141 | # generate the index source, containing all web references,.. |
| 142 | page_index.h: $(TRANSLATEDSRC) mkindex.exe |
| 143 | mkindex.exe $(TRANSLATEDSRC) >$@ |
| 144 | |
| 145 | builtin_data.h: $(EXTRA_FILES) mkbuiltin.exe |
| 146 | mkbuiltin.exe $(EXTRA_FILES) >$@ |
| 147 | |
| 148 | # extracting version info from manifest |
| 149 | VERSION.h: version.exe ..\manifest.uuid ..\manifest ..\VERSION |
| 150 | version.exe ..\manifest.uuid ..\manifest ..\VERSION > $@ |
| 151 | |
| 152 | # generate the simplified headers |
| 153 | headers: makeheaders.exe page_index.h builtin_data.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h |
| 154 | makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h |
| 155 | echo Done >$@ |
| 156 | |
| 157 | # compile C sources with relevant options |
| 158 | |
| 159 |
+18
-6
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -28,13 +28,13 @@ | ||
| 28 | 28 | |
| 29 | 29 | SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | 30 | |
| 31 | 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | 32 | |
| 33 | -SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 33 | +SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 34 | 34 | |
| 35 | -OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 35 | +OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | RC=$(DMDIR)\bin\rcc |
| 39 | 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | 40 | |
| @@ -49,11 +49,11 @@ | ||
| 49 | 49 | |
| 50 | 50 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 51 | 51 | $(RC) $(RCFLAGS) -o$@ $** |
| 52 | 52 | |
| 53 | 53 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 54 | - +echo add allrepo attach bag bisect blob branch browse cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 54 | + +echo add allrepo attach bag bisect blob branch browse builtin cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 55 | 55 | +echo fossil >> $@ |
| 56 | 56 | +echo fossil >> $@ |
| 57 | 57 | +echo $(LIBS) >> $@ |
| 58 | 58 | +echo. >> $@ |
| 59 | 59 | +echo fossil >> $@ |
| @@ -64,10 +64,13 @@ | ||
| 64 | 64 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 65 | 65 | $(BCC) -o$@ $** |
| 66 | 66 | |
| 67 | 67 | mkindex$E: $(SRCDIR)\mkindex.c |
| 68 | 68 | $(BCC) -o$@ $** |
| 69 | + | |
| 70 | +mkbuiltin$E: $(SRCDIR)\mkbuiltin.c | |
| 71 | + $(BCC) -o$@ $** | |
| 69 | 72 | |
| 70 | 73 | mkversion$E: $(SRCDIR)\mkversion.c |
| 71 | 74 | $(BCC) -o$@ $** |
| 72 | 75 | |
| 73 | 76 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -92,16 +95,19 @@ | ||
| 92 | 95 | +$** > $@ |
| 93 | 96 | |
| 94 | 97 | page_index.h: mkindex$E $(SRC) |
| 95 | 98 | +$** > $@ |
| 96 | 99 | |
| 100 | +builtin_data.h: mkbuiltin$E $(EXTRA_FILES) | |
| 101 | + +$** > $@ | |
| 102 | + | |
| 97 | 103 | clean: |
| 98 | 104 | -del $(OBJDIR)\*.obj |
| 99 | 105 | -del *.obj *_.c *.h *.map |
| 100 | 106 | |
| 101 | 107 | realclean: |
| 102 | - -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E | |
| 108 | + -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E mkbuiltin$E | |
| 103 | 109 | |
| 104 | 110 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 105 | 111 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 106 | 112 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 107 | 113 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -164,10 +170,16 @@ | ||
| 164 | 170 | $(OBJDIR)\browse$O : browse_.c browse.h |
| 165 | 171 | $(TCC) -o$@ -c browse_.c |
| 166 | 172 | |
| 167 | 173 | browse_.c : $(SRCDIR)\browse.c |
| 168 | 174 | +translate$E $** > $@ |
| 175 | + | |
| 176 | +$(OBJDIR)\builtin$O : builtin_.c builtin.h | |
| 177 | + $(TCC) -o$@ -c builtin_.c | |
| 178 | + | |
| 179 | +builtin_.c : $(SRCDIR)\builtin.c | |
| 180 | + +translate$E $** > $@ | |
| 169 | 181 | |
| 170 | 182 | $(OBJDIR)\cache$O : cache_.c cache.h |
| 171 | 183 | $(TCC) -o$@ -c cache_.c |
| 172 | 184 | |
| 173 | 185 | cache_.c : $(SRCDIR)\cache.c |
| @@ -783,8 +795,8 @@ | ||
| 783 | 795 | $(TCC) -o$@ -c zip_.c |
| 784 | 796 | |
| 785 | 797 | zip_.c : $(SRCDIR)\zip.c |
| 786 | 798 | +translate$E $** > $@ |
| 787 | 799 | |
| 788 | -headers: makeheaders$E page_index.h VERSION.h | |
| 789 | - +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 800 | +headers: makeheaders$E page_index.h builtin_data.h VERSION.h | |
| 801 | + +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 790 | 802 | @copy /Y nul: headers |
| 791 | 803 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -49,11 +49,11 @@ | |
| 49 | |
| 50 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 51 | $(RC) $(RCFLAGS) -o$@ $** |
| 52 | |
| 53 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 54 | +echo add allrepo attach bag bisect blob branch browse cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo fossil >> $@ |
| 57 | +echo $(LIBS) >> $@ |
| 58 | +echo. >> $@ |
| 59 | +echo fossil >> $@ |
| @@ -64,10 +64,13 @@ | |
| 64 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 65 | $(BCC) -o$@ $** |
| 66 | |
| 67 | mkindex$E: $(SRCDIR)\mkindex.c |
| 68 | $(BCC) -o$@ $** |
| 69 | |
| 70 | mkversion$E: $(SRCDIR)\mkversion.c |
| 71 | $(BCC) -o$@ $** |
| 72 | |
| 73 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -92,16 +95,19 @@ | |
| 92 | +$** > $@ |
| 93 | |
| 94 | page_index.h: mkindex$E $(SRC) |
| 95 | +$** > $@ |
| 96 | |
| 97 | clean: |
| 98 | -del $(OBJDIR)\*.obj |
| 99 | -del *.obj *_.c *.h *.map |
| 100 | |
| 101 | realclean: |
| 102 | -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E |
| 103 | |
| 104 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 105 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 106 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 107 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -164,10 +170,16 @@ | |
| 164 | $(OBJDIR)\browse$O : browse_.c browse.h |
| 165 | $(TCC) -o$@ -c browse_.c |
| 166 | |
| 167 | browse_.c : $(SRCDIR)\browse.c |
| 168 | +translate$E $** > $@ |
| 169 | |
| 170 | $(OBJDIR)\cache$O : cache_.c cache.h |
| 171 | $(TCC) -o$@ -c cache_.c |
| 172 | |
| 173 | cache_.c : $(SRCDIR)\cache.c |
| @@ -783,8 +795,8 @@ | |
| 783 | $(TCC) -o$@ -c zip_.c |
| 784 | |
| 785 | zip_.c : $(SRCDIR)\zip.c |
| 786 | +translate$E $** > $@ |
| 787 | |
| 788 | headers: makeheaders$E page_index.h VERSION.h |
| 789 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 790 | @copy /Y nul: headers |
| 791 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -49,11 +49,11 @@ | |
| 49 | |
| 50 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 51 | $(RC) $(RCFLAGS) -o$@ $** |
| 52 | |
| 53 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 54 | +echo add allrepo attach bag bisect blob branch browse builtin cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo fossil >> $@ |
| 57 | +echo $(LIBS) >> $@ |
| 58 | +echo. >> $@ |
| 59 | +echo fossil >> $@ |
| @@ -64,10 +64,13 @@ | |
| 64 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 65 | $(BCC) -o$@ $** |
| 66 | |
| 67 | mkindex$E: $(SRCDIR)\mkindex.c |
| 68 | $(BCC) -o$@ $** |
| 69 | |
| 70 | mkbuiltin$E: $(SRCDIR)\mkbuiltin.c |
| 71 | $(BCC) -o$@ $** |
| 72 | |
| 73 | mkversion$E: $(SRCDIR)\mkversion.c |
| 74 | $(BCC) -o$@ $** |
| 75 | |
| 76 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -92,16 +95,19 @@ | |
| 95 | +$** > $@ |
| 96 | |
| 97 | page_index.h: mkindex$E $(SRC) |
| 98 | +$** > $@ |
| 99 | |
| 100 | builtin_data.h: mkbuiltin$E $(EXTRA_FILES) |
| 101 | +$** > $@ |
| 102 | |
| 103 | clean: |
| 104 | -del $(OBJDIR)\*.obj |
| 105 | -del *.obj *_.c *.h *.map |
| 106 | |
| 107 | realclean: |
| 108 | -del $(APPNAME) translate$E mkindex$E makeheaders$E mkversion$E codecheck1$E mkbuiltin$E |
| 109 | |
| 110 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 111 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 112 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 113 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -164,10 +170,16 @@ | |
| 170 | $(OBJDIR)\browse$O : browse_.c browse.h |
| 171 | $(TCC) -o$@ -c browse_.c |
| 172 | |
| 173 | browse_.c : $(SRCDIR)\browse.c |
| 174 | +translate$E $** > $@ |
| 175 | |
| 176 | $(OBJDIR)\builtin$O : builtin_.c builtin.h |
| 177 | $(TCC) -o$@ -c builtin_.c |
| 178 | |
| 179 | builtin_.c : $(SRCDIR)\builtin.c |
| 180 | +translate$E $** > $@ |
| 181 | |
| 182 | $(OBJDIR)\cache$O : cache_.c cache.h |
| 183 | $(TCC) -o$@ -c cache_.c |
| 184 | |
| 185 | cache_.c : $(SRCDIR)\cache.c |
| @@ -783,8 +795,8 @@ | |
| 795 | $(TCC) -o$@ -c zip_.c |
| 796 | |
| 797 | zip_.c : $(SRCDIR)\zip.c |
| 798 | +translate$E $** > $@ |
| 799 | |
| 800 | headers: makeheaders$E page_index.h builtin_data.h VERSION.h |
| 801 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 802 | @copy /Y nul: headers |
| 803 |
+28
-2
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -339,10 +339,11 @@ | ||
| 339 | 339 | $(SRCDIR)/bag.c \ |
| 340 | 340 | $(SRCDIR)/bisect.c \ |
| 341 | 341 | $(SRCDIR)/blob.c \ |
| 342 | 342 | $(SRCDIR)/branch.c \ |
| 343 | 343 | $(SRCDIR)/browse.c \ |
| 344 | + $(SRCDIR)/builtin.c \ | |
| 344 | 345 | $(SRCDIR)/cache.c \ |
| 345 | 346 | $(SRCDIR)/captcha.c \ |
| 346 | 347 | $(SRCDIR)/cgi.c \ |
| 347 | 348 | $(SRCDIR)/checkin.c \ |
| 348 | 349 | $(SRCDIR)/checkout.c \ |
| @@ -443,19 +444,23 @@ | ||
| 443 | 444 | $(SRCDIR)/wysiwyg.c \ |
| 444 | 445 | $(SRCDIR)/xfer.c \ |
| 445 | 446 | $(SRCDIR)/xfersetup.c \ |
| 446 | 447 | $(SRCDIR)/zip.c |
| 447 | 448 | |
| 449 | +EXTRA_FILES = \ | |
| 450 | + $(SRCDIR)/diff.tcl | |
| 451 | + | |
| 448 | 452 | TRANS_SRC = \ |
| 449 | 453 | $(OBJDIR)/add_.c \ |
| 450 | 454 | $(OBJDIR)/allrepo_.c \ |
| 451 | 455 | $(OBJDIR)/attach_.c \ |
| 452 | 456 | $(OBJDIR)/bag_.c \ |
| 453 | 457 | $(OBJDIR)/bisect_.c \ |
| 454 | 458 | $(OBJDIR)/blob_.c \ |
| 455 | 459 | $(OBJDIR)/branch_.c \ |
| 456 | 460 | $(OBJDIR)/browse_.c \ |
| 461 | + $(OBJDIR)/builtin_.c \ | |
| 457 | 462 | $(OBJDIR)/cache_.c \ |
| 458 | 463 | $(OBJDIR)/captcha_.c \ |
| 459 | 464 | $(OBJDIR)/cgi_.c \ |
| 460 | 465 | $(OBJDIR)/checkin_.c \ |
| 461 | 466 | $(OBJDIR)/checkout_.c \ |
| @@ -565,10 +570,11 @@ | ||
| 565 | 570 | $(OBJDIR)/bag.o \ |
| 566 | 571 | $(OBJDIR)/bisect.o \ |
| 567 | 572 | $(OBJDIR)/blob.o \ |
| 568 | 573 | $(OBJDIR)/branch.o \ |
| 569 | 574 | $(OBJDIR)/browse.o \ |
| 575 | + $(OBJDIR)/builtin.o \ | |
| 570 | 576 | $(OBJDIR)/cache.o \ |
| 571 | 577 | $(OBJDIR)/captcha.o \ |
| 572 | 578 | $(OBJDIR)/cgi.o \ |
| 573 | 579 | $(OBJDIR)/checkin.o \ |
| 574 | 580 | $(OBJDIR)/checkout.o \ |
| @@ -684,10 +690,11 @@ | ||
| 684 | 690 | # |
| 685 | 691 | ifdef USE_WINDOWS |
| 686 | 692 | TRANSLATE = $(subst /,\,$(OBJDIR)/translate.exe) |
| 687 | 693 | MAKEHEADERS = $(subst /,\,$(OBJDIR)/makeheaders.exe) |
| 688 | 694 | MKINDEX = $(subst /,\,$(OBJDIR)/mkindex.exe) |
| 695 | +MKBUILTIN = $(subst /,\,$(OBJDIR)/mkbuiltin.exe) | |
| 689 | 696 | VERSION = $(subst /,\,$(OBJDIR)/version.exe) |
| 690 | 697 | CODECHECK1 = $(subst /,\,$(OBJDIR)/codecheck1.exe) |
| 691 | 698 | CAT = type |
| 692 | 699 | CP = copy |
| 693 | 700 | GREP = find |
| @@ -697,10 +704,11 @@ | ||
| 697 | 704 | RMDIR = rmdir /S /Q |
| 698 | 705 | else |
| 699 | 706 | TRANSLATE = $(OBJDIR)/translate.exe |
| 700 | 707 | MAKEHEADERS = $(OBJDIR)/makeheaders.exe |
| 701 | 708 | MKINDEX = $(OBJDIR)/mkindex.exe |
| 709 | +MKBUILTIN = $(OBJDIR)/mkbuiltin.exe | |
| 702 | 710 | VERSION = $(OBJDIR)/version.exe |
| 703 | 711 | CODECHECK1 = $(OBJDIR)/codecheck1.exe |
| 704 | 712 | CAT = cat |
| 705 | 713 | CP = cp |
| 706 | 714 | GREP = grep |
| @@ -749,10 +757,13 @@ | ||
| 749 | 757 | $(BCC) -o $(MAKEHEADERS) $(SRCDIR)/makeheaders.c |
| 750 | 758 | |
| 751 | 759 | $(MKINDEX): $(SRCDIR)/mkindex.c |
| 752 | 760 | $(BCC) -o $(MKINDEX) $(SRCDIR)/mkindex.c |
| 753 | 761 | |
| 762 | +$(MKBUILTIN): $(SRCDIR)/mkbuiltin.c | |
| 763 | + $(BCC) -o $(MKBUILTIN) $(SRCDIR)/mkbuiltin.c | |
| 764 | + | |
| 754 | 765 | $(VERSION): $(SRCDIR)/mkversion.c |
| 755 | 766 | $(BCC) -o $(VERSION) $(SRCDIR)/mkversion.c |
| 756 | 767 | |
| 757 | 768 | $(CODECHECK1): $(SRCDIR)/codecheck1.c |
| 758 | 769 | $(BCC) -o $(CODECHECK1) $(SRCDIR)/codecheck1.c |
| @@ -820,11 +831,11 @@ | ||
| 820 | 831 | |
| 821 | 832 | ifdef FOSSIL_BUILD_SSL |
| 822 | 833 | APPTARGETS += openssl |
| 823 | 834 | endif |
| 824 | 835 | |
| 825 | -$(APPNAME): $(OBJDIR)/headers $(CODECHECK1) $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) | |
| 836 | +$(APPNAME): $(OBJDIR)/headers $(OBJ) $(CODECHECK1) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) | |
| 826 | 837 | $(CODECHECK1) $(TRANS_SRC) |
| 827 | 838 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o |
| 828 | 839 | |
| 829 | 840 | # This rule prevents make from using its default rules to try build |
| 830 | 841 | # an executable named "manifest" out of the file named "manifest.c" |
| @@ -848,19 +859,23 @@ | ||
| 848 | 859 | $(INNOSETUP) ./setup/fossil.iss -DAppVersion=$(shell $(CAT) ./VERSION) |
| 849 | 860 | |
| 850 | 861 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX) |
| 851 | 862 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 852 | 863 | |
| 853 | -$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h | |
| 864 | +$(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES) | |
| 865 | + $(MKBUILTIN) $(EXTRA_FILES) >$@ | |
| 866 | + | |
| 867 | +$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h | |
| 854 | 868 | $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \ |
| 855 | 869 | $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \ |
| 856 | 870 | $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \ |
| 857 | 871 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 858 | 872 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 859 | 873 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 860 | 874 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 861 | 875 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 876 | + $(OBJDIR)/builtin_.c:$(OBJDIR)/builtin.h \ | |
| 862 | 877 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 863 | 878 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 864 | 879 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 865 | 880 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 866 | 881 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| @@ -969,10 +984,13 @@ | ||
| 969 | 984 | |
| 970 | 985 | $(OBJDIR)/headers: Makefile |
| 971 | 986 | |
| 972 | 987 | Makefile: |
| 973 | 988 | |
| 989 | +$(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES) | |
| 990 | + $(MKBUILTIN) $(EXTRA_FILES) >$(OBJDIR)/builtin_data.h | |
| 991 | + | |
| 974 | 992 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(TRANSLATE) |
| 975 | 993 | $(TRANSLATE) $(SRCDIR)/add.c >$(OBJDIR)/add_.c |
| 976 | 994 | |
| 977 | 995 | $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h |
| 978 | 996 | $(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c |
| @@ -1032,10 +1050,18 @@ | ||
| 1032 | 1050 | |
| 1033 | 1051 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 1034 | 1052 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 1035 | 1053 | |
| 1036 | 1054 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 1055 | + | |
| 1056 | +$(OBJDIR)/builtin_.c: $(SRCDIR)/builtin.c $(TRANSLATE) | |
| 1057 | + $(TRANSLATE) $(SRCDIR)/builtin.c >$(OBJDIR)/builtin_.c | |
| 1058 | + | |
| 1059 | +$(OBJDIR)/builtin.o: $(OBJDIR)/builtin_.c $(OBJDIR)/builtin.h $(OBJDIR)/builtin_data.h $(SRCDIR)/config.h | |
| 1060 | + $(XTCC) -o $(OBJDIR)/builtin.o -c $(OBJDIR)/builtin_.c | |
| 1061 | + | |
| 1062 | +$(OBJDIR)/builtin.h: $(OBJDIR)/headers | |
| 1037 | 1063 | |
| 1038 | 1064 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(TRANSLATE) |
| 1039 | 1065 | $(TRANSLATE) $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 1040 | 1066 | |
| 1041 | 1067 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 1042 | 1068 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -339,10 +339,11 @@ | |
| 339 | $(SRCDIR)/bag.c \ |
| 340 | $(SRCDIR)/bisect.c \ |
| 341 | $(SRCDIR)/blob.c \ |
| 342 | $(SRCDIR)/branch.c \ |
| 343 | $(SRCDIR)/browse.c \ |
| 344 | $(SRCDIR)/cache.c \ |
| 345 | $(SRCDIR)/captcha.c \ |
| 346 | $(SRCDIR)/cgi.c \ |
| 347 | $(SRCDIR)/checkin.c \ |
| 348 | $(SRCDIR)/checkout.c \ |
| @@ -443,19 +444,23 @@ | |
| 443 | $(SRCDIR)/wysiwyg.c \ |
| 444 | $(SRCDIR)/xfer.c \ |
| 445 | $(SRCDIR)/xfersetup.c \ |
| 446 | $(SRCDIR)/zip.c |
| 447 | |
| 448 | TRANS_SRC = \ |
| 449 | $(OBJDIR)/add_.c \ |
| 450 | $(OBJDIR)/allrepo_.c \ |
| 451 | $(OBJDIR)/attach_.c \ |
| 452 | $(OBJDIR)/bag_.c \ |
| 453 | $(OBJDIR)/bisect_.c \ |
| 454 | $(OBJDIR)/blob_.c \ |
| 455 | $(OBJDIR)/branch_.c \ |
| 456 | $(OBJDIR)/browse_.c \ |
| 457 | $(OBJDIR)/cache_.c \ |
| 458 | $(OBJDIR)/captcha_.c \ |
| 459 | $(OBJDIR)/cgi_.c \ |
| 460 | $(OBJDIR)/checkin_.c \ |
| 461 | $(OBJDIR)/checkout_.c \ |
| @@ -565,10 +570,11 @@ | |
| 565 | $(OBJDIR)/bag.o \ |
| 566 | $(OBJDIR)/bisect.o \ |
| 567 | $(OBJDIR)/blob.o \ |
| 568 | $(OBJDIR)/branch.o \ |
| 569 | $(OBJDIR)/browse.o \ |
| 570 | $(OBJDIR)/cache.o \ |
| 571 | $(OBJDIR)/captcha.o \ |
| 572 | $(OBJDIR)/cgi.o \ |
| 573 | $(OBJDIR)/checkin.o \ |
| 574 | $(OBJDIR)/checkout.o \ |
| @@ -684,10 +690,11 @@ | |
| 684 | # |
| 685 | ifdef USE_WINDOWS |
| 686 | TRANSLATE = $(subst /,\,$(OBJDIR)/translate.exe) |
| 687 | MAKEHEADERS = $(subst /,\,$(OBJDIR)/makeheaders.exe) |
| 688 | MKINDEX = $(subst /,\,$(OBJDIR)/mkindex.exe) |
| 689 | VERSION = $(subst /,\,$(OBJDIR)/version.exe) |
| 690 | CODECHECK1 = $(subst /,\,$(OBJDIR)/codecheck1.exe) |
| 691 | CAT = type |
| 692 | CP = copy |
| 693 | GREP = find |
| @@ -697,10 +704,11 @@ | |
| 697 | RMDIR = rmdir /S /Q |
| 698 | else |
| 699 | TRANSLATE = $(OBJDIR)/translate.exe |
| 700 | MAKEHEADERS = $(OBJDIR)/makeheaders.exe |
| 701 | MKINDEX = $(OBJDIR)/mkindex.exe |
| 702 | VERSION = $(OBJDIR)/version.exe |
| 703 | CODECHECK1 = $(OBJDIR)/codecheck1.exe |
| 704 | CAT = cat |
| 705 | CP = cp |
| 706 | GREP = grep |
| @@ -749,10 +757,13 @@ | |
| 749 | $(BCC) -o $(MAKEHEADERS) $(SRCDIR)/makeheaders.c |
| 750 | |
| 751 | $(MKINDEX): $(SRCDIR)/mkindex.c |
| 752 | $(BCC) -o $(MKINDEX) $(SRCDIR)/mkindex.c |
| 753 | |
| 754 | $(VERSION): $(SRCDIR)/mkversion.c |
| 755 | $(BCC) -o $(VERSION) $(SRCDIR)/mkversion.c |
| 756 | |
| 757 | $(CODECHECK1): $(SRCDIR)/codecheck1.c |
| 758 | $(BCC) -o $(CODECHECK1) $(SRCDIR)/codecheck1.c |
| @@ -820,11 +831,11 @@ | |
| 820 | |
| 821 | ifdef FOSSIL_BUILD_SSL |
| 822 | APPTARGETS += openssl |
| 823 | endif |
| 824 | |
| 825 | $(APPNAME): $(OBJDIR)/headers $(CODECHECK1) $(OBJ) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) |
| 826 | $(CODECHECK1) $(TRANS_SRC) |
| 827 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o |
| 828 | |
| 829 | # This rule prevents make from using its default rules to try build |
| 830 | # an executable named "manifest" out of the file named "manifest.c" |
| @@ -848,19 +859,23 @@ | |
| 848 | $(INNOSETUP) ./setup/fossil.iss -DAppVersion=$(shell $(CAT) ./VERSION) |
| 849 | |
| 850 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX) |
| 851 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 852 | |
| 853 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h |
| 854 | $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \ |
| 855 | $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \ |
| 856 | $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \ |
| 857 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 858 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 859 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 860 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 861 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 862 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 863 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 864 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 865 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 866 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| @@ -969,10 +984,13 @@ | |
| 969 | |
| 970 | $(OBJDIR)/headers: Makefile |
| 971 | |
| 972 | Makefile: |
| 973 | |
| 974 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(TRANSLATE) |
| 975 | $(TRANSLATE) $(SRCDIR)/add.c >$(OBJDIR)/add_.c |
| 976 | |
| 977 | $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h |
| 978 | $(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c |
| @@ -1032,10 +1050,18 @@ | |
| 1032 | |
| 1033 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 1034 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 1035 | |
| 1036 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 1037 | |
| 1038 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(TRANSLATE) |
| 1039 | $(TRANSLATE) $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 1040 | |
| 1041 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 1042 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -339,10 +339,11 @@ | |
| 339 | $(SRCDIR)/bag.c \ |
| 340 | $(SRCDIR)/bisect.c \ |
| 341 | $(SRCDIR)/blob.c \ |
| 342 | $(SRCDIR)/branch.c \ |
| 343 | $(SRCDIR)/browse.c \ |
| 344 | $(SRCDIR)/builtin.c \ |
| 345 | $(SRCDIR)/cache.c \ |
| 346 | $(SRCDIR)/captcha.c \ |
| 347 | $(SRCDIR)/cgi.c \ |
| 348 | $(SRCDIR)/checkin.c \ |
| 349 | $(SRCDIR)/checkout.c \ |
| @@ -443,19 +444,23 @@ | |
| 444 | $(SRCDIR)/wysiwyg.c \ |
| 445 | $(SRCDIR)/xfer.c \ |
| 446 | $(SRCDIR)/xfersetup.c \ |
| 447 | $(SRCDIR)/zip.c |
| 448 | |
| 449 | EXTRA_FILES = \ |
| 450 | $(SRCDIR)/diff.tcl |
| 451 | |
| 452 | TRANS_SRC = \ |
| 453 | $(OBJDIR)/add_.c \ |
| 454 | $(OBJDIR)/allrepo_.c \ |
| 455 | $(OBJDIR)/attach_.c \ |
| 456 | $(OBJDIR)/bag_.c \ |
| 457 | $(OBJDIR)/bisect_.c \ |
| 458 | $(OBJDIR)/blob_.c \ |
| 459 | $(OBJDIR)/branch_.c \ |
| 460 | $(OBJDIR)/browse_.c \ |
| 461 | $(OBJDIR)/builtin_.c \ |
| 462 | $(OBJDIR)/cache_.c \ |
| 463 | $(OBJDIR)/captcha_.c \ |
| 464 | $(OBJDIR)/cgi_.c \ |
| 465 | $(OBJDIR)/checkin_.c \ |
| 466 | $(OBJDIR)/checkout_.c \ |
| @@ -565,10 +570,11 @@ | |
| 570 | $(OBJDIR)/bag.o \ |
| 571 | $(OBJDIR)/bisect.o \ |
| 572 | $(OBJDIR)/blob.o \ |
| 573 | $(OBJDIR)/branch.o \ |
| 574 | $(OBJDIR)/browse.o \ |
| 575 | $(OBJDIR)/builtin.o \ |
| 576 | $(OBJDIR)/cache.o \ |
| 577 | $(OBJDIR)/captcha.o \ |
| 578 | $(OBJDIR)/cgi.o \ |
| 579 | $(OBJDIR)/checkin.o \ |
| 580 | $(OBJDIR)/checkout.o \ |
| @@ -684,10 +690,11 @@ | |
| 690 | # |
| 691 | ifdef USE_WINDOWS |
| 692 | TRANSLATE = $(subst /,\,$(OBJDIR)/translate.exe) |
| 693 | MAKEHEADERS = $(subst /,\,$(OBJDIR)/makeheaders.exe) |
| 694 | MKINDEX = $(subst /,\,$(OBJDIR)/mkindex.exe) |
| 695 | MKBUILTIN = $(subst /,\,$(OBJDIR)/mkbuiltin.exe) |
| 696 | VERSION = $(subst /,\,$(OBJDIR)/version.exe) |
| 697 | CODECHECK1 = $(subst /,\,$(OBJDIR)/codecheck1.exe) |
| 698 | CAT = type |
| 699 | CP = copy |
| 700 | GREP = find |
| @@ -697,10 +704,11 @@ | |
| 704 | RMDIR = rmdir /S /Q |
| 705 | else |
| 706 | TRANSLATE = $(OBJDIR)/translate.exe |
| 707 | MAKEHEADERS = $(OBJDIR)/makeheaders.exe |
| 708 | MKINDEX = $(OBJDIR)/mkindex.exe |
| 709 | MKBUILTIN = $(OBJDIR)/mkbuiltin.exe |
| 710 | VERSION = $(OBJDIR)/version.exe |
| 711 | CODECHECK1 = $(OBJDIR)/codecheck1.exe |
| 712 | CAT = cat |
| 713 | CP = cp |
| 714 | GREP = grep |
| @@ -749,10 +757,13 @@ | |
| 757 | $(BCC) -o $(MAKEHEADERS) $(SRCDIR)/makeheaders.c |
| 758 | |
| 759 | $(MKINDEX): $(SRCDIR)/mkindex.c |
| 760 | $(BCC) -o $(MKINDEX) $(SRCDIR)/mkindex.c |
| 761 | |
| 762 | $(MKBUILTIN): $(SRCDIR)/mkbuiltin.c |
| 763 | $(BCC) -o $(MKBUILTIN) $(SRCDIR)/mkbuiltin.c |
| 764 | |
| 765 | $(VERSION): $(SRCDIR)/mkversion.c |
| 766 | $(BCC) -o $(VERSION) $(SRCDIR)/mkversion.c |
| 767 | |
| 768 | $(CODECHECK1): $(SRCDIR)/codecheck1.c |
| 769 | $(BCC) -o $(CODECHECK1) $(SRCDIR)/codecheck1.c |
| @@ -820,11 +831,11 @@ | |
| 831 | |
| 832 | ifdef FOSSIL_BUILD_SSL |
| 833 | APPTARGETS += openssl |
| 834 | endif |
| 835 | |
| 836 | $(APPNAME): $(OBJDIR)/headers $(OBJ) $(CODECHECK1) $(EXTRAOBJ) $(OBJDIR)/fossil.o $(APPTARGETS) |
| 837 | $(CODECHECK1) $(TRANS_SRC) |
| 838 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) $(OBJDIR)/fossil.o |
| 839 | |
| 840 | # This rule prevents make from using its default rules to try build |
| 841 | # an executable named "manifest" out of the file named "manifest.c" |
| @@ -848,19 +859,23 @@ | |
| 859 | $(INNOSETUP) ./setup/fossil.iss -DAppVersion=$(shell $(CAT) ./VERSION) |
| 860 | |
| 861 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(MKINDEX) |
| 862 | $(MKINDEX) $(TRANS_SRC) >$@ |
| 863 | |
| 864 | $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES) |
| 865 | $(MKBUILTIN) $(EXTRA_FILES) >$@ |
| 866 | |
| 867 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h |
| 868 | $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \ |
| 869 | $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \ |
| 870 | $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \ |
| 871 | $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h \ |
| 872 | $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h \ |
| 873 | $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h \ |
| 874 | $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h \ |
| 875 | $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h \ |
| 876 | $(OBJDIR)/builtin_.c:$(OBJDIR)/builtin.h \ |
| 877 | $(OBJDIR)/cache_.c:$(OBJDIR)/cache.h \ |
| 878 | $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h \ |
| 879 | $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h \ |
| 880 | $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h \ |
| 881 | $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h \ |
| @@ -969,10 +984,13 @@ | |
| 984 | |
| 985 | $(OBJDIR)/headers: Makefile |
| 986 | |
| 987 | Makefile: |
| 988 | |
| 989 | $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES) |
| 990 | $(MKBUILTIN) $(EXTRA_FILES) >$(OBJDIR)/builtin_data.h |
| 991 | |
| 992 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(TRANSLATE) |
| 993 | $(TRANSLATE) $(SRCDIR)/add.c >$(OBJDIR)/add_.c |
| 994 | |
| 995 | $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h |
| 996 | $(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c |
| @@ -1032,10 +1050,18 @@ | |
| 1050 | |
| 1051 | $(OBJDIR)/browse.o: $(OBJDIR)/browse_.c $(OBJDIR)/browse.h $(SRCDIR)/config.h |
| 1052 | $(XTCC) -o $(OBJDIR)/browse.o -c $(OBJDIR)/browse_.c |
| 1053 | |
| 1054 | $(OBJDIR)/browse.h: $(OBJDIR)/headers |
| 1055 | |
| 1056 | $(OBJDIR)/builtin_.c: $(SRCDIR)/builtin.c $(TRANSLATE) |
| 1057 | $(TRANSLATE) $(SRCDIR)/builtin.c >$(OBJDIR)/builtin_.c |
| 1058 | |
| 1059 | $(OBJDIR)/builtin.o: $(OBJDIR)/builtin_.c $(OBJDIR)/builtin.h $(OBJDIR)/builtin_data.h $(SRCDIR)/config.h |
| 1060 | $(XTCC) -o $(OBJDIR)/builtin.o -c $(OBJDIR)/builtin_.c |
| 1061 | |
| 1062 | $(OBJDIR)/builtin.h: $(OBJDIR)/headers |
| 1063 | |
| 1064 | $(OBJDIR)/cache_.c: $(SRCDIR)/cache.c $(TRANSLATE) |
| 1065 | $(TRANSLATE) $(SRCDIR)/cache.c >$(OBJDIR)/cache_.c |
| 1066 | |
| 1067 | $(OBJDIR)/cache.o: $(OBJDIR)/cache_.c $(OBJDIR)/cache.h $(SRCDIR)/config.h |
| 1068 |
+21
-1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -203,10 +203,11 @@ | ||
| 203 | 203 | bag_.c \ |
| 204 | 204 | bisect_.c \ |
| 205 | 205 | blob_.c \ |
| 206 | 206 | branch_.c \ |
| 207 | 207 | browse_.c \ |
| 208 | + builtin_.c \ | |
| 208 | 209 | cache_.c \ |
| 209 | 210 | captcha_.c \ |
| 210 | 211 | cgi_.c \ |
| 211 | 212 | checkin_.c \ |
| 212 | 213 | checkout_.c \ |
| @@ -307,18 +308,21 @@ | ||
| 307 | 308 | wysiwyg_.c \ |
| 308 | 309 | xfer_.c \ |
| 309 | 310 | xfersetup_.c \ |
| 310 | 311 | zip_.c |
| 311 | 312 | |
| 313 | +EXTRA_FILES = $(SRCDIR)\diff.tcl | |
| 314 | + | |
| 312 | 315 | OBJ = $(OX)\add$O \ |
| 313 | 316 | $(OX)\allrepo$O \ |
| 314 | 317 | $(OX)\attach$O \ |
| 315 | 318 | $(OX)\bag$O \ |
| 316 | 319 | $(OX)\bisect$O \ |
| 317 | 320 | $(OX)\blob$O \ |
| 318 | 321 | $(OX)\branch$O \ |
| 319 | 322 | $(OX)\browse$O \ |
| 323 | + $(OX)\builtin$O \ | |
| 320 | 324 | $(OX)\cache$O \ |
| 321 | 325 | $(OX)\captcha$O \ |
| 322 | 326 | $(OX)\cgi$O \ |
| 323 | 327 | $(OX)\checkin$O \ |
| 324 | 328 | $(OX)\checkout$O \ |
| @@ -483,10 +487,11 @@ | ||
| 483 | 487 | echo $(OX)\bag.obj >> $@ |
| 484 | 488 | echo $(OX)\bisect.obj >> $@ |
| 485 | 489 | echo $(OX)\blob.obj >> $@ |
| 486 | 490 | echo $(OX)\branch.obj >> $@ |
| 487 | 491 | echo $(OX)\browse.obj >> $@ |
| 492 | + echo $(OX)\builtin.obj >> $@ | |
| 488 | 493 | echo $(OX)\cache.obj >> $@ |
| 489 | 494 | echo $(OX)\captcha.obj >> $@ |
| 490 | 495 | echo $(OX)\cgi.obj >> $@ |
| 491 | 496 | echo $(OX)\checkin.obj >> $@ |
| 492 | 497 | echo $(OX)\checkout.obj >> $@ |
| @@ -608,10 +613,13 @@ | ||
| 608 | 613 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 609 | 614 | $(BCC) $** |
| 610 | 615 | |
| 611 | 616 | mkindex$E: $(SRCDIR)\mkindex.c |
| 612 | 617 | $(BCC) $** |
| 618 | + | |
| 619 | +mkbuiltin$E: $(SRCDIR)\mkbuiltin.c | |
| 620 | + $(BCC) $** | |
| 613 | 621 | |
| 614 | 622 | mkversion$E: $(SRCDIR)\mkversion.c |
| 615 | 623 | $(BCC) $** |
| 616 | 624 | |
| 617 | 625 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -641,10 +649,13 @@ | ||
| 641 | 649 | $(TCC) /Fo$@ /c $** |
| 642 | 650 | |
| 643 | 651 | page_index.h: mkindex$E $(SRC) |
| 644 | 652 | $** > $@ |
| 645 | 653 | |
| 654 | +builtin_data.h: mkbuiltin$E $(EXTRA_FILES) | |
| 655 | + $** > $@ | |
| 656 | + | |
| 646 | 657 | clean: |
| 647 | 658 | -del $(OX)\*.obj |
| 648 | 659 | -del *.obj |
| 649 | 660 | -del *_.c |
| 650 | 661 | -del *.h |
| @@ -666,10 +677,12 @@ | ||
| 666 | 677 | -del makeheaders$P |
| 667 | 678 | -del mkversion$E |
| 668 | 679 | -del mkversion$P |
| 669 | 680 | -del codecheck1$E |
| 670 | 681 | -del codecheck1$P |
| 682 | + -del mkbuiltin$E | |
| 683 | + -del mkbuiltin$P | |
| 671 | 684 | |
| 672 | 685 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 673 | 686 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 674 | 687 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 675 | 688 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -730,10 +743,16 @@ | ||
| 730 | 743 | $(OX)\browse$O : browse_.c browse.h |
| 731 | 744 | $(TCC) /Fo$@ -c browse_.c |
| 732 | 745 | |
| 733 | 746 | browse_.c : $(SRCDIR)\browse.c |
| 734 | 747 | translate$E $** > $@ |
| 748 | + | |
| 749 | +$(OX)\builtin$O : builtin_.c builtin.h | |
| 750 | + $(TCC) /Fo$@ -c builtin_.c | |
| 751 | + | |
| 752 | +builtin_.c : $(SRCDIR)\builtin.c | |
| 753 | + translate$E $** > $@ | |
| 735 | 754 | |
| 736 | 755 | $(OX)\cache$O : cache_.c cache.h |
| 737 | 756 | $(TCC) /Fo$@ -c cache_.c |
| 738 | 757 | |
| 739 | 758 | cache_.c : $(SRCDIR)\cache.c |
| @@ -1352,19 +1371,20 @@ | ||
| 1352 | 1371 | translate$E $** > $@ |
| 1353 | 1372 | |
| 1354 | 1373 | fossil.res : $B\win\fossil.rc |
| 1355 | 1374 | $(RCC) /fo $@ $** |
| 1356 | 1375 | |
| 1357 | -headers: makeheaders$E page_index.h VERSION.h | |
| 1376 | +headers: makeheaders$E page_index.h builtin_data.h VERSION.h | |
| 1358 | 1377 | makeheaders$E add_.c:add.h \ |
| 1359 | 1378 | allrepo_.c:allrepo.h \ |
| 1360 | 1379 | attach_.c:attach.h \ |
| 1361 | 1380 | bag_.c:bag.h \ |
| 1362 | 1381 | bisect_.c:bisect.h \ |
| 1363 | 1382 | blob_.c:blob.h \ |
| 1364 | 1383 | branch_.c:branch.h \ |
| 1365 | 1384 | browse_.c:browse.h \ |
| 1385 | + builtin_.c:builtin.h \ | |
| 1366 | 1386 | cache_.c:cache.h \ |
| 1367 | 1387 | captcha_.c:captcha.h \ |
| 1368 | 1388 | cgi_.c:cgi.h \ |
| 1369 | 1389 | checkin_.c:checkin.h \ |
| 1370 | 1390 | checkout_.c:checkout.h \ |
| 1371 | 1391 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -203,10 +203,11 @@ | |
| 203 | bag_.c \ |
| 204 | bisect_.c \ |
| 205 | blob_.c \ |
| 206 | branch_.c \ |
| 207 | browse_.c \ |
| 208 | cache_.c \ |
| 209 | captcha_.c \ |
| 210 | cgi_.c \ |
| 211 | checkin_.c \ |
| 212 | checkout_.c \ |
| @@ -307,18 +308,21 @@ | |
| 307 | wysiwyg_.c \ |
| 308 | xfer_.c \ |
| 309 | xfersetup_.c \ |
| 310 | zip_.c |
| 311 | |
| 312 | OBJ = $(OX)\add$O \ |
| 313 | $(OX)\allrepo$O \ |
| 314 | $(OX)\attach$O \ |
| 315 | $(OX)\bag$O \ |
| 316 | $(OX)\bisect$O \ |
| 317 | $(OX)\blob$O \ |
| 318 | $(OX)\branch$O \ |
| 319 | $(OX)\browse$O \ |
| 320 | $(OX)\cache$O \ |
| 321 | $(OX)\captcha$O \ |
| 322 | $(OX)\cgi$O \ |
| 323 | $(OX)\checkin$O \ |
| 324 | $(OX)\checkout$O \ |
| @@ -483,10 +487,11 @@ | |
| 483 | echo $(OX)\bag.obj >> $@ |
| 484 | echo $(OX)\bisect.obj >> $@ |
| 485 | echo $(OX)\blob.obj >> $@ |
| 486 | echo $(OX)\branch.obj >> $@ |
| 487 | echo $(OX)\browse.obj >> $@ |
| 488 | echo $(OX)\cache.obj >> $@ |
| 489 | echo $(OX)\captcha.obj >> $@ |
| 490 | echo $(OX)\cgi.obj >> $@ |
| 491 | echo $(OX)\checkin.obj >> $@ |
| 492 | echo $(OX)\checkout.obj >> $@ |
| @@ -608,10 +613,13 @@ | |
| 608 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 609 | $(BCC) $** |
| 610 | |
| 611 | mkindex$E: $(SRCDIR)\mkindex.c |
| 612 | $(BCC) $** |
| 613 | |
| 614 | mkversion$E: $(SRCDIR)\mkversion.c |
| 615 | $(BCC) $** |
| 616 | |
| 617 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -641,10 +649,13 @@ | |
| 641 | $(TCC) /Fo$@ /c $** |
| 642 | |
| 643 | page_index.h: mkindex$E $(SRC) |
| 644 | $** > $@ |
| 645 | |
| 646 | clean: |
| 647 | -del $(OX)\*.obj |
| 648 | -del *.obj |
| 649 | -del *_.c |
| 650 | -del *.h |
| @@ -666,10 +677,12 @@ | |
| 666 | -del makeheaders$P |
| 667 | -del mkversion$E |
| 668 | -del mkversion$P |
| 669 | -del codecheck1$E |
| 670 | -del codecheck1$P |
| 671 | |
| 672 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 673 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 674 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 675 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -730,10 +743,16 @@ | |
| 730 | $(OX)\browse$O : browse_.c browse.h |
| 731 | $(TCC) /Fo$@ -c browse_.c |
| 732 | |
| 733 | browse_.c : $(SRCDIR)\browse.c |
| 734 | translate$E $** > $@ |
| 735 | |
| 736 | $(OX)\cache$O : cache_.c cache.h |
| 737 | $(TCC) /Fo$@ -c cache_.c |
| 738 | |
| 739 | cache_.c : $(SRCDIR)\cache.c |
| @@ -1352,19 +1371,20 @@ | |
| 1352 | translate$E $** > $@ |
| 1353 | |
| 1354 | fossil.res : $B\win\fossil.rc |
| 1355 | $(RCC) /fo $@ $** |
| 1356 | |
| 1357 | headers: makeheaders$E page_index.h VERSION.h |
| 1358 | makeheaders$E add_.c:add.h \ |
| 1359 | allrepo_.c:allrepo.h \ |
| 1360 | attach_.c:attach.h \ |
| 1361 | bag_.c:bag.h \ |
| 1362 | bisect_.c:bisect.h \ |
| 1363 | blob_.c:blob.h \ |
| 1364 | branch_.c:branch.h \ |
| 1365 | browse_.c:browse.h \ |
| 1366 | cache_.c:cache.h \ |
| 1367 | captcha_.c:captcha.h \ |
| 1368 | cgi_.c:cgi.h \ |
| 1369 | checkin_.c:checkin.h \ |
| 1370 | checkout_.c:checkout.h \ |
| 1371 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -203,10 +203,11 @@ | |
| 203 | bag_.c \ |
| 204 | bisect_.c \ |
| 205 | blob_.c \ |
| 206 | branch_.c \ |
| 207 | browse_.c \ |
| 208 | builtin_.c \ |
| 209 | cache_.c \ |
| 210 | captcha_.c \ |
| 211 | cgi_.c \ |
| 212 | checkin_.c \ |
| 213 | checkout_.c \ |
| @@ -307,18 +308,21 @@ | |
| 308 | wysiwyg_.c \ |
| 309 | xfer_.c \ |
| 310 | xfersetup_.c \ |
| 311 | zip_.c |
| 312 | |
| 313 | EXTRA_FILES = $(SRCDIR)\diff.tcl |
| 314 | |
| 315 | OBJ = $(OX)\add$O \ |
| 316 | $(OX)\allrepo$O \ |
| 317 | $(OX)\attach$O \ |
| 318 | $(OX)\bag$O \ |
| 319 | $(OX)\bisect$O \ |
| 320 | $(OX)\blob$O \ |
| 321 | $(OX)\branch$O \ |
| 322 | $(OX)\browse$O \ |
| 323 | $(OX)\builtin$O \ |
| 324 | $(OX)\cache$O \ |
| 325 | $(OX)\captcha$O \ |
| 326 | $(OX)\cgi$O \ |
| 327 | $(OX)\checkin$O \ |
| 328 | $(OX)\checkout$O \ |
| @@ -483,10 +487,11 @@ | |
| 487 | echo $(OX)\bag.obj >> $@ |
| 488 | echo $(OX)\bisect.obj >> $@ |
| 489 | echo $(OX)\blob.obj >> $@ |
| 490 | echo $(OX)\branch.obj >> $@ |
| 491 | echo $(OX)\browse.obj >> $@ |
| 492 | echo $(OX)\builtin.obj >> $@ |
| 493 | echo $(OX)\cache.obj >> $@ |
| 494 | echo $(OX)\captcha.obj >> $@ |
| 495 | echo $(OX)\cgi.obj >> $@ |
| 496 | echo $(OX)\checkin.obj >> $@ |
| 497 | echo $(OX)\checkout.obj >> $@ |
| @@ -608,10 +613,13 @@ | |
| 613 | makeheaders$E: $(SRCDIR)\makeheaders.c |
| 614 | $(BCC) $** |
| 615 | |
| 616 | mkindex$E: $(SRCDIR)\mkindex.c |
| 617 | $(BCC) $** |
| 618 | |
| 619 | mkbuiltin$E: $(SRCDIR)\mkbuiltin.c |
| 620 | $(BCC) $** |
| 621 | |
| 622 | mkversion$E: $(SRCDIR)\mkversion.c |
| 623 | $(BCC) $** |
| 624 | |
| 625 | codecheck1$E: $(SRCDIR)\codecheck1.c |
| @@ -641,10 +649,13 @@ | |
| 649 | $(TCC) /Fo$@ /c $** |
| 650 | |
| 651 | page_index.h: mkindex$E $(SRC) |
| 652 | $** > $@ |
| 653 | |
| 654 | builtin_data.h: mkbuiltin$E $(EXTRA_FILES) |
| 655 | $** > $@ |
| 656 | |
| 657 | clean: |
| 658 | -del $(OX)\*.obj |
| 659 | -del *.obj |
| 660 | -del *_.c |
| 661 | -del *.h |
| @@ -666,10 +677,12 @@ | |
| 677 | -del makeheaders$P |
| 678 | -del mkversion$E |
| 679 | -del mkversion$P |
| 680 | -del codecheck1$E |
| 681 | -del codecheck1$P |
| 682 | -del mkbuiltin$E |
| 683 | -del mkbuiltin$P |
| 684 | |
| 685 | $(OBJDIR)\json$O : $(SRCDIR)\json_detail.h |
| 686 | $(OBJDIR)\json_artifact$O : $(SRCDIR)\json_detail.h |
| 687 | $(OBJDIR)\json_branch$O : $(SRCDIR)\json_detail.h |
| 688 | $(OBJDIR)\json_config$O : $(SRCDIR)\json_detail.h |
| @@ -730,10 +743,16 @@ | |
| 743 | $(OX)\browse$O : browse_.c browse.h |
| 744 | $(TCC) /Fo$@ -c browse_.c |
| 745 | |
| 746 | browse_.c : $(SRCDIR)\browse.c |
| 747 | translate$E $** > $@ |
| 748 | |
| 749 | $(OX)\builtin$O : builtin_.c builtin.h |
| 750 | $(TCC) /Fo$@ -c builtin_.c |
| 751 | |
| 752 | builtin_.c : $(SRCDIR)\builtin.c |
| 753 | translate$E $** > $@ |
| 754 | |
| 755 | $(OX)\cache$O : cache_.c cache.h |
| 756 | $(TCC) /Fo$@ -c cache_.c |
| 757 | |
| 758 | cache_.c : $(SRCDIR)\cache.c |
| @@ -1352,19 +1371,20 @@ | |
| 1371 | translate$E $** > $@ |
| 1372 | |
| 1373 | fossil.res : $B\win\fossil.rc |
| 1374 | $(RCC) /fo $@ $** |
| 1375 | |
| 1376 | headers: makeheaders$E page_index.h builtin_data.h VERSION.h |
| 1377 | makeheaders$E add_.c:add.h \ |
| 1378 | allrepo_.c:allrepo.h \ |
| 1379 | attach_.c:attach.h \ |
| 1380 | bag_.c:bag.h \ |
| 1381 | bisect_.c:bisect.h \ |
| 1382 | blob_.c:blob.h \ |
| 1383 | branch_.c:branch.h \ |
| 1384 | browse_.c:browse.h \ |
| 1385 | builtin_.c:builtin.h \ |
| 1386 | cache_.c:cache.h \ |
| 1387 | captcha_.c:captcha.h \ |
| 1388 | cgi_.c:cgi.h \ |
| 1389 | checkin_.c:checkin.h \ |
| 1390 | checkout_.c:checkout.h \ |
| 1391 |
| --- win/fossil.exe.manifest | ||
| +++ win/fossil.exe.manifest | ||
| @@ -13,10 +13,12 @@ | ||
| 13 | 13 | </requestedPrivileges> |
| 14 | 14 | </security> |
| 15 | 15 | </trustInfo> |
| 16 | 16 | <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> |
| 17 | 17 | <application> |
| 18 | + <!-- Windows 10 --> | |
| 19 | + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> | |
| 18 | 20 | <!-- Windows 8.1 --> |
| 19 | 21 | <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> |
| 20 | 22 | <!-- Windows 8 --> |
| 21 | 23 | <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> |
| 22 | 24 | <!-- Windows 7 --> |
| 23 | 25 |
| --- win/fossil.exe.manifest | |
| +++ win/fossil.exe.manifest | |
| @@ -13,10 +13,12 @@ | |
| 13 | </requestedPrivileges> |
| 14 | </security> |
| 15 | </trustInfo> |
| 16 | <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> |
| 17 | <application> |
| 18 | <!-- Windows 8.1 --> |
| 19 | <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> |
| 20 | <!-- Windows 8 --> |
| 21 | <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> |
| 22 | <!-- Windows 7 --> |
| 23 |
| --- win/fossil.exe.manifest | |
| +++ win/fossil.exe.manifest | |
| @@ -13,10 +13,12 @@ | |
| 13 | </requestedPrivileges> |
| 14 | </security> |
| 15 | </trustInfo> |
| 16 | <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> |
| 17 | <application> |
| 18 | <!-- Windows 10 --> |
| 19 | <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> |
| 20 | <!-- Windows 8.1 --> |
| 21 | <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> |
| 22 | <!-- Windows 8 --> |
| 23 | <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> |
| 24 | <!-- Windows 7 --> |
| 25 |