Fossil SCM
Resolve inadvertent fork caused by two exact-same-second check-ins.
Commit
5cf0da6e0a4c4b0967b6d027a0cdb21fc972f6bcb468fecda2444fb18c516f87
Parent
06fb3f8104ed7fe…
1 file changed
+25
-27
M
auto.def
+25
-27
| --- auto.def | ||
| +++ auto.def | ||
| @@ -29,12 +29,12 @@ | ||
| 29 | 29 | fusefs=1 => {Disable the Fuse Filesystem} |
| 30 | 30 | fossil-debug=0 => {Build with fossil debugging enabled} |
| 31 | 31 | no-opt=0 => {Build without optimization} |
| 32 | 32 | json=0 => {Build with fossil JSON API enabled} |
| 33 | 33 | with-emsdk:path => {Directory containing the Emscripten SDK} |
| 34 | - no-compile-commands=0 => | |
| 35 | - "Disable compile_commands.json support even if detected (possibly incorrectly)." | |
| 34 | + compile-commands=0 => | |
| 35 | + "Check for compile_commands.json support." | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | # Update the minimum required SQLite version number here, and also |
| 39 | 39 | # in src/main.c near the sqlite3_libversion_number() call. Take care |
| 40 | 40 | # that both places agree! |
| @@ -745,35 +745,33 @@ | ||
| 745 | 745 | # argument it is assumed to be the name of an autosetup boolean config |
| 746 | 746 | # option to explicitly DISABLE the compile_commands.json support. |
| 747 | 747 | # |
| 748 | 748 | # Returns 1 if supported, else 0. Defines MAKE_COMPILATION_DB to "yes" |
| 749 | 749 | # if supported, "no" if not. |
| 750 | -proc check-compile-commands {{configOpt no-compile-commands}} { | |
| 751 | - msg-checking "compile_commands.json support... " | |
| 752 | - if {"" ne $configOpt && [opt-bool $configOpt]} { | |
| 753 | - msg-result "explicitly disabled" | |
| 754 | - define MAKE_COMPILATION_DB no | |
| 755 | - return 0 | |
| 756 | - } else { | |
| 757 | - if {[cctest -lang c -cflags {/dev/null -MJ} -source {}]} { | |
| 758 | - # This test reportedly incorrectly succeeds on one of | |
| 759 | - # Martin G.'s older systems. | |
| 760 | - msg-result "compiler supports compile_commands.json" | |
| 761 | - define MAKE_COMPILATION_DB yes | |
| 762 | - return 1 | |
| 763 | - } else { | |
| 764 | - msg-result "compiler does not support compile_commands.json" | |
| 765 | - define MAKE_COMPILATION_DB no | |
| 766 | - return 0 | |
| 767 | - } | |
| 768 | - } | |
| 769 | -} | |
| 770 | - | |
| 771 | -if {!$outOfTreeBuild} { | |
| 772 | - check-compile-commands | |
| 773 | -} else { | |
| 774 | - define MAKE_COMPILATION_DB no | |
| 750 | +proc check-compile-commands {} { | |
| 751 | + msg-checking "compile_commands.json support... " | |
| 752 | + if {[cctest -lang c -cflags {/dev/null -MJ} -source {}]} { | |
| 753 | + # This test reportedly incorrectly succeeds on one of | |
| 754 | + # Martin G.'s older systems. | |
| 755 | + msg-result "compiler supports compile_commands.json" | |
| 756 | + define MAKE_COMPILATION_DB yes | |
| 757 | + return 1 | |
| 758 | + } else { | |
| 759 | + msg-result "compiler does not support compile_commands.json" | |
| 760 | + define MAKE_COMPILATION_DB no | |
| 761 | + return 0 | |
| 762 | + } | |
| 763 | +} | |
| 764 | + | |
| 765 | +define MAKE_COMPILATION_DB no | |
| 766 | +if {!$outOfTreeBuild} { | |
| 767 | + if {[opt-bool compile-commands]} { | |
| 768 | + check-compile-commands | |
| 769 | + } else { | |
| 770 | + puts "Use --compile-commands to enable check for compile-commands-capable compiler." | |
| 771 | + } | |
| 772 | +} else { | |
| 775 | 773 | puts "Disabling compile_commands.json check for out-of-tree build." |
| 776 | 774 | # This is an attempt to resolve the problem reported at |
| 777 | 775 | # https://fossil-scm.org/forum/forumpost/d19061d09a8179d0 |
| 778 | 776 | } |
| 779 | 777 | |
| 780 | 778 |
| --- auto.def | |
| +++ auto.def | |
| @@ -29,12 +29,12 @@ | |
| 29 | fusefs=1 => {Disable the Fuse Filesystem} |
| 30 | fossil-debug=0 => {Build with fossil debugging enabled} |
| 31 | no-opt=0 => {Build without optimization} |
| 32 | json=0 => {Build with fossil JSON API enabled} |
| 33 | with-emsdk:path => {Directory containing the Emscripten SDK} |
| 34 | no-compile-commands=0 => |
| 35 | "Disable compile_commands.json support even if detected (possibly incorrectly)." |
| 36 | } |
| 37 | |
| 38 | # Update the minimum required SQLite version number here, and also |
| 39 | # in src/main.c near the sqlite3_libversion_number() call. Take care |
| 40 | # that both places agree! |
| @@ -745,35 +745,33 @@ | |
| 745 | # argument it is assumed to be the name of an autosetup boolean config |
| 746 | # option to explicitly DISABLE the compile_commands.json support. |
| 747 | # |
| 748 | # Returns 1 if supported, else 0. Defines MAKE_COMPILATION_DB to "yes" |
| 749 | # if supported, "no" if not. |
| 750 | proc check-compile-commands {{configOpt no-compile-commands}} { |
| 751 | msg-checking "compile_commands.json support... " |
| 752 | if {"" ne $configOpt && [opt-bool $configOpt]} { |
| 753 | msg-result "explicitly disabled" |
| 754 | define MAKE_COMPILATION_DB no |
| 755 | return 0 |
| 756 | } else { |
| 757 | if {[cctest -lang c -cflags {/dev/null -MJ} -source {}]} { |
| 758 | # This test reportedly incorrectly succeeds on one of |
| 759 | # Martin G.'s older systems. |
| 760 | msg-result "compiler supports compile_commands.json" |
| 761 | define MAKE_COMPILATION_DB yes |
| 762 | return 1 |
| 763 | } else { |
| 764 | msg-result "compiler does not support compile_commands.json" |
| 765 | define MAKE_COMPILATION_DB no |
| 766 | return 0 |
| 767 | } |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | if {!$outOfTreeBuild} { |
| 772 | check-compile-commands |
| 773 | } else { |
| 774 | define MAKE_COMPILATION_DB no |
| 775 | puts "Disabling compile_commands.json check for out-of-tree build." |
| 776 | # This is an attempt to resolve the problem reported at |
| 777 | # https://fossil-scm.org/forum/forumpost/d19061d09a8179d0 |
| 778 | } |
| 779 | |
| 780 |
| --- auto.def | |
| +++ auto.def | |
| @@ -29,12 +29,12 @@ | |
| 29 | fusefs=1 => {Disable the Fuse Filesystem} |
| 30 | fossil-debug=0 => {Build with fossil debugging enabled} |
| 31 | no-opt=0 => {Build without optimization} |
| 32 | json=0 => {Build with fossil JSON API enabled} |
| 33 | with-emsdk:path => {Directory containing the Emscripten SDK} |
| 34 | compile-commands=0 => |
| 35 | "Check for compile_commands.json support." |
| 36 | } |
| 37 | |
| 38 | # Update the minimum required SQLite version number here, and also |
| 39 | # in src/main.c near the sqlite3_libversion_number() call. Take care |
| 40 | # that both places agree! |
| @@ -745,35 +745,33 @@ | |
| 745 | # argument it is assumed to be the name of an autosetup boolean config |
| 746 | # option to explicitly DISABLE the compile_commands.json support. |
| 747 | # |
| 748 | # Returns 1 if supported, else 0. Defines MAKE_COMPILATION_DB to "yes" |
| 749 | # if supported, "no" if not. |
| 750 | proc check-compile-commands {} { |
| 751 | msg-checking "compile_commands.json support... " |
| 752 | if {[cctest -lang c -cflags {/dev/null -MJ} -source {}]} { |
| 753 | # This test reportedly incorrectly succeeds on one of |
| 754 | # Martin G.'s older systems. |
| 755 | msg-result "compiler supports compile_commands.json" |
| 756 | define MAKE_COMPILATION_DB yes |
| 757 | return 1 |
| 758 | } else { |
| 759 | msg-result "compiler does not support compile_commands.json" |
| 760 | define MAKE_COMPILATION_DB no |
| 761 | return 0 |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | define MAKE_COMPILATION_DB no |
| 766 | if {!$outOfTreeBuild} { |
| 767 | if {[opt-bool compile-commands]} { |
| 768 | check-compile-commands |
| 769 | } else { |
| 770 | puts "Use --compile-commands to enable check for compile-commands-capable compiler." |
| 771 | } |
| 772 | } else { |
| 773 | puts "Disabling compile_commands.json check for out-of-tree build." |
| 774 | # This is an attempt to resolve the problem reported at |
| 775 | # https://fossil-scm.org/forum/forumpost/d19061d09a8179d0 |
| 776 | } |
| 777 | |
| 778 |