mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-14 05:19:45 +01:00
Compare commits
887 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59b1cb08b1 | ||
|
|
eee3ee6667 | ||
|
|
f616c07625 | ||
|
|
793d2a5cc7 | ||
|
|
bff3424f31 | ||
|
|
ba5a934ca5 | ||
|
|
3093593cd6 | ||
|
|
2ccd6e0dcd | ||
|
|
650aac0d5e | ||
|
|
660252e4ca | ||
|
|
a7f5555be7 | ||
|
|
ef7e44d123 | ||
|
|
70623bf3ab | ||
|
|
7f6f9bba4e | ||
|
|
d9350fdee2 | ||
|
|
919df15706 | ||
|
|
1c78bebc35 | ||
|
|
cddf07210d | ||
|
|
9f17fd50fc | ||
|
|
3fa8795fb3 | ||
|
|
3cd8332ef3 | ||
|
|
b4c5895713 | ||
|
|
71c74c0b70 | ||
|
|
87333a2f62 | ||
|
|
34063e3656 | ||
|
|
0042095350 | ||
|
|
90f4e99281 | ||
|
|
5b7fbbf597 | ||
|
|
d83447ce3b | ||
|
|
41ffa08140 | ||
|
|
3110f8bbe6 | ||
|
|
205dc9cf8b | ||
|
|
4e637a8f80 | ||
|
|
376e043f9d | ||
|
|
c23b39b47b | ||
|
|
9817a2f423 | ||
|
|
c2f20c5030 | ||
|
|
23494ba5e1 | ||
|
|
a8a3c94590 | ||
|
|
a7b9262623 | ||
|
|
5238f9a66e | ||
|
|
55b82e40b3 | ||
|
|
24677fd4bb | ||
|
|
5107b3609e | ||
|
|
20730872fc | ||
|
|
e6408227d1 | ||
|
|
bfd962e674 | ||
|
|
2fef43b669 | ||
|
|
901ebe2983 | ||
|
|
47bb8608ad | ||
|
|
48ad58fa77 | ||
|
|
80fc527638 | ||
|
|
20906872f6 | ||
|
|
4246df5345 | ||
|
|
8a55a875e1 | ||
|
|
371977df55 | ||
|
|
6c1ac6f6bb | ||
|
|
5d3d8d0b84 | ||
|
|
9b01d7e0bb | ||
|
|
44ae1fd86b | ||
|
|
b614bef576 | ||
|
|
24c9ac5300 | ||
|
|
a337e0b71b | ||
|
|
cca26ba2b7 | ||
|
|
b41431ec80 | ||
|
|
68a1e451a2 | ||
|
|
f47e7715b4 | ||
|
|
1a48692ef0 | ||
|
|
d549f23f6e | ||
|
|
1ec942e76b | ||
|
|
1f440ad0dd | ||
|
|
298c94f697 | ||
|
|
264a0511f0 | ||
|
|
f82ac54169 | ||
|
|
fc33bef8bb | ||
|
|
3b33fd061c | ||
|
|
e6ffa52d43 | ||
|
|
8363b5b7c9 | ||
|
|
cf93fdf2b3 | ||
|
|
1a12fb6afd | ||
|
|
b07a721f8e | ||
|
|
6e3ed1044e | ||
|
|
069e1296d1 | ||
|
|
bff2359a25 | ||
|
|
d9de7d838b | ||
|
|
10134c92f8 | ||
|
|
69c2591eb4 | ||
|
|
f7b87d9833 | ||
|
|
9e31be3e8d | ||
|
|
8bb866cd99 | ||
|
|
b7b5241c60 | ||
|
|
ed8595a7e8 | ||
|
|
372f7206d6 | ||
|
|
0c5ff79b67 | ||
|
|
f470b922c6 | ||
|
|
4b70292c6e | ||
|
|
3d8056dd67 | ||
|
|
2e31573747 | ||
|
|
46373aeb65 | ||
|
|
259b13360c | ||
|
|
f4def79f36 | ||
|
|
40914d37e4 | ||
|
|
da89e5624c | ||
|
|
1e78e4b639 | ||
|
|
e64619c43f | ||
|
|
f4511e60c5 | ||
|
|
c28e34e514 | ||
|
|
f9c6f4bd18 | ||
|
|
ab0a4530c8 | ||
|
|
4e44b9cf81 | ||
|
|
4a59eea32b | ||
|
|
c15035bb7f | ||
|
|
38c629a354 | ||
|
|
97c1b9deae | ||
|
|
2f0d944b8a | ||
|
|
b8abfa016c | ||
|
|
fc84b11227 | ||
|
|
ebba61f003 | ||
|
|
8f0b240e99 | ||
|
|
b8265239b8 | ||
|
|
5d67b08f40 | ||
|
|
69720b975c | ||
|
|
f3ef67a598 | ||
|
|
91fac51819 | ||
|
|
4531e51fc4 | ||
|
|
0c42ca44f3 | ||
|
|
431bad33c0 | ||
|
|
bb35ccdbc3 | ||
|
|
3e547a0921 | ||
|
|
8ca6d2e3fb | ||
|
|
86f198088a | ||
|
|
43443b03d5 | ||
|
|
0b024171d1 | ||
|
|
6d94ef1ee7 | ||
|
|
564fea623a | ||
|
|
a714bf1b0b | ||
|
|
655033b76c | ||
|
|
a9c2b6a900 | ||
|
|
736ab82961 | ||
|
|
5b56f65379 | ||
|
|
9c0b5ee904 | ||
|
|
906081c12d | ||
|
|
74ef0287be | ||
|
|
4048bc01c6 | ||
|
|
cb7543fafd | ||
|
|
63e3083133 | ||
|
|
dfb0a3761f | ||
|
|
6ae7845341 | ||
|
|
e857d47bb5 | ||
|
|
28475942c9 | ||
|
|
3c6c782cf3 | ||
|
|
433715e09c | ||
|
|
8744fd02bd | ||
|
|
9322a179db | ||
|
|
65c20a5492 | ||
|
|
c915e9da09 | ||
|
|
7f87237400 | ||
|
|
fa470cb77e | ||
|
|
5e1584a438 | ||
|
|
3dcf67df0d | ||
|
|
d11cb7e6c1 | ||
|
|
0905490fac | ||
|
|
29edcef765 | ||
|
|
dff9c7f852 | ||
|
|
3e481cdd81 | ||
|
|
01d0ba69ce | ||
|
|
8277d1355e | ||
|
|
e57ac83cac | ||
|
|
65c322fa70 | ||
|
|
639aa5d99f | ||
|
|
f214e4cef3 | ||
|
|
3d8142d5fd | ||
|
|
b61d0d9772 | ||
|
|
3c2e0ae2ac | ||
|
|
d66bdb868d | ||
|
|
19fc2d4d88 | ||
|
|
8bb18682d4 | ||
|
|
d9aab5025e | ||
|
|
4dae92ce29 | ||
|
|
0f95eb5efc | ||
|
|
3e188b4775 | ||
|
|
c7df814ec7 | ||
|
|
f88b8fb20f | ||
|
|
240b5c9329 | ||
|
|
e9755cef6a | ||
|
|
b1c7936406 | ||
|
|
9a39ec25ca | ||
|
|
247b39e010 | ||
|
|
80d1115eb7 | ||
|
|
1892ebf911 | ||
|
|
ea25b80875 | ||
|
|
1fb9910146 | ||
|
|
81d4408852 | ||
|
|
9498132479 | ||
|
|
2d3b78abcc | ||
|
|
15df2d2de5 | ||
|
|
848ec301f2 | ||
|
|
953bec36ab | ||
|
|
9c38da478a | ||
|
|
45dd15087f | ||
|
|
721264460a | ||
|
|
a76d98e716 | ||
|
|
ed656de70f | ||
|
|
336948d514 | ||
|
|
4aedf7469a | ||
|
|
56e63d98b9 | ||
|
|
2647f75cdd | ||
|
|
1fd51fa05e | ||
|
|
a0b8f099ab | ||
|
|
a14592d891 | ||
|
|
9abdcd4a3c | ||
|
|
2dca3dc06b | ||
|
|
037bcf1683 | ||
|
|
48ba63e9e0 | ||
|
|
ff931a19c1 | ||
|
|
3567fc5460 | ||
|
|
c691ebd027 | ||
|
|
22b345adc6 | ||
|
|
0a7c808a56 | ||
|
|
ec8b85166e | ||
|
|
515f1281e1 | ||
|
|
d586b5d037 | ||
|
|
62bcdf7ecd | ||
|
|
3a32124e5c | ||
|
|
ad3844358d | ||
|
|
5f132a5ec3 | ||
|
|
2cae43552d | ||
|
|
05990a73d8 | ||
|
|
967c2d5685 | ||
|
|
7a8796bd49 | ||
|
|
2a56b6aa5a | ||
|
|
6412317f9a | ||
|
|
402fd01231 | ||
|
|
222b2457ed | ||
|
|
7757ae0cbf | ||
|
|
7b940bac40 | ||
|
|
7724283600 | ||
|
|
dd1899ba62 | ||
|
|
7778b7d006 | ||
|
|
6380aca7b2 | ||
|
|
2f003be07e | ||
|
|
afe29376fe | ||
|
|
d78b757097 | ||
|
|
74ea92ce42 | ||
|
|
6e283062c6 | ||
|
|
ec5ee59931 | ||
|
|
8b895ea856 | ||
|
|
9551f94d32 | ||
|
|
680ffebcb6 | ||
|
|
257d0ce0f2 | ||
|
|
a446a98f53 | ||
|
|
93e31619c4 | ||
|
|
2f3ac59e81 | ||
|
|
d1635b4499 | ||
|
|
c5eaaaa070 | ||
|
|
2a6e8cc962 | ||
|
|
b155b54a5e | ||
|
|
36c3915257 | ||
|
|
f28ac57f94 | ||
|
|
0b25975fcd | ||
|
|
724e5ecfb3 | ||
|
|
6674423523 | ||
|
|
63128f0e6d | ||
|
|
23b1ff04af | ||
|
|
769dd50182 | ||
|
|
743e5c0d91 | ||
|
|
04816adee5 | ||
|
|
63a30e3268 | ||
|
|
2a3853c1b9 | ||
|
|
511c6abf08 | ||
|
|
b807a9bf59 | ||
|
|
fb1294fec5 | ||
|
|
61eb5a0549 | ||
|
|
ec0a9ee8a6 | ||
|
|
183fdef181 | ||
|
|
25e07fb041 | ||
|
|
7162ad011c | ||
|
|
92e727c8e4 | ||
|
|
b2cf8c4cb0 | ||
|
|
babd792880 | ||
|
|
703702096b | ||
|
|
e99b3f4ffe | ||
|
|
e86fa474a7 | ||
|
|
6bf8610fc8 | ||
|
|
b1d745897b | ||
|
|
845106af13 | ||
|
|
959d0a9ebb | ||
|
|
a5312cbadb | ||
|
|
18688c3a56 | ||
|
|
319150fde0 | ||
|
|
fd15ca5e44 | ||
|
|
2467d2f247 | ||
|
|
81be4b2f15 | ||
|
|
822deb6ee6 | ||
|
|
83042670bb | ||
|
|
8949fccef9 | ||
|
|
b32f33b69a | ||
|
|
9e9db7f831 | ||
|
|
10f5782aff | ||
|
|
81a35920fd | ||
|
|
85e21b3a30 | ||
|
|
eeac68872b | ||
|
|
496da3014d | ||
|
|
72f39bf20c | ||
|
|
4e6d9a8f7e | ||
|
|
0dcbdaafba | ||
|
|
efea116274 | ||
|
|
5ad6116c61 | ||
|
|
363fac131c | ||
|
|
01465313ff | ||
|
|
ab2c8f811a | ||
|
|
c12876f991 | ||
|
|
56e12ecc3a | ||
|
|
a09b38f3e4 | ||
|
|
f67940dd4b | ||
|
|
447af5923f | ||
|
|
f33eb9a9bd | ||
|
|
2102c5a5b6 | ||
|
|
4fa0ac5256 | ||
|
|
3caba25f6b | ||
|
|
ed98ea0a88 | ||
|
|
e228ec4078 | ||
|
|
284879b3fc | ||
|
|
5a5c90dd1c | ||
|
|
c0e2ed86c1 | ||
|
|
d44a2451e6 | ||
|
|
700a5c6ee0 | ||
|
|
64b949310f | ||
|
|
9a3320a64e | ||
|
|
3506d44c57 | ||
|
|
ebff918cc7 | ||
|
|
88ab075a6d | ||
|
|
684361a3d9 | ||
|
|
c3026d4a59 | ||
|
|
8d8d00ff00 | ||
|
|
e8332c76e9 | ||
|
|
30d429cc25 | ||
|
|
25c830b9d5 | ||
|
|
b6ea800f9b | ||
|
|
59b8489a0c | ||
|
|
3d880fa194 | ||
|
|
9b8e06e699 | ||
|
|
7ccbee4177 | ||
|
|
3e967d8f8d | ||
|
|
80d5f4b66d | ||
|
|
ed2bca8140 | ||
|
|
8af0bcb7fe | ||
|
|
28047d6a0f | ||
|
|
b3aacc5029 | ||
|
|
4156261cf3 | ||
|
|
9972f3d338 | ||
|
|
10e48f968d | ||
|
|
80b413a5b5 | ||
|
|
1c489c5ec5 | ||
|
|
9c0a331d78 | ||
|
|
8fbd614bf3 | ||
|
|
fbd1f6e3be | ||
|
|
7f58c7c7ad | ||
|
|
ddd6138b95 | ||
|
|
74f09797c9 | ||
|
|
ebb8d12592 | ||
|
|
01025ec99e | ||
|
|
f41a30cb5c | ||
|
|
7ffcd7343f | ||
|
|
5a3a2dc308 | ||
|
|
152b0d6143 | ||
|
|
d560ac115b | ||
|
|
157b8fa41b | ||
|
|
80d3fce897 | ||
|
|
20911d0ab6 | ||
|
|
575a9f82e2 | ||
|
|
d719297988 | ||
|
|
b62f8968fe | ||
|
|
291e3f0b9a | ||
|
|
6aeb6eaccb | ||
|
|
ad23559529 | ||
|
|
0fa038b4e0 | ||
|
|
d5d2e78faa | ||
|
|
47a8760b93 | ||
|
|
903c4c0c7f | ||
|
|
cec06a0b40 | ||
|
|
9c642ad1d2 | ||
|
|
7be853ba86 | ||
|
|
989c8e0201 | ||
|
|
8bb2411d34 | ||
|
|
5f629e503c | ||
|
|
973fdc81a1 | ||
|
|
6a310eb049 | ||
|
|
c2e8d5a017 | ||
|
|
7bd671250d | ||
|
|
bd3cd1709f | ||
|
|
6f6f1d3bea | ||
|
|
0733ebe2f2 | ||
|
|
9c3545d4fb | ||
|
|
ceccaf4577 | ||
|
|
5f949b5751 | ||
|
|
1ea36e2324 | ||
|
|
fcae0353d2 | ||
|
|
70f397b4a2 | ||
|
|
f49f25c60d | ||
|
|
d4c5fca16a | ||
|
|
07155682a1 | ||
|
|
8be3009d08 | ||
|
|
8cdc205b73 | ||
|
|
74be91da45 | ||
|
|
d540138a54 | ||
|
|
2e051041e3 | ||
|
|
55ec94e302 | ||
|
|
22544e7a7c | ||
|
|
08c6d03264 | ||
|
|
914bc61d4b | ||
|
|
12bf2c7d52 | ||
|
|
898b21ebf3 | ||
|
|
0ea3bcf8a8 | ||
|
|
d6538dc298 | ||
|
|
38c34d56b0 | ||
|
|
6f3e1a0593 | ||
|
|
8cc4cb76b5 | ||
|
|
89f1772d07 | ||
|
|
360754471c | ||
|
|
aca74a151c | ||
|
|
8bc04a0b28 | ||
|
|
1743a11163 | ||
|
|
0a735e76f6 | ||
|
|
5721eadb16 | ||
|
|
73016372e3 | ||
|
|
10d4078b95 | ||
|
|
685f6679fe | ||
|
|
1672690b20 | ||
|
|
1f784d2ce5 | ||
|
|
6da011c932 | ||
|
|
638632979d | ||
|
|
71637b6902 | ||
|
|
f6cc90e927 | ||
|
|
54412491e8 | ||
|
|
211c061e3e | ||
|
|
49aa62455c | ||
|
|
374a36e20e | ||
|
|
d37f7326ce | ||
|
|
e78edc79b7 | ||
|
|
1f5caa619e | ||
|
|
d08e6eb258 | ||
|
|
5221180d4e | ||
|
|
84e2bbbb3c | ||
|
|
ffd1ab1498 | ||
|
|
3390fc82dd | ||
|
|
8e0655095b | ||
|
|
03d65ced3e | ||
|
|
df3f6e087e | ||
|
|
15bdd03998 | ||
|
|
b2e9ddaa89 | ||
|
|
1a3e1b43e0 | ||
|
|
6573cbf346 | ||
|
|
124ddb9b47 | ||
|
|
1c502686ea | ||
|
|
4752833181 | ||
|
|
ae79d50df2 | ||
|
|
921375e418 | ||
|
|
37bddeb62b | ||
|
|
d8089b90e5 | ||
|
|
8159d98a99 | ||
|
|
8831f6fde2 | ||
|
|
cf5f4f736f | ||
|
|
3b337824c0 | ||
|
|
f65906c1bc | ||
|
|
d5cd2350a8 | ||
|
|
b9f111d166 | ||
|
|
25cc8761f1 | ||
|
|
075c55b713 | ||
|
|
28f46567e4 | ||
|
|
aa6143b6c3 | ||
|
|
c363db8ed0 | ||
|
|
228c21635b | ||
|
|
1e3c417915 | ||
|
|
6b6dde5a11 | ||
|
|
b74620c703 | ||
|
|
3236415bda | ||
|
|
b8e234fb52 | ||
|
|
67cc344382 | ||
|
|
cd25bf4b6e | ||
|
|
79b3216615 | ||
|
|
89a8feeaff | ||
|
|
fb2076c572 | ||
|
|
3276deb50c | ||
|
|
b2b4d40c73 | ||
|
|
25570f8d69 | ||
|
|
afd497eecc | ||
|
|
6dc21336ea | ||
|
|
676c5a2769 | ||
|
|
48255b9ff3 | ||
|
|
10b80ccca6 | ||
|
|
b86fae01ab | ||
|
|
e91b6584eb | ||
|
|
1c8d337aaa | ||
|
|
1f8baaf6f0 | ||
|
|
8e21ad5768 | ||
|
|
a08d48f9b1 | ||
|
|
9a271f468a | ||
|
|
227d6c722e | ||
|
|
c188598ddd | ||
|
|
a13f8a7da1 | ||
|
|
b5637a7e2e | ||
|
|
d0d065e65c | ||
|
|
62be90fc38 | ||
|
|
a60a81b964 | ||
|
|
fb9f7dee15 | ||
|
|
e4cc1a46cb | ||
|
|
2ee6f63c19 | ||
|
|
119c20297b | ||
|
|
f1487754e6 | ||
|
|
ccf7724f51 | ||
|
|
8b54dc6ea9 | ||
|
|
43349040a2 | ||
|
|
ae09b79839 | ||
|
|
8a2b4598e4 | ||
|
|
04d30a320f | ||
|
|
9c52f1e17a | ||
|
|
9500be57ff | ||
|
|
aeb1e1d09e | ||
|
|
0d408009f6 | ||
|
|
4fd78c5611 | ||
|
|
00c30b04f4 | ||
|
|
18582cee62 | ||
|
|
ffadb2c6a5 | ||
|
|
08a51f1378 | ||
|
|
895f5c3cd5 | ||
|
|
589854449e | ||
|
|
a2f9b747a4 | ||
|
|
d8037e4c8d | ||
|
|
442e4b0e54 | ||
|
|
6f1b52ab16 | ||
|
|
408baee12e | ||
|
|
b4f55953e0 | ||
|
|
bb1c4324e9 | ||
|
|
ebe7692e1d | ||
|
|
c6064021fd | ||
|
|
478bf4b32a | ||
|
|
9c6c879e23 | ||
|
|
5e99983092 | ||
|
|
a9eb740a31 | ||
|
|
3505949495 | ||
|
|
fb2cf39b23 | ||
|
|
b89fe033cb | ||
|
|
08757b8a99 | ||
|
|
b979c4ebe0 | ||
|
|
41e85e364f | ||
|
|
24043fa401 | ||
|
|
e539ff810a | ||
|
|
c14183f376 | ||
|
|
35b39b9d65 | ||
|
|
143e0d9e1c | ||
|
|
2ab9ff2658 | ||
|
|
7004635879 | ||
|
|
accba3a5e1 | ||
|
|
6ac22bda1f | ||
|
|
2f5dfb27c2 | ||
|
|
21f5431109 | ||
|
|
2c45db0933 | ||
|
|
fc3506df22 | ||
|
|
6b904d2507 | ||
|
|
c6f43f3599 | ||
|
|
38b305878c | ||
|
|
6fda647450 | ||
|
|
19e3f0756e | ||
|
|
b4b43de210 | ||
|
|
f4749d4e50 | ||
|
|
0844683a0e | ||
|
|
21cc7bf277 | ||
|
|
12b9a4edbb | ||
|
|
8fbd047f8c | ||
|
|
de965a866a | ||
|
|
966d2c0cd4 | ||
|
|
7e677a587b | ||
|
|
7eb98442e1 | ||
|
|
1e5b3e3ded | ||
|
|
79f7de8d0f | ||
|
|
76b8a9a6b7 | ||
|
|
2aa10d79aa | ||
|
|
ef3763175d | ||
|
|
5802f97caf | ||
|
|
1e258cff36 | ||
|
|
cd5df1082a | ||
|
|
9c35d5e4d1 | ||
|
|
cfefd5fc47 | ||
|
|
a483db078d | ||
|
|
a1878f7d14 | ||
|
|
29f70d33d7 | ||
|
|
2216719923 | ||
|
|
8536f548db | ||
|
|
51b47903db | ||
|
|
6ecb1dc545 | ||
|
|
1fc1536a31 | ||
|
|
147f804a82 | ||
|
|
e9b83f5d6f | ||
|
|
9014f4ced0 | ||
|
|
7788603b2e | ||
|
|
c53bbad396 | ||
|
|
f3b6368c39 | ||
|
|
2663894371 | ||
|
|
7dfe1cb86c | ||
|
|
330ba0e873 | ||
|
|
36d57e3669 | ||
|
|
a431f9851d | ||
|
|
6f32be5139 | ||
|
|
0f2dd1c15e | ||
|
|
badaff577b | ||
|
|
52ca21c92a | ||
|
|
2276a38632 | ||
|
|
3610a76e25 | ||
|
|
e0782017fe | ||
|
|
25c0370a8b | ||
|
|
eff152a7be | ||
|
|
5c58d27aac | ||
|
|
36eee7c8c8 | ||
|
|
58d9fd45ac | ||
|
|
ae110cd170 | ||
|
|
c6516ccaea | ||
|
|
6948846044 | ||
|
|
b6bee3c9e9 | ||
|
|
366a5c5175 | ||
|
|
c3b3276936 | ||
|
|
6fc24809d4 | ||
|
|
50b6647678 | ||
|
|
6ddab0cf3c | ||
|
|
5aa6dd0031 | ||
|
|
67b1f9248b | ||
|
|
7d367a5123 | ||
|
|
99bfc33cce | ||
|
|
9c23b8bad0 | ||
|
|
911d3e3ac6 | ||
|
|
047abf380a | ||
|
|
659c51746c | ||
|
|
99c7a955ec | ||
|
|
955d253fed | ||
|
|
b796471371 | ||
|
|
53024605e4 | ||
|
|
18c8f75901 | ||
|
|
1ee5aecfeb | ||
|
|
6b75da0827 | ||
|
|
f6008840a0 | ||
|
|
0c6def85cc | ||
|
|
1bd0a0be7d | ||
|
|
58a50b25eb | ||
|
|
c4c4e329f2 | ||
|
|
ac4a9defca | ||
|
|
f51faf2bbe | ||
|
|
da65cc4532 | ||
|
|
373b8ccd27 | ||
|
|
18e3872928 | ||
|
|
84603e4d94 | ||
|
|
31ec802d7e | ||
|
|
40c1bd4242 | ||
|
|
eb2c52c717 | ||
|
|
e48b871bdc | ||
|
|
03930364c8 | ||
|
|
a0b3f023db | ||
|
|
a43f699f88 | ||
|
|
7f75e401cc | ||
|
|
228b4f6d7f | ||
|
|
5f4a2405a7 | ||
|
|
b296b69382 | ||
|
|
04a9a14193 | ||
|
|
6b158b4089 | ||
|
|
d335016419 | ||
|
|
d981574a8a | ||
|
|
0107379c53 | ||
|
|
25c7724d6e | ||
|
|
3edec130c3 | ||
|
|
e4326b6cc5 | ||
|
|
f7c2d784ae | ||
|
|
447e7065d2 | ||
|
|
1dc8f7d026 | ||
|
|
09930417d3 | ||
|
|
de50ec6f3f | ||
|
|
47b747e08c | ||
|
|
b78fd98dc7 | ||
|
|
52dccdcb9e | ||
|
|
f0d08c04f1 | ||
|
|
398a74ffa0 | ||
|
|
66f06a99dc | ||
|
|
9108824515 | ||
|
|
2ec592f290 | ||
|
|
2271c9dfad | ||
|
|
da2de44d1a | ||
|
|
08e886940b | ||
|
|
80ceb641ad | ||
|
|
54f3f7f7ed | ||
|
|
2509329d59 | ||
|
|
ccd9f0ffaa | ||
|
|
2d1e211a10 | ||
|
|
ed711d4ca7 | ||
|
|
74cef1447a | ||
|
|
a1e20b1d0a | ||
|
|
25fe6a4c37 | ||
|
|
428409a29b | ||
|
|
5099c5a4d0 | ||
|
|
badee55a59 | ||
|
|
17a596280e | ||
|
|
489be4fd9b | ||
|
|
abfcb95722 | ||
|
|
fbcc3da64f | ||
|
|
7e51cd125d | ||
|
|
3800b44b13 | ||
|
|
cd118009c8 | ||
|
|
68bbfe24e7 | ||
|
|
6dbe18d702 | ||
|
|
cbfca3259c | ||
|
|
405f5a75cd | ||
|
|
6d8fa095b3 | ||
|
|
5a47de8e75 | ||
|
|
ef4102148a | ||
|
|
61493cd92e | ||
|
|
73ff23b7f7 | ||
|
|
a14e902e92 | ||
|
|
384650cb3e | ||
|
|
ae25fd53b6 | ||
|
|
9ef68c62d1 | ||
|
|
504f41de5d | ||
|
|
04c6a7ce10 | ||
|
|
e3c3c8527e | ||
|
|
6214b5d906 | ||
|
|
e81dadf112 | ||
|
|
b884fcc43d | ||
|
|
65713fce9a | ||
|
|
d35a91d60d | ||
|
|
edd2d4ce86 | ||
|
|
280b56b270 | ||
|
|
c1ee469435 | ||
|
|
913294e5db | ||
|
|
b11a680280 | ||
|
|
9d9d7877aa | ||
|
|
9d85b8e187 | ||
|
|
5d2e65169c | ||
|
|
d07131ac67 | ||
|
|
3be453e452 | ||
|
|
630647752a | ||
|
|
5aa8e80d0b | ||
|
|
6a7bd4b00c | ||
|
|
3504e5bcfa | ||
|
|
982db35447 | ||
|
|
9f4a2d95ee | ||
|
|
8450303190 | ||
|
|
664534610e | ||
|
|
22d6b39dc8 | ||
|
|
1c60d4521b | ||
|
|
2885a2198f | ||
|
|
9f27d2af4c | ||
|
|
6b186c1238 | ||
|
|
16c1be5ff6 | ||
|
|
3261af24cf | ||
|
|
9573fdd192 | ||
|
|
b9fda6fcd8 | ||
|
|
6490b69f57 | ||
|
|
ff827332a8 | ||
|
|
e284fe5f5a | ||
|
|
e892fb5b1d | ||
|
|
12a8d12863 | ||
|
|
e5fbf01489 | ||
|
|
1ec7522737 | ||
|
|
6db39dc542 | ||
|
|
741d368217 | ||
|
|
ce9faa4692 | ||
|
|
5bc134a53b | ||
|
|
cce753813e | ||
|
|
d78db85100 | ||
|
|
4c53f0adc3 | ||
|
|
402fcded14 | ||
|
|
4bd6fb3f68 | ||
|
|
48e5b771c7 | ||
|
|
4e28ce96d0 | ||
|
|
c99e9bbc0f | ||
|
|
de7d70ee06 | ||
|
|
74e492d286 | ||
|
|
eadc52ac6e | ||
|
|
c9fb0d52ee | ||
|
|
04865aa88a | ||
|
|
dd32d97101 | ||
|
|
20bfd9b2da | ||
|
|
79c6a61454 | ||
|
|
ff0c285578 | ||
|
|
2db20e0e30 | ||
|
|
fd4e1e725f | ||
|
|
923215d482 | ||
|
|
defa61a4fc | ||
|
|
65699480fc | ||
|
|
bc7a239b90 | ||
|
|
4f5a96bc8b | ||
|
|
790c4cdcec | ||
|
|
492ac282bf | ||
|
|
f349c3da24 | ||
|
|
d947b5d95a | ||
|
|
e4f5fdbb4d | ||
|
|
a44a57d7b6 | ||
|
|
919dca6024 | ||
|
|
21f7aaed74 | ||
|
|
db3fde2037 | ||
|
|
6a5d4204af | ||
|
|
c0dc8e53b5 | ||
|
|
ff93896a39 | ||
|
|
12ab6cc327 | ||
|
|
886fb99d53 | ||
|
|
b6622dce73 | ||
|
|
9724583022 | ||
|
|
60ea1205b7 | ||
|
|
56779e429b | ||
|
|
b3ebff94ab | ||
|
|
e6f6b2dfda | ||
|
|
7fd65168fe | ||
|
|
e622fcdc27 | ||
|
|
e52fc3fb2c | ||
|
|
eee7b367a1 | ||
|
|
3ba6a2dff8 | ||
|
|
dbe25e46f3 | ||
|
|
3234f913bb | ||
|
|
75f8f79764 | ||
|
|
6c6a957121 | ||
|
|
82446583c4 | ||
|
|
ba9f0c030f | ||
|
|
f001b9eb53 | ||
|
|
4a848cf3e5 | ||
|
|
4c3a0cd840 | ||
|
|
b1457fe814 | ||
|
|
a39622326e | ||
|
|
b03ad3ae09 | ||
|
|
7a13d26b0c | ||
|
|
1bbbba58c1 | ||
|
|
38a6055c37 | ||
|
|
9047207b09 | ||
|
|
e409ee94ae | ||
|
|
a13f3bdad8 | ||
|
|
d8dce91141 | ||
|
|
ebeff89a89 | ||
|
|
d52b3a7eb7 | ||
|
|
47403da7be | ||
|
|
771200f58c | ||
|
|
8ab8ef182e | ||
|
|
c0283983eb | ||
|
|
b5bee4c17e | ||
|
|
5e05a0d592 | ||
|
|
1c29d4299b | ||
|
|
b9eb5785cc | ||
|
|
558e1362a9 | ||
|
|
79a36f32ee | ||
|
|
12901d0e5b | ||
|
|
360d512854 | ||
|
|
f28b488994 | ||
|
|
ffc9ae1245 | ||
|
|
5f51412783 | ||
|
|
8bc65af302 | ||
|
|
c04c841a70 | ||
|
|
b9299f283f | ||
|
|
0d882ec317 | ||
|
|
5e84600efc | ||
|
|
9a307c8287 | ||
|
|
63cf10e500 | ||
|
|
386367a03f | ||
|
|
d87e57ac8a | ||
|
|
9ec1d58234 | ||
|
|
a15896d20e | ||
|
|
c39971d4f1 | ||
|
|
52f39f95df | ||
|
|
0a84e90eea | ||
|
|
3b10a3f9b8 | ||
|
|
ac3b6a6442 | ||
|
|
0bae010a3b | ||
|
|
913a550c76 | ||
|
|
370f0c73b3 | ||
|
|
c791cfaf95 | ||
|
|
5ada196961 | ||
|
|
302540691b | ||
|
|
25f18c20d9 | ||
|
|
3874f44d1c | ||
|
|
811c047ec1 | ||
|
|
45435c5485 | ||
|
|
b0d292378a | ||
|
|
1ad2cb3303 | ||
|
|
2b51b9ab1a | ||
|
|
ddd9274a10 | ||
|
|
0c39548e00 | ||
|
|
9f5d367ff9 | ||
|
|
fac11519c4 | ||
|
|
e36810fd84 | ||
|
|
3a11096dee | ||
|
|
8081077ff5 | ||
|
|
f6d90bb347 | ||
|
|
be8df60f79 | ||
|
|
a04e185cd1 |
@@ -1,6 +1,7 @@
|
||||
^build/
|
||||
^dist/
|
||||
/nbproject/private/
|
||||
nbproject/private/
|
||||
^webrev
|
||||
^.hgtip
|
||||
^.bridge2
|
||||
.DS_Store
|
||||
|
||||
12
.hgtags
12
.hgtags
@@ -172,3 +172,15 @@ b820143a6f1ce993c6e6f31db4d64de990f42654 jdk8-b47
|
||||
086271e35b0a419b38e8bda9bebd70693811df0a jdk8-b48
|
||||
cecd7026f30cbd83b0601925a7a5e059aec98138 jdk8-b49
|
||||
38fe5ab028908cf64dd73a43336ba3211577bfc3 jdk8-b50
|
||||
382651d28f2502d371eca751962232c0e535e57a jdk8-b51
|
||||
b67041a6cb508da18d2f5c7687e6a31e08bea4fc jdk8-b52
|
||||
c7aa5cca1c01689a7b1a92411daf83684af05a33 jdk8-b53
|
||||
7c6aa31ff1b2ae48c1c686ebe1aadf0c3da5be15 jdk8-b54
|
||||
319f583f66db47395fa86127dd3ddb729eb7c64f jdk8-b55
|
||||
ffe6bce5a521be40146af2ac03c509b7bac30595 jdk8-b56
|
||||
2c21c080b11b93efb3851e39e1363e45da805943 jdk8-b57
|
||||
479d3302a26d7607ba271d66973e59ebf58825b6 jdk8-b58
|
||||
3bd874584fc01aae92fbc8827e2bd04d8b6ace04 jdk8-b59
|
||||
5e3adc681779037a2d33b7be6f75680619085492 jdk8-b60
|
||||
cdaa6122185f9bf512dcd6600f56bfccc4824e8c jdk8-b61
|
||||
8d9d430b4244b95f5cf1ebe719f834a1ac5d6cd5 jdk8-b62
|
||||
|
||||
@@ -172,3 +172,15 @@ e4f81a817447c3a4f6868f083c81c2fb1b15d44c jdk8-b44
|
||||
3f6c72d1c2a6e5c9e7d81c3dc984886678a128ad jdk8-b48
|
||||
c97b99424815c43818e3cc3ffcdd1a60f3198b52 jdk8-b49
|
||||
2fd67618b9a3c847780ed7b9d228e862b6e2824c jdk8-b50
|
||||
57c0aee7309050b9d6cfcbd202dc704e9260b377 jdk8-b51
|
||||
8d24def5ceb3b8f2e857f2e18b2804fc59eecf8d jdk8-b52
|
||||
febd7ff5280067ca482faaeb9418ae88764c1a35 jdk8-b53
|
||||
c1a277c6022affbc6855bdfb039511e73fbe2395 jdk8-b54
|
||||
b85b44cced2406792cfb9baab1377ff03e7001d8 jdk8-b55
|
||||
76844579fa4b30929731115b237e477181a82394 jdk8-b56
|
||||
522dfac8ca4d07c0b74025d4ac3b6e5feefbb829 jdk8-b57
|
||||
9367024804874faf8e958adeb333682bab1c0c47 jdk8-b58
|
||||
dae9821589ccd2611bdf7084269b98e819091770 jdk8-b59
|
||||
e07f499b9dccb529ecf74172cf6ac11a195ec57a jdk8-b60
|
||||
20ff117b509075c3aec4ee3a57990ecd5db5df9c jdk8-b61
|
||||
8a3fe0ae06a8cc21347da5a18384b0aa6c2349f5 jdk8-b62
|
||||
|
||||
14
Makefile
14
Makefile
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,6 +23,16 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# If NEWBUILD is defined, use the new build-infra Makefiles and configure.
|
||||
# See NewMakefile.gmk for more information.
|
||||
|
||||
ifeq ($(NEWBUILD),true)
|
||||
|
||||
# The new top level Makefile
|
||||
include NewMakefile.gmk
|
||||
|
||||
else # Original Makefile logic
|
||||
|
||||
BUILD_PARENT_DIRECTORY=.
|
||||
|
||||
# Basename of any originally supplied ALT_OUTPUTDIR directory
|
||||
@@ -557,3 +567,5 @@ include ./make/jprt.gmk
|
||||
# Force target
|
||||
FRC:
|
||||
|
||||
endif # Original Makefile logic
|
||||
|
||||
|
||||
295
NewMakefile.gmk
Normal file
295
NewMakefile.gmk
Normal file
@@ -0,0 +1,295 @@
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Utilities used in this Makefile
|
||||
BASENAME=basename
|
||||
CAT=cat
|
||||
CD=cd
|
||||
CMP=cmp
|
||||
CP=cp
|
||||
ECHO=echo
|
||||
MKDIR=mkdir
|
||||
PRINTF=printf
|
||||
PWD=pwd
|
||||
TAR=tar
|
||||
ifeq ($(PLATFORM),windows)
|
||||
ZIP=zip
|
||||
else
|
||||
# store symbolic links as the link
|
||||
ZIP=zip -y
|
||||
endif
|
||||
# Insure we have a path that looks like it came from pwd
|
||||
# (This is mostly for Windows sake and drive letters)
|
||||
define UnixPath # path
|
||||
$(shell (cd "$1" && $(PWD)))
|
||||
endef
|
||||
|
||||
# Current root directory
|
||||
CURRENT_DIRECTORY := $(shell $(PWD))
|
||||
|
||||
# Build directory root
|
||||
BUILD_DIR_ROOT = $(CURRENT_DIRECTORY)/build
|
||||
|
||||
# All configured Makefiles to run
|
||||
ALL_MAKEFILES = $(wildcard $(BUILD_DIR_ROOT)/*-*/Makefile)
|
||||
|
||||
# All bundles to create
|
||||
ALL_IMAGE_DIRS = $(wildcard $(BUILD_DIR_ROOT)/*-*/images/*-image)
|
||||
|
||||
# Build all the standard 'all', 'images', and 'clean' targets
|
||||
all images clean: checks
|
||||
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No configurations to build"; exit 1; \
|
||||
fi
|
||||
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
|
||||
$(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
|
||||
$(CD) $${bdir} && $(MAKE) $@ ; \
|
||||
done
|
||||
|
||||
# TBD: Deploy input
|
||||
$(BUILD_DIR_ROOT)/.deploy_input:
|
||||
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No configurations to build"; exit 1; \
|
||||
fi
|
||||
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
|
||||
if [ deploy/make/Makefile ] ; then \
|
||||
echo "Attempting deploy build." ; \
|
||||
( \
|
||||
$(RM) -r $${bdir}/deploy_input ; \
|
||||
$(MKDIR) -p $${bdir}/deploy_input ; \
|
||||
( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
|
||||
| ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
|
||||
) ; \
|
||||
fi; \
|
||||
done
|
||||
touch $@
|
||||
|
||||
# TBD: Deploy images
|
||||
deploy: $(BUILD_DIR_ROOT)/.deploy_input
|
||||
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No configurations to build"; exit 1; \
|
||||
fi
|
||||
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
|
||||
if [ deploy/make/Makefile ] ; then \
|
||||
echo "Attempting deploy build." ; \
|
||||
( \
|
||||
$(CD) deploy/make && \
|
||||
$(MAKE) \
|
||||
ABS_OUTPUTDIR=$${bdir}/deploy_input \
|
||||
OUTPUTDIR=$${bdir}/deploy_input \
|
||||
) ; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# TBD: Install bundles
|
||||
install:
|
||||
|
||||
# Bundle creation
|
||||
bundles:
|
||||
@if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \
|
||||
$(ECHO) "ERROR: No images to bundle"; exit 1; \
|
||||
fi
|
||||
@for i in $(ALL_IMAGE_DIRS) ; do \
|
||||
$(MKDIR) -p $${i}/../../bundles && \
|
||||
$(RM) $${i}/../../bundles/`$(BASENAME) $${i}`.zip && \
|
||||
$(ECHO) "$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip ." && \
|
||||
$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip . ; \
|
||||
done
|
||||
|
||||
# Clobber all the built files
|
||||
clobber::
|
||||
$(RM) -r $(BUILD_DIR_ROOT)
|
||||
|
||||
# Make various checks to insure the build will be successful
|
||||
# Possibilities:
|
||||
# * Check that if any closed repo is provided, they all must be.
|
||||
# * Check that all open repos exist, at least until we are ready for some
|
||||
# kind of partial build.
|
||||
checks:
|
||||
@$(ECHO) "No checks yet"
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += all deploy install images clean clobber checks
|
||||
|
||||
###########################################################################
|
||||
# To help in adoption of the new configure&&make build process, a bridge
|
||||
# build will use the old settings to run configure and do the build.
|
||||
|
||||
# Build with the configure bridge
|
||||
bridgeBuild: bridge2configure images
|
||||
|
||||
# Bridge from old Makefile ALT settings to configure options
|
||||
bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
|
||||
bash ./configure $(strip $(shell $(CAT) $<))
|
||||
|
||||
# Create a file with configure options created from old Makefile mechanisms.
|
||||
$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
# Use this file to only change when obvious things have changed
|
||||
$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
|
||||
$(RM) $@.tmp
|
||||
$(MKDIR) -p $(BUILD_DIR_ROOT)
|
||||
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
|
||||
ifdef ARCH_DATA_MODEL
|
||||
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_PARALLEL_COMPILE_JOBS
|
||||
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_BOOTDIR
|
||||
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_CUPS_HEADERS_PATH
|
||||
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
|
||||
endif
|
||||
ifdef ALT_FREETYPE_HEADERS_PATH
|
||||
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
|
||||
endif
|
||||
@if [ -f $@ ] ; then \
|
||||
if ! $(CMP) $@ $@.tmp > /dev/null ; then \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi ; \
|
||||
else \
|
||||
$(CP) $@.tmp $@ ; \
|
||||
fi
|
||||
$(RM) $@.tmp
|
||||
|
||||
# Clobber all the built files
|
||||
clobber:: bridge2clobber
|
||||
bridge2clobber::
|
||||
$(RM) $(BUILD_DIR_ROOT)/.bridge2*
|
||||
$(RM) $(BUILD_DIR_ROOT)/.deploy_input
|
||||
|
||||
# Keep track of phony targets
|
||||
PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
|
||||
|
||||
###########################################################################
|
||||
# Sanity checks (history target)
|
||||
#
|
||||
|
||||
sanity: checks
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += sanity
|
||||
|
||||
###########################################################################
|
||||
# Javadocs
|
||||
#
|
||||
|
||||
javadocs:
|
||||
cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += javadocs
|
||||
|
||||
###########################################################################
|
||||
# JPRT targets
|
||||
|
||||
ifndef JPRT_ARCHIVE_BUNDLE
|
||||
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
|
||||
endif
|
||||
|
||||
jprt_build_product: DEBUG_LEVEL=release
|
||||
jprt_build_product: BUILD_DIRNAME=*-release
|
||||
jprt_build_product: jprt_build_generic
|
||||
|
||||
jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
|
||||
jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
|
||||
jprt_build_fastdebug: jprt_build_generic
|
||||
|
||||
jprt_build_debug: DEBUG_LEVEL=slowdebug
|
||||
jprt_build_debug: BUILD_DIRNAME=*-debug
|
||||
jprt_build_debug: jprt_build_generic
|
||||
|
||||
jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
|
||||
|
||||
$(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $(BUILD_DIR_ROOT)/$(BUILD_DIRNAME)/bundles/j2sdk-image.zip $@
|
||||
|
||||
# Keep track of phony targets
|
||||
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
|
||||
jprt_build_generic
|
||||
|
||||
###########################################################################
|
||||
# Help target
|
||||
|
||||
HELP_FORMAT=%12s%s\n
|
||||
|
||||
help:
|
||||
@$(PRINTF) "# JDK Makefile\n"
|
||||
@$(PRINTF) "#\n"
|
||||
@$(PRINTF) "# Usage: make [Target]\n"
|
||||
@$(PRINTF) "#\n"
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "Target " "Description"
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "------ " "-----------"
|
||||
@for i in $(USER_TARGETS) ; do \
|
||||
$(MAKE) help_$${i} ; \
|
||||
done
|
||||
@$(PRINTF) "#\n"
|
||||
|
||||
help_all:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Build the entire jdk but not the images"
|
||||
help_images:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Create the jdk images for the builds"
|
||||
help_deploy:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Create the jdk deploy images from the jdk images"
|
||||
help_install:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Create the jdk install bundles from the deploy images"
|
||||
help_clean:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Clean and prepare for a fresh build from scratch"
|
||||
help_clobber:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Clean and also purge any hidden derived data"
|
||||
help_checks:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Perform various checks to make sure we can build"
|
||||
help_sanity:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Same as 'make checks'"
|
||||
help_javadocs:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Build the javadocs"
|
||||
help_help:
|
||||
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
|
||||
"Print out the help messages"
|
||||
|
||||
# Keep track of user targets
|
||||
USER_TARGETS += help
|
||||
|
||||
###########################################################################
|
||||
# Phony targets
|
||||
.PHONY: $(PHONY_LIST) $(USER_TARGETS)
|
||||
|
||||
# Force target
|
||||
FRC:
|
||||
@@ -96,7 +96,8 @@
|
||||
</li>
|
||||
<li>Windows only:
|
||||
<ul>
|
||||
<li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li>
|
||||
<li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>) <strong>or</strong></li>
|
||||
<li>Minimalist GNU for Windows (<a href="#msys">MinGW/MSYS</a>)</li>
|
||||
<li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -687,31 +688,20 @@
|
||||
</li>
|
||||
<li>
|
||||
<strong>Windows:</strong>
|
||||
Make sure you start your build inside a bash/sh/ksh shell
|
||||
and are using a <tt>make.exe</tt> utility built for that
|
||||
environment (a cygwin <tt>make.exe</tt> is not the same
|
||||
as a <tt>make.exe</tt> built for something like
|
||||
<a href="http://www.mkssoftware.com/">MKS</a>).
|
||||
<br>
|
||||
<b>WARNING:</b> Watch out on some make 3.81 versions, it may
|
||||
not work due to a lack of support for MS-DOS drive letter paths
|
||||
like <tt>C:/</tt> or <tt>C:\</tt>.
|
||||
<br>
|
||||
You may be able to use the information at the
|
||||
<a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank">
|
||||
mozilla developer center</a>
|
||||
on this topic.
|
||||
<br>
|
||||
It's hoped that when make 3.82 starts shipping in a future cygwin
|
||||
release that this MS-DOS path issue will be fixed.
|
||||
<br>
|
||||
It may be possible to download the version at
|
||||
<a href="http://www.cmake.org/files/cygwin/make.exe">
|
||||
www.cmake.org make.exe</a>.
|
||||
<br>
|
||||
It might be necessary for you to build your own GNU make 3.81,
|
||||
see the <a href="#buildgmake">"Building GNU make"</a> section
|
||||
in that case.
|
||||
Make sure you start your build inside a bash/sh/ksh shell and are
|
||||
using a <tt>make.exe</tt> utility built for that environment.<br/>
|
||||
<strong>MKS</strong> builds need a native Windows version of GNU make
|
||||
(see <a href="#buildgmake">Building GNU make</a>).<br/>
|
||||
<strong>Cygwin</strong> builds need
|
||||
a make version which was specially compiled for the Cygwin environment
|
||||
(see <a href="#buildgmake">Building GNU make</a>). <strong>WARNING:</strong>
|
||||
the OpenJDK build with the make utility provided by Cygwin will <strong>not</strong>
|
||||
work because it does not support drive letters in paths. Make sure that
|
||||
your version of make will be found before the Cygwins default make by
|
||||
setting an appropriate <tt>PATH</tt> environment variable or by removing
|
||||
Cygwin's make after you built your own make version.<br/>
|
||||
<strong>MinGW/MSYS</strong> builds can use the default make which
|
||||
comes with the environment.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
@@ -727,7 +717,7 @@
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="buildgmake">Building GNU make</a></h4>
|
||||
<blockquote>
|
||||
First step is to get the GNU make 3.81 source from
|
||||
First step is to get the GNU make 3.81 (or newer) source from
|
||||
<a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
|
||||
ftp.gnu.org/pub/gnu/make/</a>.
|
||||
Building is a little different depending on the OS and unix toolset
|
||||
@@ -742,12 +732,24 @@
|
||||
<tt>./configure && gmake CC=gcc</tt>
|
||||
</li>
|
||||
<li>
|
||||
<strong>Windows for CYGWIN:</strong>
|
||||
<tt>./configure && make</tt>
|
||||
<strong>Windows for CYGWIN:</strong><br/>
|
||||
<tt>./configure</tt><br/>
|
||||
Add the line <tt>#define HAVE_CYGWIN_SHELL 1</tt> to the end of <tt>config.h</tt><br/>
|
||||
<tt>make</tt><br/>
|
||||
<br/>
|
||||
This should produce <tt>make.exe</tt> in the current directory.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Windows for MKS: (CYGWIN is recommended)</strong>
|
||||
<tt>./configure && make -f Makefile.win32</tt>
|
||||
<strong>Windows for MKS:</strong><br/>
|
||||
Edit <tt>config.h.W32</tt> and uncomment the line <tt>#define HAVE_MKS_SHELL 1</tt><br/>
|
||||
Set the environment for your native compiler (e.g. by calling:<br/>
|
||||
<tt>"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /xp /x64)</tt>
|
||||
<tt>nmake -f NMakefile.win32</tt>
|
||||
<br/>
|
||||
This should produce <tt>WinDebug/make.exe</tt> and <tt>WinRel/make.exe</tt>
|
||||
<br/>
|
||||
If you get the error: <tt>NMAKE : fatal error U1045: spawn failed : Permission denied</tt>
|
||||
you have to set the <tt>Read & execute</tt> permission for the file <tt>subproc.bat</tt>.
|
||||
</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
@@ -894,39 +896,135 @@
|
||||
<h4><a name="paths">Windows Paths</a></h4>
|
||||
<blockquote>
|
||||
<strong>Windows:</strong>
|
||||
Note that GNU make is a historic utility and is based very
|
||||
heavily on shell scripting, so it does not tolerate the Windows habit
|
||||
Note that GNU make, the shell and other Unix-tools required during the build
|
||||
do not tolerate the Windows habit
|
||||
of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
|
||||
Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and
|
||||
there is always a 'short' pathname without spaces for any path that
|
||||
contains spaces.
|
||||
Unfortunately, this short pathname can be somewhat dynamic and the
|
||||
formula is difficult to explain.
|
||||
You can use <tt>cygpath</tt> utility to map pathnames with spaces
|
||||
or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname
|
||||
(called 'mixed'), e.g.
|
||||
<tt>cygpath -s -m "<i>path</i>"</tt>.
|
||||
Luckily on most Windows systems, you can use <tt>/</tt>instead of <tt>\</tt>, and
|
||||
there is always a short <a href="http://en.wikipedia.org/wiki/8.3_filename">
|
||||
"8.3" pathname</a> without spaces for any path that contains spaces.
|
||||
Unfortunately, this short pathname is somewhat dynamic (i.e. dependant on the
|
||||
other files and directories inside a given directory) and can not be
|
||||
algorithmicly calculated by only looking at a specific path name.
|
||||
<p>
|
||||
The makefiles will try to translate any pathnames supplied
|
||||
to it into the <tt>C:/</tt> style automatically.
|
||||
</p>
|
||||
<p>
|
||||
Note that use of CYGWIN creates a unique problem with regards to
|
||||
Special care has to be taken if native Windows applications
|
||||
like <tt>nmake</tt> or <tt>cl</tt> are called with file arguments processed
|
||||
by Unix-tools like <tt>make</tt> or <tt>sh</tt>!
|
||||
</p>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="paths">Windows build environments</a></h4>
|
||||
<blockquote>
|
||||
Building on Windows requires a Unix-like environment, notably a Unix-like shell.
|
||||
There are several such environments available of which
|
||||
<a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a>,
|
||||
<a href="http://www.cygwin.com/">Cygwin</a> and
|
||||
<a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are currently supported for
|
||||
the OpenJDK build. One of the differences of these three systems is the way
|
||||
they handle Windows path names, particularly path names which contain
|
||||
spaces, backslashes as path separators and possibly drive letters. Depending
|
||||
on the use case and the specifics of each environment these path problems can
|
||||
be solved by a combination of quoting whole paths, translating backslashes to
|
||||
forward slashes, escaping backslashes with additional backslashes and
|
||||
translating the path names to their <a href="http://en.wikipedia.org/wiki/8.3_filename">
|
||||
"8.3" version</a>.
|
||||
<p>
|
||||
As of this writing (MKS ver. 9.4, Cygwin ver. 1.7.9, MinGW/MSYS 1.0.17),
|
||||
MKS builds are known to be the fastest Windows builds while MingGW/MSYS
|
||||
builds are slightly slower (about 10%) than MKS builds and Cygwin builds
|
||||
require nearly twice the time (about 180%) of MKS builds (e.g. on a
|
||||
DualCore i7 notebook with 8GB of RAM, HDD and 64-bit Windows 7 operating system
|
||||
the complete OpenJDK 8 product build takes about 49min with MKS, 54min with
|
||||
MinGW/MSYS and 88min with Cygwin).
|
||||
</p>
|
||||
<p>
|
||||
Mixing tools from the different Unix emulation environments is not a good
|
||||
idea and will probably not work!
|
||||
</p>
|
||||
<p>
|
||||
<strong>MKS:</strong> is a commercial product which includes
|
||||
all the Unix utilities which are required to build the OpenJDK except GNU
|
||||
make. In pre-OpenJDK times it was the only supported build environment on
|
||||
Windows. The MKS tools support Windows paths with drive letters and
|
||||
forward slashes as path separator. Paths in environment variables like (for
|
||||
example) <tt>PATH</tt> are separated by semicolon '<tt>;</tt>'.
|
||||
</p>
|
||||
<p>
|
||||
Recent versions of MKS provide the <tt>dosname</tt> utility to convert paths
|
||||
with spaces to short (8.3) path names,e .g.
|
||||
<tt>dosname -s "<i>path</i>"</tt>.
|
||||
</p>
|
||||
<p>
|
||||
If you are using the MKS environment, you need a native Windows version
|
||||
of Gnu make <a href="#buildgmake">which you can easily build yourself</a>.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Cygwin:</strong>
|
||||
is an open source, Linux-like environment which tries to emulate
|
||||
a complete POSIX layer on Windows. It tries to be smart about path names
|
||||
and can usually handle all kinds of paths if they are correctly quoted
|
||||
or escaped although internally it maps drive letters <tt><drive>:</tt>
|
||||
to a virtual directory <tt>/cygdrive/<drive></tt>.
|
||||
</p>
|
||||
<p>
|
||||
You can always use the <tt>cygpath</tt> utility to map pathnames with spaces
|
||||
or the backslash character into the <tt>C:/</tt> style of pathname
|
||||
(called 'mixed'), e.g. <tt>cygpath -s -m "<i>path</i>"</tt>.
|
||||
</p>
|
||||
<p>
|
||||
Note that the use of CYGWIN creates a unique problem with regards to
|
||||
setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
|
||||
the <tt>PATH</tt> variable contains directories
|
||||
separated with the ";" character (Solaris and Linux uses ":").
|
||||
separated with the ";" character (Solaris and Linux use ":").
|
||||
With CYGWIN, it uses ":", but that means that paths like "C:/path"
|
||||
cannot be placed in the CYGWIN version of <tt>PATH</tt> and
|
||||
instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
|
||||
which CYGWIN understands, but only CYGWIN understands.
|
||||
So be careful with paths on Windows.
|
||||
</p>
|
||||
<p>
|
||||
If you are using the Cygwin environment, you need to
|
||||
<a href="#buildgmake">compile your own version</a>
|
||||
of GNU make because the default Cygwin make can not handle drive letters in paths.
|
||||
</p>
|
||||
<p>
|
||||
<strong>MinGW/MSYS:</strong>
|
||||
MinGW ("Minimalist GNU for Windows") is a collection of free Windows
|
||||
specific header files and import libraries combined with GNU toolsets that
|
||||
allow one to produce native Windows programs that do not rely on any
|
||||
3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building
|
||||
applications and programs which rely on traditional UNIX tools to
|
||||
be present. Among others this includes tools like <tt>bash</tt> and <tt>make</tt>.
|
||||
</p>
|
||||
<p>
|
||||
Like Cygwin, MinGW/MSYS can handle different types of path formats. They
|
||||
are internally converted to paths with forward slashes and drive letters
|
||||
<tt><drive>:</tt> replaced by a virtual
|
||||
directory <tt>/<drive></tt>. Additionally, MSYS automatically
|
||||
detects binaries compiled for the MSYS environment and feeds them with the
|
||||
internal, Unix-style path names. If native Windows applications are called
|
||||
from within MSYS programs their path arguments are automatically converted
|
||||
back to Windows style path names with drive letters and backslashes as
|
||||
path separators. This may cause problems for Windows applications which
|
||||
use forward slashes as parameter separator (e.g. <tt>cl /nologo /I</tt>)
|
||||
because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion">
|
||||
replace such parameters by drive letters</a>.
|
||||
</p>
|
||||
<p>
|
||||
If you are using the MinGW/MSYS system you can use the default make
|
||||
version supplied by the environment.
|
||||
</p>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="windows_checklist">Basic Windows Check List</a></h4>
|
||||
<blockquote>
|
||||
<ol>
|
||||
<li>
|
||||
Install the
|
||||
<a href="#cygwin">CYGWIN product</a>.
|
||||
Install one of the
|
||||
<a href="#cygwin">CYGWIN</a>, <a href="#msys">MinGW/MSYS</a> or
|
||||
<a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a> environments.
|
||||
</li>
|
||||
<li>
|
||||
Install the
|
||||
@@ -1286,7 +1384,8 @@
|
||||
The XRender header file is included with the other X11 header files
|
||||
in the package <strong>SFWxwinc</strong> on new enough versions of
|
||||
Solaris and will be installed in
|
||||
<tt>/usr/X11/include/X11/extensions/Xrender.h</tt>
|
||||
<tt>/usr/X11/include/X11/extensions/Xrender.h</tt> or
|
||||
<tt>/usr/openwin/share/include/X11/extensions/Xrender.h</tt>
|
||||
</p><p>
|
||||
<strong>Linux:</strong>
|
||||
XRender header files are required for building the
|
||||
@@ -1456,7 +1555,9 @@
|
||||
<td>Devel</td>
|
||||
<td>make</td>
|
||||
<td>The GNU version of the 'make' utility built for CYGWIN.<br>
|
||||
<b>NOTE</b>: See <a href="#gmake">the GNU make section</a></td>
|
||||
<b>NOTE</b>: the Cygwin make can not be used to build the
|
||||
OpenJDK. You only need it to build your own version of make
|
||||
(see <a href="#gmake">the GNU make section</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>m4.exe</td>
|
||||
@@ -1521,6 +1622,21 @@
|
||||
So it's important that the Visual Studio paths in PATH preceed
|
||||
the CYGWIN path <tt>/usr/bin</tt>.
|
||||
</blockquote>
|
||||
<strong> Minimalist GNU for Windows (<a name="msys">MinGW/MSYS</a>)</strong>
|
||||
<blockquote>
|
||||
Alternatively, the set of unix command tools for the OpenJDK build on
|
||||
Windows can be supplied by
|
||||
<a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a>.
|
||||
<p>
|
||||
In addition to the tools which will be installed by default, you have
|
||||
to manually install the <tt>msys-zip</tt> and <tt>msys-unzip</tt> packages.
|
||||
This can be easily done with the MinGW command line installer:<br/>
|
||||
<tt><br/>
|
||||
mingw-get.exe install msys-zip<br/>
|
||||
mingw-get.exe install msys-unzip<br/>
|
||||
</tt>
|
||||
</p>
|
||||
</blockquote>
|
||||
<strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong>
|
||||
<blockquote>
|
||||
Microsoft DirectX 9.0 SDK (Summer 2004)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Generated Makefile @DATE_WHEN_CONFIGURED@
|
||||
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
|
||||
# GENERATED FILE, DO NOT EDIT
|
||||
SPEC:=@OUTPUT_ROOT@/spec.gmk
|
||||
include @SRC_ROOT@/common/makefiles/Makefile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
@@ -23,18 +23,41 @@
|
||||
#
|
||||
|
||||
script_dir=`dirname $0`
|
||||
closed_script_dir="$script_dir/../../jdk/make/closed/autoconf"
|
||||
|
||||
# Create a timestamp as seconds since epoch
|
||||
TIMESTAMP=`date +%s`
|
||||
if test "x`uname -s`" = "xSunOS"; then
|
||||
# date +%s is not available on Solaris, use this workaround
|
||||
# from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
|
||||
TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 | nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
|
||||
else
|
||||
TIMESTAMP=`date +%s`
|
||||
fi
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" = "x"; then
|
||||
custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
|
||||
else
|
||||
custom_script_dir=$CUSTOM_CONFIG_DIR
|
||||
fi
|
||||
|
||||
custom_hook=$custom_script_dir/custom-hook.m4
|
||||
|
||||
if test "x`which autoconf 2> /dev/null`" = x; then
|
||||
echo You need autoconf installed to be able to regenerate the configure script
|
||||
echo Error: Cannot find autoconf 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Generating generated-configure.sh
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
|
||||
rm -rf autom4te.cache
|
||||
|
||||
if test -e $closed_script_dir/closed-hook.m4; then
|
||||
# We have closed sources available; also generate configure script
|
||||
# with closed hooks compiled in.
|
||||
if test -e $custom_hook; then
|
||||
echo Generating custom generated-configure.sh
|
||||
# We have custom sources available; also generate configure script
|
||||
# with custom hooks compiled in.
|
||||
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
|
||||
sed -e "s|AC_DEFUN_ONCE(\[CLOSED_HOOK\])|m4_include([$closed_script_dir/closed-hook.m4])|" | autoconf -W all -I$script_dir - > $closed_script_dir/generated-configure.sh
|
||||
sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
|
||||
rm -rf autom4te.cache
|
||||
else
|
||||
echo No custom hook found: $custom_hook
|
||||
fi
|
||||
|
||||
@@ -34,80 +34,102 @@ AC_DEFUN([ADD_JVM_ARG_IF_OK],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([WHICHCMD],
|
||||
# This will make sure the given variable points to a full and proper
|
||||
# path. This means:
|
||||
# 1) There will be no spaces in the path. On posix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# $1: The name of the variable to fix
|
||||
AC_DEFUN([BASIC_FIXUP_PATH],
|
||||
[
|
||||
# Translate "gcc -E" into "`which gcc` -E" ie
|
||||
# extract the full path to the binary and at the
|
||||
# same time maintain any arguments passed to it.
|
||||
# The command MUST exist in the path, or else!
|
||||
tmp="[$]$1"
|
||||
car="${tmp%% *}"
|
||||
tmp="[$]$1 EOL"
|
||||
cdr="${tmp#* }"
|
||||
# On windows we want paths without spaces.
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
WHICHCMD_SPACESAFE(car)
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
BASIC_FIXUP_PATH_CYGWIN($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
BASIC_FIXUP_PATH_MSYS($1)
|
||||
else
|
||||
# "which" is not portable, but is used here
|
||||
# because we know that the command exists!
|
||||
car=`which $car`
|
||||
fi
|
||||
if test "x$cdr" != xEOL; then
|
||||
$1="$car ${cdr% *}"
|
||||
else
|
||||
$1="$car"
|
||||
fi
|
||||
])
|
||||
# We're on a posix platform. Hooray! :)
|
||||
path="[$]$1"
|
||||
|
||||
AC_DEFUN([SPACESAFE],
|
||||
[
|
||||
# Fail with message $2 if var $1 contains a path with no spaces in it.
|
||||
# Unless on Windows, where we can rewrite the path.
|
||||
HAS_SPACE=`echo "[$]$1" | grep " "`
|
||||
if test "x$HAS_SPACE" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
$1=`$CYGPATH -s -m -a "[$]$1"`
|
||||
$1=`$CYGPATH -u "[$]$1"`
|
||||
else
|
||||
AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
|
||||
if test ! -f "$path" && test ! -d "$path"; then
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
|
||||
fi
|
||||
|
||||
has_space=`$ECHO "$path" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
AC_MSG_ERROR([Spaces are not allowed in this path.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([WHICHCMD_SPACESAFE],
|
||||
# This will make sure the given variable points to a executable
|
||||
# with a full and proper path. This means:
|
||||
# 1) There will be no spaces in the path. On posix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# Any arguments given to the executable is preserved.
|
||||
# If the input variable does not have a directory specification, then
|
||||
# it need to be in the PATH.
|
||||
# $1: The name of the variable to fix
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
|
||||
[
|
||||
# Translate long cygdrive or C:\sdfsf path
|
||||
# into a short mixed mode path that has no
|
||||
# spaces in it.
|
||||
tmp="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
BASIC_FIXUP_EXECUTABLE_CYGWIN($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
BASIC_FIXUP_EXECUTABLE_MSYS($1)
|
||||
else
|
||||
# We're on a posix platform. Hooray! :)
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
complete="[$]$1"
|
||||
path="${complete%% *}"
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
tmp=`$CYGPATH -u "[$]$1"`
|
||||
tmp=`which "$tmp"`
|
||||
# If file exists with .exe appended, that's the real filename
|
||||
# and cygpath needs that to convert to short style path.
|
||||
if test -f "${tmp}.exe"; then
|
||||
tmp="${tmp}.exe"
|
||||
elif test -f "${tmp}.cmd"; then
|
||||
tmp="${tmp}.cmd"
|
||||
new_path=`$WHICH $path 2> /dev/null`
|
||||
if test "x$new_path" = x; then
|
||||
is_absolute_path=`$ECHO "$path" | $GREP ^/`
|
||||
if test "x$is_absolute_path" != x; then
|
||||
AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.])
|
||||
new_path="$path"
|
||||
else
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
|
||||
fi
|
||||
# Convert to C:/ mixed style path without spaces.
|
||||
tmp=`$CYGPATH -s -m "$tmp"`
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
if test "x$arguments" != xEOL; then
|
||||
new_complete="$new_path ${arguments% *}"
|
||||
else
|
||||
new_complete="$new_path"
|
||||
fi
|
||||
|
||||
if test "x$complete" != "x$new_complete"; then
|
||||
$1="$new_complete"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
|
||||
fi
|
||||
$1="$tmp"
|
||||
])
|
||||
|
||||
AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
|
||||
AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
# Follow a chain of symbolic links. Use readlink
|
||||
# where it exists, else fall back to horribly
|
||||
# complicated shell code.
|
||||
AC_PATH_PROG(READLINK, readlink)
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
ISGNU=`$READLINK --help 2>&1 | grep GNU`
|
||||
ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
|
||||
if test "x$ISGNU" = x; then
|
||||
# A readlink that we do not know how to use.
|
||||
# Are there other non-GNU readlinks out there?
|
||||
@@ -121,23 +143,25 @@ AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
|
||||
else
|
||||
STARTDIR=$PWD
|
||||
COUNTER=0
|
||||
DIR=`dirname [$]$1`
|
||||
FIL=`basename [$]$1`
|
||||
sym_link_dir=`$DIRNAME [$]$1`
|
||||
sym_link_file=`$BASENAME [$]$1`
|
||||
while test $COUNTER -lt 20; do
|
||||
ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
|
||||
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
|
||||
if test "x$ISLINK" == x; then
|
||||
# This is not a symbolic link! We are done!
|
||||
break
|
||||
fi
|
||||
# The link might be relative! We have to use cd to travel safely.
|
||||
cd $DIR
|
||||
cd `dirname $ISLINK`
|
||||
DIR=`pwd`
|
||||
FIL=`basename $ISLINK`
|
||||
cd $sym_link_dir
|
||||
# ... and we must get the to the absolute path, not one using symbolic links.
|
||||
cd `pwd -P`
|
||||
cd `$DIRNAME $ISLINK`
|
||||
sym_link_dir=`$THEPWDCMD`
|
||||
sym_link_file=`$BASENAME $ISLINK`
|
||||
let COUNTER=COUNTER+1
|
||||
done
|
||||
cd $STARTDIR
|
||||
$1=$DIR/$FIL
|
||||
$1=$sym_link_dir/$sym_link_file
|
||||
fi
|
||||
fi
|
||||
])
|
||||
@@ -148,59 +172,176 @@ AC_DEFUN_ONCE([BASIC_INIT],
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
DATE_WHEN_CONFIGURED=`LANG=C date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
REMOVE_SYMBOLIC_LINKS(SCRIPT)
|
||||
AUTOCONF_DIR=`dirname [$]0`
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
|
||||
])
|
||||
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
# $1: variable to check
|
||||
# $2: executable name to print in warning (optional)
|
||||
AC_DEFUN([BASIC_CHECK_NONEMPTY],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
if test "x$2" = x; then
|
||||
PROG_NAME=translit($1,A-Z,a-z)
|
||||
else
|
||||
PROG_NAME=$2
|
||||
fi
|
||||
AC_MSG_NOTICE([Could not find $PROG_NAME!])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
])
|
||||
|
||||
# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
|
||||
# Arguments as AC_PATH_PROG:
|
||||
# $1: variable to set
|
||||
# $2: executable name to look for
|
||||
AC_DEFUN([BASIC_REQUIRE_PROG],
|
||||
[
|
||||
AC_PATH_PROGS($1, $2)
|
||||
BASIC_CHECK_NONEMPTY($1, $2)
|
||||
])
|
||||
|
||||
# Setup the most fundamental tools that relies on not much else to set up,
|
||||
# but is used by much of the early bootstrap code.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
[
|
||||
|
||||
# Start with tools that do not need have cross compilation support
|
||||
# and can be expected to be found in the default PATH. These tools are
|
||||
# used by configure. Nor are these tools expected to be found in the
|
||||
# devkit from the builddeps server either, since they are
|
||||
# needed to download the devkit.
|
||||
|
||||
# First are all the simple required tools.
|
||||
BASIC_REQUIRE_PROG(BASENAME, basename)
|
||||
BASIC_REQUIRE_PROG(BASH, bash)
|
||||
BASIC_REQUIRE_PROG(CAT, cat)
|
||||
BASIC_REQUIRE_PROG(CHMOD, chmod)
|
||||
BASIC_REQUIRE_PROG(CMP, cmp)
|
||||
BASIC_REQUIRE_PROG(CP, cp)
|
||||
BASIC_REQUIRE_PROG(CUT, cut)
|
||||
BASIC_REQUIRE_PROG(DATE, date)
|
||||
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
|
||||
BASIC_REQUIRE_PROG(DIRNAME, dirname)
|
||||
BASIC_REQUIRE_PROG(ECHO, echo)
|
||||
BASIC_REQUIRE_PROG(EXPR, expr)
|
||||
BASIC_REQUIRE_PROG(FILE, file)
|
||||
BASIC_REQUIRE_PROG(FIND, find)
|
||||
BASIC_REQUIRE_PROG(HEAD, head)
|
||||
BASIC_REQUIRE_PROG(LN, ln)
|
||||
BASIC_REQUIRE_PROG(LS, ls)
|
||||
BASIC_REQUIRE_PROG(MKDIR, mkdir)
|
||||
BASIC_REQUIRE_PROG(MKTEMP, mktemp)
|
||||
BASIC_REQUIRE_PROG(MV, mv)
|
||||
BASIC_REQUIRE_PROG(PRINTF, printf)
|
||||
BASIC_REQUIRE_PROG(THEPWDCMD, pwd)
|
||||
BASIC_REQUIRE_PROG(RM, rm)
|
||||
BASIC_REQUIRE_PROG(SH, sh)
|
||||
BASIC_REQUIRE_PROG(SORT, sort)
|
||||
BASIC_REQUIRE_PROG(TAIL, tail)
|
||||
BASIC_REQUIRE_PROG(TAR, tar)
|
||||
BASIC_REQUIRE_PROG(TEE, tee)
|
||||
BASIC_REQUIRE_PROG(TOUCH, touch)
|
||||
BASIC_REQUIRE_PROG(TR, tr)
|
||||
BASIC_REQUIRE_PROG(UNAME, uname)
|
||||
BASIC_REQUIRE_PROG(UNIQ, uniq)
|
||||
BASIC_REQUIRE_PROG(WC, wc)
|
||||
BASIC_REQUIRE_PROG(WHICH, which)
|
||||
BASIC_REQUIRE_PROG(XARGS, xargs)
|
||||
|
||||
# Then required tools that require some special treatment.
|
||||
AC_PROG_AWK
|
||||
BASIC_CHECK_NONEMPTY(AWK)
|
||||
AC_PROG_GREP
|
||||
BASIC_CHECK_NONEMPTY(GREP)
|
||||
AC_PROG_EGREP
|
||||
BASIC_CHECK_NONEMPTY(EGREP)
|
||||
AC_PROG_FGREP
|
||||
BASIC_CHECK_NONEMPTY(FGREP)
|
||||
AC_PROG_SED
|
||||
BASIC_CHECK_NONEMPTY(SED)
|
||||
|
||||
AC_PATH_PROGS(NAWK, [nawk gawk awk])
|
||||
BASIC_CHECK_NONEMPTY(NAWK)
|
||||
|
||||
# Always force rm.
|
||||
RM="$RM -f"
|
||||
|
||||
# These are not required on all platforms
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
AC_PATH_PROG(READLINK, readlink)
|
||||
AC_PATH_PROG(DF, df)
|
||||
AC_PATH_PROG(SETFILE, SetFile)
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(SCRIPT)
|
||||
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
|
||||
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`pwd`"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
SRC_ROOT_LENGTH=`pwd|wc -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
BASIC_CHECK_PATHS_WINDOWS
|
||||
else
|
||||
PATH_SEP=":"
|
||||
fi
|
||||
|
||||
AC_SUBST(SRC_ROOT)
|
||||
AC_SUBST(PATH_SEP)
|
||||
cd "$CURDIR"
|
||||
|
||||
SPACESAFE(SRC_ROOT,[the path to the source root])
|
||||
SPACESAFE(CURDIR,[the path to the current directory])
|
||||
])
|
||||
BASIC_FIXUP_PATH(SRC_ROOT)
|
||||
BASIC_FIXUP_PATH(CURDIR)
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_SEARCHPATH],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
# Add extra search paths on solaris for utilities like ar and as etc...
|
||||
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATH_SEP],
|
||||
[
|
||||
# For cygwin we need cygpath first, since it is used everywhere.
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
PATH_SEP=":"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
PATH_SEP=";"
|
||||
# You can force the sys-root if the sys-root encoded into the cross compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[pass this sys-root to the compilers and tools (for cross-compiling)])])
|
||||
|
||||
if test "x$with_sys_root" != x; then
|
||||
SYS_ROOT=$with_sys_root
|
||||
else
|
||||
SYS_ROOT=/
|
||||
fi
|
||||
AC_SUBST(PATH_SEP)
|
||||
AC_SUBST(SYS_ROOT)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir])
|
||||
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this directory as base for tools-dir and sys-root (for cross-compiling)])],
|
||||
[
|
||||
if test "x$with_sys_root" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
|
||||
fi
|
||||
if test "x$with_tools_dir" != x; then
|
||||
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
|
||||
fi
|
||||
TOOLS_DIR=$with_devkit/bin
|
||||
SYS_ROOT=$with_devkit/$host_alias/libc
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[use this as the name of the configuration, overriding the generated default])],
|
||||
[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
@@ -211,7 +352,7 @@ if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || te
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
|
||||
fi
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
mkdir -p "$OUTPUT_ROOT"
|
||||
$MKDIR -p "$OUTPUT_ROOT"
|
||||
if test ! -d "$OUTPUT_ROOT"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
|
||||
fi
|
||||
@@ -224,9 +365,30 @@ else
|
||||
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
|
||||
fi
|
||||
OUTPUT_ROOT="$CURDIR"
|
||||
fi
|
||||
|
||||
SPACESAFE(OUTPUT_ROOT,[the path to the output root])
|
||||
# WARNING: This might be a bad thing to do. You need to be sure you want to
|
||||
# have a configuration in this directory. Do some sanity checks!
|
||||
|
||||
if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
|
||||
# If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
|
||||
# other files
|
||||
files_present=`$LS $OUTPUT_ROOT`
|
||||
if test "x$files_present" != x; then
|
||||
AC_MSG_NOTICE([Current directory is $CURDIR.])
|
||||
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
|
||||
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
|
||||
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
|
||||
AC_MSG_NOTICE([seriously mess up just about everything.])
|
||||
AC_MSG_NOTICE([Try 'cd $SRC_ROOT' and restart configure])
|
||||
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
|
||||
AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([what configuration name to use])
|
||||
AC_MSG_RESULT([$CONF_NAME])
|
||||
|
||||
BASIC_FIXUP_PATH(OUTPUT_ROOT)
|
||||
|
||||
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
|
||||
AC_SUBST(CONF_NAME, $CONF_NAME)
|
||||
@@ -236,7 +398,13 @@ AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
|
||||
AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
|
||||
# The spec.sh file contains variables for compare{images|-objects}.sh scrips.
|
||||
# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
|
||||
# The bootcycle-spec.gmk file contains support for boot cycle builds.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
|
||||
# The compare.sh is used to compare the build output to other builds.
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
|
||||
# Spec.sh is currently used by compare-objects.sh
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
|
||||
# The generated Makefile knows where the spec.gmk is and where the source is.
|
||||
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
|
||||
@@ -252,7 +420,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
|
||||
# Setup default logging of stdout and stderr to build.log in the output root.
|
||||
BUILD_LOG='$(OUTPUT_ROOT)/build.log'
|
||||
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
|
||||
BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
|
||||
BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
|
||||
AC_SUBST(BUILD_LOG)
|
||||
AC_SUBST(BUILD_LOG_PREVIOUS)
|
||||
AC_SUBST(BUILD_LOG_WRAPPER)
|
||||
@@ -261,13 +429,104 @@ AC_SUBST(BUILD_LOG_WRAPPER)
|
||||
|
||||
#%%% Simple tools %%%
|
||||
|
||||
# Check if we have found a usable version of make
|
||||
# $1: the path to a potential make binary (or empty)
|
||||
# $2: the description on how we found this
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
[
|
||||
MAKE_CANDIDATE="$1"
|
||||
DESCRIPTION="$2"
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
|
||||
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
|
||||
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
|
||||
if test "x$IS_GNU_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[[12346789]]'`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_EXPECTED_ENV='cygwin'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
MAKE_EXPECTED_ENV='msys'
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment])
|
||||
fi
|
||||
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
|
||||
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
|
||||
else
|
||||
# Not relevant for non-Windows
|
||||
IS_MAKE_CORRECT_ENV=true
|
||||
fi
|
||||
if test "x$IS_MAKE_CORRECT_ENV" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring.])
|
||||
else
|
||||
FOUND_MAKE=$MAKE_CANDIDATE
|
||||
BASIC_FIXUP_EXECUTABLE(FOUND_MAKE)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Goes looking for a usable version of GNU make.
|
||||
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
[
|
||||
# We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
|
||||
if test "x$MAKE" != x; then
|
||||
# User has supplied a make, test it.
|
||||
if test ! -f "$MAKE"; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
|
||||
fi
|
||||
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer.])
|
||||
fi
|
||||
else
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
AC_PATH_PROGS(CHECK_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_PATH_PROGS(CHECK_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
if test "x$TOOLS_DIR" != x; then
|
||||
# We have a tools-dir, check that as well before giving up.
|
||||
OLD_PATH=$PATH
|
||||
PATH=$TOOLS_DIR:$PATH
|
||||
AC_PATH_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_PATH_PROGS(CHECK_TOOLSDIR_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
|
||||
fi
|
||||
PATH=$OLD_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
fi
|
||||
|
||||
MAKE=$FOUND_MAKE
|
||||
AC_SUBST(MAKE)
|
||||
AC_MSG_NOTICE([Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
[
|
||||
# Test if find supports -delete
|
||||
AC_MSG_CHECKING([if find supports -delete])
|
||||
FIND_DELETE="-delete"
|
||||
|
||||
DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
|
||||
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
|
||||
|
||||
@@ -281,104 +540,22 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
rmdir $DELETEDIR
|
||||
AC_SUBST(FIND_DELETE)
|
||||
])
|
||||
|
||||
AC_DEFUN([CHECK_NONEMPTY],
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
[
|
||||
# Test that variable $1 is not empty.
|
||||
if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
|
||||
])
|
||||
BASIC_CHECK_GNU_MAKE
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
[
|
||||
# Start with tools that do not need have cross compilation support
|
||||
# and can be expected to be found in the default PATH. These tools are
|
||||
# used by configure. Nor are these tools expected to be found in the
|
||||
# devkit from the builddeps server either, since they are
|
||||
# needed to download the devkit.
|
||||
AC_PROG_AWK
|
||||
CHECK_NONEMPTY(AWK)
|
||||
AC_PATH_PROG(CAT, cat)
|
||||
CHECK_NONEMPTY(CAT)
|
||||
AC_PATH_PROG(CHMOD, chmod)
|
||||
CHECK_NONEMPTY(CHMOD)
|
||||
AC_PATH_PROG(CP, cp)
|
||||
CHECK_NONEMPTY(CP)
|
||||
AC_PATH_PROG(CPIO, cpio)
|
||||
CHECK_NONEMPTY(CPIO)
|
||||
AC_PATH_PROG(CUT, cut)
|
||||
CHECK_NONEMPTY(CUT)
|
||||
AC_PATH_PROG(DATE, date)
|
||||
CHECK_NONEMPTY(DATE)
|
||||
AC_PATH_PROG(DF, df)
|
||||
CHECK_NONEMPTY(DF)
|
||||
AC_PATH_PROG(DIFF, diff)
|
||||
CHECK_NONEMPTY(DIFF)
|
||||
# Warning echo is really, really unportable!!!!! Different
|
||||
# behaviour in bash and dash and in a lot of other shells!
|
||||
# Use printf for serious work!
|
||||
AC_PATH_PROG(ECHO, echo)
|
||||
CHECK_NONEMPTY(ECHO)
|
||||
AC_PROG_EGREP
|
||||
CHECK_NONEMPTY(EGREP)
|
||||
AC_PROG_FGREP
|
||||
CHECK_NONEMPTY(FGREP)
|
||||
|
||||
AC_PATH_PROG(FIND, find)
|
||||
CHECK_NONEMPTY(FIND)
|
||||
BASIC_CHECK_FIND_DELETE
|
||||
AC_SUBST(FIND_DELETE)
|
||||
|
||||
AC_PROG_GREP
|
||||
CHECK_NONEMPTY(GREP)
|
||||
AC_PATH_PROG(HEAD, head)
|
||||
CHECK_NONEMPTY(HEAD)
|
||||
AC_PATH_PROG(LN, ln)
|
||||
CHECK_NONEMPTY(LN)
|
||||
AC_PATH_PROG(LS, ls)
|
||||
CHECK_NONEMPTY(LS)
|
||||
AC_PATH_PROGS(MAKE, [gmake make])
|
||||
CHECK_NONEMPTY(MAKE)
|
||||
MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'`
|
||||
if test "x$MAKE_VERSION" = x; then
|
||||
AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
AC_PATH_PROG(MKDIR, mkdir)
|
||||
CHECK_NONEMPTY(MKDIR)
|
||||
AC_PATH_PROG(MV, mv)
|
||||
CHECK_NONEMPTY(MV)
|
||||
AC_PATH_PROGS(NAWK, [nawk gawk awk])
|
||||
CHECK_NONEMPTY(NAWK)
|
||||
AC_PATH_PROG(PRINTF, printf)
|
||||
CHECK_NONEMPTY(PRINTF)
|
||||
AC_PATH_PROG(THEPWDCMD, pwd)
|
||||
AC_PATH_PROG(RM, rm)
|
||||
CHECK_NONEMPTY(RM)
|
||||
RM="$RM -f"
|
||||
AC_PROG_SED
|
||||
CHECK_NONEMPTY(SED)
|
||||
AC_PATH_PROG(SH, sh)
|
||||
CHECK_NONEMPTY(SH)
|
||||
AC_PATH_PROG(SORT, sort)
|
||||
CHECK_NONEMPTY(SORT)
|
||||
AC_PATH_PROG(TAR, tar)
|
||||
CHECK_NONEMPTY(TAR)
|
||||
AC_PATH_PROG(TAIL, tail)
|
||||
CHECK_NONEMPTY(TAIL)
|
||||
AC_PATH_PROG(TEE, tee)
|
||||
CHECK_NONEMPTY(TEE)
|
||||
AC_PATH_PROG(TR, tr)
|
||||
CHECK_NONEMPTY(TR)
|
||||
AC_PATH_PROG(TOUCH, touch)
|
||||
CHECK_NONEMPTY(TOUCH)
|
||||
AC_PATH_PROG(WC, wc)
|
||||
CHECK_NONEMPTY(WC)
|
||||
AC_PATH_PROG(XARGS, xargs)
|
||||
CHECK_NONEMPTY(XARGS)
|
||||
AC_PATH_PROG(ZIP, zip)
|
||||
CHECK_NONEMPTY(ZIP)
|
||||
AC_PATH_PROG(UNZIP, unzip)
|
||||
CHECK_NONEMPTY(UNZIP)
|
||||
# These tools might not be installed by default,
|
||||
# need hint on how to install them.
|
||||
BASIC_REQUIRE_PROG(UNZIP, unzip)
|
||||
BASIC_REQUIRE_PROG(ZIP, zip)
|
||||
|
||||
# Non-required basic tools
|
||||
|
||||
AC_PATH_PROG(LDD, ldd)
|
||||
if test "x$LDD" = "x"; then
|
||||
# List shared lib dependencies is used for
|
||||
@@ -390,56 +567,18 @@ AC_PATH_PROG(OTOOL, otool)
|
||||
if test "x$OTOOL" = "x"; then
|
||||
OTOOL="true"
|
||||
fi
|
||||
AC_PATH_PROG(READELF, readelf)
|
||||
AC_PATH_PROG(EXPR, expr)
|
||||
CHECK_NONEMPTY(EXPR)
|
||||
AC_PATH_PROG(FILE, file)
|
||||
CHECK_NONEMPTY(FILE)
|
||||
AC_PATH_PROGS(READELF, [readelf greadelf])
|
||||
AC_PATH_PROG(HG, hg)
|
||||
])
|
||||
AC_PATH_PROG(STAT, stat)
|
||||
AC_PATH_PROG(TIME, time)
|
||||
|
||||
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_UNCYGDRIVE],
|
||||
[
|
||||
# When using cygwin, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called uncygdrive.exe.
|
||||
UNCYGDRIVE=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if uncygdrive can be created])
|
||||
UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
|
||||
rm -f $OUTPUT_ROOT/uncygdrive*
|
||||
UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
|
||||
cd $OUTPUT_ROOT
|
||||
$CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
|
||||
cd $CURDIR
|
||||
|
||||
if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/uncygdrive1.log
|
||||
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe])
|
||||
fi
|
||||
AC_MSG_RESULT([$UNCYGDRIVE])
|
||||
AC_MSG_CHECKING([if uncygdrive.exe works])
|
||||
cd $OUTPUT_ROOT
|
||||
$UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
|
||||
cd $CURDIR
|
||||
if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/uncygdrive2.log
|
||||
AC_MSG_ERROR([Uncygdrive did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
BASIC_REQUIRE_PROG(COMM, comm)
|
||||
fi
|
||||
|
||||
AC_SUBST(UNCYGDRIVE)
|
||||
])
|
||||
|
||||
|
||||
# Check if build directory is on local disk.
|
||||
# Check if build directory is on local disk. If not possible to determine,
|
||||
# we prefer to claim it's local.
|
||||
# Argument 1: directory to test
|
||||
# Argument 2: what to do if it is on local disk
|
||||
# Argument 3: what to do otherwise (remote disk or failure)
|
||||
@@ -447,11 +586,26 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
[
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
if test "x$DF" = x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# msys does not have df; use Windows "net use" instead.
|
||||
IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
|
||||
if test "x$IS_NETWORK_DISK" = x; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
else
|
||||
# No df here, say it's local
|
||||
$2
|
||||
fi
|
||||
else
|
||||
if $DF -l $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
|
||||
406
common/autoconf/basics_windows.m4
Normal file
406
common/autoconf/basics_windows.m4
Normal file
@@ -0,0 +1,406 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
|
||||
[
|
||||
windows_path="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
unix_path=`$CYGPATH -u "$windows_path"`
|
||||
$1="$unix_path"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
|
||||
$1="$unix_path"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
|
||||
[
|
||||
unix_path="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
windows_path=`$CYGPATH -m "$unix_path"`
|
||||
$1="$windows_path"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
windows_path=`cmd //c echo $unix_path`
|
||||
$1="$windows_path"
|
||||
fi
|
||||
])
|
||||
|
||||
# Helper function which possibly converts a path using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
# $1: The path to check
|
||||
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
|
||||
[
|
||||
input_path="$1"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
|
||||
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
|
||||
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
|
||||
# Going to short mode and back again did indeed matter. Since short mode is
|
||||
# case insensitive, let's make it lowercase to improve readability.
|
||||
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
# Now convert it back to Unix-stile (cygpath)
|
||||
input_path=`$CYGPATH -u "$shortmode_path"`
|
||||
new_path="$input_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
# As a simple fix, exclude /usr/bin since it's not a real path.
|
||||
if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then
|
||||
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
|
||||
# a path prefixed by /cygdrive for fixpath to work.
|
||||
new_path="$CYGWIN_ROOT_PATH$input_path"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Helper function which possibly converts a path using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
# $1: The path to check
|
||||
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
|
||||
[
|
||||
input_path="$1"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
# contains just simple characters, use it. Otherwise (spaces, weird characters),
|
||||
# take no chances and rewrite it.
|
||||
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
|
||||
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@`
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
fi
|
||||
])
|
||||
|
||||
# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
|
||||
# and could probably be heavily simplified. However, all changes in this
|
||||
# area tend to need lot of testing in different scenarios, and in lack of
|
||||
# proper unit testing, cleaning this up has not been deemed worth the effort
|
||||
# at the moment.
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
|
||||
[
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
path="[$]$1"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
$1="$new_path"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
|
||||
[
|
||||
path="[$]$1"
|
||||
has_colon=`$ECHO $path | $GREP ^.:`
|
||||
new_path="$path"
|
||||
if test "x$has_colon" = x; then
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
if test "x$path" != "x$new_path"; then
|
||||
$1="$new_path"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
|
||||
fi
|
||||
|
||||
# Save the first 10 bytes of this path to the storage, so fixpath can work.
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
|
||||
[
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
complete="[$]$1"
|
||||
path="${complete%% *}"
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
# Now try to locate executable using which
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
if test "x$new_path" = x; then
|
||||
# Oops. Which didn't find the executable.
|
||||
# The splitting of arguments from the executable at a space might have been incorrect,
|
||||
# since paths with space are more likely in Windows. Give it another try with the whole
|
||||
# argument.
|
||||
path="$complete"
|
||||
arguments="EOL"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
if test "x$new_path" = x; then
|
||||
# It's still not found. Now this is an unrecoverable error.
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
|
||||
# "foo.exe" is OK but "foo" is an error.
|
||||
#
|
||||
# This test is therefore slightly more accurate than "test -f" to check for file precense.
|
||||
# It is also a way to make sure we got the proper file name for the real test later on.
|
||||
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
|
||||
if test "x$test_shortpath" = x; then
|
||||
# Short path failed, file does not exist as specified.
|
||||
# Try adding .exe or .cmd
|
||||
if test -f "${new_path}.exe"; then
|
||||
input_to_shortpath="${new_path}.exe"
|
||||
elif test -f "${new_path}.cmd"; then
|
||||
input_to_shortpath="${new_path}.cmd"
|
||||
else
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
|
||||
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
else
|
||||
input_to_shortpath="$new_path"
|
||||
fi
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
new_path="$input_to_shortpath"
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
|
||||
# remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
[
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
complete="[$]$1"
|
||||
path="${complete%% *}"
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
# Now try to locate executable using which
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# Oops. Which didn't find the executable.
|
||||
# The splitting of arguments from the executable at a space might have been incorrect,
|
||||
# since paths with space are more likely in Windows. Give it another try with the whole
|
||||
# argument.
|
||||
path="$complete"
|
||||
arguments="EOL"
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
# It's still not found. Now this is an unrecoverable error.
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now new_path has a complete unix path to the binary
|
||||
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
|
||||
# Keep paths in /bin as-is, but remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
# Do not save /bin paths to all_fixpath_prefixes!
|
||||
else
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $new_path`
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
# Output is in $new_path
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
# remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
|
||||
# Save the first 10 bytes of this path to the storage, so fixpath can work.
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
|
||||
fi
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
[
|
||||
SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
AC_MSG_CHECKING([cygwin release])
|
||||
CYGWIN_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$CYGWIN_VERSION])
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
|
||||
|
||||
CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
|
||||
if test "x$CYGWIN_VERSION_OK" = x; then
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
AC_MSG_CHECKING([cygwin root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
|
||||
cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
|
||||
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
|
||||
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
|
||||
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
|
||||
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
AC_MSG_CHECKING([msys release])
|
||||
MSYS_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_VERSION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='msys'
|
||||
WINDOWS_ENV_VERSION="$MSYS_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([msys root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
|
||||
MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
|
||||
AC_MSG_RESULT([$MSYS_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys was detected.])
|
||||
fi
|
||||
|
||||
# Test if windows or unix (cygwin/msys) find is first in path.
|
||||
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
|
||||
FIND_BINARY_OUTPUT=`find --version 2>&1`
|
||||
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
|
||||
AC_MSG_RESULT([unix style])
|
||||
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
|
||||
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([It seems that your find utility is non-standard.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
[
|
||||
# When using cygwin or msys, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called fixpath.
|
||||
FIXPATH=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if fixpath can be created])
|
||||
FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
|
||||
FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
|
||||
FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
|
||||
FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
|
||||
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
|
||||
FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
|
||||
FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
|
||||
FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
|
||||
|
||||
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
|
||||
# @ was chosen as separator to minimize risk of other tools messing around with it
|
||||
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
|
||||
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
|
||||
|
||||
FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
|
||||
fi
|
||||
rm -f $OUTPUT_ROOT/fixpath*
|
||||
cd $OUTPUT_ROOT
|
||||
$CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
|
||||
cd $CURDIR
|
||||
|
||||
if test ! -x $OUTPUT_ROOT/fixpath.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/fixpath1.log
|
||||
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([if fixpath.exe works])
|
||||
cd $OUTPUT_ROOT
|
||||
$FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
|
||||
cd $CURDIR
|
||||
if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $OUTPUT_ROOT/fixpath2.log
|
||||
AC_MSG_ERROR([fixpath did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
|
||||
fi
|
||||
|
||||
AC_SUBST(FIXPATH)
|
||||
])
|
||||
@@ -23,22 +23,192 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Fixes paths on windows to be mixed mode short.
|
||||
AC_DEFUN([BOOTJDK_WIN_FIX_PATH],
|
||||
# Execute the check given as argument, and verify the result
|
||||
# If the Boot JDK was previously found, do nothing
|
||||
# $1 A command line (typically autoconf macro) to execute
|
||||
AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
AC_PATH_PROG(CYGPATH, cygpath)
|
||||
tmp="[$]$1"
|
||||
# Convert to C:/ mixed style path without spaces.
|
||||
tmp=`$CYGPATH -s -m "$tmp"`
|
||||
$1="$tmp"
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
# Now execute the test
|
||||
$1
|
||||
|
||||
# If previous step claimed to have found a JDK, check it to see if it seems to be valid.
|
||||
if test "x$BOOT_JDK_FOUND" = xmaybe; then
|
||||
# Do we have a bin/java?
|
||||
if test ! -x "$BOOT_JDK/bin/java"; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# Do we have a bin/javac?
|
||||
if test ! -x "$BOOT_JDK/bin/javac"; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
|
||||
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# Do we have an rt.jar? (On MacOSX it is called classes.jar)
|
||||
if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
|
||||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
|
||||
if test "x$FOUND_VERSION_78" = x; then
|
||||
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
|
||||
AC_MSG_NOTICE([(Your Boot JDK must be version 7 or 8)])
|
||||
BOOT_JDK_FOUND=no
|
||||
else
|
||||
# We're done! :-)
|
||||
BOOT_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BOOT_JDK)
|
||||
AC_MSG_CHECKING([for Boot JDK])
|
||||
AC_MSG_RESULT([$BOOT_JDK])
|
||||
AC_MSG_CHECKING([Boot JDK version])
|
||||
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
|
||||
AC_MSG_RESULT([$BOOT_JDK_VERSION])
|
||||
fi # end check jdk version
|
||||
fi # end check rt.jar
|
||||
fi # end check javac
|
||||
fi # end check java
|
||||
fi # end check boot jdk found
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BOOTJDK_MISSING_ERROR],
|
||||
# Test: Is bootjdk explicitely set by command line arguments?
|
||||
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
|
||||
[
|
||||
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
if test "x$with_boot_jdk" != x; then
|
||||
BOOT_JDK=$with_boot_jdk
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
|
||||
fi
|
||||
])
|
||||
|
||||
# Test: Is bootjdk available from builddeps?
|
||||
AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
|
||||
[
|
||||
BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
|
||||
])
|
||||
|
||||
# Test: Is $JAVA_HOME set?
|
||||
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
[
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
JAVA_HOME_PROCESSED="$JAVA_HOME"
|
||||
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
if test ! -d "$JAVA_HOME_PROCESSED"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
else
|
||||
# Aha, the user has set a JAVA_HOME
|
||||
# let us use that as the Boot JDK.
|
||||
BOOT_JDK="$JAVA_HOME_PROCESSED"
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
|
||||
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
|
||||
[
|
||||
AC_PATH_PROG(JAVAC_CHECK, javac)
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname "$BINARY"`
|
||||
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
# Looks like we found ourselves an JDK
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
|
||||
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
|
||||
[
|
||||
if test -x /usr/libexec/java_home; then
|
||||
BOOT_JDK=`/usr/libexec/java_home`
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
|
||||
fi
|
||||
])
|
||||
|
||||
# Look for a jdk in the given path. If there are multiple, try to select the newest.
|
||||
# If found, set BOOT_JDK and BOOT_JDK_FOUND.
|
||||
# $1 = Path to directory containing jdk installations.
|
||||
# $2 = String to append to the found JDK directory to get the proper JDK home
|
||||
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY],
|
||||
[
|
||||
BOOT_JDK_PREFIX="$1"
|
||||
BOOT_JDK_SUFFIX="$2"
|
||||
ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
|
||||
if test "x$ALL_JDKS_FOUND" != x; then
|
||||
for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
|
||||
BOOTJDK_DO_CHECK([
|
||||
BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
|
||||
if test -d "$BOOT_JDK"; then
|
||||
BOOT_JDK_FOUND=maybe
|
||||
AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)])
|
||||
fi
|
||||
])
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
|
||||
# environmental variable as base for where to look.
|
||||
# $1 Name of an environmal variable, assumed to point to the Program Files directory.
|
||||
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
|
||||
[
|
||||
if test "x[$]$1" != x; then
|
||||
VIRTUAL_DIR="[$]$1/Java"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
|
||||
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
|
||||
fi
|
||||
])
|
||||
|
||||
# Test: Is there a JDK installed in default, well-known locations?
|
||||
AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramW6432])])
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMW6432])])
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMFILES])])
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramFiles])])
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/cygdrive/c/Program Files/Java])])
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/Library/Java/JavaVirtualMachines],[/Contents/Home])])
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/System/Library/Java/JavaVirtualMachines],[/Contents/Home])])
|
||||
elif test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/usr/lib/jvm])])
|
||||
fi
|
||||
])
|
||||
|
||||
# Check that a command-line tool in the Boot JDK is correct
|
||||
# $1 = name of variable to assign
|
||||
# $2 = name of binary
|
||||
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
|
||||
[
|
||||
AC_MSG_CHECKING([for $2 in Boot JDK])
|
||||
$1=$BOOT_JDK/bin/$2
|
||||
if test ! -x [$]$1; then
|
||||
AC_MSG_RESULT(not found)
|
||||
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
|
||||
AC_MSG_ERROR([Could not find $2 in the Boot JDK])
|
||||
fi
|
||||
AC_MSG_RESULT(ok)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@@ -52,203 +222,73 @@ BOOT_JDK_FOUND=no
|
||||
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
|
||||
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
|
||||
|
||||
if test "x$with_boot_jdk" != x; then
|
||||
BOOT_JDK=$with_boot_jdk
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no])
|
||||
# We look for the Boot JDK through various means, going from more certain to
|
||||
# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
|
||||
# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
|
||||
# must check if this is indeed valid; otherwise we'll continue looking.
|
||||
|
||||
# Test: Is bootjdk explicitely set by command line arguments?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
|
||||
if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
|
||||
# Having specified an argument which is incorrect will produce an instant failure;
|
||||
# we should not go on looking
|
||||
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
|
||||
fi
|
||||
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
if test ! -d "$JAVA_HOME"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
# Aha, the user has set a JAVA_HOME
|
||||
# let us use that as the Boot JDK.
|
||||
BOOT_JDK="$JAVA_HOME"
|
||||
BOOT_JDK_FOUND=yes
|
||||
# To be on the safe side, lets check that it is a JDK.
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
JAVAC="$BOOT_JDK/bin/javac"
|
||||
JAVA="$BOOT_JDK/bin/java"
|
||||
BOOT_JDK_FOUND=yes
|
||||
else
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Test: Is bootjdk available from builddeps?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
|
||||
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
AC_PATH_PROG(JAVAC_CHECK, javac)
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
WHICHCMD_SPACESAFE(BINARY,[path to javac])
|
||||
REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname $BINARY`
|
||||
BOOT_JDK=`cd $BOOT_JDK/..; pwd`
|
||||
if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
|
||||
JAVAC=$BOOT_JDK/bin/javac
|
||||
JAVA=$BOOT_JDK/bin/java
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Test: Is $JAVA_HOME set?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
|
||||
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
# Try the MacOSX way.
|
||||
if test -x /usr/libexec/java_home; then
|
||||
BOOT_JDK=`/usr/libexec/java_home`
|
||||
if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
|
||||
JAVAC=$BOOT_JDK/bin/javac
|
||||
JAVA=$BOOT_JDK/bin/java
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
|
||||
|
||||
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
|
||||
|
||||
# Test: Is there a JDK installed in default, well-known locations?
|
||||
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
|
||||
|
||||
# If we haven't found anything yet, we've truly lost. Give up.
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
AC_PATH_PROG(JAVA_CHECK, java)
|
||||
if test "x$JAVA_CHECK" != x; then
|
||||
# There is a java in the path. But apparently we have not found a javac
|
||||
# in the path, since that would have been tested earlier.
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# Now if this is a windows platform. The default installation of a JDK
|
||||
# actually puts the JRE in the path and keeps the JDK out of the path!
|
||||
# Go look in the default installation location.
|
||||
BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
|
||||
if test -d "$BOOT_JDK"; then
|
||||
BOOT_JDK_FOUND=yes
|
||||
fi
|
||||
fi
|
||||
if test "x$BOOT_JDK_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
AC_MSG_NOTICE([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
else
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
AC_MSG_NOTICE([Could not find a JDK. $HELP_MSG])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG])
|
||||
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
BOOTJDK_WIN_FIX_PATH(BOOT_JDK)
|
||||
|
||||
# Now see if we can find the rt.jar, or its nearest equivalent.
|
||||
# Setup proper paths for what we found
|
||||
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
|
||||
SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)])
|
||||
|
||||
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
|
||||
SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)])
|
||||
|
||||
if test ! -f $BOOT_RTJAR; then
|
||||
if test ! -f "$BOOT_RTJAR"; then
|
||||
# On MacOSX it is called classes.jar
|
||||
BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
|
||||
if test ! -f $BOOT_RTJAR; then
|
||||
AC_MSG_NOTICE([Cannot find the rt.jar or its equivalent!])
|
||||
AC_MSG_NOTICE([This typically means that configure failed to automatically find a suitable Boot JDK])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
|
||||
if test -f "$BOOT_RTJAR"; then
|
||||
# Remove the ..
|
||||
BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
|
||||
# The tools.jar is part of classes.jar
|
||||
BOOT_TOOLSJAR="$BOOT_RTJAR"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOT_JDK)
|
||||
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
|
||||
BOOT_JDK="$BOOT_JDK"
|
||||
AC_SUBST(BOOT_RTJAR)
|
||||
AC_SUBST(BOOT_TOOLSJAR)
|
||||
AC_MSG_CHECKING([for Boot JDK])
|
||||
AC_MSG_RESULT([$BOOT_JDK])
|
||||
AC_MSG_CHECKING([for Boot rt.jar])
|
||||
AC_MSG_RESULT([$BOOT_RTJAR])
|
||||
AC_MSG_CHECKING([for Boot tools.jar])
|
||||
AC_MSG_RESULT([$BOOT_TOOLSJAR])
|
||||
AC_SUBST(BOOT_JDK)
|
||||
|
||||
# Use the java tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for java in Boot JDK])
|
||||
JAVA=$BOOT_JDK/bin/java
|
||||
if test ! -x $JAVA; then
|
||||
AC_MSG_NOTICE([Could not find a working java])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
|
||||
AC_MSG_RESULT([yes $BOOT_JDK_VERSION])
|
||||
AC_SUBST(JAVA)
|
||||
# Setup tools from the Boot JDK.
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
|
||||
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
|
||||
|
||||
# Extra M4 quote needed to protect [] in grep expression.
|
||||
[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
|
||||
if test "x$FOUND_VERSION_78" = x; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([openjdk])
|
||||
AC_MSG_NOTICE([Your boot-jdk must be version 7 or 8. $HELP_MSG])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
# Finally, set some other options...
|
||||
|
||||
# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
|
||||
BOOT_JDK_SOURCETARGET="-source 7 -target 7"
|
||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||
|
||||
# Use the javac tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for javac in Boot JDK])
|
||||
JAVAC=$BOOT_JDK/bin/javac
|
||||
if test ! -x $JAVAC; then
|
||||
AC_MSG_ERROR([Could not find a working javac])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SUBST(JAVAC)
|
||||
AC_SUBST(JAVAC_FLAGS)
|
||||
|
||||
# Use the javah tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for javah in Boot JDK])
|
||||
JAVAH=$BOOT_JDK/bin/javah
|
||||
if test ! -x $JAVAH; then
|
||||
AC_MSG_NOTICE([Could not find a working javah])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SUBST(JAVAH)
|
||||
|
||||
# Use the jar tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for jar in Boot JDK])
|
||||
JAR=$BOOT_JDK/bin/jar
|
||||
if test ! -x $JAR; then
|
||||
AC_MSG_NOTICE([Could not find a working jar])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_SUBST(JAR)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
# Use the rmic tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for rmic in Boot JDK])
|
||||
RMIC=$BOOT_JDK/bin/rmic
|
||||
if test ! -x $RMIC; then
|
||||
AC_MSG_NOTICE([Could not find a working rmic])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_SUBST(RMIC)
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
# Use the native2ascii tool from the Boot JDK.
|
||||
AC_MSG_CHECKING([for native2ascii in Boot JDK])
|
||||
NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
|
||||
if test ! -x $NATIVE2ASCII; then
|
||||
AC_MSG_NOTICE([Could not find a working native2ascii])
|
||||
BOOTJDK_MISSING_ERROR
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SUBST(NATIVE2ASCII)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
|
||||
43
common/autoconf/bootcycle-spec.gmk.in
Normal file
43
common/autoconf/bootcycle-spec.gmk.in
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Support for building boot cycle builds
|
||||
|
||||
# First include the real base spec.gmk file
|
||||
include @SPEC@
|
||||
|
||||
# Check that the user did not try to specify a different java to use for compiling.
|
||||
ifneq ($(firstword $(SJAVAC_SERVER_JAVA)),$(firstword $(JAVA)))
|
||||
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
|
||||
endif
|
||||
|
||||
# Override specific values to do a boot cycle build
|
||||
|
||||
# The bootcycle build has a different output directory
|
||||
BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build
|
||||
|
||||
# Use a different Boot JDK
|
||||
BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image
|
||||
BOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar
|
||||
35
common/autoconf/build-aux/config.guess
vendored
35
common/autoconf/build-aux/config.guess
vendored
@@ -22,17 +22,42 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This is a wrapper for the config.guess from autoconf. The latter does not properly
|
||||
# detect amd64 systems, since that require isainfo instead of uname. Instead of patching
|
||||
# the autoconf system (which might easily get lost in a future update), we wrap it and
|
||||
# fix the broken property, if needed.
|
||||
# This is a wrapper for the config.guess from autoconf. The latter does not
|
||||
# properly detect 64 bit systems on all platforms. Instead of patching the
|
||||
# autoconf system (which might easily get lost in a future update), we wrap it
|
||||
# and fix the broken property, if needed.
|
||||
|
||||
DIR=`dirname $0`
|
||||
OUT=`. $DIR/autoconf-config.guess`
|
||||
|
||||
# Test and fix solaris on x86_64
|
||||
echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
# isainfo -n returns either i386 or amd64 on Intel systems
|
||||
# isainfo -n returns either i386 or amd64
|
||||
REAL_CPU=`isainfo -n`
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
|
||||
# Test and fix solaris on sparcv9
|
||||
echo $OUT | grep sparc-sun-solaris > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
# isainfo -n returns either sparc or sparcv9
|
||||
REAL_CPU=`isainfo -n`
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
|
||||
# Test and fix cygwin on x86_64
|
||||
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
|
||||
fi
|
||||
if test $? = 0; then
|
||||
case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
|
||||
intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
|
||||
REAL_CPU=x86_64
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo $OUT
|
||||
|
||||
@@ -30,25 +30,21 @@ AC_DEFUN([BPERF_CHECK_CORES],
|
||||
FOUND_CORES=no
|
||||
|
||||
if test -f /proc/cpuinfo; then
|
||||
# Looks like a Linux system
|
||||
# Looks like a Linux (or cygwin) system
|
||||
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/psrinfo; then
|
||||
elif test -x /usr/sbin/psrinfo; then
|
||||
# Looks like a Solaris system
|
||||
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/system_profiler; then
|
||||
elif test -x /usr/sbin/system_profiler; then
|
||||
# Looks like a MacOSX system
|
||||
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
if test "x$build_os" = xwindows; then
|
||||
NUM_CORES=4
|
||||
elif test -n "$NUMBER_OF_PROCESSORS"; then
|
||||
# On windows, look in the env
|
||||
NUM_CORES=$NUMBER_OF_PROCESSORS
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
# For c/c++ code we run twice as many concurrent build
|
||||
@@ -58,7 +54,8 @@ AC_DEFUN([BPERF_CHECK_CORES],
|
||||
if test "x$FOUND_CORES" = xyes; then
|
||||
AC_MSG_RESULT([$NUM_CORES])
|
||||
else
|
||||
AC_MSG_RESULT([could not detect number of cores, defaulting to 1!])
|
||||
AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
|
||||
AC_MSG_WARN([This will disable all parallelism from build!])
|
||||
fi
|
||||
|
||||
])
|
||||
@@ -66,39 +63,36 @@ AC_DEFUN([BPERF_CHECK_CORES],
|
||||
AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
||||
[
|
||||
AC_MSG_CHECKING([for memory size])
|
||||
# Default to 1024MB
|
||||
# Default to 1024 MB
|
||||
MEMORY_SIZE=1024
|
||||
FOUND_MEM=no
|
||||
|
||||
if test -f /proc/cpuinfo; then
|
||||
# Looks like a Linux system
|
||||
if test -f /proc/meminfo; then
|
||||
# Looks like a Linux (or cygwin) system
|
||||
MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/prtconf; then
|
||||
elif test -x /usr/sbin/prtconf; then
|
||||
# Looks like a Solaris system
|
||||
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test -x /usr/sbin/system_profiler; then
|
||||
elif test -x /usr/sbin/system_profiler; then
|
||||
# Looks like a MacOSX system
|
||||
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test "x$build_os" = xwindows; then
|
||||
MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
|
||||
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
# Windows, but without cygwin
|
||||
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MEM" = xyes; then
|
||||
AC_MSG_RESULT([$MEMORY_SIZE MB])
|
||||
else
|
||||
AC_MSG_RESULT([could not detect memory size defaulting to 1024MB!])
|
||||
AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
|
||||
AC_MSG_WARN([This might seriously impact build performance!])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -136,7 +130,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
[
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AS_HELP_STRING([--disable-ccache],
|
||||
[use ccache to speed up recompilations @<:@enabled@:>@])],
|
||||
[disable using ccache to speed up recompilations @<:@enabled@:>@])],
|
||||
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
|
||||
if test "x$ENABLE_CCACHE" = xyes; then
|
||||
AC_PATH_PROG(CCACHE, ccache)
|
||||
@@ -209,7 +203,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
# Can the C/C++ compiler use precompiled headers?
|
||||
#
|
||||
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
|
||||
[use precompiled headers when compiling C++ @<:@enabled@:>@])],
|
||||
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
|
||||
[ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
|
||||
|
||||
USE_PRECOMPILED_HEADER=1
|
||||
@@ -240,46 +234,29 @@ AC_SUBST(USE_PRECOMPILED_HEADER)
|
||||
|
||||
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
[
|
||||
AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java],
|
||||
[use this java binary for running the javac background server and other long running java tasks in the build process,
|
||||
e.g. ---with-server-java="/opt/jrockit/bin/java -server"])])
|
||||
AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
|
||||
[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
|
||||
|
||||
if test "x$with_server_java" != x; then
|
||||
SERVER_JAVA="$with_server_java"
|
||||
FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
|
||||
if test "x$with_sjavac_server_java" != x; then
|
||||
SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
|
||||
FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
|
||||
if test "x$FOUND_VERSION" = x; then
|
||||
AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA])
|
||||
AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
else
|
||||
SERVER_JAVA=""
|
||||
SJAVAC_SERVER_JAVA=""
|
||||
# Hotspot specific options.
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
|
||||
# JRockit specific options.
|
||||
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA])
|
||||
SERVER_JAVA="$JAVA $SERVER_JAVA"
|
||||
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
|
||||
SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
|
||||
fi
|
||||
AC_SUBST(SERVER_JAVA)
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA)
|
||||
|
||||
AC_MSG_CHECKING([whether to use shared server for javac])
|
||||
AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
|
||||
[enable the shared javac server during the build process @<:@disabled@:>@])],
|
||||
[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no'])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
|
||||
if test "x$ENABLE_JAVAC_SERVER" = xyes; then
|
||||
JAVAC_USE_REMOTE=true
|
||||
JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
|
||||
else
|
||||
JAVAC_USE_REMOTE=false
|
||||
JAVAC_SERVERS=
|
||||
fi
|
||||
AC_SUBST(JAVAC_USE_REMOTE)
|
||||
AC_SUBST(JAVAC_SERVERS)
|
||||
|
||||
AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores],
|
||||
[use at most this number of concurrent threads on the javac server @<:@probed@:>@])])
|
||||
if test "x$with_javac_server_cores" != x; then
|
||||
JAVAC_SERVER_CORES="$with_javac_server_cores"
|
||||
AC_ARG_WITH(sjavac-server-cores, [AS_HELP_STRING([--with-sjavac-server-cores],
|
||||
[use at most this number of concurrent threads on the sjavac server @<:@probed@:>@])])
|
||||
if test "x$with_sjavac_server_cores" != x; then
|
||||
SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
|
||||
else
|
||||
if test "$NUM_CORES" -gt 16; then
|
||||
# We set this arbitrary limit because we want to limit the heap
|
||||
@@ -287,86 +264,49 @@ else
|
||||
# In the future we will make the javac compilers in the server
|
||||
# share more and more state, thus enabling us to use more and
|
||||
# more concurrent threads in the server.
|
||||
JAVAC_SERVER_CORES="16"
|
||||
SJAVAC_SERVER_CORES="16"
|
||||
else
|
||||
JAVAC_SERVER_CORES="$NUM_CORES"
|
||||
SJAVAC_SERVER_CORES="$NUM_CORES"
|
||||
fi
|
||||
|
||||
if test "$MEMORY_SIZE" -gt "17000"; then
|
||||
MAX_HEAP_MEM=10000
|
||||
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "10000"; then
|
||||
MAX_HEAP_MEM=6000
|
||||
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "5000"; then
|
||||
MAX_HEAP_MEM=3000
|
||||
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "3800"; then
|
||||
MAX_HEAP_MEM=2500
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "1900"; then
|
||||
MAX_HEAP_MEM=1200
|
||||
ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1400M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
elif test "$MEMORY_SIZE" -gt "1000"; then
|
||||
MAX_HEAP_MEM=900
|
||||
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
else
|
||||
MAX_HEAP_MEM=512
|
||||
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
fi
|
||||
|
||||
ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
|
||||
|
||||
MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
|
||||
if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
|
||||
if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
|
||||
AC_MSG_CHECKING([if number of server cores must be reduced])
|
||||
JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
|
||||
AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
|
||||
SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
|
||||
AC_MSG_RESULT([yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(JAVAC_SERVER_CORES)
|
||||
|
||||
AC_MSG_CHECKING([whether to track dependencies between Java packages])
|
||||
AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps],
|
||||
[enable the dependency tracking between Java packages @<:@disabled@:>@])],
|
||||
[ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no'])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_DEPS])
|
||||
if test "x$ENABLE_JAVAC_DEPS" = xyes; then
|
||||
JAVAC_USE_DEPS=true
|
||||
else
|
||||
JAVAC_USE_DEPS=false
|
||||
fi
|
||||
AC_SUBST(JAVAC_USE_DEPS)
|
||||
|
||||
AC_MSG_CHECKING([whether to use multiple cores for javac compilation])
|
||||
AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core],
|
||||
[compile Java packages concurrently @<:@disabled@:>@])],
|
||||
[ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no'])
|
||||
AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE])
|
||||
if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
|
||||
JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
|
||||
else
|
||||
JAVAC_USE_MODE=SINGLE_THREADED_BATCH
|
||||
if test "x$ENABLE_JAVAC_DEPS" = xyes; then
|
||||
AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.])
|
||||
AC_MSG_WARN([Disabling dependency tracking for you now.])
|
||||
JAVAC_USE_DEPS=false
|
||||
fi
|
||||
if test "x$ENABLE_JAVAC_SERVER" = xyes; then
|
||||
AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.])
|
||||
AC_MSG_WARN([Disabling javac server for you now.])
|
||||
JAVAC_USE_REMOTE=false
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(JAVAC_USE_MODE)
|
||||
AC_SUBST(SJAVAC_SERVER_CORES)
|
||||
|
||||
AC_MSG_CHECKING([whether to use sjavac])
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
@@ -375,4 +315,11 @@ AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
AC_MSG_RESULT([$ENABLE_SJAVAC])
|
||||
AC_SUBST(ENABLE_SJAVAC)
|
||||
|
||||
if test "x$ENABLE_SJAVAC" = xyes; then
|
||||
SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
|
||||
else
|
||||
SJAVAC_SERVER_DIR=
|
||||
fi
|
||||
AC_SUBST(SJAVAC_SERVER_DIR)
|
||||
|
||||
])
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
# Translate a configuration triplet/quadruplet into something
|
||||
# known by this configuration file.
|
||||
# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_SYSTEM}
|
||||
# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
|
||||
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
|
||||
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
|
||||
|
||||
|
||||
@@ -52,19 +52,19 @@ AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
|
||||
fi
|
||||
# Create build and target names that use _ instead of "-" and ".".
|
||||
# This is necessary to use them in variable names.
|
||||
build_var=`echo ${OPENJDK_BUILD_SYSTEM} | tr '-' '_' | tr '.' '_'`
|
||||
target_var=`echo ${OPENJDK_TARGET_SYSTEM} | tr '-' '_' | tr '.' '_'`
|
||||
build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
|
||||
target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
|
||||
# Extract rewrite information for build and target
|
||||
eval rewritten_build=\${REWRITE_${build_var}}
|
||||
if test "x$rewritten_build" = x; then
|
||||
rewritten_build=${OPENJDK_BUILD_SYSTEM}
|
||||
rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
|
||||
echo Build stays the same $rewritten_build
|
||||
else
|
||||
echo Rewriting build for builddeps into $rewritten_build
|
||||
fi
|
||||
eval rewritten_target=\${REWRITE_${target_var}}
|
||||
if test "x$rewritten_target" = x; then
|
||||
rewritten_target=${OPENJDK_TARGET_SYSTEM}
|
||||
rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
|
||||
echo Target stays the same $rewritten_target
|
||||
else
|
||||
echo Rewriting target for builddeps into $rewritten_target
|
||||
@@ -235,26 +235,13 @@ AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
|
||||
[use this configuration file for the builddeps])])
|
||||
|
||||
AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
|
||||
[download and use build dependencies from this server url, e.g. --with-builddeps-server=ftp://example.com/dir])])
|
||||
[download and use build dependencies from this server url])])
|
||||
|
||||
AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
|
||||
[store downloaded build dependencies here @<:@d/localhome/builddeps@:>@])],
|
||||
[store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
|
||||
[],
|
||||
[with_builddeps_dir=/localhome/builddeps])
|
||||
|
||||
AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
|
||||
[chgrp the downloaded build dependencies to this group])])
|
||||
|
||||
AC_ARG_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps],
|
||||
[list all build dependencies known to the configure script])],
|
||||
[LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no'])
|
||||
|
||||
if test "x$LIST_BUILDDEPS" = xyes; then
|
||||
echo
|
||||
echo List of build dependencies known to the configure script,
|
||||
echo that can be used in builddeps.conf files:
|
||||
cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODUL[E]\( | cut -f 2 -d ',' | tr -d ' ' | sort
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -26,3 +26,7 @@ PRODUCT_NAME="Java(TM)"
|
||||
PRODUCT_SUFFIX="SE Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME="Platform SE"
|
||||
COMPANY_NAME="Oracle Corporation"
|
||||
|
||||
# Might need better names for these
|
||||
MACOSX_BUNDLE_NAME_BASE="Java SE"
|
||||
MACOSX_BUNDLE_ID_BASE="com.oracle.java"
|
||||
|
||||
78
common/autoconf/compare.sh.in
Normal file
78
common/autoconf/compare.sh.in
Normal file
@@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script is processed by configure before it's usable. It is run from
|
||||
# the root of the build directory.
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# Substitutions from autoconf
|
||||
|
||||
LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
|
||||
|
||||
OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
|
||||
OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
|
||||
|
||||
AWK="@AWK@"
|
||||
CAT="@CAT@"
|
||||
CMP="@CMP@"
|
||||
CP="@CP@"
|
||||
CUT="@CUT@"
|
||||
DIFF="@DIFF@"
|
||||
DUMPBIN="@FIXPATH@ @DUMPBIN@"
|
||||
EXPR="@EXPR@"
|
||||
FILE="@FILE@"
|
||||
FIND="@FIND@"
|
||||
GREP="@GREP@"
|
||||
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap"
|
||||
LDD="@LDD@"
|
||||
MKDIR="@MKDIR@"
|
||||
NM="@NM@"
|
||||
OBJDUMP="@OBJDUMP@"
|
||||
OTOOL="@OTOOL@"
|
||||
PRINTF="@PRINTF@"
|
||||
READELF="@READELF@"
|
||||
RM="@RM@"
|
||||
SED="@SED@"
|
||||
SORT="@SORT@"
|
||||
STAT="@STAT@"
|
||||
STRIP="@POST_STRIP_CMD@"
|
||||
TEE="@TEE@"
|
||||
UNIQ="@UNIQ@"
|
||||
UNZIP="@UNZIP@"
|
||||
|
||||
SRC_ROOT="@SRC_ROOT@"
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
PATH="@VS_PATH@"
|
||||
fi
|
||||
|
||||
# Now locate the main script and run it.
|
||||
REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
|
||||
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
|
||||
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. "$REAL_COMPARE_SCRIPT" "$@"
|
||||
200
common/autoconf/configure
vendored
200
common/autoconf/configure
vendored
@@ -1,55 +1,121 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
if test "x$BASH_VERSION" = x; then
|
||||
echo This script needs bash to run.
|
||||
echo It is recommended to use the configure script in the source tree root instead.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONFIGURE_COMMAND_LINE="$@"
|
||||
conf_script_dir=`dirname $0`
|
||||
conf_closed_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
|
||||
|
||||
if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
|
||||
conf_custom_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
|
||||
else
|
||||
conf_custom_script_dir=$CUSTOM_CONFIG_DIR
|
||||
fi
|
||||
|
||||
###
|
||||
### Test that the generated configure is up-to-date
|
||||
###
|
||||
|
||||
# On Solaris /bin/sh doesn't support test -nt but /usr/bin/test does.
|
||||
TEST=`which test`
|
||||
|
||||
print_error_not_up_to_date() {
|
||||
echo "Error: The configure source files is newer than the generated files."
|
||||
echo "Please run 'sh autogen.sh' to update the generated files."
|
||||
run_autogen_or_fail() {
|
||||
if test "x`which autoconf 2> /dev/null`" = x; then
|
||||
echo "Cannot locate autoconf, unable to correct situation."
|
||||
echo "Please install autoconf and run 'bash autogen.sh' to update the generated files."
|
||||
echo "Error: Cannot continue" 1>&2
|
||||
exit 1
|
||||
else
|
||||
echo "Running autogen.sh to correct the situation"
|
||||
bash $conf_script_dir/autogen.sh
|
||||
fi
|
||||
}
|
||||
|
||||
for file in configure.ac *.m4 ; do
|
||||
if $TEST $file -nt generated-configure.sh; then
|
||||
print_error_not_up_to_date
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
|
||||
# If closed source configure is available, make sure it is up-to-date as well.
|
||||
for file in configure.ac *.m4 $conf_closed_script_dir/*.m4; do
|
||||
if $TEST $file -nt $conf_closed_script_dir/generated-configure.sh; then
|
||||
print_error_not_up_to_date
|
||||
exit 1
|
||||
check_autoconf_timestamps() {
|
||||
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 ; do
|
||||
if test $file -nt $conf_script_dir/generated-configure.sh; then
|
||||
echo "Warning: The configure source files is newer than the generated files."
|
||||
run_autogen_or_fail
|
||||
fi
|
||||
done
|
||||
|
||||
# Test if open configure is newer than closed configure, if so, closed needs to
|
||||
# be regenerated.
|
||||
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh | cut -d" " -f 3`
|
||||
conf_closed_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_closed_script_dir/generated-configure.sh | cut -d" " -f 3`
|
||||
if $TEST $conf_open_configure_timestamp -gt $conf_closed_configure_timestamp; then
|
||||
print_error_not_up_to_date
|
||||
exit 1
|
||||
if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
# If custom source configure is available, make sure it is up-to-date as well.
|
||||
for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $conf_custom_script_dir/*.m4; do
|
||||
if test $file -nt $conf_custom_script_dir/generated-configure.sh; then
|
||||
echo "Warning: The configure source files is newer than the custom generated files."
|
||||
run_autogen_or_fail
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
check_hg_updates() {
|
||||
if test "x`which hg 2> /dev/null`" != x; then
|
||||
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2> /dev/null | grep autoconf`
|
||||
if test "x$conf_updated_autoconf_files" != x; then
|
||||
echo "Configure source code has been updated, checking time stamps"
|
||||
check_autoconf_timestamps
|
||||
fi
|
||||
|
||||
if test -e $conf_custom_script_dir; then
|
||||
# If custom source configure is available, make sure it is up-to-date as well.
|
||||
conf_custom_updated_autoconf_files=`cd $conf_custom_script_dir && hg status -mard 2> /dev/null | grep autoconf`
|
||||
if test "x$conf_custom_updated_autoconf_files" != x; then
|
||||
echo "Configure custom source code has been updated, checking time stamps"
|
||||
check_autoconf_timestamps
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for local changes
|
||||
check_hg_updates
|
||||
|
||||
if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
# Test if open configure is newer than custom configure, if so, custom needs to
|
||||
# be regenerated. This test is required to ensure consistency with custom source.
|
||||
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
|
||||
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_custom_script_dir/generated-configure.sh | cut -d"=" -f 2`
|
||||
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
|
||||
echo "Warning: The generated configure file contains changes not present in the custom generated file."
|
||||
run_autogen_or_fail
|
||||
fi
|
||||
fi
|
||||
|
||||
# Autoconf calls the configure script recursively sometimes.
|
||||
# Don't start logging twice in that case
|
||||
if test "x$conf_debug_configure" = xtrue; then
|
||||
conf_debug_configure=recursive
|
||||
fi
|
||||
###
|
||||
### Process command-line arguments
|
||||
###
|
||||
conf_processed_arguments=
|
||||
conf_processed_arguments=()
|
||||
conf_openjdk_target=
|
||||
conf_extra_cflags=
|
||||
conf_extra_cxxflags=
|
||||
|
||||
for conf_option
|
||||
do
|
||||
@@ -57,14 +123,14 @@ do
|
||||
--openjdk-target=*)
|
||||
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
continue ;;
|
||||
--with-extra-cflags=*)
|
||||
conf_extra_cflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
continue ;;
|
||||
--with-extra-cxxflags=*)
|
||||
conf_extra_cxxflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
||||
--debug-configure)
|
||||
if test "x$conf_debug_configure" != xrecursive; then
|
||||
conf_debug_configure=true
|
||||
export conf_debug_configure
|
||||
fi
|
||||
continue ;;
|
||||
*)
|
||||
conf_processed_arguments="$conf_processed_arguments $conf_option" ;;
|
||||
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
|
||||
esac
|
||||
|
||||
case $conf_option in
|
||||
@@ -74,11 +140,13 @@ do
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-help | --help | --hel | --he | -h)
|
||||
conf_print_help=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if $TEST "x$conf_legacy_crosscompile" != "x"; then
|
||||
if $TEST "x$conf_openjdk_target" != "x"; then
|
||||
if test "x$conf_legacy_crosscompile" != "x"; then
|
||||
if test "x$conf_openjdk_target" != "x"; then
|
||||
echo "Error: Specifying --openjdk-target together with autoconf"
|
||||
echo "legacy cross-compilation flags is not supported."
|
||||
echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile."
|
||||
@@ -91,31 +159,69 @@ if $TEST "x$conf_legacy_crosscompile" != "x"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if $TEST "x$conf_openjdk_target" != "x"; then
|
||||
if test "x$conf_openjdk_target" != "x"; then
|
||||
conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
|
||||
conf_processed_arguments="--build=$conf_build_platform --host=$conf_openjdk_target --target=$conf_openjdk_target $conf_processed_arguments"
|
||||
conf_processed_arguments=("--build=$conf_build_platform" "--host=$conf_openjdk_target" "--target=$conf_openjdk_target" "${conf_processed_arguments[@]}")
|
||||
fi
|
||||
|
||||
# Make configure exit with error on invalid options as default.
|
||||
# Can be overridden by --disable-option-checking, since we prepend our argument
|
||||
# and later options override earlier.
|
||||
conf_processed_arguments="--enable-option-checking=fatal $conf_processed_arguments"
|
||||
conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arguments[@]}")
|
||||
|
||||
###
|
||||
### Call the configure script
|
||||
###
|
||||
if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
|
||||
# Closed source configure available; run that instead
|
||||
. $conf_closed_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
|
||||
if test -e $conf_custom_script_dir/generated-configure.sh; then
|
||||
# Custom source configure available; run that instead
|
||||
echo Running custom generated-configure.sh
|
||||
conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
|
||||
else
|
||||
. $conf_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
|
||||
echo Running generated-configure.sh
|
||||
conf_script_to_run=$conf_script_dir/generated-configure.sh
|
||||
fi
|
||||
|
||||
if test "x$conf_debug_configure" != x; then
|
||||
# Turn on shell debug output if requested (initial or recursive)
|
||||
set -x
|
||||
fi
|
||||
|
||||
if test "x$conf_debug_configure" = xtrue; then
|
||||
# Turn on logging, but don't turn on twice when called recursive
|
||||
conf_debug_logfile=./debug-configure.log
|
||||
(exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile
|
||||
else
|
||||
( . $conf_script_to_run "${conf_processed_arguments[@]}" )
|
||||
fi
|
||||
|
||||
conf_result_code=$?
|
||||
###
|
||||
### Post-processing
|
||||
###
|
||||
|
||||
if test $conf_result_code -eq 0; then
|
||||
if test "x$conf_print_help" = xtrue; then
|
||||
cat <<EOT
|
||||
|
||||
Additional (non-autoconf) OpenJDK Options:
|
||||
--openjdk-target=TARGET cross-compile with TARGET as target platform
|
||||
(i.e. the one you will run the resulting binary on).
|
||||
Equivalent to --host=TARGET --target=TARGET
|
||||
--build=<current platform>
|
||||
--debug-configure Run the configure script with additional debug
|
||||
logging enabled.
|
||||
|
||||
Please be aware that, when cross-compiling, the OpenJDK configure script will
|
||||
generally use 'target' where autoconf traditionally uses 'host'.
|
||||
EOT
|
||||
fi
|
||||
else
|
||||
echo configure exiting with result code $conf_result_code
|
||||
fi
|
||||
|
||||
# Move the log file to the output root, if this was successfully created
|
||||
if $TEST -d "$OUTPUT_ROOT"; then
|
||||
if test -d "$OUTPUT_ROOT"; then
|
||||
mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
|
||||
fi
|
||||
|
||||
exit $conf_result_code
|
||||
|
||||
@@ -31,16 +31,14 @@
|
||||
|
||||
|
||||
AC_PREREQ([2.61])
|
||||
AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net)
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
# DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@
|
||||
AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
|
||||
# Include these first...
|
||||
m4_include([basics.m4])
|
||||
m4_include([basics_windows.m4])
|
||||
m4_include([builddeps.m4])
|
||||
# ... then the rest
|
||||
m4_include([boot-jdk.m4])
|
||||
@@ -51,29 +49,63 @@ m4_include([libraries.m4])
|
||||
m4_include([platform.m4])
|
||||
m4_include([source-dirs.m4])
|
||||
m4_include([toolchain.m4])
|
||||
m4_include([toolchain_windows.m4])
|
||||
|
||||
# This line needs to be here, verbatim, after all includes.
|
||||
# It is replaced with closed functionality when building
|
||||
# closed sources.
|
||||
AC_DEFUN_ONCE([CLOSED_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
|
||||
|
||||
# This line needs to be here, verbatim, after all includes and the dummy hook
|
||||
# definitions. It is replaced with custom functionality when building
|
||||
# custom sources.
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Initialization
|
||||
# Initialization / Boot-strapping
|
||||
#
|
||||
# The bootstrapping process needs to solve the "chicken or the egg" problem,
|
||||
# thus it jumps back and forth, each time gaining something needed later on.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Basic initialization that must happen first of all
|
||||
BASIC_INIT
|
||||
BASIC_SETUP_FUNDAMENTAL_TOOLS
|
||||
|
||||
# Now we can determine OpenJDK build and target platforms. This is required to
|
||||
# have early on.
|
||||
PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
|
||||
|
||||
# Continue setting up basic stuff. Most remaining code require fundamental tools.
|
||||
BASIC_SETUP_PATHS
|
||||
BASIC_SETUP_LOGGING
|
||||
|
||||
# These are needed to be able to create a configuration name (and thus the output directory)
|
||||
JDKOPT_SETUP_JDK_VARIANT
|
||||
JDKOPT_SETUP_JVM_VARIANTS
|
||||
JDKOPT_SETUP_DEBUG_LEVEL
|
||||
|
||||
# With basic setup done, call the custom early hook.
|
||||
CUSTOM_EARLY_HOOK
|
||||
|
||||
# To properly create a configuration name, we need to have the OpenJDK target
|
||||
# and options (variants and debug level) parsed.
|
||||
BASIC_SETUP_OUTPUT_DIR
|
||||
|
||||
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
|
||||
HELP_SETUP_DEPENDENCY_HELP
|
||||
|
||||
# Setup simple tools, that do not need have cross compilation support.
|
||||
# Without these, we can't properly run the rest of the configure script.
|
||||
BASIC_SETUP_TOOLS
|
||||
# Setup tools that requires more complex handling, or that is not needed by the configure script.
|
||||
BASIC_SETUP_COMPLEX_TOOLS
|
||||
|
||||
# Check if pkg-config is available.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# After basic tools have been setup, we can check build os specific details.
|
||||
PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
|
||||
|
||||
# Setup builddeps, for automatic downloading of tools we need.
|
||||
# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
|
||||
@@ -81,22 +113,6 @@ BASIC_SETUP_TOOLS
|
||||
BDEPS_CONFIGURE_BUILDDEPS
|
||||
BDEPS_SCAN_FOR_BUILDDEPS
|
||||
|
||||
# Check if pkg-config is available.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Determine OpenJDK build and target platforms.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
|
||||
PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
|
||||
|
||||
# With knowledge of the build platform, setup more basic things.
|
||||
BASIC_SETUP_PATH_SEP
|
||||
BASIC_SETUP_SEARCHPATH
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Determine OpenJDK variants, options and version numbers.
|
||||
@@ -104,16 +120,9 @@ BASIC_SETUP_SEARCHPATH
|
||||
###############################################################################
|
||||
|
||||
# We need build & target for this.
|
||||
JDKOPT_SETUP_JDK_VARIANT
|
||||
JDKOPT_SETUP_JVM_VARIANTS
|
||||
JDKOPT_SETUP_DEBUG_LEVEL
|
||||
JDKOPT_SETUP_JDK_OPTIONS
|
||||
JDKOPT_SETUP_JDK_VERSION_NUMBERS
|
||||
|
||||
# To properly create a configuration name, we need to have the OpenJDK target
|
||||
# and options (variants and debug level) parsed.
|
||||
BASIC_SETUP_OUTPUT_DIR
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup BootJDK, used to bootstrap the build.
|
||||
@@ -141,14 +150,13 @@ SRCDIRS_SETUP_OUTPUT_DIRS
|
||||
###############################################################################
|
||||
|
||||
TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
|
||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||
# Locate the actual tools
|
||||
TOOLCHAIN_SETUP_PATHS
|
||||
|
||||
# FIXME: Currently we must test this after paths but before flags. Fix!
|
||||
|
||||
# And we can test some aspects on the target using configure macros.
|
||||
PLATFORM_TEST_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
|
||||
# Configure flags for the tools
|
||||
@@ -156,10 +164,6 @@ TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||
|
||||
# After we have toolchain, we can compile the uncygdrive helper
|
||||
BASIC_COMPILE_UNCYGDRIVE
|
||||
|
||||
|
||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||
JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||
|
||||
@@ -177,6 +181,9 @@ LIB_SETUP_ALSA
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_STATIC_LINK_LIBSTDCPP
|
||||
|
||||
# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
|
||||
BASIC_COMPILE_FIXPATH
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# We need to do some final tweaking, when everything else is done.
|
||||
@@ -213,8 +220,8 @@ BPERF_SETUP_CCACHE
|
||||
# Check for some common pitfalls
|
||||
BASIC_TEST_USABILITY_ISSUES
|
||||
|
||||
# At the end, call the closed hook. (Dummy macro if no closed sources available)
|
||||
CLOSED_HOOK
|
||||
# At the end, call the custom hook. (Dummy macro if no custom sources available)
|
||||
CUSTOM_LATE_HOOK
|
||||
|
||||
# We're messing a bit with internal autoconf variables to put the config.status
|
||||
# in the output directory instead of the current directory.
|
||||
@@ -222,5 +229,8 @@ CONFIG_STATUS="$OUTPUT_ROOT/config.status"
|
||||
# Create the actual output files. Now the main work of configure is done.
|
||||
AC_OUTPUT
|
||||
|
||||
# Make the compare script executable
|
||||
$CHMOD +x $OUTPUT_ROOT/compare.sh
|
||||
|
||||
# Finally output some useful information to the user
|
||||
HELP_PRINT_SUMMARY_AND_WARNINGS
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -55,6 +55,19 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
fi
|
||||
])
|
||||
|
||||
cygwin_help() {
|
||||
case $1 in
|
||||
unzip)
|
||||
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
|
||||
zip)
|
||||
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
|
||||
make)
|
||||
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
}
|
||||
|
||||
apt_help() {
|
||||
case $1 in
|
||||
devkit)
|
||||
@@ -149,7 +162,15 @@ printf "* Debug level: $DEBUG_LEVEL\n"
|
||||
printf "* JDK variant: $JDK_VARIANT\n"
|
||||
printf "* JVM variants: $with_jvm_variants\n"
|
||||
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
|
||||
printf "* Boot JDK: $BOOT_JDK\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Tools summary:\n"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
|
||||
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
|
||||
100
common/autoconf/hotspot-spec.gmk.in
Normal file
100
common/autoconf/hotspot-spec.gmk.in
Normal file
@@ -0,0 +1,100 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
|
||||
# Chaining of spec files
|
||||
HOTSPOT_SPEC:=$(dir $(SPEC))hotspot-spec.gmk
|
||||
override SPEC=$(HOTSPOT_SPEC)
|
||||
# Now include the base spec.gmk file
|
||||
include $(BASE_SPEC)
|
||||
|
||||
# Additional legacy variables defined for Hotspot
|
||||
|
||||
@SET_OPENJDK@
|
||||
|
||||
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
|
||||
@BUILD_HEADLESS@
|
||||
|
||||
# Legacy setting: OPT or DBG
|
||||
VARIANT:=@VARIANT@
|
||||
# Legacy setting: true or false
|
||||
FASTDEBUG:=@FASTDEBUG@
|
||||
# Legacy setting: debugging the class files?
|
||||
DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@
|
||||
|
||||
ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
|
||||
|
||||
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
|
||||
# compiler that produces code that can be run on the build platform.
|
||||
HOSTCC:=@FIXPATH@ @BUILD_CC@
|
||||
HOSTCXX:=@FIXPATH@ @BUILD_CXX@
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Legacy Hotspot support
|
||||
|
||||
# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here.
|
||||
@DEFINE_CROSS_COMPILE_ARCH@
|
||||
|
||||
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
|
||||
PLATFORM=$(OPENJDK_TARGET_OS)
|
||||
# 32 or 64 bit
|
||||
ARCH_DATA_MODEL=$(OPENJDK_TARGET_CPU_BITS)
|
||||
|
||||
ALT_BOOTDIR=$(BOOT_JDK)
|
||||
# Can be /sparcv9 or /amd64 on Solaris
|
||||
ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR)
|
||||
# Yet another name for arch used for an extra subdir below the jvm lib.
|
||||
# Uses i386 and amd64, instead of x86 and x86_64.
|
||||
LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB)
|
||||
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of x86 and x86_64.
|
||||
ARCH=$(OPENJDK_TARGET_CPU_LEGACY)
|
||||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64:=1
|
||||
@LP64@
|
||||
|
||||
ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
|
||||
ALT_EXPORT_PATH=$(HOTSPOT_DIST)
|
||||
|
||||
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@
|
||||
# This is used from the libjvm build for C/C++ code.
|
||||
HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD=@TEST_IN_BUILD@
|
||||
|
||||
# For hotspot, override compiler/tools definition to not include FIXPATH prefix.
|
||||
# Hotspot has its own handling on the Windows path situation.
|
||||
CXX:=@CCACHE@ @HOTSPOT_CXX@
|
||||
LD:=@HOTSPOT_LD@
|
||||
MT:=@HOTSPOT_MT@
|
||||
RC:=@HOTSPOT_RC@
|
||||
|
||||
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
|
||||
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
|
||||
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
||||
|
||||
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
|
||||
# This is needed to get the LOG setting to work properly.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
@@ -30,7 +30,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
|
||||
# Check which variant of the JDK that we want to build.
|
||||
# Currently we have:
|
||||
# normal: standard edition
|
||||
# embedded: cut down to a smaller footprint
|
||||
# but the custom make system may add other variants
|
||||
#
|
||||
# Effectively the JDK variant gives a name to a specific set of
|
||||
# modules to compile into the JDK. In the future, these modules
|
||||
@@ -38,22 +38,14 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
|
||||
#
|
||||
AC_MSG_CHECKING([which variant of the JDK to build])
|
||||
AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
|
||||
[JDK variant to build (normal, embedded) @<:@normal@:>@])])
|
||||
[JDK variant to build (normal) @<:@normal@:>@])])
|
||||
|
||||
if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
|
||||
JAVASE_EMBEDDED=""
|
||||
MINIMIZE_RAM_USAGE=""
|
||||
JDK_VARIANT="normal"
|
||||
elif test "x$with_jdk_variant" = xembedded; then
|
||||
JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
|
||||
MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
|
||||
JDK_VARIANT="embedded"
|
||||
else
|
||||
AC_MSG_ERROR([The available JDK variants are: normal, embedded])
|
||||
AC_MSG_ERROR([The available JDK variants are: normal])
|
||||
fi
|
||||
|
||||
AC_SUBST(JAVASE_EMBEDDED)
|
||||
AC_SUBST(MINIMIZE_RAM_USAGE)
|
||||
AC_SUBST(JDK_VARIANT)
|
||||
|
||||
AC_MSG_RESULT([$JDK_VARIANT])
|
||||
@@ -72,16 +64,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
|
||||
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
|
||||
# zero: no machine code interpreter, no compiler
|
||||
# zeroshark: zero interpreter and shark/llvm compiler backend
|
||||
AC_MSG_CHECKING([which variants of the JVM that should be built])
|
||||
AC_MSG_CHECKING([which variants of the JVM to build])
|
||||
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
|
||||
[JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
|
||||
|
||||
if test "x$with_jvm_variants" = x; then
|
||||
if test "x$JDK_VARIANT" = xembedded; then
|
||||
with_jvm_variants="client"
|
||||
else
|
||||
with_jvm_variants="server"
|
||||
fi
|
||||
fi
|
||||
|
||||
JVM_VARIANTS=",$with_jvm_variants,"
|
||||
@@ -125,6 +113,11 @@ AC_SUBST(JVM_VARIANT_KERNEL)
|
||||
AC_SUBST(JVM_VARIANT_ZERO)
|
||||
AC_SUBST(JVM_VARIANT_ZEROSHARK)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
MACOSX_UNIVERSAL="true"
|
||||
fi
|
||||
|
||||
AC_SUBST(MACOSX_UNIVERSAL)
|
||||
|
||||
])
|
||||
|
||||
@@ -223,6 +216,14 @@ fi
|
||||
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
|
||||
|
||||
# On Macosx universal binaries are produced, but they only contain
|
||||
# 64 bit intel. This invalidates control of which jvms are built
|
||||
# from configure, but only server is valid anyway. Fix this
|
||||
# when hotspot makefiles are rewritten.
|
||||
if test "x$MACOSX_UNIVERSAL" = xtrue; then
|
||||
HOTSPOT_TARGET=universal_product
|
||||
fi
|
||||
|
||||
#####
|
||||
|
||||
AC_SUBST(DEBUG_LEVEL)
|
||||
@@ -240,40 +241,39 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
# Should we build only OpenJDK even if closed sources are present?
|
||||
#
|
||||
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
|
||||
[build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
|
||||
[supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
|
||||
|
||||
if test "x$enable_openjdk_only" = "xyes"; then
|
||||
OPENJDK=true
|
||||
elif test "x$enable_openjdk_only" = "xno"; then
|
||||
OPENJDK=false
|
||||
elif test -d "$SRC_ROOT/jdk/src/closed"; then
|
||||
OPENJDK=false
|
||||
AC_MSG_CHECKING([for presence of closed sources])
|
||||
if test -d "$SRC_ROOT/jdk/src/closed"; then
|
||||
CLOSED_SOURCE_PRESENT=yes
|
||||
else
|
||||
CLOSED_SOURCE_PRESENT=no
|
||||
fi
|
||||
AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
|
||||
|
||||
AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
|
||||
SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
|
||||
AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
|
||||
|
||||
if test "x$CLOSED_SOURCE_PRESENT" = xno; then
|
||||
OPENJDK=true
|
||||
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
|
||||
AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
|
||||
fi
|
||||
else
|
||||
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
|
||||
OPENJDK=true
|
||||
else
|
||||
OPENJDK=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK" = "xtrue"; then
|
||||
SET_OPENJDK=OPENJDK=true
|
||||
SET_OPENJDK="OPENJDK=true"
|
||||
fi
|
||||
|
||||
AC_SUBST(SET_OPENJDK)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# JIGSAW or not. The JIGSAW variable is used during the intermediate
|
||||
# stage when we are building both the old style JDK and the new style modularized JDK.
|
||||
# When the modularized JDK is finalized, this option will go away.
|
||||
#
|
||||
AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
|
||||
[build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
|
||||
|
||||
if test "x$enable_jigsaw" = "xyes"; then
|
||||
JIGSAW=true
|
||||
else
|
||||
JIGSAW=false
|
||||
fi
|
||||
AC_SUBST(JIGSAW)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we build a JDK/JVM with headful support (ie a graphical ui)?
|
||||
@@ -281,7 +281,7 @@ AC_SUBST(JIGSAW)
|
||||
#
|
||||
AC_MSG_CHECKING([headful support])
|
||||
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
|
||||
[build headful support (graphical UI support) @<:@enabled@:>@])],
|
||||
[disable building headful support (graphical UI support) @<:@enabled@:>@])],
|
||||
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
|
||||
|
||||
SUPPORT_HEADLESS=yes
|
||||
@@ -289,14 +289,12 @@ BUILD_HEADLESS="BUILD_HEADLESS:=true"
|
||||
|
||||
if test "x$SUPPORT_HEADFUL" = xyes; then
|
||||
# We are building both headful and headless.
|
||||
BUILD_HEADLESS_ONLY=""
|
||||
headful_msg="inlude support for both headful and headless"
|
||||
fi
|
||||
|
||||
if test "x$SUPPORT_HEADFUL" = xno; then
|
||||
# Thus we are building headless only.
|
||||
BUILD_HEADLESS="BUILD_HEADLESS:=true"
|
||||
BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
|
||||
headful_msg="headless only"
|
||||
fi
|
||||
|
||||
@@ -305,43 +303,10 @@ AC_MSG_RESULT([$headful_msg])
|
||||
AC_SUBST(SUPPORT_HEADLESS)
|
||||
AC_SUBST(SUPPORT_HEADFUL)
|
||||
AC_SUBST(BUILD_HEADLESS)
|
||||
AC_SUBST(BUILD_HEADLESS_ONLY)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we run the painfully slow javadoc tool?
|
||||
#
|
||||
AC_MSG_CHECKING([whether to build documentation])
|
||||
AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs],
|
||||
[enable generation of Javadoc documentation @<:@disabled@:>@])],
|
||||
[ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no'])
|
||||
AC_MSG_RESULT([$ENABLE_DOCS])
|
||||
AC_SUBST(ENABLE_DOCS)
|
||||
GENERATE_DOCS=false
|
||||
if test "x$ENABLE_DOCS" = xyes; then
|
||||
GENERATE_DOCS=true
|
||||
fi
|
||||
AC_SUBST(GENERATE_DOCS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we compile nimbus swing L&F? We can probably remove this option
|
||||
# since nimbus is officially part of javax now.
|
||||
#
|
||||
AC_MSG_CHECKING([whether to build nimbus L&F])
|
||||
AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
|
||||
[disable Nimbus L&F @<:@enabled@:>@])],
|
||||
[ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
|
||||
AC_MSG_RESULT([$ENABLE_NIMBUS])
|
||||
DISABLE_NIMBUS=
|
||||
if test "x$ENABLE_NIMBUS" = xno; then
|
||||
DISABLE_NIMBUS=true
|
||||
fi
|
||||
AC_SUBST(DISABLE_NIMBUS)
|
||||
|
||||
# Control wether Hotspot runs Queens test after build.
|
||||
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
|
||||
[enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
|
||||
[run the Queens test after Hotspot build @<:@disabled@:>@])],,
|
||||
[enable_hotspot_test_in_build=no])
|
||||
if test "x$enable_hotspot_test_in_build" = "xyes"; then
|
||||
TEST_IN_BUILD=true
|
||||
@@ -367,49 +332,27 @@ else
|
||||
fi
|
||||
AC_SUBST(CACERTS_FILE)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Enable or disable unlimited crypto
|
||||
#
|
||||
AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
|
||||
[Enable unlimited crypto policy @<:@disabled@:>@])],,
|
||||
[enable_unlimited_crypto=no])
|
||||
if test "x$enable_unlimited_crypto" = "xyes"; then
|
||||
UNLIMITED_CRYPTO=true
|
||||
else
|
||||
UNLIMITED_CRYPTO=false
|
||||
fi
|
||||
AC_SUBST(UNLIMITED_CRYPTO)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
#
|
||||
COMPRESS_JARS=false
|
||||
|
||||
# default for embedded is yes...
|
||||
if test "x$JDK_VARIANT" = "xembedded"; then
|
||||
COMPRESS_JARS=true
|
||||
fi
|
||||
AC_SUBST(COMPRESS_JARS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Should we compile JFR
|
||||
# default no, except for on closed-jdk and !embedded
|
||||
#
|
||||
ENABLE_JFR=no
|
||||
|
||||
# Is the JFR source present
|
||||
|
||||
#
|
||||
# For closed && !embedded default is yes if the source is present
|
||||
#
|
||||
if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then
|
||||
ENABLE_JFR=yes
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to build jfr])
|
||||
AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
|
||||
[enable jfr (default is no)])]
|
||||
[ENABLE_JFR="${enableval}"])
|
||||
AC_MSG_RESULT([${ENABLE_JFR}])
|
||||
|
||||
if test "x$ENABLE_JFR" = "xyes"; then
|
||||
ENABLE_JFR=true
|
||||
elif test "x$ENABLE_JFR" = "xno"; then
|
||||
ENABLE_JFR=false
|
||||
else
|
||||
AC_MSG_ERROR([Invalid argument to --enable-jfr])
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_JFR)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
|
||||
@@ -431,6 +374,8 @@ AC_SUBST(PRODUCT_NAME)
|
||||
AC_SUBST(PRODUCT_SUFFIX)
|
||||
AC_SUBST(JDK_RC_PLATFORM_NAME)
|
||||
AC_SUBST(COMPANY_NAME)
|
||||
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
|
||||
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
|
||||
|
||||
COPYRIGHT_YEAR=`date +'%Y'`
|
||||
AC_SUBST(COPYRIGHT_YEAR)
|
||||
@@ -459,7 +404,7 @@ else
|
||||
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
|
||||
# Avoid [:alnum:] since it depends on the locale.
|
||||
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
|
||||
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
|
||||
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
|
||||
fi
|
||||
AC_SUBST(FULL_VERSION)
|
||||
@@ -469,7 +414,7 @@ AC_SUBST(COOKED_BUILD_NUMBER)
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
|
||||
[
|
||||
HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
|
||||
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
|
||||
AC_SUBST(HOTSPOT_MAKE_ARGS)
|
||||
|
||||
# The name of the Service Agent jar.
|
||||
@@ -494,13 +439,8 @@ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
fi
|
||||
|
||||
# default for embedded is no...
|
||||
if test "x$JDK_VARIANT" = "xembedded"; then
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([debug-symbols],
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])],
|
||||
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
|
||||
[ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
|
||||
)
|
||||
|
||||
@@ -514,7 +454,7 @@ fi
|
||||
|
||||
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
|
||||
# Default is on if objcopy is found, otherwise off
|
||||
if test "x$OBJCOPY" != x; then
|
||||
if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
ENABLE_DEBUG_SYMBOLS=yes
|
||||
else
|
||||
ENABLE_DEBUG_SYMBOLS=no
|
||||
@@ -529,7 +469,7 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
|
||||
ZIP_DEBUGINFO_FILES=yes
|
||||
|
||||
AC_ARG_ENABLE([zip-debug-info],
|
||||
[AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])],
|
||||
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
|
||||
[ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
|
||||
)
|
||||
|
||||
@@ -549,3 +489,11 @@ AC_SUBST(ZIP_DEBUGINFO_FILES)
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
])
|
||||
|
||||
# Support for customization of the build process. Some build files
|
||||
# will include counterparts from this location, if they exist. This allows
|
||||
# for a degree of customization of the build targets and the rules/recipes
|
||||
# to create them
|
||||
AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
|
||||
[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
|
||||
AC_SUBST(CUSTOM_MAKE_DIR)
|
||||
|
||||
@@ -73,6 +73,10 @@ if test "x$OPENJDK" = "xfalse"; then
|
||||
FREETYPE2_NOT_NEEDED=yes
|
||||
fi
|
||||
|
||||
if test "x$SUPPORT_HEADFUL" = xno; then
|
||||
X11_NOT_NEEDED=yes
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
|
||||
@@ -168,9 +172,15 @@ fi
|
||||
AC_LANG_PUSH(C)
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||
|
||||
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
|
||||
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
|
||||
[X11_A_OK=yes],
|
||||
[X11_A_OK=no])
|
||||
[X11_A_OK=no],
|
||||
[ # include <X11/Xlib.h>
|
||||
# include <X11/Xutil.h>
|
||||
])
|
||||
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
|
||||
@@ -192,27 +202,23 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
|
||||
#
|
||||
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
|
||||
[specify prefix directory for the cups package
|
||||
(expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
(expecting the headers under PATH/include)])])
|
||||
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
|
||||
[specify directory for the cups include files])])
|
||||
AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
|
||||
[specify directory for the cups library])])
|
||||
|
||||
if test "x$CUPS_NOT_NEEDED" = xyes; then
|
||||
if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
|
||||
if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
|
||||
AC_MSG_WARN([cups not used, so --with-cups is ignored])
|
||||
fi
|
||||
CUPS_CFLAGS=
|
||||
CUPS_LIBS=
|
||||
else
|
||||
CUPS_FOUND=no
|
||||
|
||||
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
|
||||
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
|
||||
AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
|
||||
fi
|
||||
|
||||
if test "x${with_cups}" != x; then
|
||||
CUPS_LIBS="-L${with_cups}/lib -lcups"
|
||||
CUPS_CFLAGS="-I${with_cups}/include"
|
||||
CUPS_FOUND=yes
|
||||
fi
|
||||
@@ -220,10 +226,6 @@ else
|
||||
CUPS_CFLAGS="-I${with_cups_include}"
|
||||
CUPS_FOUND=yes
|
||||
fi
|
||||
if test "x${with_cups_lib}" != x; then
|
||||
CUPS_LIBS="-L${with_cups_lib} -lcups"
|
||||
CUPS_FOUND=yes
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
|
||||
fi
|
||||
@@ -232,23 +234,20 @@ else
|
||||
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
|
||||
[CUPS_FOUND=yes
|
||||
CUPS_CFLAGS=
|
||||
CUPS_LIBS="-lcups"
|
||||
DEFAULT_CUPS=yes])
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
# Getting nervous now? Lets poke around for standard Solaris third-party
|
||||
# package installation locations.
|
||||
AC_MSG_CHECKING([for cups headers and libs])
|
||||
AC_MSG_CHECKING([for cups headers])
|
||||
if test -s /opt/sfw/cups/include/cups/cups.h; then
|
||||
# An SFW package seems to be installed!
|
||||
CUPS_FOUND=yes
|
||||
CUPS_CFLAGS="-I/opt/sfw/cups/include"
|
||||
CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
|
||||
elif test -s /opt/csw/include/cups/cups.h; then
|
||||
# A CSW package seems to be installed!
|
||||
CUPS_FOUND=yes
|
||||
CUPS_CFLAGS="-I/opt/csw/include"
|
||||
CUPS_LIBS="-L/opt/csw/lib -lcups"
|
||||
fi
|
||||
AC_MSG_RESULT([$CUPS_FOUND])
|
||||
fi
|
||||
@@ -259,7 +258,6 @@ else
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_CFLAGS)
|
||||
AC_SUBST(CUPS_LIBS)
|
||||
|
||||
])
|
||||
|
||||
@@ -288,12 +286,16 @@ else
|
||||
FREETYPE2_FOUND=no
|
||||
|
||||
if test "x$with_freetype" != x; then
|
||||
SPACESAFE(with_freetype,[the path to freetype])
|
||||
BASIC_FIXUP_PATH(with_freetype)
|
||||
FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
|
||||
FREETYPE2_LIB_PATH="$with_freetype/lib"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
|
||||
FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
|
||||
FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
|
||||
fi
|
||||
FREETYPE2_LIB_PATH="$with_freetype/lib"
|
||||
FREETYPE2_CFLAGS="-I$with_freetype/include"
|
||||
if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
|
||||
FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
|
||||
@@ -307,7 +309,7 @@ else
|
||||
# List the contents of the lib.
|
||||
FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
|
||||
if test "x$FREETYPELIB" = x; then
|
||||
AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib])
|
||||
AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib])
|
||||
fi
|
||||
# Check one h-file
|
||||
if ! test -s "$with_freetype/include/ft2build.h"; then
|
||||
@@ -319,9 +321,34 @@ else
|
||||
BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
|
||||
USING_SYSTEM_FT_LIB=true
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
|
||||
BASIC_FIXUP_PATH(FREETYPELOCATION)
|
||||
AC_MSG_CHECKING([for freetype in some standard windows locations])
|
||||
if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
|
||||
FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
|
||||
FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
|
||||
FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
|
||||
if ! test -s "$FREETYPE2_LIBS"; then
|
||||
AC_MSG_ERROR([Could not find $FREETYPE2_LIBS])
|
||||
fi
|
||||
if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
|
||||
AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll])
|
||||
fi
|
||||
USING_SYSTEM_FT_LIB=true
|
||||
FREETYPE2_FOUND=yes
|
||||
fi
|
||||
AC_MSG_RESULT([$FREETYPE2_FOUND])
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
|
||||
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
|
||||
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
|
||||
USING_SYSTEM_FT_LIB=true
|
||||
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
|
||||
if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
|
||||
fi
|
||||
fi
|
||||
if test "x$FREETYPE2_FOUND" = xno; then
|
||||
AC_MSG_CHECKING([for freetype in some standard locations])
|
||||
@@ -361,6 +388,14 @@ else
|
||||
HELP_MSG_MISSING_DEPENDENCY([freetype2])
|
||||
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
# AC_CHECK_LIB does not support use of cl.exe
|
||||
PREV_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$FREETYPE2_LIBS"
|
||||
AC_CHECK_LIB(freetype, FT_Init_FreeType, [], AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
|
||||
LDFLAGS="$PREV_LDFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(USING_SYSTEM_FT_LIB)
|
||||
@@ -518,9 +553,7 @@ AC_SUBST(USE_EXTERNAL_LIBZ)
|
||||
|
||||
###############################################################################
|
||||
LIBZIP_CAN_USE_MMAP=true
|
||||
if test "x$JDK_VARIANT" = "xembedded"; then
|
||||
LIBZIP_CAN_USE_MMAP=false
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBZIP_CAN_USE_MMAP)
|
||||
|
||||
###############################################################################
|
||||
@@ -619,17 +652,20 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$enable_static_link_stdc__" = xyes; then
|
||||
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
|
||||
LDCXX="$CC"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=true"
|
||||
AC_MSG_RESULT([static])
|
||||
else
|
||||
LIBCXX="$LIBCXX -lstdc++"
|
||||
LDCXX="$CXX"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=false"
|
||||
AC_MSG_RESULT([dynamic])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(STATIC_CXX_SETTING)
|
||||
|
||||
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
|
||||
LIBCXX="/usr/lib${LEGACY_OPENJDK_TARGET_CPU3}/libCrun.so.1"
|
||||
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
|
||||
fi
|
||||
|
||||
# TODO better (platform agnostic) test
|
||||
|
||||
@@ -23,279 +23,96 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS],
|
||||
[
|
||||
# Expects $host_os $host_cpu $build_os and $build_cpu
|
||||
# and $with_target_bits to have been setup!
|
||||
#
|
||||
# Translate the standard triplet(quadruplet) definition
|
||||
# of the target/build system into
|
||||
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
|
||||
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
|
||||
# OPENJDK_TARGET_OS_API=posix,winapi
|
||||
#
|
||||
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
|
||||
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
|
||||
# OPENJDK_TARGET_CPU_BITS=32,64
|
||||
# OPENJDK_TARGET_CPU_ENDIAN=big,little
|
||||
#
|
||||
# The same values are setup for BUILD_...
|
||||
#
|
||||
# And the legacy variables, for controlling the old makefiles.
|
||||
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
|
||||
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
|
||||
# LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
|
||||
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
|
||||
#
|
||||
# We also copy the autoconf trip/quadruplet
|
||||
# verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
|
||||
OPENJDK_TARGET_SYSTEM="$host"
|
||||
OPENJDK_BUILD_SYSTEM="$build"
|
||||
AC_SUBST(OPENJDK_TARGET_SYSTEM)
|
||||
AC_SUBST(OPENJDK_BUILD_SYSTEM)
|
||||
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_TARGET,$host_os)
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_TARGET,$host_cpu)
|
||||
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_BUILD,$build_os)
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_BUILD,$build_cpu)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xsolaris; then
|
||||
LEGACY_OPENJDK_TARGET_CPU3=""
|
||||
LEGACY_OPENJDK_BUILD_CPU3=""
|
||||
fi
|
||||
|
||||
# On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
|
||||
LEGACY_OPENJDK_TARGET_CPU1="x86_64"
|
||||
fi
|
||||
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS_TO],
|
||||
[
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS($2)
|
||||
$1_OS="$VAR_OS"
|
||||
$1_OS_FAMILY="$VAR_OS_FAMILY"
|
||||
$1_OS_API="$VAR_OS_API"
|
||||
|
||||
AC_SUBST($1_OS)
|
||||
AC_SUBST($1_OS_FAMILY)
|
||||
AC_SUBST($1_OS_API)
|
||||
|
||||
if test "x$$1_OS_API" = xposix; then
|
||||
LEGACY_$1_OS_API="solaris"
|
||||
fi
|
||||
if test "x$$1_OS_API" = xwinapi; then
|
||||
LEGACY_$1_OS_API="windows"
|
||||
fi
|
||||
AC_SUBST(LEGACY_$1_OS_API)
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU_TO],
|
||||
[
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU($2)
|
||||
$1_CPU="$VAR_CPU"
|
||||
$1_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
$1_CPU_BITS="$VAR_CPU_BITS"
|
||||
$1_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
|
||||
AC_SUBST($1_CPU)
|
||||
AC_SUBST($1_CPU_ARCH)
|
||||
AC_SUBST($1_CPU_BITS)
|
||||
AC_SUBST($1_CPU_ENDIAN)
|
||||
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of ia32 and x64
|
||||
LEGACY_$1_CPU1="$VAR_LEGACY_CPU"
|
||||
AC_SUBST(LEGACY_$1_CPU1)
|
||||
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of ia32 and x64.
|
||||
LEGACY_$1_CPU2="$LEGACY_$1_CPU1"
|
||||
if test "x$LEGACY_$1_CPU1" = xi586; then
|
||||
LEGACY_$1_CPU2=i386
|
||||
fi
|
||||
AC_SUBST(LEGACY_$1_CPU2)
|
||||
|
||||
# And the third legacy naming of the cpu.
|
||||
# Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
|
||||
LEGACY_$1_CPU3=""
|
||||
if test "x$$1_CPU" = xx64; then
|
||||
LEGACY_$1_CPU3=amd64
|
||||
fi
|
||||
if test "x$$1_CPU" = xsparcv9; then
|
||||
LEGACY_$1_CPU3=sparcv9
|
||||
fi
|
||||
AC_SUBST(LEGACY_$1_CPU3)
|
||||
])
|
||||
|
||||
# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
|
||||
# Converts autoconf style CPU name to OpenJDK style, into
|
||||
# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
|
||||
[
|
||||
# First argument is the cpu name from the trip/quad
|
||||
case "$1" in
|
||||
x86_64)
|
||||
VAR_CPU=x64
|
||||
VAR_CPU=x86_64
|
||||
VAR_CPU_ARCH=x86
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
VAR_LEGACY_CPU=amd64
|
||||
;;
|
||||
i?86)
|
||||
VAR_CPU=ia32
|
||||
VAR_CPU=x86
|
||||
VAR_CPU_ARCH=x86
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=little
|
||||
VAR_LEGACY_CPU=i586
|
||||
;;
|
||||
alpha*)
|
||||
VAR_CPU=alpha
|
||||
VAR_CPU_ARCH=alpha
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=alpha
|
||||
;;
|
||||
arm*)
|
||||
VAR_CPU=arm
|
||||
VAR_CPU_ARCH=arm
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=little
|
||||
VAR_LEGACY_CPU=arm
|
||||
;;
|
||||
mips)
|
||||
VAR_CPU=mips
|
||||
VAR_CPU_ARCH=mips
|
||||
VAR_CPU_BITS=woot
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=mips
|
||||
;;
|
||||
mipsel)
|
||||
VAR_CPU=mipsel
|
||||
VAR_CPU_ARCH=mips
|
||||
VAR_CPU_BITS=woot
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=mipsel
|
||||
;;
|
||||
powerpc)
|
||||
VAR_CPU=ppc
|
||||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=ppc
|
||||
;;
|
||||
powerpc64)
|
||||
VAR_CPU=ppc64
|
||||
VAR_CPU_ARCH=ppc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=ppc64
|
||||
;;
|
||||
sparc)
|
||||
VAR_CPU=sparc
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=sparc
|
||||
;;
|
||||
sparc64)
|
||||
sparcv9)
|
||||
VAR_CPU=sparcv9
|
||||
VAR_CPU_ARCH=sparc
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=big
|
||||
VAR_LEGACY_CPU=sparcv9
|
||||
;;
|
||||
s390)
|
||||
VAR_CPU=s390
|
||||
VAR_CPU_ARCH=s390
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=s390
|
||||
VAR_LEGACY_CPU=s390
|
||||
;;
|
||||
s390x)
|
||||
VAR_CPU=s390x
|
||||
VAR_CPU_ARCH=s390
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=woot
|
||||
VAR_LEGACY_CPU=s390x
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported cpu $1])
|
||||
;;
|
||||
esac
|
||||
|
||||
# Workaround cygwin not knowing about 64 bit.
|
||||
if test "x$VAR_OS" = "xwindows"; then
|
||||
if test "x$PROCESSOR_IDENTIFIER" != "x"; then
|
||||
PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
|
||||
case "$PROC_ARCH" in
|
||||
intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
|
||||
VAR_CPU=x64
|
||||
VAR_CPU_BITS=64
|
||||
VAR_LEGACY_CPU=amd64
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# on solaris x86...default seems to be 32-bit
|
||||
if test "x$VAR_OS" = "xsolaris" && \
|
||||
test "x$with_target_bits" = "x" && \
|
||||
test "x$VAR_CPU_ARCH" = "xx86"
|
||||
then
|
||||
with_target_bits=32
|
||||
fi
|
||||
|
||||
if test "x$VAR_CPU_ARCH" = "xx86"; then
|
||||
if test "x$with_target_bits" = "x64"; then
|
||||
VAR_CPU=x64
|
||||
VAR_CPU_BITS=64
|
||||
VAR_LEGACY_CPU=amd64
|
||||
fi
|
||||
if test "x$with_target_bits" = "x32"; then
|
||||
VAR_CPU=ia32
|
||||
VAR_CPU_BITS=32
|
||||
VAR_LEGACY_CPU=i586
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$VAR_CPU_ARCH" = "xsparc"; then
|
||||
if test "x$with_target_bits" = "x64"; then
|
||||
VAR_CPU=sparcv9
|
||||
VAR_CPU_BITS=64
|
||||
VAR_LEGACY_CPU=sparcv9
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
|
||||
# Converts autoconf style OS name to OpenJDK style, into
|
||||
# VAR_OS and VAR_OS_API.
|
||||
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
|
||||
[
|
||||
case "$1" in
|
||||
*linux*)
|
||||
VAR_OS=linux
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=gnu
|
||||
VAR_OS_ENV=linux
|
||||
;;
|
||||
*solaris*)
|
||||
VAR_OS=solaris
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=sysv
|
||||
VAR_OS_ENV=solaris
|
||||
;;
|
||||
*darwin*)
|
||||
VAR_OS=macosx
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=bsd
|
||||
VAR_OS_ENV=macosx
|
||||
;;
|
||||
*bsd*)
|
||||
VAR_OS=bsd
|
||||
VAR_OS_API=posix
|
||||
VAR_OS_FAMILY=bsd
|
||||
VAR_OS_ENV=bsd
|
||||
;;
|
||||
*cygwin*|*windows*)
|
||||
*cygwin*)
|
||||
VAR_OS=windows
|
||||
VAR_OS_API=winapi
|
||||
VAR_OS_FAMILY=windows
|
||||
VAR_OS_ENV=windows.cygwin
|
||||
;;
|
||||
*mingw*)
|
||||
VAR_OS=windows
|
||||
VAR_OS_API=winapi
|
||||
VAR_OS_ENV=windows.msys
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported operating system $1])
|
||||
@@ -303,6 +120,220 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
|
||||
esac
|
||||
])
|
||||
|
||||
# Expects $host_os $host_cpu $build_os and $build_cpu
|
||||
# and $with_target_bits to have been setup!
|
||||
#
|
||||
# Translate the standard triplet(quadruplet) definition
|
||||
# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
|
||||
# OPENJDK_BUILD_OS, etc.
|
||||
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
[
|
||||
# Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
|
||||
# (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
|
||||
# Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
|
||||
# but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
|
||||
OPENJDK_TARGET_AUTOCONF_NAME="$host"
|
||||
OPENJDK_BUILD_AUTOCONF_NAME="$build"
|
||||
AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
|
||||
AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
|
||||
|
||||
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS($build_os)
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
|
||||
# ..and setup our own variables. (Do this explicitely to facilitate searching)
|
||||
OPENJDK_BUILD_OS="$VAR_OS"
|
||||
OPENJDK_BUILD_OS_API="$VAR_OS_API"
|
||||
OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
|
||||
OPENJDK_BUILD_CPU="$VAR_CPU"
|
||||
OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
|
||||
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_BUILD_OS)
|
||||
AC_SUBST(OPENJDK_BUILD_OS_API)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_BITS)
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
|
||||
|
||||
AC_MSG_CHECKING([openjdk-build os-cpu])
|
||||
AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU])
|
||||
|
||||
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
|
||||
PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
|
||||
PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
|
||||
# ... and setup our own variables. (Do this explicitely to facilitate searching)
|
||||
OPENJDK_TARGET_OS="$VAR_OS"
|
||||
OPENJDK_TARGET_OS_API="$VAR_OS_API"
|
||||
OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
|
||||
OPENJDK_TARGET_CPU="$VAR_CPU"
|
||||
OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
|
||||
OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
|
||||
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
|
||||
AC_SUBST(OPENJDK_TARGET_OS)
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_BITS)
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
|
||||
|
||||
AC_MSG_CHECKING([openjdk-target os-cpu])
|
||||
AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
])
|
||||
|
||||
# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
|
||||
# accordingly. Must be done after setting up build and target system, but before
|
||||
# doing anything else with these values.
|
||||
AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
|
||||
[
|
||||
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
|
||||
[build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
|
||||
|
||||
# We have three types of compiles:
|
||||
# native == normal compilation, target system == build system
|
||||
# cross == traditional cross compilation, target system != build system; special toolchain needed
|
||||
# reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
|
||||
#
|
||||
if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
|
||||
# We're doing a proper cross-compilation
|
||||
COMPILE_TYPE="cross"
|
||||
else
|
||||
COMPILE_TYPE="native"
|
||||
fi
|
||||
|
||||
if test "x$with_target_bits" != x; then
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
AC_MSG_ERROR([It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either.])
|
||||
fi
|
||||
|
||||
if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
# A reduced build is requested
|
||||
COMPILE_TYPE="reduced"
|
||||
OPENJDK_TARGET_CPU_BITS=32
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
|
||||
OPENJDK_TARGET_CPU=x86
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
|
||||
OPENJDK_TARGET_CPU=sparc
|
||||
else
|
||||
AC_MSG_ERROR([Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9])
|
||||
fi
|
||||
elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
AC_MSG_ERROR([It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead.])
|
||||
elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
|
||||
AC_MSG_NOTICE([--with-target-bits are set to build platform address size; argument has no meaning])
|
||||
else
|
||||
AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(COMPILE_TYPE)
|
||||
|
||||
AC_MSG_CHECKING([compilation type])
|
||||
AC_MSG_RESULT([$COMPILE_TYPE])
|
||||
])
|
||||
|
||||
# Setup the legacy variables, for controlling the old makefiles.
|
||||
#
|
||||
AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
|
||||
[
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of x86 and x86_64
|
||||
OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY="i586"
|
||||
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
# On all platforms except MacOSX replace x86_64 with amd64.
|
||||
OPENJDK_TARGET_CPU_LEGACY="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
|
||||
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of x86 and x86_64.
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
|
||||
|
||||
# This is the name of the cpu (but using i386 and amd64 instead of
|
||||
# x86 and x86_64, respectively), preceeded by a /, to be used when
|
||||
# locating libraries. On macosx, it's empty, though.
|
||||
OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_TARGET_CPU_LIBDIR=""
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
|
||||
|
||||
# OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
|
||||
# /amd64 or /sparcv9. This string is appended to some library paths, like this:
|
||||
# /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
|
||||
OPENJDK_TARGET_CPU_ISADIR=""
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/amd64"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ISADIR)
|
||||
|
||||
# Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
|
||||
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
# On linux only, we replace x86 with i386.
|
||||
OPENJDK_TARGET_CPU_OSARCH="i386"
|
||||
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
# On all platforms except macosx, we replace x86_64 with amd64.
|
||||
OPENJDK_TARGET_CPU_OSARCH="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
|
||||
|
||||
OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_JLI="i386"
|
||||
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
# On all platforms except macosx, we replace x86_64 with amd64.
|
||||
OPENJDK_TARGET_CPU_JLI="amd64"
|
||||
fi
|
||||
# Now setup the -D flags for building libjli.
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
|
||||
|
||||
# Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
|
||||
if test "x$OPENJDK_TARGET_OS_API" = xposix; then
|
||||
OPENJDK_TARGET_OS_API_DIR="solaris"
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
|
||||
OPENJDK_TARGET_OS_API_DIR="windows"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
A_LP64="LP64:="
|
||||
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
|
||||
# unpack200.exe
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LP64,$A_LP64)
|
||||
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
# FIXME: ... or should this include reduced builds..?
|
||||
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
|
||||
else
|
||||
DEFINE_CROSS_COMPILE_ARCH=""
|
||||
fi
|
||||
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
@@ -315,8 +346,12 @@ AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
REQUIRED_OS_NAME=Windows
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
REQUIRED_OS_VERSION=5.2
|
||||
else
|
||||
REQUIRED_OS_VERSION=5.1
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
REQUIRED_OS_NAME=Darwin
|
||||
REQUIRED_OS_VERSION=11.2
|
||||
@@ -338,42 +373,10 @@ AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
|
||||
[build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
|
||||
|
||||
if test "x$with_target_bits" != x && \
|
||||
test "x$with_target_bits" != x32 && \
|
||||
test "x$with_target_bits" != x64 ; then
|
||||
AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
|
||||
fi
|
||||
# Translate the standard cpu-vendor-kernel-os quadruplets into
|
||||
# the new TARGET_.... and BUILD_... and the legacy names used by
|
||||
# the openjdk build.
|
||||
# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
|
||||
PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS
|
||||
|
||||
# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
|
||||
if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
|
||||
LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
|
||||
fi
|
||||
|
||||
# Now the following vars are defined.
|
||||
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
|
||||
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
|
||||
# OPENJDK_TARGET_OS_API=posix,winapi
|
||||
#
|
||||
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
|
||||
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
|
||||
# OPENJDK_TARGET_CPU_BITS=32,64
|
||||
# OPENJDK_TARGET_CPU_ENDIAN=big,little
|
||||
#
|
||||
# There is also a:
|
||||
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,.... # used to set the old var ARCH
|
||||
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
|
||||
# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
|
||||
# There was also a BUILDARCH that had i486,amd64,... but we do not use that
|
||||
# in the new build.
|
||||
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
|
||||
PLATFORM_EXTRACT_TARGET_AND_BUILD
|
||||
PLATFORM_SETUP_TARGET_CPU_BITS
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
@@ -391,39 +394,15 @@ AC_SUBST(OS_VERSION_MINOR)
|
||||
AC_SUBST(OS_VERSION_MICRO)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS],
|
||||
# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
|
||||
# Add -mX to various FLAGS variables.
|
||||
AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
|
||||
# (The JVM can use 32 or 64 bit Java pointers but that decision
|
||||
# is made at runtime.)
|
||||
#
|
||||
AC_LANG_PUSH(C++)
|
||||
OLD_CXXFLAGS="$CXXFLAGS"
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
|
||||
CXXFLAGS="-m${with_target_bits} $CXXFLAGS"
|
||||
fi
|
||||
AC_CHECK_SIZEOF([int *], [1111])
|
||||
CXXFLAGS="$OLD_CXXFLAGS"
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
# keep track of c/cxx flags that we added outselves...
|
||||
# to prevent emitting warning...
|
||||
ADDED_CFLAGS=
|
||||
ADDED_CXXFLAGS=
|
||||
ADDED_LDFLAGS=
|
||||
|
||||
if test "x$ac_cv_sizeof_int_p" = x0; then
|
||||
# The test failed, lets pick the assumed value.
|
||||
ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS
|
||||
else
|
||||
ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
|
||||
ADDED_CFLAGS=" -m${with_target_bits}"
|
||||
ADDED_CXXFLAGS=" -m${with_target_bits}"
|
||||
ADDED_LDFLAGS=" -m${with_target_bits}"
|
||||
# keep track of c/cxx flags that we added outselves...
|
||||
# to prevent emitting warning...
|
||||
ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
|
||||
|
||||
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
|
||||
@@ -432,39 +411,57 @@ else
|
||||
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
|
||||
# (The JVM can use 32 or 64 bit Java pointers but that decision
|
||||
# is made at runtime.)
|
||||
#
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# Always specify -m flags on Solaris
|
||||
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
||||
elif test "x$COMPILE_TYPE" = xreduced; then
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
# Specify -m if running reduced on other Posix platforms
|
||||
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ARCH_DATA_MODEL" = x64; then
|
||||
A_LP64="LP64:="
|
||||
ADD_LP64="-D_LP64=1"
|
||||
# Make compilation sanity check
|
||||
AC_CHECK_HEADERS([stdio.h], , [
|
||||
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
|
||||
if test "x$COMPILE_TYPE" = xreduced; then
|
||||
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
|
||||
elif test "x$COMPILE_TYPE" = xcross; then
|
||||
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot continue.])
|
||||
])
|
||||
|
||||
AC_CHECK_SIZEOF([int *], [1111])
|
||||
|
||||
if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
|
||||
# Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
|
||||
SIZEOF_INT_P="$ac_cv_sizeof_int_p"
|
||||
fi
|
||||
|
||||
if test "x$SIZEOF_INT_P" = x; then
|
||||
# The test failed, lets stick to the assumed value.
|
||||
AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.])
|
||||
else
|
||||
TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
|
||||
|
||||
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
|
||||
AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for target address size])
|
||||
AC_MSG_RESULT([$ARCH_DATA_MODEL bits])
|
||||
AC_SUBST(LP64,$A_LP64)
|
||||
AC_SUBST(ARCH_DATA_MODEL)
|
||||
|
||||
if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
|
||||
AC_MSG_ERROR([The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
|
||||
fi
|
||||
|
||||
#
|
||||
# NOTE: check for -mstackrealign needs to be below potential addition of -m32
|
||||
#
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
|
||||
# While waiting for a better solution, the current workaround is to use -mstackrealign.
|
||||
CFLAGS="$CFLAGS -mstackrealign"
|
||||
AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
|
||||
])
|
||||
fi
|
||||
AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
|
||||
@@ -478,21 +475,7 @@ AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="univ
|
||||
if test "x$ENDIAN" = xuniversal_endianness; then
|
||||
AC_MSG_ERROR([Building with both big and little endianness is not supported])
|
||||
fi
|
||||
if test "x$ENDIAN" = xunknown; then
|
||||
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
|
||||
fi
|
||||
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
|
||||
AC_MSG_WARN([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
|
||||
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
|
||||
AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
|
||||
fi
|
||||
AC_SUBST(ENDIAN)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ISADIR],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Could someone enlighten this configure script with a comment about libCrun?
|
||||
#
|
||||
#
|
||||
])
|
||||
|
||||
@@ -250,31 +250,8 @@ fi
|
||||
|
||||
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
|
||||
[
|
||||
LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
|
||||
CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
|
||||
JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
|
||||
JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
|
||||
HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
|
||||
BUILD_OUTPUT="$OUTPUT_ROOT"
|
||||
AC_SUBST(BUILD_OUTPUT)
|
||||
|
||||
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
|
||||
IMAGES_OUTPUTDIR="$OUTPUT_ROOT/images"
|
||||
|
||||
AC_SUBST(LANGTOOLS_OUTPUTDIR)
|
||||
AC_SUBST(CORBA_OUTPUTDIR)
|
||||
AC_SUBST(JAXP_OUTPUTDIR)
|
||||
AC_SUBST(JAXWS_OUTPUTDIR)
|
||||
AC_SUBST(HOTSPOT_OUTPUTDIR)
|
||||
AC_SUBST(JDK_OUTPUTDIR)
|
||||
AC_SUBST(IMAGES_OUTPUTDIR)
|
||||
|
||||
LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
|
||||
CORBA_DIST="$OUTPUT_ROOT/corba/dist"
|
||||
JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
|
||||
JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
|
||||
HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
|
||||
|
||||
AC_SUBST(LANGTOOLS_DIST)
|
||||
AC_SUBST(CORBA_DIST)
|
||||
AC_SUBST(JAXP_DIST)
|
||||
AC_SUBST(JAXWS_DIST)
|
||||
AC_SUBST(HOTSPOT_DIST)
|
||||
])
|
||||
|
||||
@@ -23,7 +23,11 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Configured @DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
|
||||
# Configured @DATE_WHEN_CONFIGURED@ to build
|
||||
# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
|
||||
# (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
|
||||
# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
|
||||
# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
|
||||
# using 'configure @CONFIGURE_COMMAND_LINE@'
|
||||
|
||||
# When calling macros, the spaces between arguments are
|
||||
@@ -37,9 +41,18 @@ SQUOTE:='
|
||||
#'
|
||||
DQUOTE:="
|
||||
#"
|
||||
define NEWLINE:=
|
||||
define NEWLINE
|
||||
|
||||
|
||||
endef
|
||||
|
||||
# A self-referential reference to this file.
|
||||
SPEC:=@SPEC@
|
||||
|
||||
# Specify where the spec file is.
|
||||
MAKE_ARGS="SPEC=$(SPEC)"
|
||||
|
||||
MAKE:=@MAKE@
|
||||
|
||||
# Pass along the verbosity setting.
|
||||
ifeq (,$(findstring VERBOSE=,$(MAKE)))
|
||||
@@ -51,40 +64,38 @@ ifeq (,$(findstring -R,$(MAKE)))
|
||||
MAKE:=$(MAKE) -R
|
||||
endif
|
||||
|
||||
# Specify where the spec file is.
|
||||
ifeq (,$(findstring SPEC=,$(MAKE)))
|
||||
MAKE:=$(MAKE) SPEC=@SPEC@
|
||||
endif
|
||||
|
||||
# Specify where the common include directory for makefiles is.
|
||||
ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
|
||||
MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
|
||||
endif
|
||||
|
||||
# A self-referential reference to this file.
|
||||
SPEC:=@SPEC@
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
CONF_NAME:=@CONF_NAME@
|
||||
|
||||
# The built jdk will run in this target system.
|
||||
OPENJDK_TARGET_SYSTEM:=@OPENJDK_TARGET_SYSTEM@
|
||||
|
||||
OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
|
||||
OPENJDK_TARGET_OS_FAMILY:=@OPENJDK_TARGET_OS_FAMILY@
|
||||
OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
|
||||
OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
|
||||
|
||||
OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
|
||||
OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
|
||||
OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
|
||||
OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
|
||||
|
||||
COMPILE_TYPE:=@COMPILE_TYPE@
|
||||
|
||||
# Legacy support
|
||||
OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
|
||||
OPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
|
||||
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
|
||||
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
|
||||
OPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
|
||||
|
||||
# We are building on this build system.
|
||||
# When not cross-compiling, it is the same as the target.
|
||||
OPENJDK_BUILD_SYSTEM:=@OPENJDK_BUILD_SYSTEM@
|
||||
|
||||
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
|
||||
OPENJDK_BUILD_OS_FAMILY:=@OPENJDK_BUILD_OS_FAMILY@
|
||||
OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
|
||||
|
||||
OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
|
||||
@@ -96,32 +107,22 @@ OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
|
||||
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
|
||||
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
|
||||
|
||||
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
|
||||
PLATFORM:=@OPENJDK_TARGET_OS@
|
||||
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
|
||||
ARCH:=@LEGACY_OPENJDK_TARGET_CPU1@
|
||||
# Yet another name for arch used for an extra subdir below the jvm lib.
|
||||
# Uses i386 and amd64, instead of ia32 and x64.
|
||||
LIBARCH:=@LEGACY_OPENJDK_TARGET_CPU2@
|
||||
# Use to switch between solaris and windows subdirs in the jdk.
|
||||
LEGACY_OPENJDK_TARGET_OS_API:=@LEGACY_OPENJDK_TARGET_OS_API@
|
||||
# 32 or 64 bit
|
||||
ARCH_DATA_MODEL:=@OPENJDK_TARGET_CPU_BITS@
|
||||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64:=1
|
||||
@LP64@
|
||||
ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
|
||||
@SET_OPENJDK@
|
||||
JIGSAW:=@JIGSAW@
|
||||
LIBM:=-lm
|
||||
LIBDL:=@LIBDL@
|
||||
|
||||
# colon or semicolon
|
||||
PATH_SEP:=@PATH_SEP@
|
||||
|
||||
# Set special env variables, to be passed to external tools.
|
||||
# Used for cygwin setups.
|
||||
@SETUPDEVENV@
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
|
||||
# environment variables (in Windows path style), and the PATH needs to
|
||||
# be adjusted to include Visual Studio tools (but this needs to be in
|
||||
# cygwin/msys style).
|
||||
export PATH:=@VS_PATH@
|
||||
export INCLUDE:=@VS_INCLUDE@
|
||||
export LIB:=@VS_LIB@
|
||||
endif
|
||||
|
||||
# The sys root where standard headers and libraries are found.
|
||||
# Usually not needed since the configure script should have
|
||||
@@ -134,7 +135,6 @@ ADD_SRC_ROOT:=@ADD_SRC_ROOT@
|
||||
OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
|
||||
TOPDIR:=@SRC_ROOT@
|
||||
OUTPUT_ROOT:=@OUTPUT_ROOT@
|
||||
JDK_MAKE_SHARED_DIR:=@JDK_TOPDIR@/makefiles/common/shared
|
||||
JDK_TOPDIR:=@JDK_TOPDIR@
|
||||
LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
|
||||
CORBA_TOPDIR:=@CORBA_TOPDIR@
|
||||
@@ -143,6 +143,9 @@ JAXWS_TOPDIR:=@JAXWS_TOPDIR@
|
||||
HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
|
||||
# Location where build customization files may be found
|
||||
CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
|
||||
|
||||
# Information gathered from the version.numbers file.
|
||||
JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
|
||||
JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
|
||||
@@ -155,6 +158,8 @@ PRODUCT_NAME:=@PRODUCT_NAME@
|
||||
PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
|
||||
JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
|
||||
COMPANY_NAME:=@COMPANY_NAME@
|
||||
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
|
||||
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
|
||||
|
||||
# Different version strings generated from the above information.
|
||||
JDK_VERSION:=@JDK_VERSION@
|
||||
@@ -171,17 +176,12 @@ DEBUG_LEVEL:=@DEBUG_LEVEL@
|
||||
# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
|
||||
JDK_VARIANT:=@JDK_VARIANT@
|
||||
|
||||
# Legacy defines controlling the JDK variant embedded.
|
||||
@JAVASE_EMBEDDED@
|
||||
@MINIMIZE_RAM_USAGE@
|
||||
|
||||
# Should we compile support for running with a graphical UI? (ie headful)
|
||||
# Should we compile support for running without? (ie headless)
|
||||
SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
|
||||
SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
|
||||
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
|
||||
@BUILD_HEADLESS@
|
||||
@BUILD_HEADLESS_ONLY@
|
||||
|
||||
# These are the libjvms that we want to build.
|
||||
# The java launcher uses the default.
|
||||
@@ -194,53 +194,43 @@ JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
|
||||
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
|
||||
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
|
||||
|
||||
# Legacy setting: OPT or DBG
|
||||
VARIANT:=@VARIANT@
|
||||
# Legacy setting: true or false
|
||||
FASTDEBUG:=@FASTDEBUG@
|
||||
# Legacy setting: debugging the class files?
|
||||
DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@
|
||||
# Universal binaries on macosx
|
||||
MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
|
||||
|
||||
# Legacy setting: -debug or -fastdebug
|
||||
# Still used in version string...
|
||||
BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
|
||||
|
||||
LANGTOOLS_OUTPUTDIR:=@LANGTOOLS_OUTPUTDIR@
|
||||
CORBA_OUTPUTDIR:=@CORBA_OUTPUTDIR@
|
||||
JAXP_OUTPUTDIR:=@JAXP_OUTPUTDIR@
|
||||
JAXWS_OUTPUTDIR:=@JAXWS_OUTPUTDIR@
|
||||
HOTSPOT_OUTPUTDIR:=@HOTSPOT_OUTPUTDIR@
|
||||
|
||||
# This where a working jvm is built.
|
||||
# JDK_OUTPUTDIR specifies where a working jvm is built.
|
||||
# You can run $(JDK_OUTPUTDIR)/bin/java
|
||||
# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
|
||||
# yet the same as a default installation.
|
||||
JDK_OUTPUTDIR:=@OUTPUT_ROOT@/jdk
|
||||
|
||||
#
|
||||
# When you run "make install" it will create the standardized
|
||||
# layout for the jdk and the jre inside the images subdir.
|
||||
# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
|
||||
# Then it will copy the contents of the jdk into the installation
|
||||
# directory.
|
||||
IMAGES_OUTPUTDIR:=@OUTPUT_ROOT@/images
|
||||
|
||||
LANGTOOLS_DIST:=@LANGTOOLS_DIST@
|
||||
CORBA_DIST:=@CORBA_DIST@
|
||||
JAXP_DIST:=@JAXP_DIST@
|
||||
JAXWS_DIST:=@JAXWS_DIST@
|
||||
HOTSPOT_DIST:=@HOTSPOT_DIST@
|
||||
BUILD_OUTPUT:=@BUILD_OUTPUT@
|
||||
LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
|
||||
CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
|
||||
JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
|
||||
JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
|
||||
HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
|
||||
JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
|
||||
IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
|
||||
|
||||
# Legacy variables used by Release.gmk
|
||||
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
|
||||
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
|
||||
|
||||
# Can be /sparcv9 or /amd64 on Solaris
|
||||
ISA_DIR:=@LEGACY_OPENJDK_TARGET_CPU3@
|
||||
BINDIR:=$(JDK_OUTPUTDIR)/bin$(ISA_DIR)
|
||||
LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
|
||||
CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
|
||||
JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
|
||||
JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
|
||||
HOTSPOT_DIST=$(HOTSPOT_OUTPUTDIR)/dist
|
||||
|
||||
# The boot jdk to use
|
||||
ALT_BOOTDIR:=@BOOT_JDK@
|
||||
BOOT_JDK:=@BOOT_JDK@
|
||||
BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
|
||||
BOOT_RTJAR:=@BOOT_RTJAR@
|
||||
BOOT_TOOLSJAR:=@BOOT_TOOLSJAR@
|
||||
BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
|
||||
|
||||
# When compiling Java source to be run by the boot jdk
|
||||
# use these extra flags, eg -source 6 -target 6
|
||||
@@ -248,30 +238,18 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
|
||||
|
||||
# Information about the build system
|
||||
NUM_CORES:=@NUM_CORES@
|
||||
# This is used from the jdk build for C/C++ code.
|
||||
PARALLEL_COMPILE_JOBS:=@CONCURRENT_BUILD_JOBS@
|
||||
# Store javac server synchronization files here, and
|
||||
# the javac server log files.
|
||||
JAVAC_SERVERS:=@JAVAC_SERVERS@
|
||||
# Should we use a javac server or not? The javac server gives
|
||||
# an enormous performance improvement since it reduces the
|
||||
# startup costs of javac and reuses as much as possible of intermediate
|
||||
# compilation work. But if we want to compile with a non-Java
|
||||
# javac compiler, like gcj. Then we cannot use javac server and
|
||||
# this variable is set to false.
|
||||
JAVAC_USE_REMOTE:=@JAVAC_USE_REMOTE@
|
||||
# Enable sjavac support = use a javac server,
|
||||
# multi core javac compilation and dependency tracking.
|
||||
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
|
||||
# Store sjavac server synchronization files here, and
|
||||
# the sjavac server log files.
|
||||
SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
|
||||
# We can block the Javac server to never use more cores than this.
|
||||
# This is not for performance reasons, but for memory usage, since each
|
||||
# core requires its own JavaCompiler. We might have 64 cores and 4GB
|
||||
# of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
|
||||
# Since there is no sharing of data between the JavaCompilers.
|
||||
JAVAC_SERVER_CORES:=@JAVAC_SERVER_CORES@
|
||||
# Should we use dependency tracking between Java packages? true or false.
|
||||
JAVAC_USE_DEPS:=@JAVAC_USE_DEPS@
|
||||
# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
|
||||
JAVAC_USE_MODE:=@JAVAC_USE_MODE@
|
||||
# Enable not yet complete sjavac support.
|
||||
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
|
||||
SJAVAC_SERVER_CORES:=@SJAVAC_SERVER_CORES@
|
||||
|
||||
# The OpenJDK makefiles should be changed to using the standard
|
||||
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
|
||||
@@ -280,7 +258,6 @@ FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
|
||||
FREETYPE2_LIBS:=@FREETYPE2_LIBS@
|
||||
FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
|
||||
USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
|
||||
ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
|
||||
CUPS_CFLAGS:=@CUPS_CFLAGS@
|
||||
|
||||
PACKAGE_PATH=@PACKAGE_PATH@
|
||||
@@ -288,7 +265,8 @@ PACKAGE_PATH=@PACKAGE_PATH@
|
||||
# Source file for cacerts
|
||||
CACERTS_FILE=@CACERTS_FILE@
|
||||
|
||||
#MOZILLA_HEADERS_PATH:=
|
||||
# Enable unlimited crypto policy
|
||||
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
@@ -319,7 +297,7 @@ C_FLAG_DEPS:=@C_FLAG_DEPS@
|
||||
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
|
||||
|
||||
# Tools that potentially need to be cross compilation aware.
|
||||
CC:=@UNCYGDRIVE@ @CCACHE@ @CC@
|
||||
CC:=@FIXPATH@ @CCACHE@ @CC@
|
||||
|
||||
# CFLAGS used to compile the jdk native libraries (C-code)
|
||||
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
|
||||
@@ -329,17 +307,17 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
|
||||
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
|
||||
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
|
||||
|
||||
CXX:=@UNCYGDRIVE@ @CCACHE@ @CXX@
|
||||
CXX:=@FIXPATH@ @CCACHE@ @CXX@
|
||||
#CXXFLAGS:=@CXXFLAGS@
|
||||
|
||||
OBJC:=@CCACHE@ @OBJC@
|
||||
#OBJCFLAGS:=@OBJCFLAGS@
|
||||
|
||||
CPP:=@UNCYGDRIVE@ @CPP@
|
||||
CPP:=@FIXPATH@ @CPP@
|
||||
#CPPFLAGS:=@CPPFLAGS@
|
||||
|
||||
# The linker can be gcc or ld on posix systems, or link.exe on winapi systems.
|
||||
LD:=@UNCYGDRIVE@ @LD@
|
||||
# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
|
||||
LD:=@FIXPATH@ @LD@
|
||||
|
||||
# LDFLAGS used to link the jdk native libraries (C-code)
|
||||
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
|
||||
@@ -347,42 +325,39 @@ LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
|
||||
|
||||
# On some platforms the linker cannot be used to create executables, thus
|
||||
# the need for a separate LDEXE command.
|
||||
LDEXE:=@UNCYGDRIVE@ @LDEXE@
|
||||
LDEXE:=@FIXPATH@ @LDEXE@
|
||||
|
||||
# LDFLAGS used to link the jdk native launchers (C-code)
|
||||
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
|
||||
LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
|
||||
|
||||
# LDFLAGS specific to C++ linking.
|
||||
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
|
||||
|
||||
# Sometimes a different linker is needed for c++ libs
|
||||
LDCXX:=@UNCYGDRIVE@ @LDCXX@
|
||||
LDCXX:=@FIXPATH@ @LDCXX@
|
||||
# The flags for linking libstdc++ linker.
|
||||
LIBCXX:=@LIBCXX@
|
||||
|
||||
# Sometimes a different linker is needed for c++ executables
|
||||
LDEXECXX:=@UNCYGDRIVE@ @LDEXECXX@
|
||||
LDEXECXX:=@FIXPATH@ @LDEXECXX@
|
||||
|
||||
# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here.
|
||||
@DEFINE_CROSS_COMPILE_ARCH@
|
||||
# The HOSTCC should really be named BUILDCC, ie build executable for
|
||||
# the build platform. Same as CC when not cross compiling.
|
||||
HOSTCC:=@UNCYGDRIVE@ @HOSTCC@
|
||||
HOSTCXX:=@UNCYGDRIVE@ @HOSTCXX@
|
||||
# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
|
||||
HOST_CC:=@UNCYGDRIVE@ @HOSTCC@
|
||||
NIO_CC:=@UNCYGDRIVE@ @HOSTCC@
|
||||
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
|
||||
# build platform.
|
||||
BUILD_CC:=@FIXPATH@ @BUILD_CC@
|
||||
BUILD_LD:=@FIXPATH@ @BUILD_LD@
|
||||
|
||||
HOST_LD:=@UNCYGDRIVE@ @HOSTLD@
|
||||
AS:=@FIXPATH@ @AS@
|
||||
|
||||
AS:=@UNCYGDRIVE@ @AS@
|
||||
ASFLAGS:=@ASFLAGS@
|
||||
|
||||
# AR is used to create a static library (is ar in posix, lib.exe in winapi)
|
||||
AR:=@UNCYGDRIVE@ @AR@
|
||||
# AR is used to create a static library (is ar in posix, lib.exe in windows)
|
||||
AR:=@FIXPATH@ @AR@
|
||||
ARFLAGS:=@ARFLAGS@
|
||||
|
||||
NM:=@UNCYGDRIVE@ @NM@
|
||||
STRIP:=@UNCYGDRIVE@ @STRIP@
|
||||
MCS:=@UNCYGDRIVE@ @MCS@
|
||||
NM:=@NM@
|
||||
STRIP:=@STRIP@
|
||||
MCS:=@MCS@
|
||||
|
||||
LIPO:=@LIPO@
|
||||
|
||||
# Command to create a shared library
|
||||
SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
|
||||
@@ -414,6 +389,7 @@ SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
|
||||
# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
|
||||
SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
|
||||
|
||||
# Different OS:es have different ways of naming shared libraries.
|
||||
# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
|
||||
@@ -432,21 +408,20 @@ POST_MCS_CMD:=@POST_MCS_CMD@
|
||||
|
||||
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
|
||||
|
||||
JAVA=@UNCYGDRIVE@ @JAVA@ $(JAVA_FLAGS)
|
||||
JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
|
||||
|
||||
JAVAC:=@UNCYGDRIVE@ @JAVAC@
|
||||
JAVAC_FLAGS:=@JAVAC_FLAGS@
|
||||
JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
|
||||
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
|
||||
# overriding that value by using ?=.
|
||||
JAVAC_FLAGS?=@JAVAC_FLAGS@
|
||||
|
||||
JAVAH:=@UNCYGDRIVE@ @JAVAH@
|
||||
JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
|
||||
|
||||
JAR:=@UNCYGDRIVE@ @JAR@
|
||||
JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
|
||||
|
||||
RMIC:=@UNCYGDRIVE@ @RMIC@
|
||||
RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
|
||||
|
||||
NATIVE2ASCII:=@UNCYGDRIVE@ @NATIVE2ASCII@
|
||||
|
||||
BOOT_JAR_CMD:=@UNCYGDRIVE@ @JAR@
|
||||
BOOT_JAR_JFLAGS:=
|
||||
NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
|
||||
|
||||
# Base flags for RC
|
||||
# Guarding this against resetting value. Legacy make files include spec multiple
|
||||
@@ -456,21 +431,21 @@ RC_FLAGS:=@RC_FLAGS@
|
||||
endif
|
||||
|
||||
# A specific java binary with specific options can be used to run
|
||||
# the long running background javac server and other long running tasks.
|
||||
SERVER_JAVA:=@UNCYGDRIVE@ @SERVER_JAVA@
|
||||
# the long running background sjavac servers and other long running tasks.
|
||||
SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
|
||||
|
||||
# Tools adhering to a minimal and common standard of posix compliance.
|
||||
AWK:=@AWK@
|
||||
BASENAME:=@BASENAME@
|
||||
BASH:=@BASH@
|
||||
CAT:=@CAT@
|
||||
CCACHE:=@CCACHE@
|
||||
# CD is going away, but remains to cater for legacy makefiles.
|
||||
CD:=cd
|
||||
CHMOD:=@CHMOD@
|
||||
CP:=@CP@
|
||||
CPIO:=@CPIO@
|
||||
CUT:=@CUT@
|
||||
DATE:=@DATE@
|
||||
DF:=@DF@
|
||||
DIFF:=@DIFF@
|
||||
FIND:=@FIND@
|
||||
FIND_DELETE:=@FIND_DELETE@
|
||||
@@ -493,6 +468,7 @@ SORT:=@SORT@
|
||||
TAR:=@TAR@
|
||||
TAIL:=@TAIL@
|
||||
TEE:=@TEE@
|
||||
TIME:=@TIME@
|
||||
TR:=@TR@
|
||||
TOUCH:=@TOUCH@
|
||||
WC:=@WC@
|
||||
@@ -500,9 +476,9 @@ XARGS:=@XARGS@
|
||||
ZIPEXE:=@ZIP@
|
||||
ZIP:=@ZIP@
|
||||
UNZIP:=@UNZIP@
|
||||
MT:=@UNCYGDRIVE@ @MT@
|
||||
RC:=@UNCYGDRIVE@ @RC@
|
||||
DUMPBIN:=@UNCYGDRIVE@ @DUMPBIN@
|
||||
MT:=@FIXPATH@ @MT@
|
||||
RC:=@FIXPATH@ @RC@
|
||||
DUMPBIN:=@FIXPATH@ @DUMPBIN@
|
||||
CYGPATH:=@CYGPATH@
|
||||
LDD:=@LDD@
|
||||
OTOOL:=@OTOOL@
|
||||
@@ -511,8 +487,9 @@ EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
HG:=@HG@
|
||||
OBJCOPY:=@OBJCOPY@
|
||||
SETFILE:=@SETFILE@
|
||||
|
||||
UNCYGDRIVE:=@UNCYGDRIVE@
|
||||
FIXPATH:=@FIXPATH@
|
||||
|
||||
# Where the build output is stored for your convenience.
|
||||
BUILD_LOG:=@BUILD_LOG@
|
||||
@@ -520,16 +497,12 @@ BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
|
||||
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
|
||||
|
||||
# Build setup
|
||||
ENABLE_DOCS:=@ENABLE_DOCS@
|
||||
GENERATE_DOCS:=@ENABLE_DOCS@
|
||||
DISABLE_NIMBUS:=@DISABLE_NIMBUS@
|
||||
ENABLE_JFR=@ENABLE_JFR@
|
||||
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
|
||||
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
|
||||
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
|
||||
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
||||
CHECK_FOR_VCINSTALLDIR=@CHECK_FOR_VCINSTALLDIR@
|
||||
MSVCRNN_DLL:=@MSVCR100DLL@
|
||||
MSVCR_DLL:=@MSVCR_DLL@
|
||||
|
||||
|
||||
# ADD_SRCS takes a single argument with source roots
|
||||
@@ -559,17 +532,6 @@ else
|
||||
OVR_SRCS:=
|
||||
endif
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Legacy Hotspot support
|
||||
|
||||
HOTSPOT_DIST:=@HOTSPOT_DIST@
|
||||
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
|
||||
# This is used from the libjvm build for C/C++ code.
|
||||
HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD=@TEST_IN_BUILD@
|
||||
|
||||
####################################################
|
||||
#
|
||||
# INSTALLATION
|
||||
@@ -634,5 +596,5 @@ OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
|
||||
OS_VERSION_MINOR:=@OS_VERSION_MINOR@
|
||||
OS_VERSION_MICRO:=@OS_VERSION_MICRO@
|
||||
|
||||
# Include the closed-spec.gmk file if it exists
|
||||
-include $(dir @SPEC@)/closed-spec.gmk
|
||||
# Include the custom-spec.gmk file if it exists
|
||||
-include $(dir @SPEC@)/custom-spec.gmk
|
||||
|
||||
@@ -23,505 +23,14 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Configured"@DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
|
||||
# using 'configure @CONFIGURE_COMMAND_LINE@'
|
||||
|
||||
# The "human readable" name of this configuration
|
||||
CONF_NAME="@CONF_NAME@"
|
||||
|
||||
# The built jdk will run in this target system.
|
||||
OPENJDK_TARGET_SYSTEM="@OPENJDK_TARGET_SYSTEM@"
|
||||
|
||||
OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
|
||||
OPENJDK_TARGET_OS_FAMILY="@OPENJDK_TARGET_OS_FAMILY@"
|
||||
OPENJDK_TARGET_OS_API="@OPENJDK_TARGET_OS_API@"
|
||||
|
||||
OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
|
||||
OPENJDK_TARGET_CPU_ARCH="@OPENJDK_TARGET_CPU_ARCH@"
|
||||
OPENJDK_TARGET_CPU_BITS="@OPENJDK_TARGET_CPU_BITS@"
|
||||
OPENJDK_TARGET_CPU_ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
|
||||
|
||||
# We are building on this build system.
|
||||
# When not cross-compiling, it is the same as the target.
|
||||
OPENJDK_BUILD_SYSTEM="@OPENJDK_BUILD_SYSTEM@"
|
||||
|
||||
OPENJDK_BUILD_OS="@OPENJDK_BUILD_OS@"
|
||||
OPENJDK_BUILD_OS_FAMILY="@OPENJDK_BUILD_OS_FAMILY@"
|
||||
OPENJDK_BUILD_OS_API="@OPENJDK_BUILD_OS_API@"
|
||||
|
||||
OPENJDK_BUILD_CPU="@OPENJDK_BUILD_CPU@"
|
||||
OPENJDK_BUILD_CPU_ARCH="@OPENJDK_BUILD_CPU_ARCH@"
|
||||
OPENJDK_BUILD_CPU_BITS="@OPENJDK_BUILD_CPU_BITS@"
|
||||
OPENJDK_BUILD_CPU_ENDIAN="@OPENJDK_BUILD_CPU_ENDIAN@"
|
||||
|
||||
# Legacy OS values for use in release file.
|
||||
REQUIRED_OS_NAME="@REQUIRED_OS_NAME@"
|
||||
REQUIRED_OS_VERSION="@REQUIRED_OS_VERSION@"
|
||||
|
||||
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
|
||||
PLATFORM="@OPENJDK_TARGET_OS@"
|
||||
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
|
||||
ARCH="@LEGACY_OPENJDK_TARGET_CPU1@"
|
||||
# Yet another name for arch used for an extra subdir below the jvm lib.
|
||||
# Uses i386 and amd64, instead of ia32 and x64.
|
||||
LIBARCH="@LEGACY_OPENJDK_TARGET_CPU2@"
|
||||
# Use to switch between solaris and windows subdirs in the jdk.
|
||||
LEGACY_OPENJDK_TARGET_OS_API="@LEGACY_OPENJDK_TARGET_OS_API@"
|
||||
# 32 or 64 bit
|
||||
ARCH_DATA_MODEL="@OPENJDK_TARGET_CPU_BITS@"
|
||||
# Legacy setting for building for a 64 bit machine.
|
||||
# If yes then this expands to _LP64=1
|
||||
ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
|
||||
JIGSAW="@JIGSAW@"
|
||||
LIBM=-lm
|
||||
LIBDL="@LIBDL@"
|
||||
|
||||
# colon or semicolon
|
||||
PATH_SEP="@PATH_SEP@"
|
||||
|
||||
# The sys root where standard headers and libraries are found.
|
||||
# Usually not needed since the configure script should have
|
||||
# taken it into account already when setting CFLAGS et al.
|
||||
SYS_ROOT="@SYS_ROOT@"
|
||||
|
||||
# Paths to the source code
|
||||
SRC_ROOT="@SRC_ROOT@"
|
||||
ADD_SRC_ROOT="@ADD_SRC_ROOT@"
|
||||
OVERRIDE_SRC_ROOT="@OVERRIDE_SRC_ROOT@"
|
||||
TOPDIR="@SRC_ROOT@"
|
||||
OUTPUT_ROOT="@OUTPUT_ROOT@"
|
||||
JDK_MAKE_SHARED_DIR="@JDK_TOPDIR@"/makefiles/common/shared
|
||||
JDK_TOPDIR="@JDK_TOPDIR@"
|
||||
LANGTOOLS_TOPDIR="@LANGTOOLS_TOPDIR@"
|
||||
CORBA_TOPDIR="@CORBA_TOPDIR@"
|
||||
JAXP_TOPDIR="@JAXP_TOPDIR@"
|
||||
JAXWS_TOPDIR="@JAXWS_TOPDIR@"
|
||||
HOTSPOT_TOPDIR="@HOTSPOT_TOPDIR@"
|
||||
COPYRIGHT_YEAR="@COPYRIGHT_YEAR@"
|
||||
|
||||
# Information gathered from the version.numbers file.
|
||||
JDK_MAJOR_VERSION="@JDK_MAJOR_VERSION@"
|
||||
JDK_MINOR_VERSION="@JDK_MINOR_VERSION@"
|
||||
JDK_MICRO_VERSION="@JDK_MICRO_VERSION@"
|
||||
JDK_UPDATE_VERSION="@JDK_UPDATE_VERSION@"
|
||||
JDK_BUILD_NUMBER="@JDK_BUILD_NUMBER@"
|
||||
MILESTONE="@MILESTONE@"
|
||||
LAUNCHER_NAME="@LAUNCHER_NAME@"
|
||||
PRODUCT_NAME="@PRODUCT_NAME@"
|
||||
PRODUCT_SUFFIX="@PRODUCT_SUFFIX@"
|
||||
JDK_RC_PLATFORM_NAME="@JDK_RC_PLATFORM_NAME@"
|
||||
COMPANY_NAME="@COMPANY_NAME@"
|
||||
|
||||
# Different version strings generated from the above information.
|
||||
JDK_VERSION="@JDK_VERSION@"
|
||||
RUNTIME_NAME="@RUNTIME_NAME@"
|
||||
FULL_VERSION="@FULL_VERSION@"
|
||||
JRE_RELEASE_VERSION="@FULL_VERSION@"
|
||||
RELEASE="@RELEASE@"
|
||||
COOKED_BUILD_NUMBER="@COOKED_BUILD_NUMBER@"
|
||||
|
||||
# How to compile the code: release, fastdebug or slowdebug
|
||||
DEBUG_LEVEL="@DEBUG_LEVEL@"
|
||||
|
||||
# This is the JDK variant to build.
|
||||
# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
|
||||
JDK_VARIANT="@JDK_VARIANT@"
|
||||
|
||||
# Should we compile support for running with a graphical UI? (ie headful)
|
||||
# Should we compile support for running without? (ie headless)
|
||||
SUPPORT_HEADFUL="@SUPPORT_HEADFUL@"
|
||||
SUPPORT_HEADLESS="@SUPPORT_HEADLESS@"
|
||||
|
||||
# These are the libjvms that we want to build.
|
||||
# The java launcher uses the default.
|
||||
# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
|
||||
# on the java launcher command line.
|
||||
JVM_VARIANTS="@JVM_VARIANTS@"
|
||||
JVM_VARIANT_SERVER="@JVM_VARIANT_SERVER@"
|
||||
JVM_VARIANT_CLIENT="@JVM_VARIANT_CLIENT@"
|
||||
JVM_VARIANT_KERNEL="@JVM_VARIANT_KERNEL@"
|
||||
JVM_VARIANT_ZERO="@JVM_VARIANT_ZERO@"
|
||||
JVM_VARIANT_ZEROSHARK="@JVM_VARIANT_ZEROSHARK@"
|
||||
|
||||
# Legacy setting: OPT or DBG
|
||||
VARIANT="@VARIANT@"
|
||||
# Legacy setting: true or false
|
||||
FASTDEBUG="@FASTDEBUG@"
|
||||
# Legacy setting: debugging the class files?
|
||||
DEBUG_CLASSFILES="@DEBUG_CLASSFILES@"
|
||||
# Legacy setting: -debug or -fastdebug
|
||||
BUILD_VARIANT_RELEASE="@BUILD_VARIANT_RELEASE@"
|
||||
|
||||
LANGTOOLS_OUTPUTDIR="@LANGTOOLS_OUTPUTDIR@"
|
||||
CORBA_OUTPUTDIR="@CORBA_OUTPUTDIR@"
|
||||
JAXP_OUTPUTDIR="@JAXP_OUTPUTDIR@"
|
||||
JAXWS_OUTPUTDIR="@JAXWS_OUTPUTDIR@"
|
||||
HOTSPOT_OUTPUTDIR="@HOTSPOT_OUTPUTDIR@"
|
||||
|
||||
# This where a working jvm is built.
|
||||
# You can run ${JDK_OUTPUTDIR}/bin/java
|
||||
# Though the layout of the contents of ${JDK_OUTPUTDIR} is not
|
||||
# yet the same as a default installation.
|
||||
JDK_OUTPUTDIR="@OUTPUT_ROOT@"/jdk
|
||||
|
||||
# When you run "make install" it will create the standardized
|
||||
# layout for the jdk and the jre inside the images subdir.
|
||||
# Then it will copy the contents of the jdk into the installation
|
||||
# directory.
|
||||
IMAGES_OUTPUTDIR="@OUTPUT_ROOT@"/images
|
||||
|
||||
LANGTOOLS_DIST="@LANGTOOLS_DIST@"
|
||||
CORBA_DIST="@CORBA_DIST@"
|
||||
JAXP_DIST="@JAXP_DIST@"
|
||||
JAXWS_DIST="@JAXWS_DIST@"
|
||||
HOTSPOT_DIST="@HOTSPOT_DIST@"
|
||||
|
||||
# Legacy variables used by Release.gmk
|
||||
JDK_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2sdk-image
|
||||
JRE_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2re-image
|
||||
|
||||
# Can be /sparcv9 or /amd64 on Solaris
|
||||
ISA_DIR="@LEGACY_OPENJDK_TARGET_CPU3@"
|
||||
BINDIR="${JDK_OUTPUTDIR}/bin${ISA_DIR}"
|
||||
|
||||
# The boot jdk to use
|
||||
ALT_BOOTDIR="@BOOT_JDK@"
|
||||
BOOT_JDK="@BOOT_JDK@"
|
||||
BOOT_JDK_JVMARGS="@BOOT_JDK_JVMARGS@"
|
||||
BOOT_RTJAR="@BOOT_RTJAR@"
|
||||
BOOT_TOOLSJAR="@BOOT_TOOLSJAR@"
|
||||
|
||||
# When compiling Java source to be run by the boot jdk
|
||||
# use these extra flags, eg -source 6 -target 6
|
||||
BOOT_JDK_SOURCETARGET="@BOOT_JDK_SOURCETARGET@"
|
||||
|
||||
# Information about the build system
|
||||
NUM_CORES="@NUM_CORES@"
|
||||
# This is used from the jdk build for C/C++ code.
|
||||
PARALLEL_COMPILE_JOBS="@CONCURRENT_BUILD_JOBS@"
|
||||
# Store javac server synchronization files here, and
|
||||
# the javac server log files.
|
||||
JAVAC_SERVERS="@JAVAC_SERVERS@"
|
||||
# Should we use a javac server or not? The javac server gives
|
||||
# an enormous performance improvement since it reduces the
|
||||
# startup costs of javac and reuses as much as possible of intermediate
|
||||
# compilation work. But if we want to compile with a non-Java
|
||||
# javac compiler, like gcj. Then we cannot use javac server and
|
||||
# this variable is set to false.
|
||||
JAVAC_USE_REMOTE="@JAVAC_USE_REMOTE@"
|
||||
# We can block the Javac server to never use more cores than this.
|
||||
# This is not for performance reasons, but for memory usage, since each
|
||||
# core requires its own JavaCompiler. We might have 64 cores and 4GB
|
||||
# of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
|
||||
# Since there is no sharing of data between the JavaCompilers.
|
||||
JAVAC_SERVER_CORES="@JAVAC_SERVER_CORES@"
|
||||
# Should we use dependency tracking between Java packages? true or false.
|
||||
JAVAC_USE_DEPS="@JAVAC_USE_DEPS@"
|
||||
# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
|
||||
JAVAC_USE_MODE="@JAVAC_USE_MODE@"
|
||||
# Enable not yet complete sjavac support.
|
||||
ENABLE_SJAVAC="@ENABLE_SJAVAC@"
|
||||
|
||||
# The OpenJDK makefiles should be changed to using the standard
|
||||
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
|
||||
# extract the information here.
|
||||
FREETYPE2_LIB_PATH="@FREETYPE2_LIB_PATH@"
|
||||
FREETYPE2_LIBS="@FREETYPE2_LIBS@"
|
||||
FREETYPE2_CFLAGS="@FREETYPE2_CFLAGS@"
|
||||
USING_SYSTEM_FT_LIB="@USING_SYSTEM_FT_LIB@"
|
||||
CUPS_CFLAGS="@CUPS_CFLAGS@"
|
||||
|
||||
PACKAGE_PATH="@PACKAGE_PATH@"
|
||||
|
||||
# Source file for cacerts
|
||||
CACERTS_FILE="@CACERTS_FILE@"
|
||||
|
||||
#MOZILLA_HEADERS_PATH=
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS="@X_CFLAGS@"
|
||||
X_LIBS="@X_LIBS@"
|
||||
OPENWIN_HOME="@OPENWIN_HOME@"
|
||||
|
||||
# There are two types: CC or CL
|
||||
# CC is gcc and others behaving reasonably similar.
|
||||
# CL is cl.exe only.
|
||||
COMPILER_TYPE="@COMPILER_TYPE@"
|
||||
|
||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||
C_O_FLAG_HIGHEST="@C_O_FLAG_HIGHEST@"
|
||||
C_O_FLAG_HI="@C_O_FLAG_HI@"
|
||||
C_O_FLAG_NORM="@C_O_FLAG_NORM@"
|
||||
C_O_FLAG_NONE="@C_O_FLAG_NONE@"
|
||||
CXX_O_FLAG_HIGHEST="@CXX_O_FLAG_HIGHEST@"
|
||||
CXX_O_FLAG_HI="@CXX_O_FLAG_HI@"
|
||||
CXX_O_FLAG_NORM="@CXX_O_FLAG_NORM@"
|
||||
CXX_O_FLAG_NONE="@CXX_O_FLAG_NONE@"
|
||||
|
||||
C_FLAG_DEPS="@C_FLAG_DEPS@"
|
||||
CXX_FLAG_DEPS="@CXX_FLAG_DEPS@"
|
||||
|
||||
# Tools that potentially need to be cross compilation aware.
|
||||
CC="@UNCYGDRIVE@ @CCACHE@ @CC@"
|
||||
|
||||
# CFLAGS used to compile the jdk native libraries (C-code)
|
||||
CFLAGS_JDKLIB="@CFLAGS_JDKLIB@"
|
||||
CXXFLAGS_JDKLIB="@CXXFLAGS_JDKLIB@"
|
||||
|
||||
# CFLAGS used to compile the jdk native launchers (C-code)
|
||||
CFLAGS_JDKEXE="@CFLAGS_JDKEXE@"
|
||||
CXXFLAGS_JDKEXE="@CXXFLAGS_JDKEXE@"
|
||||
|
||||
CXX="@UNCYGDRIVE@ @CCACHE@ @CXX@"
|
||||
#CXXFLAGS="@CXXFLAGS@"
|
||||
|
||||
OBJC="@CCACHE@ @OBJC@"
|
||||
#OBJCFLAGS="@OBJCFLAGS@"
|
||||
|
||||
CPP="@UNCYGDRIVE@ @CPP@"
|
||||
#CPPFLAGS="@CPPFLAGS@"
|
||||
|
||||
# The linker can be gcc or ld on posix systems, or link.exe on winapi systems.
|
||||
LD="@UNCYGDRIVE@ @LD@"
|
||||
|
||||
# LDFLAGS used to link the jdk native libraries (C-code)
|
||||
LDFLAGS_JDKLIB="@LDFLAGS_JDKLIB@"
|
||||
LDFLAGS_JDKLIB_SUFFIX="@LDFLAGS_JDKLIB_SUFFIX@"
|
||||
|
||||
# On some platforms the linker cannot be used to create executables, thus
|
||||
# the need for a separate LDEXE command.
|
||||
LDEXE="@UNCYGDRIVE@ @LDEXE@"
|
||||
|
||||
# LDFLAGS used to link the jdk native launchers (C-code)
|
||||
LDFLAGS_JDKEXE="@LDFLAGS_JDKEXE@"
|
||||
LDFLAGS_JDKEXE_SUFFIX="@LDFLAGS_JDKEXE_SUFFIX@"
|
||||
|
||||
# Sometimes a different linker is needed for c++ libs
|
||||
LDCXX="@UNCYGDRIVE@ @LDCXX@"
|
||||
# The flags for linking libstdc++ linker.
|
||||
LIBCXX="@LIBCXX@"
|
||||
|
||||
# Sometimes a different linker is needed for c++ executables
|
||||
LDEXECXX="@UNCYGDRIVE@ @LDEXECXX@"
|
||||
|
||||
# If cross compiling, then define CROSS_COMPILE_ARCH=cpu_name here.
|
||||
# The HOSTCC should really be named BUILDCC, ie build executable for
|
||||
# the build platform. Same as CC when not cross compiling.
|
||||
HOSTCC="@HOSTCC@"
|
||||
HOSTCXX="@HOSTCXX@"
|
||||
# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
|
||||
HOST_CC="@HOSTCC@"
|
||||
NIO_CC="@HOSTCC@"
|
||||
|
||||
AS="@AS@"
|
||||
ASFLAGS="@ASFLAGS@"
|
||||
|
||||
# AR is used to create a static library (is ar in posix, lib.exe in winapi)
|
||||
AR="@UNCYGDRIVE@ @AR@"
|
||||
ARFLAGS="@ARFLAGS@"
|
||||
|
||||
NM="@NM@"
|
||||
STRIP="@STRIP@"
|
||||
MCS="@MCS@"
|
||||
|
||||
# Command to create a shared library
|
||||
SHARED_LIBRARY_FLAGS="@SHARED_LIBRARY_FLAGS@"
|
||||
|
||||
# Options to linker to specify a mapfile.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_MAPFILE="@SET_SHARED_LIBRARY_MAPFILE@"
|
||||
|
||||
# Options for C/CXX compiler to be used if linking is performed
|
||||
# using reorder file
|
||||
C_FLAG_REORDER="@C_FLAG_REORDER@"
|
||||
CXX_FLAG_REORDER="@CXX_FLAG_REORDER@"
|
||||
|
||||
#
|
||||
# Options for generating debug symbols
|
||||
ENABLE_DEBUG_SYMBOLS="@ENABLE_DEBUG_SYMBOLS@"
|
||||
CFLAGS_DEBUG_SYMBOLS="@CFLAGS_DEBUG_SYMBOLS@"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="@CXXFLAGS_DEBUG_SYMBOLS@"
|
||||
ZIP_DEBUGINFO_FILES="@ZIP_DEBUGINFO_FILES@"
|
||||
|
||||
# Options to linker to specify the library name.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_NAME="@SET_SHARED_LIBRARY_NAME@"
|
||||
|
||||
# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_ORIGIN="@SET_SHARED_LIBRARY_ORIGIN@"
|
||||
|
||||
# Different OS:es have different ways of naming shared libraries.
|
||||
# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
|
||||
# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
|
||||
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
|
||||
SHARED_LIBRARY="@SHARED_LIBRARY@"
|
||||
STATIC_LIBRARY="@STATIC_LIBRARY@"
|
||||
LIBRARY_PREFIX="@LIBRARY_PREFIX@"
|
||||
SHARED_LIBRARY_SUFFIX="@SHARED_LIBRARY_SUFFIX@"
|
||||
STATIC_LIBRARY_SUFFIX="@STATIC_LIBRARY_SUFFIX@"
|
||||
EXE_SUFFIX="@EXE_SUFFIX@"
|
||||
OBJ_SUFFIX="@OBJ_SUFFIX@"
|
||||
|
||||
POST_STRIP_CMD="@POST_STRIP_CMD@"
|
||||
POST_MCS_CMD='@POST_MCS_CMD@'
|
||||
|
||||
JAVA_FLAGS="@BOOT_JDK_JVMARGS@"
|
||||
|
||||
JAVA="@UNCYGDRIVE@ @JAVA@ ${JAVA_FLAGS}"
|
||||
|
||||
JAVAC="@UNCYGDRIVE@ @JAVAC@"
|
||||
JAVAC_FLAGS="@JAVAC_FLAGS@"
|
||||
|
||||
JAVAH="@UNCYGDRIVE@ @JAVAH@"
|
||||
|
||||
JAR="@UNCYGDRIVE@ @JAR@"
|
||||
|
||||
RMIC="@UNCYGDRIVE@ @RMIC@"
|
||||
|
||||
NATIVE2ASCII="@UNCYGDRIVE@ @NATIVE2ASCII@"
|
||||
|
||||
BOOT_JAR_CMD="@UNCYGDRIVE@ @JAR@"
|
||||
BOOT_JAR_JFLAGS=
|
||||
|
||||
# Tools adhering to a minimal and common standard of posix compliance.
|
||||
AWK="@AWK@"
|
||||
CAT="@CAT@"
|
||||
CCACHE="@CCACHE@"
|
||||
# CD is going away, but remains to cater for legacy makefiles.
|
||||
CD=cd
|
||||
CHMOD="@CHMOD@"
|
||||
CP="@CP@"
|
||||
CPIO="@CPIO@"
|
||||
CUT="@CUT@"
|
||||
DATE="@DATE@"
|
||||
DF="@DF@"
|
||||
DIFF="@DIFF@"
|
||||
FIND="@FIND@"
|
||||
FIND_DELETE="@FIND_DELETE@"
|
||||
ECHO="@ECHO@"
|
||||
EGREP="@EGREP@"
|
||||
FGREP="@FGREP@"
|
||||
FIND="@FIND@"
|
||||
GREP="@GREP@"
|
||||
HEAD="@HEAD@"
|
||||
LS="@LS@"
|
||||
LN="@LN@"
|
||||
MKDIR="@MKDIR@"
|
||||
MV="@MV@"
|
||||
NAWK="@NAWK@"
|
||||
PRINTF="@PRINTF@"
|
||||
PWD="@THEPWDCMD@"
|
||||
RM="@RM@"
|
||||
SED="@SED@"
|
||||
SH="@SH@"
|
||||
SORT="@SORT@"
|
||||
TAR="@TAR@"
|
||||
TAIL="@TAIL@"
|
||||
TEE="@TEE@"
|
||||
TR="@TR@"
|
||||
TOUCH="@TOUCH@"
|
||||
WC="@WC@"
|
||||
XARGS="@XARGS@"
|
||||
ZIPEXE="@ZIP@"
|
||||
ZIP="@ZIP@"
|
||||
UNZIP="@UNZIP@"
|
||||
MT="@UNCYGDRIVE@ @MT@"
|
||||
RC="@UNCYGDRIVE@ @RC@"
|
||||
DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@"
|
||||
CYGPATH="@CYGPATH@"
|
||||
LDD="@LDD@"
|
||||
OTOOL="@OTOOL@"
|
||||
READELF="@READELF@"
|
||||
EXPR="@EXPR@"
|
||||
FILE="@FILE@"
|
||||
HG="@HG@"
|
||||
OBJCOPY="@OBJCOPY@"
|
||||
|
||||
UNCYGDRIVE="@UNCYGDRIVE@"
|
||||
|
||||
# Build setup
|
||||
ENABLE_DOCS="@ENABLE_DOCS@"
|
||||
GENERATE_DOCS="@ENABLE_DOCS@"
|
||||
DISABLE_NIMBUS="@DISABLE_NIMBUS@"
|
||||
USE_EXTERNAL_LIBJPEG="@USE_EXTERNAL_LIBJPEG@"
|
||||
USE_EXTERNAL_LIBGIF="@USE_EXTERNAL_LIBGIF@"
|
||||
USE_EXTERNAL_LIBZ="@USE_EXTERNAL_LIBZ@"
|
||||
LIBZIP_CAN_USE_MMAP="@LIBZIP_CAN_USE_MMAP@"
|
||||
CHECK_FOR_VCINSTALLDIR="@CHECK_FOR_VCINSTALLDIR@"
|
||||
MSVCRNN_DLL="@MSVCR100DLL@"
|
||||
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Legacy Hotspot support
|
||||
|
||||
HOTSPOT_DIST="@HOTSPOT_DIST@"
|
||||
HOTSPOT_MAKE_ARGS="@HOTSPOT_MAKE_ARGS@"
|
||||
# This is used from the libjvm build for C/C++ code.
|
||||
HOTSPOT_BUILD_JOBS="@CONCURRENT_BUILD_JOBS@"
|
||||
# Control wether Hotspot runs Queens test after building
|
||||
TEST_IN_BUILD="@TEST_IN_BUILD@"
|
||||
|
||||
####################################################
|
||||
#
|
||||
# INSTALLATION
|
||||
#
|
||||
|
||||
# Common prefix for all installed files. Defaults to /usr/local,
|
||||
# but /opt/myjdk is another common version.
|
||||
INSTALL_PREFIX="@prefix@"
|
||||
|
||||
# Directories containing architecture-dependent files should be relative to exec_prefix
|
||||
INSTALL_EXECPREFIX="@exec_prefix@"
|
||||
|
||||
# java,javac,javah,javap etc are installed here.
|
||||
INSTALL_BINDIR="@bindir@"
|
||||
|
||||
# Read only architecture-independent data
|
||||
INSTALL_DATADIR="@datadir@"
|
||||
|
||||
# Root of above.
|
||||
INSTALL_DATAROOTDIR="@datarootdir@"
|
||||
|
||||
# Doc files, other than info and man.
|
||||
INSTALL_DOCDIR="@docdir@"
|
||||
|
||||
# Html documentation
|
||||
INSTALL_HTMLDIR="@htmldir@"
|
||||
|
||||
# Installing C header files, JNI headers for example.
|
||||
INSTALL_INCLUDEDIR="@includedir@"
|
||||
|
||||
# Installing library files....
|
||||
INSTALL_INCLUDEDIR="@libdir@"
|
||||
|
||||
# Executables that other programs run.
|
||||
INSTALL_LIBEXECDIR="@libexecdir@"
|
||||
|
||||
# Locale-dependent but architecture-independent data, such as message catalogs.
|
||||
INSTALL_LOCALEDIR="@localedir@"
|
||||
|
||||
# Modifiable single-machine data
|
||||
INSTALL_LOCALSTATEDIR="@localstatedir@"
|
||||
|
||||
# Man pages
|
||||
INSTALL_MANDIR="@mandir@"
|
||||
|
||||
# Modifiable architecture-independent data.
|
||||
INSTALL_SHAREDSTATEDIR="@sharedstatedir@"
|
||||
|
||||
# Read-only single-machine data
|
||||
INSTALL_SYSCONFDIR="@sysconfdir@"
|
||||
|
||||
|
||||
####################################################
|
||||
#
|
||||
# Misc
|
||||
#
|
||||
|
||||
# Name of Service Agent library
|
||||
SALIB_NAME="@SALIB_NAME@"
|
||||
|
||||
OS_VERSION_MAJOR="@OS_VERSION_MAJOR@"
|
||||
OS_VERSION_MINOR="@OS_VERSION_MINOR@"
|
||||
OS_VERSION_MICRO="@OS_VERSION_MICRO@"
|
||||
POST_STRIP_CMD="@POST_STRIP_CMD@"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
258
common/autoconf/toolchain_windows.m4
Normal file
258
common/autoconf/toolchain_windows.m4
Normal file
@@ -0,0 +1,258 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
[
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
VS100BASE="$1"
|
||||
METHOD="$2"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE)
|
||||
if test -d "$VS100BASE"; then
|
||||
if test -f "$VS100BASE/$VCVARSFILE"; then
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
|
||||
VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
|
||||
else
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
[
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
WIN_SDK_BASE="$1"
|
||||
METHOD="$2"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||
if test -d "$WIN_SDK_BASE"; then
|
||||
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
VS_ENV_ARGS="/x86"
|
||||
else
|
||||
VS_ENV_ARGS="/x64"
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
|
||||
AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
|
||||
VCVARSFILE="vc/bin/vcvars32.bat"
|
||||
else
|
||||
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
|
||||
fi
|
||||
|
||||
VS_ENV_CMD=""
|
||||
VS_ENV_ARGS=""
|
||||
if test "x$with_toolsdir" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
|
||||
fi
|
||||
|
||||
if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
|
||||
# Having specified an argument which is incorrect will produce an instant failure;
|
||||
# we should not go on looking
|
||||
AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
|
||||
AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
|
||||
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
|
||||
fi
|
||||
|
||||
if test "x$ProgramW6432" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
fi
|
||||
if test "x$PROGRAMW6432" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
fi
|
||||
if test "x$PROGRAMFILES" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
|
||||
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
|
||||
fi
|
||||
if test "x$PROGRAMFILES" != x; then
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name])
|
||||
fi
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name])
|
||||
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name])
|
||||
])
|
||||
|
||||
# Check if the VS env variables were setup prior to running configure.
|
||||
# If not, then find vcvarsall.bat and run it automatically, and integrate
|
||||
# the set env variables into the spec file.
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
[
|
||||
# Store path to cygwin link.exe to help excluding it when searching for
|
||||
# VS linker. This must be done before changing the PATH when looking for VS.
|
||||
AC_PATH_PROG(CYGWIN_LINK, link)
|
||||
if test "x$CYGWIN_LINK" != x; then
|
||||
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
|
||||
"$CYGWIN_LINK" --version > /dev/null
|
||||
if test $? -eq 0 ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
# This might be the VS linker. Don't exclude it later on.
|
||||
CYGWIN_LINK=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# First-hand choice is to locate and run the vsvars bat file.
|
||||
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE
|
||||
if test "x$VS_ENV_CMD" != x; then
|
||||
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
||||
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
||||
|
||||
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
||||
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
|
||||
cd $OUTPUT_ROOT
|
||||
# FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
|
||||
# to autoconf standards.
|
||||
|
||||
#----
|
||||
|
||||
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
|
||||
# but calculate the difference in Cygwin environment before/after running it and then
|
||||
# apply the diff.
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
|
||||
_vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
|
||||
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
|
||||
_dosbash=`cygpath -a -w -s \`which bash\`.*`
|
||||
else
|
||||
_dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
|
||||
_dosbash=`cmd //c echo \`which bash\``
|
||||
fi
|
||||
|
||||
# generate the set of exported vars before/after the vs10 setup
|
||||
$ECHO "@echo off" > localdevenvtmp.bat
|
||||
$ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
|
||||
$ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat
|
||||
$ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
|
||||
|
||||
# Now execute the newly created bat file.
|
||||
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys
|
||||
cmd /c localdevenvtmp.bat | cat
|
||||
|
||||
# apply the diff (less some non-vs10 vars named by "!")
|
||||
$SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
|
||||
$SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
|
||||
$COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
|
||||
|
||||
# cleanup
|
||||
$RM localdevenvtmp*
|
||||
#----
|
||||
cd $CURDIR
|
||||
if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
||||
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Now set all paths and other env variables. This will allow the rest of
|
||||
# the configure script to find and run the compiler in the proper way.
|
||||
AC_MSG_NOTICE([Setting extracted environment variables])
|
||||
. $OUTPUT_ROOT/localdevenv.sh
|
||||
else
|
||||
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
|
||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
|
||||
fi
|
||||
|
||||
# At this point, we should have corrent variables in the environment, or we can't continue.
|
||||
AC_MSG_CHECKING([for Visual Studio variables])
|
||||
|
||||
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
|
||||
if test "x$INCLUDE" = x || test "x$LIB" = x; then
|
||||
AC_MSG_RESULT([present but broken])
|
||||
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
||||
else
|
||||
AC_MSG_RESULT([ok])
|
||||
VS_INCLUDE="$INCLUDE"
|
||||
VS_LIB="$LIB"
|
||||
VS_PATH="$PATH"
|
||||
AC_SUBST(VS_INCLUDE)
|
||||
AC_SUBST(VS_LIB)
|
||||
AC_SUBST(VS_PATH)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
|
||||
if test "x$VS_ENV_CMD" = x; then
|
||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk,])
|
||||
AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
|
||||
else
|
||||
AC_MSG_NOTICE([Running the extraction script failed.])
|
||||
fi
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
||||
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
|
||||
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
|
||||
if test "x$with_msvcr_dll" != x; then
|
||||
MSVCR_DLL="$with_msvcr_dll"
|
||||
else
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
|
||||
else
|
||||
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
|
||||
fi
|
||||
fi
|
||||
if test "x$MSVCR_DLL" != x; then
|
||||
AC_MSG_NOTICE([msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR])
|
||||
else
|
||||
AC_MSG_NOTICE([Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR])
|
||||
fi
|
||||
fi
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
|
||||
AC_MSG_NOTICE([msvcr100.dll found in $SYSTEMROOT/system32])
|
||||
MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find msvcr100.dll !])
|
||||
fi
|
||||
AC_MSG_RESULT([$MSVCR_DLL])
|
||||
BASIC_FIXUP_PATH(MSVCR_DLL)
|
||||
])
|
||||
@@ -34,3 +34,7 @@ PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
|
||||
# Might need better names for these
|
||||
MACOSX_BUNDLE_NAME_BASE="OpenJDK"
|
||||
MACOSX_BUNDLE_ID_BASE="net.java.openjdk"
|
||||
|
||||
77
common/bin/boot_cycle.sh
Normal file
77
common/bin/boot_cycle.sh
Normal file
@@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# The boot_cycle.sh script performs two complete image builds (no javadoc though....)
|
||||
# where the second build uses the first build as the boot jdk.
|
||||
#
|
||||
# This is useful to verify that the build is self hoisting and assists
|
||||
# in flushing out bugs. You can follow up with compare_objects.sh to check
|
||||
# that the two boot_cycle_?/images/j2sdk are identical. They should be.
|
||||
#
|
||||
# Usage:
|
||||
# Specify the configure arguments to boot_cycle.sh, for example:
|
||||
#
|
||||
# sh common/bin/boot_cycle.sh --enable-debug --with-jvm-variants=server
|
||||
#
|
||||
# The same arguments will be used for both builds, except of course --with-boot-jdk
|
||||
# that will be adjusted to boot_cycle_1 for the second build.
|
||||
|
||||
SCRIPT_DIR=`pwd`/`dirname $0`
|
||||
ROOT_DIR=`(cd $SCRIPT_DIR/../.. ; pwd)`
|
||||
BUILD_DIR=$ROOT_DIR/build
|
||||
mkdir -p $BUILD_DIR
|
||||
AUTOCONF_DIR=`(cd $SCRIPT_DIR/../autoconf ; pwd)`
|
||||
BOOT_CYCLE_1_DIR=$BUILD_DIR/boot_cycle_1
|
||||
BOOT_CYCLE_2_DIR=$BUILD_DIR/boot_cycle_2
|
||||
|
||||
# Create the boot cycle dirs in the build directory.
|
||||
mkdir -p $BOOT_CYCLE_1_DIR
|
||||
mkdir -p $BOOT_CYCLE_2_DIR
|
||||
|
||||
cd $BOOT_CYCLE_1_DIR
|
||||
# Configure!
|
||||
sh $AUTOCONF_DIR/configure "$@"
|
||||
# Now build!
|
||||
make images
|
||||
|
||||
if ! test -x $BOOT_CYCLE_1_DIR/images/j2sdk-image/bin/java ; then
|
||||
echo Failed to build the executable $BOOT_CYCLE_1_DIR/images/j2sdk-image/bin/java
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $BOOT_CYCLE_2_DIR
|
||||
# Pickup the configure arguments, but drop any --with-boot-jdk=....
|
||||
# and add the correct --with-boot-jdk=...boot_cycle_1... at the end.
|
||||
ARGUMENTS="`cat $BOOT_CYCLE_1_DIR/configure-arguments|sed 's/--with-boot-jdk=[^ ]*//'` --with-boot-jdk=$BOOT_CYCLE_1_DIR/images/j2sdk-image"
|
||||
# Configure using these adjusted arguments.
|
||||
sh $AUTOCONF_DIR/configure $ARGUMENTS
|
||||
# Now build!
|
||||
make images
|
||||
|
||||
if ! test -x $BOOT_CYCLE_2_DIR/images/j2sdk-image/bin/java ; then
|
||||
echo Failed to build the final executable $BOOT_CYCLE_2_DIR/images/j2sdk-image/bin/java
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#
|
||||
|
||||
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
|
||||
echo "bash ./common/bin/compare-build.sh old_jdk_build_dir new_jdk_build_dir"
|
||||
echo "bash ./common/bin/compare-objects.sh old_jdk_build_dir new_jdk_build_dir <pattern>"
|
||||
echo ""
|
||||
echo "Compare object files"
|
||||
echo ""
|
||||
|
||||
1220
common/bin/compare.sh
Normal file
1220
common/bin/compare.sh
Normal file
File diff suppressed because it is too large
Load Diff
935
common/bin/compare_exceptions.sh.incl
Normal file
935
common/bin/compare_exceptions.sh.incl
Normal file
@@ -0,0 +1,935 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script is not to be run as stand-alone, it should be included from
|
||||
# compare.sh.
|
||||
|
||||
##########################################################################################
|
||||
# Check that we are run via inclusion from compare.sh and not as stand-alone.
|
||||
if [ -z "$COMPARE_EXCEPTIONS_INCLUDE" ]; then
|
||||
echo "Error: This script should not be run as stand-alone. It is included by compare.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Diff exceptions
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/i386/client/libjvm.so
|
||||
./jre/lib/i386/libattach.so
|
||||
./jre/lib/i386/libdt_socket.so
|
||||
./jre/lib/i386/libhprof.so
|
||||
./jre/lib/i386/libinstrument.so
|
||||
./jre/lib/i386/libjava_crw_demo.so
|
||||
./jre/lib/i386/libjsdt.so
|
||||
./jre/lib/i386/libmanagement.so
|
||||
./jre/lib/i386/libnpt.so
|
||||
./jre/lib/i386/libverify.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/amd64/libattach.so
|
||||
./jre/lib/amd64/libdt_socket.so
|
||||
./jre/lib/amd64/libhprof.so
|
||||
./jre/lib/amd64/libinstrument.so
|
||||
./jre/lib/amd64/libjava_crw_demo.so
|
||||
./jre/lib/amd64/libjsdt.so
|
||||
./jre/lib/amd64/libjsig.so
|
||||
./jre/lib/amd64/libmanagement.so
|
||||
./jre/lib/amd64/libnpt.so
|
||||
./jre/lib/amd64/libsaproc.so
|
||||
./jre/lib/amd64/libverify.so
|
||||
./jre/lib/amd64/server/libjsig.so
|
||||
./jre/lib/amd64/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/i386/jexec
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/i386/client/libjvm.so
|
||||
./jre/lib/i386/libsaproc.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/i386/client/libjvm.so
|
||||
./jre/lib/i386/jli/libjli.so
|
||||
./jre/lib/i386/libJdbcOdbc.so
|
||||
./jre/lib/i386/libattach.so
|
||||
./jre/lib/i386/libawt.so
|
||||
./jre/lib/i386/libawt_headless.so
|
||||
./jre/lib/i386/libawt_xawt.so
|
||||
./jre/lib/i386/libdcpr.so
|
||||
./jre/lib/i386/libdt_socket.so
|
||||
./jre/lib/i386/libfontmanager.so
|
||||
./jre/lib/i386/libhprof.so
|
||||
./jre/lib/i386/libinstrument.so
|
||||
./jre/lib/i386/libj2gss.so
|
||||
./jre/lib/i386/libj2pcsc.so
|
||||
./jre/lib/i386/libj2pkcs11.so
|
||||
./jre/lib/i386/libj2ucrypto.so
|
||||
./jre/lib/i386/libjaas_unix.so
|
||||
./jre/lib/i386/libjava.so
|
||||
./jre/lib/i386/libjava_crw_demo.so
|
||||
./jre/lib/i386/libjawt.so
|
||||
./jre/lib/i386/libjdwp.so
|
||||
./jre/lib/i386/libjfr.so
|
||||
./jre/lib/i386/libjpeg.so
|
||||
./jre/lib/i386/libjsdt.so
|
||||
./jre/lib/i386/libjsound.so
|
||||
./jre/lib/i386/libkcms.so
|
||||
./jre/lib/i386/liblcms.so
|
||||
./jre/lib/i386/libmanagement.so
|
||||
./jre/lib/i386/libmlib_image.so
|
||||
./jre/lib/i386/libnet.so
|
||||
./jre/lib/i386/libnio.so
|
||||
./jre/lib/i386/libnpt.so
|
||||
./jre/lib/i386/libsctp.so
|
||||
./jre/lib/i386/libsplashscreen.so
|
||||
./jre/lib/i386/libsunec.so
|
||||
./jre/lib/i386/libsunwjdga.so
|
||||
./jre/lib/i386/libt2k.so
|
||||
./jre/lib/i386/libunpack.so
|
||||
./jre/lib/i386/libverify.so
|
||||
./jre/lib/i386/libzip.so
|
||||
./jre/lib/i386/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/unpack200
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
./jre/bin/unpack200
|
||||
./jre/lib/i386/jexec
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/amd64/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/amd64/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/amd64/libhprof.so
|
||||
./demo/jvmti/minst/lib/amd64/libminst.so
|
||||
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/amd64/libwaiters.so
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/amd64/server/libjvm.so
|
||||
./jre/lib/amd64/libsaproc.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/amd64/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/amd64/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/amd64/libhprof.so
|
||||
./demo/jvmti/minst/lib/amd64/libminst.so
|
||||
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/amd64/libwaiters.so
|
||||
./jre/lib/amd64/jli/libjli.so
|
||||
./jre/lib/amd64/libJdbcOdbc.so
|
||||
./jre/lib/amd64/libattach.so
|
||||
./jre/lib/amd64/libawt.so
|
||||
./jre/lib/amd64/libawt_headless.so
|
||||
./jre/lib/amd64/libawt_xawt.so
|
||||
./jre/lib/amd64/libdcpr.so
|
||||
./jre/lib/amd64/libdt_socket.so
|
||||
./jre/lib/amd64/libfontmanager.so
|
||||
./jre/lib/amd64/libhprof.so
|
||||
./jre/lib/amd64/libinstrument.so
|
||||
./jre/lib/amd64/libj2gss.so
|
||||
./jre/lib/amd64/libj2pcsc.so
|
||||
./jre/lib/amd64/libj2pkcs11.so
|
||||
./jre/lib/amd64/libj2ucrypto.so
|
||||
./jre/lib/amd64/libjaas_unix.so
|
||||
./jre/lib/amd64/libjava.so
|
||||
./jre/lib/amd64/libjava_crw_demo.so
|
||||
./jre/lib/amd64/libjawt.so
|
||||
./jre/lib/amd64/libjdwp.so
|
||||
./jre/lib/amd64/libjfr.so
|
||||
./jre/lib/amd64/libjpeg.so
|
||||
./jre/lib/amd64/libjsdt.so
|
||||
./jre/lib/amd64/libjsound.so
|
||||
./jre/lib/amd64/libkcms.so
|
||||
./jre/lib/amd64/liblcms.so
|
||||
./jre/lib/amd64/libmanagement.so
|
||||
./jre/lib/amd64/libmlib_image.so
|
||||
./jre/lib/amd64/libnet.so
|
||||
./jre/lib/amd64/libnio.so
|
||||
./jre/lib/amd64/libnpt.so
|
||||
./jre/lib/amd64/libsctp.so
|
||||
./jre/lib/amd64/libsplashscreen.so
|
||||
./jre/lib/amd64/libsunec.so
|
||||
./jre/lib/amd64/libsunwjdga.so
|
||||
./jre/lib/amd64/libt2k.so
|
||||
./jre/lib/amd64/libunpack.so
|
||||
./jre/lib/amd64/libverify.so
|
||||
./jre/lib/amd64/libzip.so
|
||||
./jre/lib/amd64/server/64/libjvm_db.so
|
||||
./jre/lib/amd64/server/64/libjvm_dtrace.so
|
||||
./bin/amd64/appletviewer
|
||||
./bin/amd64/extcheck
|
||||
./bin/amd64/idlj
|
||||
./bin/amd64/jar
|
||||
./bin/amd64/jarsigner
|
||||
./bin/amd64/java
|
||||
./bin/amd64/javac
|
||||
./bin/amd64/javadoc
|
||||
./bin/amd64/javah
|
||||
./bin/amd64/javap
|
||||
./bin/amd64/jcmd
|
||||
./bin/amd64/jconsole
|
||||
./bin/amd64/jdb
|
||||
./bin/amd64/jhat
|
||||
./bin/amd64/jinfo
|
||||
./bin/amd64/jmap
|
||||
./bin/amd64/jps
|
||||
./bin/amd64/jrunscript
|
||||
./bin/amd64/jsadebugd
|
||||
./bin/amd64/jstack
|
||||
./bin/amd64/jstat
|
||||
./bin/amd64/jstatd
|
||||
./bin/amd64/keytool
|
||||
./bin/amd64/native2ascii
|
||||
./bin/amd64/orbd
|
||||
./bin/amd64/pack200
|
||||
./bin/amd64/policytool
|
||||
./bin/amd64/rmic
|
||||
./bin/amd64/rmid
|
||||
./bin/amd64/rmiregistry
|
||||
./bin/amd64/schemagen
|
||||
./bin/amd64/serialver
|
||||
./bin/amd64/servertool
|
||||
./bin/amd64/tnameserv
|
||||
./bin/amd64/unpack200
|
||||
./bin/amd64/wsgen
|
||||
./bin/amd64/wsimport
|
||||
./bin/amd64/xjc
|
||||
./jre/bin/amd64/java
|
||||
./jre/bin/amd64/keytool
|
||||
./jre/bin/amd64/orbd
|
||||
./jre/bin/amd64/pack200
|
||||
./jre/bin/amd64/policytool
|
||||
./jre/bin/amd64/rmid
|
||||
./jre/bin/amd64/rmiregistry
|
||||
./jre/bin/amd64/servertool
|
||||
./jre/bin/amd64/tnameserv
|
||||
./jre/bin/amd64/unpack200
|
||||
./jre/lib/amd64/jexec
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparc" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/sparc/jexec
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/sparc/client/64/libjvm_db.so
|
||||
./jre/lib/sparc/client/64/libjvm_dtrace.so
|
||||
./jre/lib/sparc/client/libjsig.so
|
||||
./jre/lib/sparc/client/libjvm.so
|
||||
./jre/lib/sparc/client/libjvm_db.so
|
||||
./jre/lib/sparc/client/libjvm_dtrace.so
|
||||
./jre/lib/sparc/libjsig.so
|
||||
./jre/lib/sparc/libsaproc.so
|
||||
./jre/lib/sparc/server/64/libjvm_db.so
|
||||
./jre/lib/sparc/server/64/libjvm_dtrace.so
|
||||
./jre/lib/sparc/server/libjsig.so
|
||||
./jre/lib/sparc/server/libjvm.so
|
||||
./jre/lib/sparc/server/libjvm_db.so
|
||||
./jre/lib/sparc/server/libjvm_dtrace.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/libhprof.so
|
||||
./demo/jvmti/minst/lib/libminst.so
|
||||
./demo/jvmti/mtrace/lib/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
./jre/lib/sparc/client/libjvm.so
|
||||
./jre/lib/sparc/jli/libjli.so
|
||||
./jre/lib/sparc/libJdbcOdbc.so
|
||||
./jre/lib/sparc/libattach.so
|
||||
./jre/lib/sparc/libawt.so
|
||||
./jre/lib/sparc/libawt_headless.so
|
||||
./jre/lib/sparc/libawt_xawt.so
|
||||
./jre/lib/sparc/libdcpr.so
|
||||
./jre/lib/sparc/libdt_socket.so
|
||||
./jre/lib/sparc/libfontmanager.so
|
||||
./jre/lib/sparc/libhprof.so
|
||||
./jre/lib/sparc/libinstrument.so
|
||||
./jre/lib/sparc/libj2gss.so
|
||||
./jre/lib/sparc/libj2pcsc.so
|
||||
./jre/lib/sparc/libj2pkcs11.so
|
||||
./jre/lib/sparc/libj2ucrypto.so
|
||||
./jre/lib/sparc/libjaas_unix.so
|
||||
./jre/lib/sparc/libjava.so
|
||||
./jre/lib/sparc/libjava_crw_demo.so
|
||||
./jre/lib/sparc/libjawt.so
|
||||
./jre/lib/sparc/libjdwp.so
|
||||
./jre/lib/sparc/libjfr.so
|
||||
./jre/lib/sparc/libjpeg.so
|
||||
./jre/lib/sparc/libjsdt.so
|
||||
./jre/lib/sparc/libjsound.so
|
||||
./jre/lib/sparc/libkcms.so
|
||||
./jre/lib/sparc/liblcms.so
|
||||
./jre/lib/sparc/libmanagement.so
|
||||
./jre/lib/sparc/libmlib_image.so
|
||||
./jre/lib/sparc/libmlib_image_v.so
|
||||
./jre/lib/sparc/libnet.so
|
||||
./jre/lib/sparc/libnio.so
|
||||
./jre/lib/sparc/libnpt.so
|
||||
./jre/lib/sparc/libsctp.so
|
||||
./jre/lib/sparc/libsplashscreen.so
|
||||
./jre/lib/sparc/libsunec.so
|
||||
./jre/lib/sparc/libsunwjdga.so
|
||||
./jre/lib/sparc/libt2k.so
|
||||
./jre/lib/sparc/libunpack.so
|
||||
./jre/lib/sparc/libverify.so
|
||||
./jre/lib/sparc/libzip.so
|
||||
./jre/lib/sparc/server/libjvm.so
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/unpack200
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
./jre/bin/unpack200
|
||||
./jre/lib/sparc/jexec
|
||||
"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
# Some numbers differ randomly.
|
||||
DIS_DIFF_FILTER="$SED -e s/\$[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/\([0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].\)[0-9a-f][0-9a-f]/\1<NUM>/g -e s/\(%g1,.0x\)[0-9a-f]*\(,.%g1\)/\1<HEX>\2/g -e s/\(!.\)[0-9a-f]*\(.<SUNWprivate_1.1+0x\)[0-9a-f]*/\1<NUM>\2<HEX>/g"
|
||||
|
||||
# Some xor instructions end up with different args in the lib but not in the object files.
|
||||
ACCEPTED_DIS_DIFF="
|
||||
./demo/jvmti/waiters/lib/libwaiters.so
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]; then
|
||||
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./demo/jni/Poller/lib/sparcv9/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/sparcv9/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/sparcv9/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/sparcv9/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/sparcv9/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/sparcv9/libhprof.so
|
||||
./demo/jvmti/minst/lib/sparcv9/libminst.so
|
||||
./demo/jvmti/mtrace/lib/sparcv9/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/sparcv9/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
./jre/lib/sparcv9/libjsig.so
|
||||
./jre/lib/sparcv9/libsaproc.so
|
||||
./jre/lib/sparcv9/server/libjvm.so
|
||||
./jre/lib/sparcv9/server/libjvm_dtrace.so
|
||||
"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jni/Poller/lib/sparcv9/libPoller.so
|
||||
./demo/jvmti/compiledMethodLoad/lib/sparcv9/libcompiledMethodLoad.so
|
||||
./demo/jvmti/gctest/lib/sparcv9/libgctest.so
|
||||
./demo/jvmti/heapTracker/lib/sparcv9/libheapTracker.so
|
||||
./demo/jvmti/heapViewer/lib/sparcv9/libheapViewer.so
|
||||
./demo/jvmti/hprof/lib/sparcv9/libhprof.so
|
||||
./demo/jvmti/minst/lib/sparcv9/libminst.so
|
||||
./demo/jvmti/mtrace/lib/sparcv9/libmtrace.so
|
||||
./demo/jvmti/versionCheck/lib/sparcv9/libversionCheck.so
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
./jre/lib/sparcv9/client/libjvm.so
|
||||
./jre/lib/sparcv9/jli/libjli.so
|
||||
./jre/lib/sparcv9/libJdbcOdbc.so
|
||||
./jre/lib/sparcv9/libattach.so
|
||||
./jre/lib/sparcv9/libawt.so
|
||||
./jre/lib/sparcv9/libawt_headless.so
|
||||
./jre/lib/sparcv9/libawt_xawt.so
|
||||
./jre/lib/sparcv9/libdcpr.so
|
||||
./jre/lib/sparcv9/libdt_socket.so
|
||||
./jre/lib/sparcv9/libfontmanager.so
|
||||
./jre/lib/sparcv9/libhprof.so
|
||||
./jre/lib/sparcv9/libinstrument.so
|
||||
./jre/lib/sparcv9/libj2gss.so
|
||||
./jre/lib/sparcv9/libj2pcsc.so
|
||||
./jre/lib/sparcv9/libj2pkcs11.so
|
||||
./jre/lib/sparcv9/libj2ucrypto.so
|
||||
./jre/lib/sparcv9/libjaas_unix.so
|
||||
./jre/lib/sparcv9/libjava.so
|
||||
./jre/lib/sparcv9/libjava_crw_demo.so
|
||||
./jre/lib/sparcv9/libjawt.so
|
||||
./jre/lib/sparcv9/libjdwp.so
|
||||
./jre/lib/sparcv9/libjfr.so
|
||||
./jre/lib/sparcv9/libjpeg.so
|
||||
./jre/lib/sparcv9/libjsdt.so
|
||||
./jre/lib/sparcv9/libjsound.so
|
||||
./jre/lib/sparcv9/libkcms.so
|
||||
./jre/lib/sparcv9/liblcms.so
|
||||
./jre/lib/sparcv9/libmanagement.so
|
||||
./jre/lib/sparcv9/libmlib_image.so
|
||||
./jre/lib/sparcv9/libmlib_image_v.so
|
||||
./jre/lib/sparcv9/libnet.so
|
||||
./jre/lib/sparcv9/libnio.so
|
||||
./jre/lib/sparcv9/libnpt.so
|
||||
./jre/lib/sparcv9/libsctp.so
|
||||
./jre/lib/sparcv9/libsplashscreen.so
|
||||
./jre/lib/sparcv9/libsunec.so
|
||||
./jre/lib/sparcv9/libsunwjdga.so
|
||||
./jre/lib/sparcv9/libt2k.so
|
||||
./jre/lib/sparcv9/libunpack.so
|
||||
./jre/lib/sparcv9/libverify.so
|
||||
./jre/lib/sparcv9/libzip.so
|
||||
./jre/lib/sparcv9/server/libjvm.so
|
||||
./bin/sparcv9/appletviewer
|
||||
./bin/sparcv9/extcheck
|
||||
./bin/sparcv9/idlj
|
||||
./bin/sparcv9/jar
|
||||
./bin/sparcv9/jarsigner
|
||||
./bin/sparcv9/java
|
||||
./bin/sparcv9/javac
|
||||
./bin/sparcv9/javadoc
|
||||
./bin/sparcv9/javah
|
||||
./bin/sparcv9/javap
|
||||
./bin/sparcv9/jcmd
|
||||
./bin/sparcv9/jconsole
|
||||
./bin/sparcv9/jdb
|
||||
./bin/sparcv9/jhat
|
||||
./bin/sparcv9/jinfo
|
||||
./bin/sparcv9/jmap
|
||||
./bin/sparcv9/jps
|
||||
./bin/sparcv9/jrunscript
|
||||
./bin/sparcv9/jsadebugd
|
||||
./bin/sparcv9/jstack
|
||||
./bin/sparcv9/jstat
|
||||
./bin/sparcv9/jstatd
|
||||
./bin/sparcv9/keytool
|
||||
./bin/sparcv9/native2ascii
|
||||
./bin/sparcv9/orbd
|
||||
./bin/sparcv9/pack200
|
||||
./bin/sparcv9/policytool
|
||||
./bin/sparcv9/rmic
|
||||
./bin/sparcv9/rmid
|
||||
./bin/sparcv9/rmiregistry
|
||||
./bin/sparcv9/schemagen
|
||||
./bin/sparcv9/serialver
|
||||
./bin/sparcv9/servertool
|
||||
./bin/sparcv9/tnameserv
|
||||
./bin/sparcv9/unpack200
|
||||
./bin/sparcv9/wsgen
|
||||
./bin/sparcv9/wsimport
|
||||
./bin/sparcv9/xjc
|
||||
./jre/bin/sparcv9/java
|
||||
./jre/bin/sparcv9/keytool
|
||||
./jre/bin/sparcv9/orbd
|
||||
./jre/bin/sparcv9/pack200
|
||||
./jre/bin/sparcv9/policytool
|
||||
./jre/bin/sparcv9/rmid
|
||||
./jre/bin/sparcv9/rmiregistry
|
||||
./jre/bin/sparcv9/servertool
|
||||
./jre/bin/sparcv9/tnameserv
|
||||
./jre/bin/sparcv9/unpack200
|
||||
"
|
||||
|
||||
# Filter random C++ symbol strings.
|
||||
# Some numbers differ randomly.
|
||||
DIS_DIFF_FILTER="$SED -e s/\$[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f]/<NUMS>/g -e s/\(%g1,.0x\)[0-9a-f]*\(,.%g1\)/\1<HEX>\2/g -e s/\(!.\)[0-9a-f]*\(.<SUNWprivate_1.1+0x\)[0-9a-f]*/\1<NUM>\2<HEX>/g"
|
||||
|
||||
# Some xor instructions end up with different args in the lib but not in the object files.
|
||||
ACCEPTED_DIS_DIFF="
|
||||
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
|
||||
"
|
||||
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
|
||||
# Probably should add all libs here
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./demo/jvmti/gctest/lib/gctest.dll
|
||||
./demo/jvmti/heapTracker/lib/heapTracker.dll
|
||||
./demo/jvmti/minst/lib/minst.dll
|
||||
./jre/bin/attach.dll
|
||||
./jre/bin/java_crw_demo.dll
|
||||
./jre/bin/jsoundds.dll
|
||||
./bin/appletviewer.exe
|
||||
./bin/extcheck.exe
|
||||
./bin/idlj.exe
|
||||
./bin/jar.exe
|
||||
./bin/jarsigner.exe
|
||||
./bin/java-rmi.exe
|
||||
./bin/java.exe
|
||||
./bin/javac.exe
|
||||
./bin/javadoc.exe
|
||||
./bin/javah.exe
|
||||
./bin/javap.exe
|
||||
./bin/javaw.exe
|
||||
./bin/jcmd.exe
|
||||
./bin/jconsole.exe
|
||||
./bin/jdb.exe
|
||||
./bin/jhat.exe
|
||||
./bin/jinfo.exe
|
||||
./bin/jmap.exe
|
||||
./bin/jps.exe
|
||||
./bin/jrunscript.exe
|
||||
./bin/jsadebugd.exe
|
||||
./bin/jstack.exe
|
||||
./bin/jstat.exe
|
||||
./bin/jstatd.exe
|
||||
./bin/keytool.exe
|
||||
./bin/kinit.exe
|
||||
./bin/klist.exe
|
||||
./bin/ktab.exe
|
||||
./bin/native2ascii.exe
|
||||
./bin/orbd.exe
|
||||
./bin/pack200.exe
|
||||
./bin/policytool.exe
|
||||
./bin/rmic.exe
|
||||
./bin/rmid.exe
|
||||
./bin/rmiregistry.exe
|
||||
./bin/schemagen.exe
|
||||
./bin/serialver.exe
|
||||
./bin/servertool.exe
|
||||
./bin/tnameserv.exe
|
||||
./bin/unpack200.exe
|
||||
./bin/wsgen.exe
|
||||
./bin/wsimport.exe
|
||||
./bin/xjc.exe
|
||||
./jre/bin/java-rmi.exe
|
||||
./jre/bin/java.exe
|
||||
./jre/bin/javaw.exe
|
||||
./jre/bin/keytool.exe
|
||||
./jre/bin/kinit.exe
|
||||
./jre/bin/klist.exe
|
||||
./jre/bin/ktab.exe
|
||||
./jre/bin/orbd.exe
|
||||
./jre/bin/pack200.exe
|
||||
./jre/bin/policytool.exe
|
||||
./jre/bin/rmid.exe
|
||||
./jre/bin/rmiregistry.exe
|
||||
./jre/bin/servertool.exe
|
||||
./jre/bin/tnameserv.exe
|
||||
./jre/bin/unpack200.exe
|
||||
"
|
||||
|
||||
# On windows, there are unavoidable allignment issues making
|
||||
# a perfect disasm diff impossible. Filter out the following:
|
||||
# * Random parts of C++ symbols (this is a bit greedy, but does the trick)
|
||||
# @XXXXX
|
||||
# * Hexadecimal addresses that are sometimes alligned differently.
|
||||
# * Dates in version strings XXXX_XX_XX.
|
||||
DIS_DIFF_FILTER="$SED -e s/[@?][A-Z0-9_]\{1,25\}/<SYM>/g -e s/^.\{2,2\}[0-9A-F]\{16,16\}.\{2,2\}//g -e s/[0-9A-F]\{4,16\}h/<HEXSTR>/g -e s/_[0-9]\{4,4\}_[0-9][0-9]_[0-9][0-9]/<DATE>/g"
|
||||
|
||||
SKIP_BIN_DIFF="true"
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
ACCEPTED_JARZIP_CONTENTS="
|
||||
/META-INF/INDEX.LIST
|
||||
"
|
||||
|
||||
KNOWN_BIN_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./bin/appletviewer
|
||||
./bin/extcheck
|
||||
./bin/idlj
|
||||
./bin/jar
|
||||
./bin/jarsigner
|
||||
./bin/java
|
||||
./bin/javac
|
||||
./bin/javadoc
|
||||
./bin/javah
|
||||
./bin/javap
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
./bin/jsadebugd
|
||||
./bin/jstack
|
||||
./bin/jstat
|
||||
./bin/jstatd
|
||||
./bin/keytool
|
||||
./bin/native2ascii
|
||||
./bin/orbd
|
||||
./bin/pack200
|
||||
./bin/policytool
|
||||
./bin/rmic
|
||||
./bin/rmid
|
||||
./bin/rmiregistry
|
||||
./bin/schemagen
|
||||
./bin/serialver
|
||||
./bin/servertool
|
||||
./bin/tnameserv
|
||||
./bin/wsgen
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
./jre/bin/policytool
|
||||
./jre/bin/rmid
|
||||
./jre/bin/rmiregistry
|
||||
./jre/bin/servertool
|
||||
./jre/bin/tnameserv
|
||||
./jre/lib/libsaproc.dylib
|
||||
./jre/lib/server/libjvm.dylib
|
||||
"
|
||||
|
||||
KNOWN_SIZE_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_SYM_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_ELF_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_DIS_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
fi
|
||||
@@ -1,335 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# MANUAL
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image
|
||||
#
|
||||
# Compare the directory structure.
|
||||
# Compare the filenames in the directories.
|
||||
# Compare the contents of the zip archives
|
||||
# Compare the contents of the jar archives
|
||||
# Compare the native libraries
|
||||
# Compare the native executables
|
||||
# Compare the remaining files
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]
|
||||
#
|
||||
# Compare only the selected subset of the images.
|
||||
#
|
||||
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar
|
||||
#
|
||||
# Compare only the CodePointIM.jar file
|
||||
# Can be used to compare zips, libraries and executables.
|
||||
#
|
||||
|
||||
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image"
|
||||
echo ""
|
||||
echo "Compare the directory structure."
|
||||
echo "Compare the filenames in the directories."
|
||||
echo "Compare the contents of the zip archives"
|
||||
echo "Compare the contents of the jar archives"
|
||||
echo "Compare the native libraries"
|
||||
echo "Compare the native executables"
|
||||
echo "Compare the remaining files"
|
||||
echo ""
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]"
|
||||
echo ""
|
||||
echo "Compare only the selected subset of the images."
|
||||
echo ""
|
||||
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar"
|
||||
echo ""
|
||||
echo "Compare only the CodePointIM.jar file"
|
||||
echo "Can be used to compare zips, libraries and executables."
|
||||
exit 10
|
||||
fi
|
||||
|
||||
OLD="$1"
|
||||
NEW="$2"
|
||||
CMD="$3"
|
||||
|
||||
DIFF_RESULT=0
|
||||
|
||||
CMP_ZIPS=false
|
||||
CMP_JARS=false
|
||||
CMP_LIBS=false
|
||||
CMP_EXECS=false
|
||||
CMP_OTHER=false
|
||||
|
||||
FILTER="cat"
|
||||
|
||||
if [ -n "$CMD" ]; then
|
||||
case "$CMD" in
|
||||
zips)
|
||||
CMP_ZIPS=true
|
||||
;;
|
||||
jars)
|
||||
CMP_JARS=true
|
||||
;;
|
||||
libs)
|
||||
CMP_LIBS=true
|
||||
;;
|
||||
execs)
|
||||
CMP_EXECS=true
|
||||
;;
|
||||
other)
|
||||
CMP_OTHER=true
|
||||
;;
|
||||
*)
|
||||
CMP_ZIPS=true
|
||||
CMP_JARS=true
|
||||
CMP_LIBS=true
|
||||
CMP_EXECS=true
|
||||
CMP_OTHER=true
|
||||
FILTER="grep $3"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
CMP_ZIPS=true
|
||||
CMP_JARS=true
|
||||
CMP_LIBS=true
|
||||
CMP_EXECS=true
|
||||
CMP_OTHER=true
|
||||
fi
|
||||
|
||||
DIFFJARZIP="/bin/bash `dirname $0`/diffjarzip.sh"
|
||||
DIFFLIB="/bin/bash `dirname $0`/difflib.sh"
|
||||
DIFFEXEC="/bin/bash `dirname $0`/diffexec.sh"
|
||||
export COMPARE_ROOT=/tmp/cimages.$USER
|
||||
mkdir -p $COMPARE_ROOT
|
||||
|
||||
# Load the correct exception list.
|
||||
case "`uname -s`" in
|
||||
Linux)
|
||||
. `dirname $0`/exception_list_linux
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo Comparing $OLD to $NEW
|
||||
echo
|
||||
|
||||
(cd $OLD && find . -type d | sort > $COMPARE_ROOT/from_dirs)
|
||||
(cd $NEW && find . -type d | sort > $COMPARE_ROOT/to_dirs)
|
||||
|
||||
echo -n Directory structure...
|
||||
if diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs > /dev/null; then
|
||||
echo Identical!
|
||||
else
|
||||
echo Differences found.
|
||||
DIFF_RESULT=1
|
||||
# Differences in directories found.
|
||||
ONLY_OLD=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '<')
|
||||
if [ "$ONLY_OLD" ]; then
|
||||
echo Only in $OLD
|
||||
echo $ONLY_OLD | sed 's|< ./|\t|g' | sed 's/ /\n/g'
|
||||
fi
|
||||
# Differences in directories found.
|
||||
ONLY_NEW=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '>')
|
||||
if [ "$ONLY_NEW" ]; then
|
||||
echo Only in $NEW
|
||||
echo $ONLY_NEW | sed 's|> ./|\t|g' | sed 's/ /\n/g'
|
||||
fi
|
||||
fi
|
||||
|
||||
(cd $OLD && find . -type f | sort > $COMPARE_ROOT/from_files)
|
||||
(cd $NEW && find . -type f | sort > $COMPARE_ROOT/to_files)
|
||||
|
||||
echo -n File names...
|
||||
if diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files > /dev/null; then
|
||||
echo Identical!
|
||||
else
|
||||
echo Differences found.
|
||||
DIFF_RESULT=1
|
||||
# Differences in directories found.
|
||||
ONLY_OLD=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '<')
|
||||
if [ "$ONLY_OLD" ]; then
|
||||
echo Only in $OLD
|
||||
echo "$ONLY_OLD" | sed 's|< ./| |g'
|
||||
fi
|
||||
# Differences in directories found.
|
||||
ONLY_NEW=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '>')
|
||||
if [ "$ONLY_NEW" ]; then
|
||||
echo Only in $NEW
|
||||
echo "$ONLY_NEW" | sed 's|> ./| |g'
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n Permissions...
|
||||
found=""
|
||||
for f in `cd $OLD && find . -type f`
|
||||
do
|
||||
if [ ! -f ${OLD}/$f ]; then continue; fi
|
||||
if [ ! -f ${NEW}/$f ]; then continue; fi
|
||||
OP=`ls -l ${OLD}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
NP=`ls -l ${NEW}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
if [ "$OP" != "$NP" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
printf "\told: ${OP} new: ${NP}\t$f\n"
|
||||
fi
|
||||
|
||||
OF=`cd ${OLD} && file $f`
|
||||
NF=`cd ${NEW} && file $f`
|
||||
if [ "$f" = "./src.zip" ]
|
||||
then
|
||||
if [ "`echo $OF | grep -ic zip`" -gt 0 -a "`echo $NF | grep -ic zip`" -gt 0 ]
|
||||
then
|
||||
# the way we produces zip-files make it so that directories are stored in old file
|
||||
# but not in new (only files with full-path)
|
||||
# this makes file-5.09 report them as different
|
||||
continue;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$OF" != "$NF" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
printf "\tFILE: old: ${OF} new: ${NF}\t$f\n"
|
||||
fi
|
||||
done
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
|
||||
GENERAL_FILES=$(cd $OLD && find . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
|
||||
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "ct.sym" ! -name "*.diz" \
|
||||
| grep -v "./bin/" | sort | $FILTER)
|
||||
echo General files...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
if [ -e $NEW/$f ]; then
|
||||
DIFF_OUT=$(diff $OLD/$f $NEW/$f 2>&1)
|
||||
if [ -n "$DIFF_OUT" ]; then
|
||||
echo $f
|
||||
echo "$DIFF_OUT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if [ "x$CMP_ZIPS" == "xtrue" ]; then
|
||||
ZIPS=$(cd $OLD && find . -type f -name "*.zip" | sort | $FILTER)
|
||||
|
||||
if [ -n "$ZIPS" ]; then
|
||||
echo Zip files...
|
||||
|
||||
for f in $ZIPS
|
||||
do
|
||||
$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW
|
||||
if [ "$?" != "0" ]; then
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$CMP_JARS" == "xtrue" ]; then
|
||||
JARS=$(cd $OLD && find . -type f -name "*.jar" -o -name "ct.sym" | sort | $FILTER)
|
||||
|
||||
if [ -n "$JARS" ]; then
|
||||
echo Jar files...
|
||||
|
||||
for f in $JARS
|
||||
do
|
||||
DIFFJAR_OUTPUT=`$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW`
|
||||
DIFFJAR_RESULT=$?
|
||||
if [ "$DIFFJAR_RESULT" != "0" ]; then
|
||||
for diff in $LIST_DIFF_JAR; do
|
||||
DIFFJAR_OUTPUT=`echo "$DIFFJAR_OUTPUT" | grep -v "$diff"`
|
||||
done
|
||||
if [ "`echo "$DIFFJAR_OUTPUT" | grep -v "Differing files in"`" != "" ]; then
|
||||
DIFF_RESULT=1
|
||||
echo "$DIFFJAR_OUTPUT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$FILTER" != "xcat" ]; then
|
||||
VIEW=view
|
||||
else
|
||||
VIEW=
|
||||
fi
|
||||
|
||||
if [ "x$CMP_LIBS" == "xtrue" ]; then
|
||||
LIBS=$(cd $OLD && find . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | sort | $FILTER)
|
||||
|
||||
if [ -n "$LIBS" ]; then
|
||||
echo Libraries...
|
||||
for f in $LIBS
|
||||
do
|
||||
DIFFLIB_OUTPUT=`$DIFFLIB $OLD/$f $NEW/$f $OLD $NEW $VIEW`
|
||||
DIFFLIB_RESULT=$?
|
||||
if [ "$DIFFLIB_RESULT" = "0" ]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
elif [ "$DIFFLIB_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
elif [ "$DIFFLIB_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFLIB_OUTPUT"
|
||||
else
|
||||
echo "$DIFFLIB_OUTPUT"
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$CMP_EXECS" == "xtrue" ]; then
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
EXECS=$(cd $OLD && find . -type f -name '*.exe' | sort | $FILTER)
|
||||
else
|
||||
EXECS=$(cd $OLD && find . -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' \) | sort | $FILTER)
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$EXECS" ]; then
|
||||
echo Executables...
|
||||
|
||||
for f in $EXECS
|
||||
do
|
||||
DIFFEXEC_OUTPUT=`$DIFFEXEC $OLD/$f $NEW/$f $OLD $NEW $VIEW`
|
||||
DIFFEXEC_RESULT=$?
|
||||
if [ "$DIFFEXEC_RESULT" = "0" ]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
elif [ "$DIFFEXEC_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
elif [ "$DIFFEXEC_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
|
||||
:
|
||||
#echo "OK: $DIFFEXEC_OUTPUT"
|
||||
else
|
||||
echo "$DIFFEXEC_OUTPUT"
|
||||
DIFF_RESULT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $DIFF_RESULT
|
||||
@@ -1,186 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two executables. Return codes:"
|
||||
echo "0 - no diff"
|
||||
echo "1 - Identical symbols AND size, BUT not bytewise identical"
|
||||
echo "2 - Identical symbols BUT NEW size"
|
||||
echo "3 - Differences, content BUT SAME size"
|
||||
echo "4 - Differences, content AND size"
|
||||
echo "10 - Could not perform diff"
|
||||
echo "Use 'quiet' to disable any output."
|
||||
echo "Syntax: $0 file1 file2 [quiet]"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which nm`" ]; then
|
||||
NM=nm
|
||||
elif [ -f "`which gnm`" ]; then
|
||||
NM=gnm
|
||||
else
|
||||
echo "No nm command found"
|
||||
exit 10
|
||||
fi
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
VIEW=
|
||||
# You can do export DIFF=meld to view
|
||||
# any differences using meld instead.
|
||||
if [ -n "$DIFF" ]; then
|
||||
DIFF="$DIFF"
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
|
||||
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ "x$5" == "xview" ]; then VIEW=view; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ "x$3" == "xview" ]; then VIEW=view; fi
|
||||
fi
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
echo Identical: $OLD_NAME
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OLD_SYMBOLS=$COMPARE_ROOT/$OLD_NAME.old
|
||||
NEW_SYMBOLS=$COMPARE_ROOT/$NEW_NAME.new
|
||||
|
||||
mkdir -p $(dirname $OLD_SYMBOLS)
|
||||
mkdir -p $(dirname $NEW_SYMBOLS)
|
||||
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
|
||||
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
|
||||
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
|
||||
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
|
||||
else
|
||||
# Strip the addresses, just compare the ordering of the symbols.
|
||||
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
|
||||
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
|
||||
# But store the full information for easy diff access.
|
||||
$NM $OLD > $OLD_SYMBOLS.full
|
||||
$NM $NEW > $NEW_SYMBOLS.full
|
||||
fi
|
||||
|
||||
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
|
||||
fi
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $RESULT
|
||||
|
||||
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Simple tool to diff two jar or zip files. It unpacks the jar/zip files and
|
||||
# reports if files differs and if files are new or missing.
|
||||
# Assumes gnu diff.
|
||||
|
||||
# There are a few source files that have DOS line endings in the
|
||||
# jaxp/jaxws source drops, when the sources were added to the repository
|
||||
# the source files were converted to UNIX line endings.
|
||||
# For now we ignore these differences.
|
||||
DIFF_FLAGS="--strip-trailing-cr"
|
||||
#set -x
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two jar/zip files. Return codes: 0 - no diff, 1 - diff, 2 - couldn't perform diff"
|
||||
echo "Syntax: $0 old_archive new_archive [old_root new_root]"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 2
|
||||
fi
|
||||
|
||||
IGNORES="cat"
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ $# == 5 ]; then IGNORES="$5"; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ $# == 3 ]; then IGNORES="$3"; fi
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which gdiff`" ]; then
|
||||
DIFF=gdiff
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
|
||||
OLD_SUFFIX="${OLD##*.}"
|
||||
NEW_SUFFIX="${NEW##*.}"
|
||||
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
|
||||
echo The files do not have the same suffix type!
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$OLD_SUFFIX" != "zip" ] && [ "$OLD_SUFFIX" != "jar" ] && [ "$OLD_SUFFIX" != "sym" ]; then
|
||||
echo The files have to be zip, jar or sym! They are $OLD_SUFFIX
|
||||
exit 2
|
||||
fi
|
||||
|
||||
UNARCHIVE="unzip -q"
|
||||
|
||||
TYPE="$OLD_SUFFIX"
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Not quite identical, the might still contain the same data.
|
||||
# Unpack the jar/zip files in temp dirs
|
||||
if test "x$COMPARE_ROOT" == "x"; then
|
||||
COMPARE_ROOT=/tmp/compare_root.$$
|
||||
REMOVE_COMPARE_ROOT=true
|
||||
fi
|
||||
OLD_TEMPDIR=$COMPARE_ROOT/$OLD_NAME.old
|
||||
NEW_TEMPDIR=$COMPARE_ROOT/$NEW_NAME.new
|
||||
mkdir -p $OLD_TEMPDIR
|
||||
mkdir -p $NEW_TEMPDIR
|
||||
(cd $OLD_TEMPDIR && rm -rf * ; $UNARCHIVE $OLD)
|
||||
(cd $NEW_TEMPDIR && rm -rf * ; $UNARCHIVE $NEW)
|
||||
|
||||
ONLY1=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR")
|
||||
|
||||
if [ -n "$ONLY1" ]; then
|
||||
echo " Only the OLD $OLD_NAME contains:"
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR" \
|
||||
| sed "s|Only in $OLD_TEMPDIR| |"g | sed 's|: |/|g'
|
||||
fi
|
||||
|
||||
ONLY2=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR")
|
||||
|
||||
if [ -n "$ONLY2" ]; then
|
||||
echo " Only the NEW $NEW_NAME contains:"
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR" \
|
||||
| sed "s|Only in $NEW_TEMPDIR| |"g | sed 's|: |/|g'
|
||||
fi
|
||||
|
||||
DIFFTEXT="/bin/bash `dirname $0`/difftext.sh"
|
||||
|
||||
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep differ | cut -f 2,4 -d ' ' | \
|
||||
awk "{ print \"$DIFFTEXT \"\$1\" \"\$2 }" > $COMPARE_ROOT/diffing
|
||||
|
||||
/bin/bash $COMPARE_ROOT/diffing > $COMPARE_ROOT/diffs
|
||||
|
||||
if [ -s "$COMPARE_ROOT/diffs" ]; then
|
||||
echo " Differing files in $OLD_NAME"
|
||||
cat $COMPARE_ROOT/diffs | grep differ | $IGNORES | cut -f 2 -d ' ' | \
|
||||
sed "s|$OLD_TEMPDIR| |g"
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
|
||||
if [ "x$REMOVE_COMPARE_ROOT" == xtrue ]; then
|
||||
rm -rf $REMOVE_COMPARE_ROOT
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Simple tool to diff two shared libraries.
|
||||
# Criterias: two shared libraries are considered equal if:
|
||||
# the file sizes are the same AND the symbols outputs from the nm command are equal
|
||||
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Diff two shared libs. Return codes:"
|
||||
echo "0 - no diff"
|
||||
echo "1 - Identical symbols AND size, BUT not bytewise identical"
|
||||
echo "2 - Identical symbols BUT NEW size"
|
||||
echo "3 - Differences, content BUT SAME size"
|
||||
echo "4 - Differences, content AND size"
|
||||
echo "10 - Could not perform diff"
|
||||
echo "Use 'quiet' to disable any output."
|
||||
echo "Syntax: $0 file1 file2 [quiet]"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo $1 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo $2 does not exist
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "`uname`" == "SunOS" ]; then
|
||||
if [ -f "`which gnm`" ]; then
|
||||
NM=gnm
|
||||
# Jonas 2012-05-29: solaris native nm produces radically different output than gnm
|
||||
# so if using that...we need different filter than "cut -f 2-"
|
||||
#
|
||||
elif [ -f "`which nm`" ]; then
|
||||
NM=nm
|
||||
else
|
||||
echo "No nm command found"
|
||||
exit 10
|
||||
fi
|
||||
LDD=ldd
|
||||
elif [ $OSTYPE == "cygwin" ]; then
|
||||
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
|
||||
NM_ARGS=/exports
|
||||
LDD=
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
NM=nm
|
||||
LDD="otool -L"
|
||||
else
|
||||
NM=nm
|
||||
LDD=ldd
|
||||
fi
|
||||
|
||||
# Should the differences be viewed?
|
||||
VIEW=
|
||||
# You can do export DIFF=meld to view
|
||||
# any differences using meld instead.
|
||||
if [ -n "$DIFF" ]; then
|
||||
DIFF="$DIFF"
|
||||
else
|
||||
DIFF=diff
|
||||
fi
|
||||
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
|
||||
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
|
||||
|
||||
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
|
||||
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
ROOT1=$(cd $3 && pwd)
|
||||
ROOT2=$(cd $4 && pwd)
|
||||
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
|
||||
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
|
||||
if [ "x$5" == "xview" ]; then VIEW=view; fi
|
||||
else
|
||||
ROOT1=$(dirname $OLD)/
|
||||
ROOT2=$(dirname $NEW)/
|
||||
OLD_NAME=$OLD
|
||||
NEW_NAME=$NEW
|
||||
if [ "x$3" == "xview" ]; then VIEW=view; fi
|
||||
fi
|
||||
|
||||
OLD_SUFFIX="${OLD##*.}"
|
||||
NEW_SUFFIX="${NEW##*.}"
|
||||
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
|
||||
echo The files do not have the same suffix type!
|
||||
exit 10
|
||||
fi
|
||||
|
||||
if [ "$OLD_SUFFIX" != "so" ] && [ "$OLD_SUFFIX" != "dylib" ] && [ "$OLD_SUFFIX" != "dll" ]; then
|
||||
echo The files have to be .so, .dylib or .dll! They are $OLD_SUFFIX
|
||||
exit 10
|
||||
fi
|
||||
|
||||
TYPE="$OLD_SUFFIX"
|
||||
|
||||
if cmp $OLD $NEW > /dev/null
|
||||
then
|
||||
# The files were bytewise identical.
|
||||
echo Identical: $OLD_NAME
|
||||
exit 0
|
||||
fi
|
||||
|
||||
OLD_SYMBOLS=$COMPARE_ROOT/nm.$OLD_NAME.old
|
||||
NEW_SYMBOLS=$COMPARE_ROOT/nm.$NEW_NAME.new
|
||||
|
||||
mkdir -p $(dirname $OLD_SYMBOLS)
|
||||
mkdir -p $(dirname $NEW_SYMBOLS)
|
||||
|
||||
if [ $OSTYPE == "cygwin" ]; then
|
||||
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
|
||||
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
|
||||
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
|
||||
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
|
||||
else
|
||||
# Strip the addresses, just compare the ordering of the symbols.
|
||||
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
|
||||
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
|
||||
# But store the full information for easy diff access.
|
||||
$NM $OLD > $OLD_SYMBOLS.full
|
||||
$NM $NEW > $NEW_SYMBOLS.full
|
||||
fi
|
||||
|
||||
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
|
||||
|
||||
RESULT=0
|
||||
|
||||
if [ "${LDD}" ]
|
||||
then
|
||||
NAME=`basename $OLD`
|
||||
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
|
||||
rm -rf "${TMP}"
|
||||
mkdir -p "${TMP}"
|
||||
|
||||
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
|
||||
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
|
||||
(cd "${TMP}" && rm -f ${NAME})
|
||||
|
||||
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
|
||||
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
|
||||
|
||||
DEP_MSG=
|
||||
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
|
||||
DEP_MSG="Identical dependencies"
|
||||
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
|
||||
DEP_MSG="Redundant duplicate dependencies added"
|
||||
RES=1
|
||||
else
|
||||
DEP_MSG="DIFFERENT dependencies"
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$DIFFS" ]; then
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=4
|
||||
else
|
||||
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
|
||||
RESULT=3
|
||||
fi
|
||||
if [ "x$VIEW" == "xview" ]; then
|
||||
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
|
||||
fi
|
||||
else
|
||||
if [ $OLD_SIZE -ne $NEW_SIZE ]
|
||||
then
|
||||
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
|
||||
RESULT=2
|
||||
else
|
||||
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $RESULT
|
||||
|
||||
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# The difftext.sh knows how to compare text files and
|
||||
# ignore some specific differences.
|
||||
# When difftext.sh is called, we already know that the
|
||||
# files differ. But if the tests below trigger, then
|
||||
# we ignore differences caused by:
|
||||
#
|
||||
# Timestamps in Java sources generated by idl2java
|
||||
# Sorting order and cleanup style in .properties files.
|
||||
|
||||
OLD="$1"
|
||||
NEW="$2"
|
||||
SUF="${OLD##*.}"
|
||||
TMP=1
|
||||
if test "x$SUF" == "xjava"; then
|
||||
TMP=$(LANG=C diff $OLD $NEW | \
|
||||
grep '^[<>]' | \
|
||||
sed '/[<>] \* from.*\.idl/d' | \
|
||||
sed '/[<>] \*.*201[12].*/d' | \
|
||||
sed '/\/\/ Generated from input file.*/d' | \
|
||||
sed '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' | \
|
||||
sed '/\/\/ java GenerateCharacter.*/d')
|
||||
fi
|
||||
if test "x$SUF" == "xproperties"; then
|
||||
cat $OLD | sed -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003A/\x3A/g' \
|
||||
-e 's/\\u006B/\x6B/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00A0/\xA0/g' \
|
||||
-e 's/\\u00A3/\xA3/g' \
|
||||
-e 's/\\u00B0/\xB0/g' \
|
||||
-e 's/\\u00B7/\xB7/g' \
|
||||
-e 's/\\u00BA/\xBA/g' \
|
||||
-e 's/\\u00BF/\xBF/g' \
|
||||
-e 's/\\u00C0/\xC0/g' \
|
||||
-e 's/\\u00C1/\xC1/g' \
|
||||
-e 's/\\u00C2/\xC2/g' \
|
||||
-e 's/\\u00C4/\xC4/g' \
|
||||
-e 's/\\u00C5/\xC5/g' \
|
||||
-e 's/\\u00C8/\xC8/g' \
|
||||
-e 's/\\u00C9/\xC9/g' \
|
||||
-e 's/\\u00CA/\xCA/g' \
|
||||
-e 's/\\u00CD/\xCD/g' \
|
||||
-e 's/\\u00CE/\xCE/g' \
|
||||
-e 's/\\u00D3/\xD3/g' \
|
||||
-e 's/\\u00D4/\xD4/g' \
|
||||
-e 's/\\u00D6/\xD6/g' \
|
||||
-e 's/\\u00DA/\xDA/g' \
|
||||
-e 's/\\u00DC/\xDC/g' \
|
||||
-e 's/\\u00DD/\xDD/g' \
|
||||
-e 's/\\u00DF/\xDF/g' \
|
||||
-e 's/\\u00E0/\xE0/g' \
|
||||
-e 's/\\u00E1/\xE1/g' \
|
||||
-e 's/\\u00E2/\xE2/g' \
|
||||
-e 's/\\u00E3/\xE3/g' \
|
||||
-e 's/\\u00E4/\xE4/g' \
|
||||
-e 's/\\u00E5/\xE5/g' \
|
||||
-e 's/\\u00E6/\xE6/g' \
|
||||
-e 's/\\u00E7/\xE7/g' \
|
||||
-e 's/\\u00E8/\xE8/g' \
|
||||
-e 's/\\u00E9/\xE9/g' \
|
||||
-e 's/\\u00EA/\xEA/g' \
|
||||
-e 's/\\u00EB/\xEB/g' \
|
||||
-e 's/\\u00EC/\xEC/g' \
|
||||
-e 's/\\u00ED/\xED/g' \
|
||||
-e 's/\\u00EE/\xEE/g' \
|
||||
-e 's/\\u00EF/\xEF/g' \
|
||||
-e 's/\\u00F1/\xF1/g' \
|
||||
-e 's/\\u00F2/\xF2/g' \
|
||||
-e 's/\\u00F3/\xF3/g' \
|
||||
-e 's/\\u00F4/\xF4/g' \
|
||||
-e 's/\\u00F5/\xF5/g' \
|
||||
-e 's/\\u00F6/\xF6/g' \
|
||||
-e 's/\\u00F9/\xF9/g' \
|
||||
-e 's/\\u00FA/\xFA/g' \
|
||||
-e 's/\\u00FC/\xFC/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003f/\x3f/g' \
|
||||
-e 's/\\u006f/\x6f/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00a0/\xa0/g' \
|
||||
-e 's/\\u00a3/\xa3/g' \
|
||||
-e 's/\\u00b0/\xb0/g' \
|
||||
-e 's/\\u00ba/\xba/g' \
|
||||
-e 's/\\u00bf/\xbf/g' \
|
||||
-e 's/\\u00c1/\xc1/g' \
|
||||
-e 's/\\u00c4/\xc4/g' \
|
||||
-e 's/\\u00c5/\xc5/g' \
|
||||
-e 's/\\u00c8/\xc8/g' \
|
||||
-e 's/\\u00c9/\xc9/g' \
|
||||
-e 's/\\u00ca/\xca/g' \
|
||||
-e 's/\\u00cd/\xcd/g' \
|
||||
-e 's/\\u00d6/\xd6/g' \
|
||||
-e 's/\\u00dc/\xdc/g' \
|
||||
-e 's/\\u00dd/\xdd/g' \
|
||||
-e 's/\\u00df/\xdf/g' \
|
||||
-e 's/\\u00e0/\xe0/g' \
|
||||
-e 's/\\u00e1/\xe1/g' \
|
||||
-e 's/\\u00e2/\xe2/g' \
|
||||
-e 's/\\u00e3/\xe3/g' \
|
||||
-e 's/\\u00e4/\xe4/g' \
|
||||
-e 's/\\u00e5/\xe5/g' \
|
||||
-e 's/\\u00e7/\xe7/g' \
|
||||
-e 's/\\u00e8/\xe8/g' \
|
||||
-e 's/\\u00e9/\xe9/g' \
|
||||
-e 's/\\u00ea/\xea/g' \
|
||||
-e 's/\\u00eb/\xeb/g' \
|
||||
-e 's/\\u00ec/\xec/g' \
|
||||
-e 's/\\u00ed/\xed/g' \
|
||||
-e 's/\\u00ee/\xee/g' \
|
||||
-e 's/\\u00ef/\xef/g' \
|
||||
-e 's/\\u00f0/\xf0/g' \
|
||||
-e 's/\\u00f1/\xf1/g' \
|
||||
-e 's/\\u00f2/\xf2/g' \
|
||||
-e 's/\\u00f3/\xf3/g' \
|
||||
-e 's/\\u00f4/\xf4/g' \
|
||||
-e 's/\\u00f5/\xf5/g' \
|
||||
-e 's/\\u00f6/\xf6/g' \
|
||||
-e 's/\\u00f7/\xf7/g' \
|
||||
-e 's/\\u00f8/\xf8/g' \
|
||||
-e 's/\\u00f9/\xf9/g' \
|
||||
-e 's/\\u00fa/\xfa/g' \
|
||||
-e 's/\\u00fc/\xfc/g' \
|
||||
-e 's/\\u00ff/\xff/g' \
|
||||
| sed -e '/^#/d' -e '/^$/d' \
|
||||
-e :a -e '/\\$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
-e 's/\\=/=/' | LANG=C sort > $OLD.cleaned
|
||||
TMP=$(LANG=C diff $OLD.cleaned $NEW)
|
||||
fi
|
||||
if test -n "$TMP"; then
|
||||
echo Files $OLD and $NEW differ
|
||||
fi
|
||||
@@ -1,114 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# List of files inside jar archives that are ok if they differ.
|
||||
LIST_DIFF_JAR="
|
||||
/sun/misc/Version.class
|
||||
/sun/tools/jconsole/Version.class
|
||||
/com/sun/tools/javac/resources/version.class
|
||||
/com/sun/tools/javah/resources/version.class
|
||||
/com/sun/tools/javap/resources/version.class
|
||||
"
|
||||
|
||||
# List of binaries that only need to match symbols
|
||||
LIST_DIFF_SIZE="
|
||||
jre/lib/amd64/libfontmanager.so
|
||||
jre/lib/amd64/libjdwp.so
|
||||
jre/lib/amd64/libt2k.so
|
||||
bin/unpack200
|
||||
jre/bin/unpack200
|
||||
jre/lib/amd64/libjsig.debuginfo
|
||||
jre/lib/amd64/libsaproc.debuginfo
|
||||
jre/lib/amd64/server/libjvm.debuginfo
|
||||
"
|
||||
|
||||
# List of binares that need to match both symbols and size
|
||||
LIST_DIFF_BYTE="
|
||||
jre/lib/amd64/libdt_socket.so
|
||||
jre/lib/amd64/libattach.so
|
||||
jre/lib/amd64/libjaas_unix.so
|
||||
jre/lib/amd64/libjawt.so
|
||||
jre/lib/amd64/libjpeg.so
|
||||
jre/lib/amd64/libjsdt.so
|
||||
jre/lib/amd64/libjsig.so
|
||||
jre/lib/amd64/libsaproc.so
|
||||
jre/lib/amd64/libsctp.so
|
||||
jre/lib/amd64/libsunec.so
|
||||
jre/lib/amd64/libunpack.so
|
||||
jre/lib/amd64/libverify.so
|
||||
jre/lib/amd64/libzip.so
|
||||
jre/lib/amd64/server/libjsig.so
|
||||
jre/lib/amd64/server/libjvm.so
|
||||
jre/lib/amd64/liblcms.so
|
||||
demo/jvmti/heapTracker/lib/libheapTracker.so
|
||||
demo/jvmti/hprof/lib/libhprof.so
|
||||
demo/jvmti/minst/lib/libminst.so
|
||||
demo/jvmti/mtrace/lib/libmtrace.so
|
||||
demo/jvmti/waiters/lib/libwaiters.so
|
||||
bin/appletviewer
|
||||
bin/extcheck
|
||||
bin/idlj
|
||||
bin/jar
|
||||
bin/jarsigner
|
||||
bin/java
|
||||
bin/javac
|
||||
bin/javadoc
|
||||
bin/javah
|
||||
bin/javap
|
||||
bin/jcmd
|
||||
bin/jconsole
|
||||
bin/jdb
|
||||
bin/jhat
|
||||
bin/jinfo
|
||||
bin/jmap
|
||||
bin/jps
|
||||
bin/jrunscript
|
||||
bin/jsadebugd
|
||||
bin/jstack
|
||||
bin/jstat
|
||||
bin/jstatd
|
||||
bin/keytool
|
||||
bin/native2ascii
|
||||
bin/orbd
|
||||
bin/pack200
|
||||
bin/policytool
|
||||
bin/rmic
|
||||
bin/rmid
|
||||
bin/rmiregistry
|
||||
bin/schemagen
|
||||
bin/serialver
|
||||
bin/servertool
|
||||
bin/tnameserv
|
||||
bin/wsgen
|
||||
bin/wsimport
|
||||
bin/xjc
|
||||
jre/bin/java
|
||||
jre/bin/keytool
|
||||
jre/bin/orbd
|
||||
jre/bin/pack200
|
||||
jre/bin/policytool
|
||||
jre/bin/rmid
|
||||
jre/bin/rmiregistry
|
||||
jre/bin/servertool
|
||||
jre/bin/tnameserv
|
||||
"
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Must be bash, but that is ok since we are running from cygwin.
|
||||
# The first argument is the vcvarsall.bat file to run.
|
||||
# The second argument is the arch arg to give to vcvars.
|
||||
VCVARSALL="$1"
|
||||
ARCH_ARG="$2"
|
||||
|
||||
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
|
||||
# but calculate the difference in Cygwin environment before/after running it and then
|
||||
# apply the diff.
|
||||
_vs10varsall=`cygpath -a -m -s "$VCVARSALL"`
|
||||
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
|
||||
_dosbash=`cygpath -a -w -s \`which bash\`.*`
|
||||
|
||||
# generate the set of exported vars before/after the vs10 setup
|
||||
echo "@echo off" > localdevenvtmp.bat
|
||||
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
|
||||
echo "call $_dosvs10varsall $ARCH_ARG" >> localdevenvtmp.bat
|
||||
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
|
||||
cmd /c localdevenvtmp.bat
|
||||
|
||||
# apply the diff (less some non-vs10 vars named by "!")
|
||||
sort localdevenvtmp.export0 |grep -v "!" > localdevenvtmp.export0.sort
|
||||
sort localdevenvtmp.export1 |grep -v "!" > localdevenvtmp.export1.sort
|
||||
comm -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
|
||||
cat localdevenv.sh | sed 's/declare -x /export /g' | sed 's/="/:="/g' | sed 's/\\\\/\\/g' | sed 's/"//g' | \
|
||||
sed 's/#/\$\(HASH\)/g' > localdevenv.gmk
|
||||
|
||||
# cleanup
|
||||
rm -f localdevenvtmp*
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
47
common/bin/shell-tracer.sh
Normal file
47
common/bin/shell-tracer.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Usage: sh shell-tracer.sh <TIME_CMD> <OUTPUT_FILE> <OLD_SHELL> <shell command line>
|
||||
#
|
||||
# This shell script is supposed to be set as a replacement for SHELL in make,
|
||||
# causing it to be called whenever make wants to execute shell commands.
|
||||
# The <shell command line> is suitable for passing on to the old shell,
|
||||
# typically beginning with -c.
|
||||
#
|
||||
# This script will make sure the shell command line is executed with
|
||||
# OLD_SHELL -x, and it will also store a simple log of the the time it takes to
|
||||
# execute the command in the OUTPUT_FILE, using the "time" utility as pointed
|
||||
# to by TIME_CMD. If TIME_CMD is "-", no timestamp will be stored.
|
||||
|
||||
TIME_CMD="$1"
|
||||
OUTPUT_FILE="$2"
|
||||
OLD_SHELL="$3"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
if [ "$TIME_CMD" != "-" ]; then
|
||||
"$TIME_CMD" -f "[TIME:%E] $*" -a -o "$OUTPUT_FILE" "$OLD_SHELL" -x "$@"
|
||||
else
|
||||
"$OLD_SHELL" -x "$@"
|
||||
fi
|
||||
184
common/bin/test_builds.sh
Normal file
184
common/bin/test_builds.sh
Normal file
@@ -0,0 +1,184 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
options="$*"
|
||||
option="$1"
|
||||
|
||||
tmp=/tmp/test_builds.$$
|
||||
rm -f -r ${tmp}
|
||||
mkdir -p ${tmp}
|
||||
|
||||
errMessages=${tmp}/error_messages.txt
|
||||
|
||||
#######
|
||||
# Error function
|
||||
error() # message
|
||||
{
|
||||
echo "ERROR: $1" | tee -a ${errMessages}
|
||||
}
|
||||
# Check errors
|
||||
checkErrors()
|
||||
{
|
||||
if [ -s ${errMessages} ] ; then
|
||||
cat ${errMessages}
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
#######
|
||||
|
||||
os="`uname -s`"
|
||||
arch="`uname -p`"
|
||||
make=make
|
||||
|
||||
if [ "${os}" = "SunOS" ] ; then
|
||||
make=gmake
|
||||
export J7="/opt/java/jdk1.7.0"
|
||||
elif [ "${os}" = "Darwin" ] ; then
|
||||
export J7="/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home"
|
||||
elif [ "${os}" = "Linux" -a "${arch}" = "x86_64" ] ; then
|
||||
export J7="/usr/lib/jvm/java-7-openjdk-amd64/"
|
||||
else
|
||||
echo "What os/arch is this: ${os}/${arch}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Must have a jdk7
|
||||
if [ ! -d ${J7} ] ; then
|
||||
echo "No JDK7 found at: ${J7}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# What sources we use
|
||||
fromroot="http://hg.openjdk.java.net/build-infra/jdk8"
|
||||
|
||||
# Where we do it
|
||||
root="testbuilds"
|
||||
mkdir -p ${root}
|
||||
|
||||
# Three areas, last three are cloned from first to insure sameness
|
||||
t0=${root}/t0
|
||||
t1=${root}/t1
|
||||
t2=${root}/t2
|
||||
t3=${root}/t3
|
||||
repolist="${t0} ${t1} ${t2} ${t3}"
|
||||
|
||||
# Optional complete clobber
|
||||
if [ "${option}" = "clobber" ] ; then
|
||||
for i in ${repolist} ; do
|
||||
rm -f -r ${i}
|
||||
done
|
||||
fi
|
||||
|
||||
# Get top repos
|
||||
if [ ! -d ${t0}/.hg ] ; then
|
||||
rm -f -r ${t0}
|
||||
hg clone ${fromroot} ${t0}
|
||||
fi
|
||||
for i in ${t1} ${t2} ${t3} ; do
|
||||
if [ ! -d ${i}/.hg ] ; then
|
||||
hg clone ${t0} ${i}
|
||||
fi
|
||||
done
|
||||
|
||||
# Get repos updated
|
||||
for i in ${repolist} ; do
|
||||
( \
|
||||
set -e \
|
||||
&& cd ${i} \
|
||||
&& sh ./get_source.sh \
|
||||
|| error "Cannot get source" \
|
||||
) 2>&1 | tee ${i}.get_source.txt
|
||||
checkErrors
|
||||
done
|
||||
|
||||
# Optional clean
|
||||
if [ "${option}" = "clean" ] ; then
|
||||
for i in ${repolist} ; do
|
||||
rm -f -r ${i}/build
|
||||
rm -f -r ${i}/*/build
|
||||
rm -f -r ${i}/*/dist
|
||||
done
|
||||
fi
|
||||
|
||||
# Check changes on working set files
|
||||
for i in ${repolist} ; do
|
||||
( \
|
||||
set -e \
|
||||
&& cd ${i} \
|
||||
&& sh ./make/scripts/hgforest.sh status \
|
||||
|| error "Cannot check status" \
|
||||
) 2>&1 | tee ${i}.hg.status.txt
|
||||
checkErrors
|
||||
done
|
||||
|
||||
# Configure for build-infra building
|
||||
for i in ${t1} ${t2} ; do
|
||||
( \
|
||||
set -e \
|
||||
&& cd ${i}/common/makefiles \
|
||||
&& sh ../autoconf/configure --with-boot-jdk=${J7} \
|
||||
|| error "Cannot configure" \
|
||||
) 2>&1 | tee ${i}.config.txt
|
||||
checkErrors
|
||||
done
|
||||
|
||||
# Do build-infra builds
|
||||
for i in ${t1} ${t2} ; do
|
||||
( \
|
||||
set -e \
|
||||
&& cd ${i}/common/makefiles \
|
||||
&& ${make} \
|
||||
FULL_VERSION:=1.8.0-internal-b00 \
|
||||
JRE_RELEASE_VERSION:=1.8.0-internal-b00 \
|
||||
USER_RELEASE_SUFFIX:=compare \
|
||||
RELEASE:=1.8.0-internal \
|
||||
VERBOSE= \
|
||||
LIBARCH= \
|
||||
all images \
|
||||
|| error "Cannot build" \
|
||||
) 2>&1 | tee ${i}.build.txt
|
||||
checkErrors
|
||||
done
|
||||
|
||||
# Compare build-infra builds
|
||||
( \
|
||||
sh ${t0}/common/bin/compareimage.sh \
|
||||
${t1}/build/*/images/j2sdk-image \
|
||||
${t2}/build/*/images/j2sdk-image \
|
||||
|| error "Cannot compare" \
|
||||
) 2>&1 | tee ${root}/build-infra-comparison.txt
|
||||
checkErrors
|
||||
|
||||
# Do old build
|
||||
unset JAVA_HOME
|
||||
export ALT_BOOTDIR="${J7}"
|
||||
( \
|
||||
cd ${t3} \
|
||||
&& ${make} FULL_VERSION='"1.8.0-internal" sanity \
|
||||
|| error "Cannot sanity" \
|
||||
) 2>&1 | tee ${t3}.sanity.txt
|
||||
checkErrors
|
||||
( \
|
||||
cd ${t3} \
|
||||
&& ${make} \
|
||||
FULL_VERSION='"1.8.0-internal" \
|
||||
JRE_RELEASE_VERSION:=1.8.0-internal-b00 \
|
||||
USER_RELEASE_SUFFIX:=compare \
|
||||
RELEASE:=1.8.0-internal \
|
||||
|| error "Cannot build old way" \
|
||||
) 2>&1 | tee ${t3}.build.txt
|
||||
checkErrors
|
||||
|
||||
# Compare old build to build-infra build
|
||||
( \
|
||||
sh ${t0}/common/bin/compareimage.sh \
|
||||
${t3}/build/*/j2sdk-image \
|
||||
${t1}/build/*/images/j2sdk-image \
|
||||
|| error "Cannot compare" \
|
||||
) 2>&1 | tee ${root}/build-comparison.txt
|
||||
checkErrors
|
||||
|
||||
exit 0
|
||||
|
||||
52
common/makefiles/HotspotWrapper.gmk
Normal file
52
common/makefiles/HotspotWrapper.gmk
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Include the legacy hotspot-spec.gmk (which in turns includes spec.gmk)
|
||||
BASE_SPEC:=$(SPEC)
|
||||
include $(dir $(SPEC))hotspot-spec.gmk
|
||||
include MakeBase.gmk
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j. Recursively called makefiles will not be
|
||||
# affected, however. This is required for correct dependency management.
|
||||
.NOTPARALLEL:
|
||||
|
||||
default: all
|
||||
|
||||
# Get all files except .hg in the hotspot directory.
|
||||
HOTSPOT_FILES := $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
|
||||
|
||||
# The old build creates hotspot output dir before calling hotspot and
|
||||
# not doing it breaks builds on msys.
|
||||
$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES)
|
||||
@$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
|
||||
@($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC))
|
||||
$(TOUCH) $@
|
||||
|
||||
hotspot: $(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp
|
||||
|
||||
all: hotspot
|
||||
|
||||
.PHONY: default all hotspot
|
||||
@@ -59,7 +59,7 @@ define add_idl_package
|
||||
$(MKDIR) -p $3/$$($4_TMPDIR)
|
||||
$(RM) -rf $3/$$($4_TMPDIR)
|
||||
$(MKDIR) -p $(dir $5)
|
||||
$(ECHO) Compiling IDL $(patsubst $2/%,%,$4)
|
||||
$(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4)
|
||||
$8 -td $3/$$($4_TMPDIR) \
|
||||
-i $2/org/omg/CORBA \
|
||||
-i $2/org/omg/PortableInterceptor \
|
||||
@@ -79,15 +79,9 @@ define SetupIdlCompilation
|
||||
# param 1 is for example BUILD_IDLS
|
||||
# param 2,3,4,5,6,7,8 are named args.
|
||||
# IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
|
||||
|
||||
# Remove any relative addressing in the paths.
|
||||
$1_SRC := $$(abspath $$($1_SRC))
|
||||
|
||||
@@ -23,40 +23,14 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# The complexity of this makefile is not the fault of make, but the fault
|
||||
# of javac and javah. The basic problems are:
|
||||
#
|
||||
# 1) Compiling a single Java source file unpredictably generates anything
|
||||
# between zero (0!) and an infinite number of .class files!
|
||||
# 2) There is no hint, for which classes javah needs to be run,
|
||||
# and it happily generates .h files for classes with no native methods.
|
||||
# 3) javac and javah do not cleanup anything, for example if an internal
|
||||
# class (potentially with native methods) is removed from a Java source file.
|
||||
#
|
||||
# This makefile is a tribute to GNU make. And yes, it was harder to write than it is
|
||||
# to read. The include/excludes of directories and files are only a temporary measure
|
||||
# to work around the messy jdk sources that put platform specific code in src/share/classes.
|
||||
#
|
||||
# We should move most of the functionality of this makefile into a
|
||||
# smart javac/javah/javadoc/jar combo tool. sjavac ?
|
||||
#
|
||||
# I.e. 1) It always generates a single output, a zip-file from a number of source roots.
|
||||
# The zip file contains information that enable incremental builds with full
|
||||
# dependency tracking between packages.
|
||||
# 2) It automatically generates the right .h files.
|
||||
# 3) It keeps its house clean.
|
||||
# *) Generates intermediate files to be used for javadoc generation later.
|
||||
# and does all the other useful things that this makefile does, such as:
|
||||
# use all cores for compilation, reuse the running JVM for all compilations,
|
||||
# and has pubapi dependency tracking to minimize the number of files
|
||||
# that need to be recompiled during an incremental build.
|
||||
#
|
||||
# A zip file, or several zip files combined, can then be converted to a .jar file, or to a .jmod file.
|
||||
#
|
||||
# This would make this makefile much much simpler. I.e. make can be used
|
||||
# for its real purpose, track dependencies and trigger a recompile if a
|
||||
# dependency has changed.
|
||||
#
|
||||
# This makefile is much simpler now that it can use the smart javac wrapper
|
||||
# for dependency tracking between java packages and incremental compiles.
|
||||
# It could be even more simple if we added support for incremental jar updates
|
||||
# directly from the smart javac wrapper.
|
||||
|
||||
# Cleaning/copying properties here is not a good solution. The properties
|
||||
# should be cleaned/copied by a annotation processor in sjavac.
|
||||
|
||||
# When you read this source. Remember that $(sort ...) has the side effect
|
||||
# of removing duplicates. It is actually this side effect that is
|
||||
# desired whenever sort is used below!
|
||||
@@ -67,51 +41,27 @@ endif
|
||||
|
||||
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
|
||||
|
||||
# If compilation of java package fails, then the public api file for that
|
||||
# package will not be genereated. We add this fallback rule to generate
|
||||
# an empty pubapi file.
|
||||
%.api:
|
||||
if test ! -f $@; then $(MKDIR) -p $(@D); $(TOUCH) $@; fi
|
||||
|
||||
define SetupJavaCompiler
|
||||
# param 1 is for example BOOT_JAVAC or NEW_JAVAC
|
||||
# This is the name later used to decide which java compiler to use.
|
||||
# param 2-9 are named args.
|
||||
# JVM:=The jvm used to run the javac/javah command
|
||||
# JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
|
||||
# JAVAH:=The javah jar and bootstrap classpath changes, or just bin/javah if JVM is left out
|
||||
# FLAGS:=Flags to be supplied to javac
|
||||
# MODE:=SINGLE_THREADED_BATCH (primarily for old javac) or MULTI_CORE_CONCURRENT
|
||||
# only for MULTI_CORE_CONCURRENT are the options below relevant:
|
||||
# SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
|
||||
# SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
|
||||
# USE_DEPS:=true means use -XDdeps,-XDpubapi and -XDnativeapi to track java dependencies
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupJavaCompiler($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
|
||||
|
||||
ifeq ($$($1_MODE),MULTI_CORE_CONCURRENT)
|
||||
ifneq (,$$($1_SERVER_DIR))
|
||||
# A javac server has been requested.
|
||||
# The port file contains the tcp/ip on which the server listens
|
||||
# and the cookie necessary to talk to the server.
|
||||
$1_JAVAC_PORTFILE:=$$($1_SERVER_DIR)/$1.port
|
||||
ifeq ($$($1_SERVER_JVM),)
|
||||
$1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
|
||||
# You can use a different JVM to run the background javac server.
|
||||
# But if not set, it defaults to the same JVM that is used to start
|
||||
# the javac command.
|
||||
ifeq ($$($1_SERVER_JVM),)
|
||||
# It defaults to the same JVM that is used to start the javac command.
|
||||
$1_SERVER_JVM:=$$($1_JVM)
|
||||
endif
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=-XDserver:portfile=$$($1_JAVAC_PORTFILE),poolsize=$(JAVAC_SERVER_CORES),javac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_JAVAC))))
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define SetupArchive
|
||||
@@ -127,24 +77,16 @@ define SetupArchive
|
||||
# JAR:=Jar file to create
|
||||
# MANIFEST:=Optional manifest file template.
|
||||
# JARMAIN:=Optional main class to add to manifest
|
||||
# JARINDEX :=
|
||||
# JARINDEX:=true means generate the index in the jar file.
|
||||
# SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
|
||||
# added to the archive.
|
||||
# EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
|
||||
# CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$1_$(strip $(15)))
|
||||
|
||||
# NOTE: $2 is dependencies, not a named argument!
|
||||
$(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(findstring $(LOG),debug trace), $(info *[2] <dependencies> = $(strip $2)))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
|
||||
|
||||
$1_JARMAIN:=$(strip $$($1_JARMAIN))
|
||||
@@ -152,9 +94,6 @@ define SetupArchive
|
||||
$1_MANIFEST_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_manifest
|
||||
$1_DELETESS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletess
|
||||
$1_DELETES_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_deletes
|
||||
$1_PUBAPI_NOTIFICATIONS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_pubapi_notifications
|
||||
$1_NATIVEAPI_NOTIFICATIONS_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_native_notifications
|
||||
$1_NATIVEAPI_FILE:=$$(dir $$($1_JAR))_the.$$($1_JARNAME)_native
|
||||
$1_BIN:=$$(dir $$($1_JAR))
|
||||
|
||||
ifeq (,$$($1_SUFFIXES))
|
||||
@@ -168,18 +107,31 @@ define SetupArchive
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),\
|
||||
$$(addprefix $$(src)/,$$($1_INCLUDES)))
|
||||
# If there are a lot of include patterns, output to file to shorten command lines
|
||||
ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
|
||||
$1_GREP_INCLUDES:=| $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS))
|
||||
else
|
||||
$$(shell $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_INCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_include))
|
||||
$1_GREP_INCLUDES:=| $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include
|
||||
endif
|
||||
endif
|
||||
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
|
||||
$1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,\
|
||||
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
|
||||
# If there are a lot of include patterns, output to file to shorten command lines
|
||||
ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS))
|
||||
else
|
||||
$$(shell $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_GREP_EXCLUDE_PATTERNS,\n, \
|
||||
>> $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
|
||||
$1_GREP_EXCLUDES:=| $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude
|
||||
endif
|
||||
endif
|
||||
|
||||
# Check if this jar needs to have its index generated.
|
||||
ifneq (,$$($1_JARINDEX))
|
||||
$1_JARINDEX = (cd $$(dir $$@) && $(JAR) -i $$(notdir $$@))
|
||||
else
|
||||
@@ -188,143 +140,111 @@ define SetupArchive
|
||||
# When this macro is run in the same makefile as the java compilation, dependencies are transfered
|
||||
# in make variables. When the macro is run in a different makefile than the java compilation, the
|
||||
# dependencies need to be found in the filesystem.
|
||||
$1_ALL_SRCS:=$$(foreach src,$$($1_SRCS),$$(shell ($(FIND) $$(src) -type f \
|
||||
-a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES))))
|
||||
ifneq (,$2)
|
||||
$1_DEPS:=$2
|
||||
else
|
||||
# The subst of \ is needed because $ has to be escaped with \ in EXTRA_FILES for the command
|
||||
# lines, but not here for use in make dependencies.
|
||||
$1_DEPS:=$$(shell $(FIND) $$($1_SRCS) -type f -a \( $$($1_FIND_PATTERNS) \) \
|
||||
$$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES)) \
|
||||
$$(subst \,,$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,$$($1_EXTRA_FILES))))
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_ALL_SRCS+=$$(foreach src,$$($1_SRCS),$$(shell $(FIND) $$(src)/META-INF -type f 2> /dev/null))
|
||||
$1_DEPS+=$$(shell $(FIND) $$(addsuffix /META-INF,$$($1_SRCS)) -type f 2> /dev/null))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# Utility macros, to make the shell script receipt somewhat easier to dechipher.
|
||||
|
||||
# The capture contents macro finds all files (matching the patterns, typically
|
||||
# .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
|
||||
$1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) $$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > $$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
$1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\
|
||||
$(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
# The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) && )
|
||||
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS),($(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null | $(SED) 's|$$(src)/||g' >> $$(src)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE))
|
||||
endif
|
||||
# The capture deletes macro finds all deleted files and concatenates them. The resulting file
|
||||
# tells us what to remove from the jar-file.
|
||||
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) &&)
|
||||
# The capture pubapi notifications scans for pubapi change notifications. If such notifications are
|
||||
# found, then we will build the classes leading up to the jar again, to take into account the new timestamps
|
||||
# on the changed pubapi files.
|
||||
$1_CAPTURE_PUBAPI_NOTIFICATIONS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && \
|
||||
$(FIND) . -name _the.package.api.notify -exec dirname \{\} \; >> $$($1_PUBAPI_NOTIFICATIONS_FILE) ; \
|
||||
true) &&)
|
||||
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
|
||||
# The update contents macro updates the jar file with the previously capture contents.
|
||||
$1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && \
|
||||
if [ -s _the.$$($1_JARNAME)_contents ]; then \
|
||||
$(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
|
||||
$(JAR) uf $$@ @_the.$$($1_JARNAME)_contents; \
|
||||
fi) &&)
|
||||
$(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \
|
||||
fi) $$(NEWLINE))
|
||||
# The s-variants of the above macros are used when the jar is created from scratch.
|
||||
$1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
|
||||
$$($1_GREP_EXCLUDES) && $(ECHO) $$($1_EXTRA_FILES)) | $(SED) 's|$$(src)/||g' > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\
|
||||
$$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES))) > \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
|
||||
ifeq (,$$($1_SKIP_METAINF))
|
||||
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS),\
|
||||
($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) && )
|
||||
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
endif
|
||||
$1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\
|
||||
(cd $$(src) && $(JAR) uf $$@ @$$(src)/_the.$$($1_JARNAME)_contents) &&)
|
||||
(cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
|
||||
|
||||
# The TOUCH macro is used to make sure all timestamps are identical for package files and the pubapi files.
|
||||
# If we do not do this, we get random recompilations, the next time we run make, since the order of package building is random,
|
||||
# ie independent of package --dependes on-> public api of another package. This is of course
|
||||
# due to the fact that Java source often (always?) has circular dependencies. (Thus there is no correct order
|
||||
# to compile packages, and we can just as well do them in a random order. Which we do.)
|
||||
$1_TOUCH_API_FILES=$$(foreach src,$$($1_SRCS),\
|
||||
($(FIND) $$(src) -name _the.package.api -exec $(TOUCH) -r $$($1_JAR) \{\} \; ; true) && \
|
||||
($(FIND) $$(src) -name _the.package -exec $(TOUCH) -r $$($1_JAR) \{\} \; ; true) &&)
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this jar.
|
||||
$1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
|
||||
|
||||
ifneq (,$$($1_CHECK_COMPRESS_JAR))
|
||||
$1_JAR_CREATE_OPTIONS := c0fm
|
||||
$1_JAR_UPDATE_OPTIONS := u0f
|
||||
ifeq ($(COMPRESS_JARS), true)
|
||||
$1_JAR_CREATE_OPTIONS := cfm
|
||||
$1_JAR_UPDATE_OPTIONS := uf
|
||||
endif
|
||||
else
|
||||
$1_JAR_CREATE_OPTIONS := cfm
|
||||
$1_JAR_UPDATE_OPTIONS := uf
|
||||
endif
|
||||
|
||||
# Here is the rule that creates/updates the jar file.
|
||||
$$($1_JAR) : $2 $$($1_ALL_SRC)
|
||||
$$($1_JAR) : $$($1_DEPS)
|
||||
$(MKDIR) -p $$($1_BIN)
|
||||
if [ -n "$$($1_MANIFEST)" ]; then \
|
||||
$$(if $$($1_MANIFEST),\
|
||||
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE); \
|
||||
else \
|
||||
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
if [ -n "$$(strip $$($1_JARMAIN))" ]; then \
|
||||
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
if [ -n "$$($1_EXTRA_MANIFEST_ATTR)" ]; then \
|
||||
$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE); \
|
||||
fi
|
||||
+if [ -s $$@ ]; then \
|
||||
$(RM) -r $$($1_PUBAPI_NOTIFICATIONS_FILE) && \
|
||||
$$($1_CAPTURE_PUBAPI_NOTIFICATIONS) \
|
||||
if [ -s $$($1_PUBAPI_NOTIFICATIONS_FILE) ]; then \
|
||||
$(ECHO) Public api change detected in: && \
|
||||
$(CAT) $$($1_PUBAPI_NOTIFICATIONS_FILE) | $(TR) '/' '.' | $(SED) 's|^..||g' | $(SED) 's|\.$$$$||g' | $(AWK) '{print " "$$$$1}' && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.api.notify $(FIND_DELETE); true) &&) \
|
||||
$(MAKE) -f $(word 1,$(MAKEFILE_LIST)) $$($1_JAR) ; \
|
||||
else \
|
||||
$(ECHO) Modifying $$($1_NAME) && \
|
||||
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
|
||||
,\
|
||||
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE))
|
||||
$$(if $$($1_JARMAIN),$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE))
|
||||
$$(if $$($1_EXTRA_MANIFEST_ATTR),$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE))
|
||||
$$(if $$(wildcard $$@),\
|
||||
$(ECHO) Modifying $$($1_NAME) $$(NEWLINE)\
|
||||
$$($1_CAPTURE_CONTENTS) \
|
||||
$$($1_CAPTURE_METAINF) \
|
||||
$(RM) $$($1_DELETES_FILE) && \
|
||||
$(RM) $$($1_DELETES_FILE) $$(NEWLINE)\
|
||||
$$($1_CAPTURE_DELETES) \
|
||||
$(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) && \
|
||||
$(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE)\
|
||||
if [ -s $$($1_DELETESS_FILE) ]; then \
|
||||
$(ECHO) " deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
|
||||
$(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
|
||||
fi && \
|
||||
$$($1_UPDATE_CONTENTS) true && \
|
||||
$$($1_JARINDEX) && \
|
||||
$$($1_TOUCH_API_FILES) true && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.api.notify $(FIND_DELETE); true) &&) true ; \
|
||||
fi ; \
|
||||
else \
|
||||
$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) && \
|
||||
fi $$(NEWLINE) \
|
||||
$$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
|
||||
$$($1_JARINDEX) && true \
|
||||
,\
|
||||
$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
|
||||
$$($1_SCAPTURE_CONTENTS) \
|
||||
$$($1_SCAPTURE_METAINF) \
|
||||
$$($1_SUPDATE_CONTENTS) \
|
||||
$$($1_JARINDEX) && \
|
||||
$$($1_TOUCH_API_FILES) true && \
|
||||
$(RM) -r $$($1_NATIVEAPI_NOTIFICATIONS_FILE) $$($1_NATIVEAPI_FILE) && \
|
||||
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name "*.notify" $(FIND_DELETE); true) &&) true ; \
|
||||
fi;
|
||||
$$($1_JARINDEX) && true )
|
||||
|
||||
endef
|
||||
|
||||
define append_to
|
||||
$(ECHO) "$1" >> $2
|
||||
endef
|
||||
|
||||
define SetupZipArchive
|
||||
# param 1 is for example ZIP_MYSOURCE
|
||||
# param 2,3,4,5,6,7,8,9 are named args.
|
||||
# SRC,ZIP,INCLUDES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
|
||||
|
||||
# Find all files in the source tree.
|
||||
$1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
|
||||
@@ -343,7 +263,7 @@ define SetupZipArchive
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
$1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
|
||||
$1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
$1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
|
||||
endif
|
||||
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this zip.
|
||||
@@ -357,7 +277,7 @@ define SetupZipArchive
|
||||
$$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Updating $$($1_NAME)
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES)))) ;) true
|
||||
$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* $$(addprefix -x$(SPACE),$$(patsubst $$i/%,%,$$($1_EXCLUDE_FILES))))$$(NEWLINE)) true
|
||||
$(TOUCH) $$@
|
||||
endef
|
||||
|
||||
@@ -381,7 +301,8 @@ endef
|
||||
# This macro is used only for properties files that are to be
|
||||
# copied over to the classes directory in cleaned form:
|
||||
# Previously this was inconsistently done in different repositories.
|
||||
# This is the new clean standard.
|
||||
# This is the new clean standard. Though it is to be superseded by
|
||||
# a standard annotation processor from with sjavac.
|
||||
define add_file_to_copy_and_clean
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
# parma 2 = The source file to copy and clean.
|
||||
@@ -391,109 +312,8 @@ define add_file_to_copy_and_clean
|
||||
# Now we can setup the depency that will trigger the copying.
|
||||
$$($1_BIN)$$($2_TARGET) : $2
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(ECHO) Cleaning $$($2_TARGET)
|
||||
$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
| $(SED) \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003A/\x3A/g' \
|
||||
-e 's/\\u006B/\x6B/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00A0/\xA0/g' \
|
||||
-e 's/\\u00A3/\xA3/g' \
|
||||
-e 's/\\u00B0/\xB0/g' \
|
||||
-e 's/\\u00B7/\xB7/g' \
|
||||
-e 's/\\u00BA/\xBA/g' \
|
||||
-e 's/\\u00BF/\xBF/g' \
|
||||
-e 's/\\u00C0/\xC0/g' \
|
||||
-e 's/\\u00C1/\xC1/g' \
|
||||
-e 's/\\u00C2/\xC2/g' \
|
||||
-e 's/\\u00C4/\xC4/g' \
|
||||
-e 's/\\u00C5/\xC5/g' \
|
||||
-e 's/\\u00C8/\xC8/g' \
|
||||
-e 's/\\u00C9/\xC9/g' \
|
||||
-e 's/\\u00CA/\xCA/g' \
|
||||
-e 's/\\u00CD/\xCD/g' \
|
||||
-e 's/\\u00CE/\xCE/g' \
|
||||
-e 's/\\u00D3/\xD3/g' \
|
||||
-e 's/\\u00D4/\xD4/g' \
|
||||
-e 's/\\u00D6/\xD6/g' \
|
||||
-e 's/\\u00DA/\xDA/g' \
|
||||
-e 's/\\u00DC/\xDC/g' \
|
||||
-e 's/\\u00DD/\xDD/g' \
|
||||
-e 's/\\u00DF/\xDF/g' \
|
||||
-e 's/\\u00E0/\xE0/g' \
|
||||
-e 's/\\u00E1/\xE1/g' \
|
||||
-e 's/\\u00E2/\xE2/g' \
|
||||
-e 's/\\u00E3/\xE3/g' \
|
||||
-e 's/\\u00E4/\xE4/g' \
|
||||
-e 's/\\u00E5/\xE5/g' \
|
||||
-e 's/\\u00E6/\xE6/g' \
|
||||
-e 's/\\u00E7/\xE7/g' \
|
||||
-e 's/\\u00E8/\xE8/g' \
|
||||
-e 's/\\u00E9/\xE9/g' \
|
||||
-e 's/\\u00EA/\xEA/g' \
|
||||
-e 's/\\u00EB/\xEB/g' \
|
||||
-e 's/\\u00EC/\xEC/g' \
|
||||
-e 's/\\u00ED/\xED/g' \
|
||||
-e 's/\\u00EE/\xEE/g' \
|
||||
-e 's/\\u00EF/\xEF/g' \
|
||||
-e 's/\\u00F1/\xF1/g' \
|
||||
-e 's/\\u00F2/\xF2/g' \
|
||||
-e 's/\\u00F3/\xF3/g' \
|
||||
-e 's/\\u00F4/\xF4/g' \
|
||||
-e 's/\\u00F5/\xF5/g' \
|
||||
-e 's/\\u00F6/\xF6/g' \
|
||||
-e 's/\\u00F9/\xF9/g' \
|
||||
-e 's/\\u00FA/\xFA/g' \
|
||||
-e 's/\\u00FC/\xFC/g' \
|
||||
-e 's/\\u0020/\x20/g' \
|
||||
-e 's/\\u003f/\x3f/g' \
|
||||
-e 's/\\u006f/\x6f/g' \
|
||||
-e 's/\\u0075/\x75/g' \
|
||||
-e 's/\\u00a0/\xa0/g' \
|
||||
-e 's/\\u00a3/\xa3/g' \
|
||||
-e 's/\\u00b0/\xb0/g' \
|
||||
-e 's/\\u00ba/\xba/g' \
|
||||
-e 's/\\u00bf/\xbf/g' \
|
||||
-e 's/\\u00c1/\xc1/g' \
|
||||
-e 's/\\u00c4/\xc4/g' \
|
||||
-e 's/\\u00c5/\xc5/g' \
|
||||
-e 's/\\u00c8/\xc8/g' \
|
||||
-e 's/\\u00c9/\xc9/g' \
|
||||
-e 's/\\u00ca/\xca/g' \
|
||||
-e 's/\\u00cd/\xcd/g' \
|
||||
-e 's/\\u00d6/\xd6/g' \
|
||||
-e 's/\\u00dc/\xdc/g' \
|
||||
-e 's/\\u00dd/\xdd/g' \
|
||||
-e 's/\\u00df/\xdf/g' \
|
||||
-e 's/\\u00e0/\xe0/g' \
|
||||
-e 's/\\u00e1/\xe1/g' \
|
||||
-e 's/\\u00e2/\xe2/g' \
|
||||
-e 's/\\u00e3/\xe3/g' \
|
||||
-e 's/\\u00e4/\xe4/g' \
|
||||
-e 's/\\u00e5/\xe5/g' \
|
||||
-e 's/\\u00e7/\xe7/g' \
|
||||
-e 's/\\u00e8/\xe8/g' \
|
||||
-e 's/\\u00e9/\xe9/g' \
|
||||
-e 's/\\u00ea/\xea/g' \
|
||||
-e 's/\\u00eb/\xeb/g' \
|
||||
-e 's/\\u00ec/\xec/g' \
|
||||
-e 's/\\u00ed/\xed/g' \
|
||||
-e 's/\\u00ee/\xee/g' \
|
||||
-e 's/\\u00ef/\xef/g' \
|
||||
-e 's/\\u00f0/\xf0/g' \
|
||||
-e 's/\\u00f1/\xf1/g' \
|
||||
-e 's/\\u00f2/\xf2/g' \
|
||||
-e 's/\\u00f3/\xf3/g' \
|
||||
-e 's/\\u00f4/\xf4/g' \
|
||||
-e 's/\\u00f5/\xf5/g' \
|
||||
-e 's/\\u00f6/\xf6/g' \
|
||||
-e 's/\\u00f7/\xf7/g' \
|
||||
-e 's/\\u00f8/\xf8/g' \
|
||||
-e 's/\\u00f9/\xf9/g' \
|
||||
-e 's/\\u00fa/\xfa/g' \
|
||||
-e 's/\\u00fc/\xfc/g' \
|
||||
-e 's/\\u00ff/\xff/g' \
|
||||
| $(SED) -f "$(SRC_ROOT)/common/makefiles/support/unicode2x.sed" \
|
||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ \t]*//;s/[ \t]*$$$$//' \
|
||||
@@ -504,122 +324,6 @@ define add_file_to_copy_and_clean
|
||||
$1_ALL_COPY_CLEAN_TARGETS += $$($1_BIN)$$($2_TARGET)
|
||||
endef
|
||||
|
||||
define add_java_package
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
# param 2 = the package target file (_the.package)
|
||||
# param 3 = src roots, all of them, separated with space
|
||||
# param 4 = bin root
|
||||
# param 5 = include these dependecies
|
||||
# param 6 = not used
|
||||
# param 7 = if non-empty, then use -Xdeps and -Xpubapi
|
||||
# param 8 = xremote configuration, or empty.
|
||||
# param 9 = javac command
|
||||
# param 10 = javac flags
|
||||
# param 11 = exclude these files!
|
||||
# param 12 = only include these files!
|
||||
# param 13 = javah command
|
||||
# param 14 = override src roots to be passed into -sourcepath, ugly ugly ugly, do not use this!
|
||||
# it is only here to workaround ugly things in the source code in the jdk that ought
|
||||
# to be fixed instead!
|
||||
ifdef $2_USED_BY
|
||||
$$(error Attempting to add the package $2 from $3 which is already added with sources from $$($2_USED_BY))
|
||||
endif
|
||||
$2_USED_BY:=$3
|
||||
# Remove the _the.package file to get the target bin dir for the classes in this package.
|
||||
$2_PACKAGE_BDIR:=$(dir $2)
|
||||
# The source roots separated with a path separator (: or ; depending on os)
|
||||
# (The patsubst is necessary to trim away unnecessary spaces.)
|
||||
ifneq ($(14),)
|
||||
$2_SRCROOTSC:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$(14))))
|
||||
else
|
||||
$2_SRCROOTSC:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$3)))
|
||||
endif
|
||||
# Suffix the package path to the src roots, to get a list of all possible source locations
|
||||
# for this package.
|
||||
$2_PACKAGE_SDIRS:=$$(foreach i,$3,$$(subst $4,$$i,$$($2_PACKAGE_BDIR)))
|
||||
# Use wildcard in all potential source locations to find the actual sources.
|
||||
$2_PACKAGE_SRCS:=$$(filter-out $(11),$$(wildcard $$(addsuffix *.java,$$($2_PACKAGE_SDIRS))))
|
||||
ifneq ($(12),)
|
||||
# Filter on include file filter if set.
|
||||
$2_PACKAGE_SRCS:=$$(filter $(12),$$($2_PACKAGE_SRCS))
|
||||
endif
|
||||
# Generate a proper package name from the file name.
|
||||
$2_PACKAGE:=$(patsubst .%.,%,$(subst /,.,$(subst $4,,$(dir $2))))
|
||||
# Use a javac server for this package?
|
||||
$2_REMOTE:=$8
|
||||
|
||||
# Include previously generated information about what classes are output by this package
|
||||
# and what sources were used for the compile.
|
||||
-include $$($2_PACKAGE_BDIR)_the.package.d
|
||||
|
||||
# Include the notify, file, that exists if the package has been compiled during a previous make round.
|
||||
# I.e. we are now dealing with a compile triggered by a pubapi change.
|
||||
-include $$($2_PACKAGE_BDIR)_the.package.notify
|
||||
|
||||
# If the notify file existed, then $$($2_NOTIFIED) will be equal to true.
|
||||
# Use this information to block dependency tracking for this package.
|
||||
# This is necessary to cut the circular dependency chains that are so common in Java sources.
|
||||
|
||||
ifneq ($$($2_NOTIFIED),true)
|
||||
# No need to block, since this package has not yet been recompiled.
|
||||
# Thus include previously generated dependency information. (if it exists)
|
||||
-include $$($2_PACKAGE_BDIR)_the.package.dddd
|
||||
# else
|
||||
# $$(info WAS NOTIFIED $2)
|
||||
endif
|
||||
|
||||
# Should we create proper dependencies between packages?
|
||||
ifneq ($7,)
|
||||
# The flag: -XDpubapi:file=foo,package=mypack,notify writes a file foo that contains a
|
||||
# database of the public api of the classes supplied on the command line and are
|
||||
# inside the package mypack. If foo already exists, javac will only write to foo,
|
||||
# if there is a change in the pubapi. I.e. we can use the timestamp of this file
|
||||
# for triggering dependencies. "notify" means create a "file" suffixed with notify
|
||||
# if the pubapi really changed.
|
||||
$2_PUBAPI=-XDpubapi=file=$$($2_PACKAGE_BDIR)_the.package.api,notify,package=$$($2_PACKAGE)
|
||||
# The flag: -XDnativeapi:file=foo,package=mypack,notify works similar to pubabi, but
|
||||
# instead tracks native methods. This file can be used to trigger dependencies for
|
||||
# native compilations.
|
||||
$2_NATIVEAPI=-XDnativeapi=file=$$($2_PACKAGE_BDIR)_the.package.native,notify,package=$$($2_PACKAGE)
|
||||
# The flag -XDdeps:file=foo.deps,groupon=package writes a foo.deps file containing packages dependencies:
|
||||
# java.net : java.io java.lang
|
||||
# I.e. the classes in .net depend on the public apis of java.io and java.lang
|
||||
# The dependencies can be grouped on classes instead (groupon=class)
|
||||
# java.net.Bar : java.io.Socket java.lang.String
|
||||
$2_DEPS:=-XDdeps=file=$$($2_PACKAGE_BDIR)_the.package.deps,groupon=package
|
||||
# The next command rewrites the deps output from javac into a proper makefile dependency.
|
||||
# The dependencies are always to an .api file generated by the pubapi option above.
|
||||
# This is necessary since java package dependencies are almost always circular.
|
||||
$2_APPEND_DEPS:=($(CAT) $$($2_PACKAGE_BDIR)_the.package.deps | $(TR) '.' '/' | $(AWK) '{ print "$4/" $$$$3 }' | sort > $$($2_PACKAGE_BDIR)_the.package.ddd && $(GREP) -f $$($2_PACKAGE_BDIR)_the.package.ddd $5 | $(AWK) '{ print "$(dir $2)_the.package : " $$$$1 "_the.package.api" }' > $$($2_PACKAGE_BDIR)_the.package.dddd ; true)
|
||||
else
|
||||
# If not using dependencies, use $2 as fallback to trigger regeneration of javah header files.
|
||||
# This will generate a surplus of header files, but this does not hurt compilation.
|
||||
$2_NATIVEAPICHANGE_TRIGGER:=$2
|
||||
$2_FETCH_NATIVEAPICHANGE_CLASSES:=$(CAT) $$($2_PACKAGE_BDIR)_the.package.now|$(GREP) -v '\$$$$'|$(SED) -e 's|$4/||g'|$(SED) 's|.class||g'| $(TR) '/' '.'
|
||||
endif
|
||||
|
||||
# The _the.package file is dependent on the java files inside the package.
|
||||
# Fill the _the.package file with a list of the java files and compile them
|
||||
# to class files.
|
||||
$2 : $$($2_PACKAGE_SRCS)
|
||||
$(MKDIR) -p $$($2_PACKAGE_BDIR)
|
||||
$(RM) $2.tmp
|
||||
$$(call ListPathsSafely,$2_PACKAGE_SRCS,\n, >> $2.tmp)
|
||||
$(ECHO) $$($2_PACKAGE_BDIR)*.class | $(GREP) -v \*.class | $(TR) ' ' '\n' > $$($2_PACKAGE_BDIR)_the.package.prev
|
||||
$(RM) $$($2_PACKAGE_BDIR)*.class $$($2_PACKAGE_BDIR)*.notify $$($2_PACKAGE_BDIR)*.deleted
|
||||
$(ECHO) Compiling `$(WC) $2.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files in package $(patsubst $4/%/,%,$(dir $2.tmp))
|
||||
$9 $$($2_REMOTE) $$($2_DEPS) $$($2_PUBAPI) $$($2_NATIVEAPI) $(10) -implicit:none -sourcepath "$$($2_SRCROOTSC)" -d $4 @$2.tmp
|
||||
$(ECHO) $$($2_PACKAGE_BDIR)*.class | $(GREP) -v \*.class | $(TR) ' ' '\n' > $$($2_PACKAGE_BDIR)_the.package.now
|
||||
($(GREP) -xvf $$($2_PACKAGE_BDIR)_the.package.now $$($2_PACKAGE_BDIR)_the.package.prev > $$($2_PACKAGE_BDIR)_the.package.deleted;true)
|
||||
$(ECHO) $1_CLASSES += `$(CAT) $$($2_PACKAGE_BDIR)_the.package.now` | \
|
||||
$(SED) 's/\$$$$/\$$$$\$$$$/g' > $$($2_PACKAGE_BDIR)_the.package.d
|
||||
$(ECHO) $1_JAVAS += $$($2_PACKAGE_SRCS) >> $$($2_PACKAGE_BDIR)_the.package.d
|
||||
$(ECHO) $2_NOTIFIED:=true > $$($2_PACKAGE_BDIR)_the.package.notify
|
||||
$$($2_APPEND_DEPS)
|
||||
$$($2_COPY_FILES)
|
||||
$(MV) -f $2.tmp $2
|
||||
endef
|
||||
|
||||
define remove_string
|
||||
$2 := $$(subst $1,,$$($2))
|
||||
endef
|
||||
@@ -649,90 +353,62 @@ define SetupJavaCompilation
|
||||
# Its only here until we cleanup some nasty source code pasta in the jdk.
|
||||
# HEADERS:=path to directory where all generated c-headers are written.
|
||||
# DEPENDS:=Extra dependecy
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupJavaCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
|
||||
|
||||
# Extract the info from the java compiler setup.
|
||||
$1_MODE := $$($$($1_SETUP)_MODE)
|
||||
ifneq (SINGLE_THREADED_BATCH,$$($1_MODE))
|
||||
ifneq (MULTI_CORE_CONCURRENT,$$($1_MODE))
|
||||
# Extract the info from the java compiler setup.
|
||||
$1_JVM := $$($$($1_SETUP)_JVM)
|
||||
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
|
||||
$1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
|
||||
ifeq ($$($1_JAVAC),)
|
||||
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
||||
endif
|
||||
endif
|
||||
$1_USE_DEPS := $$($$($1_SETUP)_USE_DEPS)
|
||||
$1_REMOTE := $$($$($1_SETUP)_REMOTE)
|
||||
$1_JVM := $$($$($1_SETUP)_JVM)
|
||||
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
|
||||
$1_JAVAH := $$($$($1_SETUP)_JAVAH)
|
||||
$1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
|
||||
$1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
|
||||
$1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
|
||||
|
||||
# Handle addons and overrides.
|
||||
$1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
|
||||
# Make sure the dirs exist.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
|
||||
# Find all files in the source trees.
|
||||
$1_ALL_SRCS := $$(filter-out $(OVR_SRCS),$$(foreach i,$$($1_SRC),$$(shell $(FIND) $$i -type f)))
|
||||
# Extract the java files.
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
# Handle addons and overrides.
|
||||
$1_SRC:=$$(call ADD_SRCS,$$($1_SRC))
|
||||
# Make sure the dirs exist.
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
|
||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||
# Find all files in the source trees.
|
||||
$1_ALL_SRCS := $$(filter-out $(OVR_SRCS),$$(shell $(FIND) $$($1_SRC) -type f))
|
||||
# Extract the java files.
|
||||
ifneq ($$($1_EXCLUDE_FILES),)
|
||||
$1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES))
|
||||
endif
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$(filter %.java,$$($1_ALL_SRCS)))
|
||||
ifneq ($$($1_INCLUDE_FILES),)
|
||||
endif
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$(filter %.java,$$($1_ALL_SRCS)))
|
||||
ifneq ($$($1_INCLUDE_FILES),)
|
||||
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
$1_SRCS := $$(filter $$($1_INCLUDE_FILES), $$($1_SRCS))
|
||||
endif
|
||||
$1_PKGS := $$(sort $$(dir $$($1_SRCS)))
|
||||
# Remove the source root from each found path.
|
||||
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$1_PKGS)))
|
||||
$1_PKGS := $$(sort $$($1_PKGS))
|
||||
# There can be only a single bin dir root, no need to foreach over the roots.
|
||||
$1_BINS := $$(shell $(FIND) $$($1_BIN) -name "*.class")
|
||||
endif
|
||||
|
||||
# Now we have a list of all java files to compile: $$($1_SRCS)
|
||||
# and we have a list of all existing class files: $$($1_BINS)
|
||||
# Now we have a list of all java files to compile: $$($1_SRCS)
|
||||
|
||||
# Create the corresponding smart javac wrapper command line.
|
||||
$1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
|
||||
$$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
|
||||
$$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
|
||||
$$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) -src $$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))
|
||||
# Create the corresponding smart javac wrapper command line.
|
||||
$1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
|
||||
$$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
|
||||
$$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
|
||||
$$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) \
|
||||
-src "$$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))"
|
||||
|
||||
# Prepend the source/bin path to the filter expressions.
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
# Prepend the source/bin path to the filter expressions.
|
||||
ifneq ($$($1_INCLUDES),)
|
||||
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
|
||||
$1_PKG_INCLUDES := $$(addprefix /,$$(addsuffix /%,$$($1_INCLUDES)))
|
||||
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$(addsuffix /%,$$($1_INCLUDES)))
|
||||
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
|
||||
$1_PKGS := $$(filter $$($1_PKG_INCLUDES),$$($1_PKGS))
|
||||
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
endif
|
||||
ifneq ($$($1_EXCLUDES),)
|
||||
$1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
|
||||
$1_PKG_EXCLUDES := $$(addprefix /,$$(addsuffix /%,$$($1_EXCLUDES)))
|
||||
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$(addsuffix /%,$$($1_EXCLUDES)))
|
||||
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
|
||||
$1_PKGS := $$(filter-out $$($1_PKG_EXCLUDES),$$($1_PKGS))
|
||||
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find all files to be copied from source to bin.
|
||||
ifneq (,$$($1_COPY))
|
||||
# Find all files to be copied from source to bin.
|
||||
ifneq (,$$($1_COPY))
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_COPY_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_COPY))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_COPIES := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i \( $$($1_COPY_PATTERN) \) -a -type f))
|
||||
$1_ALL_COPIES := $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS))
|
||||
# Copy these explicitly
|
||||
$1_ALL_COPIES += $$($1_COPY_FILES)
|
||||
# Copy must also respect filters.
|
||||
@@ -746,21 +422,21 @@ ifneq (,$$($1_COPY))
|
||||
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_FILES_PATTERN),$$($1_ALL_COPIES))
|
||||
endif
|
||||
# All files below META-INF are always copied.
|
||||
$1_ALL_COPIES += $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i/META-INF -type f 2> /dev/null))
|
||||
$1_ALL_COPIES += $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
|
||||
ifneq (,$$($1_ALL_COPIES))
|
||||
# Yep, there are files to be copied!
|
||||
$1_ALL_COPY_TARGETS:=
|
||||
$$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
|
||||
# Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find all property files to be copied and cleaned from source to bin.
|
||||
ifneq (,$$($1_CLEAN))
|
||||
# Find all property files to be copied and cleaned from source to bin.
|
||||
ifneq (,$$($1_CLEAN))
|
||||
# Rewrite list of patterns into a find statement.
|
||||
$1_CLEAN_PATTERN:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_CLEAN))
|
||||
# Search for all files to be copied.
|
||||
$1_ALL_CLEANS := $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i \( $$($1_CLEAN_PATTERN) \) -a -type f))
|
||||
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS))
|
||||
# Copy and clean must also respect filters.
|
||||
ifneq (,$$($1_INCLUDES))
|
||||
$1_ALL_CLEANS := $$(filter $$($1_SRC_INCLUDES),$$($1_ALL_CLEANS))
|
||||
@@ -777,27 +453,7 @@ ifneq (,$$($1_CLEAN))
|
||||
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_copy_and_clean,$1,$$i)))
|
||||
# Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
|
||||
endif
|
||||
endif
|
||||
|
||||
# Find all the directories that contain java sources, each directory
|
||||
# corresponds to a package because we expect the source
|
||||
# code to be organized in this standardized way!
|
||||
$1_SDIRS := $$(sort $$(dir $$($1_SRCS)))
|
||||
# Now prefix each package with the bin root.
|
||||
$1_BDIRS := $$(foreach i,$$($1_PKGS),$$(addprefix $$($1_BIN),$$i))
|
||||
# Now create a list of the packages that are about to compile. This list is
|
||||
# later used to filter out dependencies that point outside of this set.
|
||||
$$(shell $(RM) $$($1_BIN)/_the.list_of_packages)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_BDIRS,\n, >> $$($1_BIN)/_the.list_of_packages))
|
||||
|
||||
ifeq ($$($1_MODE),SINGLE_THREADED_BATCH)
|
||||
# Ok, we will feed all the found java files into a single javac invocation.
|
||||
# There can be no dependency checking, nor incremental builds. It is
|
||||
# the best we can do with the old javac. If the javac supports a javac server
|
||||
# then we can use the javac server.
|
||||
|
||||
# We can depend on this target file to trigger a regeneration of all the sources
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.batch
|
||||
endif
|
||||
|
||||
# Prep the source paths.
|
||||
ifneq ($$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE),)
|
||||
@@ -806,91 +462,81 @@ ifeq ($$($1_MODE),SINGLE_THREADED_BATCH)
|
||||
$$(eval $$(call replace_space_with_pathsep,$1_SRCROOTSC,$$($1_SRC)))
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
# Create a sed expression to remove the source roots and to replace / with .
|
||||
# and remove .java at the end.
|
||||
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
|
||||
|
||||
# Here is the batch rules that depends on all the sources.
|
||||
ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
# Using sjavac to compile.
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/javac_state
|
||||
|
||||
# Create SJAVAC variable,
|
||||
# expects $1_JAVAC to be "bootclasspathprepend -jar ...javac.jar"
|
||||
# and it is rewritten into "bootclasspathprepend com.sun.tools.sjavac.Main"
|
||||
$1_SJAVAC:=$$(word 1,$$($1_JAVAC)) -cp $$(word 3,$$($1_JAVAC)) com.sun.tools.sjavac.Main
|
||||
|
||||
# Set the $1_REMOTE to spawn a background javac server.
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),poolsize=$(SJAVAC_SERVER_CORES),id=$1,sjavac=$$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
|
||||
$$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
|
||||
$(ECHO) Compiling $1
|
||||
$$($1_JVM) $$($1_SJAVAC) \
|
||||
$$($1_REMOTE) $$($1_SJAVAC_ARGS) \
|
||||
--permit-unidentified-artifacts \
|
||||
--permit-sources-without-package \
|
||||
--compare-found-sources $$($1_BIN)/_the.batch.tmp \
|
||||
$$($1_FLAGS) \
|
||||
-implicit:none -d $$($1_BIN) $$($1_HEADERS_ARG)
|
||||
else
|
||||
# Using plain javac to batch compile everything.
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.batch
|
||||
|
||||
# When buliding in batch, put headers in a temp dir to filter out those that actually
|
||||
# changed before copying them to the real header dir.
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS).tmp
|
||||
|
||||
$$($1_HEADERS)/_the.headers: $$($1_BIN)/_the.batch
|
||||
$(MKDIR) -p $$(@D)
|
||||
for f in `ls $$($1_HEADERS).tmp`; do \
|
||||
if [ ! -f "$$($1_HEADERS)/$$$$f" ] || [ "`$(DIFF) $$($1_HEADERS)/$$$$f $$($1_HEADERS).tmp/$$$$f`" != "" ]; then \
|
||||
$(CP) -f $$($1_HEADERS).tmp/$$$$f $$($1_HEADERS)/$$$$f; \
|
||||
fi; \
|
||||
done
|
||||
$(RM) -r $$($1_HEADERS).tmp
|
||||
$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_HEADERS)/_the.headers
|
||||
endif
|
||||
|
||||
# When not using sjavac, pass along all sources to javac using an @file.
|
||||
$$($1_BIN)/_the.batch: $$($1_SRCS) $$($1_DEPENDS)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
|
||||
$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
|
||||
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files in batch $1
|
||||
ifeq ($$($1_NOSJAVAC),)
|
||||
ifeq ($$(ENABLE_SJAVAC),yes)
|
||||
mkdir -p $$($1_BIN)_sjavac
|
||||
$$($1_JVM) $$(word 1,$$($1_JAVAC)) com.sun.tools.javac.smart.Main $$($1_SJAVAC_ARGS) -mfl $$($1_BIN)/_the.batch.tmp -d $$($1_BIN)_sjavac
|
||||
endif
|
||||
endif
|
||||
($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) -implicit:none -sourcepath "$$($1_SRCROOTSC)" -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
|
||||
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
|
||||
($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
|
||||
-implicit:none -sourcepath "$$($1_SRCROOTSC)" \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
|
||||
$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
|
||||
else
|
||||
# Ok, we have a modern javac server running!
|
||||
# Since a single Java file can generate zero to an infinity number of .class files
|
||||
# the exact number and names of the .class files will only be known after the compile.
|
||||
# Thus after the compile, a list of the generated classes will be stored in _the.package.d
|
||||
# which is included by the makefile during the next compile. These .d files will
|
||||
# add the generated class names to the BUILD_MYPACKAGE_CLASSES variable and used java file names
|
||||
# to the BUILD_MYPACKAGE_JAVAS variable.
|
||||
$1_CLASSES :=
|
||||
$1_JAVAS :=
|
||||
# Create a file in each package that represents the package dependency.
|
||||
# This file (_the.package) will also contain a list of the source files
|
||||
# to be compiled for this package.
|
||||
$1 := $$(sort $$(patsubst %,%_the.package,$$($1_BDIRS)))
|
||||
# Now call add_java_package for each package to create the dependencies.
|
||||
$$(foreach p,$$($1),$$(eval $$(call add_java_package,$1,$$p,$$($1_SRC),$$($1_BIN),$$($1_BIN)/_the.list_of_packages,NOTUSED,$$($1_USE_DEPS),$$($1_REMOTE),$$($1_JVM) $$($1_JAVAC),$$($1_FLAGS),$$($1_EXCLUDE_FILES_PATTERN) $(OVR_SRCS),$$($1_INCLUDE_FILES),$$($1_JVM) $$($1_JAVAH),$$($1_JAVAC_SOURCE_PATH_UGLY_OVERRIDE))))
|
||||
# All dependencies are setup, now we only need to depend on $1 (aka $(BUILD_MYPACKAGE))
|
||||
# and they will automatically be built!
|
||||
|
||||
# Now add on any files to copy targets
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1)
|
||||
# Remove the set of found classes from the set of all previously known classes
|
||||
# and the remainder is the set of missing classes.
|
||||
$1_MISSING_CLASSES:=$$(filter-out $$($1_BINS),$$($1_CLASSES))
|
||||
$1_PKGS_MISSING_CLASSES:=$$(sort $$(dir $$($1_MISSING_CLASSES)))
|
||||
# Remove the set of found java files from the set of all previously known java files
|
||||
# the remainder is Java files that have gone missing.
|
||||
$1_MISSING_JAVAS:=$$(filter-out $$($1_SRCS),$$($1_JAVAS))
|
||||
$1_PKGS_MISSING_JAVAS:=$$(sort $$(dir $$($1_MISSING_JAVAS)))
|
||||
# Remove each source root from the found paths.
|
||||
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$1_PKGS_MISSING_JAVAS)))
|
||||
# Finally remove duplicates and prefix with the binary path instead.
|
||||
$1_PKGS_MISSING_JAVAS:= $$(addprefix $$($1_BIN),$$(sort $$($1_PKGS_MISSING_JAVAS)))
|
||||
|
||||
# Remove the set of all theoretical classes from the set of found classes.
|
||||
# the remainder is the set of superfluous classes.
|
||||
$1_SUPERFLUOUS_CLASSES:=$$(sort $$(filter-out $$($1_CLASSES),$$($1_BINS)))
|
||||
$1_PKGS_SUPERFLUOUS_CLASSES:=$$(sort $$(dir $$($1_SUPERFLUOUS_CLASSES)))
|
||||
|
||||
# Now delete the _the.package files inside the problematic dirs.
|
||||
# This will force a rebuild of these packages!
|
||||
$1_FOO:=$$(sort $$($1_PKGS_MISSING_CLASSES) \
|
||||
$$($1_PKGS_SUPERFLUOUS_CLASSES) \
|
||||
$$($1_PKGS_MISSING_JAVAS))
|
||||
# ifneq (,$$($1_FOO))
|
||||
# $$(info MESSED UP PACKAGES $$($1_FOO))
|
||||
# endif
|
||||
|
||||
$$(shell $(RM) $$(addsuffix _the.package,$$(sort $$($1_PKGS_MISSING_CLASSES) \
|
||||
$$($1_PKGS_SUPERFLUOUS_CLASSES) \
|
||||
$$($1_PKGS_MISSING_JAVAS))))
|
||||
|
||||
# Normal makefile dependencies based on timestamps will detect the normal use case
|
||||
# when Java files are simply added or modified.
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_JAR))
|
||||
endif
|
||||
|
||||
# Check if a jar file was specified, then setup the rules for the jar.
|
||||
ifneq (,$$($1_JAR))
|
||||
# If no suffixes was explicitly set for this jar file.
|
||||
# Use class and the cleaned/copied properties file suffixes as the default
|
||||
# for the types of files to be put into the jar.
|
||||
ifeq (,$$($1_SUFFIXES))
|
||||
$1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
|
||||
endif
|
||||
|
||||
# A jar file was specified. Set it up.
|
||||
$$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1),\
|
||||
SRCS:=$$($1_BIN),\
|
||||
SUFFIXES:=$$($1_SUFFIXES),\
|
||||
@@ -904,16 +550,16 @@ ifneq (,$$($1_JAR))
|
||||
JARINDEX:=$$($1_JARINDEX),\
|
||||
HEADERS:=$$($1_HEADERS),\
|
||||
SETUP:=$$($1_SETUP)))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_SRCZIP))
|
||||
# A srczip file was specified. Set it up.
|
||||
# Check if a srczip was specified, then setup the rules for the srczip.
|
||||
ifneq (,$$($1_SRCZIP))
|
||||
$$(eval $$(call SetupZipArchive,ARCHIVE_$1,\
|
||||
SRC:=$$($1_SRC),\
|
||||
ZIP:=$$($1_SRCZIP),\
|
||||
INCLUDES:=$$($1_INCLUDES),\
|
||||
EXCLUDES:=$$($1_EXCLUDES),\
|
||||
EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
|
||||
endif
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
208
common/makefiles/Main.gmk
Normal file
208
common/makefiles/Main.gmk
Normal file
@@ -0,0 +1,208 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
|
||||
|
||||
# Now load the spec
|
||||
include $(SPEC)
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
|
||||
# Include the corresponding custom file, if present.
|
||||
-include $(CUSTOM_MAKE_DIR)/Main.gmk
|
||||
|
||||
### Clean up from previous run
|
||||
|
||||
# Remove any build.log from a previous run, if they exist
|
||||
ifneq (,$(BUILD_LOG))
|
||||
ifneq (,$(BUILD_LOG_PREVIOUS))
|
||||
# Rotate old log
|
||||
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
else
|
||||
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
|
||||
endif
|
||||
$(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
|
||||
endif
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
ifneq (,$(SJAVAC_SERVER_DIR))
|
||||
$(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
|
||||
endif
|
||||
|
||||
# Reset the build timers.
|
||||
$(eval $(call ResetAllTimers))
|
||||
|
||||
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
|
||||
# hence this workaround.
|
||||
ifeq ($(JOBS),)
|
||||
JOBS=$(NUM_CORES)
|
||||
endif
|
||||
MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
|
||||
|
||||
### Main targets
|
||||
|
||||
all: jdk
|
||||
|
||||
start-make:
|
||||
@$(call AtMakeStart)
|
||||
|
||||
langtools: langtools-only
|
||||
langtools-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildLangtools.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
corba: langtools corba-only
|
||||
corba-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildCorba.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
jaxp: langtools jaxp-only
|
||||
jaxp-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxp.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
jaxws: langtools jaxp jaxws-only
|
||||
jaxws-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
hotspot: hotspot-only
|
||||
hotspot-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
|
||||
@$(call TargetExit)
|
||||
|
||||
jdk: langtools hotspot corba jaxp jaxws jdk-only
|
||||
jdk-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET))
|
||||
@$(call TargetExit)
|
||||
|
||||
demos: jdk demos-only
|
||||
demos-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
|
||||
@$(call TargetExit)
|
||||
|
||||
images: source-tips demos images-only
|
||||
images-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
|
||||
@$(call TargetExit)
|
||||
|
||||
overlay-images: source-tips demos overlay-images-only
|
||||
overlay-images-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
|
||||
@$(call TargetExit)
|
||||
|
||||
bundles: images bundles-only
|
||||
bundles-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk bundles)
|
||||
@$(call TargetExit)
|
||||
|
||||
install: images install-only
|
||||
install-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
|
||||
@$(call TargetExit)
|
||||
|
||||
docs: jdk docs-only
|
||||
docs-only: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles/javadoc && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
|
||||
@$(call TargetExit)
|
||||
|
||||
bootcycle-images:
|
||||
@$(ECHO) Boot cycle build step 1: Building the JDK image normally
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
|
||||
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
|
||||
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
|
||||
|
||||
test: start-make
|
||||
@$(call TargetEnter)
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@$(call TargetExit)
|
||||
|
||||
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
|
||||
# used to track the exact sources used to build that image.
|
||||
source-tips: $(OUTPUT_ROOT)/source_tips
|
||||
$(OUTPUT_ROOT)/source_tips: FRC
|
||||
@$(MKDIR) -p $(@D)
|
||||
@$(RM) $@
|
||||
@$(if $(HG),$(call GetSourceTips),$(ECHO) "hg not installed" > $@)
|
||||
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
|
||||
@$(ECHO) Cleaned all build artifacts.
|
||||
|
||||
# Remove everything, including configure configuration.
|
||||
# If the output directory was created by configure and now becomes empty, remove it as well.
|
||||
# FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
|
||||
dist-clean: clean
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp)
|
||||
@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
|
||||
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
|
||||
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\
|
||||
else \
|
||||
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
|
||||
fi \
|
||||
)
|
||||
@$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
|
||||
clean-langtools:
|
||||
$(call CleanComponent,langtools)
|
||||
clean-corba:
|
||||
$(call CleanComponent,corba)
|
||||
clean-jaxp:
|
||||
$(call CleanComponent,jaxp)
|
||||
clean-jaxws:
|
||||
$(call CleanComponent,jaxws)
|
||||
clean-hotspot:
|
||||
$(call CleanComponent,hotspot)
|
||||
clean-jdk:
|
||||
$(call CleanComponent,jdk)
|
||||
clean-images:
|
||||
$(call CleanComponent,images)
|
||||
clean-overlay-images:
|
||||
$(call CleanComponent,overlay-images)
|
||||
clean-bootcycle-build:
|
||||
$(call CleanComponent,bootcycle-build)
|
||||
|
||||
.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
|
||||
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
|
||||
.PHONY: all test clean dist-clean bootcycle-images start-make
|
||||
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
|
||||
|
||||
FRC: # Force target
|
||||
@@ -33,129 +33,13 @@
|
||||
ifndef _MAKEBASE_GMK
|
||||
_MAKEBASE_GMK := 1
|
||||
|
||||
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
|
||||
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
|
||||
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Please upgrade to 3.81 or newer.)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(CYGPATH))
|
||||
# Cygwin styff, if needed but most is going to be
|
||||
# done in configure!
|
||||
ifeq (yes,$(CHECK_FOR_VCINSTALLDIR))
|
||||
ifeq (,$(VCINSTALLDIR))
|
||||
$(info Could not find compiler paths!)
|
||||
$(info You probably configured the build from within a)
|
||||
$(info VS command prompt, but you are not using such a)
|
||||
$(info prompt right now.)
|
||||
$(info If you instead run configure from a plain cygwin shell, it)
|
||||
$(info will attempt to setup VS for you! Please try that.)
|
||||
$(error Giving up for now.)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# The build times report is turned off by setting REPORT_BUILD_TIMES to nothing.
|
||||
# This is necessary for the target clean which will erase the
|
||||
# directories where the buildtimes are stored.
|
||||
REPORT_BUILD_TIMES=1
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
|
||||
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
$(MKDIR) -p $(BUILDTIMESDIR)
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
|
||||
endef
|
||||
|
||||
# Indicate that we started to build a sub repository and record starting time.
|
||||
define MakeStart
|
||||
$(call RecordStartTime,$1)
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n\n" \
|
||||
"########################################################################" \
|
||||
"########################################################################" \
|
||||
"Entering $1 for target(s) $2" \
|
||||
"########################################################################"
|
||||
endef
|
||||
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# easy to read format. Handles builds that cross midnight. Expects
|
||||
# that a build will never take 24 hours or more.
|
||||
define RecordEndTime
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
|
||||
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
|
||||
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
|
||||
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
|
||||
> $(BUILDTIMESDIR)/build_time_diff_$1
|
||||
endef
|
||||
|
||||
# Check if the current target is the final target, as specified by
|
||||
# the user on the command line. If so, call PrintEndMessage.
|
||||
define CheckIfFinished
|
||||
$(if $(filter $@,$(MAKECMDGOALS)),$(call PrintEndMessage))
|
||||
# If no taget is given, "all" is default. Check for that, too.
|
||||
# At most one of the tests can be true.
|
||||
$(if $(MAKECMDGOALS),,$(if $(filter $@,all),$(call PrintEndMessage)))
|
||||
endef
|
||||
|
||||
# Indicate that we are done.
|
||||
# Record ending time and print out the total time it took to build.
|
||||
define MakeFinish
|
||||
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,$1),)
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "%s\n##### %-60.60s #####\n%s\n##### %-60.60s #####\n%s\n\n" \
|
||||
"########################################################################" \
|
||||
"Leaving $1 for target(s) $2" \
|
||||
"########################################################################" \
|
||||
$(if $(REPORT_BUILD_TIMES),"Build time `$(CAT) $(BUILDTIMESDIR)/build_time_diff_$1` for target(s) $2","") \
|
||||
"########################################################################"
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
"$1" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
|
||||
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
|
||||
endef
|
||||
|
||||
define ResetTimers
|
||||
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
|
||||
endef
|
||||
|
||||
define StartTimer
|
||||
$(call RecordStartTime,TOTAL)
|
||||
endef
|
||||
|
||||
define StopTimer
|
||||
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very first thing when running a normal build
|
||||
define AtRootMakeStart
|
||||
$(if $(findstring -j,$(MAKEFLAGS)), $(error make -j is not supported, use make JOBS=n))
|
||||
$(call PrintStartMessage)
|
||||
$(call StartTimer)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very last thing for targets that are "top level" targets
|
||||
define AtRootMakeEnd
|
||||
$(call StopTimer)
|
||||
$(call CheckIfFinished)
|
||||
endef
|
||||
|
||||
# If the variable that you want to send to stdout for piping into a file or otherwise,
|
||||
# is potentially long, for example the a list of file paths, eg a list of all package directories.
|
||||
# Then you need to use ListPathsSafely, which optimistically splits the output into several shell
|
||||
# calls as well as use compression on recurrent file paths segments, to get around the potential
|
||||
# command line length problem that exists in cygwin and other shells.
|
||||
compress_pre:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.pre))
|
||||
compress_post:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.post))
|
||||
compress_pre:=$(strip $(shell $(CAT) $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-pre-compress.incl))
|
||||
compress_post:=$(strip $(shell $(CAT) $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-post-compress.incl))
|
||||
compress_paths=$(compress_pre)\
|
||||
$(subst $(SRC_ROOT),X97,\
|
||||
$(subst $(OUTPUT_ROOT),X98,\
|
||||
@@ -163,7 +47,7 @@ $(subst X,X00,\
|
||||
$(subst $(SPACE),\n,$(strip $1)))))\
|
||||
$(compress_post)
|
||||
|
||||
decompress_paths=sed -f $(SRC_ROOT)/common/makefiles/uncompress.sed -e 's|X99|\\n|g' \
|
||||
decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
|
||||
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
|
||||
-e 's|X00|X|g' | tr '\n' '$2'
|
||||
|
||||
@@ -384,14 +268,67 @@ $(ECHO) $1/$(HGTIP_FILENAME)
|
||||
endef
|
||||
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
ifeq ($$(LOG), trace)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
# For each target executed, will print
|
||||
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
|
||||
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin).
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL)
|
||||
SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
|
||||
endif
|
||||
# Never remove warning messages; this is just for completeness
|
||||
LOG_WARN=
|
||||
ifneq ($$(findstring $$(LOG),info debug trace),)
|
||||
LOG_INFO=
|
||||
else
|
||||
LOG_INFO=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG),debug trace),)
|
||||
LOG_DEBUG=
|
||||
else
|
||||
LOG_DEBUG=> /dev/null
|
||||
endif
|
||||
ifneq ($$(findstring $$(LOG),trace),)
|
||||
LOG_TRACE=
|
||||
else
|
||||
LOG_TRACE=> /dev/null
|
||||
endif
|
||||
endef
|
||||
|
||||
# Make sure logging is setup for everyone that includes MakeBase.gmk.
|
||||
$(eval $(call SetupLogging))
|
||||
|
||||
# This is to be called by all SetupFoo macros
|
||||
define LogSetupMacroEntry
|
||||
$(if $(26),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
|
||||
$(if $(findstring $(LOG),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
|
||||
endef
|
||||
|
||||
# Make directory without forking mkdir if not needed
|
||||
define MakeDir
|
||||
ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
|
||||
$$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)
|
||||
endif
|
||||
endef
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) '$@'
|
||||
$(CP) -f -r -P '$<' '$(@D)'
|
||||
endef
|
||||
else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -fpRP '$<' '$@'
|
||||
endef
|
||||
else
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(CP) -fP '$<' '$@'
|
||||
endef
|
||||
endif
|
||||
|
||||
endif # _MAKEBASE_GMK
|
||||
|
||||
@@ -45,33 +45,166 @@ MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VA
|
||||
list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
|
||||
list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
|
||||
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
|
||||
|
||||
# Global targets are possible to run either with or without a SPEC. The prototypical
|
||||
# global target is "help".
|
||||
global_targets=help configure
|
||||
|
||||
##############################
|
||||
# Functions
|
||||
##############################
|
||||
|
||||
define fatal-error
|
||||
define CheckEnvironment
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
|
||||
@$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
|
||||
@$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
|
||||
)
|
||||
endef
|
||||
|
||||
### Functions for timers
|
||||
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
$(MKDIR) -p $(BUILDTIMESDIR)
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
|
||||
endef
|
||||
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# easy to read format. Handles builds that cross midnight. Expects
|
||||
# that a build will never take 24 hours or more.
|
||||
define RecordEndTime
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
|
||||
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
|
||||
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
|
||||
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
|
||||
> $(BUILDTIMESDIR)/build_time_diff_$1
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
|
||||
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
|
||||
endef
|
||||
|
||||
define ResetAllTimers
|
||||
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
|
||||
endef
|
||||
|
||||
define StartGlobalTimer
|
||||
$(call RecordStartTime,TOTAL)
|
||||
endef
|
||||
|
||||
define StopGlobalTimer
|
||||
$(call RecordEndTime,TOTAL)
|
||||
endef
|
||||
|
||||
### Functions for managing makefile structure (start/end of makefile and individual targets)
|
||||
|
||||
# Do not indent this function, this will add whitespace at the start which the caller won't handle
|
||||
define GetRealTarget
|
||||
$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),all))
|
||||
endef
|
||||
|
||||
# Do not indent this function, this will add whitespace at the start which the caller won't handle
|
||||
define LastGoal
|
||||
$(strip $(lastword $(call GetRealTarget)))
|
||||
endef
|
||||
|
||||
# Check if the current target is the final target, as specified by
|
||||
# the user on the command line. If so, call AtRootMakeEnd.
|
||||
define CheckIfMakeAtEnd
|
||||
# Check if the current target is the last goal
|
||||
$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If the target is 'foo-only', check if our goal was stated as 'foo'
|
||||
$(if $(filter $(patsubst %-only,%,$@),$(call LastGoal)),$(call AtMakeEnd))
|
||||
# If no goal is given, 'all' is default, but the last target executed for all is 'jdk-only'. Check for that, too.
|
||||
# At most one of the tests can be true.
|
||||
$(if $(subst all,,$(call LastGoal)),,$(if $(filter $@,jdk-only),$(call AtMakeEnd)))
|
||||
endef
|
||||
|
||||
# Hook to be called when starting to execute a top-level target
|
||||
define TargetEnter
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
|
||||
$(call RecordStartTime,$(patsubst %-only,%,$@))
|
||||
endef
|
||||
|
||||
# Hook to be called when finish executing a top-level target
|
||||
define TargetExit
|
||||
$(call RecordEndTime,$(patsubst %-only,%,$@))
|
||||
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d " "`"
|
||||
$(call CheckIfMakeAtEnd)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very first thing when running a normal build
|
||||
define AtMakeStart
|
||||
$(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
|
||||
$(call CheckEnvironment)
|
||||
@$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n"
|
||||
@$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n"
|
||||
$(call StartGlobalTimer)
|
||||
endef
|
||||
|
||||
# Hook to be called as the very last thing for targets that are "top level" targets
|
||||
define AtMakeEnd
|
||||
$(if $(SJAVAC_SERVER_DIR),@$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
|
||||
$(call StopGlobalTimer)
|
||||
$(call ReportBuildTimes)
|
||||
@$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
|
||||
$(call CheckEnvironment)
|
||||
endef
|
||||
|
||||
### Functions for parsing and setting up make options from command-line
|
||||
|
||||
define FatalError
|
||||
# If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
|
||||
$$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
|
||||
$$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue))
|
||||
endef
|
||||
|
||||
define ParseLogLevel
|
||||
ifeq ($$(origin VERBOSE),undefined)
|
||||
# Setup logging according to LOG (but only if VERBOSE is not given)
|
||||
|
||||
# If the "nofile" argument is given, act on it and strip it away
|
||||
ifneq ($$(findstring nofile,$$(LOG)),)
|
||||
# Reset the build log wrapper, regardless of other values
|
||||
override BUILD_LOG_WRAPPER=
|
||||
# COMMA is defined in spec.gmk, but that is not included yet
|
||||
COMMA=,
|
||||
# First try to remove ",nofile" if it exists
|
||||
LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
|
||||
# Otherwise just remove "nofile"
|
||||
LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
|
||||
# We might have ended up with a leading comma. Remove it
|
||||
LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
|
||||
override LOG:=$$(LOG_STRIPPED3)
|
||||
endif
|
||||
|
||||
ifeq ($$(LOG),)
|
||||
# Set LOG to "warn" as default if not set (and no VERBOSE given)
|
||||
LOG=warn
|
||||
override LOG=warn
|
||||
endif
|
||||
ifeq ($$(LOG),warn)
|
||||
VERBOSE=-s
|
||||
else ifeq ($$(LOG),info)
|
||||
VERBOSE=
|
||||
VERBOSE=-s
|
||||
else ifeq ($$(LOG),debug)
|
||||
VERBOSE=
|
||||
else ifeq ($$(LOG),trace)
|
||||
VERBOSE=-d -p
|
||||
VERBOSE=
|
||||
else
|
||||
$$(info Error: LOG must be one of: warn, info, debug or trace.)
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
else
|
||||
ifneq ($$(LOG),)
|
||||
@@ -79,34 +212,27 @@ define ParseLogLevel
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
# TODO: Fix duplication in MakeBase.gmk
|
||||
define SetupLogging
|
||||
ifneq ($(findstring $(LOG),debug trace),)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
OLD_SHELL:=$$(SHELL)
|
||||
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
|
||||
endif
|
||||
endef
|
||||
|
||||
define ParseConfAndSpec
|
||||
ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
|
||||
# If we only have global targets, no need to bother with SPEC or CONF
|
||||
ifneq ($$(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
endif
|
||||
# ... OK, we're satisfied, we'll use this SPEC later on
|
||||
@@ -116,7 +242,7 @@ define ParseConfAndSpec
|
||||
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
|
||||
ifeq ($$(all_spec_files),)
|
||||
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
# Extract the configuration names from the path
|
||||
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
|
||||
@@ -134,12 +260,12 @@ define ParseConfAndSpec
|
||||
$$(info No configurations found matching CONF=$$(CONF))
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(eval $$(call FatalError))
|
||||
else
|
||||
ifeq ($$(words $$(matching_confs)),1)
|
||||
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
|
||||
else
|
||||
$$(info Building the following configurations (matching CONF=$$(CONF)):)
|
||||
$$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
|
||||
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
|
||||
endif
|
||||
endif
|
||||
@@ -149,37 +275,27 @@ define ParseConfAndSpec
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($$(words $$(all_spec_files)),1)
|
||||
$$(info No CONF or SPEC given, but more than one spec.gmk found in $$(output_dir).)
|
||||
$$(info No CONF given, but more than one configuration found in $$(output_dir).)
|
||||
$$(info Available configurations:)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(info Please retry building with CONF=<config> or SPEC=<specfile>)
|
||||
$$(eval $$(call fatal-error))
|
||||
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
|
||||
# We found exactly one configuration, use it
|
||||
SPEC=$$(strip $$(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define CheckEnvironment
|
||||
# Find all environment or command line variables that begin with ALT.
|
||||
$(if $(list_alt_overrides),
|
||||
@$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
|
||||
@$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
|
||||
@$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
|
||||
)
|
||||
endef
|
||||
### Convenience functions from Main.gmk
|
||||
|
||||
define PrintStartMessage
|
||||
$(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
|
||||
$(call CheckEnvironment)
|
||||
@$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
|
||||
endef
|
||||
|
||||
define PrintEndMessage
|
||||
@$(ECHO) "Finished building OpenJDK for target '$@'"
|
||||
$(call CheckEnvironment)
|
||||
# Cleans the component given as $1
|
||||
define CleanComponent
|
||||
@$(PRINTF) "Cleaning $1 build artifacts ..."
|
||||
@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
endif # _MAKEHELPERS_GMK
|
||||
|
||||
@@ -24,7 +24,23 @@
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
all:
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j. Recursively called makefiles will not be
|
||||
# affected, however. This is required for correct dependency management.
|
||||
.NOTPARALLEL:
|
||||
|
||||
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
|
||||
# /usr/ccs/bin/make lacks basically every other flow control mechanism.
|
||||
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
|
||||
|
||||
# Assume we have GNU make, but check version.
|
||||
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
|
||||
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
|
||||
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Locate this Makefile
|
||||
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
@@ -38,156 +54,32 @@ root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
|
||||
include $(dir $(makefile_path))/MakeHelpers.gmk
|
||||
|
||||
$(eval $(call ParseLogLevel))
|
||||
$(eval $(call SetupLogging))
|
||||
$(eval $(call ParseConfAndSpec))
|
||||
|
||||
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
|
||||
# hence this workaround.
|
||||
ifeq ($(JOBS),)
|
||||
JOBS=$(NUM_CORES)
|
||||
endif
|
||||
|
||||
ifneq ($(words $(SPEC)),1)
|
||||
### We have multiple configurations to build, call make repeatedly
|
||||
all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean:
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@ $(MAKE_ARGS)) &&) true
|
||||
|
||||
.PHONY: all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean
|
||||
|
||||
# Now determine if we have zero, one or several configurations to build.
|
||||
ifeq ($(SPEC),)
|
||||
# Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
|
||||
else
|
||||
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
|
||||
|
||||
# Now load the spec
|
||||
include $(SPEC)
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
|
||||
|
||||
### Clean up from previous run
|
||||
|
||||
# Remove any build.log from a previous run, if they exist
|
||||
ifneq (,$(BUILD_LOG))
|
||||
ifneq (,$(BUILD_LOG_PREVIOUS))
|
||||
# Rotate old log
|
||||
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
|
||||
ifeq ($(words $(SPEC)),1)
|
||||
# We are building a single configuration. This is the normal case. Execute the Main.gmk file.
|
||||
include $(dir $(makefile_path))/Main.gmk
|
||||
else
|
||||
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
|
||||
# We are building multiple configurations.
|
||||
# First, find out the valid targets
|
||||
# Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
|
||||
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
|
||||
all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
|
||||
$(MAKE) -p -q -f $(makefile_path) SPEC=$(firstword $(SPEC)) | \
|
||||
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
|
||||
|
||||
$(all_phony_targets):
|
||||
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true
|
||||
|
||||
endif
|
||||
endif
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
ifneq (,$(JAVAC_SERVERS))
|
||||
$(shell mkdir -p $(JAVAC_SERVERS) && rm -rf $(JAVAC_SERVERS)/*)
|
||||
endif
|
||||
# Clean out any notifications from the previous build.
|
||||
$(shell find $(OUTPUT_ROOT) -name "_the.*.notify" $(FIND_DELETE))
|
||||
|
||||
# Reset the build timers.
|
||||
$(eval $(call ResetTimers))
|
||||
|
||||
### Main targets
|
||||
|
||||
all: jdk
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
langtools: start-make langtools-only
|
||||
langtools-only:
|
||||
@$(call MakeStart,langtools,all)
|
||||
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,langtools,all)
|
||||
|
||||
corba: langtools corba-only
|
||||
corba-only:
|
||||
@$(call MakeStart,corba,all)
|
||||
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,corba,all)
|
||||
|
||||
jaxp: langtools jaxp-only
|
||||
jaxp-only:
|
||||
@$(call MakeStart,jaxp,all)
|
||||
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxp,all)
|
||||
|
||||
jaxws: langtools jaxp jaxws-only
|
||||
jaxws-only:
|
||||
@$(call MakeStart,jaxws,all)
|
||||
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jaxws,all)
|
||||
|
||||
hotspot: langtools hotspot-only
|
||||
hotspot-only:
|
||||
@$(call MakeStart,hotspot,all)
|
||||
@($(CD) $(HOTSPOT_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,hotspot,all)
|
||||
|
||||
jdk: langtools corba jaxp jaxws hotspot jdk-only
|
||||
jdk-only:
|
||||
@$(call MakeStart,jdk,all)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
|
||||
@$(call MakeFinish,jdk,all)
|
||||
|
||||
images: source-tips start-make jdk langtools corba jaxp jaxws hotspot images-only
|
||||
images-only:
|
||||
@$(call MakeStart,jdk-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) images)
|
||||
@$(call MakeFinish,jdk-images,$@)
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
install: source-tips start-make jdk langtools corba jaxp jaxws hotspot install-only
|
||||
install-only:
|
||||
@$(call MakeStart,jdk-images,$@)
|
||||
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) install)
|
||||
@$(call MakeFinish,jdk-images,$@)
|
||||
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
|
||||
@$(call AtRootMakeEnd)
|
||||
|
||||
start-make:
|
||||
@$(call AtRootMakeStart)
|
||||
|
||||
.PHONY: jdk hotspot jaxws jaxp corba langtools install images start-make
|
||||
|
||||
test: start-make
|
||||
@$(call MakeStart,test,$(if $(TEST),$(TEST),all))
|
||||
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
|
||||
@$(call MakeFinish,test,$(if $(TEST),$(TEST),all))
|
||||
@$(call AtRootMakeEnd)
|
||||
.PHONY: test
|
||||
|
||||
|
||||
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
|
||||
# used to track the exact sources used to build that image.
|
||||
source-tips: $(OUTPUT_ROOT)/source_tips
|
||||
$(OUTPUT_ROOT)/source_tips: FRC
|
||||
@$(MKDIR) -p $(@D)
|
||||
@$(RM) $@
|
||||
@$(call GetSourceTips)
|
||||
|
||||
|
||||
# Remove everything, except the output from configure.
|
||||
clean:
|
||||
@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | grep -v "localdevenv.*" | grep -v uncygdrive.exe`)
|
||||
@$(ECHO) Cleaned everything except the build configuration.
|
||||
.PHONY: clean
|
||||
|
||||
# Remove everything, you have to rerun configure.
|
||||
dist-clean:
|
||||
@$(RM) -r $(OUTPUT_ROOT)
|
||||
@$(ECHO) Cleaned everything, you will have to re-run configure.
|
||||
.PHONY: dist-clean
|
||||
|
||||
clean-jdk:
|
||||
@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | \
|
||||
grep -v langtools | grep -v corba | grep -v jaxp | grep -v jaxws | grep -v hotspot`)
|
||||
@$(ECHO) "Cleaned jdk build artifacts (but not langtools,corba,jaxp,jaxws,hotspot nor the build configuration)"
|
||||
.PHONY: clean
|
||||
|
||||
endif
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
|
||||
# If you addd more global targets, please update the fatal-error macro.
|
||||
# If you addd more global targets, please update the variable global_targets in MakeHelpers.
|
||||
|
||||
help:
|
||||
$(info )
|
||||
@@ -197,22 +89,43 @@ help:
|
||||
$(info Common make targets)
|
||||
$(info . make [all] # Compile all code but do not create images)
|
||||
$(info . make images # Create complete j2sdk and j2re images)
|
||||
$(info . make overlay-images # Create limited images for sparc 64 bit platforms)
|
||||
$(info . make bootcycle-images # Build images twice, second time with newly build JDK)
|
||||
$(info . make install # Install the generated images locally)
|
||||
$(info . make clean # Remove all files generated by make, but not those generated by configure)
|
||||
$(info . make dist-clean # Remove all files generated by both make and configure)
|
||||
$(info . make clean # Remove all files generated by make, but not those)
|
||||
$(info . # generated by configure)
|
||||
$(info . make dist-clean # Remove all files, including configuration)
|
||||
$(info . make help # Give some help on using make)
|
||||
$(info . make test # Run tests, default is all tests (see TEST below))
|
||||
$(info )
|
||||
$(info Targets for specific components)
|
||||
$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
|
||||
$(info . make <component> # Build <component> and everything it depends on. )
|
||||
$(info . make <component>-only # Build <component> only, without dependencies. This)
|
||||
$(info . # is faster but can result in incorrect build results!)
|
||||
$(info . make clean-<component> # Remove files generated by make for <component>)
|
||||
$(info )
|
||||
$(info Useful make variables)
|
||||
$(info . make CONF= # Build all configurations (note, assignment is empty))
|
||||
$(info . make CONF=<substring> # Build the configuration(s) with a name matching the given substring)
|
||||
$(info . make CONF=<substring> # Build the configuration(s) with a name matching)
|
||||
$(info . # <substring>)
|
||||
$(info )
|
||||
$(info . make LOG=<loglevel> # Change loglevel from warn (default) to the given loglevel)
|
||||
$(info . # Available loglevels are: warn, info, debug and trace)
|
||||
$(info . # To see executed command lines, use LOG=info)
|
||||
$(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>)
|
||||
$(info . # Available log levels are:)
|
||||
$(info . # 'warn' (default), 'info', 'debug' and 'trace')
|
||||
$(info . # To see executed command lines, use LOG=debug)
|
||||
$(info )
|
||||
$(info . make JOBS=<n> # Run <n> parallel make jobs)
|
||||
$(info . # Note that -jN does not work as expected!)
|
||||
$(info )
|
||||
$(info . make test TEST=<test> # Only run the given test or tests, e.g.)
|
||||
$(info . # make test TEST="jdk_lang jdk_net")
|
||||
$(info )
|
||||
.PHONY: help
|
||||
FRC: # Force target
|
||||
|
||||
configure:
|
||||
@$(SHELL) $(root_dir)/configure $(CONFIGURE_ARGS)
|
||||
@echo ====================================================
|
||||
@echo "Note: This is a non-recommended way of running configure."
|
||||
@echo "Instead, run 'sh configure' in the top-level directory"
|
||||
|
||||
.PHONY: help configure
|
||||
|
||||
@@ -32,10 +32,10 @@ ifeq (,$(_MAKEBASE_GMK))
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
COMPILING_MSG=echo Compiling $1
|
||||
LINKING_MSG=echo Linking $1
|
||||
LINKING_EXE_MSG=echo Linking executable $1
|
||||
ARCHIVING_MSG=echo Archiving $1
|
||||
COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
|
||||
LINKING_MSG=echo $(LOG_INFO) "Linking $1"
|
||||
LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
|
||||
ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
|
||||
else
|
||||
COMPILING_MSG=
|
||||
LINKING_MSG=
|
||||
@@ -55,22 +55,22 @@ define add_native_source
|
||||
|
||||
ifneq (,$$(filter %.c,$2))
|
||||
# Compile as a C file
|
||||
$1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -c
|
||||
$1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else ifneq (,$$(filter %.m,$2))
|
||||
# Compile as a objective-c file
|
||||
$1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -c
|
||||
$1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
|
||||
$1_$2_COMP=$5
|
||||
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
|
||||
else ifneq (,$$(filter %.s,$2))
|
||||
# Compile as assembler file
|
||||
$1_$2_FLAGS=$8
|
||||
$1_$2_FLAGS=$8 -DTHIS_FILE='"$$(<F)"'
|
||||
$1_$2_COMP=$(AS)
|
||||
$1_$2_DEP_FLAG:=
|
||||
else
|
||||
# Compile as a C++ file
|
||||
$1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -c
|
||||
$1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
|
||||
$1_$2_COMP=$7
|
||||
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
|
||||
endif
|
||||
@@ -94,11 +94,10 @@ define add_native_source
|
||||
|
||||
$$($1_$2_OBJ) : $2
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
$$(call COMPILING_MSG,$$(notdir $2))
|
||||
$$(call COMPILING_MSG,$2,$$($1_TARGET))
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
|
||||
endif
|
||||
ifeq ($(COMPILER_TYPE),CL)
|
||||
$$(call COMPILING_MSG,$$(notdir $2))
|
||||
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
|
||||
endif
|
||||
endif
|
||||
@@ -129,27 +128,10 @@ define SetupNativeCompilation
|
||||
# DEBUG_SYMBOLS add debug symbols (if configured on)
|
||||
# CC the compiler to use, default is $(CC)
|
||||
# LDEXE the linker to use for linking executables, default is $(LDEXE)
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$1_$(strip $(10)))
|
||||
$(if $(11),$1_$(strip $(11)))
|
||||
$(if $(12),$1_$(strip $(12)))
|
||||
$(if $(13),$1_$(strip $(13)))
|
||||
$(if $(14),$1_$(strip $(14)))
|
||||
$(if $(15),$1_$(strip $(15)))
|
||||
$(if $(16),$1_$(strip $(16)))
|
||||
$(if $(17),$1_$(strip $(17)))
|
||||
$(if $(18),$1_$(strip $(18)))
|
||||
$(if $(19),$1_$(strip $(19)))
|
||||
$(if $(20),$1_$(strip $(20)))
|
||||
$(if $(21),$1_$(strip $(21)))
|
||||
$(if $(22),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
|
||||
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25))
|
||||
$(if $(26),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
|
||||
|
||||
ifneq (,$$($1_BIN))
|
||||
$$(error BIN has been replaced with OBJECT_DIR)
|
||||
@@ -250,9 +232,11 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
# Make sure the dirs exist.
|
||||
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
|
||||
$$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
|
||||
|
||||
# Find all files in the source trees. Sort to remove duplicates.
|
||||
$1_ALL_SRCS := $$(sort $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f)))
|
||||
$1_ALL_SRCS := $$(sort $$(shell $(FIND) $$($1_SRC) -type f))
|
||||
# Extract the C/C++ files.
|
||||
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
|
||||
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
|
||||
@@ -287,7 +271,9 @@ define SetupNativeCompilation
|
||||
# Are there too many object files on disk? Perhaps because some source file was removed?
|
||||
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
|
||||
# Clean out the superfluous object files.
|
||||
ifneq ($$($1_SUPERFLUOUS_OBJS),)
|
||||
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
|
||||
$1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
|
||||
@@ -315,6 +301,17 @@ define SetupNativeCompilation
|
||||
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
|
||||
endif
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
|
||||
# Programs don't get the debug symbols added in the old build. It's not clear if
|
||||
# this is intentional.
|
||||
ifeq ($$($1_PROGRAM),)
|
||||
$1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_CXXFLAGS),)
|
||||
$1_CXXFLAGS:=$$($1_CFLAGS)
|
||||
endif
|
||||
@@ -327,47 +324,22 @@ define SetupNativeCompilation
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
|
||||
endif
|
||||
|
||||
ifneq (no, $(ENABLE_DEBUG_SYMBOLS))
|
||||
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# <weird code />
|
||||
# There is very weird code in Defs-solaris.gmk that first sets variables as decribed below
|
||||
# and then a couple of hundreds of line below resets them...
|
||||
# this feels like a sure bug...but before this is confirmed, mimic this behaviour
|
||||
# (note: skip indenting this as it will surely be removed anyway)
|
||||
# <weird code />
|
||||
|
||||
ifneq (,$$($1_DEBUG_SYMBOLS))
|
||||
$1_OPTIMIZATION := LOW
|
||||
$1_EXTRA_CFLAGS += $(CFLAGS_DEBUG_SYMBOLS)
|
||||
$1_EXTRA_CXXFLAGS += $(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
endif
|
||||
|
||||
# <weird code />
|
||||
endif
|
||||
# <weird code />
|
||||
endif
|
||||
|
||||
ifeq (NONE, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_NONE)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NONE)
|
||||
$1_EXTRA_CFLAGS += $(C_O_FLAG_NONE)
|
||||
$1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE)
|
||||
else ifeq (LOW, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_NORM)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NORM)
|
||||
$1_EXTRA_CFLAGS += $(C_O_FLAG_NORM)
|
||||
$1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NORM)
|
||||
else ifeq (HIGH, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_HI)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HI)
|
||||
$1_EXTRA_CFLAGS += $(C_O_FLAG_HI)
|
||||
$1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HI)
|
||||
else ifeq (HIGHEST, $$($1_OPTIMIZATION))
|
||||
$1_EXTRA_CFLAGS += $$(C_O_FLAG_HIGHEST)
|
||||
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HIGHEST)
|
||||
$1_EXTRA_CFLAGS += $(C_O_FLAG_HIGHEST)
|
||||
$1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HIGHEST)
|
||||
else ifneq (, $$($1_OPTIMIZATION))
|
||||
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
|
||||
endif
|
||||
|
||||
# Now create a list of the packages that are about to compile. Used when sending source
|
||||
# in a batch to the compiler.
|
||||
$$(shell $(RM) $$($1_OBJECT_DIR)/_the.list_of_sources)
|
||||
$$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_OBJECT_DIR)/_the.list_of_sources))
|
||||
|
||||
# Now call add_native_source for each source file we are going to compile.
|
||||
$$(foreach p,$$($1_SRCS),\
|
||||
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\
|
||||
@@ -375,7 +347,7 @@ define SetupNativeCompilation
|
||||
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
|
||||
|
||||
# On windows we need to create a resource file
|
||||
ifeq ($(OPENJDK_TARGET_OS_API), winapi)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifneq (,$$($1_VERSIONINFO_RESOURCE))
|
||||
$1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
|
||||
$$($1_RES): $$($1_VERSIONINFO_RESOURCE)
|
||||
@@ -390,8 +362,6 @@ define SetupNativeCompilation
|
||||
endif
|
||||
|
||||
# mapfile doesnt seem to be implemented on macosx (yet??)
|
||||
ifneq ($(OPENJDK_TARGET_CPU),ppc)
|
||||
ifneq ($(OPENJDK_TARGET_CPU),arm)
|
||||
ifneq ($(OPENJDK_TARGET_OS),macosx)
|
||||
ifneq ($(OPENJDK_TARGET_OS),windows)
|
||||
$1_REAL_MAPFILE:=$$($1_MAPFILE)
|
||||
@@ -406,11 +376,9 @@ define SetupNativeCompilation
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_API dependent variables (posix or winapi) and
|
||||
# (linux,solaris,windows,bsd) for LDFLAGS and LDFLAGS_SUFFIX
|
||||
# Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
|
||||
# for LDFLAGS and LDFLAGS_SUFFIX
|
||||
$1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
|
||||
$1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
|
||||
ifneq (,$$($1_REAL_MAPFILE))
|
||||
@@ -432,9 +400,10 @@ define SetupNativeCompilation
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
|
||||
endif
|
||||
|
||||
ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
|
||||
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
|
||||
$(CP) $$< $$@
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
@@ -449,9 +418,9 @@ define SetupNativeCompilation
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
@@ -509,8 +478,10 @@ define SetupNativeCompilation
|
||||
"-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
|
||||
endif
|
||||
|
||||
ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
|
||||
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
|
||||
$(CP) $$< $$@
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
|
||||
@@ -525,9 +496,9 @@ define SetupNativeCompilation
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
|
||||
$(RM) $$@
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $$<
|
||||
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
|
||||
$(OBJCOPY) --only-keep-debug $$< $$@
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
|
||||
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
|
||||
else # not solaris
|
||||
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
|
||||
$(RM) $$@
|
||||
@@ -566,7 +537,7 @@ define SetupNativeCompilation
|
||||
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
|
||||
$$($1_EXTRA_LDFLAGS_SUFFIX)
|
||||
ifneq (,$$($1_GEN_MANIFEST))
|
||||
$(MT) -nologo /manifest $$($1_GEN_MANIFEST) /outputresource:$$@;#1
|
||||
$(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
@@ -34,16 +34,9 @@ define SetupRMICompilation
|
||||
# RUN_IIOP:=Set to run rmic with -iiop
|
||||
# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
|
||||
# KEEP_GENERATED:=Set to keep generated sources around
|
||||
$(if $2,$1_$(strip $2))
|
||||
$(if $3,$1_$(strip $3))
|
||||
$(if $4,$1_$(strip $4))
|
||||
$(if $5,$1_$(strip $5))
|
||||
$(if $6,$1_$(strip $6))
|
||||
$(if $7,$1_$(strip $7))
|
||||
$(if $8,$1_$(strip $8))
|
||||
$(if $9,$1_$(strip $9))
|
||||
$(if $(10),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
|
||||
|
||||
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
||||
$(call LogSetupMacroEntry,SetupRMICompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
|
||||
|
||||
$1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
|
||||
|
||||
@@ -86,12 +79,12 @@ define SetupRMICompilation
|
||||
$$($1_DEP_FILE): $$($1_CLASS_FILES)
|
||||
$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
|
||||
if [ "x$$($1_ARGS)" != "x" ]; then \
|
||||
$(ECHO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
fi;
|
||||
if [ "x$$($1_ARGS2)" != "x" ]; then \
|
||||
$(ECHO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
|
||||
fi;
|
||||
|
||||
@@ -22,21 +22,98 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
.SUFFIXES: # Delete the default suffixes
|
||||
.SUFFIXES: .java
|
||||
|
||||
#
|
||||
# Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc.
|
||||
#
|
||||
BUILDDIR=..
|
||||
PRODUCT=docs
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
# Get CopyrightLine macro and other shared variables
|
||||
include $(BUILDDIR)/common/shared/Defs-javadoc.gmk
|
||||
CLASSPATH_SEPARATOR = :
|
||||
|
||||
DOCSDIR=$(OUTPUT_ROOT)/docs
|
||||
TEMPDIR=$(OUTPUT_ROOT)/docstemp
|
||||
|
||||
JDK_SHARE_SRC=$(JDK_TOPDIR)/src/share
|
||||
JDK_SHARE_CLASSES=$(JDK_SHARE_SRC)/classes
|
||||
|
||||
JDK_IMPSRC = $(JDK_OUTPUTDIR)/impsrc
|
||||
|
||||
JDK_GENSRC = $(JDK_OUTPUTDIR)/gensrc
|
||||
|
||||
HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
|
||||
|
||||
BUILD_NUMBER=$(JDK_BUILD_NUMBER)
|
||||
|
||||
BOOT_JAVA_CMD=$(JAVA)
|
||||
|
||||
# Langtools
|
||||
JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
|
||||
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
|
||||
DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
|
||||
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
|
||||
-Xmx1024m \
|
||||
-Djava.awt.headless=true \
|
||||
"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
|
||||
-jar $(JAVADOC_JAR)
|
||||
|
||||
JAVADOC_CMD = javadoc
|
||||
|
||||
# Copyright year for beginning of Java and some of the apis
|
||||
# (Needed when creating the javadocs)
|
||||
FIRST_COPYRIGHT_YEAR = 1993
|
||||
DOMAPI_FIRST_COPYRIGHT_YEAR = 2005
|
||||
MIRROR_FIRST_COPYRIGHT_YEAR = 2004
|
||||
DOCLETAPI_FIRST_COPYRIGHT_YEAR = 1993
|
||||
TAGLETAPI_FIRST_COPYRIGHT_YEAR = 1993
|
||||
JDI_FIRST_COPYRIGHT_YEAR = 1999
|
||||
JAAS_FIRST_COPYRIGHT_YEAR = 1998
|
||||
JGSS_FIRST_COPYRIGHT_YEAR = 2000
|
||||
SMARTCARDIO_FIRST_COPYRIGHT_YEAR = 2005
|
||||
HTTPSERVER_FIRST_COPYRIGHT_YEAR = 2005
|
||||
MGMT_FIRST_COPYRIGHT_YEAR = 2003
|
||||
ATTACH_FIRST_COPYRIGHT_YEAR = 2005
|
||||
JCONSOLE_FIRST_COPYRIGHT_YEAR = 2006
|
||||
SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009
|
||||
TRACING_FIRST_COPYRIGHT_YEAR = 2008
|
||||
TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
|
||||
JNLP_FIRST_COPYRIGHT_YEAR = 1998
|
||||
PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
|
||||
|
||||
# Oracle name
|
||||
FULL_COMPANY_NAME = Oracle and/or its affiliates
|
||||
|
||||
# Copyright address
|
||||
COMPANY_ADDRESS = 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA.
|
||||
|
||||
# The trademark symbol
|
||||
TRADEMARK = ™
|
||||
|
||||
# Common copyright lines used
|
||||
# The word "Copyright" might optionally be a link to the file cpyr.html.
|
||||
# The first year of copyright may vary or not be available.
|
||||
# The address to the company might be optional.
|
||||
COMMA:= ,
|
||||
EMPTY:=
|
||||
SPACE:=$(EMPTY) $(EMPTY)
|
||||
COPYRIGHT_SYMBOL = &\#x00a9;
|
||||
# Macro to construct the copyright line
|
||||
# (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
|
||||
define CopyrightLine # optionalurl optionalfirstyear optionaladdress
|
||||
$(if $(strip $1),<a href="$(strip $1)">Copyright</a>,Copyright) \
|
||||
$(COPYRIGHT_SYMBOL) $(if $2,$2${COMMA},) $(COPYRIGHT_YEAR),\
|
||||
$(FULL_COMPANY_NAME). $3 All rights reserved.
|
||||
endef
|
||||
|
||||
# Url to root of documents
|
||||
DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)
|
||||
|
||||
# Url to copyright html file
|
||||
COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.html
|
||||
COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))
|
||||
|
||||
# Url to bug filing site
|
||||
@@ -47,46 +124,30 @@ BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
|
||||
|
||||
# Url to devdocs page
|
||||
# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
|
||||
DEV_DOCS_URL-5 = http://java.sun.com/j2se/1.5.0/docs/index.html
|
||||
DEV_DOCS_URL-6 = http://download.oracle.com/javase/6/docs/index.html
|
||||
DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
|
||||
DEV_DOCS_URL-8 = http://download.oracle.com/javase/7/docs/index.html
|
||||
DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
|
||||
DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
|
||||
|
||||
# Url to Java Language Spec
|
||||
#JLS3_URL = http://java.sun.com/docs/books/jls/
|
||||
|
||||
# Common Java trademark line
|
||||
JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \
|
||||
$(FULL_COMPANY_NAME) in the US and other countries.
|
||||
|
||||
#
|
||||
# Definitions for imported components
|
||||
#
|
||||
include $(BUILDDIR)/common/internal/ImportComponents.gmk
|
||||
#################################################################
|
||||
# Macros:
|
||||
|
||||
# We override whatever the max VM memory setting is here.
|
||||
# NOTE: javadoc will not complete without these larger settings.
|
||||
# WARNING: This could cause thrashing on low memory machines.
|
||||
ifeq ($(ARCH_DATA_MODEL),64)
|
||||
MAX_VM_MEMORY = 1024
|
||||
else ifeq ($(ARCH),universal)
|
||||
MAX_VM_MEMORY = 1024
|
||||
else
|
||||
MAX_VM_MEMORY = 612
|
||||
endif
|
||||
|
||||
# List of all possible directories for javadoc to look for sources
|
||||
# NOTE: Quotes are required around sourcepath argument only on Windows.
|
||||
# Otherwise, you get "No packages or classes specified." due
|
||||
# to $(CLASSPATH_SEPARATOR) being interpreted as an end of
|
||||
# command (newline or shell ; character)
|
||||
ALL_SOURCE_DIRS = $(SHARE_SRC)/classes \
|
||||
$(IMPORTSRCDIR) \
|
||||
$(GENSRCDIR) \
|
||||
$(SHARE_SRC)/../solaris/classes \
|
||||
$(SHARE_SRC)/../windows/classes \
|
||||
$(SHARE_SRC)/doc/stub
|
||||
ALL_SOURCE_DIRS = $(JDK_IMPSRC) \
|
||||
$(JDK_GENSRC) \
|
||||
$(JDK_SHARE_CLASSES) \
|
||||
$(JDK_TOPDIR)/src/solaris/classes \
|
||||
$(JDK_TOPDIR)/src/windows/classes \
|
||||
$(JDK_SHARE_SRC)/doc/stub
|
||||
|
||||
# List of directories that actually exist
|
||||
ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))
|
||||
@@ -97,6 +158,11 @@ SPACE:= $(EMPTY) $(EMPTY)
|
||||
RELEASEDOCS_SOURCEPATH = \
|
||||
$(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $(ALL_SOURCE_DIRS)))
|
||||
|
||||
define prep-target
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
endef
|
||||
|
||||
# Prep for javadoc creation, assumes $@ is an index.html file
|
||||
define prep-javadoc
|
||||
@if [ -f "$@" -a "$?" != "" ] ; then \
|
||||
@@ -203,7 +269,7 @@ $(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
|
||||
|
||||
# Common javadoc options used by all
|
||||
COMMON_JAVADOCFLAGS = \
|
||||
$(NO_PROPRIETARY_API_WARNINGS) \
|
||||
-XDignore.symbol.file=true \
|
||||
-quiet \
|
||||
-use \
|
||||
-keywords \
|
||||
@@ -217,19 +283,8 @@ else
|
||||
endif
|
||||
|
||||
# Draft used for non-fcs documents
|
||||
JDK_IS_FCS = false
|
||||
DRAFT_HEADER =
|
||||
ifeq ($(JDK_MINOR_VERSION),5)
|
||||
JDK_IS_FCS = true
|
||||
endif
|
||||
ifeq ($(JDK_MINOR_VERSION),6)
|
||||
JDK_IS_FCS = true
|
||||
endif
|
||||
ifeq ($(JDK_MINOR_VERSION),7)
|
||||
JDK_IS_FCS = true
|
||||
endif
|
||||
ifeq ($(JDK_IS_FCS),false)
|
||||
ifneq ($(MILESTONE), fcs)
|
||||
ifneq ($(MILESTONE), fcs)
|
||||
DRAFT_HEADER = <br><strong>DRAFT $(MILESTONE)-$(BUILD_NUMBER)</strong>
|
||||
DRAFT_BOTTOM = <br><strong>DRAFT $(MILESTONE)-$(BUILD_NUMBER)</strong>
|
||||
DRAFT_WINTITLE = $(BUILD_NUMBER)
|
||||
@@ -245,7 +300,6 @@ contained herein are not final and are subject to change. \
|
||||
The information is being made available to you solely for purpose of \
|
||||
evaluation. \
|
||||
</div> </div>
|
||||
endif
|
||||
endif
|
||||
|
||||
#################################################################
|
||||
@@ -309,7 +363,7 @@ TAG_JLS = jls:a:See <cite> \
|
||||
The Java™ Language Specification</cite>:
|
||||
|
||||
# Overview file for core apis
|
||||
COREAPI_OVERVIEW = $(SHARE_SRC)/classes/overview-core.html
|
||||
COREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html
|
||||
|
||||
# The index.html, options, and packages files
|
||||
COREAPI_INDEX_FILE = $(COREAPI_DOCSDIR)/index.html
|
||||
@@ -325,7 +379,7 @@ $(COREAPI_INDEX_FILE): GET2DOCSDIR=..
|
||||
$(COREAPI_INDEX_FILE): $(COREAPI_OPTIONS_FILE) $(COREAPI_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(COREAPI_OPTIONS_FILE),$(COREAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -363,10 +417,7 @@ $(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_P
|
||||
# docletapidocs
|
||||
#
|
||||
|
||||
# Part of langtools
|
||||
ifdef LANGTOOLS_DIST
|
||||
ALL_OTHER_TARGETS += docletapidocs
|
||||
endif
|
||||
ALL_OTHER_TARGETS += docletapidocs
|
||||
|
||||
DOCLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/doclet
|
||||
DOCLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
|
||||
@@ -392,7 +443,7 @@ $(DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(DOCLETAPI2COREAPI)/..
|
||||
$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -420,11 +471,7 @@ $(DOCLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOCL
|
||||
# tagletapidocs
|
||||
#
|
||||
|
||||
# Part of langtools
|
||||
ifdef LANGTOOLS_DIST
|
||||
ALL_OTHER_TARGETS += tagletapidocs
|
||||
endif
|
||||
|
||||
ALL_OTHER_TARGETS += tagletapidocs
|
||||
TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet
|
||||
TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
|
||||
TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
|
||||
@@ -434,7 +481,7 @@ TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_Y
|
||||
TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp
|
||||
|
||||
# The index.html, options, and packages files
|
||||
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.html
|
||||
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/com/sun/tools/doclets/Taglet.html
|
||||
TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
|
||||
TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
|
||||
|
||||
@@ -449,7 +496,7 @@ $(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE)
|
||||
$(RM) -r $(TAGLETAPI_TEMPDIR)
|
||||
$(MKDIR) -p $(TAGLETAPI_TEMPDIR)
|
||||
$(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(TAGLETAPI_TEMPDIR) \
|
||||
$(JAVADOC_CMD) -d $(TAGLETAPI_TEMPDIR) \
|
||||
@$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE)
|
||||
cp -r $(TAGLETAPI_TEMPDIR)/com $(@D)
|
||||
cp $(TAGLETAPI_TEMPDIR)/stylesheet.css $(@D)
|
||||
@@ -468,9 +515,11 @@ $(TAGLETAPI_OPTIONS_FILE):
|
||||
) >> $@
|
||||
|
||||
# Create a file with the package names in it
|
||||
$(TAGLETAPI_PACKAGES_FILE): $(IMPORTSRCDIR)/$(TAGLETAPI_FILE)
|
||||
$(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS))
|
||||
$(prep-target)
|
||||
@($(ECHO) "$(IMPORTSRCDIR)/$(TAGLETAPI_FILE)" ) > $@
|
||||
$(call PackageFilter,$(TAGLETAPI_PKGS))
|
||||
$(GREP) "$(TAGLETAPI_FILE)" $@ > $@.tmp
|
||||
$(MV) $@.tmp $@
|
||||
|
||||
#############################################################
|
||||
#
|
||||
@@ -503,7 +552,7 @@ $(DOMAPI_INDEX_FILE): GET2DOCSDIR=$(DOMAPI2COREAPI)/..
|
||||
$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -548,7 +597,7 @@ JDI_DOCTITLE := Java$(TRADEMARK) Debug Interface
|
||||
JDI_WINDOWTITLE := Java Debug Interface
|
||||
JDI_HEADER := <strong>Java Debug Interface</strong>
|
||||
JDI_BOTTOM := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))
|
||||
JDI_OVERVIEW := $(SHARE_SRC)/classes/jdi-overview.html
|
||||
JDI_OVERVIEW := $(JDK_SHARE_CLASSES)/jdi-overview.html
|
||||
# JDI_PKGS is located in NON_CORE_PKGS.gmk
|
||||
|
||||
# The index.html, options, and packages files
|
||||
@@ -565,7 +614,7 @@ $(JDI_INDEX_FILE): GET2DOCSDIR=$(JDI2COREAPI)/..
|
||||
$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -595,12 +644,12 @@ $(JDI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDI_PKGS))
|
||||
ALL_OTHER_TARGETS += jdwpdocs
|
||||
|
||||
JDWP_DOCDIR = $(PLATFORM_DOCSDIR)/jpda/jdwp
|
||||
JDWP_SPEC = $(BUILDDIR)/jpda/jdwp/jdwp.spec
|
||||
|
||||
jdwpdocs: $(JDWP_DOCDIR)/jdwp-protocol.html
|
||||
$(JDWP_DOCDIR)/jdwp-protocol.html: $(BUILD_TOOLS) $(JDWP_SPEC)
|
||||
$(prep-javadoc)
|
||||
$(TOOL_JDWPGEN) $(JDWP_SPEC) -doc $@
|
||||
$(JDWP_DOCDIR)/jdwp-protocol.html : $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
|
||||
$(MKDIR) -p $(@D)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
|
||||
#############################################################
|
||||
#
|
||||
@@ -610,7 +659,7 @@ $(JDWP_DOCDIR)/jdwp-protocol.html: $(BUILD_TOOLS) $(JDWP_SPEC)
|
||||
ALL_OTHER_TARGETS += jvmtidocs
|
||||
|
||||
JVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmti
|
||||
JVMTI_HTML = $(HOTSPOT_DOCS_IMPORT_PATH)/platform/jvmti/jvmti.html
|
||||
JVMTI_HTML = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.html
|
||||
|
||||
jvmtidocs: $(JVMTI_DOCDIR)/jvmti.html
|
||||
$(JVMTI_DOCDIR)/jvmti.html:
|
||||
@@ -636,7 +685,7 @@ JAAS_WINDOWTITLE := Java Authentication and Authorization Service
|
||||
JAAS_HEADER := <strong>Java Authentication and Authorization Service</strong>
|
||||
JAAS_BOTTOM := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))
|
||||
# JAAS_PKGS is located in NON_CORE_PKGS.gmk
|
||||
JAAS_OVERVIEW := $(SHARE_SRC)/classes/com/sun/security/auth/jaas-overview.html
|
||||
JAAS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/auth/jaas-overview.html
|
||||
|
||||
# The index.html, options, and packages files
|
||||
JAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.html
|
||||
@@ -652,7 +701,7 @@ $(JAAS_INDEX_FILE): GET2DOCSDIR=$(JAAS2COREAPI)/..
|
||||
$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -687,7 +736,7 @@ JGSS_DOCTITLE := Java$(TRADEMARK) GSS-API Utilities
|
||||
JGSS_WINDOWTITLE := Java GSS-API Utilities
|
||||
JGSS_HEADER := <strong>Java GSS-API Utilities</strong>
|
||||
JGSS_BOTTOM := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR))
|
||||
JGSS_OVERVIEW := $(SHARE_SRC)/classes/com/sun/security/jgss/jgss-overview.html
|
||||
JGSS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/jgss/jgss-overview.html
|
||||
# JGSS_PKGS is located in NON_CORE_PKGS.gmk
|
||||
|
||||
# The index.html, options, and packages files
|
||||
@@ -704,7 +753,7 @@ $(JGSS_INDEX_FILE): GET2DOCSDIR=$(JGSS2COREAPI)/..
|
||||
$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -756,7 +805,7 @@ $(SMARTCARDIO_INDEX_FILE): GET2DOCSDIR=$(SMARTCARDIO2COREAPI)/..
|
||||
$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -806,7 +855,7 @@ $(HTTPSERVER_INDEX_HTML): GET2DOCSDIR=$(HTTPSERVER2COREAPI)/..
|
||||
$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -843,7 +892,7 @@ MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK)
|
||||
MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
|
||||
MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>
|
||||
MGMT_BOTTOM := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR))
|
||||
MGMT_OVERVIEW := $(SHARE_SRC)/classes/com/sun/management/mgmt-overview.html
|
||||
MGMT_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/management/mgmt-overview.html
|
||||
# MGMT_PKGS is located in NON_CORE_PKGS.gmk
|
||||
|
||||
# The index.html, options, and packages files
|
||||
@@ -866,7 +915,7 @@ $(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE)
|
||||
$(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; \
|
||||
fi
|
||||
$(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -917,7 +966,7 @@ $(ATTACH_INDEX_HTML): GET2DOCSDIR=$(ATTACH2COREAPI)/..
|
||||
$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -967,7 +1016,7 @@ $(JCONSOLE_INDEX_HTML): GET2DOCSDIR=$(JCONSOLE2COREAPI)/..
|
||||
$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -994,10 +1043,7 @@ $(JCONSOLE_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JCONS
|
||||
# treeapidocs
|
||||
#
|
||||
|
||||
# Part of langtools
|
||||
ifdef LANGTOOLS_DIST
|
||||
ALL_OTHER_TARGETS += treeapidocs
|
||||
endif
|
||||
ALL_OTHER_TARGETS += treeapidocs
|
||||
|
||||
TREEAPI_DOCDIR := $(JDK_API_DOCSDIR)/javac/tree
|
||||
TREEAPI2COREAPI := ../../$(JDKJRE2COREAPI)
|
||||
@@ -1022,7 +1068,7 @@ $(TREEAPI_INDEX_HTML): GET2DOCSDIR=$(TREEAPI2COREAPI)/..
|
||||
$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -1067,13 +1113,13 @@ SCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packages
|
||||
sctpdocs: $(SCTPAPI_INDEX_HTML)
|
||||
|
||||
# Set relative location to core api document root
|
||||
$(SCTSCTSCTP: GET2DOCSDIR=$(SCTPAPI2COREAPI)/..
|
||||
$(SCTPAPI_INDEX_HTML): GET2DOCSDIR=$(SCTPAPI2COREAPI)/..
|
||||
|
||||
# Run javadoc if the index file is out of date or missing
|
||||
$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE)
|
||||
$(prep-javadoc)
|
||||
$(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
|
||||
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
|
||||
$(JAVADOC_CMD) -d $(@D) \
|
||||
@$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)
|
||||
|
||||
# Create file with javadoc options in it
|
||||
@@ -1133,42 +1179,6 @@ clean:
|
||||
# * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
|
||||
#
|
||||
|
||||
echovalues:
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) --------------Imports---------------------------
|
||||
@$(ECHO) "IMPORT_PACKAGES = $(IMPORT_PACKAGES)"
|
||||
@$(ECHO) "IMPORT_PACKAGE_FILTER = $(IMPORT_PACKAGE_FILTER)"
|
||||
@$(ECHO) --------------Imports---------------------------
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) --------------Shared---------------------------
|
||||
@$(ECHO) BUILD_NUMBER = $(BUILD_NUMBER)
|
||||
@$(ECHO) FULL_VERSION = $(FULL_VERSION)
|
||||
@$(ECHO) JDK_VERSION = $(JDK_VERSION)
|
||||
@$(ECHO) JDK_MAJOR_VERSION = $(JDK_MAJOR_VERSION)
|
||||
@$(ECHO) JDK_MINOR_VERSION = $(JDK_MINOR_VERSION)
|
||||
@$(ECHO) JDK_MICRO_VERSION = $(JDK_MICRO_VERSION)
|
||||
@$(ECHO) JDK_UPDATE_VERSION = $(JDK_UPDATE_VERSION)
|
||||
@$(ECHO) JDK_MKTG_VERSION = $(JDK_MKTG_VERSION)
|
||||
@$(ECHO) JDK_UNDERSCORE_VERSION = $(JDK_UNDERSCORE_VERSION)
|
||||
@$(ECHO) JDK_MKTG_UNDERSCORE_VERSION = $(JDK_MKTG_UNDERSCORE_VERSION)
|
||||
@$(ECHO) MARKETING_NUMBER = $(MARKETING_NUMBER)
|
||||
@$(ECHO) MARKET_NAME = $(MARKET_NAME)
|
||||
@$(ECHO) MILESTONE = $(MILESTONE)
|
||||
@$(ECHO) RELEASE = $(RELEASE)
|
||||
@$(ECHO) USER_RELEASE_SUFFIX = $(USER_RELEASE_SUFFIX)
|
||||
@$(ECHO) --------------Shared---------------------------
|
||||
@$(ECHO) ""
|
||||
@$(ECHO) --------------common/Defs---------------------------
|
||||
@$(ECHO) "RELEASEDOCS_SOURCEPATH"
|
||||
@$(ECHO) " SHARE_SRC/classes: $(SHARE_SRC)/classes"
|
||||
@$(ECHO) " PLATFORM_SRC/classes: $(PLATFORM_SRC)/classes"
|
||||
@$(ECHO) " GENSRCDIR: $(GENSRCDIR)"
|
||||
@$(ECHO) " SHARE_SRC/doc/stub: $(SHARE_SRC)/doc/stub"
|
||||
@$(ECHO) " IMPORTSRCDIR: $(IMPORTSRCDIR)"
|
||||
@$(ECHO) --------------common/Defs---------------------------
|
||||
@$(ECHO) ""
|
||||
|
||||
#############################################################
|
||||
.PHONY: all docs coredocs rel-docs echovalues otherdocs rel-coredocs \
|
||||
.PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
|
||||
sanitycheckcoredocs $(ALL_OTHER_TARGETS)
|
||||
|
||||
@@ -71,6 +71,8 @@ DOCLETAPI_PKGS = com.sun.javadoc
|
||||
|
||||
TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java
|
||||
|
||||
TAGLETAPI_PKGS = com.sun.tools.doclets
|
||||
|
||||
ATTACH_PKGS = com.sun.tools.attach \
|
||||
com.sun.tools.attach.spi
|
||||
|
||||
100
common/makefiles/support/unicode2x.sed
Normal file
100
common/makefiles/support/unicode2x.sed
Normal file
@@ -0,0 +1,100 @@
|
||||
s/\\u0020/\x20/g
|
||||
s/\\u003A/\x3A/g
|
||||
s/\\u006B/\x6B/g
|
||||
s/\\u0075/\x75/g
|
||||
s/\\u00A0/\xA0/g
|
||||
s/\\u00A3/\xA3/g
|
||||
s/\\u00B0/\xB0/g
|
||||
s/\\u00B7/\xB7/g
|
||||
s/\\u00BA/\xBA/g
|
||||
s/\\u00BF/\xBF/g
|
||||
s/\\u00C0/\xC0/g
|
||||
s/\\u00C1/\xC1/g
|
||||
s/\\u00C2/\xC2/g
|
||||
s/\\u00C4/\xC4/g
|
||||
s/\\u00C5/\xC5/g
|
||||
s/\\u00C8/\xC8/g
|
||||
s/\\u00C9/\xC9/g
|
||||
s/\\u00CA/\xCA/g
|
||||
s/\\u00CD/\xCD/g
|
||||
s/\\u00CE/\xCE/g
|
||||
s/\\u00D3/\xD3/g
|
||||
s/\\u00D4/\xD4/g
|
||||
s/\\u00D6/\xD6/g
|
||||
s/\\u00DA/\xDA/g
|
||||
s/\\u00DC/\xDC/g
|
||||
s/\\u00DD/\xDD/g
|
||||
s/\\u00DF/\xDF/g
|
||||
s/\\u00E0/\xE0/g
|
||||
s/\\u00E1/\xE1/g
|
||||
s/\\u00E2/\xE2/g
|
||||
s/\\u00E3/\xE3/g
|
||||
s/\\u00E4/\xE4/g
|
||||
s/\\u00E5/\xE5/g
|
||||
s/\\u00E6/\xE6/g
|
||||
s/\\u00E7/\xE7/g
|
||||
s/\\u00E8/\xE8/g
|
||||
s/\\u00E9/\xE9/g
|
||||
s/\\u00EA/\xEA/g
|
||||
s/\\u00EB/\xEB/g
|
||||
s/\\u00EC/\xEC/g
|
||||
s/\\u00ED/\xED/g
|
||||
s/\\u00EE/\xEE/g
|
||||
s/\\u00EF/\xEF/g
|
||||
s/\\u00F1/\xF1/g
|
||||
s/\\u00F2/\xF2/g
|
||||
s/\\u00F3/\xF3/g
|
||||
s/\\u00F4/\xF4/g
|
||||
s/\\u00F5/\xF5/g
|
||||
s/\\u00F6/\xF6/g
|
||||
s/\\u00F9/\xF9/g
|
||||
s/\\u00FA/\xFA/g
|
||||
s/\\u00FC/\xFC/g
|
||||
s/\\u0020/\x20/g
|
||||
s/\\u003f/\x3f/g
|
||||
s/\\u006f/\x6f/g
|
||||
s/\\u0075/\x75/g
|
||||
s/\\u00a0/\xa0/g
|
||||
s/\\u00a3/\xa3/g
|
||||
s/\\u00b0/\xb0/g
|
||||
s/\\u00ba/\xba/g
|
||||
s/\\u00bf/\xbf/g
|
||||
s/\\u00c1/\xc1/g
|
||||
s/\\u00c4/\xc4/g
|
||||
s/\\u00c5/\xc5/g
|
||||
s/\\u00c8/\xc8/g
|
||||
s/\\u00c9/\xc9/g
|
||||
s/\\u00ca/\xca/g
|
||||
s/\\u00cd/\xcd/g
|
||||
s/\\u00d6/\xd6/g
|
||||
s/\\u00dc/\xdc/g
|
||||
s/\\u00dd/\xdd/g
|
||||
s/\\u00df/\xdf/g
|
||||
s/\\u00e0/\xe0/g
|
||||
s/\\u00e1/\xe1/g
|
||||
s/\\u00e2/\xe2/g
|
||||
s/\\u00e3/\xe3/g
|
||||
s/\\u00e4/\xe4/g
|
||||
s/\\u00e5/\xe5/g
|
||||
s/\\u00e7/\xe7/g
|
||||
s/\\u00e8/\xe8/g
|
||||
s/\\u00e9/\xe9/g
|
||||
s/\\u00ea/\xea/g
|
||||
s/\\u00eb/\xeb/g
|
||||
s/\\u00ec/\xec/g
|
||||
s/\\u00ed/\xed/g
|
||||
s/\\u00ee/\xee/g
|
||||
s/\\u00ef/\xef/g
|
||||
s/\\u00f0/\xf0/g
|
||||
s/\\u00f1/\xf1/g
|
||||
s/\\u00f2/\xf2/g
|
||||
s/\\u00f3/\xf3/g
|
||||
s/\\u00f4/\xf4/g
|
||||
s/\\u00f5/\xf5/g
|
||||
s/\\u00f6/\xf6/g
|
||||
s/\\u00f7/\xf7/g
|
||||
s/\\u00f8/\xf8/g
|
||||
s/\\u00f9/\xf9/g
|
||||
s/\\u00fa/\xfa/g
|
||||
s/\\u00fc/\xfc/g
|
||||
s/\\u00ff/\xff/g
|
||||
@@ -58,7 +58,7 @@ int is_cygdrive_here(int pos, char *in, int len)
|
||||
* Works in place since drive letter is always
|
||||
* shorter than /cygdrive/
|
||||
*/
|
||||
char *replace_cygdrive(char *in)
|
||||
char *replace_cygdrive_cygwin(char *in)
|
||||
{
|
||||
int len = strlen(in);
|
||||
char *out = malloc(len+1);
|
||||
@@ -119,6 +119,61 @@ char *replace_substring(char *in, char *sub, char *rep)
|
||||
return out;
|
||||
}
|
||||
|
||||
char* msys_path_list; // @-separated list of paths prefix to look for
|
||||
char* msys_path_list_end; // Points to last \0 in msys_path_list.
|
||||
|
||||
void setup_msys_path_list(char* argument)
|
||||
{
|
||||
char* p;
|
||||
char* drive_letter_pos;
|
||||
|
||||
msys_path_list = strdup(&argument[2]);
|
||||
msys_path_list_end = &msys_path_list[strlen(msys_path_list)];
|
||||
|
||||
// Convert all at-sign (@) in path list to \0.
|
||||
// @ was chosen as separator to minimize risk of other tools messing around with it
|
||||
p = msys_path_list;
|
||||
do {
|
||||
if (p[1] == ':') {
|
||||
// msys has mangled our path list, restore it from c:/... to /c/...
|
||||
drive_letter_pos = p+1;
|
||||
*drive_letter_pos = *p;
|
||||
*p = '/';
|
||||
}
|
||||
|
||||
// Look for an @ in the list
|
||||
p = strchr(p, '@');
|
||||
if (p != NULL) {
|
||||
*p = '\0';
|
||||
p++;
|
||||
}
|
||||
} while (p != NULL);
|
||||
}
|
||||
|
||||
char *replace_cygdrive_msys(char *in)
|
||||
{
|
||||
char* str;
|
||||
char* prefix;
|
||||
char* p;
|
||||
|
||||
str = strdup(in);
|
||||
|
||||
// For each prefix in the path list, search for it and replace /c/... with c:/...
|
||||
for (prefix = msys_path_list; prefix < msys_path_list_end && prefix != NULL; prefix += strlen(prefix)+1) {
|
||||
p=str;
|
||||
while ((p = strstr(p, prefix))) {
|
||||
char* drive_letter = p+1;
|
||||
*p = *drive_letter;
|
||||
*drive_letter = ':';
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
char*(*replace_cygdrive)(char *in) = NULL;
|
||||
|
||||
char *files_to_delete[1024];
|
||||
int num_files_to_delete = 0;
|
||||
|
||||
@@ -158,7 +213,7 @@ char *fix_at_file(char *in)
|
||||
|
||||
atout = fopen(name, "w");
|
||||
if (atout == NULL) {
|
||||
fprintf(stderr, "Could open temporary file for writing! %s\n", name);
|
||||
fprintf(stderr, "Could not open temporary file for writing! %s\n", name);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
@@ -167,7 +222,13 @@ char *fix_at_file(char *in)
|
||||
append(&buffer, &buflen, &used, block, blocklen);
|
||||
}
|
||||
buffer[used] = 0;
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath input from @-file %s: %s\n", &in[1], buffer);
|
||||
}
|
||||
fixed = replace_cygdrive(buffer);
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath converted to @-file %s is: %s\n", name, fixed);
|
||||
}
|
||||
fwrite(fixed, strlen(fixed), 1, atout);
|
||||
fclose(atin);
|
||||
fclose(atout);
|
||||
@@ -194,12 +255,31 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
DWORD exitCode;
|
||||
|
||||
if (argc<2) {
|
||||
fprintf(stderr, "Usage: uncygdrive.exe /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
|
||||
if (argc<3 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
|
||||
fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
line = replace_cygdrive(strstr(GetCommandLine(), argv[1]));
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath input line >%s<\n", strstr(GetCommandLine(), argv[1]));
|
||||
}
|
||||
|
||||
if (argv[1][1] == 'c' && argv[1][2] == '\0') {
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "using cygwin mode\n");
|
||||
}
|
||||
replace_cygdrive = replace_cygdrive_cygwin;
|
||||
} else if (argv[1][1] == 'm') {
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "using msys mode, with path list: %s\n", &argv[1][2]);
|
||||
}
|
||||
setup_msys_path_list(argv[1]);
|
||||
replace_cygdrive = replace_cygdrive_msys;
|
||||
} else {
|
||||
fprintf(stderr, "Unknown mode: %s\n", argv[1]);
|
||||
exit(-1);
|
||||
}
|
||||
line = replace_cygdrive(strstr(GetCommandLine(), argv[2]));
|
||||
|
||||
for (i=1; i<argc; ++i) {
|
||||
if (argv[i][0] == '@') {
|
||||
@@ -210,8 +290,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (getenv("DEBUG_UNCYGDRIVE") != NULL) {
|
||||
fprintf(stderr, "uncygdrive >%s<\n", line);
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
fprintf(stderr, "fixpath converted line >%s<\n", line);
|
||||
}
|
||||
|
||||
ZeroMemory(&si,sizeof(si));
|
||||
@@ -238,9 +318,9 @@ int main(int argc, char **argv)
|
||||
WaitForSingleObject(pi.hProcess,INFINITE);
|
||||
GetExitCodeProcess(pi.hProcess,&exitCode);
|
||||
|
||||
if (getenv("DEBUG_UNCYGDRIVE") != NULL) {
|
||||
if (getenv("DEBUG_FIXPATH") != NULL) {
|
||||
for (i=0; i<num_files_to_delete; ++i) {
|
||||
fprintf(stderr, "Not deleting temporary uncygdrive file %s\n",
|
||||
fprintf(stderr, "Not deleting temporary fixpath file %s\n",
|
||||
files_to_delete[i]);
|
||||
}
|
||||
}
|
||||
29
configure
vendored
Normal file
29
configure
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This is a thin wrapper which will call the real configure script, and
|
||||
# make sure that is called using bash.
|
||||
|
||||
this_script_dir=`dirname $0`
|
||||
bash $this_script_dir/common/autoconf/configure "$@"
|
||||
@@ -172,3 +172,15 @@ cd879aff5d3cc1f58829aab3116880aa19525b78 jdk8-b43
|
||||
7e2b179a5b4dbd3f097e28daa00abfcc72ba3e0b jdk8-b48
|
||||
fe44e58a6bdbeae350ce96aafb49770a5dca5d8a jdk8-b49
|
||||
d20d9eb9f093adbf392918c703960ad24c93a331 jdk8-b50
|
||||
9b0f841ca9f7ee9bacf16a5ab41c4f829276bc6b jdk8-b51
|
||||
80689ff9cb499837513f18a1136dac7f0686cd55 jdk8-b52
|
||||
63aeb7a2472fb299134ad7388e0a111a5340b02d jdk8-b53
|
||||
16c82fc74695bab9b9e0fb05c086a5a08ba0082f jdk8-b54
|
||||
e8a0e84383d6fbd303ce44bd355fb25972b13286 jdk8-b55
|
||||
bf1bb47414e178beff67dc255fc3b97bf401f679 jdk8-b56
|
||||
f3ab4163ae012965fc8acdfc25ce0fece8d6906d jdk8-b57
|
||||
18462a19f7bd66d38015f61ea549a5e0c0c889a3 jdk8-b58
|
||||
d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
|
||||
207ef43ba69ead6cbbab415d81834545e4d46747 jdk8-b60
|
||||
0e08ba7648fb3faa0986cb217887d7c4990977f3 jdk8-b61
|
||||
08afb9c6f44f11c3595b01fd0985db64b29834dd jdk8-b62
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -154,13 +154,23 @@ ifeq ($(PLATFORM),windows)
|
||||
ECHO = $(UNIXCOMMAND_PATH)echo -e
|
||||
ZIPEXE = $(UNIXCOMMAND_PATH)zip
|
||||
UNZIP = $(UNIXCOMMAND_PATH)unzip
|
||||
# Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation
|
||||
NAWK = $(UNIXCOMMAND_PATH)awk -v BINMODE=w
|
||||
else
|
||||
ifdef USING_MSYS
|
||||
ECHO = $(UTILS_COMMAND_PATH)echo -e
|
||||
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
|
||||
UNZIP = $(UTILS_DEVTOOL_PATH)unzip
|
||||
NAWK = $(UNIXCOMMAND_PATH)awk
|
||||
else
|
||||
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
|
||||
UNZIP = $(UTILS_DEVTOOL_PATH)unzip
|
||||
NAWK = $(UNIXCOMMAND_PATH)awk
|
||||
endif
|
||||
endif
|
||||
# Re-define some utilities
|
||||
LEX =# override GNU Make intrinsic: no lex on windows
|
||||
NAWK = $(UNIXCOMMAND_PATH)awk
|
||||
SHA1SUM = $(UNIXCOMMAND_PATH)openssl sha1
|
||||
endif
|
||||
|
||||
# Linux specific
|
||||
|
||||
@@ -91,6 +91,15 @@ define OptFullPath
|
||||
$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1"; else echo "$1"; fi)
|
||||
endef
|
||||
else
|
||||
ifdef USING_MSYS
|
||||
DOSPATH_CMD:=$(shell cd $(JDK_TOPDIR) 2> $(DEV_NULL) && pwd)/make/tools/msys_build_scripts/dospath.sh
|
||||
define FullPath
|
||||
$(subst \,/,$(shell $(DOSPATH_CMD) $1))
|
||||
endef
|
||||
define OptFullPath
|
||||
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
|
||||
endef
|
||||
else
|
||||
# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
|
||||
define FullPath
|
||||
$(shell cd $1 2> $(DEV_NULL) && pwd)
|
||||
@@ -99,6 +108,7 @@ define OptFullPath
|
||||
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
|
||||
endef
|
||||
endif
|
||||
endif
|
||||
|
||||
# System drive
|
||||
ifdef SYSTEMDRIVE
|
||||
@@ -112,14 +122,21 @@ _system_drive:=$(call CheckValue,_system_drive,C:)
|
||||
|
||||
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifndef UNIXCOMMAND_PATH
|
||||
ifdef ALT_UNIXCOMMAND_PATH
|
||||
# With cygwin, use this as is; don't use FullPath on it.
|
||||
ifdef ALT_UNIXCOMMAND_PATH
|
||||
ifdef USING_CYGWIN
|
||||
UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
|
||||
else
|
||||
xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
|
||||
fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
|
||||
UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
|
||||
else
|
||||
endif
|
||||
else
|
||||
ifdef USING_CYGWIN
|
||||
UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
|
||||
else
|
||||
ifdef USING_MSYS
|
||||
UNIXCOMMAND_PATH :=$(call PrefixPath,/bin)
|
||||
else
|
||||
ifdef ROOTDIR
|
||||
xROOTDIR :="$(subst \,/,$(ROOTDIR))"
|
||||
@@ -131,41 +148,35 @@ ifndef UNIXCOMMAND_PATH
|
||||
ifneq ($(_rootdir),)
|
||||
UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
|
||||
export UNIXCOMMAND_PATH
|
||||
endif # USING_MSYS
|
||||
endif # USING_CYGWIN
|
||||
endif
|
||||
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
|
||||
export UNIXCOMMAND_PATH
|
||||
|
||||
# Get version of MKS or CYGWIN
|
||||
ifdef USING_CYGWIN
|
||||
ifndef CYGWIN_VER
|
||||
_CYGWIN_VER :=$(shell $(UNAME))
|
||||
CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER))
|
||||
export CYGWIN_VER
|
||||
ifdef USING_MKS
|
||||
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
|
||||
MKS_VER :=$(call GetVersion,$(_MKS_VER))
|
||||
# At this point, we can re-define FullPath to use DOSNAME_CMD
|
||||
CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
|
||||
TRY_DOSNAME:=false
|
||||
ifeq ($(CHECK_MKS87),same)
|
||||
TRY_DOSNAME:=true
|
||||
endif
|
||||
else # MKS
|
||||
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
|
||||
MKS_VER :=$(call GetVersion,$(_MKS_VER))
|
||||
# At this point, we can re-define FullPath to use DOSNAME_CMD
|
||||
CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
|
||||
TRY_DOSNAME:=false
|
||||
ifeq ($(CHECK_MKS87),same)
|
||||
TRY_DOSNAME:=true
|
||||
endif
|
||||
# Newer should be ok
|
||||
ifeq ($(CHECK_MKS87),newer)
|
||||
TRY_DOSNAME:=true
|
||||
endif
|
||||
ifeq ($(TRY_DOSNAME),true)
|
||||
ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
|
||||
_DOSNAME=$(UNIXCOMMAND_PATH)dosname
|
||||
DOSNAME_CMD:=$(_DOSNAME) -s
|
||||
# Newer should be ok
|
||||
ifeq ($(CHECK_MKS87),newer)
|
||||
TRY_DOSNAME:=true
|
||||
endif
|
||||
ifeq ($(TRY_DOSNAME),true)
|
||||
ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
|
||||
_DOSNAME=$(UNIXCOMMAND_PATH)dosname
|
||||
DOSNAME_CMD:=$(_DOSNAME) -s
|
||||
define FullPath
|
||||
$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
|
||||
endef
|
||||
endif # test dosname -s
|
||||
endif # TRY_DOSNAME
|
||||
endif # test dosname -s
|
||||
endif # TRY_DOSNAME
|
||||
endif # MKS
|
||||
|
||||
# We try to get references to what we need via the default component
|
||||
@@ -240,6 +251,8 @@ endif
|
||||
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifndef DEVTOOLS_PATH
|
||||
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
||||
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
||||
ifdef ALT_DEVTOOLS_PATH
|
||||
xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
|
||||
fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
|
||||
@@ -247,11 +260,15 @@ ifndef DEVTOOLS_PATH
|
||||
else
|
||||
ifdef USING_CYGWIN
|
||||
DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
|
||||
else
|
||||
ifdef USING_MSYS
|
||||
DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
|
||||
else
|
||||
xDEVTOOLS_PATH :="$(_system_drive)/utils"
|
||||
fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
|
||||
DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
|
||||
endif
|
||||
endif # USING_MSYS
|
||||
endif # USING_CYGWIN
|
||||
endif
|
||||
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
|
||||
export DEVTOOLS_PATH
|
||||
|
||||
@@ -65,6 +65,8 @@ PLATFORM_SHARED=done
|
||||
# REQUIRED_WINDOWS_NAME windows only: basic name of windows
|
||||
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows
|
||||
# USING_CYGWIN windows only: true or false
|
||||
# USING_MSYS windows only: true or false
|
||||
# USING_MKS windows only: true or false
|
||||
# WINDOWS_NT_VERSION_STRING windows only: long version name
|
||||
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
|
||||
# REQUIRED_FREE_SPACE minimum disk space needed for outputdir
|
||||
@@ -327,6 +329,8 @@ endif
|
||||
# Windows with and without CYGWIN will be slightly different
|
||||
ifeq ($(SYSTEM_UNAME), Windows_NT)
|
||||
PLATFORM = windows
|
||||
USING_MKS = true
|
||||
export USING_MKS
|
||||
OS_VERSION := $(shell uname -r)
|
||||
WINDOWS_NT_VERSION_STRING=Windows_NT
|
||||
REQUIRED_MKS_VER=6.1
|
||||
@@ -339,6 +343,11 @@ ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
|
||||
WINDOWS_NT_VERSION_STRING=CYGWIN_NT
|
||||
REQUIRED_CYGWIN_VER=4.0
|
||||
endif
|
||||
ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
|
||||
PLATFORM = windows
|
||||
USING_MSYS = true
|
||||
export USING_MSYS
|
||||
endif
|
||||
|
||||
# Platform settings specific to Windows
|
||||
ifeq ($(PLATFORM), windows)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
253
corba/makefiles/BuildCorba.gmk
Normal file
253
corba/makefiles/BuildCorba.gmk
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,7 +25,10 @@
|
||||
|
||||
package com.sun.corba.se.impl.transport;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.omg.CORBA.CompletionStatus;
|
||||
import org.omg.CORBA.SystemException;
|
||||
@@ -68,7 +71,7 @@ public class CorbaResponseWaitingRoomImpl
|
||||
|
||||
private CorbaConnection connection;
|
||||
// Maps requestId to an OutCallDesc.
|
||||
private Hashtable out_calls = null; // REVISIT - use int hastable/map
|
||||
final private Map<Integer, OutCallDesc> out_calls;
|
||||
|
||||
public CorbaResponseWaitingRoomImpl(ORB orb, CorbaConnection connection)
|
||||
{
|
||||
@@ -76,7 +79,8 @@ public class CorbaResponseWaitingRoomImpl
|
||||
wrapper = ORBUtilSystemException.get( orb,
|
||||
CORBALogDomains.RPC_TRANSPORT ) ;
|
||||
this.connection = connection;
|
||||
out_calls = new Hashtable();
|
||||
out_calls =
|
||||
Collections.synchronizedMap(new HashMap<Integer, OutCallDesc>());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -139,7 +143,7 @@ public class CorbaResponseWaitingRoomImpl
|
||||
return null;
|
||||
}
|
||||
|
||||
OutCallDesc call = (OutCallDesc)out_calls.get(requestId);
|
||||
OutCallDesc call = out_calls.get(requestId);
|
||||
if (call == null) {
|
||||
throw wrapper.nullOutCall(CompletionStatus.COMPLETED_MAYBE);
|
||||
}
|
||||
@@ -197,7 +201,7 @@ public class CorbaResponseWaitingRoomImpl
|
||||
LocateReplyOrReplyMessage header = (LocateReplyOrReplyMessage)
|
||||
inputObject.getMessageHeader();
|
||||
Integer requestId = new Integer(header.getRequestId());
|
||||
OutCallDesc call = (OutCallDesc) out_calls.get(requestId);
|
||||
OutCallDesc call = out_calls.get(requestId);
|
||||
|
||||
if (orb.transportDebugFlag) {
|
||||
dprint(".responseReceived: id/"
|
||||
@@ -248,7 +252,6 @@ public class CorbaResponseWaitingRoomImpl
|
||||
|
||||
public int numberRegistered()
|
||||
{
|
||||
// Note: Hashtable.size() is not synchronized
|
||||
return out_calls.size();
|
||||
}
|
||||
|
||||
@@ -264,12 +267,19 @@ public class CorbaResponseWaitingRoomImpl
|
||||
dprint(".signalExceptionToAllWaiters: " + systemException);
|
||||
}
|
||||
|
||||
OutCallDesc call;
|
||||
java.util.Enumeration e = out_calls.elements();
|
||||
while(e.hasMoreElements()) {
|
||||
call = (OutCallDesc) e.nextElement();
|
||||
synchronized (out_calls) {
|
||||
if (orb.transportDebugFlag) {
|
||||
dprint(".signalExceptionToAllWaiters: out_calls size :" +
|
||||
out_calls.size());
|
||||
}
|
||||
|
||||
synchronized(call.done){
|
||||
for (OutCallDesc call : out_calls.values()) {
|
||||
if (orb.transportDebugFlag) {
|
||||
dprint(".signalExceptionToAllWaiters: signaling " +
|
||||
call);
|
||||
}
|
||||
synchronized(call.done) {
|
||||
try {
|
||||
// anything waiting for BufferManagerRead's fragment queue
|
||||
// needs to be cancelled
|
||||
CorbaMessageMediator corbaMsgMediator =
|
||||
@@ -284,9 +294,14 @@ public class CorbaResponseWaitingRoomImpl
|
||||
int requestId = corbaMsgMediator.getRequestId();
|
||||
bufferManager.cancelProcessing(requestId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} finally {
|
||||
// attempt to wake up waiting threads in all cases
|
||||
call.inputObject = null;
|
||||
call.exception = systemException;
|
||||
call.done.notify();
|
||||
call.done.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -294,7 +309,7 @@ public class CorbaResponseWaitingRoomImpl
|
||||
public MessageMediator getMessageMediator(int requestId)
|
||||
{
|
||||
Integer id = new Integer(requestId);
|
||||
OutCallDesc call = (OutCallDesc) out_calls.get(id);
|
||||
OutCallDesc call = out_calls.get(id);
|
||||
if (call == null) {
|
||||
// This can happen when getting early reply fragments for a
|
||||
// request which has completed (e.g., client marshaling error).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -1521,7 +1521,7 @@ public class SocketOrChannelConnectionImpl
|
||||
// connection and give them the SystemException;
|
||||
|
||||
responseWaitingRoom.signalExceptionToAllWaiters(systemException);
|
||||
|
||||
} finally {
|
||||
if (contactInfo != null) {
|
||||
((OutboundConnectionCache)getConnectionCache()).remove(contactInfo);
|
||||
} else if (acceptor != null) {
|
||||
@@ -1542,7 +1542,6 @@ public class SocketOrChannelConnectionImpl
|
||||
|
||||
writeUnlock();
|
||||
|
||||
} finally {
|
||||
if (orb.transportDebugFlag) {
|
||||
dprint(".purgeCalls<-: "
|
||||
+ minor_code + "/" + die + "/" + lockHeld
|
||||
|
||||
@@ -1631,7 +1631,7 @@ public class StubGenerator extends sun.rmi.rmic.iiop.Generator {
|
||||
|
||||
// Write data members...
|
||||
p.pln();
|
||||
p.pln("private " + getName(theType) + " target = null;");
|
||||
p.pln("volatile private " + getName(theType) + " target = null;");
|
||||
p.pln();
|
||||
|
||||
// Write the ids...
|
||||
@@ -1695,6 +1695,10 @@ public class StubGenerator extends sun.rmi.rmic.iiop.Generator {
|
||||
|
||||
if (remoteMethods.length > 0) {
|
||||
p.plnI("try {");
|
||||
p.pln(getName(theType) + " target = this.target;");
|
||||
p.plnI("if (target == null) {");
|
||||
p.pln("throw new java.io.IOException();");
|
||||
p.pOln("}");
|
||||
p.plnI(idExtInputStream + " "+in+" = ");
|
||||
p.pln("(" + idExtInputStream + ") "+_in+";");
|
||||
p.pO();
|
||||
|
||||
@@ -267,3 +267,25 @@ e3619706a7253540a2d94e9e841acaab8ace7038 jdk8-b49
|
||||
72e0362c3f0cfacbbac8af8a5b9d2e182f21c17b hs24-b18
|
||||
58f237a9e83af6ded0d2e2c81d252cd47c0f4c45 jdk8-b50
|
||||
3b3ad16429701b2eb6712851c2f7c5a726eb2cbe hs24-b19
|
||||
663fc23da8d51c4c0552cbcb17ffc85f5869d4fd jdk8-b51
|
||||
4c8f2a12e757e7a808aa85827573e09f75d7459f hs24-b20
|
||||
6d0436885201db3f581523344a734793bb989549 jdk8-b52
|
||||
54240c1b8e87758f28da2c6a569a926fd9e0910a jdk8-b53
|
||||
9e3ae661284dc04185b029d85440fe7811f1ed07 hs24-b21
|
||||
e8fb566b94667f88462164defa654203f0ab6820 jdk8-b54
|
||||
09ea7e0752b306b8ae74713aeb4eb6263e1c6836 hs24-b22
|
||||
af0c8a0808516317333dcf9af15567cdd52761ce jdk8-b55
|
||||
6124ff4218296c91e4a72f1a76c064892d39d61b jdk8-b56
|
||||
9b076bc3ab67d42d1d02144ef8dcd6006a7fc0d6 hs25-b01
|
||||
d70102c4cb73158902acaa6016f47c7bc14e0d67 jdk8-b57
|
||||
5f54277c67f755a377999bff904ab48aa63ddaf9 hs25-b02
|
||||
6bb378c50828e9d76fb2653d1712c66ea8fc47db jdk8-b58
|
||||
f2e12eb74117c917c0bb264694c02de4a6a15a10 hs25-b03
|
||||
8a1a6b9b4f20fd2f6a12441d638e51f19a82db19 jdk8-b59
|
||||
1cc7a2a11d00832e3d07f81f3744a6883422db7e hs25-b04
|
||||
3cfd05b2219a29649741a52637696f06acf24a4e jdk8-b60
|
||||
b261523fe66c40a02968f0aa7e73602491bb3386 hs25-b05
|
||||
4547dc71db765276e027b0c2780b724bae0a07d3 jdk8-b61
|
||||
d0337c31c8be7716369b4e7c3bd5f352983c6a06 hs25-b06
|
||||
dccd40de8db1fa96f186e6179907818d75320440 jdk8-b62
|
||||
dc16fe422c535ecd4e9f80fb814a1bb9704da6f5 hs25-b07
|
||||
|
||||
@@ -38,10 +38,10 @@ Available commands:
|
||||
assert true | false <font color="red">turn on/off asserts in SA code</font>
|
||||
attach pid | exec core <font color="red">attach SA to a process or core</font>
|
||||
class name <font color="red">find a Java class from debuggee and print oop</font>
|
||||
classes <font color="red">print all loaded Java classes with klassOop</font>
|
||||
classes <font color="red">print all loaded Java classes with Klass*</font>
|
||||
detach <font color="red">detach SA from current target</font>
|
||||
dis address [ length ] <font color="red">disassemble (sparc/x86) specified number of instructions from given address</font>
|
||||
dumpclass { address | name } [ directory ] <font color="red">dump .class file for given klassOop or class name</font>
|
||||
dumpclass { address | name } [ directory ] <font color="red">dump .class file for given Klass* or class name</font>
|
||||
dumpheap [ file ] <font color="red">dump heap in hprof binary format</font>
|
||||
echo [ true | false ] <font color="red">turn on/off command echo mode</font>
|
||||
examine [ address/count ] | [ address,address] <font color="red">show contents of memory from given address</font>
|
||||
@@ -51,7 +51,7 @@ Available commands:
|
||||
help [ command ] <font color="red">print help message for all commands or just given command</font>
|
||||
history <font color="red">show command history. usual !command-number syntax works.</font>
|
||||
inspect expression <font color="red">inspect a given oop</font>
|
||||
jdis address <font color="red">show bytecode disassembly of a given methodOop</font>
|
||||
jdis address <font color="red">show bytecode disassembly of a given Method*</font>
|
||||
jhisto <font color="red">show Java heap histogram</font>
|
||||
jseval script <font color="red">evaluate a given string as JavaScript code</font>
|
||||
jsload file <font color="red">load and evaluate a JavaScript file</font>
|
||||
@@ -59,7 +59,7 @@ Available commands:
|
||||
livenmethods <font color="red">show all live nmethods</font>
|
||||
mem address [ length ] <font color="red">show contents of memory -- also shows closest ELF/COFF symbol if found</font>
|
||||
pmap <font color="red">show Solaris pmap-like output</font>
|
||||
print expression <font color="red">print given klassOop, methodOop or arbitrary address</font>
|
||||
print expression <font color="red">print given Klass*, Method* or arbitrary address</font>
|
||||
printas type expression <font color="red">print given address as given HotSpot type. eg. print JavaThread <address></font>
|
||||
printstatics [ type ] <font color="red">print static fields of given HotSpot type (or all types if none specified)</font>
|
||||
pstack [-v] <font color="red">show mixed mode stack trace for all Java, non-Java threads. -v is verbose mode</font>
|
||||
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
<p> This class finds transitive closure of dependencies from a given
|
||||
root set of classes. If your project has lots of .class files and you
|
||||
want to ship only those .class files which are used (transitively)
|
||||
from a root set of classes, then you can use this utility. </p> <p>
|
||||
How does it work?</p>
|
||||
|
||||
<p> We walk through all constant pool entries of a given class and
|
||||
find all modified UTF-8 entries. Anything that looks like a class name is
|
||||
considered as a class and we search for that class in the given
|
||||
classpath. If we find a .class of that name, then we add that class to
|
||||
list.</p>
|
||||
|
||||
<p> We could have used CONSTANT_ClassInfo type constants only. But
|
||||
that will miss classes used through Class.forName or xyz.class
|
||||
construct. But, if you refer to a class name in some other string we
|
||||
would include it as dependency :(. But this is quite unlikely
|
||||
anyway. To look for exact Class.forName argument(s) would involve
|
||||
bytecode analysis. Also, we handle only simple reflection. If you
|
||||
accept name of a class from externally (for eg properties file or
|
||||
command line args for example, this utility will not be able to find
|
||||
that dependency. In such cases, include those classes in the root set.
|
||||
</p>
|
||||
*/
|
||||
|
||||
public class ClosureFinder {
|
||||
private Collection roots; // root class names Collection<String>
|
||||
private Map visitedClasses; // set of all dependencies as a Map
|
||||
private String classPath; // classpath to look for .class files
|
||||
private String[] pathComponents; // classpath components
|
||||
private static final boolean isWindows = File.separatorChar != '/';
|
||||
|
||||
public ClosureFinder(Collection roots, String classPath) {
|
||||
this.roots = roots;
|
||||
this.classPath = classPath;
|
||||
parseClassPath();
|
||||
}
|
||||
|
||||
// parse classPath into pathComponents array
|
||||
private void parseClassPath() {
|
||||
List paths = new ArrayList();
|
||||
StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
|
||||
while (st.hasMoreTokens())
|
||||
paths.add(st.nextToken());
|
||||
|
||||
Object[] arr = paths.toArray();
|
||||
pathComponents = new String[arr.length];
|
||||
System.arraycopy(arr, 0, pathComponents, 0, arr.length);
|
||||
}
|
||||
|
||||
// if output is aleady not computed, compute it now
|
||||
// result is a map from class file name to base path where the .class was found
|
||||
public Map find() {
|
||||
if (visitedClasses == null) {
|
||||
visitedClasses = new HashMap();
|
||||
computeClosure();
|
||||
}
|
||||
return visitedClasses;
|
||||
}
|
||||
|
||||
// compute closure for all given root classes
|
||||
private void computeClosure() {
|
||||
for (Iterator rootsItr = roots.iterator(); rootsItr.hasNext();) {
|
||||
String name = (String) rootsItr.next();
|
||||
name = name.substring(0, name.indexOf(".class"));
|
||||
computeClosure(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// looks up for .class in pathComponents and returns
|
||||
// base path if found, else returns null
|
||||
private String lookupClassFile(String classNameAsPath) {
|
||||
for (int i = 0; i < pathComponents.length; i++) {
|
||||
File f = new File(pathComponents[i] + File.separator +
|
||||
classNameAsPath + ".class");
|
||||
if (f.exists()) {
|
||||
if (isWindows) {
|
||||
String name = f.getName();
|
||||
// Windows reports special devices AUX,NUL,CON as files
|
||||
// under any directory. It does not care about file extention :-(
|
||||
if (name.compareToIgnoreCase("AUX.class") == 0 ||
|
||||
name.compareToIgnoreCase("NUL.class") == 0 ||
|
||||
name.compareToIgnoreCase("CON.class") == 0) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return pathComponents[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// from JVM spec. 2'nd edition section 4.4
|
||||
private static final int CONSTANT_Class = 7;
|
||||
private static final int CONSTANT_FieldRef = 9;
|
||||
private static final int CONSTANT_MethodRef = 10;
|
||||
private static final int CONSTANT_InterfaceMethodRef = 11;
|
||||
private static final int CONSTANT_String = 8;
|
||||
private static final int CONSTANT_Integer = 3;
|
||||
private static final int CONSTANT_Float = 4;
|
||||
private static final int CONSTANT_Long = 5;
|
||||
private static final int CONSTANT_Double = 6;
|
||||
private static final int CONSTANT_NameAndType = 12;
|
||||
private static final int CONSTANT_Utf8 = 1;
|
||||
|
||||
// whether a given string may be a class name?
|
||||
private boolean mayBeClassName(String internalClassName) {
|
||||
int len = internalClassName.length();
|
||||
for (int s = 0; s < len; s++) {
|
||||
char c = internalClassName.charAt(s);
|
||||
if (!Character.isJavaIdentifierPart(c) && c != '/')
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// compute closure for a given class
|
||||
private void computeClosure(String className) {
|
||||
if (visitedClasses.get(className) != null) return;
|
||||
String basePath = lookupClassFile(className);
|
||||
if (basePath != null) {
|
||||
visitedClasses.put(className, basePath);
|
||||
try {
|
||||
File classFile = new File(basePath + File.separator + className + ".class");
|
||||
FileInputStream fis = new FileInputStream(classFile);
|
||||
DataInputStream dis = new DataInputStream(fis);
|
||||
// look for .class signature
|
||||
if (dis.readInt() != 0xcafebabe) {
|
||||
System.err.println(classFile.getAbsolutePath() + " is not a valid .class file");
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore major and minor version numbers
|
||||
dis.readShort();
|
||||
dis.readShort();
|
||||
|
||||
// read number of constant pool constants
|
||||
int numConsts = (int) dis.readShort();
|
||||
String[] strings = new String[numConsts];
|
||||
|
||||
// zero'th entry is unused
|
||||
for (int cpIndex = 1; cpIndex < numConsts; cpIndex++) {
|
||||
int constType = (int) dis.readByte();
|
||||
switch (constType) {
|
||||
case CONSTANT_Class:
|
||||
case CONSTANT_String:
|
||||
dis.readShort(); // string name index;
|
||||
break;
|
||||
|
||||
case CONSTANT_FieldRef:
|
||||
case CONSTANT_MethodRef:
|
||||
case CONSTANT_InterfaceMethodRef:
|
||||
case CONSTANT_NameAndType:
|
||||
case CONSTANT_Integer:
|
||||
case CONSTANT_Float:
|
||||
// all these are 4 byte constants
|
||||
dis.readInt();
|
||||
break;
|
||||
|
||||
case CONSTANT_Long:
|
||||
case CONSTANT_Double:
|
||||
// 8 byte constants
|
||||
dis.readLong();
|
||||
// occupies 2 cp entries
|
||||
cpIndex++;
|
||||
break;
|
||||
|
||||
|
||||
case CONSTANT_Utf8: {
|
||||
strings[cpIndex] = dis.readUTF();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
System.err.println("invalid constant pool entry");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// now walk thru the string constants and look for class names
|
||||
for (int s = 0; s < numConsts; s++) {
|
||||
if (strings[s] != null && mayBeClassName(strings[s]))
|
||||
computeClosure(strings[s].replace('/', File.separatorChar));
|
||||
}
|
||||
|
||||
} catch (IOException exp) {
|
||||
// ignore for now
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// a sample main that accepts roots classes in a file and classpath as args
|
||||
public static void main(String[] args) {
|
||||
if (args.length != 2) {
|
||||
System.err.println("Usage: ClosureFinder <root class file> <class path>");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
List roots = new ArrayList();
|
||||
try {
|
||||
FileInputStream fis = new FileInputStream(args[0]);
|
||||
DataInputStream dis = new DataInputStream(fis);
|
||||
String line = null;
|
||||
while ((line = dis.readLine()) != null) {
|
||||
if (isWindows) {
|
||||
line = line.replace('/', File.separatorChar);
|
||||
}
|
||||
roots.add(line);
|
||||
}
|
||||
} catch (IOException exp) {
|
||||
System.err.println(exp.getMessage());
|
||||
System.exit(2);
|
||||
}
|
||||
|
||||
ClosureFinder cf = new ClosureFinder(roots, args[1]);
|
||||
Map out = cf.find();
|
||||
Iterator res = out.keySet().iterator();
|
||||
for(; res.hasNext(); ) {
|
||||
String className = (String) res.next();
|
||||
System.out.println(className + ".class");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -41,10 +41,7 @@ endif
|
||||
PKGLIST = \
|
||||
sun.jvm.hotspot \
|
||||
sun.jvm.hotspot.asm \
|
||||
sun.jvm.hotspot.asm.amd64 \
|
||||
sun.jvm.hotspot.asm.ia64 \
|
||||
sun.jvm.hotspot.asm.sparc \
|
||||
sun.jvm.hotspot.asm.x86 \
|
||||
sun.jvm.hotspot.bugspot \
|
||||
sun.jvm.hotspot.bugspot.tree \
|
||||
sun.jvm.hotspot.c1 \
|
||||
@@ -138,10 +135,7 @@ com.sun.java.swing.ui
|
||||
FILELIST = \
|
||||
sun/jvm/hotspot/*.java \
|
||||
sun/jvm/hotspot/asm/*.java \
|
||||
sun/jvm/hotspot/asm/amd64/*.java \
|
||||
sun/jvm/hotspot/asm/ia64/*.java \
|
||||
sun/jvm/hotspot/asm/sparc/*.java \
|
||||
sun/jvm/hotspot/asm/x86/*.java \
|
||||
sun/jvm/hotspot/bugspot/*.java \
|
||||
sun/jvm/hotspot/bugspot/tree/*.java \
|
||||
sun/jvm/hotspot/c1/*.java \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -26,7 +26,7 @@
|
||||
# This file sets common environment variables for all SA scripts
|
||||
|
||||
OS=`uname`
|
||||
STARTDIR=`dirname $0`
|
||||
STARTDIR=`(cd \`dirname $0 \`; pwd)`
|
||||
ARCH=`uname -m`
|
||||
|
||||
if [ "x$SA_JAVA" = "x" ]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,10 +25,11 @@
|
||||
|
||||
. `dirname $0`/saenv.sh
|
||||
|
||||
if [ -f $STARTDIR/sa.jar ] ; then
|
||||
CP=$STARTDIR/sa.jar
|
||||
if [ -f $STARTDIR/../lib/sa-jdi.jar ] ; then
|
||||
CP=$STARTDIR/../lib/sa-jdi.jar
|
||||
else
|
||||
CP=$STARTDIR/../build/classes
|
||||
fi
|
||||
|
||||
$SA_JAVA -classpath $CP ${OPTIONS} -Djava.rmi.server.codebase=file:/$CP -Djava.security.policy=$STARTDIR\/grantAll.policy sun.jvm.hotspot.DebugServer $*
|
||||
$STARTDIR/java -classpath $CP ${OPTIONS} -Djava.rmi.server.codebase=file://$CP -Djava.security.policy=${STARTDIR}/grantAll.policy sun.jvm.hotspot.DebugServer $*
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -31,7 +31,13 @@
|
||||
#import <mach/mach.h>
|
||||
#import <mach/mach_types.h>
|
||||
#import <sys/sysctl.h>
|
||||
#import <stdio.h>
|
||||
#import <stdarg.h>
|
||||
#import <stdlib.h>
|
||||
#import <strings.h>
|
||||
#import <dlfcn.h>
|
||||
#import <limits.h>
|
||||
#import <errno.h>
|
||||
|
||||
jboolean debug = JNI_FALSE;
|
||||
|
||||
@@ -60,6 +66,9 @@ static task_t getTask(JNIEnv *env, jobject this_obj) {
|
||||
#define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}
|
||||
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
|
||||
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
|
||||
#define CHECK_EXCEPTION_CLEAR if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); }
|
||||
#define CHECK_EXCEPTION_CLEAR_VOID if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); return; }
|
||||
#define CHECK_EXCEPTION_CLEAR_(value) if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); return value; }
|
||||
|
||||
static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
|
||||
(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
|
||||
@@ -404,3 +413,164 @@ JNF_COCOA_ENTER(env);
|
||||
}
|
||||
JNF_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_jvm_hotspot_asm_Disassembler
|
||||
* Method: load_library
|
||||
* Signature: (Ljava/lang/String;)L
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_asm_Disassembler_load_1library(JNIEnv * env,
|
||||
jclass disclass,
|
||||
jstring jrepath_s,
|
||||
jstring libname_s) {
|
||||
uintptr_t func = 0;
|
||||
const char* error_message = NULL;
|
||||
const char* java_home;
|
||||
jboolean isCopy;
|
||||
uintptr_t *handle = NULL;
|
||||
|
||||
const char * jrepath = (*env)->GetStringUTFChars(env, jrepath_s, &isCopy); // like $JAVA_HOME/jre/lib/sparc/
|
||||
const char * libname = (*env)->GetStringUTFChars(env, libname_s, &isCopy);
|
||||
char buffer[128];
|
||||
|
||||
/* Load the hsdis library */
|
||||
void* hsdis_handle;
|
||||
hsdis_handle = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL);
|
||||
if (hsdis_handle == NULL) {
|
||||
snprintf(buffer, sizeof(buffer), "%s%s", jrepath, libname);
|
||||
hsdis_handle = dlopen(buffer, RTLD_LAZY | RTLD_GLOBAL);
|
||||
}
|
||||
if (hsdis_handle != NULL) {
|
||||
func = (uintptr_t)dlsym(hsdis_handle, "decode_instructions_virtual");
|
||||
}
|
||||
if (func == 0) {
|
||||
error_message = dlerror();
|
||||
fprintf(stderr, "%s\n", error_message);
|
||||
}
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, libname_s, libname);
|
||||
(*env)->ReleaseStringUTFChars(env, jrepath_s, jrepath);
|
||||
|
||||
if (func == 0) {
|
||||
/* Couldn't find entry point. error_message should contain some
|
||||
* platform dependent error message.
|
||||
*/
|
||||
THROW_NEW_DEBUGGER_EXCEPTION(error_message);
|
||||
}
|
||||
return (jlong)func;
|
||||
}
|
||||
|
||||
/* signature of decode_instructions_virtual from hsdis.h */
|
||||
typedef void* (*decode_func)(uintptr_t start_va, uintptr_t end_va,
|
||||
unsigned char* start, uintptr_t length,
|
||||
void* (*event_callback)(void*, const char*, void*),
|
||||
void* event_stream,
|
||||
int (*printf_callback)(void*, const char*, ...),
|
||||
void* printf_stream,
|
||||
const char* options);
|
||||
|
||||
/* container for call back state when decoding instructions */
|
||||
typedef struct {
|
||||
JNIEnv* env;
|
||||
jobject dis;
|
||||
jobject visitor;
|
||||
jmethodID handle_event;
|
||||
jmethodID raw_print;
|
||||
char buffer[4096];
|
||||
} decode_env;
|
||||
|
||||
|
||||
/* event callback binding to Disassembler.handleEvent */
|
||||
static void* event_to_env(void* env_pv, const char* event, void* arg) {
|
||||
decode_env* denv = (decode_env*)env_pv;
|
||||
JNIEnv* env = denv->env;
|
||||
jstring event_string = (*env)->NewStringUTF(env, event);
|
||||
jlong result = (*env)->CallLongMethod(env, denv->dis, denv->handle_event, denv->visitor,
|
||||
event_string, (jlong) (uintptr_t)arg);
|
||||
/* ignore exceptions for now */
|
||||
CHECK_EXCEPTION_CLEAR_((void *)0);
|
||||
return (void*)(uintptr_t)result;
|
||||
}
|
||||
|
||||
/* printing callback binding to Disassembler.rawPrint */
|
||||
static int printf_to_env(void* env_pv, const char* format, ...) {
|
||||
jstring output;
|
||||
va_list ap;
|
||||
int cnt;
|
||||
decode_env* denv = (decode_env*)env_pv;
|
||||
JNIEnv* env = denv->env;
|
||||
size_t flen = strlen(format);
|
||||
const char* raw = NULL;
|
||||
|
||||
if (flen == 0) return 0;
|
||||
if (flen < 2 ||
|
||||
strchr(format, '%') == NULL) {
|
||||
raw = format;
|
||||
} else if (format[0] == '%' && format[1] == '%' &&
|
||||
strchr(format+2, '%') == NULL) {
|
||||
// happens a lot on machines with names like %foo
|
||||
flen--;
|
||||
raw = format+1;
|
||||
}
|
||||
if (raw != NULL) {
|
||||
jstring output = (*env)->NewStringUTF(env, raw);
|
||||
(*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
|
||||
CHECK_EXCEPTION_CLEAR;
|
||||
return (int) flen;
|
||||
}
|
||||
va_start(ap, format);
|
||||
cnt = vsnprintf(denv->buffer, sizeof(denv->buffer), format, ap);
|
||||
va_end(ap);
|
||||
|
||||
output = (*env)->NewStringUTF(env, denv->buffer);
|
||||
(*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
|
||||
CHECK_EXCEPTION_CLEAR;
|
||||
return cnt;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_jvm_hotspot_asm_Disassembler
|
||||
* Method: decode
|
||||
* Signature: (Lsun/jvm/hotspot/asm/InstructionVisitor;J[BLjava/lang/String;J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_asm_Disassembler_decode(JNIEnv * env,
|
||||
jobject dis,
|
||||
jobject visitor,
|
||||
jlong startPc,
|
||||
jbyteArray code,
|
||||
jstring options_s,
|
||||
jlong decode_instructions_virtual) {
|
||||
jboolean isCopy;
|
||||
jbyte* start = (*env)->GetByteArrayElements(env, code, &isCopy);
|
||||
jbyte* end = start + (*env)->GetArrayLength(env, code);
|
||||
const char * options = (*env)->GetStringUTFChars(env, options_s, &isCopy);
|
||||
jclass disclass = (*env)->GetObjectClass(env, dis);
|
||||
|
||||
decode_env denv;
|
||||
denv.env = env;
|
||||
denv.dis = dis;
|
||||
denv.visitor = visitor;
|
||||
|
||||
/* find Disassembler.handleEvent callback */
|
||||
denv.handle_event = (*env)->GetMethodID(env, disclass, "handleEvent",
|
||||
"(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;J)J");
|
||||
CHECK_EXCEPTION_CLEAR_VOID
|
||||
|
||||
/* find Disassembler.rawPrint callback */
|
||||
denv.raw_print = (*env)->GetMethodID(env, disclass, "rawPrint",
|
||||
"(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;)V");
|
||||
CHECK_EXCEPTION_CLEAR_VOID
|
||||
|
||||
/* decode the buffer */
|
||||
(*(decode_func)(uintptr_t)decode_instructions_virtual)(startPc,
|
||||
startPc + end - start,
|
||||
(unsigned char*)start,
|
||||
end - start,
|
||||
&event_to_env, (void*) &denv,
|
||||
&printf_to_env, (void*) &denv,
|
||||
options);
|
||||
|
||||
/* cleanup */
|
||||
(*env)->ReleaseByteArrayElements(env, code, start, JNI_ABORT);
|
||||
(*env)->ReleaseStringUTFChars(env, options_s, options);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -210,7 +210,6 @@ static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr)
|
||||
// mapped. This structure gets written to a file. It is not a class,
|
||||
// so that the compilers don't add any compiler-private data to it.
|
||||
|
||||
// Refer to CompactingPermGenGen::n_regions in compactingPermGenGen.hpp
|
||||
#define NUM_SHARED_MAPS 4
|
||||
|
||||
// Refer to FileMapInfo::_current_version in filemap.hpp
|
||||
@@ -234,7 +233,7 @@ struct FileMapHeader {
|
||||
char _read_only; // read only space?
|
||||
char _allow_exec; // executable code in space?
|
||||
|
||||
} _space[NUM_SHARED_MAPS]; // was _space[CompactingPermGenGen::n_regions];
|
||||
} _space[NUM_SHARED_MAPS];
|
||||
|
||||
// Ignore the rest of the FileMapHeader. We don't need those fields here.
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -55,11 +55,11 @@ static jmethodID listAdd_ID = 0;
|
||||
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
|
||||
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
|
||||
|
||||
static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
|
||||
void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
|
||||
(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
|
||||
}
|
||||
|
||||
static struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
|
||||
struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
|
||||
jlong ptr = (*env)->GetLongField(env, this_obj, p_ps_prochandle_ID);
|
||||
return (struct ps_prochandle*)(intptr_t)ptr;
|
||||
}
|
||||
@@ -280,6 +280,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
return (err == PS_OK)? array : 0;
|
||||
}
|
||||
|
||||
#if defined(i386) || defined(ia64) || defined(amd64) || defined(sparc) || defined(sparcv9)
|
||||
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
|
||||
(JNIEnv *env, jobject this_obj, jint lwp_id) {
|
||||
|
||||
@@ -410,3 +411,4 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
|
||||
(*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
|
||||
return array;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -36,25 +36,33 @@ SOURCES = salibelf.c \
|
||||
|
||||
INCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux
|
||||
|
||||
OBJS = $(SOURCES:.c=.o)
|
||||
OBJS = $(SOURCES:%.c=$(ARCH)/%.o) $(ARCH)/sadis.o
|
||||
|
||||
LIBS = -lthread_db
|
||||
|
||||
CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -D_FILE_OFFSET_BITS=64
|
||||
CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -I$(ARCH)
|
||||
|
||||
LIBSA = $(ARCH)/libsaproc.so
|
||||
|
||||
all: $(LIBSA)
|
||||
|
||||
LinuxDebuggerLocal.o: LinuxDebuggerLocal.c
|
||||
$(JAVAH) -jni -classpath ../../../build/classes \
|
||||
$(ARCH):
|
||||
mkdir $(ARCH)
|
||||
|
||||
$(ARCH)/LinuxDebuggerLocal.o: LinuxDebuggerLocal.c
|
||||
$(JAVAH) -jni -classpath ../../../build/classes -d $(ARCH) \
|
||||
sun.jvm.hotspot.debugger.x86.X86ThreadContext \
|
||||
sun.jvm.hotspot.debugger.sparc.SPARCThreadContext \
|
||||
sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
|
||||
$(GCC) $(CFLAGS) $<
|
||||
$(GCC) $(CFLAGS) $< -o $@
|
||||
|
||||
.c.obj:
|
||||
$(GCC) $(CFLAGS)
|
||||
$(ARCH)/sadis.o: ../../share/native/sadis.c
|
||||
$(JAVAH) -jni -classpath ../../../build/classes -d $(ARCH) \
|
||||
sun.jvm.hotspot.asm.Disassembler
|
||||
$(GCC) $(CFLAGS) $< -o $@
|
||||
|
||||
$(ARCH)/%.o: %.c
|
||||
$(GCC) $(CFLAGS) $< -o $@
|
||||
|
||||
ifndef LDNOMAP
|
||||
LFLAGS_LIBSA = -Xlinker --version-script=mapfile
|
||||
@@ -68,8 +76,7 @@ ifneq ($(_HAS_HASH_STYLE_GNU),)
|
||||
endif
|
||||
LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE)
|
||||
|
||||
$(LIBSA): $(OBJS) mapfile
|
||||
if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi
|
||||
$(LIBSA): $(ARCH) $(OBJS) mapfile
|
||||
$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
|
||||
|
||||
test.o: test.c
|
||||
@@ -79,7 +86,4 @@ test: test.o
|
||||
$(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBSA)
|
||||
rm -rf $(OBJS)
|
||||
rmdir $(ARCH)
|
||||
|
||||
rm -fr $(ARCH)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,10 +25,15 @@
|
||||
#ifndef _LIBPROC_H_
|
||||
#define _LIBPROC_H_
|
||||
|
||||
#include <jni.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include "proc_service.h"
|
||||
|
||||
#if defined(arm) || defined(ppc)
|
||||
#include "libproc_md.h"
|
||||
#endif
|
||||
|
||||
#if defined(sparc) || defined(sparcv9)
|
||||
/*
|
||||
If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
|
||||
@@ -139,4 +144,8 @@ uintptr_t lookup_symbol(struct ps_prochandle* ph, const char* object_name,
|
||||
// address->nearest symbol lookup. return NULL for no symbol
|
||||
const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* poffset);
|
||||
|
||||
struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj);
|
||||
|
||||
void throw_new_debugger_exception(JNIEnv* env, const char* errMsg);
|
||||
|
||||
#endif //__LIBPROC_H_
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -22,7 +20,6 @@
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Define public interface.
|
||||
|
||||
@@ -40,6 +37,10 @@ SUNWprivate_1.1 {
|
||||
Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0;
|
||||
Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0;
|
||||
|
||||
# Disassembler interface
|
||||
Java_sun_jvm_hotspot_asm_Disassembler_decode;
|
||||
Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
|
||||
|
||||
# proc_service.h functions - to be used by libthread_db
|
||||
ps_getpid;
|
||||
ps_pglobal_lookup;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -209,7 +209,6 @@ static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr)
|
||||
// mapped. This structure gets written to a file. It is not a class,
|
||||
// so that the compilers don't add any compiler-private data to it.
|
||||
|
||||
// Refer to CompactingPermGenGen::n_regions in compactingPermGenGen.hpp
|
||||
#define NUM_SHARED_MAPS 4
|
||||
|
||||
// Refer to FileMapInfo::_current_version in filemap.hpp
|
||||
@@ -233,7 +232,7 @@ struct FileMapHeader {
|
||||
char _read_only; // read only space?
|
||||
char _allow_exec; // executable code in space?
|
||||
|
||||
} _space[NUM_SHARED_MAPS]; // was _space[CompactingPermGenGen::n_regions];
|
||||
} _space[NUM_SHARED_MAPS];
|
||||
|
||||
// Ignore the rest of the FileMapHeader. We don't need those fields here.
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -27,7 +27,7 @@
|
||||
# sparcv9: Build the 64 bit sparcv9 version in ./sparcv9
|
||||
# i386: Build the 32 bit i386 version in ./i386
|
||||
|
||||
.PHONY: sparc sparcv9 i386
|
||||
.PHONY: sparc sparcv9 i386 amd64
|
||||
|
||||
ARCH_ORIG = $(shell uname -p)
|
||||
|
||||
@@ -36,6 +36,8 @@ RM := /usr/bin/rm
|
||||
MKDIRS := /usr/bin/mkdir -p
|
||||
|
||||
CLASSES_DIR = ../../../../build/classes
|
||||
SAPROC_INCLUDES=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris
|
||||
SADIS=../../../share/native/sadis.c
|
||||
|
||||
ifeq "$(ARCH_ORIG)" "i386"
|
||||
ALL_TARGET = i386 $(filter amd64,$(shell isalist))
|
||||
@@ -43,6 +45,11 @@ else
|
||||
ALL_TARGET = sparc sparcv9
|
||||
endif
|
||||
|
||||
CFLAGS/i386 =
|
||||
CFLAGS/amd64 = -xarch=amd64
|
||||
CFLAGS/sparc = -xarch=v8
|
||||
CFLAGS/sparv9 = -xarch=v9
|
||||
|
||||
all:: $(ALL_TARGET)
|
||||
|
||||
javahomecheck::
|
||||
@@ -51,34 +58,13 @@ javahomecheck::
|
||||
exit 1 ; \
|
||||
fi
|
||||
|
||||
i386:: javahomecheck
|
||||
i386 amd64 sparc sparcv9:: javahomecheck
|
||||
$(MKDIRS) $@
|
||||
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
|
||||
CC -G -KPIC -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
|
||||
-M mapfile -o $@/libsaproc.so -ldemangle
|
||||
CC -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
|
||||
|
||||
amd64:: javahomecheck
|
||||
$(MKDIRS) $@
|
||||
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
|
||||
CC -G -KPIC -xarch=amd64 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
|
||||
-M mapfile -o $@/libsaproc.so -ldemangle
|
||||
CC -xarch=amd64 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
|
||||
|
||||
sparc:: javahomecheck
|
||||
$(MKDIRS) $@
|
||||
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
|
||||
CC -G -KPIC -xarch=v8 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
|
||||
-M mapfile -o $@/libsaproc.so -ldemangle
|
||||
CC -xarch=v8 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
|
||||
|
||||
sparcv9:: javahomecheck
|
||||
$(MKDIRS) $@
|
||||
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
|
||||
CC -G -KPIC -xarch=v9 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
|
||||
-M mapfile -o $@/libsaproc.so -ldemangle
|
||||
CC -xarch=v9 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
|
||||
@$(JAVA_HOME)/bin/javah -classpath $(CLASSES_DIR) -d $@ -jni sun.jvm.hotspot.asm.Disassembler sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
|
||||
CC $(CFLAGS/$@) -c -g -Kpic ${SAPROC_INCLUDES} -I$@ saproc.cpp -o $@/saproc.o
|
||||
cc $(CFLAGS/$@) -c -g -Kpic ${SAPROC_INCLUDES} -I$@ $(SADIS) -o $@/sadis.o
|
||||
CC $(CFLAGS/$@) -g -G -Kpic $@/saproc.o $@/sadis.o -M mapfile -o $@/libsaproc.so -ldemangle
|
||||
CC $(CFLAGS/$@) -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
|
||||
|
||||
clean::
|
||||
$(RM) -rf sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal.h
|
||||
$(RM) -rf sparc sparcv9 i386
|
||||
$(RM) -rf sparc sparcv9 i386 amd64
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -22,10 +20,8 @@
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
#
|
||||
|
||||
# Define public interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2;
|
||||
@@ -47,6 +43,9 @@ SUNWprivate_1.1 {
|
||||
Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_writeBytesToProcess0;
|
||||
# this is needed by saproc_audit.c to redirect opens in libproc.so
|
||||
libsaproc_open;
|
||||
local:
|
||||
# Disassembler interface
|
||||
Java_sun_jvm_hotspot_asm_Disassembler_decode;
|
||||
Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -510,7 +510,6 @@ wrapper_fill_cframe_list(void *cd, const prgregset_t regs, uint_t argc,
|
||||
// mapped. This structure gets written to a file. It is not a class, so
|
||||
// that the compilers don't add any compiler-private data to it.
|
||||
|
||||
// Refer to CompactingPermGenGen::n_regions in compactingPermGenGen.hpp
|
||||
const int NUM_SHARED_MAPS = 4;
|
||||
|
||||
// Refer to FileMapInfo::_current_version in filemap.hpp
|
||||
@@ -531,7 +530,7 @@ struct FileMapHeader {
|
||||
bool _read_only; // read only space?
|
||||
bool _allow_exec; // executable code in space?
|
||||
|
||||
} _space[NUM_SHARED_MAPS]; // was _space[CompactingPermGenGen::n_regions];
|
||||
} _space[NUM_SHARED_MAPS];
|
||||
|
||||
// Ignore the rest of the FileMapHeader. We don't need those fields here.
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -35,6 +35,8 @@ WINDBG_LIB32=$(WINDBG_HOME)/sdk/lib/i386
|
||||
WINDBG_LIB_IA64=$(WINDBG_HOME)/sdk/lib/ia64
|
||||
WINDBG_LIB_AMD64=$(WINDBG_HOME)/sdk/lib/amd64
|
||||
|
||||
SADIS=../../../share/native/sadis.c
|
||||
|
||||
# These do not need to be optimized (don't run a lot of code) and it
|
||||
# will be useful to have the assertion checks in place
|
||||
|
||||
@@ -57,23 +59,29 @@ ia64: ia64/$(SAWINDBGDLL)
|
||||
|
||||
amd64: amd64/$(SAWINDBGDLL)
|
||||
|
||||
i386/$(SAWINDBGDLL) : sawindbg.cpp
|
||||
i386/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
|
||||
@ mkdir -p i386
|
||||
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.x86.X86ThreadContext
|
||||
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
|
||||
@ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sawindbg.pch" /Fo"i386/" /Fd"i386/" /c sawindbg.cpp
|
||||
$(LINK32) /out:$@ /DLL i386/sawindbg.obj $(LIBS32)
|
||||
@ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sadis.pch" /Fo"i386/" /Fd"i386/" /c $(SADIS)
|
||||
$(LINK32) /out:$@ /DLL i386/sawindbg.obj i386/sadis.obj $(LIBS32)
|
||||
|
||||
ia64/$(SAWINDBGDLL) : sawindbg.cpp
|
||||
ia64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
|
||||
@ mkdir -p ia64
|
||||
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
|
||||
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
|
||||
@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sawindbg.pch" /Fo"ia64/" /Fd"ia64/" /c sawindbg.cpp
|
||||
$(LINK64) /out:$@ /DLL ia64/sawindbg.obj $(LIBS_IA64)
|
||||
@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sadis.pch" /Fo"ia64/" /Fd"ia64/" /c $(SADIS)
|
||||
$(LINK64) /out:$@ /DLL ia64/sawindbg.obj ia64/sadis.obj $(LIBS_IA64)
|
||||
|
||||
amd64/$(SAWINDBGDLL) : sawindbg.cpp
|
||||
amd64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
|
||||
@ mkdir -p amd64
|
||||
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
|
||||
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
|
||||
@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sawindbg.pch" /Fo"amd64/" /Fd"amd64/" /c sawindbg.cpp
|
||||
$(LINK64) /out:$@ /DLL amd64/sawindbg.obj $(LIBS_AMD64)
|
||||
@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sadis.pch" /Fo"amd64/" /Fd"amd64/" /c $(SADIS)
|
||||
$(LINK64) /out:$@ /DLL amd64/sawindbg.obj amd64/sadis.obj $(LIBS_AMD64)
|
||||
|
||||
clean:
|
||||
rm *.h
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -42,6 +42,7 @@ import sun.jvm.hotspot.memory.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.opto.*;
|
||||
import sun.jvm.hotspot.ci.*;
|
||||
import sun.jvm.hotspot.asm.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
import sun.jvm.hotspot.utilities.soql.*;
|
||||
@@ -564,6 +565,71 @@ public class CommandProcessor {
|
||||
}
|
||||
}
|
||||
},
|
||||
// decode raw address
|
||||
new Command("dis", "dis address [length]", false) {
|
||||
public void doit(Tokens t) {
|
||||
int tokens = t.countTokens();
|
||||
if (tokens != 1 && tokens != 2) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
String name = t.nextToken();
|
||||
Address addr = null;
|
||||
int len = 0x10; // default length
|
||||
try {
|
||||
addr = VM.getVM().getDebugger().parseAddress(name);
|
||||
} catch (NumberFormatException e) {
|
||||
out.println(e);
|
||||
return;
|
||||
}
|
||||
if (tokens == 2) {
|
||||
try {
|
||||
len = Integer.parseInt(t.nextToken());
|
||||
} catch (NumberFormatException e) {
|
||||
out.println(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
HTMLGenerator generator = new HTMLGenerator(false);
|
||||
out.println(generator.genHTMLForRawDisassembly(addr, len));
|
||||
}
|
||||
|
||||
},
|
||||
// decode codeblob or nmethod
|
||||
new Command("disassemble", "disassemble address", false) {
|
||||
public void doit(Tokens t) {
|
||||
int tokens = t.countTokens();
|
||||
if (tokens != 1) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
String name = t.nextToken();
|
||||
Address addr = null;
|
||||
try {
|
||||
addr = VM.getVM().getDebugger().parseAddress(name);
|
||||
} catch (NumberFormatException e) {
|
||||
out.println(e);
|
||||
return;
|
||||
}
|
||||
|
||||
HTMLGenerator generator = new HTMLGenerator(false);
|
||||
out.println(generator.genHTML(addr));
|
||||
}
|
||||
},
|
||||
// print Java bytecode disassembly
|
||||
new Command("jdis", "jdis address", false) {
|
||||
public void doit(Tokens t) {
|
||||
int tokens = t.countTokens();
|
||||
if (tokens != 1) {
|
||||
usage();
|
||||
return;
|
||||
}
|
||||
Address a = VM.getVM().getDebugger().parseAddress(t.nextToken());
|
||||
Method m = (Method)Metadata.instantiateWrapperFor(a);
|
||||
HTMLGenerator html = new HTMLGenerator(false);
|
||||
out.println(html.genHTML(m));
|
||||
}
|
||||
},
|
||||
new Command("revptrs", "revptrs address", false) {
|
||||
public void doit(Tokens t) {
|
||||
int tokens = t.countTokens();
|
||||
@@ -634,28 +700,56 @@ public class CommandProcessor {
|
||||
} else {
|
||||
String s = t.nextToken();
|
||||
if (s.equals("-a")) {
|
||||
HeapVisitor iterator = new DefaultHeapVisitor() {
|
||||
public boolean doObj(Oop obj) {
|
||||
if (obj instanceof MethodData) {
|
||||
Method m = ((MethodData)obj).getMethod();
|
||||
out.println("MethodData " + obj.getHandle() + " for " +
|
||||
SystemDictionary sysDict = VM.getVM().getSystemDictionary();
|
||||
sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
|
||||
public void visit(Klass k) {
|
||||
if (k instanceof InstanceKlass) {
|
||||
MethodArray methods = ((InstanceKlass)k).getMethods();
|
||||
for (int i = 0; i < methods.length(); i++) {
|
||||
Method m = methods.at(i);
|
||||
MethodData mdo = m.getMethodData();
|
||||
if (mdo != null) {
|
||||
out.println("MethodData " + mdo.getAddress() + " for " +
|
||||
"method " + m.getMethodHolder().getName().asString() + "." +
|
||||
m.getName().asString() +
|
||||
m.getSignature().asString() + "@" + m.getHandle());
|
||||
((MethodData)obj).printDataOn(out);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
VM.getVM().getObjectHeap().iteratePerm(iterator);
|
||||
} else {
|
||||
Address a = VM.getVM().getDebugger().parseAddress(s);
|
||||
OopHandle handle = a.addOffsetToAsOopHandle(0);
|
||||
MethodData mdo = (MethodData)VM.getVM().getObjectHeap().newOop(handle);
|
||||
m.getSignature().asString() + "@" + m.getAddress());
|
||||
mdo.printDataOn(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
Address a = VM.getVM().getDebugger().parseAddress(s);
|
||||
MethodData mdo = (MethodData) Metadata.instantiateWrapperFor(a);
|
||||
mdo.printDataOn(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("printall", "printall", false) {
|
||||
// Print every MDO in the heap or the one referenced by expression.
|
||||
public void doit(Tokens t) {
|
||||
if (t.countTokens() != 0) {
|
||||
usage();
|
||||
} else {
|
||||
SystemDictionary sysDict = VM.getVM().getSystemDictionary();
|
||||
sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
|
||||
public void visit(Klass k) {
|
||||
if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
|
||||
MethodArray methods = ((InstanceKlass)k).getMethods();
|
||||
for (int i = 0; i < methods.length(); i++) {
|
||||
Method m = methods.at(i);
|
||||
HTMLGenerator gen = new HTMLGenerator(false);
|
||||
out.println(gen.genHTML(m));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
new Command("dumpideal", "dumpideal { -a | id }", false) {
|
||||
// Do a full dump of the nodes reachabile from root in each compiler thread.
|
||||
@@ -1229,7 +1323,7 @@ public class CommandProcessor {
|
||||
}
|
||||
};
|
||||
VM.getVM().getObjectHeap().iterateRaw(iterator);
|
||||
} else if (type.equals("heap") || type.equals("perm")) {
|
||||
} else if (type.equals("heap")) {
|
||||
HeapVisitor iterator = new DefaultHeapVisitor() {
|
||||
public boolean doObj(Oop obj) {
|
||||
int index = 0;
|
||||
@@ -1246,11 +1340,7 @@ public class CommandProcessor {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
if (type.equals("heap")) {
|
||||
VM.getVM().getObjectHeap().iterate(iterator);
|
||||
} else {
|
||||
VM.getVM().getObjectHeap().iteratePerm(iterator);
|
||||
}
|
||||
} else if (type.equals("codecache")) {
|
||||
CodeCacheVisitor v = new CodeCacheVisitor() {
|
||||
public void prologue(Address start, Address end) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -998,7 +998,7 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
curFrame.addressOfInterpreterFrameLocal((int) interpreterFrameMethod.getMaxLocals() + offset),
|
||||
"Interpreter locals area for frame with SP = " + curFrame.getSP()));
|
||||
}
|
||||
String methodAnno = "Interpreter frame methodOop";
|
||||
String methodAnno = "Interpreter frame Method*";
|
||||
if (interpreterFrameMethod == null) {
|
||||
methodAnno += " (BAD OOP)";
|
||||
}
|
||||
@@ -1054,13 +1054,6 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
}
|
||||
}
|
||||
|
||||
if (bad) {
|
||||
// Try perm gen
|
||||
if (heap.permGen().isIn(handle)) {
|
||||
anno = "PermGen ";
|
||||
bad = false;
|
||||
}
|
||||
}
|
||||
} else if (collHeap instanceof ParallelScavengeHeap) {
|
||||
ParallelScavengeHeap heap = (ParallelScavengeHeap) collHeap;
|
||||
if (heap.youngGen().isIn(handle)) {
|
||||
@@ -1069,9 +1062,6 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
} else if (heap.oldGen().isIn(handle)) {
|
||||
anno = "PSOldGen ";
|
||||
bad = false;
|
||||
} else if (heap.permGen().isIn(handle)) {
|
||||
anno = "PSPermGen ";
|
||||
bad = false;
|
||||
}
|
||||
} else {
|
||||
// Optimistically assume the oop isn't bad
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -43,10 +43,6 @@ import sun.jvm.hotspot.utilities.*;
|
||||
* highest-level factory for VM data structures. It makes it simple
|
||||
* to start up the debugging system. </P>
|
||||
*
|
||||
* <P> FIXME: need to add a way to configure the paths to dbx and the
|
||||
* DSO from the outside. However, this should work for now for
|
||||
* internal use. </P>
|
||||
*
|
||||
* <P> FIXME: especially with the addition of remote debugging, this
|
||||
* has turned into a mess; needs rethinking. </P>
|
||||
*/
|
||||
@@ -87,30 +83,7 @@ public class HotSpotAgent {
|
||||
|
||||
private String[] jvmLibNames;
|
||||
|
||||
// FIXME: make these configurable, i.e., via a dotfile; also
|
||||
// consider searching within the JDK from which this Java executable
|
||||
// comes to find them
|
||||
private static final String defaultDbxPathPrefix = "/net/jano.sfbay/export/disk05/hotspot/sa";
|
||||
private static final String defaultDbxSvcAgentDSOPathPrefix = "/net/jano.sfbay/export/disk05/hotspot/sa";
|
||||
|
||||
static void showUsage() {
|
||||
System.out.println(" You can also pass these -D options to java to specify where to find dbx and the \n" +
|
||||
" Serviceability Agent plugin for dbx:");
|
||||
System.out.println(" -DdbxPathName=<path-to-dbx-executable>\n" +
|
||||
" Default is derived from dbxPathPrefix");
|
||||
System.out.println(" or");
|
||||
System.out.println(" -DdbxPathPrefix=<xxx>\n" +
|
||||
" where xxx is the path name of a dir structure that contains:\n" +
|
||||
" <os>/<arch>/bin/dbx\n" +
|
||||
" The default is " + defaultDbxPathPrefix);
|
||||
System.out.println(" and");
|
||||
System.out.println(" -DdbxSvcAgentDSOPathName=<path-to-dbx-serviceability-agent-module>\n" +
|
||||
" Default is determined from dbxSvcAgentDSOPathPrefix");
|
||||
System.out.println(" or");
|
||||
System.out.println(" -DdbxSvcAgentDSOPathPrefix=<xxx>\n" +
|
||||
" where xxx is the pathname of a dir structure that contains:\n" +
|
||||
" <os>/<arch>/bin/lib/libsvc_agent_dbx.so\n" +
|
||||
" The default is " + defaultDbxSvcAgentDSOPathPrefix);
|
||||
}
|
||||
|
||||
public HotSpotAgent() {
|
||||
@@ -549,7 +522,13 @@ public class HotSpotAgent {
|
||||
machDesc = new MachineDescriptionSPARC32Bit();
|
||||
}
|
||||
} else {
|
||||
throw new DebuggerException("Linux only supported on x86/ia64/amd64/sparc/sparc64");
|
||||
try {
|
||||
machDesc = (MachineDescription)
|
||||
Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
|
||||
cpu.toUpperCase()).newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new DebuggerException("Linux not supported on machine type " + cpu);
|
||||
}
|
||||
}
|
||||
|
||||
LinuxDebuggerLocal dbg =
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user