Makefile
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sat, 25 Apr 2020 12:37:46 +0200
changeset 46151 c6bc77f7e593
parent 45983 971424517e17
child 46763 350e7f051e95
permissions -rw-r--r--
copies-rust: tokenize all paths into integer Copy information for each changesets tend to affect a small new number of path. However, each of these path might be handled a large number of time. Handling HgPathBuf (aka `Vec<u8>`) is expensive. Handling integer is cheap. With this patch we: - turn any input path into an integer "token" early, - do all the internal logic using such "token", - turn "token" back into path right before returning a result. This gives use a quite significant performance boost in our slower cases. Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev --------------------------------------------------------------------------------------------------------------------------------------------------------------- pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 6780 revs, 0.092828 s, 0.081225 s, -0.011603 s, × 0.8750, 11 µs/rev pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 43645 revs, 0.711975 s, 0.586011 s, -0.125964 s, × 0.8231, 13 µs/rev pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 11316 revs, 0.124505 s, 0.114173 s, -0.010332 s, × 0.9170, 10 µs/rev netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 5750 revs, 0.072072 s, 0.061004 s, -0.011068 s, × 0.8464, 10 µs/rev netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 66949 revs, 0.682732 s, 0.535874 s, -0.146858 s, × 0.7849, 8 µs/rev mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 153721 revs, 1.935918 s, 1.781383 s, -0.154535 s, × 0.9202, 11 µs/rev mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 204976 revs, 2.827320 s, 2.603867 s, -0.223453 s, × 0.9210, 12 µs/rev mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 97052 revs, 3.243010 s, 1.529120 s, -1.713890 s, × 0.4715, 15 µs/rev mozilla-try x00000_revs_x_added_0_copies 6a320851d377 1ebb79acd503 : 363753 revs, 5.693818 s, 4.842699 s, -0.851119 s, × 0.8505, 13 µs/rev mozilla-try x00000_revs_x_added_x_copies 5173c4b6f97c 95d83ee7242d : 362229 revs, 5.677655 s, 4.761732 s, -0.915923 s, × 0.8387, 13 µs/rev mozilla-try x00000_revs_x000_added_x_copies 9126823d0e9c ca82787bb23c : 359344 revs, 5.563370 s, 4.733912 s, -0.829458 s, × 0.8509, 13 µs/rev mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 192665 revs, 2.864099 s, 2.593410 s, -0.270689 s, × 0.9055, 13 µs/rev mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 113.297287 s, 41.041198 s, -72.256089 s, × 0.3622, 179 µs/rev mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 59.498652 s, 27.915689 s, -31.582963 s, × 0.4692, 73 µs/rev Full timing comparison between this revision and the previous one: Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev --------------------------------------------------------------------------------------------------------------------------------------------------------------- mercurial x_revs_x_added_0_copies ad6b123de1c7 39cfcef4f463 : 1 revs, 0.000042 s, 0.000042 s, +0.000000 s, × 1.0000, 42 µs/rev mercurial x_revs_x_added_x_copies 2b1c78674230 0c1d10351869 : 6 revs, 0.000104 s, 0.000110 s, +0.000006 s, × 1.0577, 18 µs/rev mercurial x000_revs_x000_added_x_copies 81f8ff2a9bf2 dd3267698d84 : 1032 revs, 0.004913 s, 0.004918 s, +0.000005 s, × 1.0010, 4 µs/rev pypy x_revs_x_added_0_copies aed021ee8ae8 099ed31b181b : 9 revs, 0.000191 s, 0.000195 s, +0.000004 s, × 1.0209, 21 µs/rev pypy x_revs_x000_added_0_copies 4aa4e1f8e19a 359343b9ac0e : 1 revs, 0.000050 s, 0.000049 s, -0.000001 s, × 0.9800, 49 µs/rev pypy x_revs_x_added_x_copies ac52eb7bbbb0 72e022663155 : 7 revs, 0.000112 s, 0.000112 s, +0.000000 s, × 1.0000, 16 µs/rev pypy x_revs_x00_added_x_copies c3b14617fbd7 ace7255d9a26 : 1 revs, 0.000288 s, 0.000324 s, +0.000036 s, × 1.1250, 324 µs/rev pypy x_revs_x000_added_x000_copies df6f7a526b60 a83dc6a2d56f : 6 revs, 0.010411 s, 0.010611 s, +0.000200 s, × 1.0192, 1768 µs/rev pypy x000_revs_xx00_added_0_copies 89a76aede314 2f22446ff07e : 4785 revs, 0.052852 s, 0.050835 s, -0.002017 s, × 0.9618, 10 µs/rev pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 6780 revs, 0.092828 s, 0.081225 s, -0.011603 s, × 0.8750, 11 µs/rev pypy x000_revs_x000_added_x000_copies 89a76aede314 7b3dda341c84 : 5441 revs, 0.063269 s, 0.061291 s, -0.001978 s, × 0.9687, 11 µs/rev pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 43645 revs, 0.711975 s, 0.586011 s, -0.125964 s, × 0.8231, 13 µs/rev pypy x0000_revs_xx000_added_0_copies bf2c629d0071 4ffed77c095c : 2 revs, 0.012771 s, 0.012824 s, +0.000053 s, × 1.0042, 6412 µs/rev pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 11316 revs, 0.124505 s, 0.114173 s, -0.010332 s, × 0.9170, 10 µs/rev netbeans x_revs_x_added_0_copies fb0955ffcbcd a01e9239f9e7 : 2 revs, 0.000082 s, 0.000085 s, +0.000003 s, × 1.0366, 42 µs/rev netbeans x_revs_x000_added_0_copies 6f360122949f 20eb231cc7d0 : 2 revs, 0.000111 s, 0.000108 s, -0.000003 s, × 0.9730, 54 µs/rev netbeans x_revs_x_added_x_copies 1ada3faf6fb6 5a39d12eecf4 : 3 revs, 0.000171 s, 0.000175 s, +0.000004 s, × 1.0234, 58 µs/rev netbeans x_revs_x00_added_x_copies 35be93ba1e2c 9eec5e90c05f : 9 revs, 0.000708 s, 0.000719 s, +0.000011 s, × 1.0155, 79 µs/rev netbeans x000_revs_xx00_added_0_copies eac3045b4fdd 51d4ae7f1290 : 1421 revs, 0.010608 s, 0.010175 s, -0.000433 s, × 0.9592, 7 µs/rev netbeans x000_revs_x000_added_x_copies e2063d266acd 6081d72689dc : 1533 revs, 0.015635 s, 0.015569 s, -0.000066 s, × 0.9958, 10 µs/rev netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 5750 revs, 0.072072 s, 0.061004 s, -0.011068 s, × 0.8464, 10 µs/rev netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 66949 revs, 0.682732 s, 0.535874 s, -0.146858 s, × 0.7849, 8 µs/rev mozilla-central x_revs_x_added_0_copies 3697f962bb7b 7015fcdd43a2 : 2 revs, 0.000090 s, 0.000090 s, +0.000000 s, × 1.0000, 45 µs/rev mozilla-central x_revs_x000_added_0_copies dd390860c6c9 40d0c5bed75d : 8 revs, 0.000210 s, 0.000281 s, +0.000071 s, × 1.3381, 35 µs/rev mozilla-central x_revs_x_added_x_copies 8d198483ae3b 14207ffc2b2f : 9 revs, 0.000182 s, 0.000187 s, +0.000005 s, × 1.0275, 20 µs/rev mozilla-central x_revs_x00_added_x_copies 98cbc58cc6bc 446a150332c3 : 7 revs, 0.000594 s, 0.000660 s, +0.000066 s, × 1.1111, 94 µs/rev mozilla-central x_revs_x000_added_x000_copies 3c684b4b8f68 0a5e72d1b479 : 3 revs, 0.003102 s, 0.003385 s, +0.000283 s, × 1.0912, 1128 µs/rev mozilla-central x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.060234 s, 0.069812 s, +0.009578 s, × 1.1590, 11635 µs/rev mozilla-central x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006300 s, 0.006503 s, +0.000203 s, × 1.0322, 4 µs/rev mozilla-central x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.004817 s, 0.004988 s, +0.000171 s, × 1.0355, 121 µs/rev mozilla-central x000_revs_x000_added_x000_copies 7c97034feb78 4407bd0c6330 : 7839 revs, 0.065451 s, 0.063963 s, -0.001488 s, × 0.9773, 8 µs/rev mozilla-central x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.026282 s, 0.026225 s, -0.000057 s, × 0.9978, 42 µs/rev mozilla-central x0000_revs_xx000_added_x000_copies f78c615a656c 96a38b690156 : 30263 revs, 0.206873 s, 0.201377 s, -0.005496 s, × 0.9734, 6 µs/rev mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 153721 revs, 1.935918 s, 1.781383 s, -0.154535 s, × 0.9202, 11 µs/rev mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 204976 revs, 2.827320 s, 2.603867 s, -0.223453 s, × 0.9210, 12 µs/rev mozilla-try x_revs_x_added_0_copies aaf6dde0deb8 9790f499805a : 2 revs, 0.000842 s, 0.000845 s, +0.000003 s, × 1.0036, 422 µs/rev mozilla-try x_revs_x000_added_0_copies d8d0222927b4 5bb8ce8c7450 : 2 revs, 0.000870 s, 0.000862 s, -0.000008 s, × 0.9908, 431 µs/rev mozilla-try x_revs_x_added_x_copies 092fcca11bdb 936255a0384a : 4 revs, 0.000165 s, 0.000161 s, -0.000004 s, × 0.9758, 40 µs/rev mozilla-try x_revs_x00_added_x_copies b53d2fadbdb5 017afae788ec : 2 revs, 0.001145 s, 0.001163 s, +0.000018 s, × 1.0157, 581 µs/rev mozilla-try x_revs_x000_added_x000_copies 20408ad61ce5 6f0ee96e21ad : 1 revs, 0.026500 s, 0.032414 s, +0.005914 s, × 1.2232, 32414 µs/rev mozilla-try x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.059407 s, 0.070149 s, +0.010742 s, × 1.1808, 11691 µs/rev mozilla-try x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006325 s, 0.006526 s, +0.000201 s, × 1.0318, 4 µs/rev mozilla-try x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.005171 s, 0.005187 s, +0.000016 s, × 1.0031, 126 µs/rev mozilla-try x000_revs_x000_added_x000_copies 1346fd0130e4 4c65cbdabc1f : 6657 revs, 0.066837 s, 0.065047 s, -0.001790 s, × 0.9732, 9 µs/rev mozilla-try x0000_revs_x_added_0_copies 63519bfd42ee a36a2a865d92 : 40314 revs, 0.314252 s, 0.301129 s, -0.013123 s, × 0.9582, 7 µs/rev mozilla-try x0000_revs_x_added_x_copies 9fe69ff0762d bcabf2a78927 : 38690 revs, 0.304160 s, 0.280683 s, -0.023477 s, × 0.9228, 7 µs/rev mozilla-try x0000_revs_xx000_added_x_copies 156f6e2674f2 4d0f2c178e66 : 8598 revs, 0.089223 s, 0.084897 s, -0.004326 s, × 0.9515, 9 µs/rev mozilla-try x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.026711 s, 0.026620 s, -0.000091 s, × 0.9966, 43 µs/rev mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 97052 revs, 3.243010 s, 1.529120 s, -1.713890 s, × 0.4715, 15 µs/rev mozilla-try x0000_revs_x0000_added_x0000_copies e928c65095ed e951f4ad123a : 52031 revs, 0.756500 s, 0.738709 s, -0.017791 s, × 0.9765, 14 µs/rev mozilla-try x00000_revs_x_added_0_copies 6a320851d377 1ebb79acd503 : 363753 revs, 5.693818 s, 4.842699 s, -0.851119 s, × 0.8505, 13 µs/rev mozilla-try x00000_revs_x00000_added_0_copies dc8a3ca7010e d16fde900c9c : 34414 revs, 0.590904 s, 0.596946 s, +0.006042 s, × 1.0102, 17 µs/rev mozilla-try x00000_revs_x_added_x_copies 5173c4b6f97c 95d83ee7242d : 362229 revs, 5.677655 s, 4.761732 s, -0.915923 s, × 0.8387, 13 µs/rev mozilla-try x00000_revs_x000_added_x_copies 9126823d0e9c ca82787bb23c : 359344 revs, 5.563370 s, 4.733912 s, -0.829458 s, × 0.8509, 13 µs/rev mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 192665 revs, 2.864099 s, 2.593410 s, -0.270689 s, × 0.9055, 13 µs/rev mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 113.297287 s, 41.041198 s, -72.256089 s, × 0.3622, 179 µs/rev mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 59.498652 s, 27.915689 s, -31.582963 s, × 0.4692, 73 µs/rev Full timing comparison between this revision and the filelog copy tracing. Repo Case Source-Rev Dest-Rev # of revisions filelog sidedata Difference Factor time per rev --------------------------------------------------------------------------------------------------------------------------------------------------------------- mercurial x_revs_x_added_0_copies ad6b123de1c7 39cfcef4f463 : 1 revs, 0.000903 s, 0.000042 s, -0.000861 s, × 0.0465, 41 µs/rev mercurial x_revs_x_added_x_copies 2b1c78674230 0c1d10351869 : 6 revs, 0.001861 s, 0.000110 s, -0.001751 s, × 0.0591, 18 µs/rev mercurial x000_revs_x000_added_x_copies 81f8ff2a9bf2 dd3267698d84 : 1032 revs, 0.018577 s, 0.004918 s, -0.013659 s, × 0.2647, 4 µs/rev pypy x_revs_x_added_0_copies aed021ee8ae8 099ed31b181b : 9 revs, 0.001519 s, 0.000195 s, -0.001324 s, × 0.1283, 21 µs/rev pypy x_revs_x000_added_0_copies 4aa4e1f8e19a 359343b9ac0e : 1 revs, 0.213855 s, 0.000049 s, -0.350d73 s, × 0.0002, 48 µs/rev pypy x_revs_x_added_x_copies ac52eb7bbbb0 72e022663155 : 7 revs, 0.017022 s, 0.000112 s, -0.016910 s, × 0.0065, 15 µs/rev pypy x_revs_x00_added_x_copies c3b14617fbd7 ace7255d9a26 : 1 revs, 0.019398 s, 0.000324 s, -0.019074 s, × 0.0167, 323 µs/rev pypy x_revs_x000_added_x000_copies df6f7a526b60 a83dc6a2d56f : 6 revs, 0.769467 s, 0.010611 s, -0.758856 s, × 0.0137, 1768 µs/rev pypy x000_revs_xx00_added_0_copies 89a76aede314 2f22446ff07e : 4785 revs, 1.221952 s, 0.050835 s, -1.171117 s, × 0.0416, 10 µs/rev pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 6780 revs, 1.304007 s, 0.081225 s, -1.222782 s, × 0.0622, 11 µs/rev pypy x000_revs_x000_added_x000_copies 89a76aede314 7b3dda341c84 : 5441 revs, 1.686610 s, 0.061291 s, -1.625319 s, × 0.0363, 11 µs/rev pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 43645 revs, 0.001107 s, 0.586011 s, +0.584904 s, × 529.36, 13 µs/rev pypy x0000_revs_xx000_added_0_copies bf2c629d0071 4ffed77c095c : 2 revs, 1.100760 s, 0.012824 s, -1.087936 s, × 0.0116, 6408 µs/rev pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 11316 revs, 1.350547 s, 0.114173 s, -1.236374 s, × 0.0845, 10 µs/rev netbeans x_revs_x_added_0_copies fb0955ffcbcd a01e9239f9e7 : 2 revs, 0.027864 s, 0.000085 s, -0.027779 s, × 0.0030, 42 µs/rev netbeans x_revs_x000_added_0_copies 6f360122949f 20eb231cc7d0 : 2 revs, 0.132479 s, 0.000108 s, -0.132371 s, × 0.0008, 53 µs/rev netbeans x_revs_x_added_x_copies 1ada3faf6fb6 5a39d12eecf4 : 3 revs, 0.025405 s, 0.000175 s, -0.025230 s, × 0.0068, 58 µs/rev netbeans x_revs_x00_added_x_copies 35be93ba1e2c 9eec5e90c05f : 9 revs, 0.053244 s, 0.000719 s, -0.052525 s, × 0.0135, 79 µs/rev netbeans x000_revs_xx00_added_0_copies eac3045b4fdd 51d4ae7f1290 : 1421 revs, 0.038017 s, 0.010175 s, -0.027842 s, × 0.2676, 7 µs/rev netbeans x000_revs_x000_added_x_copies e2063d266acd 6081d72689dc : 1533 revs, 0.198308 s, 0.015569 s, -0.182739 s, × 0.0785, 10 µs/rev netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 5750 revs, 0.949749 s, 0.061004 s, -0.888745 s, × 0.0642, 10 µs/rev netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 66949 revs, 3.932262 s, 0.535874 s, -3.396388 s, × 0.1362, 8 µs/rev mozilla-central x_revs_x_added_0_copies 3697f962bb7b 7015fcdd43a2 : 2 revs, 0.024490 s, 0.000090 s, -0.024400 s, × 0.0036, 44 µs/rev mozilla-central x_revs_x000_added_0_copies dd390860c6c9 40d0c5bed75d : 8 revs, 0.143885 s, 0.000281 s, -0.143604 s, × 0.0019, 35 µs/rev mozilla-central x_revs_x_added_x_copies 8d198483ae3b 14207ffc2b2f : 9 revs, 0.025471 s, 0.000187 s, -0.025284 s, × 0.0073, 20 µs/rev mozilla-central x_revs_x00_added_x_copies 98cbc58cc6bc 446a150332c3 : 7 revs, 0.086013 s, 0.000660 s, -0.085353 s, × 0.0076, 94 µs/rev mozilla-central x_revs_x000_added_x000_copies 3c684b4b8f68 0a5e72d1b479 : 3 revs, 0.200726 s, 0.003385 s, -0.197341 s, × 0.0168, 1127 µs/rev mozilla-central x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 2.224171 s, 0.069812 s, -2.154359 s, × 0.0313, 11633 µs/rev mozilla-central x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.090780 s, 0.006503 s, -0.084277 s, × 0.0716, 4 µs/rev mozilla-central x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.764805 s, 0.004988 s, -0.759817 s, × 0.0065, 121 µs/rev mozilla-central x000_revs_x000_added_x000_copies 7c97034feb78 4407bd0c6330 : 7839 revs, 1.161405 s, 0.063963 s, -1.097442 s, × 0.0550, 8 µs/rev mozilla-central x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 6.816186 s, 0.026225 s, -6.789961 s, × 0.0038, 42 µs/rev mozilla-central x0000_revs_xx000_added_x000_copies f78c615a656c 96a38b690156 : 30263 revs, 3.374819 s, 0.201377 s, -3.173442 s, × 0.0596, 6 µs/rev mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 153721 revs, 16.285469 s, 1.781383 s, -14.504086 s, × 0.1093, 11 µs/rev mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 204976 revs, 21.207733 s, 2.603867 s, -18.603866 s, × 0.1227, 12 µs/rev mozilla-try x_revs_x_added_0_copies aaf6dde0deb8 9790f499805a : 2 revs, 0.080843 s, 0.000845 s, -0.079998 s, × 0.0104, 422 µs/rev mozilla-try x_revs_x000_added_0_copies d8d0222927b4 5bb8ce8c7450 : 2 revs, 0.511068 s, 0.000862 s, -0.510206 s, × 0.0016, 430 µs/rev mozilla-try x_revs_x_added_x_copies 092fcca11bdb 936255a0384a : 4 revs, 0.021573 s, 0.000161 s, -0.021412 s, × 0.0074, 40 µs/rev mozilla-try x_revs_x00_added_x_copies b53d2fadbdb5 017afae788ec : 2 revs, 0.227726 s, 0.001163 s, -0.226563 s, × 0.0051, 581 µs/rev mozilla-try x_revs_x000_added_x000_copies 20408ad61ce5 6f0ee96e21ad : 1 revs, 1.120448 s, 0.032414 s, -1.088034 s, × 0.0289, 32381 µs/rev mozilla-try x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 2.241713 s, 0.070149 s, -2.171564 s, × 0.0312, 11689 µs/rev mozilla-try x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.090633 s, 0.006526 s, -0.084107 s, × 0.0720, 4 µs/rev mozilla-try x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.770403 s, 0.005187 s, -0.765216 s, × 0.0067, 126 µs/rev mozilla-try x000_revs_x000_added_x000_copies 1346fd0130e4 4c65cbdabc1f : 6657 revs, 1.184557 s, 0.065047 s, -1.119510 s, × 0.0549, 9 µs/rev mozilla-try x0000_revs_x_added_0_copies 63519bfd42ee a36a2a865d92 : 40314 revs, 0.085790 s, 0.301129 s, +0.215339 s, × 3.5100, 7 µs/rev mozilla-try x0000_revs_x_added_x_copies 9fe69ff0762d bcabf2a78927 : 38690 revs, 0.080616 s, 0.280683 s, +0.200067 s, × 3.4817, 7 µs/rev mozilla-try x0000_revs_xx000_added_x_copies 156f6e2674f2 4d0f2c178e66 : 8598 revs, 7.712554 s, 0.084897 s, -7.627657 s, × 0.0110, 9 µs/rev mozilla-try x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 6.937294 s, 0.026620 s, -6.910674 s, × 0.0038, 43 µs/rev mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 97052 revs, 7.712313 s, 1.529120 s, -6.183193 s, × 0.1982, 15 µs/rev mozilla-try x0000_revs_x0000_added_x0000_copies e928c65095ed e951f4ad123a : 52031 revs, 9.966910 s, 0.738709 s, -9.228201 s, × 0.0741, 14 µs/rev mozilla-try x00000_revs_x_added_0_copies 6a320851d377 1ebb79acd503 : 363753 revs, 0.090397 s, 4.842699 s, +4.752302 s, × 53.571, 13 µs/rev mozilla-try x00000_revs_x00000_added_0_copies dc8a3ca7010e d16fde900c9c : 34414 revs, 27.817167 s, 0.596946 s, -27.220221 s, × 0.0214, 17 µs/rev mozilla-try x00000_revs_x_added_x_copies 5173c4b6f97c 95d83ee7242d : 362229 revs, 0.091305 s, 4.761732 s, +4.670427 s, × 52.151, 13 µs/rev mozilla-try x00000_revs_x000_added_x_copies 9126823d0e9c ca82787bb23c : 359344 revs, 0.231183 s, 4.733912 s, +4.502729 s, × 20.476, 13 µs/rev mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 192665 revs, 19.830617 s, 2.593410 s, -17.237207 s, × 0.1307, 13 µs/rev mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 21.743873 s, 41.041198 s, +19.297325 s, × 1.8874, 179 µs/rev mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 25.935037 s, 27.915689 s, +1.980652 s, × 1.0763, 73 µs/rev Differential Revision: https://phab.mercurial-scm.org/D9493
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10134
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
     1
# If you want to change PREFIX, do not just edit it below. The changed
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
     2
# value wont get passed on to recursive make calls. You should instead
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
     3
# override the variable on the command like:
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
     4
#
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
     5
# % make PREFIX=/opt/ install
821793e3049c Makefile: added instructions on how to override PREFIX
Martin Geisler <mg@lazybytes.net>
parents: 10073
diff changeset
     6
29004
145cdc45b0df make: do assignment and export in a single statement
Augie Fackler <augie@google.com>
parents: 29003
diff changeset
     7
export PREFIX=/usr/local
45840
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
     8
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
     9
# Default to Python 3.
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
    10
#
45913
4f6816e8440b make: switch the PYTHON default to `py.exe -3` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 45854
diff changeset
    11
# Windows ships Python 3 as `python.exe`, which may not be on PATH.  py.exe is.
45840
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
    12
ifeq ($(OS),Windows_NT)
45913
4f6816e8440b make: switch the PYTHON default to `py.exe -3` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 45854
diff changeset
    13
PYTHON?=py -3
45840
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
    14
else
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
    15
PYTHON?=python3
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
    16
endif
c2837640aeb0 makefile: use Python 3 by default (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 45612
diff changeset
    17
45852
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45840
diff changeset
    18
PYOXIDIZER?=pyoxidizer
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45840
diff changeset
    19
29009
c05cc1b95848 make: backout changeset 51f5fae84e43
Siddharth Agarwal <sid0@fb.com>
parents: 29005
diff changeset
    20
$(eval HGROOT := $(shell pwd))
24194
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
    21
HGPYTHONS ?= $(HGROOT)/build/pythons
7706
0ae7f0b312ea use PURE option in Makefile
Martin Geisler <mg@daimi.au.dk>
parents: 7687
diff changeset
    22
PURE=
38853
4ca5932065ca i18n: avoid substitution of PYFILES at runtime for readability of output
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 38562
diff changeset
    23
PYFILESCMD=find mercurial hgext doc -name '*.py'
4ca5932065ca i18n: avoid substitution of PYFILES at runtime for readability of output
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 38562
diff changeset
    24
PYFILES:=$(shell $(PYFILESCMD))
43768
640bae94f2f3 cleanup: update references to /help/ that should now be /helptext/
Augie Fackler <augie@google.com>
parents: 43556
diff changeset
    25
DOCFILES=mercurial/helptext/*.txt
19427
80983af366b5 doc: make i18n man and html
Takumi IINO <trot.thunder@gmail.com>
parents: 18598
diff changeset
    26
export LANGUAGE=C
80983af366b5 doc: make i18n man and html
Takumi IINO <trot.thunder@gmail.com>
parents: 18598
diff changeset
    27
export LC_ALL=C
24195
250d9cf97fb3 Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS
Augie Fackler <augie@google.com>
parents: 24194
diff changeset
    28
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
33595
c5607b65fcb8 osx: wire up genosxversion script
Augie Fackler <augie@google.com>
parents: 33045
diff changeset
    29
OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
42666
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
    30
CARGO = cargo
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    31
18056
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
    32
# Set this to e.g. "mingw32" to use a non-default compiler.
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
    33
COMPILER=
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
    34
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    35
COMPILERFLAG_tmp_ =
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    36
COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    37
COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    38
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    39
help:
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    40
	@echo 'Commonly used make targets:'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    41
	@echo '  all          - build program and documentation'
20311
8824009d2704 makefile: add $ to environment variables in help message
Matt Mackall <mpm@selenic.com>
parents: 20121
diff changeset
    42
	@echo '  install      - install program and man pages to $$PREFIX ($(PREFIX))'
8824009d2704 makefile: add $ to environment variables in help message
Matt Mackall <mpm@selenic.com>
parents: 20121
diff changeset
    43
	@echo '  install-home - install with setup.py install --home=$$HOME ($(HOME))'
4706
f0aa759b8f93 Makefile: change "make local" to build a fully working local version.
Markus F.X.J. Oberhumer <markus@oberhumer.com>
parents: 3969
diff changeset
    44
	@echo '  local        - build for inplace usage'
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    45
	@echo '  tests        - run all tests in the automatic test suite'
15379
3ca419fb435e Makefile: adjust example, test-merge1 is now test-merge1.t
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14815
diff changeset
    46
	@echo '  test-foo     - run only specified tests (e.g. test-merge1.t)'
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    47
	@echo '  dist         - run all tests and create a source tarball in dist/'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    48
	@echo '  clean        - remove files created by other targets'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    49
	@echo '                 (except installed files or dist source tarball)'
7648
02e358a3a8a7 i18n: let Makefile generate i18n/hg.pot
Martin Geisler <mg@daimi.au.dk>
parents: 4707
diff changeset
    50
	@echo '  update-pot   - update i18n/hg.pot'
2244
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    51
	@echo
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    52
	@echo 'Example for a system-wide installation under /usr/local:'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    53
	@echo '  make all && su -c "make install" && hg version'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    54
	@echo
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    55
	@echo 'Example for a local installation (usable in this directory):'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    56
	@echo '  make local && ./hg version'
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    57
76be4e66ddc8 Just using 'make' now shows help. 'make all' doesn't perform inplace build.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2235
diff changeset
    58
all: build doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
    59
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
    60
local:
18056
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
    61
	$(PYTHON) setup.py $(PURE) \
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
    62
	  build_py -c -d . \
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    63
	  build_ext $(COMPILERFLAG) -i \
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    64
	  build_hgexe $(COMPILERFLAG) -i \
18056
7c9b07f0da73 makefile: allow local builds to work on windows/mingw32
Bryan O'Sullivan <bryano@fb.com>
parents: 17927
diff changeset
    65
	  build_mo
17927
9796d5437e72 makefile: don't use system hgrc when running hg in-place
Bryan O'Sullivan <bryano@fb.com>
parents: 17062
diff changeset
    66
	env HGRCPATH= $(PYTHON) hg version
1020
f1b052db3515 Add default make rule
mpm@selenic.com
parents: 1008
diff changeset
    67
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
    68
build:
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    69
	$(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
    70
26601
c5c7c686d6a6 makefile: add wheel build target
Nathan Goldbaum <ngoldbau@ucsc.edu>
parents: 26108
diff changeset
    71
wheel:
29003
c6b108555dfa make: alter how we compute compiler flags for setup.py
Augie Fackler <augie@google.com>
parents: 28995
diff changeset
    72
	FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
26601
c5c7c686d6a6 makefile: add wheel build target
Nathan Goldbaum <ngoldbau@ucsc.edu>
parents: 26108
diff changeset
    73
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
    74
doc:
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
    75
	$(MAKE) -C doc
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    76
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
    77
cleanbutpackages:
44276
64e104ca555e make: also delete hg.exe when cleaning
Matt Harbison <matt_harbison@yahoo.com>
parents: 43768
diff changeset
    78
	rm -f hg.exe
8365
94e91205d9b6 Makefile: fix grammar in comment
Greg Ward <greg-hg@gerg.ca>
parents: 8273
diff changeset
    79
	-$(PYTHON) setup.py clean --all # ignore errors from this command
33605
92f7dcf9a40b make: add new directory 'hgdemandimport' to cleanbutpackages rule
Sean Farley <sean@farley.io>
parents: 33596
diff changeset
    80
	find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
20007
23edc6673f0d make: restrict recursion in make clean
Matt Mackall <mpm@selenic.com>
parents: 19991
diff changeset
    81
		\( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
22375
308ab71207ff build: don't clean __version__.py on 'make clean' in release tarballs
J. Lewis Muir <jlmuir@anl.gov>
parents: 22358
diff changeset
    82
	rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
28430
17b85d739b62 setup: create a module for the modulepolicy
timeless <timeless@mozdev.org>
parents: 27212
diff changeset
    83
	rm -f mercurial/__modulepolicy__.py
22375
308ab71207ff build: don't clean __version__.py on 'make clean' in release tarballs
J. Lewis Muir <jlmuir@anl.gov>
parents: 22358
diff changeset
    84
	if test -d .hg; then rm -f mercurial/__version__.py; fi
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
    85
	rm -rf build mercurial/locale
1423
76239f0cb0dc Use $(MAKE) not make
levon@movementarian.org
parents: 1020
diff changeset
    86
	$(MAKE) -C doc clean
28974
ef5553fab197 make: add chg to clean rule
Sean Farley <sean@farley.io>
parents: 28457
diff changeset
    87
	$(MAKE) -C contrib/chg distclean
40851
9072a890e523 rust: make clean takes care of rust/target
Georges Racinet <gracinet@anybox.fr>
parents: 40632
diff changeset
    88
	rm -rf rust/target
40980
462a26756f70 rust-cpython: build via HGWITHRUSTEXT=cpython
Georges Racinet <gracinet@anybox.fr>
parents: 40851
diff changeset
    89
	rm -f mercurial/rustext.so
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    90
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
    91
clean: cleanbutpackages
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
    92
	rm -rf packages
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
    93
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
    94
install: install-bin install-doc
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
    95
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
    96
install-bin: build
10961
ce6d56b95f2e Respect the DESTDIR variable during 'make install'
Dévai Tamás <devait@vnet.hu>
parents: 10134
diff changeset
    97
	$(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
    98
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
    99
install-doc: doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
   100
	cd doc && $(MAKE) $(MFLAGS) install
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
   101
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
   102
install-home: install-home-bin install-home-doc
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
   103
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
   104
install-home-bin: build
20614
1bc68ff4e0a2 setup: specify --prefix="" for install-home-bin to avoid badness with defaults
Augie Fackler <raf@durin42.com>
parents: 20358
diff changeset
   105
	$(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
2527
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
   106
c51fad25e59e Split installation targets into install-bin and install-doc.
Sascha Wilde <wilde@sha-bang.de>
parents: 2244
diff changeset
   107
install-home-doc: doc
2235
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
   108
	cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
457e4247315d New make targets:
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2234
diff changeset
   109
3872
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
   110
MANIFEST-doc:
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
   111
	$(MAKE) -C doc MANIFEST
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
   112
14558
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
   113
MANIFEST.in: MANIFEST-doc
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
   114
	hg manifest | sed -e 's/^/include /' > MANIFEST.in
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
   115
	echo include mercurial/__version__.py >> MANIFEST.in
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
   116
	sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
3872
9d7ac8613340 fix MANIFEST generation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3865
diff changeset
   117
2234
9ea93ff67a73 New make target "dist-notests" to create tarballs without running tests first.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2233
diff changeset
   118
dist:	tests dist-notests
9ea93ff67a73 New make target "dist-notests" to create tarballs without running tests first.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2233
diff changeset
   119
14558
2ce7dfe17bc5 distutils: Create MANIFEST.in instead of MANIFEST in Makefile
Stephen Thorne <stephen@thorne.id.au>
parents: 14315
diff changeset
   120
dist-notests:	doc MANIFEST.in
3865
36a957364b1b Make make dist a bit quieter
Matt Mackall <mpm@selenic.com>
parents: 3864
diff changeset
   121
	TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   122
14172
1a919c3271bf add make check: tests rule
Johan Euphrosine <proppy@google.com>
parents: 13101
diff changeset
   123
check: tests
1a919c3271bf add make check: tests rule
Johan Euphrosine <proppy@google.com>
parents: 13101
diff changeset
   124
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   125
tests:
42666
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
   126
        # Run Rust tests if cargo is installed
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
   127
	if command -v $(CARGO) >/dev/null 2>&1; then \
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   128
		$(MAKE) rust-tests; \
42666
7521e6d18057 makefile: run Rust tests if cargo is installed
Raphaël Gomès <rgomes@octobus.net>
parents: 42058
diff changeset
   129
	fi
3969
edaf68032a27 add possibility to pass flags when testing with the Makefile
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3872
diff changeset
   130
	cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   131
1426
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
   132
test-%:
3969
edaf68032a27 add possibility to pass flags when testing with the Makefile
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3872
diff changeset
   133
	cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
1426
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
   134
24194
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
   135
testpy-%:
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
   136
	@echo Looking for Python $* in $(HGPYTHONS)
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
   137
	[ -e $(HGPYTHONS)/$*/bin/python ] || ( \
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
   138
	cd $$(mktemp --directory --tmpdir) && \
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
   139
        $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
   140
	cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
00809c43d72c Makefile: introduce testpy-% target for testing with a specifc Python
Augie Fackler <augie@google.com>
parents: 23940
diff changeset
   141
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   142
rust-tests: py_feature = $(shell $(PYTHON) -c \
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   143
 'import sys; print(["python27-bin", "python3-bin"][sys.version_info[0] >= 3])')
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   144
rust-tests:
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   145
	cd $(HGROOT)/rust/hg-cpython \
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   146
		&& $(CARGO) test --quiet --all \
45612
e604a3c03ab9 rust: introduce `dirstate-tree` cargo feature
Raphaël Gomès <rgomes@octobus.net>
parents: 45371
diff changeset
   147
			--no-default-features --features "$(py_feature) $(HG_RUST_FEATURES)"
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   148
18598
4723ccb62282 check-code: add Makefile target to run check-code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 18056
diff changeset
   149
check-code:
4723ccb62282 check-code: add Makefile target to run check-code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 18056
diff changeset
   150
	hg manifest | xargs python contrib/check-code.py
4723ccb62282 check-code: add Makefile target to run check-code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 18056
diff changeset
   151
34859
2bf152128d59 makefile: add target to apply clang-format in-place
Augie Fackler <augie@google.com>
parents: 34655
diff changeset
   152
format-c:
2bf152128d59 makefile: add target to apply clang-format in-place
Augie Fackler <augie@google.com>
parents: 34655
diff changeset
   153
	clang-format --style file -i \
37186
0024961aa493 contrib: rename clang-format-blacklist to clang-format-ignorelist
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36928
diff changeset
   154
	  `hg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'`
34859
2bf152128d59 makefile: add target to apply clang-format in-place
Augie Fackler <augie@google.com>
parents: 34655
diff changeset
   155
7893
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
   156
update-pot: i18n/hg.pot
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
   157
20358
4276c906d90e Makefile: hg.pot depends on the scripts generating it
Simon Heimberg <simohe@besonet.ch>
parents: 20311
diff changeset
   158
i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
8542
de150a942ec8 i18n: accurately generate hg.pot
Martin Geisler <mg@lazybytes.net>
parents: 8365
diff changeset
   159
	$(PYTHON) i18n/hggettext mercurial/commands.py \
16126
0c4bec9596d8 filemerge: create detail of internal merge tools from documentation string
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15379
diff changeset
   160
	  hgext/*.py hgext/*/__init__.py \
0c4bec9596d8 filemerge: create detail of internal merge tools from documentation string
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15379
diff changeset
   161
	  mercurial/fileset.py mercurial/revset.py \
36928
521f6c7e1756 templater: split template functions to new module
Yuya Nishihara <yuya@tcha.org>
parents: 35949
diff changeset
   162
	  mercurial/templatefilters.py \
521f6c7e1756 templater: split template functions to new module
Yuya Nishihara <yuya@tcha.org>
parents: 35949
diff changeset
   163
	  mercurial/templatefuncs.py \
521f6c7e1756 templater: split template functions to new module
Yuya Nishihara <yuya@tcha.org>
parents: 35949
diff changeset
   164
	  mercurial/templatekw.py \
16126
0c4bec9596d8 filemerge: create detail of internal merge tools from documentation string
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 15379
diff changeset
   165
	  mercurial/filemerge.py \
24859
64e3f97bdf08 i18n: extract doc string of each web commands as translatable one
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 24601
diff changeset
   166
	  mercurial/hgweb/webcommands.py \
33841
fa7e30efe05a i18n: get translation entries for description of each compression engines
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 33707
diff changeset
   167
	  mercurial/util.py \
20121
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
   168
	  $(DOCFILES) > i18n/hg.pot.tmp
7710
88326ee85a1b i18n: extract strings with xgettext
Martin Geisler <mg@daimi.au.dk>
parents: 7706
diff changeset
   169
        # All strings marked for translation in Mercurial contain
88326ee85a1b i18n: extract strings with xgettext
Martin Geisler <mg@daimi.au.dk>
parents: 7706
diff changeset
   170
        # ASCII characters only. But some files contain string
88326ee85a1b i18n: extract strings with xgettext
Martin Geisler <mg@daimi.au.dk>
parents: 7706
diff changeset
   171
        # literals like this '\037\213'. xgettext thinks it has to
8273
a9c1172a025e Makefile: fixed comment
Martin Geisler <mg@lazybytes.net>
parents: 8272
diff changeset
   172
        # parse them even though they are not marked for translation.
a9c1172a025e Makefile: fixed comment
Martin Geisler <mg@lazybytes.net>
parents: 8272
diff changeset
   173
        # Extracting with an explicit encoding of ISO-8859-1 will make
a9c1172a025e Makefile: fixed comment
Martin Geisler <mg@lazybytes.net>
parents: 8272
diff changeset
   174
        # xgettext "parse" and ignore them.
38853
4ca5932065ca i18n: avoid substitution of PYFILES at runtime for readability of output
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 38562
diff changeset
   175
	$(PYFILESCMD) | xargs \
9278
3d9f77c03105 Makefile: remove non-default wrapping of hg.pot strings
Martin Geisler <mg@lazybytes.net>
parents: 9079
diff changeset
   176
	  xgettext --package-name "Mercurial" \
30868
22a4f664c1a5 misc: replace domain of mercurial-devel ML address by mercurial-scm.org
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30705
diff changeset
   177
	  --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
8272
79983cfa7efe Makefile: add more meta data to hg.pot
Martin Geisler <mg@lazybytes.net>
parents: 7893
diff changeset
   178
	  --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
12806
57b9fd75b6f8 i18n: extract comments marked for translator hints
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 12500
diff changeset
   179
	  --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
20121
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
   180
	  -d hg -p i18n -o hg.pot.tmp
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
   181
	$(PYTHON) i18n/posplit i18n/hg.pot.tmp
20080
c845b1a95eed Makefile: intermediate steps work with temporary copy of hg.pot
Simon Heimberg <simohe@besonet.ch>
parents: 20007
diff changeset
   182
        # The target file is not created before the last step. So it never is in
c845b1a95eed Makefile: intermediate steps work with temporary copy of hg.pot
Simon Heimberg <simohe@besonet.ch>
parents: 20007
diff changeset
   183
        # an intermediate state.
20121
2af9e1d40dc7 Makefile: temporary copy of hg.pot is hg.pot.tmp instead of hg.pot~
Simon Heimberg <simohe@besonet.ch>
parents: 20120
diff changeset
   184
	mv -f i18n/hg.pot.tmp i18n/hg.pot
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
   185
7893
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
   186
%.po: i18n/hg.pot
19991
ce5d711475a3 Makefile: do update on a temporary copy of a po file
Simon Heimberg <simohe@besonet.ch>
parents: 19427
diff changeset
   187
        # work on a temporary copy for never having a half completed target
ce5d711475a3 Makefile: do update on a temporary copy of a po file
Simon Heimberg <simohe@besonet.ch>
parents: 19427
diff changeset
   188
	cp $@ $@.tmp
ce5d711475a3 Makefile: do update on a temporary copy of a po file
Simon Heimberg <simohe@besonet.ch>
parents: 19427
diff changeset
   189
	msgmerge --no-location --update $@.tmp $^
20120
872f81de2865 Makefile: fix po file updating by using same file name everywhere
Simon Heimberg <simohe@besonet.ch>
parents: 20080
diff changeset
   190
	mv -f $@.tmp $@
7893
606723f4a327 enhance Makefile for language translators
Tobias Bell <tobias.bell@gmail.com>
parents: 7791
diff changeset
   191
21255
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents: 21229
diff changeset
   192
# Packaging targets
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents: 21229
diff changeset
   193
38056
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   194
packaging_targets := \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   195
  centos7 \
43405
7c9d42c1042d packaging: add support for CentOS 8
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 43360
diff changeset
   196
  centos8 \
38056
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   197
  deb \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   198
  docker-centos7 \
43405
7c9d42c1042d packaging: add support for CentOS 8
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 43360
diff changeset
   199
  docker-centos8 \
43556
e468ebfcb4ce packaging: remove references to debian jessie
Augie Fackler <augie@google.com>
parents: 43405
diff changeset
   200
  docker-debian-bullseye \
e468ebfcb4ce packaging: remove references to debian jessie
Augie Fackler <augie@google.com>
parents: 43405
diff changeset
   201
  docker-debian-buster \
38056
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   202
  docker-debian-stretch \
43360
0b65f18edc4f packaging: refactor "fedora29" target to a single more generic "fedora" target
Mads Kiilerich <mads@kiilerich.com>
parents: 43354
diff changeset
   203
  docker-fedora \
38056
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   204
  docker-ubuntu-xenial \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   205
  docker-ubuntu-xenial-ppa \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   206
  docker-ubuntu-bionic \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   207
  docker-ubuntu-bionic-ppa \
45983
971424517e17 packaging: drop Disco (19.04) and add Focal (20.04)
Matt Harbison <matt_harbison@yahoo.com>
parents: 45982
diff changeset
   208
  docker-ubuntu-focal \
971424517e17 packaging: drop Disco (19.04) and add Focal (20.04)
Matt Harbison <matt_harbison@yahoo.com>
parents: 45982
diff changeset
   209
  docker-ubuntu-focal-ppa \
43360
0b65f18edc4f packaging: refactor "fedora29" target to a single more generic "fedora" target
Mads Kiilerich <mads@kiilerich.com>
parents: 43354
diff changeset
   210
  fedora \
38056
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   211
  linux-wheels \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   212
  linux-wheels-x86_64 \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   213
  linux-wheels-i686 \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   214
  ppa
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   215
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   216
# Forward packaging targets for convenience.
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   217
$(packaging_targets):
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   218
	$(MAKE) -C contrib/packaging $@
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   219
21559
9a9de26ad99a make: add a basic osx mpkg target
Matt Mackall <mpm@selenic.com>
parents: 21255
diff changeset
   220
osx:
31616
6359976b43be osx: always purge build/mercurial before starting build
Augie Fackler <augie@google.com>
parents: 31614
diff changeset
   221
	rm -rf build/mercurial
29535
da1848f07c6a osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents: 29036
diff changeset
   222
	/usr/bin/python2.7 setup.py install --optimize=1 \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   223
	  --root=build/mercurial/ --prefix=/usr/local/ \
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   224
	  --install-lib=/Library/Python/2.7/site-packages/
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   225
	make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
32134
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
   226
        # Place a bogon .DS_Store file in the target dir so we can be
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
   227
        # sure it doesn't get included in the final package.
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
   228
	touch build/mercurial/.DS_Store
31152
408dcf7475a7 osx: install bash and zsh completions by default
Augie Fackler <augie@google.com>
parents: 30980
diff changeset
   229
        # install zsh completions - this location appears to be
408dcf7475a7 osx: install bash and zsh completions by default
Augie Fackler <augie@google.com>
parents: 30980
diff changeset
   230
        # searched by default as of macOS Sierra.
31614
8e516f71577a osx: install completion scripts using install(1) to avoid umask badness
Augie Fackler <augie@google.com>
parents: 31152
diff changeset
   231
	install -d build/mercurial/usr/local/share/zsh/site-functions/
32135
501d48bda912 zsh_completion: install as _hg not hg
Kyle Lippincott <spectral@google.com>
parents: 32134
diff changeset
   232
	install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/_hg
31152
408dcf7475a7 osx: install bash and zsh completions by default
Augie Fackler <augie@google.com>
parents: 30980
diff changeset
   233
        # install bash completions - there doesn't appear to be a
408dcf7475a7 osx: install bash and zsh completions by default
Augie Fackler <augie@google.com>
parents: 30980
diff changeset
   234
        # place that's searched by default for bash, so we'll follow
408dcf7475a7 osx: install bash and zsh completions by default
Augie Fackler <augie@google.com>
parents: 30980
diff changeset
   235
        # the lead of Apple's git install and just put it in a
408dcf7475a7 osx: install bash and zsh completions by default
Augie Fackler <augie@google.com>
parents: 30980
diff changeset
   236
        # location of our own.
31614
8e516f71577a osx: install completion scripts using install(1) to avoid umask badness
Augie Fackler <augie@google.com>
parents: 31152
diff changeset
   237
	install -d build/mercurial/usr/local/hg/contrib/
8e516f71577a osx: install completion scripts using install(1) to avoid umask badness
Augie Fackler <augie@google.com>
parents: 31152
diff changeset
   238
	install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
32505
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32504
diff changeset
   239
	make -C contrib/chg \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32504
diff changeset
   240
	  HGPATH=/usr/local/bin/hg \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32504
diff changeset
   241
	  PYTHON=/usr/bin/python2.7 \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32504
diff changeset
   242
	  DESTDIR=../../build/mercurial \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32504
diff changeset
   243
	  PREFIX=/usr/local \
a38ed42cd23c osx: include chg by default
Augie Fackler <augie@google.com>
parents: 32504
diff changeset
   244
	  clean install
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   245
	mkdir -p $${OUTPUTDIR:-dist}
33662
8de8f8a91f2d osx: delay version computation on macOS builds
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 33605
diff changeset
   246
	HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   247
	OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
32134
197eb93560b3 osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents: 32080
diff changeset
   248
	pkgbuild --filter \\.DS_Store --root build/mercurial/ \
29788
afa74947a414 osx: stamp the hg version into the version field in the pkg
Augie Fackler <augie@google.com>
parents: 29640
diff changeset
   249
	  --identifier org.mercurial-scm.mercurial \
afa74947a414 osx: stamp the hg version into the version field in the pkg
Augie Fackler <augie@google.com>
parents: 29640
diff changeset
   250
	  --version "$${HGVER}" \
afa74947a414 osx: stamp the hg version into the version field in the pkg
Augie Fackler <augie@google.com>
parents: 29640
diff changeset
   251
	  build/mercurial.pkg && \
38054
e5d2248dcc39 packaging: move contrib/macosx to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38052
diff changeset
   252
	productbuild --distribution contrib/packaging/macosx/distribution.xml \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   253
	  --package-path build/ \
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   254
	  --version "$${HGVER}" \
38054
e5d2248dcc39 packaging: move contrib/macosx to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38052
diff changeset
   255
	  --resources contrib/packaging/macosx/ \
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29024
diff changeset
   256
	  "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
21559
9a9de26ad99a make: add a basic osx mpkg target
Matt Mackall <mpm@selenic.com>
parents: 21255
diff changeset
   257
45852
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45840
diff changeset
   258
pyoxidizer:
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45840
diff changeset
   259
	$(PYOXIDIZER) build --path ./rust/hgcli --release
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45840
diff changeset
   260
29640
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
   261
.PHONY: help all local build doc cleanbutpackages clean install install-bin \
17b3309bfdff make: introduce a target to clean everything but packages
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29535
diff changeset
   262
	install-doc install-home install-home-bin install-home-doc \
43289
8d432d3a2d7c rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org>
parents: 42666
diff changeset
   263
	dist dist-notests check tests rust-tests check-code format-c \
45852
be6544a05e8f make: add a pyoxidizer target
Augie Fackler <augie@google.com>
parents: 45840
diff changeset
   264
	update-pot pyoxidizer \
38056
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   265
	$(packaging_targets) \
768bd75835d7 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38054
diff changeset
   266
	osx