mirror of
https://github.com/mirror/make.git
synced 2026-08-31 19:58:10 +08:00
Compare commits
651 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7241d136f4 | ||
|
|
c2be1df880 | ||
|
|
f1a9625001 | ||
|
|
047bd5a16f | ||
|
|
3fc99a48e1 | ||
|
|
87a5f98d24 | ||
|
|
53554e41e8 | ||
|
|
5bd7ad2b22 | ||
|
|
65115e7095 | ||
|
|
75dd0bd8bc | ||
|
|
8b54c5cff9 | ||
|
|
65c447289e | ||
|
|
86b20728fe | ||
|
|
b8a8af6550 | ||
|
|
360b76af84 | ||
|
|
c9e6ab9ac7 | ||
|
|
40277b8850 | ||
|
|
35047f824a | ||
|
|
e97159745d | ||
|
|
2b9dd215d5 | ||
|
|
fc2ddebdae | ||
|
|
b4682cb479 | ||
|
|
09202bc880 | ||
|
|
9ae02b7916 | ||
|
|
247b71e690 | ||
|
|
e33f3d72bf | ||
|
|
fd1dd7c398 | ||
|
|
14b2d7effb | ||
|
|
85c788572d | ||
|
|
8164c8ab3d | ||
|
|
fb7a7adc8a | ||
|
|
4f8be4bb28 | ||
|
|
e2b39edc22 | ||
|
|
8530d77c68 | ||
|
|
89e18c12eb | ||
|
|
bccd01354b | ||
|
|
5f9d341160 | ||
|
|
798ebd241b | ||
|
|
4db6d0c694 | ||
|
|
b754a35df7 | ||
|
|
168f12375d | ||
|
|
83443c706a | ||
|
|
4a5377aef7 | ||
|
|
48391c2817 | ||
|
|
42745a900f | ||
|
|
43181f1f82 | ||
|
|
c18b23f7b2 | ||
|
|
fe5585528f | ||
|
|
0205d3d08c | ||
|
|
9ef06be018 | ||
|
|
ac9a39dad7 | ||
|
|
c6ac580785 | ||
|
|
9efd477e98 | ||
|
|
5036dd120a | ||
|
|
7e849f3b81 | ||
|
|
a80a8b8a10 | ||
|
|
e4ac28e830 | ||
|
|
1fae20a2b7 | ||
|
|
292da6f686 | ||
|
|
3c487e7ed5 | ||
|
|
c0380823a2 | ||
|
|
1faae1d4ed | ||
|
|
18eb093f56 | ||
|
|
894ee7f6c8 | ||
|
|
e75662bc6a | ||
|
|
d1df4b21f3 | ||
|
|
a66bf2d736 | ||
|
|
31c2024b2e | ||
|
|
7df0fe77d8 | ||
|
|
9fc787c658 | ||
|
|
1afb0ad372 | ||
|
|
86a058029b | ||
|
|
0a3a0756b9 | ||
|
|
3712e8a819 | ||
|
|
9ed452b041 | ||
|
|
b11bef0bea | ||
|
|
bd716a1ec1 | ||
|
|
b484efca56 | ||
|
|
562344122f | ||
|
|
9a2451af0b | ||
|
|
7f9ce6e97b | ||
|
|
621e9edfe9 | ||
|
|
986632ec23 | ||
|
|
95ffcda425 | ||
|
|
dcca1b5b0e | ||
|
|
9cad73ad82 | ||
|
|
8e7a28a6a4 | ||
|
|
98de32a681 | ||
|
|
5369be5079 | ||
|
|
8de07f3e4a | ||
|
|
f970315766 | ||
|
|
579ee85941 | ||
|
|
7e51810bb5 | ||
|
|
bd30df4478 | ||
|
|
1f2fd22fec | ||
|
|
ab1210b1fe | ||
|
|
241787d8e4 | ||
|
|
faeeb27166 | ||
|
|
cab353d1dd | ||
|
|
8b01e6bebf | ||
|
|
55c00544cc | ||
|
|
8d577c2ff4 | ||
|
|
e44d6a12bb | ||
|
|
423c3955d9 | ||
|
|
ac67346d0f | ||
|
|
e364498113 | ||
|
|
85047eb904 | ||
|
|
0faa98a0bb | ||
|
|
8411528fdd | ||
|
|
d2a3e9ca9c | ||
|
|
e1863c05d8 | ||
|
|
b981bfd197 | ||
|
|
88713683fe | ||
|
|
a7cac0f0e3 | ||
|
|
165ccf3137 | ||
|
|
24620378ba | ||
|
|
9c8b68a905 | ||
|
|
432cb6575d | ||
|
|
a4937bc897 | ||
|
|
889303cdfe | ||
|
|
99385ee6f7 | ||
|
|
f5f5adb62c | ||
|
|
865d90bb1e | ||
|
|
30b25acc4e | ||
|
|
f8905059c3 | ||
|
|
12a3104c3d | ||
|
|
7b485daffb | ||
|
|
757849cd93 | ||
|
|
9d58570c77 | ||
|
|
d49ab08ae0 | ||
|
|
10a4b120bd | ||
|
|
309768aff1 | ||
|
|
9c28d5125d | ||
|
|
a7794f483b | ||
|
|
5d653b535a | ||
|
|
53b4a9e668 | ||
|
|
d4723d643d | ||
|
|
107ab16bf6 | ||
|
|
07f2666b91 | ||
|
|
f4b746b8c2 | ||
|
|
d7f25cfda5 | ||
|
|
b9a01a8b3b | ||
|
|
d654bff457 | ||
|
|
74ed682c54 | ||
|
|
e498e464dc | ||
|
|
d1d737d0fa | ||
|
|
87e5b64f41 | ||
|
|
70df3c35bf | ||
|
|
01a745025d | ||
|
|
4792e154b6 | ||
|
|
188b2a0f23 | ||
|
|
52191d9d61 | ||
|
|
dc9ae5e017 | ||
|
|
723e047428 | ||
|
|
b69b04dc8c | ||
|
|
b539908f73 | ||
|
|
2fb91e19a0 | ||
|
|
f96c114e22 | ||
|
|
98197303b1 | ||
|
|
f8786092ad | ||
|
|
1d4c15b4e1 | ||
|
|
b1c7f0df4e | ||
|
|
8e12202870 | ||
|
|
1f4ca0539b | ||
|
|
d0944ee2e8 | ||
|
|
38066b6f19 | ||
|
|
3bf3fde984 | ||
|
|
543521cd47 | ||
|
|
e8122ecb5d | ||
|
|
55a0c0e414 | ||
|
|
8a3436c65d | ||
|
|
fd30db1290 | ||
|
|
c3524b83b9 | ||
|
|
0296e40fc7 | ||
|
|
f69922b335 | ||
|
|
65931ce7a9 | ||
|
|
1a991ada47 | ||
|
|
7e77685bc3 | ||
|
|
300d1296fb | ||
|
|
822f8dae41 | ||
|
|
d2d44f76c4 | ||
|
|
6c3e88e60f | ||
|
|
9cd01958da | ||
|
|
4120f91846 | ||
|
|
30a5ee0d85 | ||
|
|
8a6205b43f | ||
|
|
bc120f27bd | ||
|
|
5c0fba7240 | ||
|
|
fa0f2c516a | ||
|
|
20ecc58126 | ||
|
|
1b90248893 | ||
|
|
a4d8444b59 | ||
|
|
0a81d50d66 | ||
|
|
3aa2aa7e82 | ||
|
|
29a94ceb76 | ||
|
|
ab78cbc71c | ||
|
|
c5bfa40044 | ||
|
|
deff9dacc9 | ||
|
|
40a49f244d | ||
|
|
87ac68fe79 | ||
|
|
72462ef1e1 | ||
|
|
f80222c15b | ||
|
|
4b81f5ca92 | ||
|
|
5601726151 | ||
|
|
9453a7451d | ||
|
|
5e7bf7c554 | ||
|
|
138d020e1b | ||
|
|
5b65c5b916 | ||
|
|
cc85b927cd | ||
|
|
bee4d93a59 | ||
|
|
353fcfdb30 | ||
|
|
d4043519f7 | ||
|
|
ef11217de7 | ||
|
|
e8f5d322cf | ||
|
|
dc922e3f4c | ||
|
|
c11024b3b3 | ||
|
|
2fc0f614be | ||
|
|
bf60bbd67a | ||
|
|
d2eaed1f0a | ||
|
|
8ab3564a71 | ||
|
|
ecf307bb0b | ||
|
|
a674abe702 | ||
|
|
80183457ad | ||
|
|
cece7ad61f | ||
|
|
943c06de47 | ||
|
|
171eb41908 | ||
|
|
9babfe49a5 | ||
|
|
b16852a77f | ||
|
|
96cf67bd29 | ||
|
|
5370238316 | ||
|
|
398058a873 | ||
|
|
b730fbc6b8 | ||
|
|
c21c1455fd | ||
|
|
58dae24352 | ||
|
|
c7732bd5ad | ||
|
|
2627d83221 | ||
|
|
381baeef7a | ||
|
|
5367d393dd | ||
|
|
f0529daced | ||
|
|
a668c520b2 | ||
|
|
c8bf04e141 | ||
|
|
0a56034aac | ||
|
|
94735f0ad7 | ||
|
|
7c77486d1f | ||
|
|
13f13b96b3 | ||
|
|
c3cd78066c | ||
|
|
15f7957939 | ||
|
|
1d992d8fe7 | ||
|
|
3484c9675a | ||
|
|
a0c5d0c63f | ||
|
|
64dd61bcb8 | ||
|
|
75336026ae | ||
|
|
b8467292c9 | ||
|
|
e44c51ce41 | ||
|
|
cb2be0db36 | ||
|
|
01bad6f73a | ||
|
|
82793f85f5 | ||
|
|
a66469e003 | ||
|
|
b5ea49bae7 | ||
|
|
2926f7b466 | ||
|
|
a87ff20158 | ||
|
|
9acb657eb1 | ||
|
|
19a69bafc0 | ||
|
|
9a7fe22b19 | ||
|
|
9253a34a57 | ||
|
|
f88eb23b02 | ||
|
|
441b643355 | ||
|
|
8b034b7d18 | ||
|
|
5667376edc | ||
|
|
93843ccd08 | ||
|
|
7f01830927 | ||
|
|
30843dea3a | ||
|
|
14d7654551 | ||
|
|
054d6d91e7 | ||
|
|
e56aad4061 | ||
|
|
049f8e88fc | ||
|
|
da7df54309 | ||
|
|
f3a4b4ce6f | ||
|
|
0daa9d37c4 | ||
|
|
50e2cb1b1a | ||
|
|
330d97a9ba | ||
|
|
b5d017c624 | ||
|
|
79e9347892 | ||
|
|
2bd957a89d | ||
|
|
7f7e6f80c5 | ||
|
|
af87d56157 | ||
|
|
4bf3c33f83 | ||
|
|
cb64352c75 | ||
|
|
6a52395ed1 | ||
|
|
29cd1e9699 | ||
|
|
450b7e1a3d | ||
|
|
5058a94ee7 | ||
|
|
4baf9ab456 | ||
|
|
ac1c6b404a | ||
|
|
51fb930ef2 | ||
|
|
a45f25ece3 | ||
|
|
b70aa3709e | ||
|
|
8e0a5645b8 | ||
|
|
7899c6f383 | ||
|
|
6ca41d9b17 | ||
|
|
686a74bfb2 | ||
|
|
ca17e5538f | ||
|
|
5c69b3fe53 | ||
|
|
1d298acf9d | ||
|
|
5a5a1aff6a | ||
|
|
002702c89c | ||
|
|
a3bd466e25 | ||
|
|
97fe6e7dd1 | ||
|
|
85f9f6985d | ||
|
|
0d12b1a207 | ||
|
|
299f5faf93 | ||
|
|
0d5d963bcf | ||
|
|
715927552f | ||
|
|
7670c84f77 | ||
|
|
2efd6b47bf | ||
|
|
ca8885d5be | ||
|
|
3a285e342e | ||
|
|
f263ff4ce9 | ||
|
|
fbe5b2c9cd | ||
|
|
a94b0b0ea5 | ||
|
|
b9c4a38022 | ||
|
|
90ee335724 | ||
|
|
7d3743dfdc | ||
|
|
a839588fc9 | ||
|
|
8a0d46468a | ||
|
|
bc578b6c8e | ||
|
|
1820908804 | ||
|
|
145661a541 | ||
|
|
a95dc485fa | ||
|
|
30b2e4207d | ||
|
|
7f5309ebb4 | ||
|
|
6cb5be7813 | ||
|
|
adb50bd4c9 | ||
|
|
cf1c79c9a3 | ||
|
|
76827d7c10 | ||
|
|
eb632d7676 | ||
|
|
fdb5fcc28d | ||
|
|
23c2b99e9d | ||
|
|
405c89ba1e | ||
|
|
a77c5c0910 | ||
|
|
88f1bc8b55 | ||
|
|
6405534814 | ||
|
|
c0751bd3fc | ||
|
|
1befa76448 | ||
|
|
e3b394f3f0 | ||
|
|
ef6461611b | ||
|
|
fca11f6039 | ||
|
|
d6e1c6e6c5 | ||
|
|
aa07c06387 | ||
|
|
dc25e84754 | ||
|
|
666ad44568 | ||
|
|
dddd1be5ec | ||
|
|
eb4f966971 | ||
|
|
715a11735f | ||
|
|
89f7058b99 | ||
|
|
9fb4cdeedb | ||
|
|
0bdc191501 | ||
|
|
49cc211819 | ||
|
|
4e2e5eb199 | ||
|
|
3f6bb04e75 | ||
|
|
c992c4d80f | ||
|
|
3057357c0a | ||
|
|
cb0bedc3d0 | ||
|
|
dc2a6ceb81 | ||
|
|
4f47fbf953 | ||
|
|
9fcd90e36c | ||
|
|
83ce81fcaa | ||
|
|
63888b91f6 | ||
|
|
934f51d166 | ||
|
|
bfc3e1ca7c | ||
|
|
c7d07fd0b5 | ||
|
|
d472624f33 | ||
|
|
0369a93825 | ||
|
|
ef2b0425e7 | ||
|
|
a5c774a51b | ||
|
|
9a9f83e8b5 | ||
|
|
e4d5d43424 | ||
|
|
b06b8c64a2 | ||
|
|
f15efca811 | ||
|
|
b664d3a91d | ||
|
|
b5c065418f | ||
|
|
bd6f63e563 | ||
|
|
6979e7e43b | ||
|
|
dc90160079 | ||
|
|
a81ee5209b | ||
|
|
15a79d723d | ||
|
|
b34438bee8 | ||
|
|
1454a04f81 | ||
|
|
ae2ab76fac | ||
|
|
391456aad7 | ||
|
|
a86d1693ba | ||
|
|
3b1432d86a | ||
|
|
c3188c6f31 | ||
|
|
5acda13ace | ||
|
|
036760a9fd | ||
|
|
91be515567 | ||
|
|
b6b6875986 | ||
|
|
8f029808af | ||
|
|
95f1a32d27 | ||
|
|
59691939f9 | ||
|
|
e954532d48 | ||
|
|
f5d7411c49 | ||
|
|
fba20a776d | ||
|
|
df2fa7c5a5 | ||
|
|
9903cda2a7 | ||
|
|
ded9121846 | ||
|
|
02ff72c970 | ||
|
|
90b30b6e0e | ||
|
|
96c0761689 | ||
|
|
bbe7b86718 | ||
|
|
7ba7dbca47 | ||
|
|
b85b7e0a55 | ||
|
|
587588c1fa | ||
|
|
94bda718c4 | ||
|
|
4e4d8f246f | ||
|
|
8a0f9d7b42 | ||
|
|
c7b469f0f3 | ||
|
|
c78b7265bd | ||
|
|
fc644b4c45 | ||
|
|
97f106fa10 | ||
|
|
7746a1f74f | ||
|
|
c0239cdbfa | ||
|
|
866aa6267a | ||
|
|
b4cec7790f | ||
|
|
deace771d6 | ||
|
|
f4d9937274 | ||
|
|
b6f45ddc53 | ||
|
|
fe43fa9de3 | ||
|
|
5f188b39a4 | ||
|
|
76d2d2ca41 | ||
|
|
4e51b6d9a4 | ||
|
|
606cf9b169 | ||
|
|
131f115730 | ||
|
|
b1d34394a8 | ||
|
|
baee33eb0f | ||
|
|
bd2d124f27 | ||
|
|
4254e88cfa | ||
|
|
174e910a1d | ||
|
|
acbdc33e1c | ||
|
|
f87715a62c | ||
|
|
56653d8524 | ||
|
|
f907a4d90c | ||
|
|
f5891a26d8 | ||
|
|
f9c15cac35 | ||
|
|
bf1794767e | ||
|
|
5d19c91605 | ||
|
|
8688ef20cf | ||
|
|
44ac2cdb4d | ||
|
|
48045f99e5 | ||
|
|
5973926ce6 | ||
|
|
d65b267e4a | ||
|
|
0afbbf8595 | ||
|
|
3cc351decd | ||
|
|
8f30b68871 | ||
|
|
5abe477620 | ||
|
|
295a05fbd6 | ||
|
|
958ea92eb8 | ||
|
|
70c726c875 | ||
|
|
7deb42aafd | ||
|
|
e2f16fdf45 | ||
|
|
139c28ae69 | ||
|
|
e8fd23cc83 | ||
|
|
1471af2de2 | ||
|
|
56f70324e8 | ||
|
|
be6b22a283 | ||
|
|
dceb954f9c | ||
|
|
38b23bc3f0 | ||
|
|
bf9822658f | ||
|
|
c8840352ac | ||
|
|
d4ee001292 | ||
|
|
a72bff7cb3 | ||
|
|
0b30c8d9ce | ||
|
|
668af46980 | ||
|
|
b9f831b858 | ||
|
|
71385e1225 | ||
|
|
81f3e4babd | ||
|
|
5b4d419476 | ||
|
|
7b16a8e3ca | ||
|
|
14f3f501bc | ||
|
|
3fd62c76c2 | ||
|
|
27ef86f6b1 | ||
|
|
656b15a404 | ||
|
|
f8f3b9005b | ||
|
|
4c995f262a | ||
|
|
c7f2c384ee | ||
|
|
ed4a06e6de | ||
|
|
b50116c4ae | ||
|
|
b23b0c3552 | ||
|
|
bb7cb05da5 | ||
|
|
8d5b3d4298 | ||
|
|
2750526aa5 | ||
|
|
84e9bcd65e | ||
|
|
91b016c414 | ||
|
|
be883de241 | ||
|
|
c233a70323 | ||
|
|
8025f93312 | ||
|
|
43d81ff866 | ||
|
|
c1f71b0336 | ||
|
|
0b17d143ba | ||
|
|
2a23064da5 | ||
|
|
e54dfb4284 | ||
|
|
19b6504f8a | ||
|
|
bb4d040fad | ||
|
|
891ebd4d97 | ||
|
|
a940199072 | ||
|
|
eda0e24ccd | ||
|
|
52ebc531ce | ||
|
|
891409f212 | ||
|
|
6ccf33cdbd | ||
|
|
e4da308580 | ||
|
|
7595f38f62 | ||
|
|
c25294ad3b | ||
|
|
f222b19158 | ||
|
|
776d8b7bc2 | ||
|
|
a8f101d0bc | ||
|
|
367a49591e | ||
|
|
94aead216e | ||
|
|
24aac7f8f6 | ||
|
|
29e539bad0 | ||
|
|
22886f8a74 | ||
|
|
50eb3cf5e5 | ||
|
|
6d8d9b74d9 | ||
|
|
afc4906aca | ||
|
|
8af9389f87 | ||
|
|
08bfd86103 | ||
|
|
6e0527913c | ||
|
|
bde826b18a | ||
|
|
0806a403d6 | ||
|
|
86af3872a9 | ||
|
|
df267b31c5 | ||
|
|
a6bdc58385 | ||
|
|
24338ec929 | ||
|
|
586daef9bc | ||
|
|
5a7a42cfce | ||
|
|
d0c4e92f11 | ||
|
|
ce9c63b32b | ||
|
|
a4e3523fe4 | ||
|
|
7a8549f5dd | ||
|
|
4cd3539024 | ||
|
|
64e16d6c00 | ||
|
|
3d0d9e5d75 | ||
|
|
4bd6db9df1 | ||
|
|
3bcb608bda | ||
|
|
0e6c4f5b0e | ||
|
|
a34b85490d | ||
|
|
1fd3f9d79c | ||
|
|
3dd1faa5c8 | ||
|
|
82103b1a49 | ||
|
|
11095a90f1 | ||
|
|
66459baee2 | ||
|
|
5ee856d96d | ||
|
|
0ffd22cb44 | ||
|
|
f7598efb67 | ||
|
|
6636dc1d5c | ||
|
|
bf58e35105 | ||
|
|
e437226241 | ||
|
|
b237dff775 | ||
|
|
a53903e4c3 | ||
|
|
1e9dc3ce45 | ||
|
|
0e30f46a62 | ||
|
|
7dfa2461c3 | ||
|
|
261d7b44fa | ||
|
|
b581e1350f | ||
|
|
a36cfed31a | ||
|
|
da1b137e38 | ||
|
|
d6a7894d3a | ||
|
|
f388233b03 | ||
|
|
6cdaff0948 | ||
|
|
1dd9ed1c05 | ||
|
|
978819e1d6 | ||
|
|
467115baae | ||
|
|
974d14ac4f | ||
|
|
dd30b0552f | ||
|
|
af88a3550a | ||
|
|
e50e0fdf88 | ||
|
|
26d8d00cb7 | ||
|
|
e4c14a675c | ||
|
|
9d5b5bd2f5 | ||
|
|
49ee105c68 | ||
|
|
3daf8df6ee | ||
|
|
4923580e3a | ||
|
|
d584d0c1c6 | ||
|
|
18251c4633 | ||
|
|
2860d3b247 | ||
|
|
28078b517a | ||
|
|
cb2f200269 | ||
|
|
0759af440a | ||
|
|
a2232470c2 | ||
|
|
d2516343bc | ||
|
|
93bd1bd93c | ||
|
|
659fc6b55e | ||
|
|
9d153cc1b1 | ||
|
|
6d995b036e | ||
|
|
e8ca9b8eb1 | ||
|
|
c90f47e832 | ||
|
|
939167cfc1 | ||
|
|
1ce563a181 | ||
|
|
dff0be9e68 | ||
|
|
6c21790595 | ||
|
|
6c9e53d648 | ||
|
|
49ca261bd5 | ||
|
|
be6a8bc869 | ||
|
|
539f513773 | ||
|
|
d27cac1598 | ||
|
|
e8e4c19873 | ||
|
|
547abfa13e | ||
|
|
71fd6bfa1c | ||
|
|
b0d67e0e15 | ||
|
|
fb6410f435 | ||
|
|
341312cc57 | ||
|
|
29d78ddb28 | ||
|
|
73e7767ffc | ||
|
|
6e51d9c90a | ||
|
|
704c60cec0 | ||
|
|
9714e501fb | ||
|
|
0799ce730d | ||
|
|
08c8105c54 | ||
|
|
e334942e57 | ||
|
|
f305a52c02 | ||
|
|
213ccc2234 | ||
|
|
e3e3f15ebc | ||
|
|
59306b0223 | ||
|
|
be5b33e876 | ||
|
|
f29b86c314 | ||
|
|
be8c3dbc97 | ||
|
|
fafeb87027 | ||
|
|
1f16ee5c2d | ||
|
|
2b3ee46f4e | ||
|
|
a35db90275 | ||
|
|
ee3d37a591 | ||
|
|
76f034acaa | ||
|
|
74216b00a4 | ||
|
|
db401d8e0a | ||
|
|
e3986eea43 | ||
|
|
1a5beef51f | ||
|
|
652234e967 | ||
|
|
acb2e64966 | ||
|
|
276d0c7c64 | ||
|
|
955899ef77 | ||
|
|
4068c5e4a3 | ||
|
|
1fa3db1468 | ||
|
|
b7c728046e | ||
|
|
d33ff30145 | ||
|
|
d15a484098 | ||
|
|
dd70c67ea4 | ||
|
|
b04a205f3e | ||
|
|
d696707cb5 | ||
|
|
bd108cf45c | ||
|
|
6374309c6d | ||
|
|
8bbdbb02b3 | ||
|
|
47cd8d4624 |
32
.cvsignore
32
.cvsignore
@@ -1,32 +0,0 @@
|
|||||||
*.gz *.Z *.tar *.tgz
|
|
||||||
=*
|
|
||||||
TODO COPYING* ABOUT-NLS
|
|
||||||
make-3* make-test*
|
|
||||||
*.info *.info-*
|
|
||||||
stamp-*
|
|
||||||
makebook*
|
|
||||||
|
|
||||||
.*gdbinit
|
|
||||||
|
|
||||||
*.dep *.dvi *.toc *.aux *.log
|
|
||||||
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
|
|
||||||
|
|
||||||
README README.DOS README.W32
|
|
||||||
aclocal.m4 autom4te.cache
|
|
||||||
config.h.in config.h config.status config.cache configure
|
|
||||||
Makefile.in Makefile
|
|
||||||
build.sh.in build.sh
|
|
||||||
SMakefile NMakefile Makefile.DOS
|
|
||||||
config.ami configh.dos config.h.W32 config.h-vms
|
|
||||||
|
|
||||||
loadavg loadavg.c make
|
|
||||||
|
|
||||||
.deps .dep_segment
|
|
||||||
|
|
||||||
_*
|
|
||||||
sun4 i386 i386-netbsd hp300-netbsd hp300 rs6000 sun3 news800 amiga
|
|
||||||
hp700 hp834 mips sol2 i486-linux
|
|
||||||
|
|
||||||
customs
|
|
||||||
|
|
||||||
install-sh mkinstalldirs
|
|
||||||
62
.gitignore
vendored
Normal file
62
.gitignore
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# Development artifacts
|
||||||
|
ID
|
||||||
|
TAGS
|
||||||
|
.*gdbinit
|
||||||
|
.gdb_history
|
||||||
|
*~
|
||||||
|
#*
|
||||||
|
.#*
|
||||||
|
|
||||||
|
# Configure artifacts
|
||||||
|
ABOUT-NLS
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
config.cache
|
||||||
|
config.h
|
||||||
|
config.h.in
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
configure
|
||||||
|
stamp-h1
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
.deps
|
||||||
|
gmk-default.h
|
||||||
|
loadavg
|
||||||
|
make
|
||||||
|
*.o
|
||||||
|
*.exe
|
||||||
|
*.dll.a
|
||||||
|
*.obj
|
||||||
|
*.lib
|
||||||
|
*.pdb
|
||||||
|
*.sbr
|
||||||
|
|
||||||
|
# Windows build artifacts
|
||||||
|
/WinDebug/
|
||||||
|
/WinRel/
|
||||||
|
/GccDebug/
|
||||||
|
/GccRel/
|
||||||
|
|
||||||
|
# Distribution artifacts
|
||||||
|
.dep_segment
|
||||||
|
.check-git-HEAD
|
||||||
|
ChangeLog
|
||||||
|
Makefile.DOS
|
||||||
|
NMakefile
|
||||||
|
README
|
||||||
|
README.DOS
|
||||||
|
README.OS2
|
||||||
|
README.W32
|
||||||
|
SMakefile
|
||||||
|
build.sh
|
||||||
|
build.sh.in
|
||||||
|
config.ami
|
||||||
|
config.h-vms
|
||||||
|
config.h.W32
|
||||||
|
configh.dos
|
||||||
|
make-[0-9]*/
|
||||||
|
make-[0-9]*.tar.*
|
||||||
|
checkcfg.*.log
|
||||||
37
AUTHORS
37
AUTHORS
@@ -7,6 +7,9 @@ GNU make development up to version 3.75 by:
|
|||||||
Development starting with GNU make 3.76 by:
|
Development starting with GNU make 3.76 by:
|
||||||
Paul D. Smith <psmith@gnu.org>
|
Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
Additional development starting with GNU make 3.81 by:
|
||||||
|
Boris Kolpackov <boris@kolpackov.net>
|
||||||
|
|
||||||
|
|
||||||
GNU Make User's Manual
|
GNU Make User's Manual
|
||||||
Written by:
|
Written by:
|
||||||
@@ -23,6 +26,7 @@ GNU make porting efforts:
|
|||||||
|
|
||||||
Port to VMS by:
|
Port to VMS by:
|
||||||
Klaus Kaempf <kkaempf@progis.de>
|
Klaus Kaempf <kkaempf@progis.de>
|
||||||
|
Hartmut Becker <Hartmut.Becker@hp.com>
|
||||||
Archive support/Bug fixes by:
|
Archive support/Bug fixes by:
|
||||||
John W. Eaton <jwe@bevo.che.wisc.edu>
|
John W. Eaton <jwe@bevo.che.wisc.edu>
|
||||||
Martin Zinser <zinser@decus.decus.de>
|
Martin Zinser <zinser@decus.decus.de>
|
||||||
@@ -30,28 +34,55 @@ GNU make porting efforts:
|
|||||||
Port to Amiga by:
|
Port to Amiga by:
|
||||||
Aaron Digulla <digulla@fh-konstanz.de>
|
Aaron Digulla <digulla@fh-konstanz.de>
|
||||||
|
|
||||||
|
Port to MS-DOS (DJGPP), OS/2, and MS-Windows (native/MinGW) by:
|
||||||
Port to MS-DOS (DJGPP) and MS-Windows 95/NT by:
|
|
||||||
DJ Delorie <dj@delorie.com>
|
DJ Delorie <dj@delorie.com>
|
||||||
Rob Tulloh <rob_tulloh@tivoli.com>
|
Rob Tulloh <rob_tulloh@tivoli.com>
|
||||||
Eli Zaretskii <eliz@is.elta.co.il>
|
Eli Zaretskii <eliz@gnu.org>
|
||||||
|
Jonathan Grant <jg@jguk.org>
|
||||||
|
Andreas Beuning <andreas.buening@nexgo.de>
|
||||||
|
Earnie Boyd <earnie@uses.sf.net>
|
||||||
|
Troy Runkel <Troy.Runkel@mathworks.com>
|
||||||
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Other contributors:
|
Other contributors:
|
||||||
|
|
||||||
Janet Carson <janet_carson@tivoli.com>
|
Janet Carson <janet_carson@tivoli.com>
|
||||||
Howard Chu <hyc@highlandsun.com>
|
Howard Chu <hyc@highlandsun.com>
|
||||||
|
Ludovic Courtès <ludo@gnu.org>
|
||||||
Paul Eggert <eggert@twinsun.com>
|
Paul Eggert <eggert@twinsun.com>
|
||||||
|
Ramon Garcia Fernandez <ramon.garcia.f@gmail.com>
|
||||||
Klaus Heinz <kamar@ease.rhein-main.de>
|
Klaus Heinz <kamar@ease.rhein-main.de>
|
||||||
Michael Joosten
|
Michael Joosten
|
||||||
Jim Kelton <jim_kelton@tivoli.com>
|
Jim Kelton <jim_kelton@tivoli.com>
|
||||||
David Lubbren <uhay@rz.uni-karlsruhe.de>
|
David Lubbren <uhay@rz.uni-karlsruhe.de>
|
||||||
Tim Magill <tim.magill@telops.gte.com>
|
Tim Magill <tim.magill@telops.gte.com>
|
||||||
|
Markus Mauhart <qwe123@chello.at>
|
||||||
Greg McGary <greg@mcgary.org>
|
Greg McGary <greg@mcgary.org>
|
||||||
|
Thien-Thi Nguyen <ttn@gnuvola.org>
|
||||||
|
Thomas Riedl <thomas.riedl@siemens.com>
|
||||||
Han-Wen Nienhuys <hanwen@cs.uu.nl>
|
Han-Wen Nienhuys <hanwen@cs.uu.nl>
|
||||||
Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
Carl Staelin (Princeton University)
|
Carl Staelin (Princeton University)
|
||||||
Ian Stewartson (Data Logic Limited)
|
Ian Stewartson (Data Logic Limited)
|
||||||
|
David A. Wheeler <dwheeler@dwheeler.com>
|
||||||
|
David Boyce <dsb@boyski.com>
|
||||||
|
Frank Heckenbach <f.heckenbach@fh-soft.de>
|
||||||
|
|
||||||
With suggestions/comments/bug reports from a cast of ... well ...
|
With suggestions/comments/bug reports from a cast of ... well ...
|
||||||
hundreds, anyway :)
|
hundreds, anyway :)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
844
COPYING
844
COPYING
@@ -1,286 +1,626 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
59 Temple Place - Suite 330, Boston, MA
|
|
||||||
02111-1307, USA.
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The GNU General Public License is a free, copyleft license for
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
software and other kinds of works.
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
The licenses for most software and other practical works are designed
|
||||||
General Public License applies to most of the Free Software
|
to take away your freedom to share and change the works. By contrast,
|
||||||
Foundation's software and to any other program whose authors commit to
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
share and change all versions of a program--to make sure it remains free
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
have the freedom to distribute copies of free software (and charge for
|
have the freedom to distribute copies of free software (and charge for
|
||||||
this service if you wish), that you receive source code or can get it
|
them if you wish), that you receive source code or can get it if you
|
||||||
if you want it, that you can change the software or use pieces of it
|
want it, that you can change the software or use pieces of it in new
|
||||||
in new free programs; and that you know you can do these things.
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
To protect your rights, we need to prevent others from denying you
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
These restrictions translate to certain responsibilities for you if you
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
distribute copies of the software, or if you modify it.
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
For example, if you distribute copies of such a program, whether
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
you have. You must make sure that they, too, receive or can get the
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
source code. And you must show them these terms so they know their
|
or can get the source code. And you must show them these terms so they
|
||||||
rights.
|
know their rights.
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
distribute and/or modify the software.
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
that everyone understands that there is no warranty for this free
|
that there is no warranty for this free software. For both users' and
|
||||||
software. If the software is modified by someone else and passed on, we
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
want its recipients to know that what they have is not the original, so
|
changed, so that their problems will not be attributed erroneously to
|
||||||
that any problems introduced by others will not reflect on the original
|
authors of previous versions.
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
Some devices are designed to deny users access to install or run
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
modified versions of the software inside them, although the manufacturer
|
||||||
program will individually obtain patent licenses, in effect making the
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
protecting users' freedom to change the software. The systematic
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
TERMS AND CONDITIONS
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
0. Definitions.
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
of it, thus forming a work based on the Program, and copy and
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
distribute such modifications or work under the terms of Section 1
|
"recipients" may be individuals or organizations.
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
stating that you changed the files and the date of any change.
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
A "covered work" means either the unmodified Program or a work based
|
||||||
whole or in part contains or is derived from the Program or any
|
on the Program.
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
To "propagate" a work means to do anything with it that, without
|
||||||
when run, you must cause it, when started running for such
|
permission, would make you directly or secondarily liable for
|
||||||
interactive use in the most ordinary way, to print or display an
|
infringement under applicable copyright law, except executing it on a
|
||||||
announcement including an appropriate copyright notice and a
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
notice that there is no warranty (or else, saying that you provide
|
distribution (with or without modification), making available to the
|
||||||
a warranty) and that users may redistribute the program under
|
public, and in some countries other activities as well.
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
To "convey" a work means any kind of propagation that enables other
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
exercise the right to control the distribution of derivative or
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
to the extent that it includes a convenient and prominently visible
|
||||||
a storage or distribution medium does not bring the other work under
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
the scope of this License.
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
1. Source Code.
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
The "source code" for a work means the preferred form of the work
|
||||||
source code, which must be distributed under the terms of Sections
|
for making modifications to it. "Object code" means any non-source
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
form of a work.
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
A "Standard Interface" means an interface that either is an official
|
||||||
years, to give any third party, for a charge no more than your
|
standard defined by a recognized standards body, or, in the case of
|
||||||
cost of physically performing source distribution, a complete
|
interfaces specified for a particular programming language, one that
|
||||||
machine-readable copy of the corresponding source code, to be
|
is widely used among developers working in that language.
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
The "System Libraries" of an executable work include anything, other
|
||||||
to distribute corresponding source code. (This alternative is
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
allowed only for noncommercial distribution and only if you
|
packaging a Major Component, but which is not part of that Major
|
||||||
received the program in object code or executable form with such
|
Component, and (b) serves only to enable use of the work with that
|
||||||
an offer, in accord with Subsection b above.)
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
The "Corresponding Source" for a work in object code form means all
|
||||||
making modifications to it. For an executable work, complete source
|
the source code needed to generate, install, and (for an executable
|
||||||
code means all the source code for all modules it contains, plus any
|
work) run the object code and to modify the work, including scripts to
|
||||||
associated interface definition files, plus the scripts used to
|
control those activities. However, it does not include the work's
|
||||||
control compilation and installation of the executable. However, as a
|
System Libraries, or general-purpose tools or generally available free
|
||||||
special exception, the source code distributed need not include
|
programs which are used unmodified in performing those activities but
|
||||||
anything that is normally distributed (in either source or binary
|
which are not part of the work. For example, Corresponding Source
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
includes interface definition files associated with source files for
|
||||||
operating system on which the executable runs, unless that component
|
the work, and the source code for shared libraries and dynamically
|
||||||
itself accompanies the executable.
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
The Corresponding Source need not include anything that users
|
||||||
access to copy from a designated place, then offering equivalent
|
can regenerate automatically from other parts of the Corresponding
|
||||||
access to copy the source code from the same place counts as
|
Source.
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
The Corresponding Source for a work in source code form is that
|
||||||
signed it. However, nothing else grants you permission to modify or
|
same work.
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
2. Basic Permissions.
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
All rights granted under this License are granted for the term of
|
||||||
these terms and conditions. You may not impose any further
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
You are not responsible for enforcing compliance by third parties to
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
infringement or for any other reason (not limited to patent issues),
|
patent license under the contributor's essential patent claims, to
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
excuse you from the conditions of this License. If you cannot
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
License and any other pertinent obligations, then as a consequence you
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
may not distribute the Program at all. For example, if a patent
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
license would not permit royalty-free redistribution of the Program by
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
all those who receive copies directly or indirectly through you, then
|
the Program, the only way you could satisfy both those terms and this
|
||||||
the only way you could satisfy both it and this License would be to
|
License would be to refrain entirely from conveying the Program.
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
13. Use with the GNU Affero General Public License.
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
Notwithstanding any other provision of this License, you have
|
||||||
patents or other property right claims or to contest validity of any
|
permission to link or combine any covered work with a work licensed
|
||||||
such claims; this section has the sole purpose of protecting the
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
integrity of the free software distribution system, which is
|
combined work, and to convey the resulting work. The terms of this
|
||||||
implemented by public license practices. Many people have made
|
License will continue to apply to the part which is the covered work,
|
||||||
generous contributions to the wide range of software distributed
|
but the special requirements of the GNU Affero General Public License,
|
||||||
through that system in reliance on consistent application of that
|
section 13, concerning interaction through a network will apply to the
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
combination as such.
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
14. Revised Versions of this License.
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
of the General Public License from time to time. Such new versions will
|
the GNU General Public License from time to time. Such new versions will
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
Each version is given a distinguishing version number. If the
|
||||||
specifies a version number of this License which applies to it and "any
|
Program specifies that a certain numbered version of the GNU General
|
||||||
later version", you have the option of following the terms and conditions
|
Public License "or any later version" applies to it, you have the
|
||||||
either of that version or of any later version published by the Free
|
option of following the terms and conditions either of that numbered
|
||||||
Software Foundation. If the Program does not specify a version number of
|
version or of any later version published by the Free Software
|
||||||
this License, you may choose any version ever published by the Free Software
|
Foundation. If the Program does not specify a version number of the
|
||||||
Foundation.
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
If the Program specifies that a proxy can decide which future
|
||||||
programs whose distribution conditions are different, write to the author
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
public statement of acceptance of a version permanently authorizes you
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
to choose that version for the Program.
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
15. Disclaimer of Warranty.
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
Appendix: How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
possible use to the public, the best way to achieve this is to make it
|
possible use to the public, the best way to achieve this is to make it
|
||||||
@@ -288,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
|
|||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
To do so, attach the following notices to the program. It is safest
|
||||||
to attach them to the start of each source file to most effectively
|
to attach them to the start of each source file to most effectively
|
||||||
convey the exclusion of warranty; and each file should have at least
|
state the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) 19yy <name of author>
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -305,36 +645,30 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
If the program does terminal interaction, make it output a short
|
||||||
when it starts in an interactive mode:
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
<program> Copyright (C) <year> <name of author>
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
parts of the General Public License. Of course, the commands you use may
|
parts of the General Public License. Of course, your program's commands
|
||||||
be called something other than `show w' and `show c'; they could even be
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
necessary. Here is a sample; alter the names:
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
The GNU General Public License does not permit incorporating your program
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
<signature of Ty Coon>, 1 April 1989
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Ty Coon, President of Vice
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Library General
|
|
||||||
Public License instead of this License.
|
|
||||||
|
|||||||
857
ChangeLog
857
ChangeLog
@@ -1,857 +0,0 @@
|
|||||||
2002-10-03 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
Version 3.80 released.
|
|
||||||
|
|
||||||
* dir.c: Change hash functions to use K&R function definition style.
|
|
||||||
* function.c: Ditto.
|
|
||||||
* read.c: Ditto.
|
|
||||||
* variable.c: Ditto.
|
|
||||||
|
|
||||||
Update to automake 1.7.
|
|
||||||
|
|
||||||
* Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7.
|
|
||||||
(pdf): Remove this target as automake now provides one.
|
|
||||||
|
|
||||||
* configure.in: Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS.
|
|
||||||
|
|
||||||
2002-09-30 Martin P.J. Zinser <zinser@decus.de>
|
|
||||||
|
|
||||||
* makefile.com: Updates for GNU make 3.80.
|
|
||||||
* makefile.vms: Ditto.
|
|
||||||
|
|
||||||
2002-09-23 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* read.c (enum make_word_type): Remove w_comment.
|
|
||||||
(get_next_mword): Don't treat comment characters as special; where
|
|
||||||
this function is used we will never see a comment (it's stripped
|
|
||||||
before we get here) and treating comments specially means that
|
|
||||||
targets like "foo\#bar" aren't handled properly.
|
|
||||||
|
|
||||||
2002-09-18 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* doc/make.texi (Bugs): Update with some info on Savannah, etc.
|
|
||||||
|
|
||||||
* read.c (eval): Expansion of arguments to export/unexport was
|
|
||||||
ignoring all arguments after the first one. Change the algorithm
|
|
||||||
to expand the whole line once, then parse the results.
|
|
||||||
|
|
||||||
2002-09-17 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
Fix Bug #940 (plus another bug I found while looking at this):
|
|
||||||
|
|
||||||
* read.c (record_target_var): enter_file() will add a new entry if
|
|
||||||
it's a double-colon target: we don't want to do that in this
|
|
||||||
situation. Invoke lookup_file() and only enter_file() if it does
|
|
||||||
not already exist. If the file we get back is a double-colon then
|
|
||||||
add this variable to the "root" double-colon target.
|
|
||||||
|
|
||||||
* variable.c (initialize_file_variables): If this file is a
|
|
||||||
double-colon target but is not the "root" target, then initialize
|
|
||||||
the root and make the root's variable list the parent of our
|
|
||||||
variable list.
|
|
||||||
|
|
||||||
2002-09-13 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* doc/make.texi (MAKE Variable): Add some indexing for "+".
|
|
||||||
|
|
||||||
* hash.c (round_up_2): Get rid of a warning.
|
|
||||||
|
|
||||||
2002-09-12 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* Makefile.am (loadavg_SOURCES, loadavg.c): Tiptoe around automake
|
|
||||||
so it doesn't complain about getloadavg.c.
|
|
||||||
|
|
||||||
* commands.c (set_file_variables): Make sure we always alloca() at
|
|
||||||
least 1 character for the value of $? (for '\0').
|
|
||||||
|
|
||||||
2002-09-11 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* hash.h (STRING_COMPARE, ISTRING_COMPARE, STRING_N_COMPARE): Fix
|
|
||||||
macro to use RESULT instead of the incorrect _RESULT_.
|
|
||||||
|
|
||||||
* make.h (HAVE_BROKEN_RESTART): Add prototypes for atomic_stat()
|
|
||||||
and atomic_readdir(). We need to #include dirent.h to get this to
|
|
||||||
work.
|
|
||||||
* misc.c (atomic_readdir): Fix typos.
|
|
||||||
|
|
||||||
2002-09-10 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* read.c (eval): Expand variable lists given to export and
|
|
||||||
unexport, so that "export $(LIST_OF_VARIABLES)" (etc.) works.
|
|
||||||
(conditional_line): Ditto for "ifdef". Fixes bug #103.
|
|
||||||
|
|
||||||
* doc/make.texi (Variables/Recursion): Document this.
|
|
||||||
(Conditional Syntax): And here.
|
|
||||||
|
|
||||||
2002-09-09 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* configure.in: Check for memmove().
|
|
||||||
|
|
||||||
2002-09-07 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* configure.in (HAVE_BROKEN_RESTART): Define this on PTX systems;
|
|
||||||
Michael Sterrett <msterret@coat.com> reports that while it has
|
|
||||||
SA_RESTART, it does not work properly.
|
|
||||||
|
|
||||||
* misc.c (atomic_stat): If HAVE_BROKEN_RESTART, create a function
|
|
||||||
that invokes stat() and loops to do it again if it returns EINTR.
|
|
||||||
(atomic_readdir): Ditto, with readdir().
|
|
||||||
|
|
||||||
* make.h (stat, readdir): If HAVE_BROKEN_RESTART, alias stat()
|
|
||||||
and readdir() to atomic_stat() and atomic_readdir().
|
|
||||||
|
|
||||||
2002-09-04 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* implicit.c (pattern_search): Daniel <barkalow@reputation.com>
|
|
||||||
reports that GNU make sometimes doesn't recognize that targets can
|
|
||||||
be made, when directories can be created as prerequisites. He
|
|
||||||
reports that changing the order of predicates in the DEP->changed
|
|
||||||
flag test so that lookup_file() is always performed, solves this
|
|
||||||
problem.
|
|
||||||
|
|
||||||
2002-08-08 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* configure.in: Require a newer version of gettext.
|
|
||||||
|
|
||||||
* misc.c (perror_with_name): Translate the format string (for
|
|
||||||
right-to-left language support).
|
|
||||||
(pfatal_with_name): Ditto.
|
|
||||||
|
|
||||||
* main.c: Create a static array of strings to store the usage
|
|
||||||
text. This is done to facilitate translations.
|
|
||||||
(struct command_switch): Remove argdesc and description fields.
|
|
||||||
(switches): Remove values for obsolete fields.
|
|
||||||
(print_usage): Print each element of the usage array.
|
|
||||||
|
|
||||||
* hash.c: Change function definitions to be K&R style.
|
|
||||||
|
|
||||||
2002-08-02 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* NEWS: Remove the mention of .TARGETS; we aren't going to publish
|
|
||||||
this one because it's too hard to get right. We'll look at it for
|
|
||||||
a future release.
|
|
||||||
* main.c (main): Don't create the .TARGETS variable.
|
|
||||||
* variable.c (handle_special_var): Don't handle .TARGETS.
|
|
||||||
|
|
||||||
2002-08-01 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* main.c (switches): Add a new option, -B (--always-make). If
|
|
||||||
specified, make will rebuild all targets that it encounters even
|
|
||||||
if they don't appear to be out of date.
|
|
||||||
(always_make_flag): New flag.
|
|
||||||
* make.h: Extern always_make_flag.
|
|
||||||
* remake.c (update_file_1): Check always_make_flag; if it's set we
|
|
||||||
will always rebuild any target we can, even if none of its
|
|
||||||
prerequisites are newer.
|
|
||||||
* NEWS: Mention it.
|
|
||||||
|
|
||||||
* doc/make.texi (Shell Function): Make it clear that make
|
|
||||||
variables marked as "export" are not passed to instances of the
|
|
||||||
shell function.
|
|
||||||
|
|
||||||
Add new introspection variable .VARIABLES and .TARGETS.
|
|
||||||
|
|
||||||
* variable.c (handle_special_var): New function. If the variable
|
|
||||||
reference passed in is "special" (.VARIABLES or .TARGETS),
|
|
||||||
calculate the new value if necessary. .VARIABLES is handled here:
|
|
||||||
walk through the hash of defined variables and construct a value
|
|
||||||
which is a list of the names. .TARGETS is handled by
|
|
||||||
build_target_list().
|
|
||||||
(lookup_variable): Invoke handle_special_var().
|
|
||||||
* file.c (build_target_list): Walk through the hask of known files
|
|
||||||
and construct a list of the names of all the ones marked as
|
|
||||||
targets.
|
|
||||||
* main.c (main): Initialize them to empty (and as simple variables).
|
|
||||||
* doc/make.texi (Special Variables): Document them.
|
|
||||||
* NEWS: Mention them.
|
|
||||||
|
|
||||||
* variable.h (struct variable): Add a new flag "exportable" which
|
|
||||||
is true if the variable name is valid for export.
|
|
||||||
* variable.c (define_variable_in_set): Set "exportable" when a new
|
|
||||||
variable is defined.
|
|
||||||
(target_environment): Use the "exportable" flag instead of
|
|
||||||
re-checking the name here... an efficiency improvement.
|
|
||||||
|
|
||||||
2002-07-31 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* config.h-vms.template: Updates to build on VMS. Thanks to
|
|
||||||
Brian_Benning@aksteel.com for helping verify the build.
|
|
||||||
* makefile.com: Build the new hash.c file.
|
|
||||||
* hash.h: Use strcpmi(), not stricmp(), in the
|
|
||||||
HAVE_CASE_INSENSITIVE_FS case.
|
|
||||||
|
|
||||||
2002-07-30 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Add missing
|
|
||||||
backslashes to the HAVE_CASE_INSENSITIVE_FS case.
|
|
||||||
Reported by <Brian_Benning@aksteel.com>.
|
|
||||||
|
|
||||||
2002-07-10 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* variable.c (pop_variable_scope): Remove variable made unused by
|
|
||||||
new hash infrastructure.
|
|
||||||
* read.c (dep_hash_cmp): Rewrite this to handle ignore_mtime
|
|
||||||
comparisons as well as name comparisons.
|
|
||||||
* variable.h: Add a prototype for new hash_init_function_table().
|
|
||||||
* file.c (lookup_file): Remove variables made unused by new hash
|
|
||||||
infrastructure.
|
|
||||||
* dir.c (directory_contents_hash_2): Missing return of hash value.
|
|
||||||
(dir_contents_file_exists_p): Remove variables made unused by new
|
|
||||||
hash infrastructure.
|
|
||||||
|
|
||||||
|
|
||||||
Installed Greg McGary's integration of the hash functions from the
|
|
||||||
GNU id-utils package:
|
|
||||||
|
|
||||||
2002-07-10 Greg McGary <greg@mcgary.org>
|
|
||||||
|
|
||||||
* scripts/functions/filter-out: Add literals to to the
|
|
||||||
pattern space in order to add complexity, and trigger
|
|
||||||
use of an internal hash table. Fix documentation strings.
|
|
||||||
* scripts/targets/INTERMEDIATE: Reverse order of files
|
|
||||||
passed to expected `rm' command.
|
|
||||||
|
|
||||||
2002-07-10 Greg McGary <greg@mcgary.org>
|
|
||||||
|
|
||||||
* Makefile.am (SRCS): Add hash.c (noinst_HEADERS): Add hash.h
|
|
||||||
* hash.c: New file, taken from id-utils.
|
|
||||||
* hash.h: New file, taken from id-utils.
|
|
||||||
|
|
||||||
* make.h (HASH, HASHI): Remove macros.
|
|
||||||
(find_char_unquote): Change arglist in decl.
|
|
||||||
(hash_init_directories): New function decl.
|
|
||||||
* variable.h (hash.h): New #include.
|
|
||||||
(MAKELEVEL_NAME, MAKELEVEL_LENGTH): New constants.
|
|
||||||
* filedef.h (hash.h): New #include.
|
|
||||||
(struct file) [next]: Remove member.
|
|
||||||
(file_hash_enter): Remove function decl.
|
|
||||||
(init_hash_files): New function decl.
|
|
||||||
|
|
||||||
* ar.c (ar_name): Delay call to strlen until needed.
|
|
||||||
* main.c (initialize_global_hash_tables): New function.
|
|
||||||
(main): Call it. Use MAKELEVEL_NAME & MAKELEVEL_LENGTH.
|
|
||||||
* misc.c (remove_comments): Pass char constants to find_char_unquote.
|
|
||||||
* remake.c (notice_finished_file): Update last_mtime on `prev' chain.
|
|
||||||
|
|
||||||
* dir.c (hash.h): New #include.
|
|
||||||
(struct directory_contents) [next, files]: Remove members.
|
|
||||||
[ctime]: Add member for VMS. [dirfiles]: Add hash-table member.
|
|
||||||
(directory_contents_hash_1, directory_contents_hash_2,
|
|
||||||
directory_contents_hash_cmp): New functions.
|
|
||||||
(directories_contents): Change type to `struct hash_table'.
|
|
||||||
(struct directory) [next]: Remove member.
|
|
||||||
(directory_hash_1, directory_hash_2, directory_hash_cmp): New funcs.
|
|
||||||
(directory): Change type to `struct hash_table'.
|
|
||||||
(struct dirfile) [next]: Remove member.
|
|
||||||
[length]: Add member. [impossible]: widen type to fill alignment gap.
|
|
||||||
(dirfile_hash_1, dirfile_hash_2, dirfile_hash_cmp): New functions.
|
|
||||||
(find_directory): Use new hash table package.
|
|
||||||
(dir_contents_file_exists_p): Likewise.
|
|
||||||
(file_impossible): Likewise.
|
|
||||||
(file_impossible_p): Likewise.
|
|
||||||
(print_dir_data_base): Likewise.
|
|
||||||
(open_dirstream): Likewise.
|
|
||||||
(read_dirstream): Likewise.
|
|
||||||
(hash_init_directories): New function.
|
|
||||||
|
|
||||||
* file.c (hash.h): New #include.
|
|
||||||
(file_hash_1, file_hash_2, file_hash_cmp): New functions.
|
|
||||||
(files): Change type to `struct hash_table'.
|
|
||||||
(lookup_file): Use new hash table package.
|
|
||||||
(enter_file): Likewise.
|
|
||||||
(remove_intermediates): Likewise.
|
|
||||||
(snap_deps): Likewise.
|
|
||||||
(print_file_data_base): Likewise.
|
|
||||||
|
|
||||||
* function.c
|
|
||||||
(function_table_entry_hash_1, function_table_entry_hash_2,
|
|
||||||
function_table_entry_hash_cmp): New functions.
|
|
||||||
(lookup_function): Remove `table' argument.
|
|
||||||
Use new hash table package.
|
|
||||||
(struct a_word) [chain, length]: New members.
|
|
||||||
(a_word_hash_1, a_word_hash_2, a_word_hash_cmp): New functions.
|
|
||||||
(struct a_pattern): New struct.
|
|
||||||
(func_filter_filterout): Pass through patterns noting boundaries
|
|
||||||
and '%', if present. Note a_word length. Use a hash table if
|
|
||||||
arglists are large enough to justify cost.
|
|
||||||
(function_table_init): Renamed from function_table.
|
|
||||||
(function_table): Declare as `struct hash_table'.
|
|
||||||
(FUNCTION_TABLE_ENTRIES): New constant.
|
|
||||||
(hash_init_function_table): New function.
|
|
||||||
|
|
||||||
* read.c (hash.h): New #include.
|
|
||||||
(read_makefile): Pass char constants to find_char_unquote.
|
|
||||||
(dep_hash_1, dep_hash_2, dep_hash_cmp): New functions.
|
|
||||||
(uniquize_deps): Use hash table to efficiently identify duplicates.
|
|
||||||
(find_char_unquote): Accept two char-constant stop chars, rather
|
|
||||||
than a string constant, avoiding zillions of calls to strchr.
|
|
||||||
Tighten inner search loops to test only for desired delimiters.
|
|
||||||
|
|
||||||
* variable.c (variable_hash_1, variable_hash_2,
|
|
||||||
variable_hash_cmp): New functions.
|
|
||||||
(variable_table): Declare as `struct hash_table'.
|
|
||||||
(global_variable_set): Remove initialization.
|
|
||||||
(init_hash_global_variable_set): New function.
|
|
||||||
(define_variable_in_set): Use new hash table package.
|
|
||||||
(lookup_variable): Likewise.
|
|
||||||
(lookup_variable_in_set): Likewise.
|
|
||||||
(initialize_file_variables): Likewise.
|
|
||||||
(pop_variable_scope): Likewise.
|
|
||||||
(create_new_variable_set): Likewise.
|
|
||||||
(merge_variable_sets): Likewise.
|
|
||||||
(define_automatic_variables): Likewise.
|
|
||||||
(target_environment): Likewise.
|
|
||||||
(print_variable_set): Likewise.
|
|
||||||
|
|
||||||
2002-07-10 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
Implement the SysV make syntax $$@, $$(@D), and $$(@F) in the
|
|
||||||
prerequisite list. A real SysV make will expand the entire
|
|
||||||
prerequisites list _twice_: we don't do that as it's a big
|
|
||||||
backward-compatibility problem. We only replace those specific
|
|
||||||
variables.
|
|
||||||
|
|
||||||
* read.c (record_files): Replace any $@, $(@D), and $(@F) variable
|
|
||||||
references left in the list of prerequisites. Check for .POSIX as
|
|
||||||
we record targets, so we can disable non-POSIX behavior while
|
|
||||||
reading makefiles as well as running them.
|
|
||||||
(eval): Check the prerequisite list to see if we have anything
|
|
||||||
that looks like a SysV prerequisite variable reference.
|
|
||||||
|
|
||||||
2002-07-09 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* doc/make.texi (Prerequisite Types): Add a new section describing
|
|
||||||
order-only prerequisites.
|
|
||||||
|
|
||||||
* read.c (uniquize_deps): If we have the same file as both a
|
|
||||||
normal and order-only prereq, get rid of the order-only prereq,
|
|
||||||
since the normal one supersedes it.
|
|
||||||
|
|
||||||
2002-07-08 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* AUTHORS: Added Greg McGary to the AUTHORS file.
|
|
||||||
* NEWS: Blurbed order-only prerequisites.
|
|
||||||
* file.c (print_file): Show order-only deps properly when printing
|
|
||||||
the database.
|
|
||||||
|
|
||||||
* maintMakefile: Add "update" targets for wget'ing the latest
|
|
||||||
versions of various external files. Taken from Makefile.maint in
|
|
||||||
autoconf, etc.
|
|
||||||
|
|
||||||
* dosbuild.bat: Somehow we got _double_ ^M's. Remove them.
|
|
||||||
Reported by Eli Zaretskii <eliz@is.elta.co.il>.
|
|
||||||
|
|
||||||
2002-07-07 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* po/*.po: Remove. We'll use wget to retrieve them at release
|
|
||||||
time.
|
|
||||||
|
|
||||||
* variable.c (do_variable_definition) [W32]: On W32 using cmd
|
|
||||||
rather than a shell you get an exception. Make sure we look up
|
|
||||||
the variable. Patch provided by Eli Zaretskii <eliz@is.elta.co.il>.
|
|
||||||
|
|
||||||
* remake.c (notice_finished_file): Fix handling of -t flag.
|
|
||||||
Patch provided by Henning Makholm <henning@makholm.net>.
|
|
||||||
|
|
||||||
* implicit.c (pattern_search): Some systems apparently run short
|
|
||||||
of stack space, and using alloca() in this function caused an
|
|
||||||
overrun. I modified it to use xmalloc() on the two variables
|
|
||||||
which seemed like they might get large. Fixes Bug #476.
|
|
||||||
|
|
||||||
* main.c (print_version): Update copyright notice to conform with
|
|
||||||
GNU standards.
|
|
||||||
(print_usage): Update help output.
|
|
||||||
|
|
||||||
* function.c (func_eval): Create a new make function, $(eval
|
|
||||||
...). Expand the arguments, put them into a buffer, then invoke
|
|
||||||
eval_buffer() on the resulting string.
|
|
||||||
(func_quote): Create a new function, $(quote VARNAME). Inserts
|
|
||||||
the value of the variable VARNAME without expanding it any
|
|
||||||
further.
|
|
||||||
|
|
||||||
* read.c (struct ebuffer): Change the linebuffer structure to an
|
|
||||||
"eval buffer", which can be either a file or a buffer.
|
|
||||||
(eval_makefile): Move the code in the old read_makefile() which
|
|
||||||
located a makefile into here: create a struct ebuffer with that
|
|
||||||
information. Have it invoke the new function eval() with that
|
|
||||||
ebuffer.
|
|
||||||
(eval_buffer): Create a new function that creates a struct ebuffer
|
|
||||||
that holds a string buffer instead of a file. Have it invoke
|
|
||||||
eval() with that ebuffer.
|
|
||||||
(eval): New function that contains the guts of the old
|
|
||||||
read_makefile() function: this function parses makefiles. Obtains
|
|
||||||
data to parse from the provided ebuffer. Some modifications to
|
|
||||||
make the flow of the function cleaner and clearer. Still could
|
|
||||||
use some work here...
|
|
||||||
(do_define): Takes a struct ebuffer instead of a FILE*. Read the
|
|
||||||
contents of the define/endef variable from the ebuffer.
|
|
||||||
(readstring): Read the next line from a string-style ebuffer.
|
|
||||||
(readline): Read the next line from an ebuffer. If it's a string
|
|
||||||
ebuffer, invoke readstring(). If it's a FILE* ebuffer, read it
|
|
||||||
from the file.
|
|
||||||
|
|
||||||
* dep.h (eval_buffer): Prototype eval_buffer();
|
|
||||||
|
|
||||||
* variable.c (do_variable_definition): Make sure that all
|
|
||||||
non-target-specific variables are registered in the global set.
|
|
||||||
If we're invoked from an $(eval ...) we might be inside a $(call
|
|
||||||
...) or other function which has pushed a variable scope; we still
|
|
||||||
want to define our variables from evaluated makefile code in the
|
|
||||||
global scope.
|
|
||||||
|
|
||||||
2002-07-03 Greg McGary <greg@mcgary.org>
|
|
||||||
|
|
||||||
* dep.h (struct dep) [ignore_mtime]: New member.
|
|
||||||
[changed]: convert to a bitfield.
|
|
||||||
* implicit.c (pattern_search): Zero ignore_mtime.
|
|
||||||
* main.c (main, handle_non_switch_argument): Likewise.
|
|
||||||
* rule.c (convert_suffix_rule): Likewise.
|
|
||||||
* read.c (read_all_makefiles, read_makefile, multi_glob): Likewise.
|
|
||||||
(read_makefile): Parse '|' in prerequisite list.
|
|
||||||
(uniquize_deps): Consider ignore_mtime when comparing deps.
|
|
||||||
* remake.c (update_file_1, check_dep): Don't force remake for
|
|
||||||
dependencies that have d->ignore_mtime.
|
|
||||||
* commands.c (FILE_LIST_SEPARATOR): New constant.
|
|
||||||
(set_file_variables): Don't include a
|
|
||||||
prerequisite in $+, $^ or $? if d->ignore_mtime.
|
|
||||||
Define $|.
|
|
||||||
|
|
||||||
2002-06-18 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* make.texinfo: Updates for next revision. New date/rev/etc.
|
|
||||||
Recreate all Info menus. Change license on the manual to the GNU
|
|
||||||
Free Documentation License. A number of typos.
|
|
||||||
(Variables Simplify): Don't use "-" before it's defined.
|
|
||||||
(Automatic Prerequisites): Rewrite the target example to work
|
|
||||||
properly if the compile fails. Remove incorrect comments about
|
|
||||||
how "set -e" behaves.
|
|
||||||
(Text Functions): Move the "word", "wordlist", "words", and
|
|
||||||
"firstword" functions here, from "File Name Functions".
|
|
||||||
* make-stds.texi: Update from latest GNU version.
|
|
||||||
* fdl.texi: (created) Import the latest GNU version.
|
|
||||||
|
|
||||||
2002-06-06 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* variable.c (do_variable_definition): New function: extract the
|
|
||||||
part of try_variable_definition() that actually sets the value
|
|
||||||
into a separate function.
|
|
||||||
(try_variable_definition): Call do_variable_definition() after
|
|
||||||
parsing the variable definition string.
|
|
||||||
(define_variable_in_set): Make the name argument const.
|
|
||||||
|
|
||||||
* variable.h (enum variable_flavor): Make public.
|
|
||||||
(do_variable_definition): Create prototype.
|
|
||||||
|
|
||||||
* read.c (read_all_makefiles): Create a new built-in variable,
|
|
||||||
MAKEFILE_LIST.
|
|
||||||
(read_makefile): Add each makefile read in to this variable value.
|
|
||||||
|
|
||||||
2002-05-18 Eli Zaretskii <eliz@is.elta.co.il>
|
|
||||||
|
|
||||||
* Makefile.DOS.template: Tweak according to changes in the
|
|
||||||
distribution. Add back the dependencies of *.o files.
|
|
||||||
|
|
||||||
* configh.dos.template: Synchronize with config.h.in.
|
|
||||||
|
|
||||||
2002-05-09 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* file.c (file_timestamp_now): Use K&R function declaration.
|
|
||||||
|
|
||||||
* getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils
|
|
||||||
getloadavg.c. Autoconf thinks QNX is SVR4-like, but it isn't, so
|
|
||||||
#undef it. Remove predefined setup of NLIST_STRUCT. Decide
|
|
||||||
whether to include nlist.h based on HAVE_NLIST_H. Change obsolete
|
|
||||||
NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME.
|
|
||||||
* configure.in (NLIST_STRUCT): Define this if we have nlist.h and
|
|
||||||
nlist.n_name is a pointer rather than an array.
|
|
||||||
|
|
||||||
* acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest
|
|
||||||
version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS.
|
|
||||||
* configure.in: Use it instead of the old version.
|
|
||||||
|
|
||||||
* main.c (main): Prefer setvbuf() to setlinebuf().
|
|
||||||
|
|
||||||
2002-05-08 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* Makefile.am (make_LDADD): Add GETLOADAVG_LIBS.
|
|
||||||
(loadavg_LDADD): Ditto.
|
|
||||||
|
|
||||||
2002-04-29 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* expand.c (recursively_expand_for_file): Rename
|
|
||||||
recursively_expand() to recursively_expand_for_file() and provide
|
|
||||||
an extra argument, struct file. If the argument is provided, set
|
|
||||||
the variable scope to that of the file before expanding.
|
|
||||||
* variable.h (recursively_expand): Make this a macro that invokes
|
|
||||||
recursively_expand_for_file() with a NULL file pointer.
|
|
||||||
* variable.c (target_environment): Call the renamed function and
|
|
||||||
provide the current file context.
|
|
||||||
Fixes Debian bug #144306.
|
|
||||||
|
|
||||||
2002-04-28 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
Allow $(call ...) user-defined variables to be self-referencing
|
|
||||||
without throwing an error. Allows implementation of transitive
|
|
||||||
closures, among other possibly useful things.
|
|
||||||
Requested by: Philip Guenther <guenther@sendmail.com>
|
|
||||||
|
|
||||||
* variable.h (struct variable): Add a new field: exp_count, and
|
|
||||||
new macros to hold its size and maximum value.
|
|
||||||
(warn_undefined): Make this a macro.
|
|
||||||
* variable.c (define_variable_in_set): Initialize it.
|
|
||||||
* expand.c (recursively_expand): If we detect recursive expansion
|
|
||||||
of a variable, check the exp_count field. If it's greater than 0
|
|
||||||
allow the recursion and decrement the count.
|
|
||||||
(warn_undefined): Remove this (now a macro in variable.h).
|
|
||||||
* function.c (func_call): Before we expand the user-defined
|
|
||||||
function, modify its exp_count field to contain the maximum
|
|
||||||
number of recursive calls we'll allow. After the call, reset it
|
|
||||||
to 0.
|
|
||||||
|
|
||||||
2002-04-21 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
Modified to use latest autoconf (2.53), automake (1.6.1), and
|
|
||||||
gettext (0.11.1). We're using gettext's new "external" support,
|
|
||||||
to avoid including libintl source with GNU make.
|
|
||||||
|
|
||||||
* README.cvs: New file. Explain how to build GNU make from CVS.
|
|
||||||
|
|
||||||
* configure.in: Modify checking for the system glob library.
|
|
||||||
Use AC_EGREP_CPP instead of AC_TRY_CPP. Remove the setting of
|
|
||||||
GLOBDIR (we will always put "glob" in SUBDIRS, so automake
|
|
||||||
etc. will manage it correctly). Set an automake conditional
|
|
||||||
USE_LOCAL_GLOB to decide whether to compile the glob library.
|
|
||||||
|
|
||||||
* getloadavg.c (main): Include make.h in the "TEST" program to
|
|
||||||
avoid warnings.
|
|
||||||
|
|
||||||
* Makefile.am: Remove special rules for loadavg. Replace them
|
|
||||||
with Automake capabilities for building extra programs.
|
|
||||||
|
|
||||||
* signame.c: This file does nothing if the system provide
|
|
||||||
strsignal(). If not, it implements strsignal(). If the system
|
|
||||||
doesn't define sys_siglist, then we make our own; otherwise we use
|
|
||||||
the system version.
|
|
||||||
* signame.h: Removed.
|
|
||||||
|
|
||||||
* main.c (main): No need to invoke signame_init(). Update copyright.
|
|
||||||
|
|
||||||
* ABOUT-NLS: Removed.
|
|
||||||
* gettext.c: Removed.
|
|
||||||
* gettext.h: Get a simplified copy from the gettext package.
|
|
||||||
* po/*: Created.
|
|
||||||
* i18n/*.po: Moved to po/.
|
|
||||||
* i18n/: Removed.
|
|
||||||
|
|
||||||
* config/*: Created. Contains package configuration helper files.
|
|
||||||
* config.guess, config.sub: Moved to config directory.
|
|
||||||
|
|
||||||
* configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile.
|
|
||||||
Rework to use new-style autoconf features. Use the "external"
|
|
||||||
mode for gettext. Make the build.sh config file conditional on
|
|
||||||
whether build.sh.in exists, to avoid autoconf errors.
|
|
||||||
* acinclude.m4: Removed almost all macros as being obsolete.
|
|
||||||
Rewrote remaining macros to use AC_DEFINE.
|
|
||||||
* acconfig.h: Removed.
|
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Add config/config.rpath. Use a
|
|
||||||
conditional to handle customs support. Remove special handling
|
|
||||||
for i18n features.
|
|
||||||
|
|
||||||
2002-04-20 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* function.c (func_call): Don't mark the argument variables $1,
|
|
||||||
etc. as recursive. They've already been fully expanded so
|
|
||||||
there's no need to do it again, and doing so strips escaped $'s.
|
|
||||||
Reported by Sebastian Glita <glseba@yahoo.com>.
|
|
||||||
|
|
||||||
* remake.c (notice_finished_file): Walk through double-colon
|
|
||||||
entries via the prev field, not the next field!
|
|
||||||
Reported by Greg McGary <greg@mcgary.org>.
|
|
||||||
|
|
||||||
* main.c (main): If the user specifies -q and asks for a specific
|
|
||||||
target which is a makefile, we got an assert. In that case it
|
|
||||||
turns out we should continue normally instead.
|
|
||||||
|
|
||||||
* i18n/de.po, i18n/fr.po: Installed an updated translation.
|
|
||||||
|
|
||||||
* i18n/he.po: Installed a new translation.
|
|
||||||
|
|
||||||
2002-01-07 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* i18n/es.po, i18n/ru.po: Installed an updated translation.
|
|
||||||
|
|
||||||
2001-12-04 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* i18n/ja.po: Installed an updated translation.
|
|
||||||
|
|
||||||
2001-09-04 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* i18n/da.po: Installed an updated translation.
|
|
||||||
|
|
||||||
2001-08-03 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* i18n/fr.po: Installed an updated translation.
|
|
||||||
Resolves Debian bug #106720.
|
|
||||||
|
|
||||||
2001-06-13 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* i18n/da.po, configure.in (ALL_LINGUAS): Installed a new
|
|
||||||
translation.
|
|
||||||
|
|
||||||
2001-06-11 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* i18n/ko.po: Installed a new translation.
|
|
||||||
|
|
||||||
2001-05-06 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
Modify the EINTR handling.
|
|
||||||
|
|
||||||
* job.c (new_job): Reorganize the jobserver algorithm. Reorder
|
|
||||||
the way in which we manage the file descriptor/signal handler race
|
|
||||||
trap to be more efficient.
|
|
||||||
|
|
||||||
2001-05-06 Paul Eggert <eggert@twinsun.com>
|
|
||||||
|
|
||||||
Restart almost all system calls that are interrupted, instead
|
|
||||||
of worrying about EINTR. The lone exception is the read() for
|
|
||||||
job tokens.
|
|
||||||
|
|
||||||
* configure.in (HAVE_SA_RESTART): New macro.
|
|
||||||
(MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART.
|
|
||||||
* main.c (main): Use SA_RESTART instead of the old,
|
|
||||||
nonstandard SA_INTERRUPT.
|
|
||||||
|
|
||||||
* configure.in (AC_CHECK_FUNCS): Add bsd_signal.
|
|
||||||
* main.c (bsd_signal): New function or macro,
|
|
||||||
if the implementation doesn't supply it.
|
|
||||||
(The bsd_signal function will be in POSIX 1003.1-200x.)
|
|
||||||
(HANDLESIG): Remove.
|
|
||||||
(main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG.
|
|
||||||
|
|
||||||
* make.h (EINTR_SET): Remove.
|
|
||||||
(SA_RESTART): New macro.
|
|
||||||
|
|
||||||
* arscan.c (ar_member_touch): Don't worry about EINTR.
|
|
||||||
* function.c (func_shell): Likewise.
|
|
||||||
* job.c (reap_children, free_child, new_job): Likewise.
|
|
||||||
* main.c (main): Likewise.
|
|
||||||
* remake.c (touch_file, name_mtime): Likewise.
|
|
||||||
|
|
||||||
* arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal;
|
|
||||||
if fstat failed with errno!=EINTR, the error was ignored.
|
|
||||||
|
|
||||||
* job.c (set_child_handler_action_flags): New function.
|
|
||||||
(new_job): Use it to temporarily clear the SIGCHLD action flags
|
|
||||||
while reading the token.
|
|
||||||
|
|
||||||
2001-05-02 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* job.c (start_job_command): Don't add define/endef per-line flags
|
|
||||||
to the top-level flags setting.
|
|
||||||
|
|
||||||
2001-04-03 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low
|
|
||||||
bit on error, so check for odd return values, not non-0 return
|
|
||||||
values.
|
|
||||||
(VMS_get_member_info): Calculate the timezone differences correctly.
|
|
||||||
Reported by John Fowler <jfowler@nyx.net>.
|
|
||||||
|
|
||||||
|
|
||||||
2001-03-14 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* variable.c (lookup_variable) [VMS]: Null-terminate the variable
|
|
||||||
value before invoking define_variable().
|
|
||||||
Reported by John Fowler <jfowler@nyx.net>.
|
|
||||||
|
|
||||||
2001-02-07 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* read.c (record_target_var): If we reset the variable due to a
|
|
||||||
command-line variable setting overriding it, turn off the "append"
|
|
||||||
flag.
|
|
||||||
|
|
||||||
2001-01-17 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* variable.c (lookup_variable) [VMS]: When getting values from the
|
|
||||||
environment, allocate enough space for the _value_ plus escapes,
|
|
||||||
not enough space for the name plus escapes :-/.
|
|
||||||
Reported by John Fowler <jfowler@nyx.net>.
|
|
||||||
|
|
||||||
* remake.c (f_mtime): Removed the "***" prefix from the mod time
|
|
||||||
warnings that make generates, so it doesn't look like an error.
|
|
||||||
Reported by Karl Berry <karl@gnu.org>.
|
|
||||||
|
|
||||||
|
|
||||||
Fix for PR/2020: Rework appended target-specific variables. I'm
|
|
||||||
fairly confident this algorithm is finally correct.
|
|
||||||
|
|
||||||
* expand.c (allocated_variable_append): Rewrite. Instead of
|
|
||||||
expanding each appended variable then adding all the expanded
|
|
||||||
strings together, we append all the unexpanded values going up
|
|
||||||
through the variable set contexts, then expand the final result.
|
|
||||||
This behaves just like non-target-specific appended variable
|
|
||||||
values, while the old way didn't in various corner cases.
|
|
||||||
(variable_append): New function: recursively append the unexpanded
|
|
||||||
value of a variable, walking from the outermost variable scope to
|
|
||||||
the innermost.
|
|
||||||
* variable.c (lookup_variable): Remove the code that looked up the
|
|
||||||
variable set list if the found variable was "append". We don't
|
|
||||||
need this anymore.
|
|
||||||
(lookup_variable_in_set): Make this non-static so we can use it
|
|
||||||
elsewhere.
|
|
||||||
(try_variable_definition): Use lookup_variable_in_set() rather
|
|
||||||
than faking out current_variable_set_list by hand (cleanup).
|
|
||||||
* variable.h: Add a prototype for the now non-static
|
|
||||||
lookup_variable_in_set().
|
|
||||||
|
|
||||||
2000-11-17 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the
|
|
||||||
WINDOWS32 port to assume timestamps can be up to 3 seconds away
|
|
||||||
before throwing a fit.
|
|
||||||
|
|
||||||
2000-11-17 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* read.c (readline): CRLF calculations had a hole, if you hit the
|
|
||||||
buffer grow scenario just right. Reworked the algorithm to avoid
|
|
||||||
the need for len or lastlen at all. Problem description with
|
|
||||||
sample code chages provided by Chris Faylor <cgf@redhat.com>.
|
|
||||||
|
|
||||||
2000-10-24 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* gettext.c (SWAP): Declare this with the prototype, otherwise
|
|
||||||
some systems don't work (non-32-bit? Reported for Cray T3E).
|
|
||||||
Reported by Thorstein Thorsteinsson <thor@signe.teokem.lu.se>.
|
|
||||||
|
|
||||||
2000-10-05 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro
|
|
||||||
AM_LC_MESSAGES; it doesn't seem to do anything anyway??
|
|
||||||
|
|
||||||
* i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation.
|
|
||||||
|
|
||||||
2000-09-22 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* gettext.c: Don't #define _GETTEXT_H here; we only include some
|
|
||||||
parts of the real gettext.h here, and we expect to really include
|
|
||||||
the real gettext.h later. If we keep this #define, it's ignored.
|
|
||||||
|
|
||||||
2000-09-21 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* main.c (log_working_directory): Rework the text to use complete
|
|
||||||
sentences, to make life simpler for the translators.
|
|
||||||
|
|
||||||
2000-08-29 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* file.c (remove_intermediates): Print a debug message before we
|
|
||||||
remove intermediate files, so the user (if she uses -d) knows
|
|
||||||
what's going on.
|
|
||||||
|
|
||||||
2000-08-21 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* variable.c (try_variable_definition): Change how we handle
|
|
||||||
target-specific append variable defns: instead of just setting the
|
|
||||||
value, expand it as an append _but_ only within the current
|
|
||||||
target's context. Otherwise we lose all but the last value if the
|
|
||||||
variable is appended more than once within the current target
|
|
||||||
context. Fixes PR/1831.
|
|
||||||
|
|
||||||
2000-08-16 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* function.c (func_shell): Nul-terminate the buffer before
|
|
||||||
printing an exec error message (just in case it's not!).
|
|
||||||
Fixes PR/1860, reported by Joey Hess <joey@valinux.com>.
|
|
||||||
|
|
||||||
2000-07-25 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* job.c (construct_command_argv_internal): Add "~" to the list of
|
|
||||||
sh_chars[] which disallow optimizing out the shell call.
|
|
||||||
|
|
||||||
2000-07-23 Paul Eggert <eggert@twinsun.com>
|
|
||||||
|
|
||||||
* NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which
|
|
||||||
supersedes --disable-nsec-timestamps.
|
|
||||||
* make.texinfo: Consistently use "time stamp" instead of "timestamp".
|
|
||||||
* README: Remove --disable-nsec-timestamps.
|
|
||||||
|
|
||||||
* filedef.h (struct file.low_resolution_time): New member.
|
|
||||||
* file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME.
|
|
||||||
* remake.c (update_file_1):
|
|
||||||
Avoid spurious rebuilds due to low resolution time stamps,
|
|
||||||
generalizing the earlier code that applied only to archive members.
|
|
||||||
(f_mtime): Archive members always have low resolution time stamps.
|
|
||||||
|
|
||||||
* configure.in: Remove --disable-nsec-timestamps, as this has
|
|
||||||
been superseded by .LOW_RESOLUTION_TIME.
|
|
||||||
|
|
||||||
2000-07-23 Paul Eggert <eggert@twinsun.com>
|
|
||||||
|
|
||||||
* configure.in (enable_nsec_timestamps): Renamed from
|
|
||||||
make_cv_nsec_timestamps, since enable/disable options
|
|
||||||
shouldn't be cached.
|
|
||||||
|
|
||||||
2000-07-23 Bruno Haible <haible@clisp.cons.org>
|
|
||||||
and Paul Eggert <eggert@twinsun.com>
|
|
||||||
|
|
||||||
* file.c (file_timestamp_now):
|
|
||||||
Use preprocessor-time check for FILE_TIMESTAMP_HI_RES
|
|
||||||
so that clock_gettime is not linked unless needed.
|
|
||||||
|
|
||||||
* filedef.h (FILE_TIMESTAMP_HI_RES):
|
|
||||||
Remove definition; "configure" now does this.
|
|
||||||
|
|
||||||
* configure.in (jm_AC_TYPE_UINTMAX_T): Move up,
|
|
||||||
to before high resolution file timestamp check,
|
|
||||||
since that check now uses uintmax_t.
|
|
||||||
(FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use
|
|
||||||
high resolution file timestamps.
|
|
||||||
(HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES,
|
|
||||||
so that we don't link in clock_gettime unnecessarily.
|
|
||||||
|
|
||||||
2000-07-17 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* i18n/ja.po: New version of the translation file.
|
|
||||||
|
|
||||||
2000-07-07 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* remake.c (f_mtime): If NO_FLOAT is defined, don't bother with
|
|
||||||
the offset calculation.
|
|
||||||
(name_mtime): Replace EINTR test with EINTR_SET macro.
|
|
||||||
|
|
||||||
2000-07-07 Paul Eggert <eggert@twinsun.com>
|
|
||||||
|
|
||||||
Fix for PR/1811:
|
|
||||||
|
|
||||||
* remake.c (update_file_1):
|
|
||||||
Avoid spurious rebuilds of archive members due to their
|
|
||||||
timestamp resolution being only one second.
|
|
||||||
(f_mtime): Avoid spurious warnings of timestamps in the future due to
|
|
||||||
the clock's resolution being lower than file timestamps'.
|
|
||||||
When warning about future timestamps, report only the discrepancy,
|
|
||||||
not the absolute value of the timestamp and the current time.
|
|
||||||
|
|
||||||
* file.c (file_timestamp_now): New arg RESOLUTION.
|
|
||||||
* filedef.h (file_timestamp_now): Likewise.
|
|
||||||
(FILE_TIMESTAMP_NS): Now returns int. All uses changed.
|
|
||||||
|
|
||||||
2000-07-05 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* variable.c (lookup_variable) [VMS]: Remove vestigial references
|
|
||||||
to listp. Fixes PR/1793.
|
|
||||||
|
|
||||||
2000-06-26 Paul Eggert <eggert@twinsun.com>
|
|
||||||
|
|
||||||
* Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it.
|
|
||||||
|
|
||||||
* dir.c (vms_hash): Ensure ctype macro args are nonnegative.
|
|
||||||
|
|
||||||
* remake.c (f_mtime): Remove unused var memtime.
|
|
||||||
|
|
||||||
2000-06-25 Martin Buchholz <martin@xemacs.org>
|
|
||||||
|
|
||||||
* make.texinfo, NEWS, TODO.private: Minor spelling corrections.
|
|
||||||
Ran spell-check on make.texinfo.
|
|
||||||
|
|
||||||
|
|
||||||
See ChangeLog.2 for earlier changes.
|
|
||||||
25
ChangeLog.1
25
ChangeLog.1
@@ -1703,7 +1703,7 @@ Thu Sep 14 18:29:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
|||||||
existing variable's origin, is `o_env', make it `o_env_override'.
|
existing variable's origin, is `o_env', make it `o_env_override'.
|
||||||
|
|
||||||
* load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
|
* load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
|
||||||
* compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
|
* compatMakefile: Changed the comment for `LOAD_AVG' accordingly.
|
||||||
|
|
||||||
Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
||||||
|
|
||||||
@@ -3218,7 +3218,7 @@ Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
|||||||
* variable.c (expand_function: `shell'): Use
|
* variable.c (expand_function: `shell'): Use
|
||||||
`shell_function_completed'. Block children before forking and
|
`shell_function_completed'. Block children before forking and
|
||||||
unblock after `shell_function_pid' is set properly and
|
unblock after `shell_function_pid' is set properly and
|
||||||
`shell_functon_completed' is reset to 0.
|
`shell_function_completed' is reset to 0.
|
||||||
|
|
||||||
* commands.c (child_handler): When the child of the `shell' function
|
* commands.c (child_handler): When the child of the `shell' function
|
||||||
completes, set `shell_function_completed' to 1 if it actually ran,
|
completes, set `shell_function_completed' to 1 if it actually ran,
|
||||||
@@ -4465,7 +4465,7 @@ Fri Sep 16 13:59:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
|||||||
`maxsuffix', and must be called before count_implicit_rule_limits.
|
`maxsuffix', and must be called before count_implicit_rule_limits.
|
||||||
|
|
||||||
* rule.c (pattern_search): If an existent (non-intermediate)
|
* rule.c (pattern_search): If an existent (non-intermediate)
|
||||||
dependendency was found via a terminal rule, set its
|
dependency was found via a terminal rule, set its
|
||||||
`tried_implicit' flag, so it will never have implicit rule search done.
|
`tried_implicit' flag, so it will never have implicit rule search done.
|
||||||
|
|
||||||
* glob.c: Bug fix to avoid alloca(0).
|
* glob.c: Bug fix to avoid alloca(0).
|
||||||
@@ -4826,7 +4826,7 @@ Sat Jul 30 15:47:23 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
|||||||
new entry as the old entry's prev pointer.
|
new entry as the old entry's prev pointer.
|
||||||
|
|
||||||
* dir.c: Re-indented the `struct dir' definition to be right.
|
* dir.c: Re-indented the `struct dir' definition to be right.
|
||||||
(dir_load): Cleaned up slighty.
|
(dir_load): Cleaned up slightly.
|
||||||
(file_exists_p): Removed comment saying we could use `access', since
|
(file_exists_p): Removed comment saying we could use `access', since
|
||||||
that is a bad idea (except for setuid programs). Cleaned up slightly.
|
that is a bad idea (except for setuid programs). Cleaned up slightly.
|
||||||
|
|
||||||
@@ -4978,3 +4978,20 @@ Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
|||||||
* Took Make out of RCS.
|
* Took Make out of RCS.
|
||||||
|
|
||||||
* Split the monolithic `make.c' into several smaller files.
|
* Split the monolithic `make.c' into several smaller files.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
39
ChangeLog.2
39
ChangeLog.2
@@ -1,18 +1,3 @@
|
|||||||
2000-06-23 Paul D. Smith <psmith@gnu.org>
|
|
||||||
|
|
||||||
* main.c (main): Replace EXIT_SUCCESS, EXIT_FAILURE, and
|
|
||||||
EXIT_TROUBLE with MAKE_SUCCESS, MAKE_FAILURE, and MAKE_TROUBLE.
|
|
||||||
* make.h: Define these macros.
|
|
||||||
|
|
||||||
* Version 3.79.1 released.
|
|
||||||
|
|
||||||
* configure.in: Add a new option, --disable-nsec-timestamps, to
|
|
||||||
avoid using sub-second timestamps on systems that support it. It
|
|
||||||
can lead to problems, e.g. if your makefile relies on "cp -p".
|
|
||||||
* README.template: Document the issue with "cp -p".
|
|
||||||
|
|
||||||
* config.guess, config.sub: Updated.
|
|
||||||
|
|
||||||
2000-06-22 Paul D. Smith <psmith@gnu.org>
|
2000-06-22 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* job.c (start_job_command): Increment commands_started before the
|
* job.c (start_job_command): Increment commands_started before the
|
||||||
@@ -3095,7 +3080,7 @@ Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>
|
|||||||
* main.c: (main), variable.c Changed handling of ENV-vars. Make
|
* main.c: (main), variable.c Changed handling of ENV-vars. Make
|
||||||
stores now the names of the variables only and reads their contents
|
stores now the names of the variables only and reads their contents
|
||||||
when they are accessed to reflect that these variables are really
|
when they are accessed to reflect that these variables are really
|
||||||
global (ie. they CAN change WHILE make runs !) This handling is
|
global (i.e., they CAN change WHILE make runs !) This handling is
|
||||||
made in lookup_variable()
|
made in lookup_variable()
|
||||||
|
|
||||||
* Makefile.ami: renamed file.h to filedep.h
|
* Makefile.ami: renamed file.h to filedep.h
|
||||||
@@ -6645,4 +6630,24 @@ Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
See ChangeLog.1 for earlier changes.
|
See ChangeLog.1, available in the Git repository at:
|
||||||
|
|
||||||
|
http://git.savannah.gnu.org/cgit/make.git/tree/
|
||||||
|
|
||||||
|
for earlier changes.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 1991-2007 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
5633
ChangeLog.3
Normal file
5633
ChangeLog.3
Normal file
File diff suppressed because it is too large
Load Diff
170
INSTALL
170
INSTALL
@@ -1,25 +1,43 @@
|
|||||||
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is free documentation; the Free Software Foundation gives
|
||||||
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
The `configure' shell script attempts to guess correct values for
|
The `configure' shell script attempts to guess correct values for
|
||||||
various system-dependent variables used during compilation. It uses
|
various system-dependent variables used during compilation. It uses
|
||||||
those values to create a `Makefile' in each directory of the package.
|
those values to create a `Makefile' in each directory of the package.
|
||||||
It may also create one or more `.h' files containing system-dependent
|
It may also create one or more `.h' files containing system-dependent
|
||||||
definitions. Finally, it creates a shell script `config.status' that
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
you can run in the future to recreate the current configuration, a file
|
you can run in the future to recreate the current configuration, and a
|
||||||
`config.cache' that saves the results of its tests to speed up
|
file `config.log' containing compiler output (useful mainly for
|
||||||
reconfiguring, and a file `config.log' containing compiler output
|
debugging `configure').
|
||||||
(useful mainly for debugging `configure').
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.)
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
If you need to do unusual things to compile the package, please try
|
||||||
to figure out how `configure' could check whether to do them, and mail
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
diffs or instructions to the address given in the `README' so they can
|
diffs or instructions to the address given in the `README' so they can
|
||||||
be considered for the next release. If at some point `config.cache'
|
be considered for the next release. If you are using the cache, and at
|
||||||
contains results you don't want to keep, you may remove or edit it.
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
The file `configure.in' is used to create `configure' by a program
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
called `autoconf'. You only need `configure.in' if you want to change
|
`configure' by a program called `autoconf'. You only need
|
||||||
it or regenerate `configure' using a newer version of `autoconf'.
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
@@ -34,13 +52,7 @@ The simplest way to compile this package is:
|
|||||||
|
|
||||||
2. Type `make' to compile the package.
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
If you're building GNU make on a system which does not already have
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
a `make', you can use the build.sh shell script to compile. Run
|
|
||||||
`sh ./build.sh'. This should compile the program in the current
|
|
||||||
directory. Then you will have a Make program that you can use for
|
|
||||||
`make install', or whatever else.
|
|
||||||
|
|
||||||
3. Optionally, type `./make check' to run any self-tests that come with
|
|
||||||
the package.
|
the package.
|
||||||
|
|
||||||
4. Type `make install' to install the programs and any data files and
|
4. Type `make install' to install the programs and any data files and
|
||||||
@@ -58,20 +70,22 @@ The simplest way to compile this package is:
|
|||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that
|
Some systems require unusual options for compilation or linking that the
|
||||||
the `configure' script does not know about. You can give `configure'
|
`configure' script does not know about. Run `./configure --help' for
|
||||||
initial values for variables by setting them in the environment. Using
|
details on some of the pertinent environment variables.
|
||||||
a Bourne-compatible shell, you can do that on the command line like
|
|
||||||
this:
|
|
||||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
|
||||||
|
|
||||||
Or on systems that have the `env' program, you can do it like this:
|
You can give `configure' initial values for configuration parameters
|
||||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
Compiling For Multiple Architectures
|
Compiling For Multiple Architectures
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
You can compile the package for more than one kind of computer at the
|
||||||
same time, by placing the object files for each architecture in their
|
same time, by placing the object files for each architecture in their
|
||||||
own directory. To do this, you must use a version of `make' that
|
own directory. To do this, you must use a version of `make' that
|
||||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
@@ -79,28 +93,28 @@ directory where you want the object files and executables to go and run
|
|||||||
the `configure' script. `configure' automatically checks for the
|
the `configure' script. `configure' automatically checks for the
|
||||||
source code in the directory that `configure' is in and in `..'.
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
If you have to use a `make' that does not supports the `VPATH'
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
variable, you have to compile the package for one architecture at a time
|
variable, you have to compile the package for one architecture at a
|
||||||
in the source code directory. After you have installed the package for
|
time in the source code directory. After you have installed the
|
||||||
one architecture, use `make distclean' before reconfiguring for another
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
architecture.
|
for another architecture.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
|
|
||||||
By default, `make install' will install the package's files in
|
By default, `make install' will install the package's files in
|
||||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||||
installation prefix other than `/usr/local' by giving `configure' the
|
installation prefix other than `/usr/local' by giving `configure' the
|
||||||
option `--prefix=PATH'.
|
option `--prefix=PREFIX'.
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
You can specify separate installation prefixes for
|
||||||
architecture-specific files and architecture-independent files. If you
|
architecture-specific files and architecture-independent files. If you
|
||||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
give `configure' the option `--exec-prefix=PREFIX', the package will
|
||||||
PATH as the prefix for installing programs and libraries.
|
use PREFIX as the prefix for installing programs and libraries.
|
||||||
Documentation and other data files will still use the regular prefix.
|
Documentation and other data files will still use the regular prefix.
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
In addition, if you use an unusual directory layout you can give
|
||||||
options like `--bindir=PATH' to specify different values for particular
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
kinds of files. Run `configure --help' for a list of the directories
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
you can set and what kinds of files go in them.
|
you can set and what kinds of files go in them.
|
||||||
|
|
||||||
@@ -111,7 +125,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|||||||
Optional Features
|
Optional Features
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Some packages pay attention to `--enable-FEATURE' options to
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
`configure', where FEATURE indicates an optional part of the package.
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
is something like `gnu-as' or `x' (for the X Window System). The
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
@@ -126,48 +140,81 @@ you can use the `configure' options `--x-includes=DIR' and
|
|||||||
Specifying the System Type
|
Specifying the System Type
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
There may be some features `configure' can not figure out
|
There may be some features `configure' cannot figure out automatically,
|
||||||
automatically, but needs to determine by the type of host the package
|
but needs to determine by the type of machine the package will run on.
|
||||||
will run on. Usually `configure' can figure that out, but if it prints
|
Usually, assuming the package is built to be run on the _same_
|
||||||
a message saying it can not guess the host type, give it the
|
architectures, `configure' can figure that out, but if it prints a
|
||||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
message saying it cannot guess the machine type, give it the
|
||||||
type, such as `sun4', or a canonical name with three fields:
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
See the file `config.sub' for the possible values of each field. If
|
where SYSTEM can have one of these forms:
|
||||||
`config.sub' isn't included in this package, then this package doesn't
|
|
||||||
need to know the host type.
|
|
||||||
|
|
||||||
If you are building compiler tools for cross-compiling, you can also
|
OS KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
use the `--target=TYPE' option to select the type of system they will
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
produce code for and the `--build=TYPE' option to select the type of
|
produce code for.
|
||||||
system on which you are compiling the package.
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
Sharing Defaults
|
Sharing Defaults
|
||||||
================
|
================
|
||||||
|
|
||||||
If you want to set default values for `configure' scripts to share,
|
If you want to set default values for `configure' scripts to share, you
|
||||||
you can create a site shell script called `config.site' that gives
|
can create a site shell script called `config.site' that gives default
|
||||||
default values for variables like `CC', `cache_file', and `prefix'.
|
values for variables like `CC', `cache_file', and `prefix'.
|
||||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
A warning: not all `configure' scripts look for a site script.
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
Operation Controls
|
Defining Variables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it
|
Variables not defined in a site shell script can be set in the
|
||||||
operates.
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
`--cache-file=FILE'
|
./configure CC=/usr/local2/bin/gcc
|
||||||
Use and save the results of the tests in FILE instead of
|
|
||||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
will cause the specified gcc to be used as the C compiler (unless it is
|
||||||
debugging `configure'.
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it operates.
|
||||||
|
|
||||||
`--help'
|
`--help'
|
||||||
|
`-h'
|
||||||
Print a summary of the options to `configure', and exit.
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
`--quiet'
|
`--quiet'
|
||||||
`--silent'
|
`--silent'
|
||||||
`-q'
|
`-q'
|
||||||
@@ -179,9 +226,6 @@ operates.
|
|||||||
Look for the package's source code in directory DIR. Usually
|
Look for the package's source code in directory DIR. Usually
|
||||||
`configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
`--version'
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
Print the version of Autoconf used to generate the `configure'
|
`configure --help' for more details.
|
||||||
script, and exit.
|
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options.
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,21 @@
|
|||||||
# -*-Makefile-*- template for DJGPP
|
# -*-Makefile-*- template for DJGPP
|
||||||
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
||||||
|
#
|
||||||
# Copyright (C) 1994, 1995-1998, 1999, 2002 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
||||||
# This Makefile.DOS is free software; the Free Software Foundation
|
# This file is part of GNU Make.
|
||||||
# gives unlimited permission to copy, distribute and modify it.
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
@@ -71,16 +82,15 @@ make_SOURCES = %SOURCES%
|
|||||||
libglob_a_SOURCES = %GLOB_SOURCES%
|
libglob_a_SOURCES = %GLOB_SOURCES%
|
||||||
make_LDADD = glob/libglob.a
|
make_LDADD = glob/libglob.a
|
||||||
|
|
||||||
info_TEXINFOS = make.texinfo
|
|
||||||
man_MANS = make.1
|
man_MANS = make.1
|
||||||
|
|
||||||
INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"c:/djgpp/lib\" -DINCLUDEDIR=\"c:/djgpp/include\" -DLOCALEDIR=\"$(localedir)\"
|
INCLUDES = -I$(srcdir)/glob -DLIBDIR=\"$(prefix)$(libdir)\" -DINCLUDEDIR=\"$(prefix)$(includedir)\" -DLOCALEDIR=\"$(prefix)$(localedir)\"
|
||||||
|
|
||||||
BUILT_SOURCES = README build.sh-in
|
BUILT_SOURCES = README build.sh-in
|
||||||
|
|
||||||
EXTRA_DIST = $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk config.h-vms makefile.vms readme.vms vmsdir.h vmsfunctions.c vmsify.c
|
EXTRA_DIST = $(BUILT_SOURCES) $(man_MANS) README.customs remote-cstms.c make-stds.texi texinfo.tex SCOPTIONS SMakefile Makefile.ami README.Amiga config.ami amiga.c amiga.h NMakefile README.DOS configh.dos configure.bat makefile.com README.W32 build_w32.bat config.h-W32 subproc.bat make.lnk config.h-vms makefile.vms README.VMS vmsdir.h vmsfunctions.c vmsify.c gmk-default.scm gmk-default.h
|
||||||
|
|
||||||
SUBDIRS = glob
|
SUBDIRS = glob doc
|
||||||
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
||||||
CONFIG_HEADER = config.h
|
CONFIG_HEADER = config.h
|
||||||
CONFIG_CLEAN_FILES = build.sh
|
CONFIG_CLEAN_FILES = build.sh
|
||||||
@@ -104,14 +114,15 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
|||||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
TEXI2DVI = texi2dvi
|
TEXI2DVI = texi2dvi
|
||||||
TEXINFO_TEX = $(srcdir)/config/texinfo.tex
|
TEXINFO_TEX = $(srcdir)/config/texinfo.tex
|
||||||
INFO_DEPS = make.info
|
INFO_DEPS = doc/make.info
|
||||||
DVIS = make.dvi
|
DVIS = doc/make.dvi
|
||||||
TEXINFOS = make.texinfo
|
TEXINFOS = doc/make.texi
|
||||||
|
noinst_TEXINFOS = doc/fdl.texi doc/make-stds.texi
|
||||||
man1dir = $(mandir)/man1
|
man1dir = $(mandir)/man1
|
||||||
MANS = $(man_MANS)
|
MANS = $(man_MANS)
|
||||||
|
|
||||||
NROFF = nroff
|
NROFF = nroff
|
||||||
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in configure configure.in getloadavg.c
|
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in configure configure.ac getloadavg.c
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
@@ -124,7 +135,7 @@ HEADERS = $(wildcard $(srcdir)/*.h)
|
|||||||
default: all
|
default: all
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .dvi .info .o .obj .ps .texinfo .tex
|
.SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
|
||||||
|
|
||||||
mostlyclean-hdr:
|
mostlyclean-hdr:
|
||||||
|
|
||||||
@@ -174,56 +185,70 @@ make$(EXEEXT): $(make_OBJECTS) $(make_DEPENDENCIES)
|
|||||||
@command.com /c if exist make.exe del make.exe
|
@command.com /c if exist make.exe del make.exe
|
||||||
$(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS)
|
$(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS)
|
||||||
|
|
||||||
make.info: make.texinfo
|
# Documentation
|
||||||
make.dvi: make.texinfo
|
|
||||||
|
make.info: make.texi
|
||||||
|
make.dvi: make.texi
|
||||||
|
make.ps: make.dvi make.texi
|
||||||
|
make.html: make.texi
|
||||||
|
|
||||||
|
|
||||||
DVIPS = dvips
|
DVIPS = dvips
|
||||||
|
|
||||||
.texinfo.info:
|
.texi.info:
|
||||||
@command.com /c if exist make.info* del make.info*
|
@command.com /c if exist make.info* del make.info*
|
||||||
@command.com /c if exist make.i* del make.i*
|
@command.com /c if exist make.i* del make.i*
|
||||||
$(MAKEINFO) -I$(srcdir) $< -o ./$@
|
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||||
|
|
||||||
.texinfo:
|
.texi:
|
||||||
@command.com /c if exist make.info* del make.info*
|
@command.com /c if exist make.info* del make.info*
|
||||||
@command.com /c if exist make.i* del make.i*
|
@command.com /c if exist make.i* del make.i*
|
||||||
$(MAKEINFO) -I$(srcdir) $< -o ./$@
|
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||||
|
|
||||||
.texinfo.dvi:
|
.texi.dvi:
|
||||||
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||||
|
|
||||||
|
|
||||||
.dvi.ps:
|
.dvi.ps:
|
||||||
$(DVIPS) $< -o $@
|
$(DVIPS) $< -o $@
|
||||||
|
|
||||||
|
# Other documentation formats
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
.texi.html:
|
||||||
|
@command.com /c if exist make.html* del make.html*
|
||||||
|
$(MAKEINFO) --html -I$(srcdir) --no-split $< -o ./$@
|
||||||
|
|
||||||
install-info-am: $(INFO_DEPS)
|
install-info-am: $(INFO_DEPS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||||
@for file in $(INFO_DEPS) make.i; do d=$(srcdir); for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9] $$file[0-9] $$file[0-9][0-9]`; do if test -f $$d/$$ifile; then echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; else : ; fi; done; done
|
@for file in $(INFO_DEPS); do iifile=`echo $$file | sed "s|doc/||"`; d=$(srcdir); for ifile in `cd $$d && echo $$file`; do if test -f $$d/$$ifile; then echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile"; $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$iifile; else : ; fi; done; done
|
||||||
@$(POST_INSTALL)
|
@$(POST_INSTALL)
|
||||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then for file in $(INFO_DEPS); do echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file"; install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :; done; else : ; fi
|
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then for file in $(INFO_DEPS); do iifile=`echo $$file | sed "s|doc/||"`; echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile"; install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$iifile || :; done; else : ; fi
|
||||||
|
|
||||||
uninstall-info:
|
uninstall-info:
|
||||||
$(PRE_UNINSTALL)
|
$(PRE_UNINSTALL)
|
||||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then ii=yes; else ii=; fi; for file in $(INFO_DEPS); do test -z $ii || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; done
|
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then ii=yes; else ii=; fi; for file in $(INFO_DEPS); do test -z $ii || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; done
|
||||||
$(NORMAL_UNINSTALL)
|
$(NORMAL_UNINSTALL)
|
||||||
for file in $(INFO_DEPS) make.i; do (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9] $$file[0-9] $$file[0-9][0-9]); done
|
for file in $(INFO_DEPS); do (cd $(DESTDIR)$(infodir) && rm -f $$file); done
|
||||||
|
|
||||||
dist-info: $(INFO_DEPS)
|
dist-info: $(INFO_DEPS)
|
||||||
for base in $(INFO_DEPS); do d=$(srcdir); for file in `cd $$d && eval echo $$base*`; do test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; done
|
for base in $(INFO_DEPS); do d=$(srcdir); for file in `cd $$d && eval echo $$base*`; do test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; done
|
||||||
|
|
||||||
mostlyclean-aminfo:
|
mostlyclean-aminfo:
|
||||||
-rm -f make.aux make.cp make.cps make.dvi make.fn make.fns make.ky \
|
-rm -f $(srcdir)/doc/make.aux $(srcdir)/doc/make.cp $(srcdir)/doc/make.cps $(srcdir)/doc/make.dvi \
|
||||||
make.kys make.ps make.log make.pg make.toc make.tp make.tps \
|
$(srcdir)/doc/make.fn $(srcdir)/doc/make.fns $(srcdir)/doc/make.ky $(srcdir)/doc/make.kys \
|
||||||
make.vr make.vrs make.op make.tr make.cv make.cn
|
$(srcdir)/doc/make.ps $(srcdir)/doc/make.log $(srcdir)/doc/make.pg $(srcdir)/doc/make.toc \
|
||||||
|
$(srcdir)/doc/make.tp $(srcdir)/doc/make.tps $(srcdir)/doc/make.vr $(srcdir)/doc/make.vrs \
|
||||||
|
$(srcdir)/doc/make.op $(srcdir)/doc/make.tr $(srcdir)/doc/make.cv $(srcdir)/doc/make.cn \
|
||||||
|
$(srcdir)/doc/make.html
|
||||||
|
|
||||||
clean-aminfo:
|
clean-aminfo:
|
||||||
|
|
||||||
distclean-aminfo:
|
distclean-aminfo:
|
||||||
|
|
||||||
maintainer-clean-aminfo:
|
maintainer-clean-aminfo:
|
||||||
for i in $(INFO_DEPS) make.i; do rm -f `eval echo $$i*`; done
|
for i in $(INFO_DEPS); do rm -f $$i*; done
|
||||||
|
|
||||||
install-man1:
|
install-man1:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||||
@@ -268,13 +293,10 @@ uninstall-man:
|
|||||||
# but do a sanity check: if $SUBDIRS will ever have more than
|
# but do a sanity check: if $SUBDIRS will ever have more than
|
||||||
# a single directory, yell bloody murder.
|
# a single directory, yell bloody murder.
|
||||||
all-recursive:
|
all-recursive:
|
||||||
ifeq ($(words $(SUBDIRS)), 1)
|
ifeq ($(findstring glob, $(SUBDIRS)), glob)
|
||||||
@command.com /c if not exist glob\\nul md glob
|
@command.com /c if not exist glob\\nul md glob
|
||||||
@echo Making all in $(SUBDIRS)
|
@echo Making all in glob
|
||||||
$(MAKE) -C $(SUBDIRS) -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a
|
$(MAKE) -C glob -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a
|
||||||
else
|
|
||||||
@echo FATAL: There is more than one directory in "($(SUBDIRS))"
|
|
||||||
@$(EXIT_FAIL)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(SUBDIRS):
|
$(SUBDIRS):
|
||||||
@@ -287,11 +309,13 @@ libglob.a: $(libglob_a_OBJECTS)
|
|||||||
|
|
||||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||||
maintainer-clean-recursive check-recursive:
|
maintainer-clean-recursive check-recursive:
|
||||||
ifeq ($(words $(SUBDIRS)), 1)
|
ifeq ($(words $(SUBDIRS)), 2)
|
||||||
@echo Making $(shell echo $@ | sed s/-recursive//) in $(SUBDIRS)
|
@echo Making $(shell echo $@ | sed s/-recursive//) in glob
|
||||||
$(MAKE) -C $(SUBDIRS) -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
|
$(MAKE) -C glob -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
|
||||||
|
@echo Making $(shell echo $@ | sed s/-recursive//) in doc
|
||||||
|
$(MAKE) -C doc -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
|
||||||
else
|
else
|
||||||
@echo FATAL: There is more than one directory in "($(SUBDIRS))"
|
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
|
||||||
@$(EXIT_FAIL)
|
@$(EXIT_FAIL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -299,10 +323,10 @@ tags-in-glob: $(libglob_a_SOURCES)
|
|||||||
etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS
|
etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS
|
||||||
|
|
||||||
tags-recursive:
|
tags-recursive:
|
||||||
ifeq ($(words $(SUBDIRS)), 1)
|
ifeq ($(words $(SUBDIRS)), 2)
|
||||||
$(MAKE) tags-in-glob
|
$(MAKE) tags-in-glob
|
||||||
else
|
else
|
||||||
@echo FATAL: There is more than one directory in "($(SUBDIRS))"
|
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
|
||||||
@$(EXIT_FAIL)
|
@$(EXIT_FAIL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -353,15 +377,44 @@ distdir: $(DISTFILES)
|
|||||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
|
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
|
||||||
|
|
||||||
info: $(INFO_DEPS) info-recursive
|
info: info-recursive
|
||||||
dvi: $(DVIS) dvi-recursive
|
info-recursive:
|
||||||
|
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||||
|
@command.com /c if not exist doc\\nul md doc
|
||||||
|
@echo Making all in doc
|
||||||
|
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.info
|
||||||
|
endif
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
dvi-recursive:
|
||||||
|
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||||
|
@command.com /c if not exist doc\\nul md doc
|
||||||
|
@echo Making all in doc
|
||||||
|
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.dvi
|
||||||
|
endif
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
ps-recursive:
|
||||||
|
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||||
|
@command.com /c if not exist doc\\nul md doc
|
||||||
|
@echo Making all in doc
|
||||||
|
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.ps
|
||||||
|
endif
|
||||||
|
|
||||||
|
html-recursive:
|
||||||
|
ifeq ($(findstring doc, $(SUBDIRS)), doc)
|
||||||
|
@command.com /c if not exist doc\\nul md doc
|
||||||
|
@echo Making all in doc
|
||||||
|
$(MAKE) -C doc -f ../Makefile VPATH=$(srcdir)/doc make.html
|
||||||
|
endif
|
||||||
|
|
||||||
check: all-am check-recursive check-local
|
check: all-am check-recursive check-local
|
||||||
@:
|
@:
|
||||||
installcheck: installcheck-recursive
|
installcheck: installcheck-recursive
|
||||||
all-recursive-am: config.h
|
all-recursive-am: config.h
|
||||||
$(MAKE) all-recursive
|
$(MAKE) all-recursive
|
||||||
|
|
||||||
all-am: Makefile $(INFO_DEPS) $(PROGRAMS) config.h
|
all-am: Makefile $(PROGRAMS) config.h info
|
||||||
|
|
||||||
install-exec-am: install-binPROGRAMS
|
install-exec-am: install-binPROGRAMS
|
||||||
|
|
||||||
@@ -443,7 +496,8 @@ maintainer-clean-depend info dvi check-local installcheck \
|
|||||||
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
|
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
|
||||||
install-exec install-data install uninstall all installdirs \
|
install-exec install-data install uninstall all installdirs \
|
||||||
mostlyclean-generic distclean-generic clean-generic \
|
mostlyclean-generic distclean-generic clean-generic \
|
||||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
maintainer-clean-generic clean mostlyclean distclean maintainer-clean \
|
||||||
|
html
|
||||||
|
|
||||||
|
|
||||||
# --------------- Local DIST Section
|
# --------------- Local DIST Section
|
||||||
@@ -452,7 +506,7 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
|||||||
#
|
#
|
||||||
dist-hook:
|
dist-hook:
|
||||||
(cd $(srcdir); \
|
(cd $(srcdir); \
|
||||||
w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \
|
w32=`find w32 -follow \( -name .git -prune \) -o -type f -print`; \
|
||||||
tar chf - $$w32) \
|
tar chf - $$w32) \
|
||||||
| (cd $(distdir); tar xfBp -)
|
| (cd $(distdir); tar xfBp -)
|
||||||
|
|
||||||
@@ -531,38 +585,3 @@ check-regression:
|
|||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
||||||
# --------------- DEPENDENCIES
|
# --------------- DEPENDENCIES
|
||||||
ar.o: ar.c make.h config.h gettext.h filedef.h dep.h glob/fnmatch.h
|
|
||||||
arscan.o: arscan.c make.h config.h gettext.h
|
|
||||||
commands.o: commands.c make.h config.h gettext.h dep.h filedef.h \
|
|
||||||
variable.h job.h commands.h
|
|
||||||
default.o: default.c make.h config.h gettext.h rule.h dep.h filedef.h \
|
|
||||||
job.h commands.h variable.h
|
|
||||||
dir.o: dir.c make.h config.h gettext.h glob/glob.h
|
|
||||||
expand.o: expand.c make.h config.h gettext.h filedef.h job.h commands.h \
|
|
||||||
variable.h rule.h
|
|
||||||
file.o: file.c make.h config.h gettext.h dep.h filedef.h job.h \
|
|
||||||
commands.h variable.h debug.h
|
|
||||||
function.o: function.c make.h config.h gettext.h filedef.h variable.h \
|
|
||||||
dep.h job.h commands.h debug.h
|
|
||||||
getopt.o: getopt.c config.h gettext.h getopt.h
|
|
||||||
getopt1.o: getopt1.c config.h getopt.h
|
|
||||||
implicit.o: implicit.c make.h config.h gettext.h rule.h dep.h filedef.h \
|
|
||||||
debug.h
|
|
||||||
job.o: job.c make.h config.h gettext.h job.h debug.h filedef.h \
|
|
||||||
commands.h variable.h
|
|
||||||
main.o: main.c make.h config.h gettext.h dep.h filedef.h variable.h \
|
|
||||||
job.h commands.h rule.h debug.h getopt.h
|
|
||||||
misc.o: misc.c make.h config.h gettext.h dep.h debug.h
|
|
||||||
read.o: read.c make.h config.h gettext.h glob/glob.h dep.h filedef.h \
|
|
||||||
job.h commands.h variable.h rule.h debug.h
|
|
||||||
remake.o: remake.c make.h config.h gettext.h filedef.h job.h commands.h \
|
|
||||||
dep.h variable.h debug.h
|
|
||||||
remote-stub.o: remote-stub.c make.h config.h gettext.h filedef.h job.h \
|
|
||||||
commands.h
|
|
||||||
rule.o: rule.c make.h config.h gettext.h dep.h filedef.h job.h \
|
|
||||||
commands.h variable.h rule.h
|
|
||||||
signame.o: signame.c make.h config.h gettext.h
|
|
||||||
variable.o: variable.c make.h config.h gettext.h dep.h filedef.h job.h \
|
|
||||||
commands.h variable.h rule.h
|
|
||||||
version.o: version.c config.h
|
|
||||||
vpath.o: vpath.c make.h config.h gettext.h filedef.h variable.h
|
|
||||||
|
|||||||
137
Makefile.am
137
Makefile.am
@@ -1,11 +1,40 @@
|
|||||||
# This is a -*-Makefile-*-, or close enough
|
# This is a -*-Makefile-*-, or close enough
|
||||||
|
#
|
||||||
|
# Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.7 dist-bzip2 check-news
|
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options
|
||||||
ACLOCAL_AMFLAGS = -I config
|
ACLOCAL_AMFLAGS = -I config
|
||||||
|
|
||||||
SUBDIRS = glob config po doc
|
MAKE_HOST = @MAKE_HOST@
|
||||||
|
|
||||||
|
# Only process if target is MS-Windows
|
||||||
|
if WINDOWSENV
|
||||||
|
MAYBE_W32 = w32
|
||||||
|
W32INC = -I $(top_srcdir)/w32/include
|
||||||
|
W32LIB = -Lw32 -lw32
|
||||||
|
ossrc =
|
||||||
|
else
|
||||||
|
ossrc = posixos.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS = glob config po doc $(MAYBE_W32)
|
||||||
|
|
||||||
bin_PROGRAMS = make
|
bin_PROGRAMS = make
|
||||||
|
include_HEADERS = gnumake.h
|
||||||
|
|
||||||
if USE_CUSTOMS
|
if USE_CUSTOMS
|
||||||
remote = remote-cstms.c
|
remote = remote-cstms.c
|
||||||
@@ -14,47 +43,52 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
||||||
function.c getopt.c getopt1.c implicit.c job.c main.c \
|
function.c getopt.c getopt1.c guile.c implicit.c job.c load.c \
|
||||||
misc.c read.c remake.c $(remote) rule.c signame.c \
|
loadapi.c main.c misc.c $(ossrc) output.c read.c remake.c \
|
||||||
variable.c version.c vpath.c hash.c
|
rule.c signame.c strcache.c variable.c version.c vpath.c \
|
||||||
|
hash.c $(remote)
|
||||||
|
|
||||||
EXTRA_make_SOURCES = remote-stub.c remote-cstms.c
|
EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
|
||||||
|
|
||||||
noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
|
noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
|
||||||
debug.h getopt.h gettext.h hash.h
|
debug.h getopt.h gettext.h hash.h output.h os.h
|
||||||
|
|
||||||
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
|
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
|
||||||
|
$(GUILE_LIBS)
|
||||||
|
# Only process if target is MS-Windows
|
||||||
|
if WINDOWSENV
|
||||||
|
make_LDADD += $(W32LIB)
|
||||||
|
endif
|
||||||
|
|
||||||
man_MANS = make.1
|
man_MANS = make.1
|
||||||
|
|
||||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
||||||
|
|
||||||
AM_CPPFLAGS = $(GLOBINC)
|
AM_CPPFLAGS = $(GLOBINC)
|
||||||
|
AM_CFLAGS = $(GUILE_CFLAGS)
|
||||||
|
# Only process if target is MS-Windows
|
||||||
|
if WINDOWSENV
|
||||||
|
AM_CPPFLAGS += $(W32INC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Extra stuff to include in the distribution.
|
# Extra stuff to include in the distribution.
|
||||||
# Note we need all the glob stuff here, rather than in glob/Makefile.am,
|
|
||||||
# because often that directory isn't built on the systems used by the
|
|
||||||
# maintainers.
|
|
||||||
|
|
||||||
EXTRA_DIST = README build.sh.in $(man_MANS)\
|
EXTRA_DIST = README build.sh.in $(man_MANS) \
|
||||||
README.customs\
|
README.customs README.OS2 \
|
||||||
SCOPTIONS SMakefile\
|
SCOPTIONS SMakefile \
|
||||||
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\
|
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
|
||||||
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
||||||
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat\
|
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
|
||||||
readme.vms makefile.vms makefile.com config.h-vms \
|
make_msvc_net2003.sln make_msvc_net2003.vcproj \
|
||||||
vmsdir.h vmsfunctions.c vmsify.c
|
README.VMS makefile.vms makefile.com config.h-vms \
|
||||||
|
vmsdir.h vmsfunctions.c vmsify.c vms_exit.c vms_progname.c \
|
||||||
|
vms_export_symbol.c vms_export_symbol_test.com \
|
||||||
|
gmk-default.scm gmk-default.h
|
||||||
|
|
||||||
MAKE_HOST = @MAKE_HOST@
|
# This is built during configure, but behind configure's back
|
||||||
|
|
||||||
|
DISTCLEANFILES = build.sh
|
||||||
# Forward targets
|
|
||||||
|
|
||||||
html:
|
|
||||||
cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
|
|
||||||
|
|
||||||
.PHONY: html
|
|
||||||
|
|
||||||
# --------------- Internationalization Section
|
# --------------- Internationalization Section
|
||||||
|
|
||||||
@@ -66,8 +100,8 @@ localedir = $(datadir)/locale
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
#
|
#
|
||||||
inst_setgid = @NEED_SETGID@
|
inst_setgid = @NEED_SETGID@
|
||||||
@@ -83,19 +117,28 @@ install-exec-local:
|
|||||||
echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
|
echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
|
||||||
else \
|
else \
|
||||||
echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
|
echo "$$app needs to be owned by group $(inst_group) and setgid;"; \
|
||||||
echo "otherwise the \`-l' option will probably not work."; \
|
echo "otherwise the '-l' option will probably not work."; \
|
||||||
echo "You may need special privileges to complete the installation"; \
|
echo "You may need special privileges to complete the installation"; \
|
||||||
echo "of $$app."; \
|
echo "of $$app."; \
|
||||||
fi; \
|
fi; \
|
||||||
else true; fi
|
else true; fi
|
||||||
|
|
||||||
|
# --------------- Generate the Guile default module content
|
||||||
|
|
||||||
|
guile.$(OBJEXT): gmk-default.h
|
||||||
|
gmk-default.h: $(srcdir)/gmk-default.scm
|
||||||
|
(echo 'static const char *const GUILE_module_defn = " '\\ \
|
||||||
|
&& sed -e 's/;.*//' -e '/^[ \t]*$$/d' -e 's/"/\\"/g' -e 's/$$/ \\/' \
|
||||||
|
$(srcdir)/gmk-default.scm \
|
||||||
|
&& echo '";') > $@
|
||||||
|
|
||||||
# --------------- Local DIST Section
|
# --------------- Local DIST Section
|
||||||
|
|
||||||
# Install the w32 and tests subdirectories
|
# Install the w32 and tests subdirectories
|
||||||
#
|
#
|
||||||
dist-hook:
|
dist-hook:
|
||||||
(cd $(srcdir); \
|
(cd $(srcdir); \
|
||||||
sub=`find w32 tests -follow \( -name CVS -prune -o -name .cvsignore -o -name work -prune \) -o \( -name \*.orig -o -name \*.rej -o -name \*~ -prune \) -o -type f -print`; \
|
sub=`find w32 tests -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name Makefile \) -prune -o -type f -print`; \
|
||||||
tar chf - $$sub) \
|
tar chf - $$sub) \
|
||||||
| (cd $(distdir); tar xfBp -)
|
| (cd $(distdir); tar xfBp -)
|
||||||
|
|
||||||
@@ -113,21 +156,18 @@ check-local: check-regression check-loadavg
|
|||||||
|
|
||||||
.PHONY: check-loadavg check-regression
|
.PHONY: check-loadavg check-regression
|
||||||
|
|
||||||
check-loadavg: loadavg
|
check-loadavg: loadavg$(EXEEXT)
|
||||||
@echo The system uptime program believes the load average to be:
|
@echo The system uptime program believes the load average to be:
|
||||||
-uptime
|
-uptime
|
||||||
@echo The GNU load average checking code thinks:
|
@echo The GNU load average checking code thinks:
|
||||||
-./loadavg
|
-./loadavg$(EXEEXT)
|
||||||
|
|
||||||
# The loadavg function is invoked during "make check" to test getloadavg.
|
# The loadavg function is invoked during "make check" to test getloadavg.
|
||||||
noinst_PROGRAMS = loadavg
|
check_PROGRAMS = loadavg
|
||||||
loadavg_SOURCES = loadavg.c
|
nodist_loadavg_SOURCES = getloadavg.c
|
||||||
loadavg_CFLAGS = -DTEST
|
loadavg_CPPFLAGS = -DTEST
|
||||||
loadavg_LDADD = @GETLOADAVG_LIBS@
|
loadavg_LDADD = @GETLOADAVG_LIBS@
|
||||||
|
|
||||||
loadavg.c: $(srcdir)/getloadavg.c
|
|
||||||
cp $(srcdir)/getloadavg.c loadavg.c
|
|
||||||
|
|
||||||
# > check-regression
|
# > check-regression
|
||||||
#
|
#
|
||||||
# Look for the make test suite, and run it if found and we can find perl.
|
# Look for the make test suite, and run it if found and we can find perl.
|
||||||
@@ -136,19 +176,20 @@ loadavg.c: $(srcdir)/getloadavg.c
|
|||||||
#
|
#
|
||||||
MAKETESTFLAGS =
|
MAKETESTFLAGS =
|
||||||
|
|
||||||
check-regression:
|
check-regression: tests/config-flags.pm
|
||||||
@if test -f "$(srcdir)/tests/run_make_tests"; then \
|
@if test -f '$(srcdir)/tests/run_make_tests'; then \
|
||||||
|
ulimit -n 128; \
|
||||||
if $(PERL) -v >/dev/null 2>&1; then \
|
if $(PERL) -v >/dev/null 2>&1; then \
|
||||||
case `cd $(srcdir); pwd` in `pwd`) : ;; \
|
case `cd '$(srcdir)'; pwd` in `pwd`) : ;; \
|
||||||
*) test -d tests || mkdir tests; \
|
*) test -d tests || mkdir tests; \
|
||||||
rm -f srctests; \
|
rm -f srctests; \
|
||||||
if ln -s "$(srcdir)/tests" srctests; then \
|
if ln -s '$(srcdir)/tests' srctests; then \
|
||||||
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
|
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
|
||||||
rm -f tests/$$f; ln -s ../srctests/$$f tests; \
|
rm -f tests/$$f; ln -s ../srctests/$$f tests; \
|
||||||
done; fi ;; \
|
done; fi ;; \
|
||||||
esac; \
|
esac; \
|
||||||
echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make $(MAKETESTFLAGS)"; \
|
echo "cd tests && $(PERL) ./run_make_tests.pl -srcdir $(abs_srcdir) -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
|
||||||
cd tests && $(PERL) ./run_make_tests.pl -make ../make $(MAKETESTFLAGS); \
|
cd tests && $(PERL) ./run_make_tests.pl -srcdir '$(abs_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \
|
||||||
else \
|
else \
|
||||||
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -159,4 +200,10 @@ check-regression:
|
|||||||
|
|
||||||
# --------------- Maintainer's Section
|
# --------------- Maintainer's Section
|
||||||
|
|
||||||
|
# Tell automake that I haven't forgotten about this file and it will be
|
||||||
|
# created before we build a distribution (see maintMakefile in the Git
|
||||||
|
# distribution).
|
||||||
|
|
||||||
|
README:
|
||||||
|
|
||||||
@MAINT_MAKEFILE@
|
@MAINT_MAKEFILE@
|
||||||
|
|||||||
119
Makefile.ami
119
Makefile.ami
@@ -1,23 +1,23 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
# -*-Makefile-*- for GNU make on Amiga
|
||||||
# `build.sh' instead.
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
# NOTE: If you have no 'make' program at all to process this makefile, run
|
||||||
|
# 'build.sh' instead.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
# Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile for GNU Make
|
# Makefile for GNU Make
|
||||||
@@ -31,18 +31,18 @@ CPPFLAGS =
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Define these for your system as follows:
|
# Define these for your system as follows:
|
||||||
# -DNO_ARCHIVES To disable `ar' archive support.
|
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||||
# Some compilers apparently accept this
|
# Some compilers apparently accept this
|
||||||
# without complaint but produce losing code,
|
# without complaint but produce losing code,
|
||||||
# so beware.
|
# so beware.
|
||||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||||
# See also `config.h'.
|
# See also 'config.h'.
|
||||||
defines =
|
defines =
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
# Which flavor of remote job execution support to use.
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
# The code is found in 'remote-$(REMOTE).c'.
|
||||||
REMOTE = stub
|
REMOTE = stub
|
||||||
|
|
||||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||||
@@ -76,9 +76,9 @@ prefix =
|
|||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix =
|
exec_prefix =
|
||||||
|
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = sc:c
|
bindir = sc:c
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir = lib:
|
libdir = lib:
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir = include:
|
includedir = include:
|
||||||
@@ -88,20 +88,20 @@ infodir = doc:
|
|||||||
mandir = t:
|
mandir = t:
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
# Prefix to put on installed `make' binary file name.
|
# Prefix to put on installed 'make' binary file name.
|
||||||
binprefix =
|
binprefix =
|
||||||
# Prefix to put on installed `make' man page file name.
|
# Prefix to put on installed 'make' man page file name.
|
||||||
manprefix = $(binprefix)
|
manprefix = $(binprefix)
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
install_setgid = false
|
install_setgid = false
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
# Install make setgid to this group so it can read /dev/kmem.
|
||||||
group = sys
|
group = sys
|
||||||
|
|
||||||
# Program to install `make'.
|
# Program to install 'make'.
|
||||||
INSTALL_PROGRAM = copy
|
INSTALL_PROGRAM = copy
|
||||||
# Program to install the man page.
|
# Program to install the man page.
|
||||||
INSTALL_DATA = copy
|
INSTALL_DATA = copy
|
||||||
@@ -117,21 +117,24 @@ TEXI2DVI = texi2dvi
|
|||||||
ETAGS = etags -w
|
ETAGS = etags -w
|
||||||
CTAGS = ctags -w
|
CTAGS = ctags -w
|
||||||
|
|
||||||
|
#guile = guile.o
|
||||||
|
|
||||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||||
$(GETOPT) $(ALLOCA) $(extras)
|
remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras) $(guile)
|
||||||
|
|
||||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||||
$(srcdir)vpath.c $(srcdir)version.c \
|
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||||
$(srcdir)remote-$(REMOTE).c \
|
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||||
$(srcdir)ar.c $(srcdir)arscan.c \
|
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
||||||
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
|
||||||
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
||||||
|
|
||||||
|
|
||||||
@@ -141,7 +144,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
|||||||
all: make
|
all: make
|
||||||
info: make.info
|
info: make.info
|
||||||
dvi: make.dvi
|
dvi: make.dvi
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||||
.PHONY: all check info dvi
|
.PHONY: all check info dvi
|
||||||
|
|
||||||
make.info: make.texinfo
|
make.info: make.texinfo
|
||||||
@@ -178,8 +181,6 @@ glob/libglob.a: FORCE config.h
|
|||||||
cd glob; $(MAKE) libglob.a
|
cd glob; $(MAKE) libglob.a
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
tagsrcs = $(srcs) $(srcdir)remote-*.c
|
|
||||||
|
|
||||||
.PHONY: install installdirs
|
.PHONY: install installdirs
|
||||||
install: installdirs \
|
install: installdirs \
|
||||||
$(bindir)$(binprefix)make $(infodir)make.info \
|
$(bindir)$(binprefix)make $(infodir)make.info \
|
||||||
@@ -195,7 +196,7 @@ $(bindir)$(binprefix)make: make
|
|||||||
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
||||||
else \
|
else \
|
||||||
echo "$@ needs to be owned by group $(group) and setgid;"; \
|
echo "$@ needs to be owned by group $(group) and setgid;"; \
|
||||||
echo "otherwise the \`-l' option will probably not work."; \
|
echo "otherwise the '-l' option will probably not work."; \
|
||||||
echo "You may need special privileges to install $@."; \
|
echo "You may need special privileges to install $@."; \
|
||||||
fi; \
|
fi; \
|
||||||
else true; fi
|
else true; fi
|
||||||
@@ -212,9 +213,9 @@ $(infodir)make.info: make.info
|
|||||||
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
||||||
done
|
done
|
||||||
# Run install-info only if it exists.
|
# Run install-info only if it exists.
|
||||||
# Use `if' instead of just prepending `-' to the
|
# Use 'if' instead of just prepending '-' to the
|
||||||
# line so we notice real errors from install-info.
|
# line so we notice real errors from install-info.
|
||||||
# We use `$(SHELL) -c' because some shells do not
|
# We use '$(SHELL) -c' because some shells do not
|
||||||
# fail gracefully when there is an unknown command.
|
# fail gracefully when there is an unknown command.
|
||||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
||||||
@@ -265,41 +266,43 @@ glob-clean glob-realclean:
|
|||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
||||||
# The automatically generated dependencies below may omit config.h
|
# The automatically generated dependencies below may omit config.h
|
||||||
# because it is included with ``#include <config.h>'' rather than
|
# because it is included with '#include <config.h>' rather than
|
||||||
# ``#include "config.h"''. So we add the explicit dependency to make sure.
|
# '#include "config.h"'. So we add the explicit dependency to make sure.
|
||||||
$(objs): config.h
|
$(objs): config.h
|
||||||
|
|
||||||
# Automatically generated dependencies will be put at the end of the file.
|
# Automatically generated dependencies will be put at the end of the file.
|
||||||
|
|
||||||
# Automatically generated dependencies.
|
# Automatically generated dependencies.
|
||||||
commands.o: commands.c make.h dep.h filedef.h variable.h job.h \
|
commands.o: commands.c makeint.h dep.h filedef.h variable.h job.h \
|
||||||
commands.h
|
commands.h
|
||||||
job.o: job.c make.h job.h filedef.h commands.h variable.h
|
job.o: job.c makeint.h job.h filedef.h commands.h variable.h
|
||||||
dir.o: dir.c make.h
|
dir.o: dir.c makeint.h
|
||||||
file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h
|
file.o: file.c makeint.h dep.h filedef.h job.h commands.h variable.h
|
||||||
misc.o: misc.c make.h dep.h
|
misc.o: misc.c makeint.h dep.h
|
||||||
main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \
|
main.o: main.c makeint.h dep.h filedef.h variable.h job.h commands.h \
|
||||||
getopt.h
|
getopt.h
|
||||||
read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \
|
guile.o: guile.c makeint.h dep.h debug.h variable.h gmk-default.h
|
||||||
|
read.o: read.c makeint.h dep.h filedef.h job.h commands.h variable.h \
|
||||||
glob/glob.h
|
glob/glob.h
|
||||||
remake.o: remake.c make.h filedef.h job.h commands.h dep.h
|
remake.o: remake.c makeint.h filedef.h job.h commands.h dep.h
|
||||||
rule.o: rule.c make.h dep.h filedef.h job.h commands.h variable.h \
|
rule.o: rule.c makeint.h dep.h filedef.h job.h commands.h variable.h \
|
||||||
rule.h
|
rule.h
|
||||||
implicit.o: implicit.c make.h rule.h dep.h filedef.h
|
implicit.o: implicit.c makeint.h rule.h dep.h filedef.h
|
||||||
default.o: default.c make.h rule.h dep.h filedef.h job.h commands.h \
|
default.o: default.c makeint.h rule.h dep.h filedef.h job.h commands.h \
|
||||||
variable.h
|
variable.h
|
||||||
variable.o: variable.c make.h dep.h filedef.h job.h commands.h \
|
variable.o: variable.c makeint.h dep.h filedef.h job.h commands.h \
|
||||||
variable.h
|
variable.h
|
||||||
expand.o: expand.c make.h filedef.h job.h commands.h variable.h
|
expand.o: expand.c makeint.h filedef.h job.h commands.h variable.h
|
||||||
function.o: function.c make.h filedef.h variable.h dep.h job.h \
|
function.o: function.c makeint.h filedef.h variable.h dep.h job.h \
|
||||||
commands.h amiga.h
|
commands.h amiga.h
|
||||||
vpath.o: vpath.c make.h filedef.h variable.h
|
vpath.o: vpath.c makeint.h filedef.h variable.h
|
||||||
|
strcache.o: strcache.c makeint.h hash.h
|
||||||
version.o: version.c
|
version.o: version.c
|
||||||
ar.o: ar.c make.h filedef.h dep.h
|
ar.o: ar.c makeint.h filedef.h dep.h
|
||||||
arscan.o: arscan.c make.h
|
arscan.o: arscan.c makeint.h
|
||||||
signame.o: signame.c signame.h
|
signame.o: signame.c signame.h
|
||||||
remote-stub.o: remote-stub.c make.h filedef.h job.h commands.h
|
remote-stub.o: remote-stub.c makeint.h filedef.h job.h commands.h
|
||||||
getopt.o: getopt.c
|
getopt.o: getopt.c
|
||||||
getopt1.o : getopt1.c getopt.h
|
getopt1.o : getopt1.c getopt.h
|
||||||
getloadavg.o: getloadavg.c
|
getloadavg.o: getloadavg.c
|
||||||
amiga.o: amiga.c make.h variable.h amiga.h
|
amiga.o: amiga.c makeint.h variable.h amiga.h
|
||||||
|
|||||||
@@ -1,44 +1,40 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
# -*-Makefile-*- to build GNU make with nmake
|
||||||
# `build_w32.bat' instead.
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.
|
# NOTE: If you have no 'make' program at all to process this makefile,
|
||||||
|
# run 'build_w32.bat' instead.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
|
||||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
# Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
#
|
|
||||||
# NMakefile for GNU Make
|
|
||||||
#
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
LINK = link
|
LINK = link
|
||||||
CC = cl
|
CC = cl
|
||||||
|
MAKE = nmake
|
||||||
|
|
||||||
OUTDIR=.
|
OUTDIR=.
|
||||||
MAKEFILE=NMakefile
|
MAKEFILE=NMakefile
|
||||||
SUBPROC_MAKEFILE=NMakefile
|
SUBPROC_MAKEFILE=NMakefile
|
||||||
|
|
||||||
CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H
|
CFLAGS_any = /nologo /MT /W4 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H
|
||||||
CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
|
CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
|
||||||
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||||
|
|
||||||
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
|
/STACK:0x400000 /INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
|
||||||
/OUT:WinDebug/make.exe /DEBUG
|
|
||||||
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /MACHINE:I386 /OUT:WinRel/make.exe
|
/STACK:0x400000 /INCREMENTAL:no /OUT:WinRel/make.exe
|
||||||
|
|
||||||
all: config.h subproc Release Debug
|
all: config.h subproc Release Debug
|
||||||
|
|
||||||
@@ -76,6 +72,8 @@ $(OUTDIR):
|
|||||||
|
|
||||||
LIBS = kernel32.lib user32.lib advapi32.lib
|
LIBS = kernel32.lib user32.lib advapi32.lib
|
||||||
|
|
||||||
|
guile = $(OUTDIR)/guile.obj
|
||||||
|
|
||||||
OBJS = \
|
OBJS = \
|
||||||
$(OUTDIR)/ar.obj \
|
$(OUTDIR)/ar.obj \
|
||||||
$(OUTDIR)/arscan.obj \
|
$(OUTDIR)/arscan.obj \
|
||||||
@@ -88,22 +86,29 @@ OBJS = \
|
|||||||
$(OUTDIR)/getloadavg.obj \
|
$(OUTDIR)/getloadavg.obj \
|
||||||
$(OUTDIR)/getopt.obj \
|
$(OUTDIR)/getopt.obj \
|
||||||
$(OUTDIR)/getopt1.obj \
|
$(OUTDIR)/getopt1.obj \
|
||||||
|
$(OUTDIR)/hash.obj \
|
||||||
$(OUTDIR)/implicit.obj \
|
$(OUTDIR)/implicit.obj \
|
||||||
$(OUTDIR)/job.obj \
|
$(OUTDIR)/job.obj \
|
||||||
|
$(OUTDIR)/load.obj \
|
||||||
$(OUTDIR)/main.obj \
|
$(OUTDIR)/main.obj \
|
||||||
$(OUTDIR)/misc.obj \
|
$(OUTDIR)/misc.obj \
|
||||||
|
$(OUTDIR)/output.obj \
|
||||||
$(OUTDIR)/read.obj \
|
$(OUTDIR)/read.obj \
|
||||||
$(OUTDIR)/remake.obj \
|
$(OUTDIR)/remake.obj \
|
||||||
$(OUTDIR)/remote-stub.obj \
|
$(OUTDIR)/remote-stub.obj \
|
||||||
$(OUTDIR)/rule.obj \
|
$(OUTDIR)/rule.obj \
|
||||||
$(OUTDIR)/signame.obj \
|
$(OUTDIR)/signame.obj \
|
||||||
|
$(OUTDIR)/strcache.obj \
|
||||||
$(OUTDIR)/variable.obj \
|
$(OUTDIR)/variable.obj \
|
||||||
$(OUTDIR)/version.obj \
|
$(OUTDIR)/version.obj \
|
||||||
$(OUTDIR)/vpath.obj \
|
$(OUTDIR)/vpath.obj \
|
||||||
$(OUTDIR)/glob.obj \
|
$(OUTDIR)/glob.obj \
|
||||||
$(OUTDIR)/fnmatch.obj \
|
$(OUTDIR)/fnmatch.obj \
|
||||||
$(OUTDIR)/dirent.obj \
|
$(OUTDIR)/dirent.obj \
|
||||||
$(OUTDIR)/pathstuff.obj
|
$(OUTDIR)/pathstuff.obj \
|
||||||
|
$(OUTDIR)/posixfcn.obj \
|
||||||
|
$(OUTDIR)/w32os.obj \
|
||||||
|
$(guile)
|
||||||
|
|
||||||
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
||||||
$(LINK) @<<
|
$(LINK) @<<
|
||||||
@@ -119,5 +124,9 @@ $(OUTDIR)/fnmatch.obj : glob/fnmatch.c
|
|||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
|
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
|
||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
|
$(OUTDIR)/posixfcn.obj : w32/compat/posixfcn.c
|
||||||
|
$(CC) $(CFLAGS) /c $?
|
||||||
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
|
$(OUTDIR)/w32os.obj : w32/w32os.c
|
||||||
|
$(CC) $(CFLAGS) /c $?
|
||||||
|
|||||||
28
README.Amiga
28
README.Amiga
@@ -25,8 +25,8 @@ GNU make):
|
|||||||
endif @@\
|
endif @@\
|
||||||
$(CC) Link Make.o To make
|
$(CC) Link Make.o To make
|
||||||
|
|
||||||
works. Note that the @@ must stand alone (ie. "make@@\" is illegal).
|
works. Note that the @@ must stand alone (i.e., "make@@\" is illegal).
|
||||||
Also be carefull that there is a space after the "\" (ie, at the
|
Also be careful that there is a space after the "\" (i.e., at the
|
||||||
beginning of the next line).
|
beginning of the next line).
|
||||||
- Can be made resident to save space and time
|
- Can be made resident to save space and time
|
||||||
- Amiga specific wildcards can be used in $(wildcard ...)
|
- Amiga specific wildcards can be used in $(wildcard ...)
|
||||||
@@ -36,17 +36,17 @@ BUGS:
|
|||||||
|
|
||||||
dummy.h : src/*.c
|
dummy.h : src/*.c
|
||||||
|
|
||||||
tries to make dummy.h from "src/*.c" (ie. no wildcard-expansion takes
|
tries to make dummy.h from "src/*.c" (i.e., no wildcard-expansion takes
|
||||||
place). You have to use "$(wildcard src/*.c)" instead.
|
place). You have to use "$(wildcard src/*.c)" instead.
|
||||||
|
|
||||||
COMPILING FROM SCRATCH
|
COMPILING FROM SCRATCH
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
To recompile, you need SAS/C 6.51. make itself is not neccessary, there
|
To recompile, you need SAS/C 6.51. make itself is not necessary, there
|
||||||
is an smakefile.
|
is an smakefile.
|
||||||
|
|
||||||
1. Copy config.ami to config.h
|
1. Copy config.ami to config.h
|
||||||
2. If you use make to compie, copy Makefile.ami to Makefile and
|
2. If you use make to compile, copy Makefile.ami to Makefile and
|
||||||
glob/Makefile.ami to glob/Makefile. Copy make into the current
|
glob/Makefile.ami to glob/Makefile. Copy make into the current
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
@@ -54,8 +54,24 @@ is an smakefile.
|
|||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
|
|
||||||
Copy make somewhere in your search path (eg. sc:c or sc:bin).
|
Copy make somewhere in your search path (e.g., sc:c or sc:bin).
|
||||||
If you plan to use recursive makes, install make resident:
|
If you plan to use recursive makes, install make resident:
|
||||||
|
|
||||||
Resident make Add
|
Resident make Add
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ New (since 3.74) DOS-specific features:
|
|||||||
1. Supports long filenames when run from DOS box on Windows 9x.
|
1. Supports long filenames when run from DOS box on Windows 9x.
|
||||||
|
|
||||||
2. Supports both stock DOS COMMAND.COM and Unix-style shells
|
2. Supports both stock DOS COMMAND.COM and Unix-style shells
|
||||||
(details in ``Notes'' below).
|
(details in 'Notes' below).
|
||||||
|
|
||||||
3. Supports DOS drive letters in dependencies and pattern rules.
|
3. Supports DOS drive letters in dependencies and pattern rules.
|
||||||
|
|
||||||
4. Better support for DOS-style backslashes in pathnames (but see
|
4. Better support for DOS-style backslashes in pathnames (but see
|
||||||
``Notes'' below).
|
'Notes' below).
|
||||||
|
|
||||||
5. The $(shell) built-in can run arbitrary complex commands,
|
5. The $(shell) built-in can run arbitrary complex commands,
|
||||||
including pipes and redirection, even when COMMAND.COM is your
|
including pipes and redirection, even when COMMAND.COM is your
|
||||||
@@ -55,7 +55,7 @@ To build from sources:
|
|||||||
either DJTAR (which is part of the DJGPP development
|
either DJTAR (which is part of the DJGPP development
|
||||||
environment), or the DJGPP port of GNU Tar.
|
environment), or the DJGPP port of GNU Tar.
|
||||||
|
|
||||||
2. Invoke the `configure.bat' batch file.
|
2. Invoke the 'configure.bat' batch file.
|
||||||
|
|
||||||
If you are building Make in-place, i.e. in the same directory
|
If you are building Make in-place, i.e. in the same directory
|
||||||
where its sources are kept, just type "configure.bat" and press
|
where its sources are kept, just type "configure.bat" and press
|
||||||
@@ -68,7 +68,7 @@ To build from sources:
|
|||||||
use them here.
|
use them here.
|
||||||
|
|
||||||
3. If configure.bat doesn't find a working Make, it will suggest to
|
3. If configure.bat doesn't find a working Make, it will suggest to
|
||||||
use the `dosbuild.bat' batch file to build Make. Either do as it
|
use the 'dosbuild.bat' batch file to build Make. Either do as it
|
||||||
suggests or install another Make program (a pre-compiled binary
|
suggests or install another Make program (a pre-compiled binary
|
||||||
should be available from the usual DJGPP sites) and rerun
|
should be available from the usual DJGPP sites) and rerun
|
||||||
configure.bat.
|
configure.bat.
|
||||||
@@ -91,7 +91,7 @@ To build from sources:
|
|||||||
else Make might fail.
|
else Make might fail.
|
||||||
|
|
||||||
6. After Make finishes, if you have a Unix-style shell installed,
|
6. After Make finishes, if you have a Unix-style shell installed,
|
||||||
you can use the `install' target to install the package. You
|
you can use the 'install' target to install the package. You
|
||||||
will also need GNU Fileutils and GNU Sed for this (they should
|
will also need GNU Fileutils and GNU Sed for this (they should
|
||||||
be available from the DJGPP sites).
|
be available from the DJGPP sites).
|
||||||
|
|
||||||
@@ -107,12 +107,12 @@ To build from sources:
|
|||||||
Without a Unix-style shell, you will have to install programs
|
Without a Unix-style shell, you will have to install programs
|
||||||
and the docs manually. Copy make.exe to a directory on your
|
and the docs manually. Copy make.exe to a directory on your
|
||||||
PATH, make.i* info files to your Info directory, and update the
|
PATH, make.i* info files to your Info directory, and update the
|
||||||
file `dir' in your Info directory by adding the following item
|
file 'dir' in your Info directory by adding the following item
|
||||||
to the main menu:
|
to the main menu:
|
||||||
|
|
||||||
* Make: (make.info). The GNU make utility.
|
* Make: (make.info). The GNU make utility.
|
||||||
|
|
||||||
If you have the `install-info' program (from the GNU Texinfo
|
If you have the 'install-info' program (from the GNU Texinfo
|
||||||
package), it will do that for you if you invoke it like this:
|
package), it will do that for you if you invoke it like this:
|
||||||
|
|
||||||
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
|
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
|
||||||
@@ -120,8 +120,8 @@ To build from sources:
|
|||||||
(If your Info directory is other than C:\DJGPP\INFO, change this
|
(If your Info directory is other than C:\DJGPP\INFO, change this
|
||||||
command accordingly.)
|
command accordingly.)
|
||||||
|
|
||||||
7. The `clean' targets also require Unix-style shell, and GNU Sed
|
7. The 'clean' targets also require Unix-style shell, and GNU Sed
|
||||||
and `rm' programs (the latter from Fileutils).
|
and 'rm' programs (the latter from Fileutils).
|
||||||
|
|
||||||
8. To run the test suite, type "make check". This requires a Unix
|
8. To run the test suite, type "make check". This requires a Unix
|
||||||
shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
|
shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
|
||||||
@@ -144,7 +144,7 @@ Notes:
|
|||||||
|
|
||||||
This port supports both DOS shells (the stock COMMAND.COM and its
|
This port supports both DOS shells (the stock COMMAND.COM and its
|
||||||
4DOS/NDOS replacements), and Unix-style shells (tested with the
|
4DOS/NDOS replacements), and Unix-style shells (tested with the
|
||||||
venerable Stewartson's `ms_sh' 2.3 and the DJGPP port of `bash' by
|
venerable Stewartson's 'ms_sh' 2.3 and the DJGPP port of 'bash' by
|
||||||
Daisuke Aoyama <jack@st.rim.or.jp>).
|
Daisuke Aoyama <jack@st.rim.or.jp>).
|
||||||
|
|
||||||
When the $SHELL variable points to a Unix-style shell, Make
|
When the $SHELL variable points to a Unix-style shell, Make
|
||||||
@@ -166,17 +166,17 @@ Notes:
|
|||||||
redirection and pipes, and shall only call the shell when a
|
redirection and pipes, and shall only call the shell when a
|
||||||
batch file or a command internal to the shell is invoked. (Even
|
batch file or a command internal to the shell is invoked. (Even
|
||||||
when a command is an internal shell command, Make will first
|
when a command is an internal shell command, Make will first
|
||||||
search the $PATH for it, so that if a Makefile calls `mkdir',
|
search the $PATH for it, so that if a Makefile calls 'mkdir',
|
||||||
you can install, say, a port of GNU `mkdir' and have it called
|
you can install, say, a port of GNU 'mkdir' and have it called
|
||||||
in that case.)
|
in that case.)
|
||||||
|
|
||||||
The key to all this is the extended functionality of `spawn' and
|
The key to all this is the extended functionality of 'spawn' and
|
||||||
`system' functions from the DJGPP library; this port just calls
|
'system' functions from the DJGPP library; this port just calls
|
||||||
`system' where it would invoke the shell on Unix. The most
|
'system' where it would invoke the shell on Unix. The most
|
||||||
important aspect of these functions is that they use a special
|
important aspect of these functions is that they use a special
|
||||||
mechanism to pass long (up to 16KB) command lines to DJGPP
|
mechanism to pass long (up to 16KB) command lines to DJGPP
|
||||||
programs. In addition, `system' emulates some internal
|
programs. In addition, 'system' emulates some internal
|
||||||
commands, like `cd' (so that you can now use forward slashes
|
commands, like 'cd' (so that you can now use forward slashes
|
||||||
with it, and can also change the drive if the directory is on
|
with it, and can also change the drive if the directory is on
|
||||||
another drive). Another aspect worth mentioning is that you can
|
another drive). Another aspect worth mentioning is that you can
|
||||||
call Unix shell scripts directly, provided that the shell whose
|
call Unix shell scripts directly, provided that the shell whose
|
||||||
@@ -186,7 +186,7 @@ Notes:
|
|||||||
reference for more details.
|
reference for more details.
|
||||||
|
|
||||||
The $(shell) built-in is implemented in this port by calling
|
The $(shell) built-in is implemented in this port by calling
|
||||||
`popen'. Since `popen' calls `system', the above considerations
|
'popen'. Since 'popen' calls 'system', the above considerations
|
||||||
are valid for $(shell) as well. In particular, you can put
|
are valid for $(shell) as well. In particular, you can put
|
||||||
arbitrary complex commands, including pipes and redirection,
|
arbitrary complex commands, including pipes and redirection,
|
||||||
inside $(shell), which is in many cases a valid substitute for
|
inside $(shell), which is in many cases a valid substitute for
|
||||||
@@ -197,12 +197,12 @@ Notes:
|
|||||||
|
|
||||||
Many Unix Makefiles include a line which sets the SHELL, for
|
Many Unix Makefiles include a line which sets the SHELL, for
|
||||||
those versions of Make which don't have this as the default.
|
those versions of Make which don't have this as the default.
|
||||||
Since many DOS systems don't have `sh' installed (in fact, most
|
Since many DOS systems don't have 'sh' installed (in fact, most
|
||||||
of them don't even have a `/bin' directory), this port takes
|
of them don't even have a '/bin' directory), this port takes
|
||||||
such directives with a grain of salt. It will only honor such a
|
such directives with a grain of salt. It will only honor such a
|
||||||
directive if the basename of the shell name (like `sh' in the
|
directive if the basename of the shell name (like 'sh' in the
|
||||||
above example) can indeed be found in the directory that is
|
above example) can indeed be found in the directory that is
|
||||||
mentioned in the SHELL= line (`/bin' in the above example), or
|
mentioned in the SHELL= line ('/bin' in the above example), or
|
||||||
in the current working directory, or anywhere on the $PATH (in
|
in the current working directory, or anywhere on the $PATH (in
|
||||||
that order). If the basename doesn't include a filename
|
that order). If the basename doesn't include a filename
|
||||||
extension, Make will look for any known extension that indicates
|
extension, Make will look for any known extension that indicates
|
||||||
@@ -237,8 +237,8 @@ Notes:
|
|||||||
require such a shell). More important, you can convert Unix
|
require such a shell). More important, you can convert Unix
|
||||||
Makefiles to MSDOS and leave the line which sets the shell
|
Makefiles to MSDOS and leave the line which sets the shell
|
||||||
intact, so that people who do have Unixy shell could use it for
|
intact, so that people who do have Unixy shell could use it for
|
||||||
targets which aren't converted to DOS (like `install' and
|
targets which aren't converted to DOS (like 'install' and
|
||||||
`uninstall', for example).
|
'uninstall', for example).
|
||||||
|
|
||||||
|
|
||||||
3. Default directories.
|
3. Default directories.
|
||||||
@@ -258,14 +258,14 @@ Notes:
|
|||||||
If you run Make on Windows 9x, you should be aware of the
|
If you run Make on Windows 9x, you should be aware of the
|
||||||
letter-case issue. Make is internally case-sensitive, but all
|
letter-case issue. Make is internally case-sensitive, but all
|
||||||
file operations are case-insensitive on Windows 9x, so
|
file operations are case-insensitive on Windows 9x, so
|
||||||
e.g. files `FAQ', `faq' and `Faq' all refer to the same file, as
|
e.g. files 'FAQ', 'faq' and 'Faq' all refer to the same file, as
|
||||||
far as Windows is concerned. The underlying DJGPP C library
|
far as Windows is concerned. The underlying DJGPP C library
|
||||||
functions honor the letter-case of the filenames they get from
|
functions honor the letter-case of the filenames they get from
|
||||||
the OS, except that by default, they down-case 8+3 DOS filenames
|
the OS, except that by default, they down-case 8+3 DOS filenames
|
||||||
which are stored in upper case in the directory and would break
|
which are stored in upper case in the directory and would break
|
||||||
many Makefiles otherwise. (The details of which filenames are
|
many Makefiles otherwise. (The details of which filenames are
|
||||||
converted to lower case are explained in the DJGPP libc docs,
|
converted to lower case are explained in the DJGPP libc docs,
|
||||||
under the `_preserve_fncase' and `_lfn_gen_short_fname'
|
under the '_preserve_fncase' and '_lfn_gen_short_fname'
|
||||||
functions, but as a thumb rule, any filename that is stored in
|
functions, but as a thumb rule, any filename that is stored in
|
||||||
upper case in the directory, is a valid DOS 8+3 filename and
|
upper case in the directory, is a valid DOS 8+3 filename and
|
||||||
doesn't include characters invalid on MSDOS FAT filesystems,
|
doesn't include characters invalid on MSDOS FAT filesystems,
|
||||||
@@ -282,8 +282,8 @@ Notes:
|
|||||||
|
|
||||||
There are a lot of places throughout the program sources which
|
There are a lot of places throughout the program sources which
|
||||||
make implicit assumptions about the pathname syntax. In
|
make implicit assumptions about the pathname syntax. In
|
||||||
particular, the directories are assumed to be separated by `/',
|
particular, the directories are assumed to be separated by '/',
|
||||||
and any pathname which doesn't begin with a `/' is assumed to be
|
and any pathname which doesn't begin with a '/' is assumed to be
|
||||||
relative to the current directory. This port attempts to
|
relative to the current directory. This port attempts to
|
||||||
support DOS-style pathnames which might include the drive letter
|
support DOS-style pathnames which might include the drive letter
|
||||||
and use backslashes instead of forward slashes. However, this
|
and use backslashes instead of forward slashes. However, this
|
||||||
@@ -296,7 +296,7 @@ Notes:
|
|||||||
is the standard programs which come with MSDOS. Otherwise, you
|
is the standard programs which come with MSDOS. Otherwise, you
|
||||||
are advised to stay away from backslashes whenever possible. In
|
are advised to stay away from backslashes whenever possible. In
|
||||||
particular, filename globbing won't work on pathnames with
|
particular, filename globbing won't work on pathnames with
|
||||||
backslashes, because the GNU `glob' library doesn't support them
|
backslashes, because the GNU 'glob' library doesn't support them
|
||||||
(backslash is special in filename wildcards, and I didn't want
|
(backslash is special in filename wildcards, and I didn't want
|
||||||
to break that).
|
to break that).
|
||||||
|
|
||||||
@@ -315,9 +315,26 @@ Bug reports:
|
|||||||
<djgpp@delorie.com>, which is an email gateway into the above news
|
<djgpp@delorie.com>, which is an email gateway into the above news
|
||||||
group). For other bugs, please follow the procedure explained in
|
group). For other bugs, please follow the procedure explained in
|
||||||
the "Bugs" chapter of the Info docs. If you don't have an Info
|
the "Bugs" chapter of the Info docs. If you don't have an Info
|
||||||
reader, look up that chapter in the `make.i1' file with any text
|
reader, look up that chapter in the 'make.i1' file with any text
|
||||||
browser/editor.
|
browser/editor.
|
||||||
|
|
||||||
|
|
||||||
Enjoy,
|
Enjoy,
|
||||||
Eli Zaretskii <eliz@is.elta.co.il>
|
Eli Zaretskii <eliz@is.elta.co.il>
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
176
README.OS2.template
Normal file
176
README.OS2.template
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
Port of GNU make to OS/2.
|
||||||
|
|
||||||
|
Features of GNU make that do not work under OS/2:
|
||||||
|
- remote job execution
|
||||||
|
- dynamic load balancing
|
||||||
|
|
||||||
|
|
||||||
|
Special features of the OS/2 version:
|
||||||
|
|
||||||
|
Due to the fact that some people might want to use sh syntax in
|
||||||
|
Makefiles while others might want to use OS/2's native shell cmd.exe,
|
||||||
|
GNU make supports both shell types. The following list defines the order
|
||||||
|
that is used to determine the shell:
|
||||||
|
|
||||||
|
1. The shell specified by the environment variable MAKESHELL.
|
||||||
|
2. The shell specified by the SHELL variable within a Makefile. Like
|
||||||
|
Unix, SHELL is NOT taken from the environment.
|
||||||
|
3. The shell specified by the COMSPEC environment variable.
|
||||||
|
4. The shell specified by the OS2_SHELL environment variable.
|
||||||
|
5. If none of the above is defined /bin/sh is used as default. This
|
||||||
|
happens e.g. in the make testsuite.
|
||||||
|
|
||||||
|
Note: - Points 3 and 4 can be turned off at compile time by adding
|
||||||
|
-DNO_CMD_DEFAULT to the CPPFLAGS.
|
||||||
|
- DOS support is not tested for EMX and therefore might not work.
|
||||||
|
- The UNIXROOT environment variable is supported to find /bin/sh
|
||||||
|
if it is not on the current drive.
|
||||||
|
|
||||||
|
|
||||||
|
COMPILATION OF GNU MAKE FOR OS/2:
|
||||||
|
|
||||||
|
I. ***** SPECIAL OPTIONS *****
|
||||||
|
|
||||||
|
- At compile time you can turn off that cmd is used as default shell
|
||||||
|
(but only /bin/sh). Simply set CPPFLAGS="-DNO_CMD_DEFAULT" and make
|
||||||
|
will not use cmd unless you cause it to do so by setting MAKESHELL to
|
||||||
|
cmd or by specifying SHELL=cmd in your Makefile.
|
||||||
|
|
||||||
|
- At compile time you can set CPPFLAGS="-DNO_CHDIR2" to turn off that
|
||||||
|
GNU make prints drive letters. This is necessary if you want to run
|
||||||
|
the testsuite.
|
||||||
|
|
||||||
|
|
||||||
|
II. ***** REQUIREMENTS FOR THE COMPILATION *****
|
||||||
|
|
||||||
|
A standard Unix like build environment:
|
||||||
|
|
||||||
|
- sh compatible shell (ksh, bash, ash, but tested only with pdksh 5.2.14
|
||||||
|
release 2)
|
||||||
|
If you use pdksh it is recommended to update to 5.2.14 release 2. Older
|
||||||
|
versions may not work! You can get this version at
|
||||||
|
http://www.math.ohio-state.edu/~ilya/software/os2/pdksh-5.2.14-bin-2.zip
|
||||||
|
- GNU file utilities (make sure that install.exe from the file utilities
|
||||||
|
is in front of your PATH before X:\OS2\INSTALL\INSTALL.EXE. I recommend
|
||||||
|
also to change the filename to ginstall.exe instead of install.exe
|
||||||
|
to avoid confusion with X:\OS2\INSTALL\INSTALL.EXE)
|
||||||
|
- GNU shell utilities
|
||||||
|
- GNU text utilities
|
||||||
|
- gawk
|
||||||
|
- grep
|
||||||
|
- sed
|
||||||
|
- GNU make 3.79.1 (special OS/2 patched version) or higher
|
||||||
|
- perl 5.005 or higher
|
||||||
|
- GNU texinfo (you can use 3.1 (gnuinfo.zip), but I recommend 4.0)
|
||||||
|
|
||||||
|
If you want to recreate the configuration files (developers only!)
|
||||||
|
you need also: GNU m4 1.4, autoconf 2.59, automake 1.9.6 (or compatible)
|
||||||
|
|
||||||
|
|
||||||
|
III. ***** COMPILATION AND INSTALLATION *****
|
||||||
|
|
||||||
|
a) ** Developers only - Everyone else should skip this section **
|
||||||
|
To recreate the configuration files use:
|
||||||
|
|
||||||
|
export EMXSHELL=ksh
|
||||||
|
aclocal -I config
|
||||||
|
automake
|
||||||
|
autoconf
|
||||||
|
autoheader
|
||||||
|
|
||||||
|
|
||||||
|
b) Installation into x:/usr
|
||||||
|
|
||||||
|
Note: Although it is possible to compile make using "./configure",
|
||||||
|
"make", "make install" this is not recommended. In particular,
|
||||||
|
you must ALWAYS use LDFLAGS="-Zstack 0x6000" because the default
|
||||||
|
stack size is far to small and make will not work properly!
|
||||||
|
|
||||||
|
Recommended environment variables and installation options:
|
||||||
|
|
||||||
|
export ac_executable_extensions=".exe"
|
||||||
|
export CPPFLAGS="-D__ST_MT_ERRNO__"
|
||||||
|
export CFLAGS="-O2 -Zomf -Zmt"
|
||||||
|
export LDFLAGS="-Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000"
|
||||||
|
export RANLIB="echo"
|
||||||
|
./configure --prefix=x:/usr --infodir=x:/usr/share/info --mandir=x:/usr/share/man --without-included-gettext
|
||||||
|
make AR=emxomfar
|
||||||
|
make install
|
||||||
|
|
||||||
|
Note: If you use gcc 2.9.x I recommend to set also LIBS="-lgcc"
|
||||||
|
|
||||||
|
Note: You can add -DNO_CMD_DEFAULT and -DNO_CHDIR2 to CPPFLAGS.
|
||||||
|
See section I. for details.
|
||||||
|
|
||||||
|
|
||||||
|
IV. ***** NLS support *****
|
||||||
|
|
||||||
|
GNU make has NLS (National Language Support), with the following
|
||||||
|
caveats:
|
||||||
|
|
||||||
|
a) It will only work with GNU gettext, and
|
||||||
|
b) GNU gettext support is not included in the GNU make package.
|
||||||
|
|
||||||
|
Therefore, if you wish to enable the internationalization features of
|
||||||
|
GNU make you must install GNU gettext on your system before configuring
|
||||||
|
GNU make.
|
||||||
|
|
||||||
|
You can choose the languages to be installed. To install support for
|
||||||
|
English, German and French only enter:
|
||||||
|
|
||||||
|
export LINGUAS="en de fr"
|
||||||
|
|
||||||
|
If you don't specify LINGUAS all languages are installed.
|
||||||
|
|
||||||
|
If you don't want NLS support (English only) use the option
|
||||||
|
--disable-nls for the configure script. Note if GNU gettext is not
|
||||||
|
installed then NLS will not be enabled regardless of this flag.
|
||||||
|
|
||||||
|
|
||||||
|
V. ***** Running the make test suite *****
|
||||||
|
|
||||||
|
To run the included make test suite you have to set
|
||||||
|
|
||||||
|
CPPFLAGS="-D__ST_MT_ERRNO__ -DNO_CMD_DEFAULT -DNO_CHDIR2"
|
||||||
|
|
||||||
|
before you compile make. This is due to some restrictions of the
|
||||||
|
testsuite itself. -DNO_CMD_DEFAULT causes make to use /bin/sh as default
|
||||||
|
shell in every case. Normally you could simply set MAKESHELL="/bin/sh"
|
||||||
|
to do this but the testsuite ignores the environment. -DNO_CHDIR2 causes
|
||||||
|
make not to use drive letters for directory names (i.e. _chdir2() and
|
||||||
|
_getcwd2() are NOT used). The testsuite interpretes the whole output of
|
||||||
|
make, especially statements like make[1]: Entering directory
|
||||||
|
'C:/somewhere/make-3.79.1/tests' where the testsuite does not expect the
|
||||||
|
drive letter. This would be interpreted as an error even if there is
|
||||||
|
none.
|
||||||
|
|
||||||
|
To run the testsuite do the following:
|
||||||
|
|
||||||
|
export CPPFLAGS="-D__ST_MT_ERRNO__ -DNO_CMD_DEFAULT -DNO_CHDIR2"
|
||||||
|
export CFLAGS="-Zomf -O2 -Zmt"
|
||||||
|
export LDFLAGS="-Zcrtdll -s -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x6000"
|
||||||
|
export RANLIB="echo"
|
||||||
|
./configure --prefix=x:/usr --disable-nls
|
||||||
|
make AR=emxomfar
|
||||||
|
make check
|
||||||
|
|
||||||
|
All tests should work fine with the exception of one of the "INCLUDE_DIRS"
|
||||||
|
tests which will fail if your /usr/include directory is on a drive different
|
||||||
|
from the make source tree.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2003-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
515
README.VMS
Normal file
515
README.VMS
Normal file
@@ -0,0 +1,515 @@
|
|||||||
|
Overview: -*-text-mode-*-
|
||||||
|
---------
|
||||||
|
|
||||||
|
This version of GNU make has been tested on:
|
||||||
|
OpenVMS V8.3/V8.4 (Alpha) and V8.4 (Integrity) AND V7.3 (VAX)
|
||||||
|
|
||||||
|
This version of GNU Make is intended to be run from DCL to run
|
||||||
|
make scripts with a special syntax that is described below. It
|
||||||
|
likely will not be able to run unmodified Unix makefiles.
|
||||||
|
|
||||||
|
There is an older implementation of GNU Make that was ported to GNV.
|
||||||
|
Work is now in progress to merge that port to get a single version
|
||||||
|
of GNU Make available. When that merge is done, GNU Make will auto
|
||||||
|
detect that it is running under a Posix shell and then operate as close to
|
||||||
|
GNU Make on Unix as possible.
|
||||||
|
|
||||||
|
The descriptions below are for running GNU make from DCL or equivalent.
|
||||||
|
|
||||||
|
Recipe differences:
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
GNU Make for OpenVMS can not currently run native Unix make files because of
|
||||||
|
differences in the implementation.
|
||||||
|
|
||||||
|
I am trying to document the current behavior in this section. This is based
|
||||||
|
on the information in the file NEWS. and running the test suite.
|
||||||
|
TODO: More tests are needed to validate and demonstrate the OpenVMS
|
||||||
|
expected behavior.
|
||||||
|
|
||||||
|
In some cases the older behavior of GNU Make when run from DCL is not
|
||||||
|
compatible with standard makefile behavior.
|
||||||
|
|
||||||
|
This behavior can be changed when running GNU Make from DCL by setting
|
||||||
|
either DCL symbols or logical names of the format GNV$. The settings
|
||||||
|
are enabled with a string starting with one of '1', 'T', or 'E' for "1",
|
||||||
|
"TRUE", or "ENABLE". They are disabled with a '0', 'F', or 'D' for "1",
|
||||||
|
"FALSE", or "DISABLE". If they are not explicitly set to one of these
|
||||||
|
values, then they will be set to their default values.
|
||||||
|
|
||||||
|
The value of the setting DECC$FILENAME_UNIX_REPORT or
|
||||||
|
DECC$FILENAME_UNIX_ONLY will now cause the $(dir x) function to return
|
||||||
|
'./' or '[]' as appropriate.
|
||||||
|
|
||||||
|
The name GNV$MAKE_OLD_VMS when enabled will cause GNU Make to behave as
|
||||||
|
much as the older method as can be done with out disabling VMS features.
|
||||||
|
When it is disabled GNU Make have the new behavior which more closely
|
||||||
|
matches Unix Make behavior.
|
||||||
|
|
||||||
|
The default is currently the old behavior when running GNU Make from DCL.
|
||||||
|
In the future this may change. When running make from GNV Bash the new
|
||||||
|
behavior is the default.
|
||||||
|
|
||||||
|
This is a global setting that sets the default behavior for several other
|
||||||
|
options that can be individually changed. Many of the individual settings
|
||||||
|
are to make it so that the self tests for GNU Make need less VMS specific
|
||||||
|
modifications.
|
||||||
|
|
||||||
|
The name GNV$MAKE_COMMA when enabled will cause GNU Make to expect a comma
|
||||||
|
for a path separator and use a comma for the separator for a list of files.
|
||||||
|
When disabled, it will cause GNU Make to use a colon for a path separator
|
||||||
|
and a space for the separator for a list of files. The default is to be
|
||||||
|
enabled if the GNU Make is set to the older behavior.
|
||||||
|
|
||||||
|
The name GNV$MAKE_SHELL_SIM when enabled will cause GNU Make to try to
|
||||||
|
simulate a Posix shell more closely. The following behaviors occur:
|
||||||
|
|
||||||
|
* Single quotes are converted to double quotes and any double
|
||||||
|
quotes inside of them are doubled. No environment variable expansion
|
||||||
|
is simulated.
|
||||||
|
* A exit command status will be converted to a Posix Exit
|
||||||
|
where 0 is success and non-zero is failure.
|
||||||
|
* The $ character will cause environment variable expansion.
|
||||||
|
* Environent variables can be set on the command line before a command.
|
||||||
|
|
||||||
|
VMS generally uses logical name search lists instead of path variables
|
||||||
|
where the resolution is handled by VMS independent of the program. Which
|
||||||
|
means that it is likely that nothing will notice if the default path
|
||||||
|
specifier is changed in the future.
|
||||||
|
|
||||||
|
Currently the built in VMS specific macros and recipes depend on the comma
|
||||||
|
being used as a file list separator.
|
||||||
|
TODO: Remove this dependency as other functions in GNU Make depend on a
|
||||||
|
space being used as a separator.
|
||||||
|
|
||||||
|
The format for recipes are a combination of Unix macros, a subset of
|
||||||
|
simulated UNIX commands, some shell emulation, and OpenVMS commands.
|
||||||
|
This makes the resulting makefiles unique to the OpenVMS port of GNU make.
|
||||||
|
|
||||||
|
If you are creating a OpenVMS specific makefile from scratch, you should also
|
||||||
|
look at MMK (Madgoat Make) available at https://github.com/endlesssoftware/mmk
|
||||||
|
MMK uses full OpenVMS syntax and a persistent subprocess is used for the
|
||||||
|
recipe lines, allowing multiple line rules.
|
||||||
|
|
||||||
|
The default makefile search order is "makefile.vms", "gnumakefile",
|
||||||
|
"makefile". TODO: See if that lookup is case sensitive.
|
||||||
|
|
||||||
|
When Make is invoked from DCL, it will create a foreign command
|
||||||
|
using the name of executable image, with any facility prefix removed,
|
||||||
|
for the duration of the make program, so it can be used internally
|
||||||
|
to recursively run make(). The macro MAKE_COMMAND will be set to
|
||||||
|
this foreign command.
|
||||||
|
|
||||||
|
When make is launched from an exec*() command from a C program,
|
||||||
|
the foreign command is not created. The macro MAKE_COMMAND will be
|
||||||
|
set to the actual command passed as argv[0] to the exec*() function.
|
||||||
|
|
||||||
|
If the DCL symbol or logical name GNV$MAKE_USE_MCR exists, then
|
||||||
|
the macro MAKE_COMMAND will be set to be an "MCR" command with the
|
||||||
|
absolute path used by DCL to launch make. The foreign command
|
||||||
|
will not be created.
|
||||||
|
|
||||||
|
The macro MAKE is set to be the same value as the macro MAKE_COMMAND
|
||||||
|
on all platforms.
|
||||||
|
|
||||||
|
Each recipe command is normally run as a separate spawned processes,
|
||||||
|
except for the cases documented below where a temporary DCL command
|
||||||
|
file may be used.
|
||||||
|
|
||||||
|
BUG: Testing has shown that the commands in the temporary command files
|
||||||
|
are not always created properly. This issue is still under investigation.
|
||||||
|
|
||||||
|
Any macros marked as exported are temporarily created as DCL symbols
|
||||||
|
for child images to use. DCL symbol substitution is not done with these
|
||||||
|
commands.
|
||||||
|
Untested: Symbol substitution.
|
||||||
|
|
||||||
|
When a temporary DCL command file is used, DCL symbol substitution
|
||||||
|
will work.
|
||||||
|
|
||||||
|
For VMS 7.3-1 and earlier, command lines are limited to 255 characters
|
||||||
|
or 1024 characters in a command file.
|
||||||
|
For VMS 7.3-2 and later, command lines are limited to 4059 characters
|
||||||
|
or 8192 characters in a command file.
|
||||||
|
|
||||||
|
VMS limits each token of a command line to 256 characters, and limits
|
||||||
|
a command line to 127 tokens.
|
||||||
|
|
||||||
|
Command lines above the limit length are written to a command file
|
||||||
|
in sys$scratch:.
|
||||||
|
|
||||||
|
In order to handle Unix style extensions to VMS DCL, GNU Make has
|
||||||
|
parsed the recipe commands and them modified them as needed. The
|
||||||
|
parser has been re-written to resolve numerous bugs in handling
|
||||||
|
valid VMS syntax and potential buffer overruns.
|
||||||
|
|
||||||
|
The new parser may need whitespace characters where DCL does not require
|
||||||
|
it, and also may require that quotes are matched were DCL forgives if
|
||||||
|
they are not. There is a small chance that existing VMS specific makefiles
|
||||||
|
will be affected.
|
||||||
|
|
||||||
|
The '<', '>' was previously implemented using command files. Now
|
||||||
|
GNU Make will check to see if the is already a VMS "PIPE" command and
|
||||||
|
if it is not, will convert the command to a VMS "PIPE" command.
|
||||||
|
|
||||||
|
The '>>' redirection has been implemented by using a temporary command file.
|
||||||
|
This will be described later.
|
||||||
|
|
||||||
|
The DCL symbol or logical name GNV$MAKE_USE_CMD_FILE when set to a
|
||||||
|
string starting with one of '1','T', or 'E' for "1", "TRUE", or "ENABLE",
|
||||||
|
then temporary DCL command files are always used for running commands.
|
||||||
|
|
||||||
|
Some recipe strings with embedded new lines will not be handled correctly
|
||||||
|
when a command file is used.
|
||||||
|
|
||||||
|
GNU Make generally does text comparisons for the targets and sources. The
|
||||||
|
make program itself can handle either Unix or OpenVMS format filenames, but
|
||||||
|
normally does not do any conversions from one format to another.
|
||||||
|
TODO: The OpenVMS format syntax handling is incomplete.
|
||||||
|
TODO: ODS-5 EFS support is missing.
|
||||||
|
BUG: The internal routines to convert filenames to and from OpenVMS format
|
||||||
|
do not work correctly.
|
||||||
|
|
||||||
|
Note: In the examples below, line continuations such as a backslash may have
|
||||||
|
been added to make the examples easier to read in this format.
|
||||||
|
BUG: That feature does not completely work at this time.
|
||||||
|
|
||||||
|
Since the OpenVMS utilities generally expect OpenVMS format paths, you will
|
||||||
|
usually have to use OpenVMS format paths for rules and targets.
|
||||||
|
BUG: Relative OpenVMS paths may not work in targets, especially combined
|
||||||
|
with vpaths. This is because GNU make will just concatenate the directories
|
||||||
|
as it does on Unix.
|
||||||
|
|
||||||
|
The variables $^ and $@ separate files with commas instead of spaces.
|
||||||
|
This is controlled by the name GNV$MAKE_COMMA as documented in the
|
||||||
|
previous section.
|
||||||
|
|
||||||
|
While this may seem the natural thing to do with OpenVMS, it actually
|
||||||
|
causes problems when trying to use other make functions that expect the
|
||||||
|
files to be separated by spaces. If you run into this, you need the
|
||||||
|
following workaround to convert the output.
|
||||||
|
TODO: Look at have the $^ and $@ use spaces like on Unix and have
|
||||||
|
and easy to use function to do the conversions and have the built
|
||||||
|
in OpenVMS specific recipes and macros use it.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
comma := ,
|
||||||
|
empty :=
|
||||||
|
space := $(empty) $(empty)
|
||||||
|
|
||||||
|
foo: $(addsuffix .3,$(subs $(comma),$(space),$^)
|
||||||
|
|
||||||
|
|
||||||
|
Makefile variables are looked up in the current environment. You can set
|
||||||
|
symbols or logicals in DCL and evaluate them in the Makefile via
|
||||||
|
$(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
||||||
|
override OpenVMS symbols/logicals.
|
||||||
|
|
||||||
|
OpenVMS logical and symbols names show up as "environment" using the
|
||||||
|
origin function. when the "-e" option is specified, the origion function
|
||||||
|
shows them as "environment override". On Posix the test scripts indicate
|
||||||
|
that they should show up just as "environment".
|
||||||
|
|
||||||
|
When GNU make reads in a symbol or logical name into the environment, it
|
||||||
|
converts any dollar signs found to double dollar signs for convenience in
|
||||||
|
using DCL symbols and logical names in recipes. When GNU make exports a
|
||||||
|
DCL symbol for a child process, if the first dollar sign found is followed
|
||||||
|
by second dollar sign, then all double dollar signs will be convirted to
|
||||||
|
single dollar signs.
|
||||||
|
|
||||||
|
The variable $(ARCH) is predefined as IA64, ALPHA or VAX respectively.
|
||||||
|
Makefiles for different OpenVMS systems can now be written by checking
|
||||||
|
$(ARCH). Since IA64 and ALPHA are similar, usually just a check for
|
||||||
|
VAX or not VAX is sufficient.
|
||||||
|
|
||||||
|
You may have to update makefiles that assume VAX if not ALPHA.
|
||||||
|
|
||||||
|
ifeq ($(ARCH),VAX)
|
||||||
|
$(ECHO) "On the VAX"
|
||||||
|
else
|
||||||
|
$(ECHO) "On the ALPHA or IA64"
|
||||||
|
endif
|
||||||
|
|
||||||
|
Empty commands are handled correctly and don't end in a new DCL process.
|
||||||
|
|
||||||
|
The exit command needs to have OpenVMS exit codes. To pass a Posix code
|
||||||
|
back to the make script, you need to encode it by multiplying it by 8
|
||||||
|
and then adding %x1035a002 for a failure code and %x1035a001 for a
|
||||||
|
success. Make will interpret any posix code other than 0 as a failure.
|
||||||
|
TODO: Add an option have simulate Posix exit commands in recipes.
|
||||||
|
|
||||||
|
Lexical functions can be used in pipes to simulate shell file test rules.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Posix:
|
||||||
|
b : c ; [ -f $@ ] || echo >> $@
|
||||||
|
|
||||||
|
OpenVMS:
|
||||||
|
b : c ; if f$$search("$@") then pipe open/append xx $@ ; write xx "" ; close xx
|
||||||
|
|
||||||
|
|
||||||
|
You can also use pipes and turning messages off to silently test for a
|
||||||
|
failure.
|
||||||
|
|
||||||
|
x = %x1035a00a
|
||||||
|
|
||||||
|
%.b : %.c
|
||||||
|
<tab>pipe set mess/nofac/noiden/nosev/notext ; type $^/output=$@ || exit $(x)
|
||||||
|
|
||||||
|
|
||||||
|
Runtime issues:
|
||||||
|
|
||||||
|
The OpenVMS C Runtime has a convention for encoding a Posix exit status into
|
||||||
|
to OpenVMS exit codes. These status codes will have the hex value of
|
||||||
|
0x35a000. OpenVMS exit code may also have a hex value of %x10000000 set on
|
||||||
|
them. This is a flag to tell DCL not to write out the exit code.
|
||||||
|
|
||||||
|
To convert an OpenVMS encoded Posix exit status code to the original code
|
||||||
|
You subtract %x35a000 and any flags from the OpenVMS code and divide it by 8.
|
||||||
|
|
||||||
|
WARNING: Backward-incompatibility!
|
||||||
|
The make program exit now returns the same encoded Posix exit code as on
|
||||||
|
Unix. Previous versions returned the OpenVMS exit status code if that is what
|
||||||
|
caused the recipe to fail.
|
||||||
|
TODO: Provide a way for scripts calling make to obtain that OpenVMS status
|
||||||
|
code.
|
||||||
|
|
||||||
|
Make internally has two error codes, MAKE_FAILURE and MAKE_TROUBLE. These
|
||||||
|
will have the error "-E-" severity set on exit.
|
||||||
|
|
||||||
|
MAKE_TROUBLE is returned only if the option "-q" or "--question" is used and
|
||||||
|
has a Posix value of 1 and an OpenVMS status of %x1035a00a.
|
||||||
|
|
||||||
|
MAKE_FAILURE has a Posix value of 2 and an OpenVMS status of %x1035a012.
|
||||||
|
|
||||||
|
Output from GNU make may have single quotes around some values where on
|
||||||
|
other platforms it does not. Also output that would be in double quotes
|
||||||
|
on some platforms may show up as single quotes on VMS.
|
||||||
|
|
||||||
|
There may be extra blank lines in the output on VMS.
|
||||||
|
https://savannah.gnu.org/bugs/?func=detailitem&item_id=41760
|
||||||
|
|
||||||
|
There may be a "Waiting for unfinished jobs..." show up in the output.
|
||||||
|
|
||||||
|
Error messages generated by Make or Unix utilities may slightly vary from
|
||||||
|
Posix platforms. Typically the case may be different.
|
||||||
|
|
||||||
|
When make deletes files, on posix platforms it writes out 'rm' and the list
|
||||||
|
of files. On VMS, only the files are writen out, one per line.
|
||||||
|
TODO: VMS
|
||||||
|
|
||||||
|
There may be extra leading white space or additional or missing whitespace
|
||||||
|
in the output of recipes.
|
||||||
|
|
||||||
|
GNU Make uses sys$scratch: for the tempfiles that it creates.
|
||||||
|
|
||||||
|
The OpenVMS CRTL library maps /tmp to sys$scratch if the TMP: logical name
|
||||||
|
does not exist. As the CRTL may use both sys$scratch: and /tmp internally,
|
||||||
|
if you define the TMP logical name to be different than SYS$SCRATCH:,
|
||||||
|
you may end up with only some temporary files in TMP: and some in SYS$SCRATCH:
|
||||||
|
|
||||||
|
The default include directory for including other makefiles is
|
||||||
|
SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
||||||
|
SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
||||||
|
TODO: A better default may be desired.
|
||||||
|
|
||||||
|
If the device for a file in a recipe does not exist, on OpenVMS an error
|
||||||
|
message of "stat: <file>: no such device or address" will be output.
|
||||||
|
|
||||||
|
Make ignores success, informational, or warning errors (-S-, -I-, or
|
||||||
|
-W-). But it will stop on -E- and -F- errors. (unless you do something
|
||||||
|
to override this in your makefile, or whatever).
|
||||||
|
|
||||||
|
|
||||||
|
Unix compatibilty features:
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
If the command 'echo' is seen, any single quotes on the line will be
|
||||||
|
converted to double quotes.
|
||||||
|
|
||||||
|
The variable $(CD) is implemented as a built in Change Directory
|
||||||
|
command. This invokes the 'builtin_cd' Executing a 'set default'
|
||||||
|
recipe doesn't do the trick, since it only affects the subprocess
|
||||||
|
spawned for that command.
|
||||||
|
|
||||||
|
The 'builtin_cd' is generally expected to be on its own line.
|
||||||
|
The 'builtin_cd' either from the expansion of $(CD) or directly
|
||||||
|
put in a recipe line will be executed before any other commands in
|
||||||
|
that recipe line. DCL parameter substitution will not work for the
|
||||||
|
'builtin_cd' command.
|
||||||
|
|
||||||
|
Putting a 'builtin_cd' in a pipeline or an IF-THEN line should not be
|
||||||
|
done because the 'builtin_cd' is always executed
|
||||||
|
and executed first. The directory change is persistent.
|
||||||
|
|
||||||
|
Unix shell style I/O redirection is supported. You can now write lines like:
|
||||||
|
"<tab>mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt"
|
||||||
|
|
||||||
|
Posix shells have ":" as a null command. These are now handled.
|
||||||
|
https://savannah.gnu.org/bugs/index.php?41761
|
||||||
|
|
||||||
|
A note on appending the redirected output. A simple mechanism is
|
||||||
|
implemented to make ">>" work in action lines. In OpenVMS there is no simple
|
||||||
|
feature like ">>" to have DCL command or program output redirected and
|
||||||
|
appended to a file. GNU make for OpenVMS implements the redirection
|
||||||
|
of ">>" by using a command procedure.
|
||||||
|
|
||||||
|
The current algorithm creates the output file if it does not exist and
|
||||||
|
then uses the DCL open/append to extend it. SYS$OUTPUT is then directed
|
||||||
|
to that file.
|
||||||
|
|
||||||
|
The implementation supports only one redirected append output to a file
|
||||||
|
and that redirection is done before any other commands in that line
|
||||||
|
are executed, so it redirects all output for that command.
|
||||||
|
|
||||||
|
The older implementation wrote the output to a temporary file in
|
||||||
|
in sys$scratch: and then attempted to append the file to the existing file.
|
||||||
|
The temporary file names looked like "CMDxxxxx.". Any time the created
|
||||||
|
command procedure can not complete, this happens. Pressing Ctrl+Y to
|
||||||
|
abort make is one case.
|
||||||
|
|
||||||
|
In case of Ctrl+Y the associated command procedure is left in SYS$SCRATCH:.
|
||||||
|
The command procedures will be named gnv$make_cmd*.com.
|
||||||
|
|
||||||
|
The CtrlY handler now uses $delprc to delete all children. This way also
|
||||||
|
actions with DCL commands will be stopped. As before the CtrlY handler
|
||||||
|
then sends SIGQUIT to itself, which is handled in common code.
|
||||||
|
|
||||||
|
Temporary command files are now deleted in the OpenVMS child termination
|
||||||
|
handler. That deletes them even if a Ctrl+C was pressed.
|
||||||
|
TODO: Does the previous section about >> leaving files still apply?
|
||||||
|
|
||||||
|
The behavior of pressing Ctrl+C is not changed. It still has only an effect,
|
||||||
|
after the current action is terminated. If that doesn't happen or takes too
|
||||||
|
long, Ctrl+Y should be used instead.
|
||||||
|
|
||||||
|
|
||||||
|
Build Options:
|
||||||
|
|
||||||
|
Added support to have case sensitive targets and dependencies but to
|
||||||
|
still use case blind file names. This is especially useful for Java
|
||||||
|
makefiles on VMS:
|
||||||
|
|
||||||
|
<TAB>.SUFFIXES :
|
||||||
|
<TAB>.SUFFIXES : .class .java
|
||||||
|
<TAB>.java.class :
|
||||||
|
<TAB><TAB>javac "$<"
|
||||||
|
<TAB>HelloWorld.class : HelloWorld.java
|
||||||
|
|
||||||
|
A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
||||||
|
It needs to be enabled to get this feature; default is disabled.
|
||||||
|
TODO: This should be a run-time setting based on if the process
|
||||||
|
has been set to case sensitive.
|
||||||
|
|
||||||
|
|
||||||
|
Unimplemented functionality:
|
||||||
|
|
||||||
|
The new feature "Loadable objects" is not yet supported. If you need it,
|
||||||
|
please send a change request or submit a bug report.
|
||||||
|
|
||||||
|
The new option --output-sync (-O) is accepted but has no effect: GNU make
|
||||||
|
for OpenVMS does not support running multiple commands simultaneously.
|
||||||
|
|
||||||
|
|
||||||
|
Self test failures and todos:
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
The test harness can not handle testing some of the VMS specific modes
|
||||||
|
because of the features needed for to be set for the Perl to run.
|
||||||
|
Need to find a way to set the VMS features before running make as a
|
||||||
|
child.
|
||||||
|
|
||||||
|
GNU make was not currently translating the OpenVMS encoded POSIX values
|
||||||
|
returned to it back to the Posix values. I have temporarily modified the
|
||||||
|
Perl test script to compensate for it. This should be being handled
|
||||||
|
internally to Make.
|
||||||
|
TODO: Verify and update the Perl test script.
|
||||||
|
|
||||||
|
The features/parallelism test was failing. OpenVMS is executing the rules
|
||||||
|
in sequence not in parallel as this feature was not implemented.
|
||||||
|
GNU Make on VMS no longer claims it is implemented.
|
||||||
|
TODO: Implement it.
|
||||||
|
|
||||||
|
Symlink support is not present. Symlinks are supported by OpenVMS 8.3 and
|
||||||
|
later.
|
||||||
|
|
||||||
|
Error messages should be supressed with the "-" at the beginning of a line.
|
||||||
|
On openVMS they were showing up. TODO: Is this still an issue?
|
||||||
|
|
||||||
|
The internal vmsify and unixify OpenVMS to/from UNIX are not handling logical
|
||||||
|
names correctly.
|
||||||
|
|
||||||
|
|
||||||
|
Build instructions:
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Don't use the HP C V7.2-001 compiler, which has an incompatible change
|
||||||
|
how __STDC__ is defined. This results at least in compile time warnings.
|
||||||
|
|
||||||
|
Make a 1st version
|
||||||
|
$ @makefile.com ! ignore any compiler and/or linker warning
|
||||||
|
$ copy make.exe 1st-make.exe
|
||||||
|
|
||||||
|
Use the 1st version to generate a 2nd version as a test.
|
||||||
|
$ mc sys$disk:[]1st-make clean ! ignore any file not found messages
|
||||||
|
$ mc sys$disk:[]1st-make
|
||||||
|
|
||||||
|
Verify your 2nd version by building Make again.
|
||||||
|
$ copy make.exe 2nd-make.exe
|
||||||
|
$ mc sys$disk:[]2nd-make clean
|
||||||
|
$ mc sys$disk:[]2nd-make
|
||||||
|
|
||||||
|
|
||||||
|
Running the tests:
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Running the tests on OpenVMS requires the following software to be installed
|
||||||
|
as most of the tests are Unix oriented.
|
||||||
|
|
||||||
|
* Perl 5.18 or later.
|
||||||
|
https://sourceforge.net/projects/vmsperlkit/files/
|
||||||
|
* GNV 2.1.3 + Updates including a minimum of:
|
||||||
|
* Bash 4.3.30
|
||||||
|
* ld_tools 3.0.2
|
||||||
|
* coreutils 8.21
|
||||||
|
https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/
|
||||||
|
https://sourceforge.net/projects/gnv/files/
|
||||||
|
|
||||||
|
As the test scripts need to create some foreign commands that persist
|
||||||
|
after the test is run, it is recommend that either you use a subprocess or
|
||||||
|
a dedicated login to run the tests.
|
||||||
|
|
||||||
|
To get detailed information for running the tests:
|
||||||
|
|
||||||
|
$ set default [.tests]
|
||||||
|
$ @run_make_tests help
|
||||||
|
|
||||||
|
Running the script with no parameters will run all the tests.
|
||||||
|
|
||||||
|
After the the test script has been run once in a session, assuming
|
||||||
|
that you built make in sys$disk:[make], you can redefined the
|
||||||
|
"bin" logical name as follows:
|
||||||
|
|
||||||
|
$ define bin sys$disk:[make],gnv$gnu:[bin]
|
||||||
|
|
||||||
|
Then you can use Perl to run the scripts.
|
||||||
|
|
||||||
|
$ perl run_make_tests.pl
|
||||||
|
|
||||||
|
|
||||||
|
Acknowlegements:
|
||||||
|
----------------
|
||||||
|
|
||||||
|
See NEWS. for details of past changes.
|
||||||
|
|
||||||
|
These are the currently known contributers to this port.
|
||||||
|
|
||||||
|
Hartmut Becker
|
||||||
|
John Malmberg
|
||||||
|
Michael Gehre
|
||||||
|
John Eisenbraun
|
||||||
|
Klaus Kaempf
|
||||||
|
Mike Moretti
|
||||||
|
John W. Eaton
|
||||||
@@ -1,53 +1,114 @@
|
|||||||
Port of GNU make to Windows NT and Windows 95
|
This version of GNU make has been tested on:
|
||||||
Builds natively with MSVC 2.x or MSVC 4.x compilers.
|
Microsoft Windows 2000/XP/2003/Vista/7/8/10
|
||||||
Should also build fine with MSVC 5.x and 6.x (though not confirmed).
|
It has also been used on Windows 95/98/NT, and on OS/2.
|
||||||
|
|
||||||
This Windows 32-bit port of GNU make is maintained primarily by Rob
|
It builds with the MinGW port of GCC (tested with GCC 3.4.2, 4.8.1,
|
||||||
Tulloh, who is also the author of this README.
|
and 4.9.3).
|
||||||
|
|
||||||
To build with nmake on Windows NT, Windows 95, or Windows 98:
|
It also builds with MSVC 2.x, 4.x, 5.x, 6.x, 2003, and 14 (2015) as
|
||||||
|
well as with .NET 7.x and .NET 2003.
|
||||||
|
|
||||||
1. Make sure cl.exe is in your %Path%. Example:
|
As of version 4.0, a build with Guile is supported (tested with Guile
|
||||||
|
2.0.3). To build with Guile, you will need, in addition to Guile
|
||||||
|
itself, its dependency libraries and the pkg-config program. The
|
||||||
|
latter is used to figure out which compilation and link switches and
|
||||||
|
libraries need to be mentioned on the compiler command lines to
|
||||||
|
correctly link with Guile. A Windows port of pkg-config can be found
|
||||||
|
on ezwinports site:
|
||||||
|
|
||||||
set Path=%Path%;c:/msdev/bin
|
http://sourceforge.net/projects/ezwinports/
|
||||||
|
|
||||||
2. Make sure %include% is set to msvc include directory. Example:
|
The libraries on which Guile depends can vary depending on your
|
||||||
|
version and build of Guile. At the very least, the Boehm's GC library
|
||||||
|
will be needed, and typically also GNU MP, libffi, libunistring, and
|
||||||
|
libtool's libltdl. Whoever built the port of Guile you have should
|
||||||
|
also provide you with these dependencies or a URL where to download
|
||||||
|
them. A precompiled 32-bit Windows build of Guile is available from
|
||||||
|
the ezwinports site mentioned above.
|
||||||
|
|
||||||
set include=c:/msdev/include
|
The Windows port of GNU make is maintained jointly by various people.
|
||||||
|
It was originally made by Rob Tulloh.
|
||||||
3. Make sure %lib% is set to msvc lib directory. Example:
|
It is currently maintained by Eli Zaretskii.
|
||||||
|
|
||||||
set lib=c:/msdev/lib
|
|
||||||
|
|
||||||
4. nmake /f NMakefile
|
|
||||||
|
|
||||||
|
|
||||||
A short cut to steps 1, 2, and 3 is to run VCVARS32.bat before
|
Do this first, regardless of the build method you choose:
|
||||||
invoking namke. For example:
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
1. Edit config.h.W32 to your liking (especially the few shell-related
|
||||||
|
defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
|
||||||
|
to './configure --enable-case-insensitive-file-system'). (We don't
|
||||||
|
recommend to define HAVE_CASE_INSENSITIVE_FS, but you may wish to
|
||||||
|
consider that if you have a lot of files whose names are in upper
|
||||||
|
case, while Makefile rules are written for lower-case versions.)
|
||||||
|
|
||||||
|
|
||||||
|
Using make_msvc_net2003.vcproj
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
2. Open make_msvc_net2003.vcproj in MSVS71 or MSVC71 or any compatible IDE,
|
||||||
|
then build this project as usual. There's also a solution file for
|
||||||
|
Studio 2003.
|
||||||
|
|
||||||
|
|
||||||
|
Building with (MinGW-)GCC using build_w32.bat
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
|
2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
|
||||||
|
correct PATH and other environment variables for it, then execute ...
|
||||||
|
|
||||||
|
build_w32.bat gcc
|
||||||
|
|
||||||
|
This produces gnumake.exe in the GccRel directory.
|
||||||
|
If you want a version of GNU make built with debugging enabled,
|
||||||
|
add the --debug option.
|
||||||
|
|
||||||
|
The batch file will probe for Guile installation, and will build
|
||||||
|
gnumake.exe with Guile if it finds it. If you have Guile
|
||||||
|
installed, but want to build Make without Guile support, type
|
||||||
|
|
||||||
|
build_w32.bat --without-guile gcc
|
||||||
|
|
||||||
|
|
||||||
|
Building with (MSVC++-)cl using build_w32.bat or NMakefile
|
||||||
|
----------------------------------------------------------
|
||||||
|
|
||||||
|
2. Open a W32 command prompt for your installed (MSVC++-)cl, setup a
|
||||||
|
correct PATH and other environment variables for it (usually via
|
||||||
|
executing vcvars32.bat or vsvars32.bat from the cl-installation,
|
||||||
|
e.g. "%VS71COMNTOOLS%vsvars32.bat"; or using a corresponding start
|
||||||
|
menue entry from the cl-installation), then execute EITHER ...
|
||||||
|
|
||||||
|
build_w32.bat
|
||||||
|
|
||||||
|
This produces gnumake.exe in the WinRel directory.
|
||||||
|
If you want a version of GNU make built with debugging enabled,
|
||||||
|
add the --debug option.
|
||||||
|
|
||||||
|
... OR ...
|
||||||
|
|
||||||
c:
|
|
||||||
cd \msdev\bin
|
|
||||||
VCVARS32.bat
|
|
||||||
cd \path\to\make-%VERSION%
|
|
||||||
nmake /f NMakefile
|
nmake /f NMakefile
|
||||||
|
|
||||||
There is a bat file (build_w32.bat) for folks who have fear of nmake.
|
(this produces WinDebug/make.exe and WinRel/make.exe).
|
||||||
|
|
||||||
Outputs:
|
The batch file will probe for Guile installation, and will build
|
||||||
|
gnumake.exe with Guile if it finds it. If you have Guile
|
||||||
WinDebug/make.exe
|
installed, but want to build Make without Guile support, type
|
||||||
WinRel/make.exe
|
|
||||||
|
|
||||||
|
build_w32.bat --without-guile
|
||||||
|
|
||||||
|
-------------------
|
||||||
-- Notes/Caveats --
|
-- Notes/Caveats --
|
||||||
|
-------------------
|
||||||
|
|
||||||
GNU make on Windows 32-bit platforms:
|
GNU make on Windows 32-bit platforms:
|
||||||
|
|
||||||
This version of make is ported natively to Windows32 platforms
|
This version of make is ported natively to Windows32 platforms
|
||||||
(Windows NT 3.51, Windows NT 4.0, Windows 95, and Windows 98). It
|
(Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP,
|
||||||
does not rely on any 3rd party software or add-on packages for
|
Windows 95, and Windows 98). It does not rely on any 3rd party
|
||||||
building. The only thing needed is a version of Visual C++,
|
software or add-on packages for building. The only thing
|
||||||
which is the predominant compiler used on Windows32 platforms.
|
needed is a Windows compiler. Two compilers supported
|
||||||
|
officially are the MinGW port of GNU GCC, and the various
|
||||||
|
versions of the Microsoft C compiler.
|
||||||
|
|
||||||
Do not confuse this port of GNU make with other Windows32 projects
|
Do not confuse this port of GNU make with other Windows32 projects
|
||||||
which provide a GNU make binary. These are separate projects
|
which provide a GNU make binary. These are separate projects
|
||||||
@@ -55,22 +116,22 @@ GNU make on Windows 32-bit platforms:
|
|||||||
|
|
||||||
GNU make and sh.exe:
|
GNU make and sh.exe:
|
||||||
|
|
||||||
This port prefers you have a working sh.exe somewhere on your
|
This port prefers if you have a working sh.exe somewhere on
|
||||||
system. If you don't have sh.exe, the port falls back to
|
your system. If you don't have sh.exe, the port falls back to
|
||||||
MSDOS mode for launching programs (via a batch file).
|
MSDOS mode for launching programs (via a batch file). The
|
||||||
The MSDOS mode style execution has not been tested that
|
MSDOS mode style execution has not been tested that carefully
|
||||||
carefully though (The author uses GNU bash as sh.exe).
|
though (The author uses GNU bash as sh.exe).
|
||||||
|
|
||||||
There are very few true ports of Bourne shell for NT right now.
|
There are very few true ports of Bourne shell for NT right now.
|
||||||
There is a version of GNU bash available from Cygnus "Cygwin"
|
There is a version of GNU bash available from Cygnus "Cygwin"
|
||||||
porting effort (http://sourceware.cygnus.com/cygwin).
|
porting effort (http://www.cygwin.com/).
|
||||||
Other possibilities are the MKS version of sh.exe, or building
|
Other possibilities are the MKS version of sh.exe, or building
|
||||||
your own with a package like NutCracker (DataFocus) or Portage
|
your own with a package like NutCracker (DataFocus) or Portage
|
||||||
(Consensys).
|
(Consensys). Also MinGW includes sh (http://mingw.org/).
|
||||||
|
|
||||||
GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
|
GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
|
||||||
|
|
||||||
Some versions of Bourne shell does not behave well when invoked
|
Some versions of Bourne shell do not behave well when invoked
|
||||||
as 'sh -c' from CreateProcess(). The main problem is they seem
|
as 'sh -c' from CreateProcess(). The main problem is they seem
|
||||||
to have a hard time handling quoted strings correctly. This can
|
to have a hard time handling quoted strings correctly. This can
|
||||||
be circumvented by writing commands to be executed to a batch
|
be circumvented by writing commands to be executed to a batch
|
||||||
@@ -79,11 +140,22 @@ GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
|
|||||||
To work around this difficulty, this version of make supports
|
To work around this difficulty, this version of make supports
|
||||||
a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
|
a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
|
||||||
time, make forces all command lines to be executed via script
|
time, make forces all command lines to be executed via script
|
||||||
files instead of by command line.
|
files instead of by command line. In this mode you must have a
|
||||||
|
working sh.exe in order to use parallel builds (-j).
|
||||||
|
|
||||||
A native Windows32 system with no Bourne shell will also run
|
A native Windows32 system with no Bourne shell will also run
|
||||||
in batch mode. All command lines will be put into batch files
|
in batch mode. All command lines will be put into batch files
|
||||||
and executed via $(COMSPEC) (%COMSPEC%).
|
and executed via $(COMSPEC) (%COMSPEC%). However, parallel
|
||||||
|
builds ARE supported with Windows shells (cmd.exe and
|
||||||
|
command.com). See the next section about some peculiarities
|
||||||
|
of parallel builds on Windows.
|
||||||
|
|
||||||
|
Support for parallel builds
|
||||||
|
|
||||||
|
Parallel builds (-jN) are supported in this port, with 1
|
||||||
|
limitation: The number of concurrent processes has a hard
|
||||||
|
limit of 64, due to the way this port implements waiting for
|
||||||
|
its subprocesses.
|
||||||
|
|
||||||
GNU make and Cygnus GNU Windows32 tools:
|
GNU make and Cygnus GNU Windows32 tools:
|
||||||
|
|
||||||
@@ -128,7 +200,8 @@ GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
|
|||||||
Please note that you are free to mix colon and semi-colon in the
|
Please note that you are free to mix colon and semi-colon in the
|
||||||
specification of paths. Make is able to figure out the intended
|
specification of paths. Make is able to figure out the intended
|
||||||
result and convert the paths internally to the format needed
|
result and convert the paths internally to the format needed
|
||||||
when interacting with the operating system.
|
when interacting with the operating system, providing the path
|
||||||
|
is not within quotes, e.g. "x:/test/test.c".
|
||||||
|
|
||||||
You are encouraged to use colon as the separator character.
|
You are encouraged to use colon as the separator character.
|
||||||
This should ease the pain of deciding how to handle various path
|
This should ease the pain of deciding how to handle various path
|
||||||
@@ -143,36 +216,20 @@ GNU make test suite:
|
|||||||
on Windows NT). All tests pass in an environment that includes
|
on Windows NT). All tests pass in an environment that includes
|
||||||
sh.exe. Tests were performed on both Windows NT and Windows 95.
|
sh.exe. Tests were performed on both Windows NT and Windows 95.
|
||||||
|
|
||||||
Building GNU make on Windows NT and Windows 95/98 with Microsoft Visual C:
|
|
||||||
|
|
||||||
I did not provide a Visual C project file with this port as
|
|
||||||
the project file would not be considered freely distributable
|
|
||||||
(or so I think). It is easy enough to create one, though, if
|
|
||||||
you know how to use Visual C.
|
|
||||||
|
|
||||||
I build the program statically to avoid problems locating DLL's
|
|
||||||
on machines that may not have MSVC runtime installed. If you
|
|
||||||
prefer, you can change make to build with shared libraries by
|
|
||||||
changing /MT to /MD in the NMakefile (or in build_w32.bat).
|
|
||||||
|
|
||||||
The program has not been built for non-Intel architectures (yet).
|
|
||||||
|
|
||||||
I have not tried to build with any other compilers than MSVC. I
|
|
||||||
have heard that this is possible though so don't be afraid to
|
|
||||||
notify me of your successes!
|
|
||||||
|
|
||||||
Pathnames and white space:
|
Pathnames and white space:
|
||||||
|
|
||||||
Unlike Unix, Windows 95/NT systems encourage pathnames which
|
Unlike Unix, Windows 95/NT systems encourage pathnames which
|
||||||
contain white space (e.g. C:\Program Files\). These sorts of pathnames
|
contain white space (e.g. C:\Program Files\). These sorts of
|
||||||
are legal under Unix too, but are never encouraged. There is
|
pathnames are valid on Unix too, but are never encouraged.
|
||||||
at least one place in make (VPATH/vpath handling) where paths
|
There is at least one place in make (VPATH/vpath handling) where
|
||||||
containing white space will simply not work. There may be others
|
paths containing white space will simply not work. There may be
|
||||||
too. I chose to not try and port make in such a way so that
|
others too. I chose to not try and port make in such a way so
|
||||||
these sorts of paths could be handled. I offer these suggestions
|
that these sorts of paths could be handled. I offer these
|
||||||
as workarounds:
|
suggestions as workarounds:
|
||||||
|
|
||||||
1. Use 8.3 notation
|
1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
|
||||||
|
"x:\longpathtest". Type "dir /x" to view these filenames
|
||||||
|
within the cmd.exe shell.
|
||||||
2. Rename the directory so it does not contain white space.
|
2. Rename the directory so it does not contain white space.
|
||||||
|
|
||||||
If you are unhappy with this choice, this is free software
|
If you are unhappy with this choice, this is free software
|
||||||
@@ -217,25 +274,41 @@ SAMBA/NTFS/VFAT:
|
|||||||
package using SAMBA as my file server. The reason seems to be
|
package using SAMBA as my file server. The reason seems to be
|
||||||
related to the way VC++ 4.0 changes the case name of the pdb
|
related to the way VC++ 4.0 changes the case name of the pdb
|
||||||
filename it is passed on the command line. It seems to change
|
filename it is passed on the command line. It seems to change
|
||||||
the name always to to lower case. I contend that
|
the name always to to lower case. I contend that the VC++
|
||||||
the VC++ compiler should not change the casename of files that
|
compiler should not change the casename of files that are passed
|
||||||
are passed as arguments on the command line. I don't think this
|
as arguments on the command line. I don't think this was a
|
||||||
was a problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
|
problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
|
||||||
|
|
||||||
The package builds fine on VFAT and NTFS filesystems.
|
The package builds fine on VFAT and NTFS filesystems.
|
||||||
|
|
||||||
Most all of the development I have done to date has been using
|
Most all of the development I have done to date has been using
|
||||||
NTFS and long file names. I have not done any considerable work
|
NTFS and long file names. I have not done any considerable work
|
||||||
under VFAT. VFAT users may wish to be aware that this port
|
under VFAT. VFAT users may wish to be aware that this port of
|
||||||
of make does respect case sensitivity.
|
make does respect case sensitivity.
|
||||||
|
|
||||||
FAT:
|
FAT:
|
||||||
|
|
||||||
Version 3.76 added support for FAT filesystems. Make
|
Version 3.76 added support for FAT filesystems. Make works
|
||||||
works around some difficulties with stat'ing of
|
around some difficulties with stat'ing of files and caching of
|
||||||
files and caching of filenames and directories internally.
|
filenames and directories internally.
|
||||||
|
|
||||||
Bug reports:
|
Bug reports:
|
||||||
|
|
||||||
Please submit bugs via the normal bug reporting mechanism which
|
Please submit bugs via the normal bug reporting mechanism which
|
||||||
is described in the GNU make manual and the base README.
|
is described in the GNU make manual and the base README.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
@@ -35,19 +35,19 @@ you'll need to re-apply them by hand.
|
|||||||
Install the Customs library and header files according to the
|
Install the Customs library and header files according to the
|
||||||
documentation. You should also install the man pages (contrary to
|
documentation. You should also install the man pages (contrary to
|
||||||
comments in the documentation, they weren't installed automatically for
|
comments in the documentation, they weren't installed automatically for
|
||||||
me; I had to cd to the ``pmake-2.1.33/doc'' directory and run ``pmake
|
me; I had to cd to the 'pmake-2.1.33/doc' directory and run 'pmake
|
||||||
install'' there directly).
|
install' there directly).
|
||||||
|
|
||||||
|
|
||||||
BUILDING GNU MAKE
|
BUILDING GNU MAKE
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Once you've installed Customs, you can build GNU make to use it. When
|
Once you've installed Customs, you can build GNU make to use it. When
|
||||||
configuring GNU make, merely use the ``--with-customs=DIR'' option.
|
configuring GNU make, merely use the '--with-customs=DIR' option.
|
||||||
Provide the directory containing the ``lib'' and ``include/customs''
|
Provide the directory containing the 'lib' and 'include/customs'
|
||||||
subdirectories as DIR. For example, if you installed the customs
|
subdirectories as DIR. For example, if you installed the customs
|
||||||
library in /usr/local/lib and the headers in /usr/local/include/customs,
|
library in /usr/local/lib and the headers in /usr/local/include/customs,
|
||||||
then you'd pass ``--with-customs=/usr/local'' as an option to configure.
|
then you'd pass '--with-customs=/usr/local' as an option to configure.
|
||||||
|
|
||||||
Run make (or use build.sh) normally to build GNU make as described in
|
Run make (or use build.sh) normally to build GNU make as described in
|
||||||
the INSTALL file.
|
the INSTALL file.
|
||||||
@@ -93,3 +93,20 @@ SunOS 4.1.x:
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
YMMV.
|
YMMV.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1998-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
141
README.cvs
141
README.cvs
@@ -1,141 +0,0 @@
|
|||||||
-*-text-*-
|
|
||||||
|
|
||||||
Obtaining CVS Code
|
|
||||||
------------------
|
|
||||||
|
|
||||||
This seems redundant, since if you're reading this you most likely have
|
|
||||||
already performed this step; however, for completeness, you can obtain
|
|
||||||
the GNU make source code via anonymous CVS from the FSF's Savannah
|
|
||||||
project <http://savannah.gnu.org/projects/make/>:
|
|
||||||
|
|
||||||
$ cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/make co make
|
|
||||||
|
|
||||||
You might want to use the "-z3" option to get compression, and you most
|
|
||||||
certainly will want the -P option to avoid unneeded directories
|
|
||||||
cluttering up your source. Personally I add these (as well as -dP for
|
|
||||||
update) to my ~/.cvsrc file.
|
|
||||||
|
|
||||||
|
|
||||||
If you have an older version of CVS, you might have to login first.
|
|
||||||
There is no password; just hit the ENTER key if you are asked for one.
|
|
||||||
|
|
||||||
|
|
||||||
Building From CVS
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
To build GNU make from CVS, you will need Autoconf 2.53 (or better),
|
|
||||||
Automake 1.6.3 (or better), and Gettext 0.11.5 (or better), and any
|
|
||||||
tools that those utilities require (GNU m4, Perl, etc.). You will also
|
|
||||||
need a copy of wget.
|
|
||||||
|
|
||||||
After checking out the code, you will need to perform these steps to get
|
|
||||||
to the point where you can run "make".
|
|
||||||
|
|
||||||
|
|
||||||
1) $ autopoint
|
|
||||||
|
|
||||||
This will instantiate various m4 macros files, etc. in the config
|
|
||||||
and po directories.
|
|
||||||
|
|
||||||
|
|
||||||
2) $ aclocal -I config
|
|
||||||
|
|
||||||
Generate the proper aclocal.m4 file.
|
|
||||||
|
|
||||||
|
|
||||||
3) $ autoheader
|
|
||||||
|
|
||||||
Generate a "config.h.in" file from the contents of configure.in,
|
|
||||||
etc.
|
|
||||||
|
|
||||||
|
|
||||||
4) $ automake --add-missing
|
|
||||||
|
|
||||||
Add (symlink) missing files into the distribution, and generate
|
|
||||||
Makefile.in's from Makefile.am's.
|
|
||||||
|
|
||||||
You will see these perhaps unexpected messages (among others which
|
|
||||||
you should be expecting :)); just ignore them--I know what I'm doing
|
|
||||||
:).
|
|
||||||
|
|
||||||
Makefile.am: required file `./README' not found
|
|
||||||
configure.in:xxx: required file `./build.sh.in' not found
|
|
||||||
Makefile.am:xxx: automatically discovered file `getloadavg.c' should not be explicitly mentioned
|
|
||||||
|
|
||||||
|
|
||||||
5) $ autoconf
|
|
||||||
|
|
||||||
Generate a "configure" script from configure.in and acinclude.m4.
|
|
||||||
|
|
||||||
|
|
||||||
6) $ ./configure
|
|
||||||
|
|
||||||
Generate a Makefile
|
|
||||||
|
|
||||||
|
|
||||||
7) $ make update
|
|
||||||
|
|
||||||
Use wget to retrieve various other files that GNU make relies on,
|
|
||||||
but does not keep in its own source tree.
|
|
||||||
|
|
||||||
|
|
||||||
At this point you have successfully brought your CVS copy of the GNU
|
|
||||||
make source directory up to the point where it can be treated
|
|
||||||
more-or-less like the official package you would get from ftp.gnu.org.
|
|
||||||
That is, you can just run:
|
|
||||||
|
|
||||||
$ make && make check && make install
|
|
||||||
|
|
||||||
to build and install GNU make.
|
|
||||||
|
|
||||||
|
|
||||||
Creating a Package
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Once you have performed the above steps (including the configuration and
|
|
||||||
build) you can create a GNU make package. This is very simple, just
|
|
||||||
run:
|
|
||||||
|
|
||||||
$ make dist-gzip
|
|
||||||
|
|
||||||
and, if you like:
|
|
||||||
|
|
||||||
$ make dist-bzip2
|
|
||||||
|
|
||||||
Even better, you should run this:
|
|
||||||
|
|
||||||
$ make distcheck
|
|
||||||
|
|
||||||
Which will build both .gz and .bz2 package files, then unpack them into
|
|
||||||
a temporary location, try to build them, and repack them, verifying that
|
|
||||||
everything works, you get the same results, _and_ no extraneous files
|
|
||||||
are left over after the "distclean" rule--whew!! Now, _that_ is why
|
|
||||||
converting to Automake is worth the trouble! A big "huzzah!" to Tom
|
|
||||||
T. and the AutoToolers!
|
|
||||||
|
|
||||||
|
|
||||||
That's it, you're done!
|
|
||||||
|
|
||||||
|
|
||||||
Appendix A - For The Brave
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
For those of you who trust me implicitly, or are just brave (or
|
|
||||||
foolhardy), here is a canned sequence of commands to build a GNU make
|
|
||||||
distribution package from a virgin CVS source checkout (assuming all the
|
|
||||||
prerequisites are available of course).
|
|
||||||
|
|
||||||
This list is eminently suitable for a quick swipe o' the mouse and a
|
|
||||||
swift click o' mouse-2 into an xterm. Go for it!
|
|
||||||
|
|
||||||
|
|
||||||
autopoint
|
|
||||||
aclocal -I config
|
|
||||||
autoheader
|
|
||||||
automake --add-missing
|
|
||||||
autoconf
|
|
||||||
./configure
|
|
||||||
make update
|
|
||||||
make
|
|
||||||
make check
|
|
||||||
make distcheck
|
|
||||||
291
README.git
Normal file
291
README.git
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
-*-text-*-
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Obtaining Git Code
|
||||||
|
------------------
|
||||||
|
|
||||||
|
This seems redundant, since if you're reading this you most likely have
|
||||||
|
already performed this step; however, for completeness, you can obtain the GNU
|
||||||
|
make source code via Git from the FSF's Savannah project
|
||||||
|
<http://savannah.gnu.org/projects/make/>:
|
||||||
|
|
||||||
|
$ git clone git://git.savannah.gnu.org/make.git
|
||||||
|
|
||||||
|
|
||||||
|
Changes using Git
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
For non-developers, you can continue to provide patches as before, or if you
|
||||||
|
make a public repository I can pull from that if you prefer.
|
||||||
|
|
||||||
|
Starting with GNU make 4.0 we no longer keep a separate ChangeLog file in
|
||||||
|
source control. We use the Gnulib git-to-changelog conversion script to
|
||||||
|
convert the Git comments into ChangeLog-style entries for release. As a
|
||||||
|
result, please format your Git comments carefully so they will look clean
|
||||||
|
after conversion. In particular, each line of your comment will have a TAB
|
||||||
|
added before it so be sure your comment lines are not longer than 72
|
||||||
|
characters; prefer 70 or less. Please use standard ChangeLog formats for
|
||||||
|
your commit messages (sans the leading TAB of course).
|
||||||
|
|
||||||
|
Rule #1: Don't rewrite pushed history (don't use "git push --force").
|
||||||
|
|
||||||
|
Typical simple workflow might be:
|
||||||
|
|
||||||
|
* Edit files
|
||||||
|
* Use "git status" and "git diff" to verify your changes
|
||||||
|
* Use "git add" to stage the changes you want to make
|
||||||
|
* Use "git commit" to commit the staged changes to your local repository
|
||||||
|
* Use "git pull" to accept & merge new changes from the Savannah repository
|
||||||
|
* Use "git push" to push your commits back to the Savannah repository
|
||||||
|
|
||||||
|
For Emacs users, there are many options for Git integration but I strongly
|
||||||
|
recommend the Magit package: http://www.emacswiki.org/emacs/Magit
|
||||||
|
It makes the workflow much clearer, and has advanced features such as
|
||||||
|
constructing multiple commits from various files and even from different
|
||||||
|
diff chunks in the same file. There is a video available which helps a lot.
|
||||||
|
|
||||||
|
|
||||||
|
Coding Standards
|
||||||
|
----------------
|
||||||
|
|
||||||
|
GNU make code adheres to the GNU Coding Standards. Please use only spaces and
|
||||||
|
no TAB characters in source code.
|
||||||
|
|
||||||
|
Additionally, GNU make is a foundational bootstrap package for the GNU
|
||||||
|
project; as such it is very conservative about language features it expects.
|
||||||
|
It should build with any C compiler conforming to the ANSI C89 / ISO C90
|
||||||
|
standard.
|
||||||
|
|
||||||
|
|
||||||
|
Building From Git
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
To build GNU make from Git, you will need Autoconf, Automake, and
|
||||||
|
Gettext, and any tools that those utilities require (GNU m4, Perl,
|
||||||
|
etc.). See the configure.ac file to find the minimum versions of each
|
||||||
|
of these tools. You will also need a copy of wget and gnulib.
|
||||||
|
|
||||||
|
When building from Git you must build in the source directory: "VPATH
|
||||||
|
builds" from remote directories are not supported. Once you've created
|
||||||
|
a distribution, of course, you can unpack it and do a VPATH build from
|
||||||
|
there.
|
||||||
|
|
||||||
|
After checking out the code, you will need to perform these steps to get
|
||||||
|
to the point where you can run "make".
|
||||||
|
|
||||||
|
1) $ autoreconf -i
|
||||||
|
|
||||||
|
This rebuilds all the things that need rebuilding, installing
|
||||||
|
missing files as symbolic links.
|
||||||
|
|
||||||
|
You may get warnings here about missing files like README, etc.
|
||||||
|
Ignore them, they are harmless.
|
||||||
|
|
||||||
|
2) $ ./configure
|
||||||
|
|
||||||
|
Generate a Makefile
|
||||||
|
|
||||||
|
3) $ make update
|
||||||
|
|
||||||
|
Use wget to retrieve various other files that GNU make relies on,
|
||||||
|
but does not keep in its own source tree.
|
||||||
|
|
||||||
|
NB: You may need GNU make to correctly perform this step; if you use
|
||||||
|
a platform-local make you may get problems with missing files in doc/.
|
||||||
|
|
||||||
|
At this point you have successfully brought your Git copy of the GNU
|
||||||
|
make source directory up to the point where it can be treated
|
||||||
|
more-or-less like the official package you would get from ftp.gnu.org.
|
||||||
|
That is, you can just run:
|
||||||
|
|
||||||
|
$ make && make check && make install
|
||||||
|
|
||||||
|
to build and install GNU make.
|
||||||
|
|
||||||
|
|
||||||
|
Windows builds from Git
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
If you have a UNIX emulation like CYGWIN you can opt to run the general
|
||||||
|
build procedure above; it will work. Be sure to read
|
||||||
|
README.W32.template for information on options you might want to use
|
||||||
|
when running ./configure.
|
||||||
|
|
||||||
|
If you can't or don't want to do that, then rename the file
|
||||||
|
README.W32.template to README.W32 and follow those instructions.
|
||||||
|
|
||||||
|
|
||||||
|
Creating a Package
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Once you have performed the above steps (including the configuration and
|
||||||
|
build) you can create a GNU make package. This is very simple, just
|
||||||
|
run:
|
||||||
|
|
||||||
|
$ make dist-gzip
|
||||||
|
|
||||||
|
and, if you like:
|
||||||
|
|
||||||
|
$ make dist-bzip2
|
||||||
|
|
||||||
|
Even better, you should run this:
|
||||||
|
|
||||||
|
$ make distcheck
|
||||||
|
|
||||||
|
Which will build both .gz and .bz2 package files, then unpack them into
|
||||||
|
a temporary location, try to build them, and repack them, verifying that
|
||||||
|
everything works, you get the same results, _and_ no extraneous files
|
||||||
|
are left over after the "distclean" rule--whew!! Now, _that_ is why
|
||||||
|
converting to Automake is worth the trouble! A big "huzzah!" to Tom
|
||||||
|
T. and the AutoToolers!
|
||||||
|
|
||||||
|
|
||||||
|
Steps to Release
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Here are the things that need to be done (in more or less this order)
|
||||||
|
before making an official release. If something breaks such that you need to
|
||||||
|
change code, be sure to start over again sufficiently that everything is
|
||||||
|
consistent (that's why we don't finalize the Git tag, etc. until the end).
|
||||||
|
|
||||||
|
* Update the configure.ac file with the new release number.
|
||||||
|
* Update the EDITION value in the doc/make.texi file.
|
||||||
|
* Update the NEWS file with the release number and date.
|
||||||
|
* Ensure the Savannah bug list URL in the NEWS file uses the correct
|
||||||
|
"Fixed Release" ID number.
|
||||||
|
* Run "make distcheck" to be sure it all works.
|
||||||
|
* Run "make check-alt-config" to be sure alternative configurations work
|
||||||
|
* Run "make update-makeweb" to get a copy of the GNU make web pages
|
||||||
|
* Run "make update-gnuweb" to get a copy of the GNU website boilerplate pages
|
||||||
|
* Update the web page boilerplate if necessary:
|
||||||
|
../gnu-www/www/server/standards/patch-from-parent ../make-web/make.html \
|
||||||
|
../gnu-www/www/server/standards/boilerplate.html
|
||||||
|
* Run "make gendocs" (requires gnulib) to generate the manual files for
|
||||||
|
the GNU make web pages.
|
||||||
|
* Follow the directions from gendocs for the web page repository
|
||||||
|
* run "make tag-release" to create a Git tag for the release
|
||||||
|
* Push everything:
|
||||||
|
git push --tags origin master
|
||||||
|
|
||||||
|
Manage the Savannah project for GNU make:
|
||||||
|
|
||||||
|
>>> This is only for real releases, not release candidate builds <<<
|
||||||
|
|
||||||
|
* In Savannah modify the "Value", "Rank", and "Description" values for the
|
||||||
|
current "SCM" entry in both "Component Version" and "Fix Release" fields
|
||||||
|
to refer to the new release. The "Rank" field should be 10 less than the
|
||||||
|
previous release so it orders properly.
|
||||||
|
* In Savannah create a new entry for the "Component Version" and "Fix
|
||||||
|
Release" fields:
|
||||||
|
- Value: SCM
|
||||||
|
- Rank: 20
|
||||||
|
- Descr: Issues found in code retrieved from Source Code Management (Git), rather than a distributed version. Please include the SHA you are working with.
|
||||||
|
|
||||||
|
- Descr: Fixed in Source Code Management (Git). The fix will be included in the next release of GNU make.
|
||||||
|
|
||||||
|
Start the next release:
|
||||||
|
|
||||||
|
* Update configure.ac and add a ".90" to the release number.
|
||||||
|
* Update the NEWS file with a new section for the release / date.
|
||||||
|
* Update the Savannah URL for the bugs fixed in the NEWS section.
|
||||||
|
|
||||||
|
|
||||||
|
Publishing a Package
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
In order to publish a package on the FSF FTP site, either the release
|
||||||
|
site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
|
||||||
|
first need to have my GPG private key and my passphrase to unlock it.
|
||||||
|
And, you can't have them! So there! But, just so I remember here's
|
||||||
|
what to do:
|
||||||
|
|
||||||
|
Make sure the "Steps to Release" are complete and committed and tagged.
|
||||||
|
|
||||||
|
git clone git://git.savannah.gnu.org/make.git make-release
|
||||||
|
|
||||||
|
cd make-release
|
||||||
|
|
||||||
|
<run the commands above to build the release>
|
||||||
|
|
||||||
|
make upload-alpha # for alpha.gnu.org (pre-releases)
|
||||||
|
-OR-
|
||||||
|
make upload-ftp # for ftp.gnu.org (official releases)
|
||||||
|
|
||||||
|
Depending on your distribution (whether GnuPG is integrated with your keyring
|
||||||
|
etc.) it will either pop up a window asking for your GPG key passphrase one
|
||||||
|
time, or else it will use the CLI to ask for the GPG passphrase _THREE_ times.
|
||||||
|
Sigh.
|
||||||
|
|
||||||
|
|
||||||
|
For both final releases and pre-releases, send an email with the URL of
|
||||||
|
the package to the GNU translation robot to allow the translators to
|
||||||
|
work on it:
|
||||||
|
|
||||||
|
<coordinator@translationproject.org>
|
||||||
|
|
||||||
|
|
||||||
|
Where to Announce
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Create the announcement in a text file, then sign it with GPG.
|
||||||
|
|
||||||
|
gpg --clearsign <announcement.txt>
|
||||||
|
|
||||||
|
Or, use your mail client's PGP/GPG signing capabilities.
|
||||||
|
|
||||||
|
Announce the release:
|
||||||
|
|
||||||
|
* For release candidate builds:
|
||||||
|
To: bug-make@gnu.org
|
||||||
|
CC: coordinator@translationproject.org
|
||||||
|
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||||
|
|
||||||
|
* For release builds
|
||||||
|
To: info-gnu@gnu.org, bug-make@gnu.org
|
||||||
|
CC: coordinator@translationproject.org
|
||||||
|
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||||
|
|
||||||
|
* Add a news item to the Savannah project site.
|
||||||
|
* Add an update to freecode.com (nee freshmeat.net)
|
||||||
|
|
||||||
|
|
||||||
|
Appendix A - For The Brave
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
For those of you who trust me implicitly, or are just brave (or
|
||||||
|
foolhardy), here is a canned sequence of commands to build a GNU make
|
||||||
|
distribution package from a virgin Git source checkout (assuming all the
|
||||||
|
prerequisites are available of course).
|
||||||
|
|
||||||
|
This list is eminently suitable for a quick swipe o' the mouse and a
|
||||||
|
swift click o' mouse-2 into an xterm. Go for it!
|
||||||
|
|
||||||
|
autoreconf -i
|
||||||
|
./configure
|
||||||
|
make update
|
||||||
|
make
|
||||||
|
make check
|
||||||
|
|
||||||
|
Or, for a debugging version:
|
||||||
|
|
||||||
|
autoreconf -i && ./configure CFLAGS=-g && make update && make && make check
|
||||||
|
|
||||||
|
Or, all-in-one:
|
||||||
|
|
||||||
|
autoreconf -i && ./configure && make update && make && make check
|
||||||
@@ -8,20 +8,22 @@ your operating system.
|
|||||||
|
|
||||||
For general building and installation instructions, see the file INSTALL.
|
For general building and installation instructions, see the file INSTALL.
|
||||||
|
|
||||||
If you need to build GNU Make and have no other `make' program to use,
|
If you need to build GNU Make and have no other 'make' program to use,
|
||||||
you can use the shell script `build.sh' instead. To do this, first run
|
you can use the shell script 'build.sh' instead. To do this, first run
|
||||||
`configure' as described in INSTALL. Then, instead of typing `make' to
|
'configure' as described in INSTALL. Then, instead of typing 'make' to
|
||||||
build the program, type `sh build.sh'. This should compile the program
|
build the program, type 'sh build.sh'. This should compile the program
|
||||||
in the current directory. Then you will have a Make program that you can
|
in the current directory. Then you will have a Make program that you can
|
||||||
use for `./make install', or whatever else.
|
use for './make install', or whatever else.
|
||||||
|
|
||||||
Some systems' Make programs are broken and cannot process the Makefile for
|
Some systems' Make programs are broken and cannot process the Makefile for
|
||||||
GNU Make. If you get errors from your system's Make when building GNU
|
GNU Make. If you get errors from your system's Make when building GNU
|
||||||
Make, try using `build.sh' instead.
|
Make, try using 'build.sh' instead.
|
||||||
|
|
||||||
|
|
||||||
GNU Make is free software. See the file COPYING for copying conditions.
|
GNU Make is free software. See the file COPYING for copying conditions.
|
||||||
|
GNU Make is copyright by the Free Software Foundation. Copyright notices
|
||||||
|
condense sequential years into a range; e.g. "1987-1994" means all years
|
||||||
|
from 1987 to 1994 inclusive.
|
||||||
|
|
||||||
Downloading
|
Downloading
|
||||||
-----------
|
-----------
|
||||||
@@ -64,13 +66,13 @@ Bug Reporting
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
You can send GNU make bug reports to <bug-make@gnu.org>. Please see the
|
You can send GNU make bug reports to <bug-make@gnu.org>. Please see the
|
||||||
section of the GNU make manual entitled `Problems and Bugs' for
|
section of the GNU make manual entitled 'Problems and Bugs' for
|
||||||
information on submitting useful and complete bug reports.
|
information on submitting useful and complete bug reports.
|
||||||
|
|
||||||
You can also use the online bug tracking system in the Savannah GNU Make
|
You can also use the online bug tracking system in the Savannah GNU Make
|
||||||
project to submit new problem reports or search for existing ones:
|
project to submit new problem reports or search for existing ones:
|
||||||
|
|
||||||
http://savannah.gnu.org/bugs/?group_id=71
|
http://savannah.gnu.org/bugs/?group=make
|
||||||
|
|
||||||
If you need help using GNU make, try these forums:
|
If you need help using GNU make, try these forums:
|
||||||
|
|
||||||
@@ -79,31 +81,20 @@ If you need help using GNU make, try these forums:
|
|||||||
news:gnu.utils.help
|
news:gnu.utils.help
|
||||||
news:gnu.utils.bug
|
news:gnu.utils.bug
|
||||||
|
|
||||||
http://savannah.gnu.org/support/?group_id=71
|
|
||||||
|
|
||||||
You may also find interesting patches to GNU Make available here:
|
Git Access
|
||||||
|
|
||||||
http://savannah.gnu.org/patch/?group_id=71
|
|
||||||
|
|
||||||
Note these patches are provided by our users as a service and we make no
|
|
||||||
statements regarding their correctness. Please contact the authors
|
|
||||||
directly if you have a problem or suggestion for a patch available on
|
|
||||||
this page.
|
|
||||||
|
|
||||||
|
|
||||||
CVS Access
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The GNU make source repository is available via anonymous CVS from the
|
The GNU make source repository is available via Git from the
|
||||||
GNU Subversions CVS server; look here for details:
|
GNU Savannah Git server; look here for details:
|
||||||
|
|
||||||
http://savannah.gnu.org/cvs/?group_id=71
|
http://savannah.gnu.org/git/?group=make
|
||||||
|
|
||||||
Please note: you won't be able to build GNU make from CVS without
|
Please note: you won't be able to build GNU make from Git without
|
||||||
installing appropriate maintainer's tools, such as GNU m4, automake,
|
installing appropriate maintainer's tools, such as GNU m4, automake,
|
||||||
autoconf, Perl, GNU make, and GCC. See the README.cvs file for hints on
|
autoconf, Perl, GNU make, and GCC. See the README.git file for hints on
|
||||||
how to build GNU make once these tools are available. We make no
|
how to build GNU make once these tools are available. We make no
|
||||||
guarantees about the contents or quality of the latest code in the CVS
|
guarantees about the contents or quality of the latest code in the Git
|
||||||
repository: it is not unheard of for code that is known to be broken to
|
repository: it is not unheard of for code that is known to be broken to
|
||||||
be checked in. Use at your own risk.
|
be checked in. Use at your own risk.
|
||||||
|
|
||||||
@@ -112,20 +103,26 @@ System-specific Notes
|
|||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
||||||
that if you compile make with `cc -O' on AIX 3.2, it will not work correctly.
|
that if you compile make with 'cc -O' on AIX 3.2, it will not work
|
||||||
It is said that using `cc' without `-O' does work.
|
correctly. It is said that using 'cc' without '-O' does work.
|
||||||
|
|
||||||
|
The standard /bin/sh on SunOS 4.1.3_U1 and 4.1.4 is broken and cannot be
|
||||||
|
used to configure GNU make. Please install a different shell such as
|
||||||
|
bash or pdksh in order to run "configure". See this message for more
|
||||||
|
information:
|
||||||
|
http://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00190.html
|
||||||
|
|
||||||
One area that is often a problem in configuration and porting is the code
|
One area that is often a problem in configuration and porting is the code
|
||||||
to check the system's current load average. To make it easier to test and
|
to check the system's current load average. To make it easier to test and
|
||||||
debug this code, you can do `make check-loadavg' to see if it works
|
debug this code, you can do 'make check-loadavg' to see if it works
|
||||||
properly on your system. (You must run `configure' beforehand, but you
|
properly on your system. (You must run 'configure' beforehand, but you
|
||||||
need not build Make itself to run this test.)
|
need not build Make itself to run this test.)
|
||||||
|
|
||||||
Another potential source of porting problems is the support for large
|
Another potential source of porting problems is the support for large
|
||||||
files (LFS) in configure for those operating systems that provide it.
|
files (LFS) in configure for those operating systems that provide it.
|
||||||
Please report any bugs that you find in this area. If you run into
|
Please report any bugs that you find in this area. If you run into
|
||||||
difficulties, then as a workaround you should be able to disable LFS by
|
difficulties, then as a workaround you should be able to disable LFS by
|
||||||
adding the `--disable-largefile' option to the `configure' script.
|
adding the '--disable-largefile' option to the 'configure' script.
|
||||||
|
|
||||||
On systems that support micro- and nano-second timestamp values and
|
On systems that support micro- and nano-second timestamp values and
|
||||||
where stat(2) provides this information, GNU make will use it when
|
where stat(2) provides this information, GNU make will use it when
|
||||||
@@ -145,7 +142,7 @@ Ports
|
|||||||
- See README.customs for details on integrating GNU make with the
|
- See README.customs for details on integrating GNU make with the
|
||||||
Customs distributed build environment from the Pmake distribution.
|
Customs distributed build environment from the Pmake distribution.
|
||||||
|
|
||||||
- See readme.vms for details about GNU Make on OpenVMS.
|
- See README.VMS for details about GNU Make on OpenVMS.
|
||||||
|
|
||||||
- See README.Amiga for details about GNU Make on AmigaDOS.
|
- See README.Amiga for details about GNU Make on AmigaDOS.
|
||||||
|
|
||||||
@@ -162,3 +159,20 @@ Please note there are two _separate_ ports of GNU make for Microsoft
|
|||||||
systems: a native Windows tool built with (for example) MSVC or Cygwin,
|
systems: a native Windows tool built with (for example) MSVC or Cygwin,
|
||||||
and a DOS-based tool built with DJGPP. Please be sure you are looking
|
and a DOS-based tool built with DJGPP. Please be sure you are looking
|
||||||
at the right README!
|
at the right README!
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
# -*-Makefile-*- for building GNU make with smake
|
||||||
# `build.sh' instead.
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
# NOTE: If you have no 'make' program at all to process this makefile,
|
||||||
|
# run 'build.sh' instead.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
# Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile for GNU Make
|
# Makefile for GNU Make
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||||
VPATH = /make-%VERSION%/
|
VPATH = /make-%VERSION%/
|
||||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
# This must repeat the value, because configure will remove 'VPATH = .'.
|
||||||
srcdir = /make-%VERSION%/
|
srcdir = /make-%VERSION%/
|
||||||
|
|
||||||
CC = sc
|
CC = sc
|
||||||
@@ -37,18 +37,18 @@ CPPFLAGS =
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Define these for your system as follows:
|
# Define these for your system as follows:
|
||||||
# -DNO_ARCHIVES To disable `ar' archive support.
|
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||||
# Some compilers apparently accept this
|
# Some compilers apparently accept this
|
||||||
# without complaint but produce losing code,
|
# without complaint but produce losing code,
|
||||||
# so beware.
|
# so beware.
|
||||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||||
# See also `config.h'.
|
# See also 'config.h'.
|
||||||
defines =
|
defines =
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
# Which flavor of remote job execution support to use.
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
# The code is found in 'remote-$(REMOTE).c'.
|
||||||
REMOTE = stub
|
REMOTE = stub
|
||||||
|
|
||||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||||
@@ -82,9 +82,9 @@ prefix =
|
|||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix =
|
exec_prefix =
|
||||||
|
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = sc:c
|
bindir = sc:c
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir = lib:
|
libdir = lib:
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir = include:
|
includedir = include:
|
||||||
@@ -94,20 +94,20 @@ infodir = doc:
|
|||||||
mandir = t:
|
mandir = t:
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
# Prefix to put on installed `make' binary file name.
|
# Prefix to put on installed 'make' binary file name.
|
||||||
binprefix =
|
binprefix =
|
||||||
# Prefix to put on installed `make' man page file name.
|
# Prefix to put on installed 'make' man page file name.
|
||||||
manprefix = $(binprefix)
|
manprefix = $(binprefix)
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
install_setgid = false
|
install_setgid = false
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
# Install make setgid to this group so it can read /dev/kmem.
|
||||||
group = sys
|
group = sys
|
||||||
|
|
||||||
# Program to install `make'.
|
# Program to install 'make'.
|
||||||
INSTALL_PROGRAM = copy
|
INSTALL_PROGRAM = copy
|
||||||
# Program to install the man page.
|
# Program to install the man page.
|
||||||
INSTALL_DATA = copy
|
INSTALL_DATA = copy
|
||||||
@@ -123,21 +123,26 @@ TEXI2DVI = texi2dvi
|
|||||||
ETAGS = etags -w
|
ETAGS = etags -w
|
||||||
CTAGS = ctags -w
|
CTAGS = ctags -w
|
||||||
|
|
||||||
|
#guile = guile.o
|
||||||
|
|
||||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||||
$(GLOB) $(GETOPT) $(ALLOCA) $(extras)
|
output.o remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) \
|
||||||
|
$(extras) $(guile)
|
||||||
|
|
||||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||||
$(srcdir)vpath.c $(srcdir)version.c \
|
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||||
$(srcdir)remote-$(REMOTE).c \
|
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||||
$(srcdir)ar.c $(srcdir)arscan.c \
|
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
|
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
|
||||||
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
|
||||||
|
$(srcdir)output.c $(srcdir)output.h \
|
||||||
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
$(srcdir)variable.h $(ALLOCA_SRC) $(srcdir)config.h.in
|
||||||
|
|
||||||
|
|
||||||
@@ -147,7 +152,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
|||||||
all: make
|
all: make
|
||||||
info: make.info
|
info: make.info
|
||||||
dvi: make.dvi
|
dvi: make.dvi
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||||
.PHONY: all check info dvi
|
.PHONY: all check info dvi
|
||||||
|
|
||||||
make.info: make.texinfo
|
make.info: make.texinfo
|
||||||
|
|||||||
75
TODO.private
75
TODO.private
@@ -6,7 +6,7 @@ This list comes both from the authors and from users of GNU make.
|
|||||||
|
|
||||||
They are listed in no particular order!
|
They are listed in no particular order!
|
||||||
|
|
||||||
Also, I don't gaurantee that all of them will be ultimately deemed "good
|
Also, I don't guarantee that all of them will be ultimately deemed "good
|
||||||
ideas" and implemented. These are just the ones that, at first blush,
|
ideas" and implemented. These are just the ones that, at first blush,
|
||||||
seem to have some merit (and that I can remember).
|
seem to have some merit (and that I can remember).
|
||||||
|
|
||||||
@@ -41,17 +41,13 @@ port the current tests to whatever you do :).
|
|||||||
The Rest of the List
|
The Rest of the List
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
1) Allow variables/functions to expand to other make rules which are
|
1) Option to check more than timestamps to determine if targets have
|
||||||
then interpreted, with newlines handled correctly. This is a
|
|
||||||
biggee, and is on my plate. I already have partially-working code.
|
|
||||||
|
|
||||||
2) Option to check more than timestamps to determine if targets have
|
|
||||||
changed. This is also a very big one. It's _close_ to my plate :),
|
changed. This is also a very big one. It's _close_ to my plate :),
|
||||||
and I have very definite ideas about how I would like it done.
|
and I have very definite ideas about how I would like it done.
|
||||||
Please pick something else unless you must have this feature. If
|
Please pick something else unless you must have this feature. If
|
||||||
you try it, please work _extremely_ closely with me on it.
|
you try it, please work _extremely_ closely with me on it.
|
||||||
|
|
||||||
2a) Possibly a special case of this is the .KEEP_STATE feature of Sun's
|
1a) Possibly a special case of this is the .KEEP_STATE feature of Sun's
|
||||||
make. Some great folks at W U. in Canada did an implementation of
|
make. Some great folks at W U. in Canada did an implementation of
|
||||||
this for a class project. Their approach is reasonable and
|
this for a class project. Their approach is reasonable and
|
||||||
workable, but doesn't really fit into my ideas for #2. Maybe
|
workable, but doesn't really fit into my ideas for #2. Maybe
|
||||||
@@ -60,7 +56,7 @@ The Rest of the List
|
|||||||
|
|
||||||
[K R Praveen <praveen@cair.res.in>]
|
[K R Praveen <praveen@cair.res.in>]
|
||||||
|
|
||||||
3) Currently you can use "%.foo %.bar : %.baz" to mean that one
|
2) Currently you can use "%.foo %.bar : %.baz" to mean that one
|
||||||
invocation of the rule builds both targets. GNU make needs a way to
|
invocation of the rule builds both targets. GNU make needs a way to
|
||||||
do that for explicit rules, too. I heard a rumor that some versions
|
do that for explicit rules, too. I heard a rumor that some versions
|
||||||
of make all you to say "a.foo + a.bar : a.baz" to do this (i.e., a
|
of make all you to say "a.foo + a.bar : a.baz" to do this (i.e., a
|
||||||
@@ -68,25 +64,19 @@ The Rest of the List
|
|||||||
best syntax or not... what if you say "a.foo + a.bar a.bam : a.baz";
|
best syntax or not... what if you say "a.foo + a.bar a.bam : a.baz";
|
||||||
what does that mean?
|
what does that mean?
|
||||||
|
|
||||||
4) Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o,
|
3) Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o,
|
||||||
etc., or something like that). I have an implementation of this
|
etc., or something like that). Maybe using regex?
|
||||||
already, it just needs some refinement... maybe. Additionally I
|
|
||||||
think it only works for static pattern rules; it might need to be
|
|
||||||
fixed up to work with normal pattern rules, too.
|
|
||||||
|
|
||||||
5) More robust clock skew detection algorithm: less false hits. I have
|
4) Provide a .TARGETS variable, containing the names of the targets
|
||||||
some notes on this from various discussions.
|
defined in the makefile.
|
||||||
|
|
||||||
6) Provide MAKETARGETS and MAKEVARIABLES variables, containing the
|
Actually, I now think a $(targets ...) function, at least, might be
|
||||||
names of the targets and variables defined in the makefile.
|
|
||||||
|
|
||||||
Actually, I now think a $(targets ...) function, at least, would be
|
|
||||||
better than a MAKETARGETS variable. The argument would be types of
|
better than a MAKETARGETS variable. The argument would be types of
|
||||||
targets to list: "phony" is the most useful one. I suppose
|
targets to list: "phony" is the most useful one. I suppose
|
||||||
"default" might also be useful. Maybe some others; check the
|
"default" might also be useful. Maybe some others; check the
|
||||||
bitfields to see what might be handy. This one is pretty easy.
|
bitfields to see what might be handy.
|
||||||
|
|
||||||
7) Some sort of operating-system independent way of handling paths
|
5) Some sort of operating-system independent way of handling paths
|
||||||
would be outstanding, so makefiles can be written for UNIX, VMS,
|
would be outstanding, so makefiles can be written for UNIX, VMS,
|
||||||
DOS, MS-Windows, Amiga, etc. with a minimum of specialization.
|
DOS, MS-Windows, Amiga, etc. with a minimum of specialization.
|
||||||
|
|
||||||
@@ -95,18 +85,12 @@ The Rest of the List
|
|||||||
dunno, maybe something like $[...]? This may well not be worth
|
dunno, maybe something like $[...]? This may well not be worth
|
||||||
doing until #1 is done.
|
doing until #1 is done.
|
||||||
|
|
||||||
9) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY
|
6) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY
|
||||||
pseudo-targets have different capabilities. For example, .PRECIOUS
|
pseudo-targets have different capabilities. For example, .PRECIOUS
|
||||||
can take a "%", the others can't. Etc. These should all work the
|
can take a "%", the others can't. Etc. These should all work the
|
||||||
same, insofar as that makes sense.
|
same, insofar as that makes sense.
|
||||||
|
|
||||||
10) A syntax that specifies a build order _without_ implying a
|
7) Improved debugging/logging/etc. capabilities. Part of this is done:
|
||||||
dependency relationship. That is, a way to say "A must be built
|
|
||||||
before B" that doesn't force B to be built when A changes. This is
|
|
||||||
very important for parallel builds: sometimes you need some stuff
|
|
||||||
done first but you don't want to rebuild everything because of it.
|
|
||||||
|
|
||||||
11) Improved debugging/logging/etc. capabilities. Part of this is done:
|
|
||||||
I introduced a number of debugging enhancements. Tim Magill is (I
|
I introduced a number of debugging enhancements. Tim Magill is (I
|
||||||
think) looking into options to control output more selectively.
|
think) looking into options to control output more selectively.
|
||||||
One thing I want to do in debugging is add a flag to allow debugging
|
One thing I want to do in debugging is add a flag to allow debugging
|
||||||
@@ -115,26 +99,19 @@ The Rest of the List
|
|||||||
you just can't figure it out. The way variables are expanded now
|
you just can't figure it out. The way variables are expanded now
|
||||||
means this isn't 100% trivial, but it probably won't be hard.
|
means this isn't 100% trivial, but it probably won't be hard.
|
||||||
|
|
||||||
12) Integration of Guile as an embedded scripting language. This means:
|
|
||||||
allowing Guile functions to be declared in makefiles somehow, then
|
-------------------------------------------------------------------------------
|
||||||
providing a syntax for invoking them. At least one formulation of
|
Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
that would have the function resolve to a string which would be
|
This file is part of GNU Make.
|
||||||
substituted in the makefile, kind of like $(shell ...) does now, but
|
|
||||||
using the embedded interpreter so there's no process forked of
|
|
||||||
course. Obviously this is an optional add-on feature.
|
|
||||||
|
|
||||||
It could be more advanced than that, even, who knows? Maybe make
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
could provide Guile functions that allow Guile scripts more direct
|
terms of the GNU General Public License as published by the Free Software
|
||||||
access to internal make structures, somehow. This kind of thing
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
needs a lot of thought.
|
version.
|
||||||
|
|
||||||
Also there's always the flip side: in some very fundamental ways
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
make isn't the best choice right now for a complex build tool. It's
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
great for simple-to-medium tasks, but there are already other tools
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
available for the really tough situations. Ask yourself,
|
|
||||||
realistically, how much work is worthwhile to add to make, given the
|
|
||||||
fundamentals you can't really overcome without significantly
|
|
||||||
affecting backward compatibility--and then why not use another tool
|
|
||||||
in the first place?
|
|
||||||
|
|
||||||
Something to think about.
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
94
acinclude.m4
94
acinclude.m4
@@ -1,6 +1,21 @@
|
|||||||
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
||||||
dnl
|
dnl
|
||||||
dnl Automake will incorporate this into its generated aclocal.m4.
|
dnl Automake will incorporate this into its generated aclocal.m4.
|
||||||
|
dnl Copyright (C) 1998-2016 Free Software Foundation, Inc.
|
||||||
|
dnl This file is part of GNU Make.
|
||||||
|
dnl
|
||||||
|
dnl GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
dnl the terms of the GNU General Public License as published by the Free
|
||||||
|
dnl Software Foundation; either version 3 of the License, or (at your option)
|
||||||
|
dnl any later version.
|
||||||
|
dnl
|
||||||
|
dnl GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||||
|
dnl more details.
|
||||||
|
dnl
|
||||||
|
dnl You should have received a copy of the GNU General Public License along
|
||||||
|
dnl with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Got this from the lynx 2.8 distribution.
|
dnl Got this from the lynx 2.8 distribution.
|
||||||
@@ -43,9 +58,6 @@ fi
|
|||||||
#
|
#
|
||||||
AC_CHECK_FUNCS(gethostbyname,,[
|
AC_CHECK_FUNCS(gethostbyname,,[
|
||||||
CF_RECHECK_FUNC(gethostbyname,nsl,cf_cv_netlibs)])
|
CF_RECHECK_FUNC(gethostbyname,nsl,cf_cv_netlibs)])
|
||||||
#
|
|
||||||
AC_CHECK_FUNCS(strcasecmp,,[
|
|
||||||
CF_RECHECK_FUNC(strcasecmp,resolv,cf_cv_netlibs)])
|
|
||||||
])
|
])
|
||||||
LIBS="$LIBS $cf_cv_netlibs"
|
LIBS="$LIBS $cf_cv_netlibs"
|
||||||
test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&AC_FD_MSG
|
test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&AC_FD_MSG
|
||||||
@@ -87,78 +99,34 @@ changequote([,])dnl
|
|||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl From Paul Eggert <eggert@twinsun.com>
|
dnl From Paul Eggert <eggert@twinsun.com>
|
||||||
|
dnl Update for Darwin by Troy Runkel <Troy.Runkel@mathworks.com>
|
||||||
|
dnl Update for AIX by Olexiy Buyanskyy (Savannah bug 32485)
|
||||||
|
|
||||||
AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC,
|
AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
|
||||||
[AC_CACHE_CHECK([for nanoseconds field of struct stat.st_mtim],
|
[AC_CACHE_CHECK([for nanoseconds field of struct stat],
|
||||||
ac_cv_struct_st_mtim_nsec,
|
ac_cv_struct_st_mtim_nsec,
|
||||||
[ac_save_CPPFLAGS="$CPPFLAGS"
|
[ac_save_CPPFLAGS="$CPPFLAGS"
|
||||||
ac_cv_struct_st_mtim_nsec=no
|
ac_cv_struct_st_mtim_nsec=no
|
||||||
# tv_nsec -- the usual case
|
# st_mtim.tv_nsec -- the usual case
|
||||||
# _tv_nsec -- Solaris 2.6, if
|
# st_mtim._tv_nsec -- Solaris 2.6, if
|
||||||
# (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
|
# (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
|
||||||
# && !defined __EXTENSIONS__)
|
# && !defined __EXTENSIONS__)
|
||||||
# st__tim.tv_nsec -- UnixWare 2.1.2
|
# st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
|
||||||
for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
|
# st_mtime_n -- AIX 5.2 and above
|
||||||
|
# st_mtimespec.tv_nsec -- Darwin (Mac OSX)
|
||||||
|
for ac_val in st_mtim.tv_nsec st_mtim._tv_nsec st_mtim.st__tim.tv_nsec st_mtime_n st_mtimespec.tv_nsec; do
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
|
CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
|
||||||
AC_TRY_COMPILE([#include <sys/types.h>
|
AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
#include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
|
#include <sys/stat.h>
|
||||||
|
], [struct stat s; s.ST_MTIM_NSEC;],
|
||||||
[ac_cv_struct_st_mtim_nsec=$ac_val; break])
|
[ac_cv_struct_st_mtim_nsec=$ac_val; break])
|
||||||
done
|
done
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS"])
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
|
])
|
||||||
|
|
||||||
if test $ac_cv_struct_st_mtim_nsec != no; then
|
if test $ac_cv_struct_st_mtim_nsec != no; then
|
||||||
AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, [Define if 'struct stat' contains a nanoseconds field])
|
AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec],
|
||||||
|
[Define if struct stat contains a nanoseconds field])
|
||||||
fi
|
fi
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
|
||||||
dnl This will be in the next version of autoconf; take this out then!
|
|
||||||
|
|
||||||
# make_FUNC_SETVBUF_REVERSED
|
|
||||||
# ------------------------
|
|
||||||
AC_DEFUN([make_FUNC_SETVBUF_REVERSED],
|
|
||||||
[AC_REQUIRE([AC_C_PROTOTYPES])dnl
|
|
||||||
AC_CACHE_CHECK(whether setvbuf arguments are reversed,
|
|
||||||
ac_cv_func_setvbuf_reversed,
|
|
||||||
[ac_cv_func_setvbuf_reversed=no
|
|
||||||
AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[#include <stdio.h>
|
|
||||||
# if PROTOTYPES
|
|
||||||
int (setvbuf) (FILE *, int, char *, size_t);
|
|
||||||
# endif]],
|
|
||||||
[[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])],
|
|
||||||
[AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[#include <stdio.h>
|
|
||||||
# if PROTOTYPES
|
|
||||||
int (setvbuf) (FILE *, int, char *, size_t);
|
|
||||||
# endif]],
|
|
||||||
[[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])],
|
|
||||||
[# It compiles and links either way, so it must not be declared
|
|
||||||
# with a prototype and most likely this is a K&R C compiler.
|
|
||||||
# Try running it.
|
|
||||||
AC_RUN_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[#include <stdio.h>]],
|
|
||||||
[[/* This call has the arguments reversed.
|
|
||||||
A reversed system may check and see that the address of buf
|
|
||||||
is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
|
|
||||||
char buf;
|
|
||||||
if (setvbuf (stdout, _IOLBF, &buf, 1) != 0)
|
|
||||||
exit (1);
|
|
||||||
putchar ('\r');
|
|
||||||
exit (0); /* Non-reversed systems SEGV here. */]])],
|
|
||||||
ac_cv_func_setvbuf_reversed=yes,
|
|
||||||
rm -f core core.* *.core,
|
|
||||||
[[: # Assume setvbuf is not reversed when cross-compiling.]])]
|
|
||||||
ac_cv_func_setvbuf_reversed=yes)])])
|
|
||||||
if test $ac_cv_func_setvbuf_reversed = yes; then
|
|
||||||
AC_DEFINE(SETVBUF_REVERSED, 1,
|
|
||||||
[Define to 1 if the `setvbuf' function takes the buffering type as
|
|
||||||
its second argument and the buffer pointer as the third, as on
|
|
||||||
System V before release 3.])
|
|
||||||
fi
|
|
||||||
])# make_FUNC_SETVBUF_REVERSED
|
|
||||||
|
|||||||
7
alloca.c
7
alloca.c
@@ -114,9 +114,9 @@ static int stack_dir; /* 1 or -1 once known. */
|
|||||||
#define STACK_DIR stack_dir
|
#define STACK_DIR stack_dir
|
||||||
|
|
||||||
static void
|
static void
|
||||||
find_stack_direction ()
|
find_stack_direction (void)
|
||||||
{
|
{
|
||||||
static char *addr = NULL; /* Address of first `dummy', once known. */
|
static char *addr = NULL; /* Address of first 'dummy', once known. */
|
||||||
auto char dummy; /* To get stack address. */
|
auto char dummy; /* To get stack address. */
|
||||||
|
|
||||||
if (addr == NULL)
|
if (addr == NULL)
|
||||||
@@ -168,8 +168,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
|
|||||||
implementations of C, for example under Gould's UTX/32. */
|
implementations of C, for example under Gould's UTX/32. */
|
||||||
|
|
||||||
pointer
|
pointer
|
||||||
alloca (size)
|
alloca (unsigned size)
|
||||||
unsigned size;
|
|
||||||
{
|
{
|
||||||
auto char probe; /* Probes stack depth: */
|
auto char probe; /* Probes stack depth: */
|
||||||
register char *depth = ADDRESS_FUNCTION (probe);
|
register char *depth = ADDRESS_FUNCTION (probe);
|
||||||
|
|||||||
36
amiga.c
36
amiga.c
@@ -1,23 +1,20 @@
|
|||||||
/* Running commands on Amiga
|
/* Running commands on Amiga
|
||||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
||||||
MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "amiga.h"
|
#include "amiga.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -30,8 +27,7 @@ static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n"
|
|||||||
"Amiga Port by A. Digulla (digulla@home.lake.de)";
|
"Amiga Port by A. Digulla (digulla@home.lake.de)";
|
||||||
|
|
||||||
int
|
int
|
||||||
MyExecute (argv)
|
MyExecute (char **argv)
|
||||||
char ** argv;
|
|
||||||
{
|
{
|
||||||
char * buffer, * ptr;
|
char * buffer, * ptr;
|
||||||
char ** aptr;
|
char ** aptr;
|
||||||
@@ -46,7 +42,7 @@ char ** argv;
|
|||||||
buffer = AllocMem (len, MEMF_ANY);
|
buffer = AllocMem (len, MEMF_ANY);
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
fatal (NILF, "MyExecute: Cannot allocate space for calling a command");
|
O (fatal, NILF, "MyExecute: Cannot allocate space for calling a command\n");
|
||||||
|
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
|
|
||||||
@@ -81,7 +77,7 @@ char ** argv;
|
|||||||
|
|
||||||
FreeMem (buffer, len);
|
FreeMem (buffer, len);
|
||||||
|
|
||||||
if (SetSignal(0L,0L) & SIGBREAKF_CTRL_C)
|
if (SetSignal (0L,0L) & SIGBREAKF_CTRL_C)
|
||||||
status = 20;
|
status = 20;
|
||||||
|
|
||||||
/* Warnings don't count */
|
/* Warnings don't count */
|
||||||
@@ -92,8 +88,7 @@ char ** argv;
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
wildcard_expansion (wc, o)
|
wildcard_expansion (char *wc, char *o)
|
||||||
char * wc, * o;
|
|
||||||
{
|
{
|
||||||
# define PATH_SIZE 1024
|
# define PATH_SIZE 1024
|
||||||
struct AnchorPath * apath;
|
struct AnchorPath * apath;
|
||||||
@@ -120,4 +115,3 @@ char * wc, * o;
|
|||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
28
amiga.h
28
amiga.h
@@ -1,22 +1,18 @@
|
|||||||
/* Definitions for amiga specific things
|
/* Definitions for amiga specific things
|
||||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
||||||
MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
extern int MyExecute PARAMS ((char ** argv));
|
|
||||||
extern char * wildcard_expansion PARAMS ((char * wc, char * o));
|
|
||||||
|
|
||||||
|
int MyExecute (char ** argv);
|
||||||
|
char * wildcard_expansion (char * wc, char * o);
|
||||||
|
|||||||
257
ar.c
257
ar.c
@@ -1,24 +1,21 @@
|
|||||||
/* Interface to `ar' archives for GNU Make.
|
/* Interface to 'ar' archives for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
2002 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
|
|
||||||
@@ -26,67 +23,68 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
|
|
||||||
/* Defined in arscan.c. */
|
/* Return nonzero if NAME is an archive-member reference, zero if not. An
|
||||||
extern long int ar_scan PARAMS ((char *archive, long int (*function) (), long int arg));
|
archive-member reference is a name like 'lib(member)' where member is a
|
||||||
extern int ar_name_equal PARAMS ((char *name, char *mem, int truncated));
|
non-empty string.
|
||||||
#ifndef VMS
|
If a name like 'lib((entry))' is used, a fatal error is signaled at
|
||||||
extern int ar_member_touch PARAMS ((char *arname, char *memname));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Return nonzero if NAME is an archive-member reference, zero if not.
|
|
||||||
An archive-member reference is a name like `lib(member)'.
|
|
||||||
If a name like `lib((entry))' is used, a fatal error is signaled at
|
|
||||||
the attempt to use this unsupported feature. */
|
the attempt to use this unsupported feature. */
|
||||||
|
|
||||||
int
|
int
|
||||||
ar_name (name)
|
ar_name (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
char *p = strchr (name, '(');
|
const char *p = strchr (name, '(');
|
||||||
char *end;
|
const char *end;
|
||||||
|
|
||||||
if (p == 0 || p == name)
|
if (p == 0 || p == name)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
end = p + strlen (p) - 1;
|
end = p + strlen (p) - 1;
|
||||||
if (*end != ')')
|
if (*end != ')' || end == p + 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (p[1] == '(' && end[-1] == ')')
|
if (p[1] == '(' && end[-1] == ')')
|
||||||
fatal (NILF, _("attempt to use unsupported feature: `%s'"), name);
|
OS (fatal, NILF, _("attempt to use unsupported feature: '%s'"), name);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Parse the archive-member reference NAME into the archive and member names.
|
/* Parse the archive-member reference NAME into the archive and member names.
|
||||||
Put the malloc'd archive name in *ARNAME_P if ARNAME_P is non-nil;
|
Creates one allocated string containing both names, pointed to by ARNAME_P.
|
||||||
put the malloc'd member name in *MEMNAME_P if MEMNAME_P is non-nil. */
|
MEMNAME_P points to the member. */
|
||||||
|
|
||||||
void
|
void
|
||||||
ar_parse_name (name, arname_p, memname_p)
|
ar_parse_name (const char *name, char **arname_p, char **memname_p)
|
||||||
char *name, **arname_p, **memname_p;
|
|
||||||
{
|
{
|
||||||
char *p = strchr (name, '('), *end = name + strlen (name) - 1;
|
char *p;
|
||||||
|
|
||||||
if (arname_p != 0)
|
*arname_p = xstrdup (name);
|
||||||
*arname_p = savestring (name, p - name);
|
p = strchr (*arname_p, '(');
|
||||||
|
*(p++) = '\0';
|
||||||
if (memname_p != 0)
|
p[strlen (p) - 1] = '\0';
|
||||||
*memname_p = savestring (p + 1, end - (p + 1));
|
*memname_p = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long int ar_member_date_1 PARAMS ((int desc, char *mem, int truncated, long int hdrpos,
|
|
||||||
long int datapos, long int size, long int date, int uid, int gid, int mode, char *name));
|
/* This function is called by 'ar_scan' to find which member to look at. */
|
||||||
|
|
||||||
|
/* ARGSUSED */
|
||||||
|
static long int
|
||||||
|
ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
|
||||||
|
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||||
|
long int size UNUSED, long int date,
|
||||||
|
int uid UNUSED, int gid UNUSED, int mode UNUSED,
|
||||||
|
const void *name)
|
||||||
|
{
|
||||||
|
return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Return the modtime of NAME. */
|
/* Return the modtime of NAME. */
|
||||||
|
|
||||||
time_t
|
time_t
|
||||||
ar_member_date (name)
|
ar_member_date (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
char *arname;
|
char *arname;
|
||||||
int arname_used = 0;
|
|
||||||
char *memname;
|
char *memname;
|
||||||
long int val;
|
long int val;
|
||||||
|
|
||||||
@@ -103,137 +101,118 @@ ar_member_date (name)
|
|||||||
struct file *arfile;
|
struct file *arfile;
|
||||||
arfile = lookup_file (arname);
|
arfile = lookup_file (arname);
|
||||||
if (arfile == 0 && file_exists_p (arname))
|
if (arfile == 0 && file_exists_p (arname))
|
||||||
{
|
arfile = enter_file (strcache_add (arname));
|
||||||
arfile = enter_file (arname);
|
|
||||||
arname_used = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (arfile != 0)
|
if (arfile != 0)
|
||||||
(void) f_mtime (arfile, 0);
|
(void) f_mtime (arfile, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
val = ar_scan (arname, ar_member_date_1, (long int) memname);
|
val = ar_scan (arname, ar_member_date_1, memname);
|
||||||
|
|
||||||
if (!arname_used)
|
|
||||||
free (arname);
|
free (arname);
|
||||||
free (memname);
|
|
||||||
|
|
||||||
return (val <= 0 ? (time_t) -1 : (time_t) val);
|
return (val <= 0 ? (time_t) -1 : (time_t) val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is called by `ar_scan' to find which member to look at. */
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
static long int
|
|
||||||
ar_member_date_1 (desc, mem, truncated,
|
|
||||||
hdrpos, datapos, size, date, uid, gid, mode, name)
|
|
||||||
int desc;
|
|
||||||
char *mem;
|
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
char *name;
|
|
||||||
{
|
|
||||||
return ar_name_equal (name, mem, truncated) ? date : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the archive-member NAME's modtime to now. */
|
/* Set the archive-member NAME's modtime to now. */
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
int
|
int
|
||||||
ar_touch (name)
|
ar_touch (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
error (NILF, _("touch archive member is not available on VMS"));
|
O (error, NILF, _("touch archive member is not available on VMS"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int
|
int
|
||||||
ar_touch (name)
|
ar_touch (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
char *arname, *memname;
|
char *arname, *memname;
|
||||||
int arname_used = 0;
|
int val;
|
||||||
register int val;
|
|
||||||
|
|
||||||
ar_parse_name (name, &arname, &memname);
|
ar_parse_name (name, &arname, &memname);
|
||||||
|
|
||||||
/* Make sure we know the modtime of the archive itself before we
|
/* Make sure we know the modtime of the archive itself before we
|
||||||
touch the member, since this will change the archive itself. */
|
touch the member, since this will change the archive modtime. */
|
||||||
{
|
{
|
||||||
struct file *arfile;
|
struct file *arfile;
|
||||||
arfile = lookup_file (arname);
|
arfile = enter_file (strcache_add (arname));
|
||||||
if (arfile == 0)
|
f_mtime (arfile, 0);
|
||||||
{
|
|
||||||
arfile = enter_file (arname);
|
|
||||||
arname_used = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
(void) f_mtime (arfile, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val = 1;
|
val = 1;
|
||||||
switch (ar_member_touch (arname, memname))
|
switch (ar_member_touch (arname, memname))
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
error (NILF, _("touch: Archive `%s' does not exist"), arname);
|
OS (error, NILF, _("touch: Archive '%s' does not exist"), arname);
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
error (NILF, _("touch: `%s' is not a valid archive"), arname);
|
OS (error, NILF, _("touch: '%s' is not a valid archive"), arname);
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
perror_with_name ("touch: ", arname);
|
perror_with_name ("touch: ", arname);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
error (NILF,
|
OSS (error, NILF,
|
||||||
_("touch: Member `%s' does not exist in `%s'"), memname, arname);
|
_("touch: Member '%s' does not exist in '%s'"), memname, arname);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
val = 0;
|
val = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error (NILF,
|
OS (error, NILF,
|
||||||
_("touch: Bad return code from ar_member_touch on `%s'"), name);
|
_("touch: Bad return code from ar_member_touch on '%s'"), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!arname_used)
|
|
||||||
free (arname);
|
free (arname);
|
||||||
free (memname);
|
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
|
|
||||||
/* State of an `ar_glob' run, passed to `ar_glob_match'. */
|
/* State of an 'ar_glob' run, passed to 'ar_glob_match'. */
|
||||||
|
|
||||||
|
/* On VMS, (object) modules in libraries do not have suffixes. That is, to
|
||||||
|
find a match for a pattern, the pattern must not have any suffix. So the
|
||||||
|
suffix of the pattern is saved and the pattern is stripped (ar_glob).
|
||||||
|
If there is a match and the match, which is a module name, is added to
|
||||||
|
the chain, the saved suffix is added back to construct a source filename
|
||||||
|
(ar_glob_match). */
|
||||||
|
|
||||||
struct ar_glob_state
|
struct ar_glob_state
|
||||||
{
|
{
|
||||||
char *arname;
|
const char *arname;
|
||||||
char *pattern;
|
const char *pattern;
|
||||||
|
#ifdef VMS
|
||||||
|
char *suffix;
|
||||||
|
#endif
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
struct nameseq *chain;
|
struct nameseq *chain;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This function is called by `ar_scan' to match one archive
|
/* This function is called by 'ar_scan' to match one archive
|
||||||
element against the pattern in STATE. */
|
element against the pattern in STATE. */
|
||||||
|
|
||||||
static long int
|
static long int
|
||||||
ar_glob_match (desc, mem, truncated,
|
ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||||
hdrpos, datapos, size, date, uid, gid, mode,
|
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||||
state)
|
long int size UNUSED, long int date UNUSED, int uid UNUSED,
|
||||||
int desc;
|
int gid UNUSED, int mode UNUSED, const void *arg)
|
||||||
char *mem;
|
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
struct ar_glob_state *state;
|
|
||||||
{
|
{
|
||||||
|
struct ar_glob_state *state = (struct ar_glob_state *)arg;
|
||||||
|
|
||||||
if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0)
|
if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0)
|
||||||
{
|
{
|
||||||
/* We have a match. Add it to the chain. */
|
/* We have a match. Add it to the chain. */
|
||||||
struct nameseq *new = (struct nameseq *) xmalloc (state->size);
|
struct nameseq *new = xcalloc (state->size);
|
||||||
new->name = concat (state->arname, mem, ")");
|
#ifdef VMS
|
||||||
|
if (state->suffix)
|
||||||
|
new->name = strcache_add(
|
||||||
|
concat(5, state->arname, "(", mem, state->suffix, ")"));
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
new->name = strcache_add(concat(4, state->arname, "(", mem, ")"));
|
||||||
new->next = state->chain;
|
new->next = state->chain;
|
||||||
state->chain = new;
|
state->chain = new;
|
||||||
++state->n;
|
++state->n;
|
||||||
@@ -245,12 +224,10 @@ ar_glob_match (desc, mem, truncated,
|
|||||||
/* Return nonzero if PATTERN contains any metacharacters.
|
/* Return nonzero if PATTERN contains any metacharacters.
|
||||||
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
||||||
static int
|
static int
|
||||||
glob_pattern_p (pattern, quote)
|
glob_pattern_p (const char *pattern, int quote)
|
||||||
const char *pattern;
|
|
||||||
const int quote;
|
|
||||||
{
|
{
|
||||||
register const char *p;
|
const char *p;
|
||||||
int open = 0;
|
int opened = 0;
|
||||||
|
|
||||||
for (p = pattern; *p != '\0'; ++p)
|
for (p = pattern; *p != '\0'; ++p)
|
||||||
switch (*p)
|
switch (*p)
|
||||||
@@ -265,11 +242,11 @@ glob_pattern_p (pattern, quote)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '[':
|
case '[':
|
||||||
open = 1;
|
opened = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ']':
|
case ']':
|
||||||
if (open)
|
if (opened)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -281,42 +258,64 @@ glob_pattern_p (pattern, quote)
|
|||||||
Return a malloc'd chain of matching elements (or nil if none). */
|
Return a malloc'd chain of matching elements (or nil if none). */
|
||||||
|
|
||||||
struct nameseq *
|
struct nameseq *
|
||||||
ar_glob (arname, member_pattern, size)
|
ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
||||||
char *arname, *member_pattern;
|
|
||||||
unsigned int size;
|
|
||||||
{
|
{
|
||||||
struct ar_glob_state state;
|
struct ar_glob_state state;
|
||||||
char **names;
|
|
||||||
struct nameseq *n;
|
struct nameseq *n;
|
||||||
|
const char **names;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
#ifdef VMS
|
||||||
|
char *vms_member_pattern;
|
||||||
|
#endif
|
||||||
if (! glob_pattern_p (member_pattern, 1))
|
if (! glob_pattern_p (member_pattern, 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Scan the archive for matches.
|
/* Scan the archive for matches.
|
||||||
ar_glob_match will accumulate them in STATE.chain. */
|
ar_glob_match will accumulate them in STATE.chain. */
|
||||||
i = strlen (arname);
|
state.arname = arname;
|
||||||
state.arname = (char *) alloca (i + 2);
|
|
||||||
bcopy (arname, state.arname, i);
|
|
||||||
state.arname[i] = '(';
|
|
||||||
state.arname[i + 1] = '\0';
|
|
||||||
state.pattern = member_pattern;
|
state.pattern = member_pattern;
|
||||||
|
#ifdef VMS
|
||||||
|
{
|
||||||
|
/* In a copy of the pattern, find the suffix, save it and remove it from
|
||||||
|
the pattern */
|
||||||
|
char *lastdot;
|
||||||
|
vms_member_pattern = xstrdup(member_pattern);
|
||||||
|
lastdot = strrchr(vms_member_pattern, '.');
|
||||||
|
state.suffix = lastdot;
|
||||||
|
if (lastdot)
|
||||||
|
{
|
||||||
|
state.suffix = xstrdup(lastdot);
|
||||||
|
*lastdot = 0;
|
||||||
|
}
|
||||||
|
state.pattern = vms_member_pattern;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
state.size = size;
|
state.size = size;
|
||||||
state.chain = 0;
|
state.chain = 0;
|
||||||
state.n = 0;
|
state.n = 0;
|
||||||
(void) ar_scan (arname, ar_glob_match, (long int) &state);
|
ar_scan (arname, ar_glob_match, &state);
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
/* Deallocate any duplicated string */
|
||||||
|
free(vms_member_pattern);
|
||||||
|
if (state.suffix)
|
||||||
|
{
|
||||||
|
free(state.suffix);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (state.chain == 0)
|
if (state.chain == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Now put the names into a vector for sorting. */
|
/* Now put the names into a vector for sorting. */
|
||||||
names = (char **) alloca (state.n * sizeof (char *));
|
names = alloca (state.n * sizeof (const char *));
|
||||||
i = 0;
|
i = 0;
|
||||||
for (n = state.chain; n != 0; n = n->next)
|
for (n = state.chain; n != 0; n = n->next)
|
||||||
names[i++] = n->name;
|
names[i++] = n->name;
|
||||||
|
|
||||||
/* Sort them alphabetically. */
|
/* Sort them alphabetically. */
|
||||||
qsort ((char *) names, i, sizeof (*names), alpha_compare);
|
/* MSVC erroneously warns without a cast here. */
|
||||||
|
qsort ((void *)names, i, sizeof (*names), alpha_compare);
|
||||||
|
|
||||||
/* Put them back into the chain in the sorted order. */
|
/* Put them back into the chain in the sorted order. */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|||||||
484
arscan.c
484
arscan.c
@@ -1,22 +1,25 @@
|
|||||||
/* Library function for scanning an archive file.
|
/* Library function for scanning an archive file.
|
||||||
Copyright (C) 1987,89,91,92,93,94,95,97 Free Software Foundation, Inc.
|
Copyright (C) 1987-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#ifdef TEST
|
||||||
|
/* Hack, the real error() routine eventually pulls in die from main.c */
|
||||||
|
#define error(a, b, c, d)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FCNTL_H
|
#ifdef HAVE_FCNTL_H
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -25,87 +28,152 @@ USA. */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
#include <lbrdef.h>
|
#include <lbrdef.h>
|
||||||
#include <mhddef.h>
|
#include <mhddef.h>
|
||||||
#include <credef.h>
|
#include <credef.h>
|
||||||
#include <descrip.h>
|
#include <descrip.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#if __DECC
|
#include <ssdef.h>
|
||||||
#include <unixlib.h>
|
#include <stsdef.h>
|
||||||
#include <lbr$routines.h>
|
#include <rmsdef.h>
|
||||||
|
|
||||||
|
/* This symbol should be present in lbrdef.h. */
|
||||||
|
#ifndef LBR$_HDRTRUNC
|
||||||
|
#pragma extern_model save
|
||||||
|
#pragma extern_model globalvalue
|
||||||
|
extern unsigned int LBR$_HDRTRUNC;
|
||||||
|
#pragma extern_model restore
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <unixlib.h>
|
||||||
|
#include <lbr$routines.h>
|
||||||
|
|
||||||
|
const char *
|
||||||
|
vmsify (const char *name, int type);
|
||||||
|
|
||||||
|
/* Time conversion from VMS to Unix
|
||||||
|
Conversion from local time (stored in library) to GMT (needed for gmake)
|
||||||
|
Note: The tm_gmtoff element is a VMS extension to the ANSI standard. */
|
||||||
|
static time_t
|
||||||
|
vms_time_to_unix(void *vms_time)
|
||||||
|
{
|
||||||
|
struct tm *tmp;
|
||||||
|
time_t unix_time;
|
||||||
|
|
||||||
|
unix_time = decc$fix_time(vms_time);
|
||||||
|
tmp = localtime(&unix_time);
|
||||||
|
unix_time -= tmp->tm_gmtoff;
|
||||||
|
|
||||||
|
return unix_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* VMS library routines need static variables for callback */
|
||||||
static void *VMS_lib_idx;
|
static void *VMS_lib_idx;
|
||||||
|
|
||||||
static char *VMS_saved_memname;
|
static const void *VMS_saved_arg;
|
||||||
|
|
||||||
static time_t VMS_member_date;
|
|
||||||
|
|
||||||
static long int (*VMS_function) ();
|
static long int (*VMS_function) ();
|
||||||
|
|
||||||
|
static long int VMS_function_ret;
|
||||||
|
|
||||||
|
|
||||||
|
/* This is a callback procedure for lib$get_index */
|
||||||
static int
|
static int
|
||||||
VMS_get_member_info (module, rfa)
|
VMS_get_member_info(struct dsc$descriptor_s *module, unsigned long *rfa)
|
||||||
struct dsc$descriptor_s *module;
|
|
||||||
unsigned long *rfa;
|
|
||||||
{
|
{
|
||||||
int status, i;
|
int status, i;
|
||||||
long int fnval;
|
const int truncated = 0; /* Member name may be truncated */
|
||||||
|
time_t member_date; /* Member date */
|
||||||
|
char *filename;
|
||||||
|
unsigned int buffer_length; /* Actual buffer length */
|
||||||
|
|
||||||
time_t val;
|
/* Unused constants - Make does not actually use most of these */
|
||||||
|
const int file_desc = -1; /* archive file descriptor for reading the data */
|
||||||
|
const int header_position = 0; /* Header position */
|
||||||
|
const int data_position = 0; /* Data position in file */
|
||||||
|
const int data_size = 0; /* Data size */
|
||||||
|
const int uid = 0; /* member gid */
|
||||||
|
const int gid = 0; /* member gid */
|
||||||
|
const int mode = 0; /* member protection mode */
|
||||||
|
/* End of unused constants */
|
||||||
|
|
||||||
static struct dsc$descriptor_s bufdesc =
|
static struct dsc$descriptor_s bufdesc =
|
||||||
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
||||||
|
|
||||||
|
/* Only need the module definition */
|
||||||
struct mhddef *mhd;
|
struct mhddef *mhd;
|
||||||
char filename[128];
|
|
||||||
|
|
||||||
bufdesc.dsc$a_pointer = filename;
|
/* If a previous callback is non-zero, just return that status */
|
||||||
bufdesc.dsc$w_length = sizeof (filename);
|
if (VMS_function_ret)
|
||||||
|
|
||||||
status = lbr$set_module (&VMS_lib_idx, rfa, &bufdesc,
|
|
||||||
&bufdesc.dsc$w_length, 0);
|
|
||||||
if (! (status & 1))
|
|
||||||
{
|
{
|
||||||
error (NILF, _("lbr$set_module failed to extract module info, status = %d"),
|
return SS$_NORMAL;
|
||||||
status);
|
|
||||||
|
|
||||||
lbr$close (&VMS_lib_idx);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mhd = (struct mhddef *) filename;
|
/* lbr_set_module returns more than just the module header. So allocate
|
||||||
|
a buffer which is big enough: the maximum LBR$C_MAXHDRSIZ. That's at
|
||||||
|
least bigger than the size of struct mhddef.
|
||||||
|
If the request is too small, a buffer truncated warning is issued so
|
||||||
|
it can be reissued with a larger buffer.
|
||||||
|
We do not care if the buffer is truncated, so that is still a success. */
|
||||||
|
mhd = xmalloc(LBR$C_MAXHDRSIZ);
|
||||||
|
bufdesc.dsc$a_pointer = (char *) mhd;
|
||||||
|
bufdesc.dsc$w_length = LBR$C_MAXHDRSIZ;
|
||||||
|
|
||||||
#ifdef __DECC
|
status = lbr$set_module(&VMS_lib_idx, rfa, &bufdesc, &buffer_length, 0);
|
||||||
/* John Fowler <jfowler@nyx.net> writes this is needed in his environment,
|
|
||||||
* but that decc$fix_time() isn't documented to work this way. Let me
|
if ((status != LBR$_HDRTRUNC) && !$VMS_STATUS_SUCCESS(status))
|
||||||
* know if this causes problems in other VMS environments.
|
{
|
||||||
*/
|
ON(error, NILF,
|
||||||
val = decc$fix_time (&mhd->mhd$l_datim) + timezone - daylight*3600;
|
_("lbr$set_module() failed to extract module info, status = %d"),
|
||||||
|
status);
|
||||||
|
|
||||||
|
lbr$close(&VMS_lib_idx);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef TEST
|
||||||
|
/* When testing this code, it is useful to know the length returned */
|
||||||
|
printf("Input length = %d, actual = %d\n",
|
||||||
|
bufdesc.dsc$w_length, buffer_length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Conversion from VMS time to C time.
|
||||||
|
VMS defectlet - mhddef is sub-optimal, for the time, it has a 32 bit
|
||||||
|
longword, mhd$l_datim, and a 32 bit fill instead of two longwords, or
|
||||||
|
equivalent. */
|
||||||
|
member_date = vms_time_to_unix(&mhd->mhd$l_datim);
|
||||||
|
free(mhd);
|
||||||
|
|
||||||
|
/* Here we have a problem. The module name on VMS does not have
|
||||||
|
a file type, but the filename pattern in the "VMS_saved_arg"
|
||||||
|
may have one.
|
||||||
|
But only the method being called knows how to interpret the
|
||||||
|
filename pattern.
|
||||||
|
There are currently two different formats being used.
|
||||||
|
This means that we need a VMS specific code in those methods
|
||||||
|
to handle it. */
|
||||||
|
filename = xmalloc(module->dsc$w_length + 1);
|
||||||
|
|
||||||
|
/* TODO: We may need an option to preserve the case of the module
|
||||||
|
For now force the module name to lower case */
|
||||||
for (i = 0; i < module->dsc$w_length; i++)
|
for (i = 0; i < module->dsc$w_length; i++)
|
||||||
filename[i] = _tolower ((unsigned char)module->dsc$a_pointer[i]);
|
filename[i] = _tolower((unsigned char )module->dsc$a_pointer[i]);
|
||||||
|
|
||||||
filename[i] = '\0';
|
filename[i] = '\0';
|
||||||
|
|
||||||
VMS_member_date = (time_t) -1;
|
VMS_function_ret = (*VMS_function)(file_desc, filename, truncated,
|
||||||
|
header_position, data_position, data_size, member_date, uid, gid, mode,
|
||||||
|
VMS_saved_arg);
|
||||||
|
|
||||||
fnval =
|
free(filename);
|
||||||
(*VMS_function) (-1, filename, 0, 0, 0, 0, val, 0, 0, 0,
|
return SS$_NORMAL;
|
||||||
VMS_saved_memname);
|
|
||||||
|
|
||||||
if (fnval)
|
|
||||||
{
|
|
||||||
VMS_member_date = fnval;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Takes three arguments ARCHIVE, FUNCTION and ARG.
|
/* Takes three arguments ARCHIVE, FUNCTION and ARG.
|
||||||
|
|
||||||
Open the archive named ARCHIVE, find its members one by one,
|
Open the archive named ARCHIVE, find its members one by one,
|
||||||
@@ -136,62 +204,89 @@ VMS_get_member_info (module, rfa)
|
|||||||
Returns 0 if have scanned successfully. */
|
Returns 0 if have scanned successfully. */
|
||||||
|
|
||||||
long int
|
long int
|
||||||
ar_scan (archive, function, arg)
|
ar_scan (const char *archive, ar_member_func_t function, const void *varg)
|
||||||
char *archive;
|
|
||||||
long int (*function) ();
|
|
||||||
long int arg;
|
|
||||||
{
|
{
|
||||||
char *p;
|
char *vms_archive;
|
||||||
|
|
||||||
static struct dsc$descriptor_s libdesc =
|
static struct dsc$descriptor_s libdesc =
|
||||||
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
||||||
|
|
||||||
unsigned long func = LBR$C_READ;
|
const unsigned long func = LBR$C_READ;
|
||||||
unsigned long type = LBR$C_TYP_UNK;
|
const unsigned long type = LBR$C_TYP_UNK;
|
||||||
unsigned long index = 1;
|
const unsigned long index = 1;
|
||||||
|
unsigned long lib_idx;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
status = lbr$ini_control (&VMS_lib_idx, &func, &type, 0);
|
VMS_saved_arg = varg;
|
||||||
|
|
||||||
if (! (status & 1))
|
/* Null archive string can show up in test and cause an access violation */
|
||||||
|
if (archive == NULL)
|
||||||
{
|
{
|
||||||
error (NILF, _("lbr$ini_control failed with status = %d"),status);
|
/* Null filenames do not exist */
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
libdesc.dsc$a_pointer = archive;
|
|
||||||
libdesc.dsc$w_length = strlen (archive);
|
|
||||||
|
|
||||||
status = lbr$open (&VMS_lib_idx, &libdesc, 0, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
if (! (status & 1))
|
|
||||||
{
|
|
||||||
error (NILF, _("unable to open library `%s' to lookup member `%s'"),
|
|
||||||
archive, (char *)arg);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VMS_saved_memname = (char *)arg;
|
/* archive path name must be in VMS format */
|
||||||
|
vms_archive = (char *) vmsify(archive, 0);
|
||||||
|
|
||||||
/* For comparison, delete .obj from arg name. */
|
status = lbr$ini_control(&VMS_lib_idx, &func, &type, 0);
|
||||||
|
|
||||||
p = strrchr (VMS_saved_memname, '.');
|
if (!$VMS_STATUS_SUCCESS(status))
|
||||||
if (p)
|
{
|
||||||
*p = '\0';
|
ON(error, NILF, _("lbr$ini_control() failed with status = %d"), status);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
libdesc.dsc$a_pointer = vms_archive;
|
||||||
|
libdesc.dsc$w_length = strlen(vms_archive);
|
||||||
|
|
||||||
|
status = lbr$open(&VMS_lib_idx, &libdesc, 0, NULL, 0, NULL, 0);
|
||||||
|
|
||||||
|
if (!$VMS_STATUS_SUCCESS(status))
|
||||||
|
{
|
||||||
|
|
||||||
|
/* TODO: A library format failure could mean that this is a file
|
||||||
|
generated by the GNU AR utility and in that case, we need to
|
||||||
|
take the UNIX codepath. This will also take a change to the
|
||||||
|
GNV AR wrapper program. */
|
||||||
|
|
||||||
|
switch (status)
|
||||||
|
{
|
||||||
|
case RMS$_FNF:
|
||||||
|
/* Archive does not exist */
|
||||||
|
return -1;
|
||||||
|
default:
|
||||||
|
#ifndef TEST
|
||||||
|
OSN(error, NILF,
|
||||||
|
_("unable to open library '%s' to lookup member status %d"),
|
||||||
|
archive, status);
|
||||||
|
#endif
|
||||||
|
/* For library format errors, specification says to return -2 */
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
VMS_function = function;
|
VMS_function = function;
|
||||||
|
|
||||||
VMS_member_date = (time_t) -1;
|
/* Clear the return status, as we are supposed to stop calling the
|
||||||
lbr$get_index (&VMS_lib_idx, &index, VMS_get_member_info, 0);
|
callback function if it becomes non-zero, and this is a static
|
||||||
|
variable. */
|
||||||
|
VMS_function_ret = 0;
|
||||||
|
|
||||||
/* Undo the damage. */
|
status = lbr$get_index(&VMS_lib_idx, &index, VMS_get_member_info, NULL, 0);
|
||||||
if (p)
|
|
||||||
*p = '.';
|
|
||||||
|
|
||||||
lbr$close (&VMS_lib_idx);
|
lbr$close(&VMS_lib_idx);
|
||||||
|
|
||||||
return VMS_member_date > 0 ? VMS_member_date : 0;
|
/* Unless a failure occurred in the lbr$ routines, return the
|
||||||
|
the status from the 'function' routine. */
|
||||||
|
if ($VMS_STATUS_SUCCESS(status))
|
||||||
|
{
|
||||||
|
return VMS_function_ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This must be something wrong with the library and an error
|
||||||
|
message should already have been printed. */
|
||||||
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !VMS */
|
#else /* !VMS */
|
||||||
@@ -236,10 +331,10 @@ ar_scan (archive, function, arg)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WINDOWS32
|
#ifndef WINDOWS32
|
||||||
# ifndef __BEOS__
|
# if !defined (__ANDROID__) && !defined (__BEOS__)
|
||||||
# include <ar.h>
|
# include <ar.h>
|
||||||
# else
|
# else
|
||||||
/* BeOS 5 doesn't have <ar.h> but has archives in the same format
|
/* These platforms don't have <ar.h> but have archives in the same format
|
||||||
* as many other Unices. This was taken from GNU binutils for BeOS.
|
* as many other Unices. This was taken from GNU binutils for BeOS.
|
||||||
*/
|
*/
|
||||||
# define ARMAG "!<arch>\n" /* String that begins an archive file. */
|
# define ARMAG "!<arch>\n" /* String that begins an archive file. */
|
||||||
@@ -255,6 +350,7 @@ struct ar_hdr
|
|||||||
char ar_fmag[2]; /* Always contains ARFMAG. */
|
char ar_fmag[2]; /* Always contains ARFMAG. */
|
||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
# define TOCHAR(_m) (_m)
|
||||||
#else
|
#else
|
||||||
/* These should allow us to read Windows (VC++) libraries (according to Frank
|
/* These should allow us to read Windows (VC++) libraries (according to Frank
|
||||||
* Libbrecht <frankl@abzx.belgium.hp.com>)
|
* Libbrecht <frankl@abzx.belgium.hp.com>)
|
||||||
@@ -271,6 +367,8 @@ struct ar_hdr
|
|||||||
# define ar_date Date
|
# define ar_date Date
|
||||||
# define ar_uid UserID
|
# define ar_uid UserID
|
||||||
# define ar_gid GroupID
|
# define ar_gid GroupID
|
||||||
|
/* In Windows the member names have type BYTE so we must cast them. */
|
||||||
|
# define TOCHAR(_m) ((char *)(_m))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Cray's <ar.h> apparently defines this. */
|
/* Cray's <ar.h> apparently defines this. */
|
||||||
@@ -306,29 +404,25 @@ struct ar_hdr
|
|||||||
Returns 0 if have scanned successfully. */
|
Returns 0 if have scanned successfully. */
|
||||||
|
|
||||||
long int
|
long int
|
||||||
ar_scan (archive, function, arg)
|
ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||||
char *archive;
|
|
||||||
long int (*function) ();
|
|
||||||
long int arg;
|
|
||||||
{
|
{
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
FL_HDR fl_header;
|
FL_HDR fl_header;
|
||||||
#ifdef AIAMAGBIG
|
# ifdef AIAMAGBIG
|
||||||
int big_archive = 0;
|
int big_archive = 0;
|
||||||
FL_HDR_BIG fl_header_big;
|
FL_HDR_BIG fl_header_big;
|
||||||
#endif
|
# endif
|
||||||
#else
|
|
||||||
int long_name = 0;
|
|
||||||
#endif
|
#endif
|
||||||
char *namemap = 0;
|
char *namemap = 0;
|
||||||
register int desc = open (archive, O_RDONLY, 0);
|
int desc = open (archive, O_RDONLY, 0);
|
||||||
if (desc < 0)
|
if (desc < 0)
|
||||||
return -1;
|
return -1;
|
||||||
#ifdef SARMAG
|
#ifdef SARMAG
|
||||||
{
|
{
|
||||||
char buf[SARMAG];
|
char buf[SARMAG];
|
||||||
register int nread = read (desc, buf, SARMAG);
|
int nread;
|
||||||
if (nread != SARMAG || bcmp (buf, ARMAG, SARMAG))
|
EINTRLOOP (nread, read (desc, buf, SARMAG));
|
||||||
|
if (nread != SARMAG || memcmp (buf, ARMAG, SARMAG))
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
return -2;
|
return -2;
|
||||||
@@ -337,8 +431,8 @@ ar_scan (archive, function, arg)
|
|||||||
#else
|
#else
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
{
|
{
|
||||||
register int nread = read (desc, (char *) &fl_header, FL_HSZ);
|
int nread;
|
||||||
|
EINTRLOOP (nread, read (desc, &fl_header, FL_HSZ));
|
||||||
if (nread != FL_HSZ)
|
if (nread != FL_HSZ)
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
@@ -347,19 +441,22 @@ ar_scan (archive, function, arg)
|
|||||||
#ifdef AIAMAGBIG
|
#ifdef AIAMAGBIG
|
||||||
/* If this is a "big" archive, then set the flag and
|
/* If this is a "big" archive, then set the flag and
|
||||||
re-read the header into the "big" structure. */
|
re-read the header into the "big" structure. */
|
||||||
if (!bcmp (fl_header.fl_magic, AIAMAGBIG, SAIAMAG))
|
if (!memcmp (fl_header.fl_magic, AIAMAGBIG, SAIAMAG))
|
||||||
{
|
{
|
||||||
|
off_t o;
|
||||||
|
|
||||||
big_archive = 1;
|
big_archive = 1;
|
||||||
|
|
||||||
/* seek back to beginning of archive */
|
/* seek back to beginning of archive */
|
||||||
if (lseek (desc, 0, 0) < 0)
|
EINTRLOOP (o, lseek (desc, 0, 0));
|
||||||
|
if (o < 0)
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* re-read the header into the "big" structure */
|
/* re-read the header into the "big" structure */
|
||||||
nread = read (desc, (char *) &fl_header_big, FL_HSZ_BIG);
|
EINTRLOOP (nread, read (desc, &fl_header_big, FL_HSZ_BIG));
|
||||||
if (nread != FL_HSZ_BIG)
|
if (nread != FL_HSZ_BIG)
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
@@ -369,7 +466,7 @@ ar_scan (archive, function, arg)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
/* Check to make sure this is a "normal" archive. */
|
/* Check to make sure this is a "normal" archive. */
|
||||||
if (bcmp (fl_header.fl_magic, AIAMAG, SAIAMAG))
|
if (memcmp (fl_header.fl_magic, AIAMAG, SAIAMAG))
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
return -2;
|
return -2;
|
||||||
@@ -382,7 +479,8 @@ ar_scan (archive, function, arg)
|
|||||||
#else
|
#else
|
||||||
unsigned short int buf;
|
unsigned short int buf;
|
||||||
#endif
|
#endif
|
||||||
register int nread = read(desc, &buf, sizeof (buf));
|
int nread;
|
||||||
|
EINTRLOOP (nread, read (desc, &buf, sizeof (buf)));
|
||||||
if (nread != sizeof (buf) || buf != ARMAG)
|
if (nread != sizeof (buf) || buf != ARMAG)
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
@@ -446,12 +544,15 @@ ar_scan (archive, function, arg)
|
|||||||
char namebuf[sizeof member_header.ar_name + 1];
|
char namebuf[sizeof member_header.ar_name + 1];
|
||||||
char *name;
|
char *name;
|
||||||
int is_namemap; /* Nonzero if this entry maps long names. */
|
int is_namemap; /* Nonzero if this entry maps long names. */
|
||||||
|
int long_name = 0;
|
||||||
#endif
|
#endif
|
||||||
long int eltsize;
|
long int eltsize;
|
||||||
int eltmode;
|
int eltmode;
|
||||||
long int fnval;
|
long int fnval;
|
||||||
|
off_t o;
|
||||||
|
|
||||||
if (lseek (desc, member_offset, 0) < 0)
|
EINTRLOOP (o, lseek (desc, member_offset, 0));
|
||||||
|
if (o < 0)
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
return -2;
|
return -2;
|
||||||
@@ -463,8 +564,8 @@ ar_scan (archive, function, arg)
|
|||||||
#ifdef AIAMAGBIG
|
#ifdef AIAMAGBIG
|
||||||
if (big_archive)
|
if (big_archive)
|
||||||
{
|
{
|
||||||
nread = read (desc, (char *) &member_header_big,
|
EINTRLOOP (nread, read (desc, &member_header_big,
|
||||||
AR_MEMHDR_SZ(member_header_big) );
|
AR_MEMHDR_SZ(member_header_big)));
|
||||||
|
|
||||||
if (nread != AR_MEMHDR_SZ(member_header_big))
|
if (nread != AR_MEMHDR_SZ(member_header_big))
|
||||||
{
|
{
|
||||||
@@ -473,7 +574,7 @@ ar_scan (archive, function, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sscanf (member_header_big.ar_namlen, "%4d", &name_len);
|
sscanf (member_header_big.ar_namlen, "%4d", &name_len);
|
||||||
nread = read (desc, name, name_len);
|
EINTRLOOP (nread, read (desc, name, name_len));
|
||||||
|
|
||||||
if (nread != name_len)
|
if (nread != name_len)
|
||||||
{
|
{
|
||||||
@@ -495,8 +596,8 @@ ar_scan (archive, function, arg)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
nread = read (desc, (char *) &member_header,
|
EINTRLOOP (nread, read (desc, &member_header,
|
||||||
AR_MEMHDR_SZ(member_header) );
|
AR_MEMHDR_SZ(member_header)));
|
||||||
|
|
||||||
if (nread != AR_MEMHDR_SZ(member_header))
|
if (nread != AR_MEMHDR_SZ(member_header))
|
||||||
{
|
{
|
||||||
@@ -505,7 +606,7 @@ ar_scan (archive, function, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sscanf (member_header.ar_namlen, "%4d", &name_len);
|
sscanf (member_header.ar_namlen, "%4d", &name_len);
|
||||||
nread = read (desc, name, name_len);
|
EINTRLOOP (nread, read (desc, name, name_len));
|
||||||
|
|
||||||
if (nread != name_len)
|
if (nread != name_len)
|
||||||
{
|
{
|
||||||
@@ -533,7 +634,7 @@ ar_scan (archive, function, arg)
|
|||||||
eltmode, arg);
|
eltmode, arg);
|
||||||
|
|
||||||
#else /* Not AIAMAG. */
|
#else /* Not AIAMAG. */
|
||||||
nread = read (desc, (char *) &member_header, AR_HDR_SIZE);
|
EINTRLOOP (nread, read (desc, &member_header, AR_HDR_SIZE));
|
||||||
if (nread == 0)
|
if (nread == 0)
|
||||||
/* No data left means end of file; that is OK. */
|
/* No data left means end of file; that is OK. */
|
||||||
break;
|
break;
|
||||||
@@ -542,13 +643,13 @@ ar_scan (archive, function, arg)
|
|||||||
#if defined(ARFMAG) || defined(ARFZMAG)
|
#if defined(ARFMAG) || defined(ARFZMAG)
|
||||||
|| (
|
|| (
|
||||||
# ifdef ARFMAG
|
# ifdef ARFMAG
|
||||||
bcmp (member_header.ar_fmag, ARFMAG, 2)
|
memcmp (member_header.ar_fmag, ARFMAG, 2)
|
||||||
# else
|
# else
|
||||||
1
|
1
|
||||||
# endif
|
# endif
|
||||||
&&
|
&&
|
||||||
# ifdef ARFZMAG
|
# ifdef ARFZMAG
|
||||||
bcmp (member_header.ar_fmag, ARFZMAG, 2)
|
memcmp (member_header.ar_fmag, ARFZMAG, 2)
|
||||||
# else
|
# else
|
||||||
1
|
1
|
||||||
# endif
|
# endif
|
||||||
@@ -561,7 +662,7 @@ ar_scan (archive, function, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
name = namebuf;
|
name = namebuf;
|
||||||
bcopy (member_header.ar_name, name, sizeof member_header.ar_name);
|
memcpy (name, member_header.ar_name, sizeof member_header.ar_name);
|
||||||
{
|
{
|
||||||
register char *p = name + sizeof member_header.ar_name;
|
register char *p = name + sizeof member_header.ar_name;
|
||||||
do
|
do
|
||||||
@@ -601,8 +702,8 @@ ar_scan (archive, function, arg)
|
|||||||
{
|
{
|
||||||
int namesize = atoi (name + 3);
|
int namesize = atoi (name + 3);
|
||||||
|
|
||||||
name = (char *) alloca (namesize + 1);
|
name = alloca (namesize + 1);
|
||||||
nread = read (desc, name, namesize);
|
EINTRLOOP (nread, read (desc, name, namesize));
|
||||||
if (nread != namesize)
|
if (nread != namesize)
|
||||||
{
|
{
|
||||||
close (desc);
|
close (desc);
|
||||||
@@ -616,8 +717,8 @@ ar_scan (archive, function, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef M_XENIX
|
#ifndef M_XENIX
|
||||||
sscanf (member_header.ar_mode, "%o", &eltmode);
|
sscanf (TOCHAR (member_header.ar_mode), "%o", &eltmode);
|
||||||
eltsize = atol (member_header.ar_size);
|
eltsize = atol (TOCHAR (member_header.ar_size));
|
||||||
#else /* Xenix. */
|
#else /* Xenix. */
|
||||||
eltmode = (unsigned short int) member_header.ar_mode;
|
eltmode = (unsigned short int) member_header.ar_mode;
|
||||||
eltsize = member_header.ar_size;
|
eltsize = member_header.ar_size;
|
||||||
@@ -627,9 +728,9 @@ ar_scan (archive, function, arg)
|
|||||||
(*function) (desc, name, ! long_name, member_offset,
|
(*function) (desc, name, ! long_name, member_offset,
|
||||||
member_offset + AR_HDR_SIZE, eltsize,
|
member_offset + AR_HDR_SIZE, eltsize,
|
||||||
#ifndef M_XENIX
|
#ifndef M_XENIX
|
||||||
atol (member_header.ar_date),
|
atol (TOCHAR (member_header.ar_date)),
|
||||||
atoi (member_header.ar_uid),
|
atoi (TOCHAR (member_header.ar_uid)),
|
||||||
atoi (member_header.ar_gid),
|
atoi (TOCHAR (member_header.ar_gid)),
|
||||||
#else /* Xenix. */
|
#else /* Xenix. */
|
||||||
member_header.ar_date,
|
member_header.ar_date,
|
||||||
member_header.ar_uid,
|
member_header.ar_uid,
|
||||||
@@ -672,8 +773,8 @@ ar_scan (archive, function, arg)
|
|||||||
char *clear;
|
char *clear;
|
||||||
char *limit;
|
char *limit;
|
||||||
|
|
||||||
namemap = (char *) alloca (eltsize);
|
namemap = alloca (eltsize);
|
||||||
nread = read (desc, namemap, eltsize);
|
EINTRLOOP (nread, read (desc, namemap, eltsize));
|
||||||
if (nread != eltsize)
|
if (nread != eltsize)
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
@@ -714,11 +815,9 @@ ar_scan (archive, function, arg)
|
|||||||
sizeof (struct ar_hdr.ar_name) - 1. */
|
sizeof (struct ar_hdr.ar_name) - 1. */
|
||||||
|
|
||||||
int
|
int
|
||||||
ar_name_equal (name, mem, truncated)
|
ar_name_equal (const char *name, const char *mem, int truncated)
|
||||||
char *name, *mem;
|
|
||||||
int truncated;
|
|
||||||
{
|
{
|
||||||
char *p;
|
const char *p;
|
||||||
|
|
||||||
p = strrchr (name, '/');
|
p = strrchr (name, '/');
|
||||||
if (p != 0)
|
if (p != 0)
|
||||||
@@ -733,28 +832,47 @@ ar_name_equal (name, mem, truncated)
|
|||||||
#else
|
#else
|
||||||
struct ar_hdr hdr;
|
struct ar_hdr hdr;
|
||||||
#if !defined (__hpux) && !defined (cray)
|
#if !defined (__hpux) && !defined (cray)
|
||||||
return strneq (name, mem, sizeof(hdr.ar_name) - 1);
|
return strneq (name, mem, sizeof (hdr.ar_name) - 1);
|
||||||
#else
|
#else
|
||||||
return strneq (name, mem, sizeof(hdr.ar_name) - 2);
|
return strneq (name, mem, sizeof (hdr.ar_name) - 2);
|
||||||
#endif /* !__hpux && !cray */
|
#endif /* !__hpux && !cray */
|
||||||
#endif /* !AIAMAG */
|
#endif /* !AIAMAG */
|
||||||
}
|
}
|
||||||
#endif /* !VMS */
|
|
||||||
|
|
||||||
return !strcmp (name, mem);
|
return !strcmp (name, mem);
|
||||||
|
#else
|
||||||
|
/* VMS members do not have suffixes, but the filenames usually
|
||||||
|
have.
|
||||||
|
Do we need to strip VMS disk/directory format paths?
|
||||||
|
|
||||||
|
Most VMS compilers etc. by default are case insensitive
|
||||||
|
but produce uppercase external names, incl. module names.
|
||||||
|
However the VMS librarian (ar) and the linker by default
|
||||||
|
are case sensitive: they take what they get, usually
|
||||||
|
uppercase names. So for the non-default settings of the
|
||||||
|
compilers etc. there is a need to have a case sensitive
|
||||||
|
mode. */
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
len = strlen(mem);
|
||||||
|
int match;
|
||||||
|
char *dot;
|
||||||
|
if ((dot=strrchr(name,'.')))
|
||||||
|
match = (len == dot - name) && !strncasecmp(name, mem, len);
|
||||||
|
else
|
||||||
|
match = !strcasecmp (name, mem);
|
||||||
|
return match;
|
||||||
|
}
|
||||||
|
#endif /* !VMS */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static long int
|
static long int
|
||||||
ar_member_pos (desc, mem, truncated,
|
ar_member_pos (int desc UNUSED, const char *mem, int truncated,
|
||||||
hdrpos, datapos, size, date, uid, gid, mode, name)
|
long int hdrpos, long int datapos UNUSED, long int size UNUSED,
|
||||||
int desc;
|
long int date UNUSED, int uid UNUSED, int gid UNUSED,
|
||||||
char *mem;
|
int mode UNUSED, const void *name)
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
if (!ar_name_equal (name, mem, truncated))
|
if (!ar_name_equal (name, mem, truncated))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -769,13 +887,14 @@ ar_member_pos (desc, mem, truncated,
|
|||||||
1 if valid but member MEMNAME does not exist. */
|
1 if valid but member MEMNAME does not exist. */
|
||||||
|
|
||||||
int
|
int
|
||||||
ar_member_touch (arname, memname)
|
ar_member_touch (const char *arname, const char *memname)
|
||||||
char *arname, *memname;
|
|
||||||
{
|
{
|
||||||
register long int pos = ar_scan (arname, ar_member_pos, (long int) memname);
|
long int pos = ar_scan (arname, ar_member_pos, memname);
|
||||||
register int fd;
|
int fd;
|
||||||
struct ar_hdr ar_hdr;
|
struct ar_hdr ar_hdr;
|
||||||
register int i;
|
off_t o;
|
||||||
|
int r;
|
||||||
|
unsigned int ui;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
@@ -783,45 +902,52 @@ ar_member_touch (arname, memname)
|
|||||||
if (!pos)
|
if (!pos)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
fd = open (arname, O_RDWR, 0666);
|
EINTRLOOP (fd, open (arname, O_RDWR, 0666));
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -3;
|
return -3;
|
||||||
/* Read in this member's header */
|
/* Read in this member's header */
|
||||||
if (lseek (fd, pos, 0) < 0)
|
EINTRLOOP (o, lseek (fd, pos, 0));
|
||||||
|
if (o < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
if (AR_HDR_SIZE != read (fd, (char *) &ar_hdr, AR_HDR_SIZE))
|
EINTRLOOP (r, read (fd, &ar_hdr, AR_HDR_SIZE));
|
||||||
|
if (r != AR_HDR_SIZE)
|
||||||
goto lose;
|
goto lose;
|
||||||
/* Write back the header, thus touching the archive file. */
|
/* Write back the header, thus touching the archive file. */
|
||||||
if (lseek (fd, pos, 0) < 0)
|
EINTRLOOP (o, lseek (fd, pos, 0));
|
||||||
|
if (o < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE))
|
EINTRLOOP (r, write (fd, &ar_hdr, AR_HDR_SIZE));
|
||||||
|
if (r != AR_HDR_SIZE)
|
||||||
goto lose;
|
goto lose;
|
||||||
/* The file's mtime is the time we we want. */
|
/* The file's mtime is the time we we want. */
|
||||||
if (fstat (fd, &statbuf) < 0)
|
EINTRLOOP (r, fstat (fd, &statbuf));
|
||||||
|
if (r < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
|
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
|
||||||
/* Advance member's time to that time */
|
/* Advance member's time to that time */
|
||||||
for (i = 0; i < sizeof ar_hdr.ar_date; i++)
|
for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
|
||||||
ar_hdr.ar_date[i] = ' ';
|
ar_hdr.ar_date[ui] = ' ';
|
||||||
sprintf (ar_hdr.ar_date, "%ld", (long int) statbuf.st_mtime);
|
sprintf (TOCHAR (ar_hdr.ar_date), "%lu", (long unsigned) statbuf.st_mtime);
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' ';
|
ar_hdr.ar_date[strlen (ar_hdr.ar_date)] = ' ';
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
ar_hdr.ar_date = statbuf.st_mtime;
|
ar_hdr.ar_date = statbuf.st_mtime;
|
||||||
#endif
|
#endif
|
||||||
/* Write back this member's header */
|
/* Write back this member's header */
|
||||||
if (lseek (fd, pos, 0) < 0)
|
EINTRLOOP (o, lseek (fd, pos, 0));
|
||||||
|
if (o < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE))
|
EINTRLOOP (r, write (fd, &ar_hdr, AR_HDR_SIZE));
|
||||||
|
if (r != AR_HDR_SIZE)
|
||||||
goto lose;
|
goto lose;
|
||||||
close (fd);
|
close (fd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
lose:
|
lose:
|
||||||
i = errno;
|
r = errno;
|
||||||
close (fd);
|
close (fd);
|
||||||
errno = i;
|
errno = r;
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -829,17 +955,13 @@ ar_member_touch (arname, memname)
|
|||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
|
|
||||||
long int
|
long int
|
||||||
describe_member (desc, name, truncated,
|
describe_member (int desc, const char *name, int truncated,
|
||||||
hdrpos, datapos, size, date, uid, gid, mode)
|
long int hdrpos, long int datapos, long int size,
|
||||||
int desc;
|
long int date, int uid, int gid, int mode, const void *arg)
|
||||||
char *name;
|
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
{
|
{
|
||||||
extern char *ctime ();
|
extern char *ctime ();
|
||||||
|
|
||||||
printf (_("Member `%s'%s: %ld bytes at %ld (%ld).\n"),
|
printf (_("Member '%s'%s: %ld bytes at %ld (%ld).\n"),
|
||||||
name, truncated ? _(" (name might be truncated)") : "",
|
name, truncated ? _(" (name might be truncated)") : "",
|
||||||
size, hdrpos, datapos);
|
size, hdrpos, datapos);
|
||||||
printf (_(" Date %s"), ctime (&date));
|
printf (_(" Date %s"), ctime (&date));
|
||||||
@@ -848,14 +970,12 @@ describe_member (desc, name, truncated,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
main (argc, argv)
|
int
|
||||||
int argc;
|
main (int argc, char **argv)
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
ar_scan (argv[1], describe_member);
|
ar_scan (argv[1], describe_member, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* TEST. */
|
#endif /* TEST. */
|
||||||
|
|
||||||
#endif /* NO_ARCHIVES. */
|
#endif /* NO_ARCHIVES. */
|
||||||
|
|||||||
@@ -1,57 +1,58 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Shell script to build GNU Make in the absence of any `make' program.
|
# Shell script to build GNU Make in the absence of any 'make' program.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
|
# Copyright (C) 1993-2016 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
# Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
# See Makefile.in for comments describing these variables.
|
# See Makefile.in for comments describing these variables.
|
||||||
|
|
||||||
srcdir='@srcdir@'
|
srcdir='@srcdir@'
|
||||||
CC='@CC@'
|
CC='@CC@'
|
||||||
CFLAGS='@CFLAGS@'
|
CFLAGS='@CFLAGS@ @GUILE_CFLAGS@'
|
||||||
CPPFLAGS='@CPPFLAGS@'
|
CPPFLAGS='@CPPFLAGS@'
|
||||||
LDFLAGS='@LDFLAGS@'
|
LDFLAGS='@AM_LDFLAGS@ @LDFLAGS@'
|
||||||
ALLOCA='@ALLOCA@'
|
ALLOCA='@ALLOCA@'
|
||||||
LOADLIBES='@LIBS@'
|
LOADLIBES='@LIBS@ @GUILE_LIBS@ @LIBINTL@'
|
||||||
extras='@LIBOBJS@'
|
eval extras=\'@LIBOBJS@\'
|
||||||
REMOTE='@REMOTE@'
|
REMOTE='@REMOTE@'
|
||||||
GLOBLIB='@GLOBLIB@'
|
GLOBLIB='@GLOBLIB@'
|
||||||
|
PATH_SEPARATOR='@PATH_SEPARATOR@'
|
||||||
|
OBJEXT='@OBJEXT@'
|
||||||
|
EXEEXT='@EXEEXT@'
|
||||||
|
|
||||||
# Common prefix for machine-independent installed files.
|
# Common prefix for machine-independent installed files.
|
||||||
prefix='@prefix@'
|
prefix='@prefix@'
|
||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix=`eval echo @exec_prefix@`
|
exec_prefix=`eval echo @exec_prefix@`
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir=${exec_prefix}/lib
|
libdir=${exec_prefix}/lib
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
localedir=${prefix}/share/locale
|
localedir=${prefix}/share/locale
|
||||||
aliaspath=${localedir}:.
|
aliaspath=${localedir}${PATH_SEPARATOR}.
|
||||||
|
|
||||||
defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
defines="-DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||||
|
|
||||||
# Exit as soon as any command fails.
|
# Exit as soon as any command fails.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# These are all the objects we need to link together.
|
# These are all the objects we need to link together.
|
||||||
objs="%objs% remote-${REMOTE}.o ${extras} ${ALLOCA}"
|
objs="%objs% remote-${REMOTE}.${OBJEXT} ${extras} ${ALLOCA}"
|
||||||
|
|
||||||
if [ x"$GLOBLIB" != x ]; then
|
if [ x"$GLOBLIB" != x ]; then
|
||||||
objs="$objs %globobjs%"
|
objs="$objs %globobjs%"
|
||||||
@@ -59,7 +60,7 @@ if [ x"$GLOBLIB" != x ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Compile the source files into those objects.
|
# Compile the source files into those objects.
|
||||||
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
|
for file in `echo ${objs} | sed 's/\.'${OBJEXT}'/.c/g'`; do
|
||||||
echo compiling ${file}...
|
echo compiling ${file}...
|
||||||
$CC $defines $CPPFLAGS $CFLAGS \
|
$CC $defines $CPPFLAGS $CFLAGS \
|
||||||
-c -I. -I${srcdir} ${globinc} ${srcdir}/$file
|
-c -I. -I${srcdir} ${globinc} ${srcdir}/$file
|
||||||
@@ -75,6 +76,6 @@ done
|
|||||||
|
|
||||||
# Link all the objects together.
|
# Link all the objects together.
|
||||||
echo linking make...
|
echo linking make...
|
||||||
$CC $LDFLAGS $objs $LOADLIBES -o make.new
|
$CC $CFLAGS $LDFLAGS $objs $LOADLIBES -o makenew${EXEEXT}
|
||||||
echo done
|
echo done
|
||||||
mv -f make.new make
|
mv -f makenew${EXEEXT} make${EXEEXT}
|
||||||
|
|||||||
382
build_w32.bat
Normal file → Executable file
382
build_w32.bat
Normal file → Executable file
@@ -1,138 +1,250 @@
|
|||||||
set make=gnumake
|
@echo off
|
||||||
+if not exist config.h copy config.h.W32 config.h
|
rem Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
cd w32\subproc
|
rem This file is part of GNU Make.
|
||||||
echo "Creating the subproc library"
|
rem
|
||||||
%ComSpec% /c build.bat
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
cd ..\..
|
rem the terms of the GNU General Public License as published by the Free
|
||||||
del link.dbg link.rel
|
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||||
del config.h
|
rem any later version.
|
||||||
copy config.h.W32 config.h
|
rem
|
||||||
echo off
|
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||||
echo "Creating GNU make for Windows 95/NT"
|
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||||
|
rem more details.
|
||||||
|
rem
|
||||||
|
rem You should have received a copy of the GNU General Public License along
|
||||||
|
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
call :Reset
|
||||||
|
|
||||||
|
if "%1" == "-h" goto Usage
|
||||||
|
if "%1" == "--help" goto Usage
|
||||||
|
|
||||||
|
set MAKE=gnumake
|
||||||
|
set GUILE=Y
|
||||||
|
set COMPILER=msvc
|
||||||
|
|
||||||
|
:ParseSW
|
||||||
|
if "%1" == "--debug" goto SetDebug
|
||||||
|
if "%1" == "--without-guile" goto NoGuile
|
||||||
|
if "%1" == "gcc" goto SetCC
|
||||||
|
if "%1" == "" goto DoneSW
|
||||||
|
|
||||||
|
:SetDebug
|
||||||
|
set DEBUG=Y
|
||||||
|
shift
|
||||||
|
goto ParseSW
|
||||||
|
|
||||||
|
:NoGuile
|
||||||
|
set GUILE=N
|
||||||
|
echo Building without Guile
|
||||||
|
shift
|
||||||
|
goto ParseSW
|
||||||
|
|
||||||
|
:SetCC
|
||||||
|
set COMPILER=gcc
|
||||||
|
echo Building with GCC
|
||||||
|
shift
|
||||||
|
goto ParseSW
|
||||||
|
|
||||||
|
rem Build with Guile is supported only on NT and later versions
|
||||||
|
:DoneSW
|
||||||
|
echo.
|
||||||
|
echo Creating GNU Make for Windows 9X/NT/2K/XP/Vista/7/8
|
||||||
|
if "%DEBUG%" == "Y" echo Building without compiler optimizations
|
||||||
|
|
||||||
|
if "%COMPILER%" == "gcc" goto GccBuild
|
||||||
|
|
||||||
|
set OUTDIR=.\WinRel
|
||||||
|
set "OPTS=/O2 /D NDEBUG"
|
||||||
|
set LINKOPTS=
|
||||||
|
if "%DEBUG%" == "Y" set OUTDIR=.\WinDebug
|
||||||
|
if "%DEBUG%" == "Y" set "OPTS=/Zi /Od /D _DEBUG"
|
||||||
|
if "%DEBUG%" == "Y" set LINKOPTS=/DEBUG
|
||||||
|
call :Build
|
||||||
|
goto Done
|
||||||
|
|
||||||
|
:GccBuild
|
||||||
|
set OUTDIR=.\GccRel
|
||||||
|
set OPTS=-O2
|
||||||
|
if "%DEBUG%" == "Y" set OPTS=-O0
|
||||||
|
if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug
|
||||||
|
call :Build
|
||||||
|
goto Done
|
||||||
|
|
||||||
|
:Done
|
||||||
|
call :Reset
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Build
|
||||||
|
:: Clean the directory if it exists
|
||||||
|
if exist %OUTDIR%\nul rmdir /S /Q %OUTDIR%
|
||||||
|
|
||||||
|
:: Recreate it
|
||||||
|
mkdir %OUTDIR%
|
||||||
|
mkdir %OUTDIR%\glob
|
||||||
|
mkdir %OUTDIR%\w32
|
||||||
|
mkdir %OUTDIR%\w32\compat
|
||||||
|
mkdir %OUTDIR%\w32\subproc
|
||||||
|
|
||||||
|
if "%GUILE%" == "Y" call :ChkGuile
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Compiling %OUTDIR% version
|
||||||
|
|
||||||
|
if exist config.h.W32.template call :ConfigSCM
|
||||||
|
copy config.h.W32 %OUTDIR%\config.h
|
||||||
|
|
||||||
|
call :Compile ar
|
||||||
|
call :Compile arscan
|
||||||
|
call :Compile commands
|
||||||
|
call :Compile default
|
||||||
|
call :Compile dir
|
||||||
|
call :Compile expand
|
||||||
|
call :Compile file
|
||||||
|
call :Compile function
|
||||||
|
call :Compile getloadavg
|
||||||
|
call :Compile getopt
|
||||||
|
call :Compile getopt1
|
||||||
|
call :Compile glob\fnmatch
|
||||||
|
call :Compile glob\glob
|
||||||
|
call :Compile guile GUILE
|
||||||
|
call :Compile hash
|
||||||
|
call :Compile implicit
|
||||||
|
call :Compile job
|
||||||
|
call :Compile load
|
||||||
|
call :Compile loadapi
|
||||||
|
call :Compile main GUILE
|
||||||
|
call :Compile misc
|
||||||
|
call :Compile output
|
||||||
|
call :Compile read
|
||||||
|
call :Compile remake
|
||||||
|
call :Compile remote-stub
|
||||||
|
call :Compile rule
|
||||||
|
call :Compile signame
|
||||||
|
call :Compile strcache
|
||||||
|
call :Compile variable
|
||||||
|
call :Compile version
|
||||||
|
call :Compile vpath
|
||||||
|
call :Compile w32\compat\posixfcn
|
||||||
|
call :Compile w32\pathstuff
|
||||||
|
call :Compile w32\subproc\misc
|
||||||
|
call :Compile w32\subproc\sub_proc
|
||||||
|
call :Compile w32\subproc\w32err
|
||||||
|
call :Compile w32\w32os
|
||||||
|
|
||||||
|
if not "%COMPILER%" == "gcc" call :Compile w32\compat\dirent
|
||||||
|
|
||||||
|
call :Link
|
||||||
|
|
||||||
|
echo.
|
||||||
|
if not exist %OUTDIR%\%MAKE%.exe echo %OUTDIR% build FAILED!
|
||||||
|
if exist %OUTDIR%\%MAKE%.exe echo %OUTDIR% build succeeded.
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Compile
|
||||||
|
set EXTRAS=
|
||||||
|
if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
|
||||||
|
if "%COMPILER%" == "gcc" goto GccCompile
|
||||||
|
|
||||||
|
:: MSVC Compile
|
||||||
echo on
|
echo on
|
||||||
if not exist .\WinDebug\nul mkdir .\WinDebug
|
cl.exe /nologo /MT /W4 /GX /YX %OPTS% /I %OUTDIR% /I . /I glob /I w32/include /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.obj /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c
|
@echo off
|
||||||
echo WinDebug\variable.obj >>link.dbg
|
echo %OUTDIR%\%1.obj >>%OUTDIR%\link.sc
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c
|
goto :EOF
|
||||||
echo WinDebug\rule.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c
|
:GccCompile
|
||||||
echo WinDebug\remote-stub.obj >>link.dbg
|
:: GCC Compile
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c
|
|
||||||
echo WinDebug\commands.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c
|
|
||||||
echo WinDebug\file.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c
|
|
||||||
echo WinDebug\getloadavg.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c
|
|
||||||
echo WinDebug\default.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c
|
|
||||||
echo WinDebug\signame.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c
|
|
||||||
echo WinDebug\expand.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c
|
|
||||||
echo WinDebug\dir.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c
|
|
||||||
echo WinDebug\main.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c
|
|
||||||
echo WinDebug\getopt1.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c
|
|
||||||
echo WinDebug\job.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c
|
|
||||||
echo WinDebug\read.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c
|
|
||||||
echo WinDebug\version.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c
|
|
||||||
echo WinDebug\getopt.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c
|
|
||||||
echo WinDebug\arscan.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c
|
|
||||||
echo WinDebug\remake.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c
|
|
||||||
echo WinDebug\misc.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c
|
|
||||||
echo WinDebug\ar.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c
|
|
||||||
echo WinDebug\function.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c
|
|
||||||
echo WinDebug\vpath.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c
|
|
||||||
echo WinDebug\implicit.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c
|
|
||||||
echo WinDebug\dirent.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c
|
|
||||||
echo WinDebug\glob.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c
|
|
||||||
echo WinDebug\fnmatch.obj >>link.dbg
|
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c
|
|
||||||
echo WinDebug\pathstuff.obj >>link.dbg
|
|
||||||
echo off
|
|
||||||
echo "Linking WinDebug/%make%.exe"
|
|
||||||
rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe .\WinDebug/variable.obj .\WinDebug/rule.obj .\WinDebug/remote-stub.obj .\WinDebug/commands.obj .\WinDebug/file.obj .\WinDebug/getloadavg.obj .\WinDebug/default.obj .\WinDebug/signame.obj .\WinDebug/expand.obj .\WinDebug/dir.obj .\WinDebug/main.obj .\WinDebug/getopt1.obj .\WinDebug/job.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/misc.obj .\WinDebug/ar.obj .\WinDebug/function.obj .\WinDebug/vpath.obj .\WinDebug/implicit.obj .\WinDebug/dirent.obj .\WinDebug/glob.obj .\WinDebug/fnmatch.obj .\WinDebug/pathstuff.obj
|
|
||||||
echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib >>link.dbg
|
|
||||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe @link.dbg
|
|
||||||
if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
|
|
||||||
if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"
|
|
||||||
if not exist .\WinRel\nul mkdir .\WinRel
|
|
||||||
echo on
|
echo on
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c
|
gcc -mthreads -Wall -gdwarf-2 -g3 %OPTS% -I%OUTDIR% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%\%1.o -c %1.c
|
||||||
echo WinRel\variable.obj >>link.rel
|
@echo off
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c
|
goto :EOF
|
||||||
echo WinRel\rule.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c
|
:Link
|
||||||
echo WinRel\remote-stub.obj >>link.rel
|
echo Linking %OUTDIR%/%MAKE%.exe
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c
|
if "%COMPILER%" == "gcc" goto GccLink
|
||||||
echo WinRel\commands.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c
|
:: MSVC Link
|
||||||
echo WinRel\file.obj >>link.rel
|
echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib >>%OUTDIR%\link.sc
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c
|
|
||||||
echo WinRel\getloadavg.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c
|
|
||||||
echo WinRel\default.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c
|
|
||||||
echo WinRel\signame.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c
|
|
||||||
echo WinRel\expand.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c
|
|
||||||
echo WinRel\dir.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c
|
|
||||||
echo WinRel\main.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c
|
|
||||||
echo WinRel\getopt1.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c
|
|
||||||
echo WinRel\job.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c
|
|
||||||
echo WinRel\read.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c
|
|
||||||
echo WinRel\version.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c
|
|
||||||
echo WinRel\getopt.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c
|
|
||||||
echo WinRel\arscan.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c
|
|
||||||
echo WinRel\remake.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c
|
|
||||||
echo WinRel\misc.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c
|
|
||||||
echo WinRel\ar.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c
|
|
||||||
echo WinRel\function.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c
|
|
||||||
echo WinRel\vpath.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c
|
|
||||||
echo WinRel\implicit.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c
|
|
||||||
echo WinRel\dirent.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c
|
|
||||||
echo WinRel\glob.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c
|
|
||||||
echo WinRel\fnmatch.obj >>link.rel
|
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c
|
|
||||||
echo WinRel\pathstuff.obj >>link.rel
|
|
||||||
echo off
|
|
||||||
echo "Linking WinRel/%make%.exe"
|
|
||||||
rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe .\WinRel/variable.obj .\WinRel/rule.obj .\WinRel/remote-stub.obj .\WinRel/commands.obj .\WinRel/file.obj .\WinRel/getloadavg.obj .\WinRel/default.obj .\WinRel/signame.obj .\WinRel/expand.obj .\WinRel/dir.obj .\WinRel/main.obj .\WinRel/getopt1.obj .\WinRel/job.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/ar.obj .\WinRel/function.obj .\WinRel/vpath.obj .\WinRel/implicit.obj .\WinRel/dirent.obj .\WinRel/glob.obj .\WinRel/fnmatch.obj .\WinRel/pathstuff.obj
|
|
||||||
echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib >>link.rel
|
|
||||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe @link.rel
|
|
||||||
if not exist .\WinRel/%make%.exe echo "WinRel build failed"
|
|
||||||
if exist .\WinRel/%make%.exe echo "WinRel build succeeded!"
|
|
||||||
echo on
|
echo on
|
||||||
|
link.exe /NOLOGO /SUBSYSTEM:console /PDB:%OUTDIR%\%MAKE%.pdb %LINKOPTS% /OUT:%OUTDIR%\%MAKE%.exe @%OUTDIR%\link.sc
|
||||||
|
@echo off
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:GccLink
|
||||||
|
:: GCC Link
|
||||||
|
echo on
|
||||||
|
gcc -mthreads -gdwarf-2 -g3 -o %OUTDIR%\%MAKE%.exe %OUTDIR%\variable.o %OUTDIR%\rule.o %OUTDIR%\remote-stub.o %OUTDIR%\commands.o %OUTDIR%\file.o %OUTDIR%\getloadavg.o %OUTDIR%\default.o %OUTDIR%\signame.o %OUTDIR%\expand.o %OUTDIR%\dir.o %OUTDIR%\main.o %OUTDIR%\getopt1.o %OUTDIR%\guile.o %OUTDIR%\job.o %OUTDIR%\output.o %OUTDIR%\read.o %OUTDIR%\version.o %OUTDIR%\getopt.o %OUTDIR%\arscan.o %OUTDIR%\remake.o %OUTDIR%\misc.o %OUTDIR%\hash.o %OUTDIR%\strcache.o %OUTDIR%\ar.o %OUTDIR%\function.o %OUTDIR%\vpath.o %OUTDIR%\implicit.o %OUTDIR%\loadapi.o %OUTDIR%\load.o %OUTDIR%\glob\glob.o %OUTDIR%\glob\fnmatch.o %OUTDIR%\w32\pathstuff.o %OUTDIR%\w32\compat\posixfcn.o %OUTDIR%\w32\w32os.o %OUTDIR%\w32\subproc\misc.o %OUTDIR%\w32\subproc\sub_proc.o %OUTDIR%\w32\subproc\w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -Wl,--out-implib=%OUTDIR%\libgnumake-1.dll.a
|
||||||
|
@echo off
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:ConfigSCM
|
||||||
|
echo Generating config from SCM templates
|
||||||
|
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.ac > %OUTDIR%\config.h.W32.sed
|
||||||
|
echo s,%%PACKAGE%%,make,g >> %OUTDIR%\config.h.W32.sed
|
||||||
|
sed -f %OUTDIR%\config.h.W32.sed config.h.W32.template > config.h.W32
|
||||||
|
echo static const char *const GUILE_module_defn = ^" \> gmk-default.h
|
||||||
|
sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" gmk-default.scm >> gmk-default.h
|
||||||
|
echo ^";>> gmk-default.h
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:ChkGuile
|
||||||
|
if not "%OS%" == "Windows_NT" goto NoGuile
|
||||||
|
pkg-config --help > %OUTDIR%\guile.tmp 2> NUL
|
||||||
|
if ERRORLEVEL 1 goto NoPkgCfg
|
||||||
|
|
||||||
|
echo Checking for Guile 2.0
|
||||||
|
if not "%COMPILER%" == "gcc" set PKGMSC=--msvc-syntax
|
||||||
|
pkg-config --cflags --short-errors "guile-2.0" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
pkg-config --libs --static --short-errors %PKGMSC% "guile-2.0" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||||
|
|
||||||
|
echo Checking for Guile 1.8
|
||||||
|
pkg-config --cflags --short-errors "guile-1.8" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
pkg-config --libs --static --short-errors %PKGMSC% "guile-1.8" > %OUTDIR%\guile.tmp
|
||||||
|
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\guile.tmp
|
||||||
|
|
||||||
|
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||||
|
|
||||||
|
echo No Guile found, building without Guile
|
||||||
|
goto GuileDone
|
||||||
|
|
||||||
|
:NoPkgCfg
|
||||||
|
echo pkg-config not found, building without Guile
|
||||||
|
|
||||||
|
:GuileDone
|
||||||
|
if "%GUILECFLAGS%" == "" goto :EOF
|
||||||
|
|
||||||
|
echo Guile found, building with Guile
|
||||||
|
set "GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE"
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Usage
|
||||||
|
echo Usage: %0 [options] [gcc]
|
||||||
|
echo Options:
|
||||||
|
echo. --debug For GCC only, make a debug build
|
||||||
|
echo. (MSVC build always makes both debug and release)
|
||||||
|
echo. --without-guile Do not compile Guile support even if found
|
||||||
|
echo. --help Display these instructions and exit
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:Reset
|
||||||
|
set COMPILER=
|
||||||
|
set DEBUG=
|
||||||
|
set GUILE=
|
||||||
|
set GUILECFLAGS=
|
||||||
|
set GUILELIBS=
|
||||||
|
set LINKOPTS=
|
||||||
|
set MAKE=
|
||||||
|
set NOGUILE=
|
||||||
|
set OPTS=
|
||||||
|
set OUTDIR=
|
||||||
|
set PKGMSC=
|
||||||
|
goto :EOF
|
||||||
|
|||||||
392
commands.c
392
commands.c
@@ -1,66 +1,93 @@
|
|||||||
/* Command processing for GNU Make.
|
/* Command processing for GNU Make.
|
||||||
Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "dep.h"
|
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
|
#include "dep.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
#include <windows.h>
|
||||||
|
#include "w32err.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if VMS
|
#if VMS
|
||||||
# define FILE_LIST_SEPARATOR ','
|
# define FILE_LIST_SEPARATOR (vms_comma_separator ? ',' : ' ')
|
||||||
#else
|
#else
|
||||||
# define FILE_LIST_SEPARATOR ' '
|
# define FILE_LIST_SEPARATOR ' '
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int remote_kill PARAMS ((int id, int sig));
|
int remote_kill (int id, int sig);
|
||||||
|
|
||||||
#ifndef HAVE_UNISTD_H
|
#ifndef HAVE_UNISTD_H
|
||||||
extern int getpid ();
|
int getpid ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static unsigned long
|
||||||
|
dep_hash_1 (const void *key)
|
||||||
|
{
|
||||||
|
const struct dep *d = key;
|
||||||
|
return_STRING_HASH_1 (dep_name (d));
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long
|
||||||
|
dep_hash_2 (const void *key)
|
||||||
|
{
|
||||||
|
const struct dep *d = key;
|
||||||
|
return_STRING_HASH_2 (dep_name (d));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
dep_hash_cmp (const void *x, const void *y)
|
||||||
|
{
|
||||||
|
const struct dep *dx = x;
|
||||||
|
const struct dep *dy = y;
|
||||||
|
return strcmp (dep_name (dx), dep_name (dy));
|
||||||
|
}
|
||||||
|
|
||||||
/* Set FILE's automatic variables up. */
|
/* Set FILE's automatic variables up. */
|
||||||
|
|
||||||
static void
|
void
|
||||||
set_file_variables (file)
|
set_file_variables (struct file *file)
|
||||||
register struct file *file;
|
|
||||||
{
|
{
|
||||||
char *at, *percent, *star, *less;
|
struct dep *d;
|
||||||
|
const char *at, *percent, *star, *less;
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
/* If the target is an archive member `lib(member)',
|
/* If the target is an archive member 'lib(member)',
|
||||||
then $@ is `lib' and $% is `member'. */
|
then $@ is 'lib' and $% is 'member'. */
|
||||||
|
|
||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
const char *cp;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
p = strchr (file->name, '(');
|
cp = strchr (file->name, '(');
|
||||||
at = (char *) alloca (p - file->name + 1);
|
p = alloca (cp - file->name + 1);
|
||||||
bcopy (file->name, at, p - file->name);
|
memcpy (p, file->name, cp - file->name);
|
||||||
at[p - file->name] = '\0';
|
p[cp - file->name] = '\0';
|
||||||
len = strlen (p + 1);
|
at = p;
|
||||||
percent = (char *) alloca (len);
|
len = strlen (cp + 1);
|
||||||
bcopy (p + 1, percent, len - 1);
|
p = alloca (len);
|
||||||
percent[len - 1] = '\0';
|
memcpy (p, cp + 1, len - 1);
|
||||||
|
p[len - 1] = '\0';
|
||||||
|
percent = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* NO_ARCHIVES. */
|
#endif /* NO_ARCHIVES. */
|
||||||
@@ -74,9 +101,8 @@ set_file_variables (file)
|
|||||||
{
|
{
|
||||||
/* In Unix make, $* is set to the target name with
|
/* In Unix make, $* is set to the target name with
|
||||||
any suffix in the .SUFFIXES list stripped off for
|
any suffix in the .SUFFIXES list stripped off for
|
||||||
explicit rules. We store this in the `stem' member. */
|
explicit rules. We store this in the 'stem' member. */
|
||||||
register struct dep *d;
|
const char *name;
|
||||||
char *name;
|
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
@@ -92,12 +118,12 @@ set_file_variables (file)
|
|||||||
len = strlen (name);
|
len = strlen (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (d = enter_file (".SUFFIXES")->deps; d != 0; d = d->next)
|
for (d = enter_file (strcache_add (".SUFFIXES"))->deps; d ; d = d->next)
|
||||||
{
|
{
|
||||||
unsigned int slen = strlen (dep_name (d));
|
unsigned int slen = strlen (dep_name (d));
|
||||||
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
||||||
{
|
{
|
||||||
file->stem = savestring (name, len - slen);
|
file->stem = strcache_add_len (name, len - slen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,8 +132,15 @@ set_file_variables (file)
|
|||||||
}
|
}
|
||||||
star = file->stem;
|
star = file->stem;
|
||||||
|
|
||||||
/* $< is the first dependency. */
|
/* $< is the first not order-only dependency. */
|
||||||
less = file->deps != 0 ? dep_name (file->deps) : "";
|
less = "";
|
||||||
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
|
if (!d->ignore_mtime)
|
||||||
|
{
|
||||||
|
if (!d->need_2nd_expansion)
|
||||||
|
less = dep_name (d);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (file->cmds == default_file->cmds)
|
if (file->cmds == default_file->cmds)
|
||||||
/* This file got its commands from .DEFAULT.
|
/* This file got its commands from .DEFAULT.
|
||||||
@@ -127,33 +160,51 @@ set_file_variables (file)
|
|||||||
/* Compute the values for $^, $+, $?, and $|. */
|
/* Compute the values for $^, $+, $?, and $|. */
|
||||||
|
|
||||||
{
|
{
|
||||||
|
static char *plus_value=0, *bar_value=0, *qmark_value=0;
|
||||||
|
static unsigned int plus_max=0, bar_max=0, qmark_max=0;
|
||||||
|
|
||||||
unsigned int qmark_len, plus_len, bar_len;
|
unsigned int qmark_len, plus_len, bar_len;
|
||||||
char *caret_value, *plus_value;
|
|
||||||
char *cp;
|
char *cp;
|
||||||
char *qmark_value;
|
char *caret_value;
|
||||||
char *bar_value;
|
|
||||||
char *qp;
|
char *qp;
|
||||||
char *bp;
|
char *bp;
|
||||||
struct dep *d;
|
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
|
struct hash_table dep_hash;
|
||||||
|
void **slot;
|
||||||
|
|
||||||
/* Compute first the value for $+, which is supposed to contain
|
/* Compute first the value for $+, which is supposed to contain
|
||||||
duplicate dependencies as they were listed in the makefile. */
|
duplicate dependencies as they were listed in the makefile. */
|
||||||
|
|
||||||
plus_len = 0;
|
plus_len = 0;
|
||||||
|
bar_len = 0;
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
if (! d->ignore_mtime)
|
{
|
||||||
|
if (!d->need_2nd_expansion)
|
||||||
|
{
|
||||||
|
if (d->ignore_mtime)
|
||||||
|
bar_len += strlen (dep_name (d)) + 1;
|
||||||
|
else
|
||||||
plus_len += strlen (dep_name (d)) + 1;
|
plus_len += strlen (dep_name (d)) + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bar_len == 0)
|
||||||
|
bar_len++;
|
||||||
|
|
||||||
if (plus_len == 0)
|
if (plus_len == 0)
|
||||||
plus_len++;
|
plus_len++;
|
||||||
|
|
||||||
cp = plus_value = (char *) alloca (plus_len);
|
if (plus_len > plus_max)
|
||||||
|
plus_value = xrealloc (plus_value, plus_max = plus_len);
|
||||||
|
|
||||||
|
cp = plus_value;
|
||||||
|
|
||||||
qmark_len = plus_len + 1; /* Will be this or less. */
|
qmark_len = plus_len + 1; /* Will be this or less. */
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
if (! d->ignore_mtime)
|
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
||||||
{
|
{
|
||||||
char *c = dep_name (d);
|
const char *c = dep_name (d);
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (c))
|
if (ar_name (c))
|
||||||
@@ -165,10 +216,10 @@ set_file_variables (file)
|
|||||||
#endif
|
#endif
|
||||||
len = strlen (c);
|
len = strlen (c);
|
||||||
|
|
||||||
bcopy (c, cp, len);
|
memcpy (cp, c, len);
|
||||||
cp += len;
|
cp += len;
|
||||||
*cp++ = FILE_LIST_SEPARATOR;
|
*cp++ = FILE_LIST_SEPARATOR;
|
||||||
if (! d->changed)
|
if (! (d->changed || always_make_flag))
|
||||||
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,29 +228,53 @@ set_file_variables (file)
|
|||||||
cp[cp > plus_value ? -1 : 0] = '\0';
|
cp[cp > plus_value ? -1 : 0] = '\0';
|
||||||
DEFINE_VARIABLE ("+", 1, plus_value);
|
DEFINE_VARIABLE ("+", 1, plus_value);
|
||||||
|
|
||||||
/* Make sure that no dependencies are repeated. This does not
|
|
||||||
really matter for the purpose of updating targets, but it
|
|
||||||
might make some names be listed twice for $^ and $?. */
|
|
||||||
|
|
||||||
uniquize_deps (file->deps);
|
|
||||||
|
|
||||||
bar_len = 0;
|
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
|
||||||
if (d->ignore_mtime)
|
|
||||||
bar_len += strlen (dep_name (d)) + 1;
|
|
||||||
if (bar_len == 0)
|
|
||||||
bar_len++;
|
|
||||||
|
|
||||||
/* Compute the values for $^, $?, and $|. */
|
/* Compute the values for $^, $?, and $|. */
|
||||||
|
|
||||||
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
|
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
|
||||||
qp = qmark_value = (char *) alloca (qmark_len);
|
|
||||||
bp = bar_value = (char *) alloca (bar_len);
|
if (qmark_len > qmark_max)
|
||||||
|
qmark_value = xrealloc (qmark_value, qmark_max = qmark_len);
|
||||||
|
qp = qmark_value;
|
||||||
|
|
||||||
|
if (bar_len > bar_max)
|
||||||
|
bar_value = xrealloc (bar_value, bar_max = bar_len);
|
||||||
|
bp = bar_value;
|
||||||
|
|
||||||
|
/* Make sure that no dependencies are repeated in $^, $?, and $|. It
|
||||||
|
would be natural to combine the next two loops but we can't do it
|
||||||
|
because of a situation where we have two dep entries, the first
|
||||||
|
is order-only and the second is normal (see below). */
|
||||||
|
|
||||||
|
hash_init (&dep_hash, 500, dep_hash_1, dep_hash_2, dep_hash_cmp);
|
||||||
|
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
{
|
{
|
||||||
char *c = dep_name (d);
|
if (d->need_2nd_expansion)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
slot = hash_find_slot (&dep_hash, d);
|
||||||
|
if (HASH_VACANT (*slot))
|
||||||
|
hash_insert_at (&dep_hash, d, slot);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Check if the two prerequisites have different ignore_mtime.
|
||||||
|
If so then we need to "upgrade" one that is order-only. */
|
||||||
|
|
||||||
|
struct dep* hd = (struct dep*) *slot;
|
||||||
|
|
||||||
|
if (d->ignore_mtime != hd->ignore_mtime)
|
||||||
|
d->ignore_mtime = hd->ignore_mtime = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
|
{
|
||||||
|
const char *c;
|
||||||
|
|
||||||
|
if (d->need_2nd_expansion || hash_find_item (&dep_hash, d) != d)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
c = dep_name (d);
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (c))
|
if (ar_name (c))
|
||||||
{
|
{
|
||||||
@@ -212,24 +287,26 @@ set_file_variables (file)
|
|||||||
|
|
||||||
if (d->ignore_mtime)
|
if (d->ignore_mtime)
|
||||||
{
|
{
|
||||||
bcopy (c, bp, len);
|
memcpy (bp, c, len);
|
||||||
bp += len;
|
bp += len;
|
||||||
*bp++ = FILE_LIST_SEPARATOR;
|
*bp++ = FILE_LIST_SEPARATOR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bcopy (c, cp, len);
|
memcpy (cp, c, len);
|
||||||
cp += len;
|
cp += len;
|
||||||
*cp++ = FILE_LIST_SEPARATOR;
|
*cp++ = FILE_LIST_SEPARATOR;
|
||||||
if (d->changed)
|
if (d->changed || always_make_flag)
|
||||||
{
|
{
|
||||||
bcopy (c, qp, len);
|
memcpy (qp, c, len);
|
||||||
qp += len;
|
qp += len;
|
||||||
*qp++ = FILE_LIST_SEPARATOR;
|
*qp++ = FILE_LIST_SEPARATOR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hash_free (&dep_hash, 0);
|
||||||
|
|
||||||
/* Kill the last spaces and define the variables. */
|
/* Kill the last spaces and define the variables. */
|
||||||
|
|
||||||
cp[cp > caret_value ? -1 : 0] = '\0';
|
cp[cp > caret_value ? -1 : 0] = '\0';
|
||||||
@@ -246,13 +323,11 @@ set_file_variables (file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Chop CMDS up into individual command lines if necessary.
|
/* Chop CMDS up into individual command lines if necessary.
|
||||||
Also set the `lines_flags' and `any_recurse' members. */
|
Also set the 'lines_flags' and 'any_recurse' members. */
|
||||||
|
|
||||||
void
|
void
|
||||||
chop_commands (cmds)
|
chop_commands (struct commands *cmds)
|
||||||
register struct commands *cmds;
|
|
||||||
{
|
{
|
||||||
register char *p;
|
|
||||||
unsigned int nlines, idx;
|
unsigned int nlines, idx;
|
||||||
char **lines;
|
char **lines;
|
||||||
|
|
||||||
@@ -262,17 +337,31 @@ chop_commands (cmds)
|
|||||||
if (!cmds || cmds->command_lines != 0)
|
if (!cmds || cmds->command_lines != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Chop CMDS->commands up into lines in CMDS->command_lines.
|
/* Chop CMDS->commands up into lines in CMDS->command_lines. */
|
||||||
Also set the corresponding CMDS->lines_flags elements,
|
|
||||||
and the CMDS->any_recurse flag. */
|
if (one_shell)
|
||||||
|
{
|
||||||
|
int l = strlen (cmds->commands);
|
||||||
|
|
||||||
|
nlines = 1;
|
||||||
|
lines = xmalloc (nlines * sizeof (char *));
|
||||||
|
lines[0] = xstrdup (cmds->commands);
|
||||||
|
|
||||||
|
/* Strip the trailing newline. */
|
||||||
|
if (l > 0 && lines[0][l-1] == '\n')
|
||||||
|
lines[0][l-1] = '\0';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const char *p;
|
||||||
|
|
||||||
nlines = 5;
|
nlines = 5;
|
||||||
lines = (char **) xmalloc (5 * sizeof (char *));
|
lines = xmalloc (nlines * sizeof (char *));
|
||||||
idx = 0;
|
idx = 0;
|
||||||
p = cmds->commands;
|
p = cmds->commands;
|
||||||
while (*p != '\0')
|
while (*p != '\0')
|
||||||
{
|
{
|
||||||
char *end = p;
|
const char *end = p;
|
||||||
find_end:;
|
find_end:;
|
||||||
end = strchr (end, '\n');
|
end = strchr (end, '\n');
|
||||||
if (end == 0)
|
if (end == 0)
|
||||||
@@ -280,7 +369,7 @@ chop_commands (cmds)
|
|||||||
else if (end > p && end[-1] == '\\')
|
else if (end > p && end[-1] == '\\')
|
||||||
{
|
{
|
||||||
int backslash = 1;
|
int backslash = 1;
|
||||||
register char *b;
|
const char *b;
|
||||||
for (b = end - 2; b >= p && *b == '\\'; --b)
|
for (b = end - 2; b >= p && *b == '\\'; --b)
|
||||||
backslash = !backslash;
|
backslash = !backslash;
|
||||||
if (backslash)
|
if (backslash)
|
||||||
@@ -293,10 +382,9 @@ chop_commands (cmds)
|
|||||||
if (idx == nlines)
|
if (idx == nlines)
|
||||||
{
|
{
|
||||||
nlines += 2;
|
nlines += 2;
|
||||||
lines = (char **) xrealloc ((char *) lines,
|
lines = xrealloc (lines, nlines * sizeof (char *));
|
||||||
nlines * sizeof (char *));
|
|
||||||
}
|
}
|
||||||
lines[idx++] = savestring (p, end - p);
|
lines[idx++] = xstrndup (p, end - p);
|
||||||
p = end;
|
p = end;
|
||||||
if (*p != '\0')
|
if (*p != '\0')
|
||||||
++p;
|
++p;
|
||||||
@@ -305,23 +393,29 @@ chop_commands (cmds)
|
|||||||
if (idx != nlines)
|
if (idx != nlines)
|
||||||
{
|
{
|
||||||
nlines = idx;
|
nlines = idx;
|
||||||
lines = (char **) xrealloc ((char *) lines,
|
lines = xrealloc (lines, nlines * sizeof (char *));
|
||||||
nlines * sizeof (char *));
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Finally, set the corresponding CMDS->lines_flags elements and the
|
||||||
|
CMDS->any_recurse flag. */
|
||||||
|
|
||||||
|
if (nlines > USHRT_MAX)
|
||||||
|
ON (fatal, &cmds->fileinfo, _("Recipe has too many lines (%ud)"), nlines);
|
||||||
|
|
||||||
cmds->ncommand_lines = nlines;
|
cmds->ncommand_lines = nlines;
|
||||||
cmds->command_lines = lines;
|
cmds->command_lines = lines;
|
||||||
|
|
||||||
cmds->any_recurse = 0;
|
cmds->any_recurse = 0;
|
||||||
cmds->lines_flags = (char *) xmalloc (nlines);
|
cmds->lines_flags = xmalloc (nlines);
|
||||||
|
|
||||||
for (idx = 0; idx < nlines; ++idx)
|
for (idx = 0; idx < nlines; ++idx)
|
||||||
{
|
{
|
||||||
int flags = 0;
|
unsigned char flags = 0;
|
||||||
|
const char *p = lines[idx];
|
||||||
|
|
||||||
for (p = lines[idx];
|
while (ISBLANK (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||||
isblank ((unsigned char)*p) || *p == '-' || *p == '@' || *p == '+';
|
switch (*(p++))
|
||||||
++p)
|
|
||||||
switch (*p)
|
|
||||||
{
|
{
|
||||||
case '+':
|
case '+':
|
||||||
flags |= COMMANDS_RECURSE;
|
flags |= COMMANDS_RECURSE;
|
||||||
@@ -333,16 +427,14 @@ chop_commands (cmds)
|
|||||||
flags |= COMMANDS_NOERROR;
|
flags |= COMMANDS_NOERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!(flags & COMMANDS_RECURSE))
|
|
||||||
{
|
/* If no explicit '+' was given, look for MAKE variable references. */
|
||||||
unsigned int len = strlen (p);
|
if (!(flags & COMMANDS_RECURSE)
|
||||||
if (sindex (p, len, "$(MAKE)", 7) != 0
|
&& (strstr (p, "$(MAKE)") != 0 || strstr (p, "${MAKE}") != 0))
|
||||||
|| sindex (p, len, "${MAKE}", 7) != 0)
|
|
||||||
flags |= COMMANDS_RECURSE;
|
flags |= COMMANDS_RECURSE;
|
||||||
}
|
|
||||||
|
|
||||||
cmds->lines_flags[idx] = flags;
|
cmds->lines_flags[idx] = flags;
|
||||||
cmds->any_recurse |= flags & COMMANDS_RECURSE;
|
cmds->any_recurse |= flags & COMMANDS_RECURSE ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,22 +443,21 @@ chop_commands (cmds)
|
|||||||
fork off a child process to run the first command line in the sequence. */
|
fork off a child process to run the first command line in the sequence. */
|
||||||
|
|
||||||
void
|
void
|
||||||
execute_file_commands (file)
|
execute_file_commands (struct file *file)
|
||||||
struct file *file;
|
|
||||||
{
|
{
|
||||||
register char *p;
|
const char *p;
|
||||||
|
|
||||||
/* Don't go through all the preparations if
|
/* Don't go through all the preparations if
|
||||||
the commands are nothing but whitespace. */
|
the commands are nothing but whitespace. */
|
||||||
|
|
||||||
for (p = file->cmds->commands; *p != '\0'; ++p)
|
for (p = file->cmds->commands; *p != '\0'; ++p)
|
||||||
if (!isspace ((unsigned char)*p) && *p != '-' && *p != '@')
|
if (!ISSPACE (*p) && *p != '-' && *p != '@' && *p != '+')
|
||||||
break;
|
break;
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
{
|
{
|
||||||
/* If there are no commands, assume everything worked. */
|
/* If there are no commands, assume everything worked. */
|
||||||
set_command_state (file, cs_running);
|
set_command_state (file, cs_running);
|
||||||
file->update_status = 0;
|
file->update_status = us_success;
|
||||||
notice_finished_file (file);
|
notice_finished_file (file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -377,6 +468,11 @@ execute_file_commands (file)
|
|||||||
|
|
||||||
set_file_variables (file);
|
set_file_variables (file);
|
||||||
|
|
||||||
|
/* If this is a loaded dynamic object, unload it before remaking.
|
||||||
|
Some systems don't support overwriting a loaded object. */
|
||||||
|
if (file->loaded)
|
||||||
|
unload_file (file->name);
|
||||||
|
|
||||||
/* Start the commands running. */
|
/* Start the commands running. */
|
||||||
new_job (file);
|
new_job (file);
|
||||||
}
|
}
|
||||||
@@ -389,8 +485,7 @@ int handling_fatal_signal = 0;
|
|||||||
/* Handle fatal signals. */
|
/* Handle fatal signals. */
|
||||||
|
|
||||||
RETSIGTYPE
|
RETSIGTYPE
|
||||||
fatal_error_signal (sig)
|
fatal_error_signal (int sig)
|
||||||
int sig;
|
|
||||||
{
|
{
|
||||||
#ifdef __MSDOS__
|
#ifdef __MSDOS__
|
||||||
extern int dos_status, dos_command_running;
|
extern int dos_status, dos_command_running;
|
||||||
@@ -411,6 +506,27 @@ fatal_error_signal (sig)
|
|||||||
|
|
||||||
exit (10);
|
exit (10);
|
||||||
#else /* not Amiga */
|
#else /* not Amiga */
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
extern HANDLE main_thread;
|
||||||
|
|
||||||
|
/* Windows creates a sperate thread for handling Ctrl+C, so we need
|
||||||
|
to suspend the main thread, or else we will have race conditions
|
||||||
|
when both threads call reap_children. */
|
||||||
|
if (main_thread)
|
||||||
|
{
|
||||||
|
DWORD susp_count = SuspendThread (main_thread);
|
||||||
|
|
||||||
|
if (susp_count != 0)
|
||||||
|
fprintf (stderr, "SuspendThread: suspend count = %ld\n", susp_count);
|
||||||
|
else if (susp_count == (DWORD)-1)
|
||||||
|
{
|
||||||
|
DWORD ierr = GetLastError ();
|
||||||
|
|
||||||
|
fprintf (stderr, "SuspendThread: error %ld: %s\n",
|
||||||
|
ierr, map_windows32_error_to_string (ierr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
handling_fatal_signal = 1;
|
handling_fatal_signal = 1;
|
||||||
|
|
||||||
/* Set the handling for this signal to the default.
|
/* Set the handling for this signal to the default.
|
||||||
@@ -422,7 +538,7 @@ fatal_error_signal (sig)
|
|||||||
|
|
||||||
if (sig == SIGTERM)
|
if (sig == SIGTERM)
|
||||||
{
|
{
|
||||||
register struct child *c;
|
struct child *c;
|
||||||
for (c = children; c != 0; c = c->next)
|
for (c = children; c != 0; c = c->next)
|
||||||
if (!c->remote)
|
if (!c->remote)
|
||||||
(void) kill (c->pid, SIGTERM);
|
(void) kill (c->pid, SIGTERM);
|
||||||
@@ -440,7 +556,7 @@ fatal_error_signal (sig)
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register struct child *c;
|
struct child *c;
|
||||||
|
|
||||||
/* Remote children won't automatically get signals sent
|
/* Remote children won't automatically get signals sent
|
||||||
to the process group, so we must send them. */
|
to the process group, so we must send them. */
|
||||||
@@ -469,13 +585,21 @@ fatal_error_signal (sig)
|
|||||||
if (sig == SIGQUIT)
|
if (sig == SIGQUIT)
|
||||||
/* We don't want to send ourselves SIGQUIT, because it will
|
/* We don't want to send ourselves SIGQUIT, because it will
|
||||||
cause a core dump. Just exit instead. */
|
cause a core dump. Just exit instead. */
|
||||||
exit (EXIT_FAILURE);
|
exit (MAKE_TROUBLE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
if (main_thread)
|
||||||
|
CloseHandle (main_thread);
|
||||||
|
/* Cannot call W32_kill with a pid (it needs a handle). The exit
|
||||||
|
status of 130 emulates what happens in Bash. */
|
||||||
|
exit (130);
|
||||||
|
#else
|
||||||
/* Signal the same code; this time it will really be fatal. The signal
|
/* Signal the same code; this time it will really be fatal. The signal
|
||||||
will be unblocked when we return and arrive then to kill us. */
|
will be unblocked when we return and arrive then to kill us. */
|
||||||
if (kill (getpid (), sig) < 0)
|
if (kill (getpid (), sig) < 0)
|
||||||
pfatal_with_name ("kill");
|
pfatal_with_name ("kill");
|
||||||
|
#endif /* not WINDOWS32 */
|
||||||
#endif /* not Amiga */
|
#endif /* not Amiga */
|
||||||
#endif /* not __MSDOS__ */
|
#endif /* not __MSDOS__ */
|
||||||
}
|
}
|
||||||
@@ -484,11 +608,10 @@ fatal_error_signal (sig)
|
|||||||
and it has changed on disk since we last stat'd it. */
|
and it has changed on disk since we last stat'd it. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
delete_target (file, on_behalf_of)
|
delete_target (struct file *file, const char *on_behalf_of)
|
||||||
struct file *file;
|
|
||||||
char *on_behalf_of;
|
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
int e;
|
||||||
|
|
||||||
if (file->precious || file->phony)
|
if (file->precious || file->phony)
|
||||||
return;
|
return;
|
||||||
@@ -502,24 +625,28 @@ delete_target (file, on_behalf_of)
|
|||||||
if (ar_member_date (file->name) != file_date)
|
if (ar_member_date (file->name) != file_date)
|
||||||
{
|
{
|
||||||
if (on_behalf_of)
|
if (on_behalf_of)
|
||||||
error (NILF, _("*** [%s] Archive member `%s' may be bogus; not deleted"),
|
OSS (error, NILF,
|
||||||
|
_("*** [%s] Archive member '%s' may be bogus; not deleted"),
|
||||||
on_behalf_of, file->name);
|
on_behalf_of, file->name);
|
||||||
else
|
else
|
||||||
error (NILF, _("*** Archive member `%s' may be bogus; not deleted"),
|
OS (error, NILF,
|
||||||
|
_("*** Archive member '%s' may be bogus; not deleted"),
|
||||||
file->name);
|
file->name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (stat (file->name, &st) == 0
|
EINTRLOOP (e, stat (file->name, &st));
|
||||||
|
if (e == 0
|
||||||
&& S_ISREG (st.st_mode)
|
&& S_ISREG (st.st_mode)
|
||||||
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
||||||
{
|
{
|
||||||
if (on_behalf_of)
|
if (on_behalf_of)
|
||||||
error (NILF, _("*** [%s] Deleting file `%s'"), on_behalf_of, file->name);
|
OSS (error, NILF,
|
||||||
|
_("*** [%s] Deleting file '%s'"), on_behalf_of, file->name);
|
||||||
else
|
else
|
||||||
error (NILF, _("*** Deleting file `%s'"), file->name);
|
OS (error, NILF, _("*** Deleting file '%s'"), file->name);
|
||||||
if (unlink (file->name) < 0
|
if (unlink (file->name) < 0
|
||||||
&& errno != ENOENT) /* It disappeared; so what. */
|
&& errno != ENOENT) /* It disappeared; so what. */
|
||||||
perror_with_name ("unlink: ", file->name);
|
perror_with_name ("unlink: ", file->name);
|
||||||
@@ -531,8 +658,7 @@ delete_target (file, on_behalf_of)
|
|||||||
Set the flag in CHILD to say they've been deleted. */
|
Set the flag in CHILD to say they've been deleted. */
|
||||||
|
|
||||||
void
|
void
|
||||||
delete_child_targets (child)
|
delete_child_targets (struct child *child)
|
||||||
struct child *child;
|
|
||||||
{
|
{
|
||||||
struct dep *d;
|
struct dep *d;
|
||||||
|
|
||||||
@@ -540,9 +666,9 @@ delete_child_targets (child)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Delete the target file if it changed. */
|
/* Delete the target file if it changed. */
|
||||||
delete_target (child->file, (char *) 0);
|
delete_target (child->file, NULL);
|
||||||
|
|
||||||
/* Also remove any non-precious targets listed in the `also_make' member. */
|
/* Also remove any non-precious targets listed in the 'also_make' member. */
|
||||||
for (d = child->file->also_make; d != 0; d = d->next)
|
for (d = child->file->also_make; d != 0; d = d->next)
|
||||||
delete_target (d->file, child->file->name);
|
delete_target (d->file, child->file->name);
|
||||||
|
|
||||||
@@ -552,33 +678,35 @@ delete_child_targets (child)
|
|||||||
/* Print out the commands in CMDS. */
|
/* Print out the commands in CMDS. */
|
||||||
|
|
||||||
void
|
void
|
||||||
print_commands (cmds)
|
print_commands (const struct commands *cmds)
|
||||||
register struct commands *cmds;
|
|
||||||
{
|
{
|
||||||
register char *s;
|
const char *s;
|
||||||
|
|
||||||
fputs (_("# commands to execute"), stdout);
|
fputs (_("# recipe to execute"), stdout);
|
||||||
|
|
||||||
if (cmds->fileinfo.filenm == 0)
|
if (cmds->fileinfo.filenm == 0)
|
||||||
puts (_(" (built-in):"));
|
puts (_(" (built-in):"));
|
||||||
else
|
else
|
||||||
printf (_(" (from `%s', line %lu):\n"),
|
printf (_(" (from '%s', line %lu):\n"),
|
||||||
cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
||||||
|
|
||||||
s = cmds->commands;
|
s = cmds->commands;
|
||||||
while (*s != '\0')
|
while (*s != '\0')
|
||||||
{
|
{
|
||||||
char *end;
|
const char *end;
|
||||||
|
int bs;
|
||||||
|
|
||||||
while (isspace ((unsigned char)*s))
|
/* Print one full logical recipe line: find a non-escaped newline. */
|
||||||
++s;
|
for (end = s, bs = 0; *end != '\0'; ++end)
|
||||||
|
{
|
||||||
|
if (*end == '\n' && !bs)
|
||||||
|
break;
|
||||||
|
|
||||||
end = strchr (s, '\n');
|
bs = *end == '\\' ? !bs : 0;
|
||||||
if (end == 0)
|
}
|
||||||
end = s + strlen (s);
|
|
||||||
|
|
||||||
printf ("\t%.*s\n", (int) (end - s), s);
|
printf ("%c%.*s\n", cmd_prefix, (int) (end - s), s);
|
||||||
|
|
||||||
s = end;
|
s = end + (end[0] == '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
43
commands.h
43
commands.h
@@ -1,42 +1,41 @@
|
|||||||
/* Definition of data structures describing shell commands for GNU Make.
|
/* Definition of data structures describing shell commands for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1991, 1993 Free Software Foundation, Inc.
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
/* Structure that gives the commands to make a file
|
/* Structure that gives the commands to make a file
|
||||||
and information about where these commands came from. */
|
and information about where these commands came from. */
|
||||||
|
|
||||||
struct commands
|
struct commands
|
||||||
{
|
{
|
||||||
struct floc fileinfo; /* Where commands were defined. */
|
gmk_floc fileinfo; /* Where commands were defined. */
|
||||||
char *commands; /* Commands text. */
|
char *commands; /* Commands text. */
|
||||||
unsigned int ncommand_lines;/* Number of command lines. */
|
|
||||||
char **command_lines; /* Commands chopped up into lines. */
|
char **command_lines; /* Commands chopped up into lines. */
|
||||||
char *lines_flags; /* One set of flag bits for each line. */
|
unsigned char *lines_flags; /* One set of flag bits for each line. */
|
||||||
int any_recurse; /* Nonzero if any `lines_recurse' elt has */
|
unsigned short ncommand_lines;/* Number of command lines. */
|
||||||
|
char recipe_prefix; /* Recipe prefix for this command set. */
|
||||||
|
unsigned int any_recurse:1; /* Nonzero if any 'lines_flags' elt has */
|
||||||
/* the COMMANDS_RECURSE bit set. */
|
/* the COMMANDS_RECURSE bit set. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Bits in `lines_flags'. */
|
/* Bits in 'lines_flags'. */
|
||||||
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
||||||
#define COMMANDS_SILENT 2 /* Silent: @. */
|
#define COMMANDS_SILENT 2 /* Silent: @. */
|
||||||
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
||||||
|
|
||||||
extern void execute_file_commands PARAMS ((struct file *file));
|
void execute_file_commands (struct file *file);
|
||||||
extern void print_commands PARAMS ((struct commands *cmds));
|
void print_commands (const struct commands *cmds);
|
||||||
extern void delete_child_targets PARAMS ((struct child *child));
|
void delete_child_targets (struct child *child);
|
||||||
extern void chop_commands PARAMS ((struct commands *cmds));
|
void chop_commands (struct commands *cmds);
|
||||||
|
void set_file_variables (struct file *file);
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
/* config.h -- hand-massaged for Amiga -*-C-*-
|
||||||
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* Define if on AIX 3.
|
/* Define if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
@@ -23,14 +37,14 @@
|
|||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||||
/* #undef DGUX */
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define if the 'getloadavg' function needs to be run setuid or setgid. */
|
||||||
/* #undef GETLOADAVG_PRIVILEGED */
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
if <inttypes.h> doesn't define. */
|
if <inttypes.h> doesn't define. */
|
||||||
#define uintmax_t unsigned long
|
#define uintmax_t unsigned long
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define gid_t int
|
#define gid_t int
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
/* Define if you have alloca, as a function or macro. */
|
||||||
@@ -39,25 +53,25 @@
|
|||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||||
/* #undef HAVE_ALLOCA_H */
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define if you don't have vprintf but do have _doprnt. */
|
|
||||||
/* #undef HAVE_DOPRNT */
|
|
||||||
|
|
||||||
/* Define if your system has a working fnmatch function. */
|
/* Define if your system has a working fnmatch function. */
|
||||||
/* #undef HAVE_FNMATCH */
|
/* #undef HAVE_FNMATCH */
|
||||||
|
|
||||||
/* Define if your system has its own `getloadavg' function. */
|
/* Define if your system has its own 'getloadavg' function. */
|
||||||
/* #undef HAVE_GETLOADAVG */
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
/* Define if you have the getmntent function. */
|
/* Define if you have the getmntent function. */
|
||||||
/* #undef HAVE_GETMNTENT */
|
/* #undef HAVE_GETMNTENT */
|
||||||
|
|
||||||
/* Define if the `long double' type works. */
|
/* Embed GNU Guile support */
|
||||||
|
/* #undef HAVE_GUILE */
|
||||||
|
|
||||||
|
/* Define if the 'long double' type works. */
|
||||||
/* #undef HAVE_LONG_DOUBLE */
|
/* #undef HAVE_LONG_DOUBLE */
|
||||||
|
|
||||||
/* Define if you support file names longer than 14 characters. */
|
/* Define if you support file names longer than 14 characters. */
|
||||||
#define HAVE_LONG_FILE_NAMES 1
|
#define HAVE_LONG_FILE_NAMES 1
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
/* Define if you have a working 'mmap' system call. */
|
||||||
/* #undef HAVE_MMAP */
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
/* Define if system calls automatically restart after interruption
|
/* Define if system calls automatically restart after interruption
|
||||||
@@ -95,12 +109,6 @@
|
|||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||||
/* #undef HAVE_UTIME_NULL */
|
/* #undef HAVE_UTIME_NULL */
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
|
||||||
/* #undef HAVE_VFORK_H */
|
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
|
||||||
/* Define if you have the wait3 system call. */
|
/* Define if you have the wait3 system call. */
|
||||||
/* #undef HAVE_WAIT3 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
@@ -116,7 +124,7 @@
|
|||||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
/* Define if your C compiler doesn't accept -c and -o together. */
|
||||||
/* #undef NO_MINUS_C_MINUS_O */
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define pid_t int
|
#define pid_t int
|
||||||
|
|
||||||
/* Define if the system does not provide POSIX.1 features except
|
/* Define if the system does not provide POSIX.1 features except
|
||||||
@@ -143,7 +151,7 @@
|
|||||||
*/
|
*/
|
||||||
#define STACK_DIRECTION -1
|
#define STACK_DIRECTION -1
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Define if you have the ANSI C header files. */
|
||||||
@@ -152,10 +160,10 @@
|
|||||||
/* Define on System V Release 4. */
|
/* Define on System V Release 4. */
|
||||||
/* #undef SVR4 */
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Define if 'sys_siglist' is declared by <signal.h>. */
|
||||||
/* #undef SYS_SIGLIST_DECLARED */
|
/* #undef SYS_SIGLIST_DECLARED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define uid_t int
|
#define uid_t int
|
||||||
|
|
||||||
/* Define for Encore UMAX. */
|
/* Define for Encore UMAX. */
|
||||||
@@ -165,19 +173,16 @@
|
|||||||
instead of <sys/cpustats.h>. */
|
instead of <sys/cpustats.h>. */
|
||||||
/* #undef UMAX4_3 */
|
/* #undef UMAX4_3 */
|
||||||
|
|
||||||
/* Define vfork as fork if vfork does not work. */
|
|
||||||
/* #undef vfork */
|
|
||||||
|
|
||||||
/* Name of this package (needed by automake) */
|
/* Name of this package (needed by automake) */
|
||||||
#define PACKAGE "%PACKAGE%"
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
/* Version of this package (needed by automake) */
|
/* Version of this package (needed by automake) */
|
||||||
#define VERSION "%VERSION%"
|
#define VERSION "%VERSION%"
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
#define SCCS_GET "get"
|
#define SCCS_GET "get"
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||||
/* #undef SCCS_GET_MINUS_G */
|
/* #undef SCCS_GET_MINUS_G */
|
||||||
|
|
||||||
/* Define this to enable job server support in GNU make. */
|
/* Define this to enable job server support in GNU make. */
|
||||||
@@ -187,13 +192,13 @@
|
|||||||
if it exists. */
|
if it exists. */
|
||||||
/* #undef ST_MTIM_NSEC */
|
/* #undef ST_MTIM_NSEC */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `sys_siglist'. */
|
/* Define this if the C library defines the variable 'sys_siglist'. */
|
||||||
/* #undef HAVE_SYS_SIGLIST */
|
/* #undef HAVE_SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
/* Define this if the C library defines the variable '_sys_siglist'. */
|
||||||
/* #undef HAVE__SYS_SIGLIST */
|
/* #undef HAVE__SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
/* Define this if you have the 'union wait' type in <sys/wait.h>. */
|
||||||
/* #undef HAVE_UNION_WAIT */
|
/* #undef HAVE_UNION_WAIT */
|
||||||
|
|
||||||
/* Define if you have the dup2 function. */
|
/* Define if you have the dup2 function. */
|
||||||
@@ -244,9 +249,15 @@
|
|||||||
/* Define if you have the socket function. */
|
/* Define if you have the socket function. */
|
||||||
/* #undef HAVE_SOCKET */
|
/* #undef HAVE_SOCKET */
|
||||||
|
|
||||||
/* Define if you have the strcasecmp function. */
|
/* Define to 1 if you have the strcasecmp function. */
|
||||||
/* #undef HAVE_STRCASECMP */
|
/* #undef HAVE_STRCASECMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcmpi function. */
|
||||||
|
/* #undef HAVE_STRCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the stricmp function. */
|
||||||
|
/* #undef HAVE_STRICMP */
|
||||||
|
|
||||||
/* Define if you have the strerror function. */
|
/* Define if you have the strerror function. */
|
||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
@@ -307,9 +318,18 @@
|
|||||||
/* Define if you have the kstat library (-lkstat). */
|
/* Define if you have the kstat library (-lkstat). */
|
||||||
/* #undef HAVE_LIBKSTAT */
|
/* #undef HAVE_LIBKSTAT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `isatty' function. */
|
||||||
|
/* #undef HAVE_ISATTY */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ttyname' function. */
|
||||||
|
/* #undef HAVE_TTYNAME */
|
||||||
|
|
||||||
/* Define if you have the sun library (-lsun). */
|
/* Define if you have the sun library (-lsun). */
|
||||||
/* #undef HAVE_LIBSUN */
|
/* #undef HAVE_LIBSUN */
|
||||||
|
|
||||||
|
/* Output sync sypport */
|
||||||
|
#define NO_OUTPUT_SYNC
|
||||||
|
|
||||||
/* Define for Case Insensitve behavior */
|
/* Define for Case Insensitve behavior */
|
||||||
#define HAVE_CASE_INSENSITIVE_FS
|
#define HAVE_CASE_INSENSITIVE_FS
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,30 @@
|
|||||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> */
|
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
||||||
/* config.h. Generated automatically by configure. */
|
|
||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
|
||||||
|
|
||||||
/* Define if on AIX 3.
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* config.h. Generated automatically by configure. */
|
||||||
|
/* config.h.in. Generated automatically from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Pull in types.h here to get __CRTL_VER defined for old versions of the
|
||||||
|
compiler which don't define it. */
|
||||||
|
#ifdef __DECC
|
||||||
|
# include <types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
We just want to avoid a redefinition error message. */
|
We just want to avoid a redefinition error message. */
|
||||||
#ifndef _ALL_SOURCE
|
#ifndef _ALL_SOURCE
|
||||||
@@ -18,7 +40,10 @@
|
|||||||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
||||||
/* #undef HAVE_GETTEXT */
|
/* #undef HAVE_GETTEXT */
|
||||||
|
|
||||||
/* Define if your locale.h file contains LC_MESSAGES. */
|
/* Embed GNU Guile support */
|
||||||
|
/* #undef HAVE_GUILE */
|
||||||
|
|
||||||
|
/* Define to 1 if your locale.h file contains LC_MESSAGES. */
|
||||||
/* #undef HAVE_LC_MESSAGES */
|
/* #undef HAVE_LC_MESSAGES */
|
||||||
|
|
||||||
/* Define to the installation directory for locales. */
|
/* Define to the installation directory for locales. */
|
||||||
@@ -27,7 +52,7 @@
|
|||||||
/* Define as 1 if you have the stpcpy function. */
|
/* Define as 1 if you have the stpcpy function. */
|
||||||
/* #undef HAVE_STPCPY */
|
/* #undef HAVE_STPCPY */
|
||||||
|
|
||||||
/* Define if the closedir function returns void instead of int. */
|
/* Define to 1 if the closedir function returns void instead of int. */
|
||||||
/* #undef CLOSEDIR_VOID */
|
/* #undef CLOSEDIR_VOID */
|
||||||
|
|
||||||
/* Define to empty if the keyword does not work. */
|
/* Define to empty if the keyword does not work. */
|
||||||
@@ -40,118 +65,117 @@
|
|||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||||
/* #undef DGUX */
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define to 1 if the 'getloadavg' function needs to be run setuid or setgid. */
|
||||||
/* #undef GETLOADAVG_PRIVILEGED */
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
if <inttypes.h> doesn't define. */
|
if <inttypes.h> doesn't define. */
|
||||||
#define uintmax_t unsigned long
|
#define uintmax_t unsigned long
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
/* #undef gid_t */
|
/* #undef gid_t */
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
/* Define to 1 if you have alloca, as a function or macro. */
|
||||||
#define HAVE_ALLOCA 1
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||||
/* #undef HAVE_ALLOCA_H */
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define if you don't have vprintf but do have _doprnt. */
|
/* Define to 1 if you have the fdopen function. */
|
||||||
/* #undef HAVE_DOPRNT */
|
#define HAVE_FDOPEN 1
|
||||||
|
|
||||||
/* Define if your system has a working fnmatch function. */
|
/* Define to 1 if your system has a working fnmatch function. */
|
||||||
/* #undef HAVE_FNMATCH */
|
/* #undef HAVE_FNMATCH */
|
||||||
|
|
||||||
/* Define if your system has its own `getloadavg' function. */
|
/* Define to 1 if your system has its own 'getloadavg' function. */
|
||||||
/* #undef HAVE_GETLOADAVG */
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
/* Define if you have the getmntent function. */
|
/* Define to 1 if you have the getmntent function. */
|
||||||
/* #undef HAVE_GETMNTENT */
|
/* #undef HAVE_GETMNTENT */
|
||||||
|
|
||||||
/* Define if the `long double' type works. */
|
/* Define to 1 if the 'long double' type works. */
|
||||||
/* #undef HAVE_LONG_DOUBLE */
|
/* #undef HAVE_LONG_DOUBLE */
|
||||||
|
|
||||||
/* Define if you support file names longer than 14 characters. */
|
/* Define to 1 if you support file names longer than 14 characters. */
|
||||||
#define HAVE_LONG_FILE_NAMES 1
|
#define HAVE_LONG_FILE_NAMES 1
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
/* Define to 1 if you have a working 'mmap' system call. */
|
||||||
/* #undef HAVE_MMAP */
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
/* Define if system calls automatically restart after interruption
|
/* Define to 1 if system calls automatically restart after interruption
|
||||||
by a signal. */
|
by a signal. */
|
||||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blksize. */
|
/* Define to 1 if your struct stat has st_blksize. */
|
||||||
/* #undef HAVE_ST_BLKSIZE */
|
/* #undef HAVE_ST_BLKSIZE */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blocks. */
|
/* Define to 1 if your struct stat has st_blocks. */
|
||||||
/* #undef HAVE_ST_BLOCKS */
|
/* #undef HAVE_ST_BLOCKS */
|
||||||
|
|
||||||
/* Define if you have the strcoll function and it is properly defined. */
|
/* Define to 1 if you have the strcoll function and it is properly defined. */
|
||||||
/* #undef HAVE_STRCOLL */
|
/* #undef HAVE_STRCOLL */
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
/* Define to 1 if you have the strncasecmp' function. */
|
||||||
|
#if __CRTL_VER >= 70000000
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if your struct stat has st_rdev. */
|
||||||
/* #undef HAVE_ST_RDEV */
|
/* #undef HAVE_ST_RDEV */
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
/* Define to 1 if you have the strftime function. */
|
||||||
/* #undef HAVE_STRFTIME */
|
/* #undef HAVE_STRFTIME */
|
||||||
|
|
||||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if your struct tm has tm_zone. */
|
/* Define to 1 if your struct tm has tm_zone. */
|
||||||
/* #undef HAVE_TM_ZONE */
|
/* #undef HAVE_TM_ZONE */
|
||||||
|
|
||||||
/* Define if you don't have tm_zone but do have the external array
|
/* Define to 1 if you don't have tm_zone but do have the external array
|
||||||
tzname. */
|
tzname. */
|
||||||
/* #undef HAVE_TZNAME */
|
/* #undef HAVE_TZNAME */
|
||||||
|
|
||||||
/* Define if you have <unistd.h>. */
|
/* Define to 1 if you have <unistd.h>. */
|
||||||
#ifdef __DECC
|
#ifdef __DECC
|
||||||
#define HAVE_UNISTD_H 1
|
#define HAVE_UNISTD_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
/* Define to 1 if utime(file, NULL) sets file's timestamp to the present. */
|
||||||
/* #undef HAVE_UTIME_NULL */
|
/* #undef HAVE_UTIME_NULL */
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
/* Define to 1 if you have the wait3 system call. */
|
||||||
/* #undef HAVE_VFORK_H */
|
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
|
||||||
/* Define if you have the wait3 system call. */
|
|
||||||
/* #undef HAVE_WAIT3 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define if on MINIX. */
|
/* Define to 1 if on MINIX. */
|
||||||
/* #undef _MINIX */
|
/* #undef _MINIX */
|
||||||
|
|
||||||
/* Define if your struct nlist has an n_un member. */
|
/* Define to 1 if your struct nlist has an n_un member. */
|
||||||
/* #undef NLIST_NAME_UNION */
|
/* #undef NLIST_NAME_UNION */
|
||||||
|
|
||||||
/* Define if you have <nlist.h>. */
|
/* Define to 1 if you have <nlist.h>. */
|
||||||
/* #undef NLIST_STRUCT */
|
/* #undef NLIST_STRUCT */
|
||||||
|
|
||||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
/* #undef NO_MINUS_C_MINUS_O */
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
/* I assume types.h is available for all 5.0 cc/cxx compilers */
|
/* I assume types.h is available for all 5.0 cc/cxx compilers */
|
||||||
#if __DECC_VER < 50090000
|
#if __DECC_VER < 50090000
|
||||||
#define pid_t int
|
#define pid_t int
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if the system does not provide POSIX.1 features except
|
/* Define to 1 if the system does not provide POSIX.1 features except
|
||||||
with this defined. */
|
with this defined. */
|
||||||
/* #undef _POSIX_1_SOURCE */
|
/* #undef _POSIX_1_SOURCE */
|
||||||
|
|
||||||
/* Define if you need to in order for stat and other things to work. */
|
/* Define to 1 if you need to in order for stat and other things to work. */
|
||||||
/* #undef _POSIX_SOURCE */
|
/* #undef _POSIX_SOURCE */
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
/* Define as the return type of signal handlers (int or void). */
|
||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
/* Define if the setvbuf function takes the buffering type as its second
|
/* Define to 1 if the setvbuf function takes the buffering type as its second
|
||||||
argument and the buffer pointer as the third, as on System V
|
argument and the buffer pointer as the third, as on System V
|
||||||
before release 3. */
|
before release 3. */
|
||||||
/* #undef SETVBUF_REVERSED */
|
/* #undef SETVBUF_REVERSED */
|
||||||
@@ -165,19 +189,19 @@
|
|||||||
*/
|
*/
|
||||||
/* #undef STACK_DIRECTION */
|
/* #undef STACK_DIRECTION */
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
/* #undef STDC_HEADERS */
|
/* #undef STDC_HEADERS */
|
||||||
|
|
||||||
/* Define on System V Release 4. */
|
/* Define on System V Release 4. */
|
||||||
/* #undef SVR4 */
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Define to 1 if 'sys_siglist' is declared by <signal.h>. */
|
||||||
/* #undef SYS_SIGLIST_DECLARED */
|
/* #undef SYS_SIGLIST_DECLARED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#if __DECC_VER < 50090000
|
#if __DECC_VER < 50090000
|
||||||
#define uid_t int
|
#define uid_t int
|
||||||
#endif
|
#endif
|
||||||
@@ -189,19 +213,16 @@
|
|||||||
instead of <sys/cpustats.h>. */
|
instead of <sys/cpustats.h>. */
|
||||||
/* #undef UMAX4_3 */
|
/* #undef UMAX4_3 */
|
||||||
|
|
||||||
/* Define vfork as fork if vfork does not work. */
|
|
||||||
/* #undef vfork */
|
|
||||||
|
|
||||||
/* Name of this package (needed by automake) */
|
/* Name of this package (needed by automake) */
|
||||||
#define PACKAGE "%PACKAGE%"
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
/* Version of this package (needed by automake) */
|
/* Version of this package (needed by automake) */
|
||||||
#define VERSION "%VERSION%"
|
#define VERSION "%VERSION%"
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
/* #undef SCCS_GET */
|
/* #undef SCCS_GET */
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||||
/* #undef SCCS_GET_MINUS_G */
|
/* #undef SCCS_GET_MINUS_G */
|
||||||
|
|
||||||
/* Define this to enable job server support in GNU make. */
|
/* Define this to enable job server support in GNU make. */
|
||||||
@@ -211,140 +232,149 @@
|
|||||||
if it exists. */
|
if it exists. */
|
||||||
/* #undef ST_MTIM_NSEC */
|
/* #undef ST_MTIM_NSEC */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `sys_siglist'. */
|
/* Define to 1 if the C library defines the variable 'sys_siglist'. */
|
||||||
/* #undefine HAVE_SYS_SIGLIST */
|
/* #undefine HAVE_SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||||
/* #undef HAVE__SYS_SIGLIST */
|
/* #undef HAVE__SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
/* Define to 1 if you have the 'union wait' type in <sys/wait.h>. */
|
||||||
/* #undef HAVE_UNION_WAIT */
|
/* #undef HAVE_UNION_WAIT */
|
||||||
|
|
||||||
/* Define if you have the dup2 function. */
|
/* Define to 1 if you have the dup2 function. */
|
||||||
#define HAVE_DUP2 1
|
#define HAVE_DUP2 1
|
||||||
|
|
||||||
/* Define if you have the getcwd function. */
|
/* Define to 1 if you have the getcwd function. */
|
||||||
#define HAVE_GETCWD 1
|
#define HAVE_GETCWD 1
|
||||||
|
|
||||||
/* Define if you have the getgroups function. */
|
/* Define to 1 if you have the getgroups function. */
|
||||||
/* #undef HAVE_GETGROUPS */
|
/* #undef HAVE_GETGROUPS */
|
||||||
|
|
||||||
/* Define if you have the gethostbyname function. */
|
/* Define to 1 if you have the gethostbyname function. */
|
||||||
/* #undef HAVE_GETHOSTBYNAME */
|
/* #undef HAVE_GETHOSTBYNAME */
|
||||||
|
|
||||||
/* Define if you have the gethostname function. */
|
/* Define to 1 if you have the gethostname function. */
|
||||||
/* #undef HAVE_GETHOSTNAME */
|
/* #undef HAVE_GETHOSTNAME */
|
||||||
|
|
||||||
/* Define if you have the getloadavg function. */
|
/* Define to 1 if you have the memmove function. */
|
||||||
/* #undef HAVE_GETLOADAVG */
|
|
||||||
|
|
||||||
/* Define if you have the memmove function. */
|
|
||||||
#define HAVE_MEMMOVE 1
|
#define HAVE_MEMMOVE 1
|
||||||
|
|
||||||
/* Define if you have the mktemp function. */
|
/* Define to 1 if you have the mktemp function. */
|
||||||
#define HAVE_MKTEMP 1
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
/* Define if you have the psignal function. */
|
/* Define to 1 if you have the psignal function. */
|
||||||
/* #undef HAVE_PSIGNAL */
|
/* #undef HAVE_PSIGNAL */
|
||||||
|
|
||||||
/* Define if you have the pstat_getdynamic function. */
|
/* Define to 1 if you have the pstat_getdynamic function. */
|
||||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||||
|
|
||||||
/* Define if you have the setegid function. */
|
/* Define to 1 if you have the setegid function. */
|
||||||
/* #undef HAVE_SETEGID */
|
/* #undef HAVE_SETEGID */
|
||||||
|
|
||||||
/* Define if you have the seteuid function. */
|
/* Define to 1 if you have the seteuid function. */
|
||||||
/* #undef HAVE_SETEUID */
|
/* #undef HAVE_SETEUID */
|
||||||
|
|
||||||
/* Define if you have the setlinebuf function. */
|
/* Define to 1 if you have the setlinebuf function. */
|
||||||
/* #undef HAVE_SETLINEBUF */
|
/* #undef HAVE_SETLINEBUF */
|
||||||
|
|
||||||
/* Define if you have the setregid function. */
|
/* Define to 1 if you have the setregid function. */
|
||||||
/* #undefine HAVE_SETREGID */
|
/* #undefine HAVE_SETREGID */
|
||||||
|
|
||||||
/* Define if you have the setreuid function. */
|
/* Define to 1 if you have the setreuid function. */
|
||||||
/* #define HAVE_SETREUID */
|
/* #define HAVE_SETREUID */
|
||||||
|
|
||||||
/* Define if you have the sigsetmask function. */
|
/* Define to 1 if you have the sigsetmask function. */
|
||||||
#define HAVE_SIGSETMASK 1
|
#define HAVE_SIGSETMASK 1
|
||||||
|
|
||||||
/* Define if you have the socket function. */
|
/* Define to 1 if you have the socket function. */
|
||||||
/* #undef HAVE_SOCKET */
|
/* #undef HAVE_SOCKET */
|
||||||
|
|
||||||
/* Define if you have the strcasecmp function. */
|
/* Define to 1 if you have the strcasecmp function. */
|
||||||
/* #undef HAVE_STRCASECMP */
|
#define HAVE_STRCASECMP 1
|
||||||
|
|
||||||
/* Define if you have the strerror function. */
|
/* Define to 1 if you have the strcmpi function. */
|
||||||
|
/* #undef HAVE_STRCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the stricmp function. */
|
||||||
|
/* #undef HAVE_STRICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strerror function. */
|
||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
/* Define if you have the strsignal function. */
|
/* Define to 1 if you have the strsignal function. */
|
||||||
/* #undef HAVE_STRSIGNAL */
|
/* #undef HAVE_STRSIGNAL */
|
||||||
|
|
||||||
/* Define if you have the wait3 function. */
|
/* Define to 1 if you have the wait3 function. */
|
||||||
/* #undef HAVE_WAIT3 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define if you have the waitpid function. */
|
/* Define to 1 if you have the waitpid function. */
|
||||||
/* #undef HAVE_WAITPID */
|
/* #undef HAVE_WAITPID */
|
||||||
|
|
||||||
/* Define if you have the <dirent.h> header file. */
|
/* Define to 1 if you have the <dirent.h> header file. */
|
||||||
#define HAVE_DIRENT_H 1
|
#define HAVE_DIRENT_H 1
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
#ifdef __DECC
|
#ifdef __DECC
|
||||||
#define HAVE_FCNTL_H 1
|
#define HAVE_FCNTL_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
#define HAVE_LIMITS_H 1
|
#define HAVE_LIMITS_H 1
|
||||||
|
|
||||||
/* Define if you have the <mach/mach.h> header file. */
|
/* Define to 1 if you have the <mach/mach.h> header file. */
|
||||||
/* #undef HAVE_MACH_MACH_H */
|
/* #undef HAVE_MACH_MACH_H */
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
/* #undef HAVE_MEMORY_H */
|
/* #undef HAVE_MEMORY_H */
|
||||||
|
|
||||||
/* Define if you have the <ndir.h> header file. */
|
/* Define to 1 if you have the <ndir.h> header file. */
|
||||||
/* #undef HAVE_NDIR_H */
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
/* Define if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define if you have the <sys/dir.h> header file. */
|
/* Define to 1 if you have the <sys/dir.h> header file. */
|
||||||
/* #undef HAVE_SYS_DIR_H */
|
/* #undef HAVE_SYS_DIR_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/ndir.h> header file. */
|
/* Define to 1 if you have the <sys/ndir.h> header file. */
|
||||||
/* #undef HAVE_SYS_NDIR_H */
|
/* #undef HAVE_SYS_NDIR_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
/* #undef HAVE_SYS_PARAM_H */
|
/* #undef HAVE_SYS_PARAM_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/timeb.h> header file. */
|
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
#define HAVE_SYS_TIMEB_H 1
|
#define HAVE_SYS_TIMEB_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <sys/wait.h> header file. */
|
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if you have the dgc library (-ldgc). */
|
/* Define to 1 if you have the dgc library (-ldgc). */
|
||||||
/* #undef HAVE_LIBDGC */
|
/* #undef HAVE_LIBDGC */
|
||||||
|
|
||||||
/* Define if you have the kstat library (-lkstat). */
|
/* Define to 1 if you have the kstat library (-lkstat). */
|
||||||
/* #undef HAVE_LIBKSTAT *
|
/* #undef HAVE_LIBKSTAT *
|
||||||
|
|
||||||
/* Define if you have the sun library (-lsun). */
|
/* Define to 1 if you have the sun library (-lsun). */
|
||||||
/* #undef HAVE_LIBSUN */
|
/* #undef HAVE_LIBSUN */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `isatty' function. */
|
||||||
|
/* #undef HAVE_ISATTY */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ttyname' function. */
|
||||||
|
/* #undef HAVE_TTYNAME */
|
||||||
|
|
||||||
/* Use high resolution file timestamps if nonzero. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#define FILE_TIMESTAMP_HI_RES 0
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
|
|
||||||
/* Define for case insensitve filenames */
|
/* Define for case insensitve filenames */
|
||||||
#define HAVE_CASE_INSENSITIVE_FS 1
|
#define HAVE_CASE_INSENSITIVE_FS 1
|
||||||
|
|
||||||
/* VMS specific, define it if you want to use case sensitve targets */
|
/* VMS specific, define it if you want to use case sensitive targets */
|
||||||
/* #undef WANT_CASE_SENSITIVE_TARGETS */
|
/* #undef WANT_CASE_SENSITIVE_TARGETS */
|
||||||
|
|
||||||
/* VMS specific, V7.0 has opendir() and friends, so it's undefined */
|
/* VMS specific, V7.0 has opendir() and friends, so it's undefined */
|
||||||
@@ -354,15 +384,9 @@
|
|||||||
/* #undef HAVE_VMSDIR_H */
|
/* #undef HAVE_VMSDIR_H */
|
||||||
/* #undef _DIRENT_HAVE_D_NAMLEN */
|
/* #undef _DIRENT_HAVE_D_NAMLEN */
|
||||||
|
|
||||||
/* On older systems without 7.0 backport of CRTL the first one is defined */
|
/* On older systems without 7.0 backport of CRTL use non-VMS code for opendir() etc. */
|
||||||
#ifdef __CRTL_VER
|
#if __CRTL_VER < 70000000
|
||||||
# if __CRTL_VER < 70000000
|
|
||||||
# define HAVE_VMSDIR_H 1
|
# define HAVE_VMSDIR_H 1
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# if __VMS_VER < 70000000
|
|
||||||
# define HAVE_VMSDIR_H 1
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
||||||
@@ -382,22 +406,27 @@
|
|||||||
#define optopt gnu_optopt
|
#define optopt gnu_optopt
|
||||||
#define optind gnu_optind
|
#define optind gnu_optind
|
||||||
#define opterr gnu_opterr
|
#define opterr gnu_opterr
|
||||||
|
#define globfree gnu_globfree
|
||||||
|
#define glob gnu_glob
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
|
||||||
#undef PARAMS
|
|
||||||
#define PARAMS(protos) protos
|
|
||||||
#else /* Not C++ or ANSI C. */
|
|
||||||
#undef PARAMS
|
|
||||||
#define PARAMS(protos) ()
|
|
||||||
#endif /* C++ or ANSI C. */
|
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
/* Define if using alloca.c. */
|
||||||
/* #undef C_ALLOCA */
|
/* #undef C_ALLOCA */
|
||||||
/* maybe this should be placed into make.h */
|
/* maybe this should be placed into makeint.h */
|
||||||
#if defined(__VAX) && defined(__DECC)
|
#if defined(__VAX) && defined(__DECC)
|
||||||
#define alloca(n) __ALLOCA(n)
|
#define alloca(n) __ALLOCA(n)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Output sync sypport */
|
||||||
|
#define NO_OUTPUT_SYNC
|
||||||
|
|
||||||
|
/* Define to 1 to write even short single-line actions into a VMS/DCL command
|
||||||
|
file; this also enables exporting make environment variables into the
|
||||||
|
(sub-)process, which executes the action.
|
||||||
|
The usual make rules apply whether a shell variable - here a DCL symbol or
|
||||||
|
VMS logical [see CRTL getenv()] - is added to the make environment and
|
||||||
|
is exported. */
|
||||||
|
#define USE_DCL_COM_FILE 1
|
||||||
|
|
||||||
/* Build host information. */
|
/* Build host information. */
|
||||||
#define MAKE_HOST "VMS"
|
#define MAKE_HOST "VMS"
|
||||||
|
|||||||
@@ -1,388 +1,524 @@
|
|||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
||||||
|
|
||||||
/* Define if on AIX 3.
|
Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
System headers sometimes define this.
|
This file is part of GNU Make.
|
||||||
We just want to avoid a redefinition error message. */
|
|
||||||
#ifndef _ALL_SOURCE
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
/* #undef _ALL_SOURCE */
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* Suppress some Visual C++ warnings.
|
||||||
|
Maybe after the code cleanup for ISO C we can remove some/all of these. */
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
# pragma warning(disable:4100) /* unreferenced formal parameter */
|
||||||
|
# pragma warning(disable:4102) /* unreferenced label */
|
||||||
|
# pragma warning(disable:4127) /* conditional expression is constant */
|
||||||
|
# pragma warning(disable:4131) /* uses old-style declarator */
|
||||||
|
# pragma warning(disable:4702) /* unreachable code */
|
||||||
|
# define _CRT_SECURE_NO_WARNINGS /* function or variable may be unsafe */
|
||||||
|
# define _CRT_NONSTDC_NO_WARNINGS /* functions w/o a leading underscore */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
/* Define to 1 if the 'closedir' function returns void instead of 'int'. */
|
||||||
/* #undef C_ALLOCA */
|
|
||||||
|
|
||||||
/* Define if the closedir function returns void instead of int. */
|
|
||||||
/* #undef CLOSEDIR_VOID */
|
/* #undef CLOSEDIR_VOID */
|
||||||
|
|
||||||
/* Define to empty if the keyword does not work. */
|
/* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP
|
||||||
/* #undef const */
|
systems. This function is required for 'alloca.c' support on those systems.
|
||||||
|
*/
|
||||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
|
||||||
This function is required for alloca.c support on those systems. */
|
|
||||||
/* #undef CRAY_STACKSEG_END */
|
/* #undef CRAY_STACKSEG_END */
|
||||||
|
|
||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define to 1 if using 'alloca.c'. */
|
||||||
|
/* #undef C_ALLOCA */
|
||||||
|
|
||||||
|
/* Define to 1 if using 'getloadavg.c'. */
|
||||||
|
#define C_GETLOADAVG 1
|
||||||
|
|
||||||
|
/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
|
||||||
/* #undef DGUX */
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define to 1 if translation of program messages to the user's native
|
||||||
/* #undef GETLOADAVG_PRIVILEGED */
|
language is requested. */
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
|
||||||
if <inttypes.h> doesn't define. */
|
|
||||||
#define uintmax_t unsigned long
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#undef gid_t
|
|
||||||
#define gid_t int
|
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
|
||||||
#undef HAVE_ALLOCA
|
|
||||||
#define HAVE_ALLOCA 1
|
|
||||||
|
|
||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
|
||||||
/* #undef HAVE_ALLOCA_H */
|
|
||||||
|
|
||||||
/* Define if you don't have vprintf but do have _doprnt. */
|
|
||||||
/* #undef HAVE_DOPRNT */
|
|
||||||
|
|
||||||
/* Define if your system has a working fnmatch function. */
|
|
||||||
/* #undef HAVE_FNMATCH */
|
|
||||||
|
|
||||||
/* Define if your system has its own `getloadavg' function. */
|
|
||||||
/* #undef HAVE_GETLOADAVG */
|
|
||||||
|
|
||||||
/* Define if you have the getmntent function. */
|
|
||||||
/* #undef HAVE_GETMNTENT */
|
|
||||||
|
|
||||||
/* Define if the `long double' type works. */
|
|
||||||
/* #undef HAVE_LONG_DOUBLE */
|
|
||||||
|
|
||||||
/* Define if you support file names longer than 14 characters. */
|
|
||||||
#undef HAVE_LONG_FILE_NAMES
|
|
||||||
#define HAVE_LONG_FILE_NAMES 1
|
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
|
||||||
/* #undef HAVE_MMAP */
|
|
||||||
|
|
||||||
/* Define if system calls automatically restart after interruption
|
|
||||||
by a signal. */
|
|
||||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
|
||||||
|
|
||||||
/* Define if your struct stat has st_blksize. */
|
|
||||||
/* #undef HAVE_ST_BLKSIZE */
|
|
||||||
|
|
||||||
/* Define if your struct stat has st_blocks. */
|
|
||||||
/* #undef HAVE_ST_BLOCKS */
|
|
||||||
|
|
||||||
/* Define if you have the strcoll function and it is properly defined. */
|
|
||||||
#undef HAVE_STRCOLL
|
|
||||||
#define HAVE_STRCOLL 1
|
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
|
||||||
#undef HAVE_ST_RDEV
|
|
||||||
#define HAVE_ST_RDEV 1
|
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
|
||||||
#undef HAVE_STRFTIME
|
|
||||||
#define HAVE_STRFTIME 1
|
|
||||||
|
|
||||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
|
||||||
|
|
||||||
/* Define if your struct tm has tm_zone. */
|
|
||||||
/* #undef HAVE_TM_ZONE */
|
|
||||||
|
|
||||||
/* Define if you don't have tm_zone but do have the external array
|
|
||||||
tzname. */
|
|
||||||
#undef HAVE_TZNAME
|
|
||||||
#define HAVE_TZNAME 1
|
|
||||||
|
|
||||||
/* Define if you have <unistd.h>. */
|
|
||||||
/* #undef HAVE_UNISTD_H */
|
|
||||||
|
|
||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
|
||||||
#undef HAVE_UTIME_NULL
|
|
||||||
#define HAVE_UTIME_NULL 1
|
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
|
||||||
/* #undef HAVE_VFORK_H */
|
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
|
||||||
#undef HAVE_VPRINTF
|
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
|
||||||
/* Define if you have the wait3 system call. */
|
|
||||||
/* #undef HAVE_WAIT3 */
|
|
||||||
|
|
||||||
/* Define if on MINIX. */
|
|
||||||
/* #undef _MINIX */
|
|
||||||
|
|
||||||
/* Define if your struct nlist has an n_un member. */
|
|
||||||
/* #undef NLIST_NAME_UNION */
|
|
||||||
|
|
||||||
/* Define if you have <nlist.h>. */
|
|
||||||
/* #undef NLIST_STRUCT */
|
|
||||||
|
|
||||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
|
||||||
/* #undef NO_MINUS_C_MINUS_O */
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#undef pid_t
|
|
||||||
#define pid_t int
|
|
||||||
|
|
||||||
/* Define if the system does not provide POSIX.1 features except
|
|
||||||
with this defined. */
|
|
||||||
/* #undef _POSIX_1_SOURCE */
|
|
||||||
|
|
||||||
/* Define if you need to in order for stat and other things to work. */
|
|
||||||
#undef _POSIX_SOURCE
|
|
||||||
#define _POSIX_SOURCE 1
|
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
|
||||||
#undef RETSIGTYPE
|
|
||||||
#define RETSIGTYPE void
|
|
||||||
|
|
||||||
/* Define if the setvbuf function takes the buffering type as its second
|
|
||||||
argument and the buffer pointer as the third, as on System V
|
|
||||||
before release 3. */
|
|
||||||
/* #undef SETVBUF_REVERSED */
|
|
||||||
|
|
||||||
/* If using the C implementation of alloca, define if you know the
|
|
||||||
direction of stack growth for your system; otherwise it will be
|
|
||||||
automatically deduced at run-time.
|
|
||||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
|
||||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
|
||||||
STACK_DIRECTION = 0 => direction of growth unknown
|
|
||||||
*/
|
|
||||||
/* #undef STACK_DIRECTION */
|
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
|
||||||
#undef STDC_HEADERS
|
|
||||||
#define STDC_HEADERS 1
|
|
||||||
|
|
||||||
/* Define on System V Release 4. */
|
|
||||||
/* #undef SVR4 */
|
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
|
||||||
/* #undef SYS_SIGLIST_DECLARED */
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#undef uid_t
|
|
||||||
#define uid_t int
|
|
||||||
|
|
||||||
/* Define for Encore UMAX. */
|
|
||||||
/* #undef UMAX */
|
|
||||||
|
|
||||||
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
|
|
||||||
instead of <sys/cpustats.h>. */
|
|
||||||
/* #undef UMAX4_3 */
|
|
||||||
|
|
||||||
/* Define vfork as fork if vfork does not work. */
|
|
||||||
/* #undef vfork */
|
|
||||||
|
|
||||||
/* Name of this package (needed by automake) */
|
|
||||||
#define PACKAGE "%PACKAGE%"
|
|
||||||
|
|
||||||
/* Version of this package (needed by automake) */
|
|
||||||
#define VERSION "%VERSION%"
|
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
|
||||||
#undef SCCS_GET
|
|
||||||
#define SCCS_GET "echo no sccs get"
|
|
||||||
|
|
||||||
/* Define to 1 if NLS is requested. */
|
|
||||||
/* #undef ENABLE_NLS */
|
/* #undef ENABLE_NLS */
|
||||||
|
|
||||||
/* Define as 1 if you have dcgettext. */
|
|
||||||
/* #undef HAVE_DCGETTEXT */
|
|
||||||
|
|
||||||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
|
||||||
/* #undef HAVE_GETTEXT */
|
|
||||||
|
|
||||||
/* Define if your locale.h file contains LC_MESSAGES. */
|
|
||||||
/* #undef HAVE_LC_MESSAGES */
|
|
||||||
|
|
||||||
/* Define to the installation directory for locales. */
|
|
||||||
#define LOCALEDIR ""
|
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
|
||||||
/* #undef SCCS_GET_MINUS_G */
|
|
||||||
|
|
||||||
/* Define this to enable job server support in GNU make. */
|
|
||||||
/* #undef MAKE_JOBSERVER */
|
|
||||||
|
|
||||||
/* Define to be the nanoseconds member of struct stat's st_mtim,
|
|
||||||
if it exists. */
|
|
||||||
/* #undef ST_MTIM_NSEC */
|
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `sys_siglist'. */
|
|
||||||
/* #undef HAVE_SYS_SIGLIST */
|
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
|
||||||
/* #undef HAVE__SYS_SIGLIST */
|
|
||||||
|
|
||||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
|
||||||
/* #undef HAVE_UNION_WAIT */
|
|
||||||
|
|
||||||
/* Define if you have the dup2 function. */
|
|
||||||
#undef HAVE_DUP2
|
|
||||||
#define HAVE_DUP2 1
|
|
||||||
|
|
||||||
/* Define if you have the getcwd function. */
|
|
||||||
#undef HAVE_GETCWD
|
|
||||||
#define HAVE_GETCWD 1
|
|
||||||
|
|
||||||
/* Define if you have the getgroups function. */
|
|
||||||
/* #undef HAVE_GETGROUPS */
|
|
||||||
|
|
||||||
/* Define if you have the gethostbyname function. */
|
|
||||||
/* #undef HAVE_GETHOSTBYNAME */
|
|
||||||
|
|
||||||
/* Define if you have the gethostname function. */
|
|
||||||
/* #undef HAVE_GETHOSTNAME */
|
|
||||||
|
|
||||||
/* Define if you have the getloadavg function. */
|
|
||||||
/* #undef HAVE_GETLOADAVG */
|
|
||||||
|
|
||||||
/* Define if you have the memmove function. */
|
|
||||||
#undef HAVE_MEMMOVE
|
|
||||||
#define HAVE_MEMMOVE 1
|
|
||||||
|
|
||||||
/* Define if you have the mktemp function. */
|
|
||||||
#undef HAVE_MKTEMP
|
|
||||||
#define HAVE_MKTEMP 1
|
|
||||||
|
|
||||||
/* Define if you have the psignal function. */
|
|
||||||
/* #undef HAVE_PSIGNAL */
|
|
||||||
|
|
||||||
/* Define if you have the pstat_getdynamic function. */
|
|
||||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
|
||||||
|
|
||||||
/* Define if you have the setegid function. */
|
|
||||||
/* #undef HAVE_SETEGID */
|
|
||||||
|
|
||||||
/* Define if you have the seteuid function. */
|
|
||||||
/* #undef HAVE_SETEUID */
|
|
||||||
|
|
||||||
/* Define if you have the setlinebuf function. */
|
|
||||||
/* #undef HAVE_SETLINEBUF */
|
|
||||||
|
|
||||||
/* Define if you have the setregid function. */
|
|
||||||
/* #undef HAVE_SETREGID */
|
|
||||||
|
|
||||||
/* Define if you have the setreuid function. */
|
|
||||||
/* #undef HAVE_SETREUID */
|
|
||||||
|
|
||||||
/* Define if you have the sigsetmask function. */
|
|
||||||
/* #undef HAVE_SIGSETMASK */
|
|
||||||
|
|
||||||
/* Define if you have the socket function. */
|
|
||||||
/* #undef HAVE_SOCKET */
|
|
||||||
|
|
||||||
/* Define if you have the strcasecmp function. */
|
|
||||||
/* #undef HAVE_STRCASECMP */
|
|
||||||
|
|
||||||
/* Define if you have the strerror function. */
|
|
||||||
#undef HAVE_STRERROR
|
|
||||||
#define HAVE_STRERROR 1
|
|
||||||
|
|
||||||
/* Define if you have the strsignal function. */
|
|
||||||
/* #undef HAVE_STRSIGNAL */
|
|
||||||
|
|
||||||
/* Define if you have the wait3 function. */
|
|
||||||
/* #undef HAVE_WAIT3 */
|
|
||||||
|
|
||||||
/* Define if you have the waitpid function. */
|
|
||||||
/* #undef HAVE_WAITPID */
|
|
||||||
|
|
||||||
/* Define if you have the <dirent.h> header file. */
|
|
||||||
#undef HAVE_DIRENT_H
|
|
||||||
#define HAVE_DIRENT_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#undef HAVE_FCNTL_H
|
|
||||||
#define HAVE_FCNTL_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#undef HAVE_LIMITS_H
|
|
||||||
#define HAVE_LIMITS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <mach/mach.h> header file. */
|
|
||||||
/* #undef HAVE_MACH_MACH_H */
|
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
|
||||||
#undef HAVE_MEMORY_H
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <ndir.h> header file. */
|
|
||||||
/* #undef HAVE_NDIR_H */
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#undef HAVE_STRING_H
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/dir.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_DIR_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/ndir.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_NDIR_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_PARAM_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/timeb.h> header file. */
|
|
||||||
#undef HAVE_SYS_TIMEB_H
|
|
||||||
#define HAVE_SYS_TIMEB_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/wait.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_WAIT_H */
|
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
|
||||||
/* #undef HAVE_UNISTD_H */
|
|
||||||
|
|
||||||
/* Define if you have the dgc library (-ldgc). */
|
|
||||||
/* #undef HAVE_LIBDGC */
|
|
||||||
|
|
||||||
/* Define if you have the kstat library (-lkstat). */
|
|
||||||
/* #undef HAVE_LIBKSTAT */
|
|
||||||
|
|
||||||
/* Define if you have the sun library (-lsun). */
|
|
||||||
/* #undef HAVE_LIBSUN */
|
|
||||||
|
|
||||||
/* Use high resolution file timestamps if nonzero. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#define FILE_TIMESTAMP_HI_RES 0
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
|
|
||||||
|
/* Define to 1 if the 'getloadavg' function needs to be run setuid or setgid.
|
||||||
|
*/
|
||||||
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
|
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||||
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'atexit' function. */
|
||||||
|
#define HAVE_ATEXIT 1
|
||||||
|
|
||||||
|
/* Use case insensitive file names */
|
||||||
|
/* #undef HAVE_CASE_INSENSITIVE_FS */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the clock_gettime function. */
|
||||||
|
/* #undef HAVE_CLOCK_GETTIME */
|
||||||
|
|
||||||
|
/* Embed GNU Guile support. Windows build sets this on the
|
||||||
|
compilation command line. */
|
||||||
|
/* #undef HAVE_GUILE */
|
||||||
|
|
||||||
|
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_DCGETTEXT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of 'bsd_signal', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL_BSD_SIGNAL 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL_SYS_SIGLIST 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of '_sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL__SYS_SIGLIST 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of '__sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#define HAVE_DECL___SYS_SIGLIST 0
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
|
||||||
|
*/
|
||||||
|
#define HAVE_DIRENT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <direct.h> header file, and it defines getcwd()
|
||||||
|
and chdir().
|
||||||
|
*/
|
||||||
|
#if (defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(__INTERIX)
|
||||||
|
# define HAVE_DIRECT_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Use platform specific coding */
|
||||||
|
#define HAVE_DOS_PATHS 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'dup2' function. */
|
||||||
|
#define HAVE_DUP2 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
|
#define HAVE_FCNTL_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'fdopen' function. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_FDOPEN 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'fileno' function. */
|
||||||
|
#define HAVE_FILENO 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'getcwd' function. */
|
||||||
|
#define HAVE_GETCWD 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'getgroups' function. */
|
||||||
|
/* #undef HAVE_GETGROUPS */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'gethostbyname' function. */
|
||||||
|
/* #undef HAVE_GETHOSTBYNAME */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'gethostname' function. */
|
||||||
|
/* #undef HAVE_GETHOSTNAME */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'getloadavg' function. */
|
||||||
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'getrlimit' function. */
|
||||||
|
/* #undef HAVE_GETRLIMIT */
|
||||||
|
|
||||||
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||||
|
/* #undef HAVE_GETTEXT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a standard gettimeofday function */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_GETTIMEOFDAY 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define if you have the iconv() function. */
|
||||||
|
/* #undef HAVE_ICONV */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_INTTYPES_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'dgc' library (-ldgc). */
|
||||||
|
/* #undef HAVE_LIBDGC */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'kstat' library (-lkstat). */
|
||||||
|
/* #undef HAVE_LIBKSTAT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
|
#define HAVE_LIMITS_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
|
/*#define HAVE_LOCALE_H 1*/
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'lstat' function. */
|
||||||
|
/* #undef HAVE_LSTAT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <mach/mach.h> header file. */
|
||||||
|
/* #undef HAVE_MACH_MACH_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'mkstemp' function. */
|
||||||
|
/* #undef HAVE_MKSTEMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'mktemp' function. */
|
||||||
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ndir.h> header file, and it defines 'DIR'. */
|
||||||
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <nlist.h> header file. */
|
||||||
|
/* #undef HAVE_NLIST_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'pipe' function. */
|
||||||
|
/* #undef HAVE_PIPE */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'pstat_getdynamic' function. */
|
||||||
|
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'readlink' function. */
|
||||||
|
/* #undef HAVE_READLINK */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'realpath' function. */
|
||||||
|
/* #undef HAVE_REALPATH */
|
||||||
|
|
||||||
|
/* Define to 1 if <signal.h> defines the SA_RESTART constant. */
|
||||||
|
/* #undef HAVE_SA_RESTART */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setegid' function. */
|
||||||
|
/* #undef HAVE_SETEGID */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'seteuid' function. */
|
||||||
|
/* #undef HAVE_SETEUID */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||||
|
/* #undef HAVE_SETLINEBUF */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setlocale' function. */
|
||||||
|
/*#define HAVE_SETLOCALE 1*/
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setregid' function. */
|
||||||
|
/* #undef HAVE_SETREGID */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setreuid' function. */
|
||||||
|
/* #undef HAVE_SETREUID */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setrlimit' function. */
|
||||||
|
/* #undef HAVE_SETRLIMIT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setvbuf' function. */
|
||||||
|
#define HAVE_SETVBUF 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'sigaction' function. */
|
||||||
|
/* #undef HAVE_SIGACTION */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'sigsetmask' function. */
|
||||||
|
/* #undef HAVE_SIGSETMASK */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'socket' function. */
|
||||||
|
/* #undef HAVE_SOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strcasecmp' function. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STRCASECMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strcmpi' function. */
|
||||||
|
#define HAVE_STRCMPI 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strcoll' function and it is properly defined.
|
||||||
|
*/
|
||||||
|
#define HAVE_STRCOLL 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strdup' function. */
|
||||||
|
#define HAVE_STRDUP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strerror' function. */
|
||||||
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'stricmp' function. */
|
||||||
|
#define HAVE_STRICMP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
/* #define HAVE_STRINGS_H 1 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strncasecmp' function. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strncmpi' function. */
|
||||||
|
/* #undef HAVE_STRNCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strndup' function. */
|
||||||
|
/* #undef HAVE_STRNDUP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strnicmp' function. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_STRNICMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'strsignal' function. */
|
||||||
|
/* #undef HAVE_STRSIGNAL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `isatty' function. */
|
||||||
|
#define HAVE_ISATTY 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ttyname' function. */
|
||||||
|
#define HAVE_TTYNAME 1
|
||||||
|
char *ttyname (int);
|
||||||
|
|
||||||
|
/* Define to 1 if 'n_un.n_name' is a member of 'struct nlist'. */
|
||||||
|
/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/dir.h> header file, and it defines 'DIR'.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_SYS_DIR_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines 'DIR'.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_SYS_NDIR_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_SYS_PARAM_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||||
|
/* #undef HAVE_SYS_RESOURCE_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||||
|
#define HAVE_SYS_TIMEB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_SYS_TIME_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||||
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the \'union wait' type in <sys/wait.h>. */
|
||||||
|
/* #undef HAVE_UNION_WAIT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define HAVE_UNISTD_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'wait3' function. */
|
||||||
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'waitpid' function. */
|
||||||
|
/* #undef HAVE_WAITPID */
|
||||||
|
|
||||||
/* Build host information. */
|
/* Build host information. */
|
||||||
#define MAKE_HOST "Windows32"
|
#define MAKE_HOST "Windows32"
|
||||||
|
|
||||||
/* Grok DOS paths (drive specs and backslash path element separators) */
|
/* Define to 1 to enable job server support in GNU make. */
|
||||||
#define HAVE_DOS_PATHS
|
#define MAKE_JOBSERVER 1
|
||||||
|
|
||||||
|
/* Define to 1 to enable 'load' support in GNU make. */
|
||||||
|
#define MAKE_LOAD 1
|
||||||
|
|
||||||
|
/* Define to 1 to enable symbolic link timestamp checking. */
|
||||||
|
/* #undef MAKE_SYMLINKS */
|
||||||
|
|
||||||
|
/* Define to 1 if your 'struct nlist' has an 'n_un' member. Obsolete, depend
|
||||||
|
on 'HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||||
|
/* #undef NLIST_NAME_UNION */
|
||||||
|
|
||||||
|
/* Define to 1 if struct nlist.n_name is a pointer rather than an array. */
|
||||||
|
/* #undef NLIST_STRUCT */
|
||||||
|
|
||||||
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
|
/* Name of this package (needed by automake) */
|
||||||
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#define PACKAGE_BUGREPORT "bug-make@gnu.org"
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#define PACKAGE_NAME "GNU make"
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#define PACKAGE_URL "http://www.gnu.org/software/make/"
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#define PACKAGE_VERSION "%VERSION%"
|
||||||
|
|
||||||
|
/* Define to the character that separates directories in PATH. */
|
||||||
|
#define PATH_SEPARATOR_CHAR ';'
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers ('int' or 'void'). */
|
||||||
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
|
#define SCCS_GET "echo no sccs get"
|
||||||
|
|
||||||
|
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||||
|
/* #undef SCCS_GET_MINUS_G */
|
||||||
|
|
||||||
|
/* Define to 1 if the 'setvbuf' function takes the buffering type as its
|
||||||
|
second argument and the buffer pointer as the third, as on System V before
|
||||||
|
release 3. */
|
||||||
|
/* #undef SETVBUF_REVERSED */
|
||||||
|
|
||||||
|
/* If using the C implementation of alloca, define if you know the
|
||||||
|
direction of stack growth for your system; otherwise it will be
|
||||||
|
automatically deduced at run time.
|
||||||
|
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||||
|
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||||
|
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||||
|
/* #undef STACK_DIRECTION */
|
||||||
|
|
||||||
|
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
|
/* Define if struct stat contains a nanoseconds field */
|
||||||
|
/* #undef ST_MTIM_NSEC */
|
||||||
|
|
||||||
|
/* Define to 1 on System V Release 4. */
|
||||||
|
/* #undef SVR4 */
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define TIME_WITH_SYS_TIME 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 for Encore UMAX. */
|
||||||
|
/* #undef UMAX */
|
||||||
|
|
||||||
|
/* Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> instead of
|
||||||
|
<sys/cpustats.h>. */
|
||||||
|
/* #undef UMAX4_3 */
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#define VERSION "%VERSION%"
|
||||||
|
|
||||||
|
/* Define if using the dmalloc debugging malloc package */
|
||||||
|
/* #undef WITH_DMALLOC */
|
||||||
|
|
||||||
|
/* Define to 1 if on AIX 3.
|
||||||
|
System headers sometimes define this.
|
||||||
|
We just want to avoid a redefinition error message. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
/* # undef _ALL_SOURCE */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||||
|
/* #undef _FILE_OFFSET_BITS */
|
||||||
|
|
||||||
|
/* Define for large files, on AIX-style hosts. */
|
||||||
|
/* #undef _LARGE_FILES */
|
||||||
|
|
||||||
|
/* Define to 1 if on MINIX. */
|
||||||
|
/* #undef _MINIX */
|
||||||
|
|
||||||
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||||
|
this defined. */
|
||||||
|
/* #undef _POSIX_1_SOURCE */
|
||||||
|
|
||||||
|
/* Define to 1 if you need to in order for 'stat' and other things to work. */
|
||||||
|
/* #undef _POSIX_SOURCE */
|
||||||
|
|
||||||
|
/* Define to empty if 'const' does not conform to ANSI C. */
|
||||||
|
/* #undef const */
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
|
#define gid_t int
|
||||||
|
|
||||||
|
/* Define to 'int' if <sys/types.h> does not define. */
|
||||||
|
/* GCC 4.x reportedly defines pid_t. */
|
||||||
|
#ifndef _PID_T_
|
||||||
|
#ifdef _WIN64
|
||||||
|
#define pid_t __int64
|
||||||
|
#else
|
||||||
|
#define pid_t int
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
|
#define uid_t int
|
||||||
|
|
||||||
|
/* Define uintmax_t if not defined in <stdint.h> or <inttypes.h>. */
|
||||||
|
#if !HAVE_STDINT_H && !HAVE_INTTYPES_H
|
||||||
|
#define uintmax_t unsigned long
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
|
/* Define to the installation directory for locales. */
|
||||||
|
#define LOCALEDIR ""
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Refer to README.W32 for info on the following settings
|
* Refer to README.W32 for info on the following settings
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If you have a shell that does not grok 'sh -c quoted-command-line'
|
* If you have a shell that does not grok 'sh -c quoted-command-line'
|
||||||
* correctly, you need this setting. Please see below for specific
|
* correctly, you need this setting. Please see below for specific
|
||||||
* shell support.
|
* shell support.
|
||||||
*/
|
*/
|
||||||
#undef BATCH_MODE_ONLY_SHELL
|
/*#define BATCH_MODE_ONLY_SHELL 1 */
|
||||||
#define BATCH_MODE_ONLY_SHELL 1
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define if you have the Cygnus "Cygwin" GNU Windows32 tool set.
|
* Define if you have the Cygnus "Cygwin" GNU Windows32 tool set.
|
||||||
* Do NOT define BATCH_MODE_ONLY_SHELL if you define HAVE_CYGWIN_SHELL
|
* Do NOT define BATCH_MODE_ONLY_SHELL if you define HAVE_CYGWIN_SHELL
|
||||||
*/
|
*/
|
||||||
#undef HAVE_CYGWIN_SHELL
|
/*#define HAVE_CYGWIN_SHELL 1 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define if you have the MKS tool set or shell. Do NOT define
|
* Define if you have the MKS tool set or shell. Do NOT define
|
||||||
* BATCH_MODE_ONLY_SHELL if you define HAVE_MKS_SHELL
|
* BATCH_MODE_ONLY_SHELL if you define HAVE_MKS_SHELL
|
||||||
*/
|
*/
|
||||||
#undef HAVE_MKS_SHELL
|
/*#define HAVE_MKS_SHELL 1 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enforce the mutual exclusivity restriction.
|
* Enforce the mutual exclusivity restriction.
|
||||||
@@ -394,6 +530,3 @@
|
|||||||
#ifdef HAVE_CYGWIN_SHELL
|
#ifdef HAVE_CYGWIN_SHELL
|
||||||
#undef BATCH_MODE_ONLY_SHELL
|
#undef BATCH_MODE_ONLY_SHELL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if you prefer Case Insensitive behavior */
|
|
||||||
#undef HAVE_CASE_INSENSITIVE_FS
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
*.m4
|
|
||||||
config.*
|
|
||||||
|
|
||||||
Makefile Makefile.in
|
|
||||||
12
config/.gitignore
vendored
Normal file
12
config/.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ar-lib
|
||||||
|
compile
|
||||||
|
config.guess
|
||||||
|
config.rpath
|
||||||
|
config.sub
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
mdate-sh
|
||||||
|
missing
|
||||||
|
texinfo.tex
|
||||||
|
*.m4
|
||||||
|
!dospaths.m4
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
2002-04-21 gettextize <bug-gnu-gettext@gnu.org>
|
|
||||||
|
|
||||||
* codeset.m4: New file, from gettext-0.11.1.
|
|
||||||
* gettext.m4: New file, from gettext-0.11.1.
|
|
||||||
* glibc21.m4: New file, from gettext-0.11.1.
|
|
||||||
* iconv.m4: New file, from gettext-0.11.1.
|
|
||||||
* isc-posix.m4: New file, from gettext-0.11.1.
|
|
||||||
* lcmessage.m4: New file, from gettext-0.11.1.
|
|
||||||
* lib-ld.m4: New file, from gettext-0.11.1.
|
|
||||||
* lib-link.m4: New file, from gettext-0.11.1.
|
|
||||||
* lib-prefix.m4: New file, from gettext-0.11.1.
|
|
||||||
* progtest.m4: New file, from gettext-0.11.1.
|
|
||||||
* Makefile.am: New file.
|
|
||||||
|
|
||||||
49
config/ChangeLog.1
Normal file
49
config/ChangeLog.1
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
2012-01-15 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* dospaths.m4: Use AC_LANG_PROGRAM to encapsulate the test code.
|
||||||
|
Fixes Savannah bug #35256. Patch from Sebastian Pipping.
|
||||||
|
|
||||||
|
2006-03-09 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* dospaths.m4: Add MSYS to the list of targets allowing DOS-style
|
||||||
|
pathnames. Reported by David Ergo <david.ergo@alterface.com>.
|
||||||
|
|
||||||
|
2005-07-01 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* Makefile.am (EXTRA_DIST): Added more M4 files to EXTRA_DIST, so
|
||||||
|
users can re-run aclocal.
|
||||||
|
|
||||||
|
2003-04-30 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* dospaths.m4: New macro to test for DOS-style pathnames, based on
|
||||||
|
coreutils 5.0 "dos.m4" by Jim Meyering.
|
||||||
|
|
||||||
|
2002-04-21 gettextize <bug-gnu-gettext@gnu.org>
|
||||||
|
|
||||||
|
* codeset.m4: New file, from gettext-0.11.1.
|
||||||
|
* gettext.m4: New file, from gettext-0.11.1.
|
||||||
|
* glibc21.m4: New file, from gettext-0.11.1.
|
||||||
|
* iconv.m4: New file, from gettext-0.11.1.
|
||||||
|
* isc-posix.m4: New file, from gettext-0.11.1.
|
||||||
|
* lcmessage.m4: New file, from gettext-0.11.1.
|
||||||
|
* lib-ld.m4: New file, from gettext-0.11.1.
|
||||||
|
* lib-link.m4: New file, from gettext-0.11.1.
|
||||||
|
* lib-prefix.m4: New file, from gettext-0.11.1.
|
||||||
|
* progtest.m4: New file, from gettext-0.11.1.
|
||||||
|
* Makefile.am: New file.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
@@ -1,4 +1,18 @@
|
|||||||
EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 \
|
# -*-Makefile-*-, or close enough
|
||||||
intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \
|
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
|
||||||
isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \
|
# This file is part of GNU Make.
|
||||||
progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free
|
||||||
|
# Software Foundation; either version 3 of the License, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Autoconf / automake know how to handle this directory.
|
||||||
|
|||||||
33
config/dospaths.m4
Normal file
33
config/dospaths.m4
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Test if the system uses DOS-style pathnames (drive specs and backslashes)
|
||||||
|
# By Paul Smith <psmith@gnu.org>. Based on dos.m4 by Jim Meyering.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1993-2016 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
AC_DEFUN([pds_AC_DOS_PATHS], [
|
||||||
|
AC_CACHE_CHECK([whether system uses MSDOS-style paths], [ac_cv_dos_paths], [
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__ && !defined __CYGWIN__
|
||||||
|
neither MSDOS nor Windows nor OS2
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[ac_cv_dos_paths=yes],
|
||||||
|
[ac_cv_dos_paths=no])])
|
||||||
|
|
||||||
|
AS_IF([test x"$ac_cv_dos_paths" = xyes],
|
||||||
|
[ AC_DEFINE_UNQUOTED([HAVE_DOS_PATHS], 1,
|
||||||
|
[Define if the system uses DOS-style pathnames.])])
|
||||||
|
])
|
||||||
@@ -1,14 +1,34 @@
|
|||||||
|
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
||||||
|
|
||||||
|
Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* Include this header to make __DJGPP_MINOR__ available because DJGPP ports
|
||||||
|
of GCC 4.3.0 and later no longer do it automatically. */
|
||||||
|
#include <sys/version.h>
|
||||||
|
|
||||||
/* Many things are defined already by a system header. */
|
/* Many things are defined already by a system header. */
|
||||||
#include <sys/config.h>
|
#include <sys/config.h>
|
||||||
|
|
||||||
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Define to 1 if 'sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
||||||
# define SYS_SIGLIST_DECLARED 1
|
# define SYS_SIGLIST_DECLARED 1
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||||
# define HAVE_SYS_SIGLIST 1
|
# define HAVE_DECL_SYS_SIGLIST 1
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -20,45 +40,47 @@
|
|||||||
/* Use high resolution file timestamps if nonzero. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#define FILE_TIMESTAMP_HI_RES 0
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
|
|
||||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||||
#define HAVE_ALLOCA 1
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define if you have the fdopen function. */
|
/* Define to 1 if you have the fdopen function. */
|
||||||
#define HAVE_FDOPEN 1
|
#define HAVE_FDOPEN 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `getgroups' function. */
|
/* Define to 1 if you have the 'getgroups' function. */
|
||||||
#define HAVE_GETGROUPS 1
|
#define HAVE_GETGROUPS 1
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
#define HAVE_MEMORY_H 1
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
/* Define if you have the mkstemp function. */
|
/* Define to 1 if you have the mkstemp function. */
|
||||||
#define HAVE_MKSTEMP 1
|
#define HAVE_MKSTEMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `mktemp' function. */
|
/* Define to 1 if you have the 'mktemp' function. */
|
||||||
#define HAVE_MKTEMP 1
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `setlinebuf' function. */
|
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||||
#define HAVE_SETLINEBUF 1
|
#define HAVE_SETLINEBUF 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `setvbuf' function. */
|
/* Define to 1 if you have the 'setvbuf' function. */
|
||||||
#define HAVE_SETVBUF 1
|
#define HAVE_SETVBUF 1
|
||||||
|
|
||||||
#define SCCS_GET "get"
|
#define SCCS_GET "get"
|
||||||
|
|
||||||
/* Define to `unsigned long' or `unsigned long long'
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
if <inttypes.h> doesn't define. */
|
if <inttypes.h> doesn't define. */
|
||||||
#define uintmax_t unsigned long long
|
#define uintmax_t unsigned long long
|
||||||
|
|
||||||
/* Define the type of the first arg to select(). */
|
/* Define the type of the first arg to select(). */
|
||||||
#define fd_set_size_t int
|
#define fd_set_size_t int
|
||||||
|
|
||||||
/* Define if you have the select function. */
|
/* Define to 1 if you have the select function. */
|
||||||
#define HAVE_SELECT 1
|
#define HAVE_SELECT 1
|
||||||
|
|
||||||
/* Define if you have the vprintf library function. */
|
/* Define to 1 if you have the stricmp function. */
|
||||||
#undef HAVE_VPRINTF
|
#define HAVE_STRICMP 1
|
||||||
#define HAVE_VPRINTF 1
|
|
||||||
|
/* Define to 1 if you have the 'strncasecmp' function. */
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
|
||||||
/* Name of the package */
|
/* Name of the package */
|
||||||
#define PACKAGE "%PACKAGE%"
|
#define PACKAGE "%PACKAGE%"
|
||||||
@@ -78,11 +100,8 @@
|
|||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "%VERSION%"
|
#define PACKAGE_VERSION "%VERSION%"
|
||||||
|
|
||||||
/* Define to 1 if the C compiler supports function prototypes. */
|
/* Output sync sypport */
|
||||||
#define PROTOTYPES 1
|
#define NO_OUTPUT_SYNC
|
||||||
|
|
||||||
/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
|
||||||
#define SYS_SIGLIST_DECLARED 1
|
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#define VERSION "%VERSION%"
|
#define VERSION "%VERSION%"
|
||||||
|
|||||||
523
configure.ac
Normal file
523
configure.ac
Normal file
@@ -0,0 +1,523 @@
|
|||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1993-2016 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
AC_INIT([GNU make],[4.1.90],[bug-make@gnu.org])
|
||||||
|
|
||||||
|
AC_PREREQ([2.69])
|
||||||
|
|
||||||
|
# Autoconf setup
|
||||||
|
AC_CONFIG_AUX_DIR([config])
|
||||||
|
AC_CONFIG_SRCDIR([vpath.c])
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
|
# Automake setup
|
||||||
|
# We have to enable "foreign" because ChangeLog is auto-generated
|
||||||
|
# We cannot enable -Werror because gettext 0.18.1 has invalid content
|
||||||
|
# When we update gettext to 0.18.3 or better we can add it again.
|
||||||
|
AM_INIT_AUTOMAKE([1.15 foreign -Werror -Wall])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
AC_PROG_CPP
|
||||||
|
AC_CHECK_PROG([AR], [ar], [ar], [ar])
|
||||||
|
# Perl is needed for the test suite (only)
|
||||||
|
AC_CHECK_PROG([PERL], [perl], [perl], [perl])
|
||||||
|
|
||||||
|
# Needed for w32/Makefile.am
|
||||||
|
AM_PROG_AR
|
||||||
|
|
||||||
|
# Specialized system macros
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
AC_AIX
|
||||||
|
AC_ISC_POSIX
|
||||||
|
AC_MINIX
|
||||||
|
|
||||||
|
# Enable gettext, in "external" mode.
|
||||||
|
AM_GNU_GETTEXT_VERSION([0.19.4])
|
||||||
|
AM_GNU_GETTEXT([external])
|
||||||
|
|
||||||
|
# This test must come as early as possible after the compiler configuration
|
||||||
|
# tests, because the choice of the file model can (in principle) affect
|
||||||
|
# whether functions and headers are available, whether they work, etc.
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
AC_SEARCH_LIBS([getpwnam], [sun])
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_HEADER_DIRENT
|
||||||
|
AC_HEADER_STAT
|
||||||
|
AC_HEADER_TIME
|
||||||
|
AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
||||||
|
memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h \
|
||||||
|
sys/select.h])
|
||||||
|
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
AC_C_CONST
|
||||||
|
AC_TYPE_SIGNAL
|
||||||
|
AC_TYPE_UID_T
|
||||||
|
AC_TYPE_PID_T
|
||||||
|
AC_TYPE_OFF_T
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_TYPE_SSIZE_T
|
||||||
|
AC_TYPE_UINTMAX_T
|
||||||
|
|
||||||
|
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
||||||
|
|
||||||
|
AC_STRUCT_ST_MTIM_NSEC
|
||||||
|
AC_CACHE_CHECK([whether to use high resolution file timestamps],
|
||||||
|
[make_cv_file_timestamp_hi_res],
|
||||||
|
[ make_cv_file_timestamp_hi_res=no
|
||||||
|
AS_IF([test "$ac_cv_struct_st_mtim_nsec" != no],
|
||||||
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
#if HAVE_INTTYPES_H
|
||||||
|
# include <inttypes.h>
|
||||||
|
#endif]],
|
||||||
|
[[char a[0x7fffffff < (uintmax_t)-1 >> 30 ? 1 : -1];]])],
|
||||||
|
[make_cv_file_timestamp_hi_res=yes])
|
||||||
|
])])
|
||||||
|
AS_IF([test "$make_cv_file_timestamp_hi_res" = yes], [val=1], [val=0])
|
||||||
|
AC_DEFINE_UNQUOTED([FILE_TIMESTAMP_HI_RES], [$val],
|
||||||
|
[Use high resolution file timestamps if nonzero.])
|
||||||
|
|
||||||
|
AS_IF([test "$make_cv_file_timestamp_hi_res" = yes],
|
||||||
|
[ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||||||
|
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||||||
|
AC_SEARCH_LIBS([clock_gettime], [rt posix4])
|
||||||
|
AS_IF([test "$ac_cv_search_clock_gettime" != no],
|
||||||
|
[ AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
|
||||||
|
[Define to 1 if you have the clock_gettime function.])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Check for DOS-style pathnames.
|
||||||
|
pds_AC_DOS_PATHS
|
||||||
|
|
||||||
|
# See if we have a standard version of gettimeofday(). Since actual
|
||||||
|
# implementations can differ, just make sure we have the most common
|
||||||
|
# one.
|
||||||
|
AC_CACHE_CHECK([for standard gettimeofday], [ac_cv_func_gettimeofday],
|
||||||
|
[ac_cv_func_gettimeofday=no
|
||||||
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
|
||||||
|
exit (gettimeofday (&t, 0) != 0
|
||||||
|
|| t.tv_sec < 0 || t.tv_usec < 0);
|
||||||
|
}]])],
|
||||||
|
[ac_cv_func_gettimeofday=yes],
|
||||||
|
[ac_cv_func_gettimeofday=no],
|
||||||
|
[ac_cv_func_gettimeofday="no (cross-compiling)"])])
|
||||||
|
AS_IF([test "$ac_cv_func_gettimeofday" = yes],
|
||||||
|
[ AC_DEFINE([HAVE_GETTIMEOFDAY], [1],
|
||||||
|
[Define to 1 if you have a standard gettimeofday function])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS([strdup strndup mkstemp mktemp fdopen fileno \
|
||||||
|
dup dup2 getcwd realpath sigsetmask sigaction \
|
||||||
|
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||||
|
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
||||||
|
lstat readlink atexit isatty ttyname pselect])
|
||||||
|
|
||||||
|
# We need to check declarations, not just existence, because on Tru64 this
|
||||||
|
# function is not declared without special flags, which themselves cause
|
||||||
|
# other problems. We'll just use our own.
|
||||||
|
AC_CHECK_DECLS([bsd_signal], [], [], [[#define _GNU_SOURCE 1
|
||||||
|
#include <signal.h>]])
|
||||||
|
|
||||||
|
AC_FUNC_FORK
|
||||||
|
|
||||||
|
AC_FUNC_SETVBUF_REVERSED
|
||||||
|
|
||||||
|
# Rumor has it that strcasecmp lives in -lresolv on some odd systems.
|
||||||
|
# It doesn't hurt much to use our own if we can't find it so I don't
|
||||||
|
# make the effort here.
|
||||||
|
AC_CHECK_FUNCS([strcasecmp strncasecmp strcmpi strncmpi stricmp strnicmp])
|
||||||
|
|
||||||
|
# strcoll() is used by the GNU glob library
|
||||||
|
AC_FUNC_STRCOLL
|
||||||
|
|
||||||
|
AC_FUNC_ALLOCA
|
||||||
|
AC_FUNC_CLOSEDIR_VOID
|
||||||
|
|
||||||
|
# See if the user wants to add (or not) GNU Guile support
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile],
|
||||||
|
[Support GNU Guile for embedded scripting])])
|
||||||
|
|
||||||
|
# For some strange reason, at least on Ubuntu, each version of Guile
|
||||||
|
# comes with it's own PC file so we have to specify them as individual
|
||||||
|
# packages. Ugh.
|
||||||
|
AS_IF([test "x$with_guile" != xno],
|
||||||
|
[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes],
|
||||||
|
[PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes],
|
||||||
|
[have_guile=no])])
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "$have_guile" = yes],
|
||||||
|
[AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes])
|
||||||
|
|
||||||
|
AC_FUNC_GETLOADAVG
|
||||||
|
|
||||||
|
# AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it
|
||||||
|
# doesn't. So, we will.
|
||||||
|
|
||||||
|
AS_IF([test "$ac_cv_header_nlist_h" = yes],
|
||||||
|
[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
|
||||||
|
[[struct nlist nl;
|
||||||
|
nl.n_name = "string";
|
||||||
|
return 0;]])],
|
||||||
|
[make_cv_nlist_struct=yes],
|
||||||
|
[make_cv_nlist_struct=no])
|
||||||
|
AS_IF([test "$make_cv_nlist_struct" = yes],
|
||||||
|
[ AC_DEFINE([NLIST_STRUCT], [1],
|
||||||
|
[Define to 1 if struct nlist.n_name is a pointer rather than an array.])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([sys_siglist, _sys_siglist, __sys_siglist], , ,
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#include <signal.h>
|
||||||
|
/* NetBSD declares sys_siglist in unistd.h. */
|
||||||
|
#if HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# Check out the wait reality.
|
||||||
|
AC_CHECK_HEADERS([sys/wait.h],[],[],[[#include <sys/types.h>]])
|
||||||
|
AC_CHECK_FUNCS([waitpid wait3])
|
||||||
|
AC_CACHE_CHECK([for union wait], [make_cv_union_wait],
|
||||||
|
[ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>]],
|
||||||
|
[[union wait status; int pid; pid = wait (&status);
|
||||||
|
#ifdef WEXITSTATUS
|
||||||
|
/* Some POSIXoid systems have both the new-style macros and the old
|
||||||
|
union wait type, and they do not work together. If union wait
|
||||||
|
conflicts with WEXITSTATUS et al, we don't want to use it at all. */
|
||||||
|
if (WEXITSTATUS (status) != 0) pid = -1;
|
||||||
|
#ifdef WTERMSIG
|
||||||
|
/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
|
||||||
|
-- blow chunks here --
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_WAITPID
|
||||||
|
/* Make sure union wait works with waitpid. */
|
||||||
|
pid = waitpid (-1, &status, 0);
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[make_cv_union_wait=yes],
|
||||||
|
[make_cv_union_wait=no])
|
||||||
|
])
|
||||||
|
AS_IF([test "$make_cv_union_wait" = yes],
|
||||||
|
[ AC_DEFINE([HAVE_UNION_WAIT], [1],
|
||||||
|
[Define to 1 if you have the 'union wait' type in <sys/wait.h>.])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# If we're building on Windows/DOS/OS/2, add some support for DOS drive specs.
|
||||||
|
AS_IF([test "$PATH_SEPARATOR" = ';'],
|
||||||
|
[ AC_DEFINE([HAVE_DOS_PATHS], [1],
|
||||||
|
[Define to 1 if your system requires backslashes or drive specs in pathnames.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# See if the user wants to use pmake's "customs" distributed build capability
|
||||||
|
AC_SUBST([REMOTE]) REMOTE=stub
|
||||||
|
use_customs=false
|
||||||
|
AC_ARG_WITH([customs],
|
||||||
|
[AC_HELP_STRING([--with-customs=DIR],
|
||||||
|
[enable remote jobs via Customs--see README.customs])],
|
||||||
|
[ AS_CASE([$withval], [n|no], [:],
|
||||||
|
[make_cppflags="$CPPFLAGS"
|
||||||
|
AS_CASE([$withval],
|
||||||
|
[y|ye|yes], [:],
|
||||||
|
[CPPFLAGS="$CPPFLAGS -I$with_customs/include/customs"
|
||||||
|
make_ldflags="$LDFLAGS -L$with_customs/lib"])
|
||||||
|
CF_NETLIBS
|
||||||
|
AC_CHECK_HEADER([customs.h],
|
||||||
|
[use_customs=true
|
||||||
|
REMOTE=cstms
|
||||||
|
LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"],
|
||||||
|
[with_customs=no
|
||||||
|
CPPFLAGS="$make_cppflags" make_badcust=yes])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Tell automake about this, so it can include the right .c files.
|
||||||
|
AM_CONDITIONAL([USE_CUSTOMS], [test "$use_customs" = true])
|
||||||
|
|
||||||
|
# See if the user asked to handle case insensitive file systems.
|
||||||
|
AH_TEMPLATE([HAVE_CASE_INSENSITIVE_FS], [Use case insensitive file names])
|
||||||
|
AC_ARG_ENABLE([case-insensitive-file-system],
|
||||||
|
AC_HELP_STRING([--enable-case-insensitive-file-system],
|
||||||
|
[assume file systems are case insensitive]),
|
||||||
|
[AS_IF([test "$enableval" = yes], [AC_DEFINE([HAVE_CASE_INSENSITIVE_FS])])])
|
||||||
|
|
||||||
|
# See if we can handle the job server feature, and if the user wants it.
|
||||||
|
AC_ARG_ENABLE([job-server],
|
||||||
|
AC_HELP_STRING([--disable-job-server],
|
||||||
|
[disallow recursive make communication during -jN]),
|
||||||
|
[make_cv_job_server="$enableval" user_job_server="$enableval"],
|
||||||
|
[make_cv_job_server="yes"])
|
||||||
|
|
||||||
|
AS_IF([test "$ac_cv_func_waitpid" = no && test "$ac_cv_func_wait3" = no],
|
||||||
|
[has_wait_nohang=no],
|
||||||
|
[has_wait_nohang=yes])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for SA_RESTART], [make_cv_sa_restart], [
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
|
||||||
|
[[return SA_RESTART;]])],
|
||||||
|
[make_cv_sa_restart=yes],
|
||||||
|
[make_cv_sa_restart=no])])
|
||||||
|
|
||||||
|
AS_IF([test "$make_cv_sa_restart" != no],
|
||||||
|
[ AC_DEFINE([HAVE_SA_RESTART], [1],
|
||||||
|
[Define to 1 if <signal.h> defines the SA_RESTART constant.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Only allow jobserver on systems that support it
|
||||||
|
AS_CASE([/$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/],
|
||||||
|
[*/no/*], [make_cv_job_server=no])
|
||||||
|
|
||||||
|
# Also supported on OS2 and MinGW
|
||||||
|
AS_CASE([$host_os], [os2*|mingw*], [make_cv_job_server=yes])
|
||||||
|
|
||||||
|
# If we support it and the user didn't disable it, build with jobserver
|
||||||
|
AS_CASE([/$make_cv_job_server/$user_job_server/],
|
||||||
|
[*/no/*], [: no jobserver],
|
||||||
|
[AC_DEFINE(MAKE_JOBSERVER, 1,
|
||||||
|
[Define to 1 to enable job server support in GNU make.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# If dl*() functions are supported we can enable the load operation
|
||||||
|
AC_CHECK_DECLS([dlopen, dlsym, dlerror], [], [],
|
||||||
|
[[#include <dlfcn.h>]])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([load],
|
||||||
|
AC_HELP_STRING([--disable-load],
|
||||||
|
[disable support for the 'load' operation]),
|
||||||
|
[make_cv_load="$enableval" user_load="$enableval"],
|
||||||
|
[make_cv_load="yes"])
|
||||||
|
|
||||||
|
AS_CASE([/$ac_cv_have_decl_dlopen/$ac_cv_have_decl_dlsym/$ac_cv_have_decl_dlerror/],
|
||||||
|
[*/no/*], [make_cv_load=no])
|
||||||
|
|
||||||
|
# We might need -ldl
|
||||||
|
AS_IF([test "$make_cv_load" = yes], [
|
||||||
|
AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_CASE([/$make_cv_load/$user_load/],
|
||||||
|
[*/no/*], [make_cv_load=no],
|
||||||
|
[AC_DEFINE(MAKE_LOAD, 1,
|
||||||
|
[Define to 1 to enable 'load' support in GNU make.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# If we want load support, we might need to link with export-dynamic.
|
||||||
|
# See if we can figure it out. Unfortunately this is very difficult.
|
||||||
|
# For example passing -rdynamic to the SunPRO linker gives a warning
|
||||||
|
# but succeeds and creates a shared object, not an executable!
|
||||||
|
AS_IF([test "$make_cv_load" = yes], [
|
||||||
|
AC_MSG_CHECKING([If the linker accepts -Wl,--export-dynamic])
|
||||||
|
old_LDFLAGS="$LDFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
AC_SUBST([AM_LDFLAGS], [-Wl,--export-dynamic])],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_CHECKING([If the linker accepts -rdynamic])
|
||||||
|
LDFLAGS="$old_LDFLAGS -rdynamic"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
AC_SUBST([AM_LDFLAGS], [-rdynamic])],
|
||||||
|
[AC_MSG_RESULT([no])])
|
||||||
|
])
|
||||||
|
LDFLAGS="$old_LDFLAGS"
|
||||||
|
])
|
||||||
|
|
||||||
|
# if we have both lstat() and readlink() then we can support symlink
|
||||||
|
# timechecks.
|
||||||
|
AS_IF([test "$ac_cv_func_lstat" = yes && test "$ac_cv_func_readlink" = yes],
|
||||||
|
[ AC_DEFINE([MAKE_SYMLINKS], [1],
|
||||||
|
[Define to 1 to enable symbolic link timestamp checking.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Find the SCCS commands, so we can include them in our default rules.
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for location of SCCS get command], [make_cv_path_sccs_get], [
|
||||||
|
AS_IF([test -f /usr/sccs/get],
|
||||||
|
[make_cv_path_sccs_get=/usr/sccs/get],
|
||||||
|
[make_cv_path_sccs_get=get])
|
||||||
|
])
|
||||||
|
AC_DEFINE_UNQUOTED([SCCS_GET], ["$make_cv_path_sccs_get"],
|
||||||
|
[Define to the name of the SCCS 'get' command.])
|
||||||
|
|
||||||
|
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
||||||
|
AS_IF([(/usr/sccs/admin -n s.conftest || admin -n s.conftest) >/dev/null 2>&1 &&
|
||||||
|
test -f s.conftest],
|
||||||
|
[ # We successfully created an SCCS file.
|
||||||
|
AC_CACHE_CHECK([if SCCS get command understands -G], [make_cv_sys_get_minus_G],
|
||||||
|
[AS_IF([$make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
||||||
|
test -f conftoast],
|
||||||
|
[make_cv_sys_get_minus_G=yes],
|
||||||
|
[make_cv_sys_get_minus_G=no])
|
||||||
|
])
|
||||||
|
AS_IF([test "$make_cv_sys_get_minus_G" = yes],
|
||||||
|
[AC_DEFINE([SCCS_GET_MINUS_G], [1],
|
||||||
|
[Define to 1 if the SCCS 'get' command understands the '-G<file>' option.])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
rm -f s.conftest conftoast
|
||||||
|
|
||||||
|
# Check the system to see if it provides GNU glob. If not, use our
|
||||||
|
# local version.
|
||||||
|
AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
|
||||||
|
[ AC_EGREP_CPP([gnu glob],[
|
||||||
|
#include <features.h>
|
||||||
|
#include <glob.h>
|
||||||
|
#include <fnmatch.h>
|
||||||
|
|
||||||
|
#define GLOB_INTERFACE_VERSION 1
|
||||||
|
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||||
|
# include <gnu-versions.h>
|
||||||
|
# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
||||||
|
gnu glob
|
||||||
|
# endif
|
||||||
|
#endif],
|
||||||
|
[make_cv_sys_gnu_glob=yes],
|
||||||
|
[make_cv_sys_gnu_glob=no])])
|
||||||
|
AS_IF([test "$make_cv_sys_gnu_glob" = no],
|
||||||
|
[ GLOBINC='-I$(srcdir)/glob'
|
||||||
|
GLOBLIB=glob/libglob.a
|
||||||
|
])
|
||||||
|
AC_SUBST([GLOBINC])
|
||||||
|
AC_SUBST([GLOBLIB])
|
||||||
|
|
||||||
|
# Tell automake about this, so it can build the right .c files.
|
||||||
|
AM_CONDITIONAL([USE_LOCAL_GLOB], [test "$make_cv_sys_gnu_glob" = no])
|
||||||
|
|
||||||
|
# Let the makefile know what our build host is
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED([MAKE_HOST],["$host"],[Build host information.])
|
||||||
|
MAKE_HOST="$host"
|
||||||
|
AC_SUBST([MAKE_HOST])
|
||||||
|
|
||||||
|
w32_target_env=no
|
||||||
|
AM_CONDITIONAL([WINDOWSENV], [false])
|
||||||
|
|
||||||
|
AS_CASE([$host],
|
||||||
|
[*-*-mingw32],
|
||||||
|
[AM_CONDITIONAL([WINDOWSENV], [true])
|
||||||
|
w32_target_env=yes
|
||||||
|
AC_DEFINE([WINDOWS32], [1], [Use platform specific coding])
|
||||||
|
AC_DEFINE([HAVE_DOS_PATHS], [1], [Use platform specific coding])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED([PATH_SEPARATOR_CHAR],['$PATH_SEPARATOR'],
|
||||||
|
[Define to the character that separates directories in PATH.])
|
||||||
|
|
||||||
|
# Include the Maintainer's Makefile section, if it's here.
|
||||||
|
|
||||||
|
MAINT_MAKEFILE=/dev/null
|
||||||
|
AS_IF([test -r "$srcdir/maintMakefile"],
|
||||||
|
[ MAINT_MAKEFILE="$srcdir/maintMakefile"
|
||||||
|
])
|
||||||
|
AC_SUBST_FILE([MAINT_MAKEFILE])
|
||||||
|
|
||||||
|
# Allow building with dmalloc
|
||||||
|
AM_WITH_DMALLOC
|
||||||
|
|
||||||
|
# Forcibly disable SET_MAKE. If it's set it breaks things like the test
|
||||||
|
# scripts, etc.
|
||||||
|
SET_MAKE=
|
||||||
|
|
||||||
|
# Sanity check and inform the user of what we found
|
||||||
|
|
||||||
|
AS_IF([test "x$make_badcust" = xyes], [
|
||||||
|
echo
|
||||||
|
echo "WARNING: --with-customs specified but no customs.h could be found;"
|
||||||
|
echo " disabling Customs support."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_CASE([$with_customs],
|
||||||
|
[""|n|no|y|ye|yes], [:],
|
||||||
|
[AS_IF([test -f "$with_customs/lib/libcustoms.a"], [:],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: '$with_customs/lib' does not appear to contain the"
|
||||||
|
echo " Customs library. You must build and install Customs"
|
||||||
|
echo " before compiling GNU make."
|
||||||
|
echo
|
||||||
|
])])
|
||||||
|
|
||||||
|
AS_IF([test "x$has_wait_nohang" = xno],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: Your system has neither waitpid() nor wait3()."
|
||||||
|
echo " Without one of these, signal handling is unreliable."
|
||||||
|
echo " You should be aware that running GNU make with -j"
|
||||||
|
echo " could result in erratic behavior."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "x$make_cv_job_server" = xno && test "x$user_job_server" = xyes],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: Make job server requires a POSIX-ish system that"
|
||||||
|
echo " supports the pipe(), sigaction(), and either"
|
||||||
|
echo " waitpid() or wait3() functions. Your system doesn't"
|
||||||
|
echo " appear to provide one or more of those."
|
||||||
|
echo " Disabling job server support."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "x$make_cv_load" = xno && test "x$user_load" = xyes],
|
||||||
|
[ echo
|
||||||
|
echo "WARNING: 'load' support requires a POSIX-ish system that"
|
||||||
|
echo " supports the dlopen(), dlsym(), and dlerror() functions."
|
||||||
|
echo " Your system doesn't appear to provide one or more of these."
|
||||||
|
echo " Disabling 'load' support."
|
||||||
|
echo
|
||||||
|
])
|
||||||
|
|
||||||
|
# Specify what files are to be created.
|
||||||
|
AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \
|
||||||
|
doc/Makefile w32/Makefile tests/config-flags.pm])
|
||||||
|
|
||||||
|
# OK, do it!
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
|
|
||||||
|
# We only generate the build.sh if we have a build.sh.in; we won't have
|
||||||
|
# one before we've created a distribution.
|
||||||
|
AS_IF([test -f "$srcdir/build.sh.in"],
|
||||||
|
[ ./config.status --file build.sh
|
||||||
|
chmod +x build.sh
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Local Variables:
|
||||||
|
dnl comment-start: "dnl "
|
||||||
|
dnl comment-end: ""
|
||||||
|
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
||||||
|
dnl compile-command: "make configure config.h.in"
|
||||||
|
dnl End:
|
||||||
@@ -1,4 +1,20 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
rem Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
||||||
|
rem This file is part of GNU Make.
|
||||||
|
rem
|
||||||
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
rem the terms of the GNU General Public License as published by the Free
|
||||||
|
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||||
|
rem any later version.
|
||||||
|
rem
|
||||||
|
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||||
|
rem more details.
|
||||||
|
rem
|
||||||
|
rem You should have received a copy of the GNU General Public License along
|
||||||
|
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
echo Configuring MAKE for DJGPP
|
echo Configuring MAKE for DJGPP
|
||||||
|
|
||||||
rem The SmallEnv trick protects against too small environment block,
|
rem The SmallEnv trick protects against too small environment block,
|
||||||
|
|||||||
390
configure.in
390
configure.in
@@ -1,390 +0,0 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
|
||||||
|
|
||||||
AC_INIT(GNU make,3.80,bug-make@gnu.org)
|
|
||||||
|
|
||||||
AC_PREREQ(2.54)
|
|
||||||
|
|
||||||
AC_REVISION([[$Id$]])
|
|
||||||
|
|
||||||
# Autoconf setup
|
|
||||||
AC_CONFIG_AUX_DIR(config)
|
|
||||||
AC_CONFIG_SRCDIR(vpath.c)
|
|
||||||
AC_CONFIG_HEADERS(config.h)
|
|
||||||
|
|
||||||
# Automake setup
|
|
||||||
AM_INIT_AUTOMAKE
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
|
|
||||||
# Checks for programs.
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_INSTALL
|
|
||||||
AC_PROG_RANLIB
|
|
||||||
AC_PROG_CPP
|
|
||||||
AC_CHECK_PROG(AR, ar, ar, ar)
|
|
||||||
# Perl is needed for the test suite (only)
|
|
||||||
AC_CHECK_PROG(PERL, perl, perl, perl)
|
|
||||||
|
|
||||||
# Specialized system macros
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
AC_AIX
|
|
||||||
AC_ISC_POSIX
|
|
||||||
AC_MINIX
|
|
||||||
|
|
||||||
# Enable gettext, in "external" mode.
|
|
||||||
|
|
||||||
AM_GNU_GETTEXT_VERSION(0.11.5)
|
|
||||||
AM_GNU_GETTEXT([external])
|
|
||||||
|
|
||||||
# This test must come as early as possible after the compiler configuration
|
|
||||||
# tests, because the choice of the file model can (in principle) affect
|
|
||||||
# whether functions and headers are available, whether they work, etc.
|
|
||||||
AC_SYS_LARGEFILE
|
|
||||||
|
|
||||||
# Checks for libraries.
|
|
||||||
AC_SEARCH_LIBS(getpwnam, [sun])
|
|
||||||
|
|
||||||
# Checks for header files.
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_HEADER_DIRENT
|
|
||||||
AC_HEADER_STAT
|
|
||||||
AC_HEADER_TIME
|
|
||||||
AC_CHECK_HEADERS(stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
|
||||||
memory.h sys/param.h sys/time.h sys/timeb.h)
|
|
||||||
|
|
||||||
AM_PROG_CC_C_O
|
|
||||||
AM_PROG_CC_STDC
|
|
||||||
AC_C_CONST
|
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
AC_TYPE_UID_T
|
|
||||||
AC_TYPE_PID_T
|
|
||||||
|
|
||||||
# Find some definition for uintmax_t
|
|
||||||
|
|
||||||
AC_CHECK_TYPE(uintmax_t,,[
|
|
||||||
uintmax_t="unsigned long"
|
|
||||||
AC_CHECK_TYPE(unsigned long long,[uintmax_t="unsigned long long"])
|
|
||||||
AC_DEFINE_UNQUOTED(uintmax_t,$uintmax_t,[Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])])
|
|
||||||
|
|
||||||
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
|
||||||
|
|
||||||
AC_STRUCT_ST_MTIM_NSEC
|
|
||||||
AC_MSG_CHECKING([whether to use high resolution file timestamps])
|
|
||||||
AC_CACHE_VAL(make_cv_file_timestamp_hi_res, [
|
|
||||||
make_cv_file_timestamp_hi_res=no
|
|
||||||
if test "$ac_cv_struct_st_mtim_nsec" != no; then
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
# if HAVE_INTTYPES_H
|
|
||||||
# include <inttypes.h>
|
|
||||||
# endif],
|
|
||||||
[char a[0x7fffffff < (uintmax_t) -1 >> 30 ? 1 : -1];],
|
|
||||||
make_cv_file_timestamp_hi_res=yes)
|
|
||||||
fi])
|
|
||||||
AC_MSG_RESULT($make_cv_file_timestamp_hi_res)
|
|
||||||
if test "$make_cv_file_timestamp_hi_res" = yes; then
|
|
||||||
val=1
|
|
||||||
else
|
|
||||||
val=0
|
|
||||||
fi
|
|
||||||
AC_DEFINE_UNQUOTED(FILE_TIMESTAMP_HI_RES, $val,
|
|
||||||
[Use high resolution file timestamps if nonzero.])
|
|
||||||
|
|
||||||
if test "$make_cv_file_timestamp_hi_res" = yes; then
|
|
||||||
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
|
||||||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
|
||||||
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
|
|
||||||
if test "$ac_cv_search_clock_gettime" != no; then
|
|
||||||
AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
|
|
||||||
[Define if you have the clock_gettime function.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# See if we have a standard version of gettimeofday(). Since actual
|
|
||||||
# implementations can differ, just make sure we have the most common
|
|
||||||
# one.
|
|
||||||
AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func_gettimeofday,
|
|
||||||
[ac_cv_func_gettimeofday=no
|
|
||||||
AC_TRY_RUN([#include <sys/time.h>
|
|
||||||
int main ()
|
|
||||||
{
|
|
||||||
struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
|
|
||||||
exit (gettimeofday (&t, 0) != 0
|
|
||||||
|| t.tv_sec < 0 || t.tv_usec < 0);
|
|
||||||
}],
|
|
||||||
ac_cv_func_gettimeofday=yes,
|
|
||||||
ac_cv_func_gettimeofday=no,
|
|
||||||
ac_cv_func_gettimeofday="no (cross-compiling)")])
|
|
||||||
if test "$ac_cv_func_gettimeofday" = yes; then
|
|
||||||
AC_DEFINE(HAVE_GETTIMEOFDAY, 1,
|
|
||||||
[Define if you have a standard gettimeofday function])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS( memcpy memmove strchr strdup mkstemp mktemp fdopen \
|
|
||||||
bsd_signal dup2 getcwd sigsetmask sigaction getgroups \
|
|
||||||
seteuid setegid setlinebuf setreuid setregid setvbuf pipe \
|
|
||||||
strerror strsignal)
|
|
||||||
|
|
||||||
make_FUNC_SETVBUF_REVERSED
|
|
||||||
|
|
||||||
# strcoll() is used by the GNU glob library
|
|
||||||
AC_FUNC_STRCOLL
|
|
||||||
|
|
||||||
AC_FUNC_ALLOCA
|
|
||||||
AC_FUNC_VFORK
|
|
||||||
AC_FUNC_VPRINTF
|
|
||||||
AC_FUNC_CLOSEDIR_VOID
|
|
||||||
|
|
||||||
AC_FUNC_GETLOADAVG
|
|
||||||
|
|
||||||
# AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it
|
|
||||||
# doesn't. So, we will.
|
|
||||||
|
|
||||||
if test "$ac_cv_header_nlist_h" = yes; then
|
|
||||||
AC_TRY_COMPILE([#include <nlist.h>],
|
|
||||||
[struct nlist nl;
|
|
||||||
nl.n_name = "string";
|
|
||||||
return 0;],
|
|
||||||
make_cv_nlist_struct=yes,
|
|
||||||
make_cv_nlist_struct=no)
|
|
||||||
if test "$make_cv_nlist_struct" = yes; then
|
|
||||||
AC_DEFINE(NLIST_STRUCT, 1,
|
|
||||||
[Define if struct nlist.n_name is a pointer rather than an array.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_DECL_SYS_SIGLIST
|
|
||||||
|
|
||||||
# Check out the wait reality.
|
|
||||||
AC_CHECK_HEADERS(sys/wait.h)
|
|
||||||
AC_CHECK_FUNCS(waitpid wait3)
|
|
||||||
AC_MSG_CHECKING(for union wait)
|
|
||||||
AC_CACHE_VAL(make_cv_union_wait, [dnl
|
|
||||||
AC_TRY_LINK([#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>],
|
|
||||||
[union wait status; int pid; pid = wait (&status);
|
|
||||||
#ifdef WEXITSTATUS
|
|
||||||
/* Some POSIXoid systems have both the new-style macros and the old
|
|
||||||
union wait type, and they do not work together. If union wait
|
|
||||||
conflicts with WEXITSTATUS et al, we don't want to use it at all. */
|
|
||||||
if (WEXITSTATUS (status) != 0) pid = -1;
|
|
||||||
#ifdef WTERMSIG
|
|
||||||
/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
|
|
||||||
-- blow chunks here --
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WAITPID
|
|
||||||
/* Make sure union wait works with waitpid. */
|
|
||||||
pid = waitpid (-1, &status, 0);
|
|
||||||
#endif
|
|
||||||
],
|
|
||||||
[make_cv_union_wait=yes], [make_cv_union_wait=no])])
|
|
||||||
if test "$make_cv_union_wait" = yes; then
|
|
||||||
AC_DEFINE(HAVE_UNION_WAIT, 1, [Define this if you have the \`union wait' type in <sys/wait.h>.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($make_cv_union_wait)
|
|
||||||
|
|
||||||
|
|
||||||
# See if the user wants to use pmake's "customs" distributed build capability
|
|
||||||
|
|
||||||
use_customs=false
|
|
||||||
AC_ARG_WITH(customs,
|
|
||||||
AC_HELP_STRING([--with-customs=DIR],
|
|
||||||
[enable remote jobs via Customs--see README.customs]),
|
|
||||||
[case $withval in
|
|
||||||
n|no) : ;;
|
|
||||||
*) make_cppflags="$CPPFLAGS"
|
|
||||||
case $withval in
|
|
||||||
y|ye|yes) : ;;
|
|
||||||
*) CPPFLAGS="$CPPFLAGS -I$with_customs/include/customs"
|
|
||||||
make_ldflags="$LDFLAGS -L$with_customs/lib" ;;
|
|
||||||
esac
|
|
||||||
CF_NETLIBS
|
|
||||||
AC_CHECK_HEADER(customs.h,
|
|
||||||
[use_customs=true
|
|
||||||
LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"],
|
|
||||||
[with_customs=no
|
|
||||||
CPPFLAGS="$make_cppflags" make_badcust=yes])
|
|
||||||
;;
|
|
||||||
esac])
|
|
||||||
# Tell automake about this, so it can include the right .c files.
|
|
||||||
AM_CONDITIONAL(USE_CUSTOMS, test "$use_customs" = true)
|
|
||||||
|
|
||||||
# See if we can handle the job server feature, and if the user wants it.
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(job-server,
|
|
||||||
AC_HELP_STRING([--disable-job-server],
|
|
||||||
[disallow recursive make communication during -jN]),
|
|
||||||
[make_cv_job_server="$enableval" user_job_server="$enableval"],
|
|
||||||
[make_cv_job_server="yes"])
|
|
||||||
|
|
||||||
has_wait_nohang=yes
|
|
||||||
case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
|
|
||||||
no/no) has_wait_nohang=no ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for SA_RESTART, make_cv_sa_restart, [
|
|
||||||
AC_TRY_COMPILE([#include <signal.h>],
|
|
||||||
[return SA_RESTART;],
|
|
||||||
make_cv_sa_restart=yes,
|
|
||||||
make_cv_sa_restart=no)])
|
|
||||||
if test "$make_cv_sa_restart" != no; then
|
|
||||||
AC_DEFINE(HAVE_SA_RESTART, 1,
|
|
||||||
[Define if <signal.h> defines the SA_RESTART constant.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/$make_cv_job_server" in
|
|
||||||
yes/yes/yes/yes/yes)
|
|
||||||
AC_DEFINE(MAKE_JOBSERVER, 1,
|
|
||||||
[Define this to enable job server support in GNU make.]);;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Find the SCCS commands, so we can include them in our default rules.
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for location of SCCS get command, make_cv_path_sccs_get, [
|
|
||||||
if test -f /usr/sccs/get; then
|
|
||||||
make_cv_path_sccs_get=/usr/sccs/get
|
|
||||||
else
|
|
||||||
make_cv_path_sccs_get=get
|
|
||||||
fi])
|
|
||||||
AC_DEFINE_UNQUOTED(SCCS_GET, ["$make_cv_path_sccs_get"], [Define to the name of the SCCS 'get' command.])
|
|
||||||
|
|
||||||
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
|
||||||
if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
|
|
||||||
test -f s.conftest; then
|
|
||||||
# We successfully created an SCCS file.
|
|
||||||
AC_CACHE_CHECK(if SCCS get command understands -G, make_cv_sys_get_minus_G, [
|
|
||||||
if $make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
|
||||||
test -f conftoast; then
|
|
||||||
make_cv_sys_get_minus_G=yes
|
|
||||||
else
|
|
||||||
make_cv_sys_get_minus_G=no
|
|
||||||
fi])
|
|
||||||
case "$make_cv_sys_get_minus_G" in
|
|
||||||
yes) AC_DEFINE(SCCS_GET_MINUS_G, 1,
|
|
||||||
[Define this if the SCCS 'get' command understands the '-G<file>' option.]);;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
rm -f s.conftest conftoast
|
|
||||||
|
|
||||||
# Check the system to see if it provides GNU glob. If not, use our
|
|
||||||
# local version.
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(if system libc has GNU glob)
|
|
||||||
AC_CACHE_VAL(make_cv_sys_gnu_glob, [
|
|
||||||
AC_EGREP_CPP(gnu glob,[
|
|
||||||
#include <features.h>
|
|
||||||
#include <glob.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
|
|
||||||
#define GLOB_INTERFACE_VERSION 1
|
|
||||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
|
||||||
# include <gnu-versions.h>
|
|
||||||
# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
|
||||||
gnu glob
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
], [AC_MSG_RESULT(yes)
|
|
||||||
make_cv_sys_gnu_glob=yes], [AC_MSG_RESULT([no; using local copy])
|
|
||||||
AC_SUBST(GLOBINC) GLOBINC='-I$(srcdir)/glob'
|
|
||||||
AC_SUBST(GLOBLIB) GLOBLIB=glob/libglob.a
|
|
||||||
make_cv_sys_gnu_glob=no])])
|
|
||||||
# Tell automake about this, so it can build the right .c files.
|
|
||||||
AM_CONDITIONAL(USE_LOCAL_GLOB, test "$make_cv_sys_gnu_glob" = no)
|
|
||||||
|
|
||||||
# PTX systems have a broken implementation of SA_RESTART. I know of
|
|
||||||
# no way to test for this behavior, so I'll just test for PTX
|
|
||||||
|
|
||||||
case "$host" in
|
|
||||||
i386-sequent-sysv4)
|
|
||||||
AC_DEFINE(HAVE_BROKEN_RESTART, 1, [This system has SA_RESTART, but it doesn't work properly.])
|
|
||||||
echo ""
|
|
||||||
echo "WARNING: The SA_RESTART sigaction() flag does not work on PTX."
|
|
||||||
echo " This causes 'make -j' to fail at random times."
|
|
||||||
echo " I am installing a workaround, which is mostly but not 100%"
|
|
||||||
echo " effective. If you see random failures during 'make -j'"
|
|
||||||
echo " you should either contact the bug list, or not use -j."
|
|
||||||
echo "" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Let the makefile know what our build host is
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(MAKE_HOST,"$host",[Build host information.])
|
|
||||||
MAKE_HOST="$host"
|
|
||||||
AC_SUBST(MAKE_HOST)
|
|
||||||
|
|
||||||
# Include the Maintainer's Makefile section, if it's here.
|
|
||||||
|
|
||||||
MAINT_MAKEFILE=/dev/null
|
|
||||||
if test -r "$srcdir/maintMakefile"; then
|
|
||||||
MAINT_MAKEFILE="$srcdir/maintMakefile"
|
|
||||||
fi
|
|
||||||
AC_SUBST_FILE(MAINT_MAKEFILE)
|
|
||||||
|
|
||||||
# Allow building with dmalloc
|
|
||||||
AM_WITH_DMALLOC
|
|
||||||
|
|
||||||
|
|
||||||
# Sanity check and inform the user of what we found
|
|
||||||
|
|
||||||
case "$make_badcust" in
|
|
||||||
yes) echo
|
|
||||||
echo "WARNING: --with-customs specified but no customs.h could be found;"
|
|
||||||
echo " disabling Customs support."
|
|
||||||
echo ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$with_customs" in
|
|
||||||
""|n|no|y|ye|yes) ;;
|
|
||||||
*) if test -f "$with_customs/lib/libcustoms.a"; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "WARNING: '$with_customs/lib' does not appear to contain the"
|
|
||||||
echo " Customs library. You must build and install Customs"
|
|
||||||
echo " before compiling GNU make."
|
|
||||||
echo
|
|
||||||
fi ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$has_wait_nohang" in
|
|
||||||
no) echo
|
|
||||||
echo "WARNING: Your system has neither waitpid() nor wait3()."
|
|
||||||
echo " Without one of these, signal handling is unreliable."
|
|
||||||
echo " You should be aware that running GNU make with -j"
|
|
||||||
echo " could result in erratic behavior."
|
|
||||||
echo ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$make_cv_job_server/$user_job_server" in
|
|
||||||
no/yes) echo
|
|
||||||
echo "WARNING: Make job server requires a POSIX-ish system that"
|
|
||||||
echo " supports the pipe(), sigaction(), and either"
|
|
||||||
echo " waitpid() or wait3() functions. Your system doesn't"
|
|
||||||
echo " appear to provide one or more of those."
|
|
||||||
echo " Disabling job server support."
|
|
||||||
echo ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
# Specify what files are to be created.
|
|
||||||
# We only generate the build.sh if we have a build.sh.in; we won't have
|
|
||||||
# one before we've created a distribution.
|
|
||||||
|
|
||||||
AC_CONFIG_FILES(Makefile glob/Makefile po/Makefile.in config/Makefile doc/Makefile)
|
|
||||||
|
|
||||||
if test -f $srcdir/build.sh.in; then
|
|
||||||
AC_CONFIG_FILES(build.sh)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# OK, do it!
|
|
||||||
|
|
||||||
AC_OUTPUT
|
|
||||||
|
|
||||||
|
|
||||||
dnl Local Variables:
|
|
||||||
dnl comment-start: "dnl "
|
|
||||||
dnl comment-end: ""
|
|
||||||
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
|
||||||
dnl compile-command: "make configure config.h.in"
|
|
||||||
dnl End:
|
|
||||||
24
debug.h
24
debug.h
@@ -1,22 +1,18 @@
|
|||||||
/* Debugging macros and interface.
|
/* Debugging macros and interface.
|
||||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
Copyright (C) 1999-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#define DB_NONE (0x000)
|
#define DB_NONE (0x000)
|
||||||
#define DB_BASIC (0x001)
|
#define DB_BASIC (0x001)
|
||||||
|
|||||||
314
default.c
314
default.c
@@ -1,67 +1,89 @@
|
|||||||
/* Data base of default implicit rules for GNU Make.
|
/* Data base of default implicit rules for GNU Make.
|
||||||
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "variable.h"
|
||||||
#include "rule.h"
|
#include "rule.h"
|
||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
#include "filedef.h"
|
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "variable.h"
|
|
||||||
|
|
||||||
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
||||||
your system (gcc/bison/flex vs cc/yacc/lex). */
|
your system (gcc/bison/flex vs cc/yacc/lex). */
|
||||||
#ifdef __MSDOS__
|
#if defined(__MSDOS__) || defined(__EMX__)
|
||||||
#define GCC_IS_NATIVE
|
# define GCC_IS_NATIVE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* This is the default list of suffixes for suffix rules.
|
/* This is the default list of suffixes for suffix rules.
|
||||||
`.s' must come last, so that a `.o' file will be made from
|
'.s' must come last, so that a '.o' file will be made from
|
||||||
a `.c' or `.p' or ... file rather than from a .s file. */
|
a '.c' or '.p' or ... file rather than from a .s file. */
|
||||||
|
|
||||||
static char default_suffixes[]
|
static char default_suffixes[]
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
= ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \
|
/* VMS should include all UNIX/POSIX + some VMS extensions */
|
||||||
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
= ".out .exe .a .olb .hlb .tlb .mlb .ln .o .obj .c .cxx .cc .cpp .pas .p \
|
||||||
.w .ch .cweb .web .com .sh .elc .el";
|
.for .f .r .y .l .ym .yl .mar .s .ss .i .ii .mod .sym .def .h .info .dvi \
|
||||||
|
.tex .texinfo .texi .txinfo .mem .hlp .brn .rnh .rno .rnt .rnx .w .ch .cweb \
|
||||||
|
.web .com .sh .elc .el";
|
||||||
|
#elif defined(__EMX__)
|
||||||
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||||
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||||
|
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
|
||||||
#else
|
#else
|
||||||
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||||
.w .ch .web .sh .elc .el";
|
.w .ch .web .sh .elc .el";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct pspec default_pattern_rules[] =
|
static struct pspec default_pattern_rules[] =
|
||||||
{
|
{
|
||||||
|
#ifdef VMS
|
||||||
{ "(%)", "%",
|
{ "(%)", "%",
|
||||||
|
"@if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/"
|
||||||
|
"$(or "
|
||||||
|
"$(patsubst %,TEXT,$(filter %.tlb %.TLB,$@)),"
|
||||||
|
"$(patsubst %,HELP,$(filter %.hlb %.HLB,$@)),"
|
||||||
|
"$(patsubst %,MACRO,$(filter %.mlb %.MLB,$@)),"
|
||||||
|
"$(and "
|
||||||
|
"$(patsubst %,SHARE,$(filter %.olb %.OLB,$@)),"
|
||||||
|
"$(patsubst %,SHARE,$(filter %.exe %.EXE,$<))),"
|
||||||
|
"OBJECT)"
|
||||||
|
" $@\n"
|
||||||
"$(AR) $(ARFLAGS) $@ $<" },
|
"$(AR) $(ARFLAGS) $@ $<" },
|
||||||
|
|
||||||
|
#else
|
||||||
|
{ "(%)", "%",
|
||||||
|
"$(AR) $(ARFLAGS) $@ $<" },
|
||||||
|
#endif
|
||||||
/* The X.out rules are only in BSD's default set because
|
/* The X.out rules are only in BSD's default set because
|
||||||
BSD Make has no null-suffix rules, so `foo.out' and
|
BSD Make has no null-suffix rules, so 'foo.out' and
|
||||||
`foo' are the same thing. */
|
'foo' are the same thing. */
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
{ "%.exe", "%",
|
{ "%.exe", "%",
|
||||||
"copy $< $@" },
|
"$(CP) $< $@" },
|
||||||
#else
|
|
||||||
|
#endif
|
||||||
{ "%.out", "%",
|
{ "%.out", "%",
|
||||||
"@rm -f $@ \n cp $< $@" },
|
"@rm -f $@ \n cp $< $@" },
|
||||||
#endif
|
|
||||||
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
||||||
{ "%.c", "%.w %.ch",
|
{ "%.c", "%.w %.ch",
|
||||||
"$(CTANGLE) $^ $@" },
|
"$(CTANGLE) $^ $@" },
|
||||||
@@ -74,18 +96,20 @@ static struct pspec default_pattern_rules[] =
|
|||||||
static struct pspec default_terminal_rules[] =
|
static struct pspec default_terminal_rules[] =
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
|
||||||
/* RCS. */
|
/* RCS. */
|
||||||
{ "%", "%$$5lv", /* Multinet style */
|
{ "%", "%$$5lv", /* Multinet style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
{ "%", "%_v", /* Normal style */
|
{ "%", "%_v", /* Normal style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
{ "%", "[.rcs]%_v", /* Normal style */
|
{ "%", "[.rcs]%_v", /* Normal style */
|
||||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||||
|
|
||||||
/* SCCS. */
|
/* SCCS. */
|
||||||
/* ain't no SCCS on vms */
|
/* ain't no SCCS on vms */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* RCS. */
|
/* RCS. */
|
||||||
{ "%", "%,v",
|
{ "%", "%,v",
|
||||||
@@ -104,13 +128,50 @@ static struct pspec default_terminal_rules[] =
|
|||||||
{ 0, 0, 0 }
|
{ 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *default_suffix_rules[] =
|
static const char *default_suffix_rules[] =
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
".o",
|
||||||
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".obj",
|
||||||
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".s",
|
||||||
|
"$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".S",
|
||||||
|
"$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".c",
|
||||||
|
"$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".cc",
|
||||||
|
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".C",
|
||||||
|
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".cpp",
|
||||||
|
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".f",
|
||||||
|
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".m",
|
||||||
|
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".p",
|
||||||
|
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".F",
|
||||||
|
"$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".r",
|
||||||
|
"$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".mod",
|
||||||
|
"$(COMPILE.mod) -o $@ -e $@ $^",
|
||||||
|
|
||||||
|
".def.sym",
|
||||||
|
"$(COMPILE.def) -o $@ $<",
|
||||||
|
|
||||||
|
".sh",
|
||||||
|
"copy $< >$@",
|
||||||
|
|
||||||
".obj.exe",
|
".obj.exe",
|
||||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
".mar.exe",
|
".mar.exe",
|
||||||
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
|
".s.o",
|
||||||
|
"$(COMPILE.s) -o $@ $<",
|
||||||
".s.exe",
|
".s.exe",
|
||||||
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
".c.exe",
|
".c.exe",
|
||||||
@@ -145,6 +206,8 @@ static char *default_suffix_rules[] =
|
|||||||
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
||||||
".c.obj",
|
".c.obj",
|
||||||
"$(COMPILE.c) /obj=$@ $<",
|
"$(COMPILE.c) /obj=$@ $<",
|
||||||
|
".c.o",
|
||||||
|
"$(COMPILE.c) /obj=$@ $<",
|
||||||
".cc.ii",
|
".cc.ii",
|
||||||
"$(COMPILE.cc)/prep /list=$@ $<",
|
"$(COMPILE.cc)/prep /list=$@ $<",
|
||||||
".cc.ss",
|
".cc.ss",
|
||||||
@@ -153,10 +216,20 @@ static char *default_suffix_rules[] =
|
|||||||
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
||||||
".cc.obj",
|
".cc.obj",
|
||||||
"$(COMPILE.cc) /obj=$@ $<",
|
"$(COMPILE.cc) /obj=$@ $<",
|
||||||
|
".cc.o",
|
||||||
|
"$(COMPILE.cc) /obj=$@ $<",
|
||||||
|
".cxx.obj",
|
||||||
|
"$(COMPILE.cxx) /obj=$@ $<",
|
||||||
|
".cxx.o",
|
||||||
|
"$(COMPILE.cxx) /obj=$@ $<",
|
||||||
".for.obj",
|
".for.obj",
|
||||||
"$(COMPILE.for) /obj=$@ $<",
|
"$(COMPILE.for) /obj=$@ $<",
|
||||||
|
".for.o",
|
||||||
|
"$(COMPILE.for) /obj=$@ $<",
|
||||||
".pas.obj",
|
".pas.obj",
|
||||||
"$(COMPILE.pas) /obj=$@ $<",
|
"$(COMPILE.pas) /obj=$@ $<",
|
||||||
|
".pas.o",
|
||||||
|
"$(COMPILE.pas) /obj=$@ $<",
|
||||||
|
|
||||||
".y.c",
|
".y.c",
|
||||||
"$(YACC.y) $< \n rename y_tab.c $@",
|
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||||
@@ -169,6 +242,27 @@ static char *default_suffix_rules[] =
|
|||||||
".tex.dvi",
|
".tex.dvi",
|
||||||
"$(TEX) $<",
|
"$(TEX) $<",
|
||||||
|
|
||||||
|
".cpp.o",
|
||||||
|
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||||
|
".f.o",
|
||||||
|
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||||
|
".m.o",
|
||||||
|
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||||
|
".p.o",
|
||||||
|
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||||
|
".r.o",
|
||||||
|
"$(COMPILE.r) $(OUTPUT_OPTION) $<",
|
||||||
|
".mod.o",
|
||||||
|
"$(COMPILE.mod) -o $@ $<",
|
||||||
|
|
||||||
|
".c.ln",
|
||||||
|
"$(LINT.c) -C$* $<",
|
||||||
|
".y.ln",
|
||||||
|
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||||
|
|
||||||
|
".l.ln",
|
||||||
|
"@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
|
||||||
|
|
||||||
#else /* ! VMS */
|
#else /* ! VMS */
|
||||||
|
|
||||||
".o",
|
".o",
|
||||||
@@ -187,6 +281,8 @@ static char *default_suffix_rules[] =
|
|||||||
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
".f",
|
".f",
|
||||||
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".m",
|
||||||
|
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
".p",
|
".p",
|
||||||
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
".F",
|
".F",
|
||||||
@@ -216,6 +312,8 @@ static char *default_suffix_rules[] =
|
|||||||
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||||
".f.o",
|
".f.o",
|
||||||
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||||
|
".m.o",
|
||||||
|
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||||
".p.o",
|
".p.o",
|
||||||
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||||
".F.o",
|
".F.o",
|
||||||
@@ -244,15 +342,18 @@ static char *default_suffix_rules[] =
|
|||||||
#endif
|
#endif
|
||||||
".l.c",
|
".l.c",
|
||||||
"@$(RM) $@ \n $(LEX.l) $< > $@",
|
"@$(RM) $@ \n $(LEX.l) $< > $@",
|
||||||
|
".ym.m",
|
||||||
|
"$(YACC.m) $< \n mv -f y.tab.c $@",
|
||||||
|
".lm.m",
|
||||||
|
"@$(RM) $@ \n $(LEX.m) $< > $@",
|
||||||
|
|
||||||
".F.f",
|
".F.f",
|
||||||
"$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
|
"$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
|
||||||
".r.f",
|
".r.f",
|
||||||
"$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
|
"$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
|
||||||
|
|
||||||
/* This might actually make lex.yy.c if there's no %R%
|
/* This might actually make lex.yy.c if there's no %R% directive in $*.l,
|
||||||
directive in $*.l, but in that case why were you
|
but in that case why were you trying to make $*.r anyway? */
|
||||||
trying to make $*.r anyway? */
|
|
||||||
".l.r",
|
".l.r",
|
||||||
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
|
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
|
||||||
|
|
||||||
@@ -281,13 +382,13 @@ static char *default_suffix_rules[] =
|
|||||||
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
||||||
|
|
||||||
".w.c",
|
".w.c",
|
||||||
"$(CTANGLE) $< - $@", /* The `-' says there is no `.ch' file. */
|
"$(CTANGLE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||||
|
|
||||||
".web.p",
|
".web.p",
|
||||||
"$(TANGLE) $<",
|
"$(TANGLE) $<",
|
||||||
|
|
||||||
".w.tex",
|
".w.tex",
|
||||||
"$(CWEAVE) $< - $@", /* The `-' says there is no `.ch' file. */
|
"$(CWEAVE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||||
|
|
||||||
".web.tex",
|
".web.tex",
|
||||||
"$(WEAVE) $<",
|
"$(WEAVE) $<",
|
||||||
@@ -297,15 +398,20 @@ static char *default_suffix_rules[] =
|
|||||||
0, 0,
|
0, 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *default_variables[] =
|
static const char *default_variables[] =
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
#ifdef __ALPHA
|
#ifdef __ALPHA
|
||||||
"ARCH", "ALPHA",
|
"ARCH", "ALPHA",
|
||||||
#else
|
#endif
|
||||||
|
#ifdef __ia64
|
||||||
|
"ARCH", "IA64",
|
||||||
|
#endif
|
||||||
|
#ifdef __VAX
|
||||||
"ARCH", "VAX",
|
"ARCH", "VAX",
|
||||||
#endif
|
#endif
|
||||||
"AR", "library/obj",
|
"AR", "library",
|
||||||
|
"LIBRARY", "library",
|
||||||
"ARFLAGS", "/replace",
|
"ARFLAGS", "/replace",
|
||||||
"AS", "macro",
|
"AS", "macro",
|
||||||
"MACRO", "macro",
|
"MACRO", "macro",
|
||||||
@@ -315,15 +421,21 @@ static char *default_variables[] =
|
|||||||
"CC", "cc",
|
"CC", "cc",
|
||||||
#endif
|
#endif
|
||||||
"CD", "builtin_cd",
|
"CD", "builtin_cd",
|
||||||
"MAKE", "make",
|
"ECHO", "builtin_echo",
|
||||||
"ECHO", "write sys$$output \"",
|
|
||||||
#ifdef GCC_IS_NATIVE
|
#ifdef GCC_IS_NATIVE
|
||||||
"C++", "gcc/plus",
|
"C++", "gcc/plus",
|
||||||
"CXX", "gcc/plus",
|
"CXX", "gcc/plus",
|
||||||
#else
|
#else
|
||||||
"C++", "cxx",
|
"C++", "cxx",
|
||||||
"CXX", "cxx",
|
"CXX", "cxx",
|
||||||
|
#ifndef __ia64
|
||||||
"CXXLD", "cxxlink",
|
"CXXLD", "cxxlink",
|
||||||
|
"CXXLINK", "cxxlink",
|
||||||
|
#else
|
||||||
|
/* CXXLINK is not used on VMS/IA64 */
|
||||||
|
"CXXLD", "link",
|
||||||
|
"CXXLINK", "link",
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
"CO", "co",
|
"CO", "co",
|
||||||
"CPP", "$(CC) /preprocess_only",
|
"CPP", "$(CC) /preprocess_only",
|
||||||
@@ -359,23 +471,49 @@ static char *default_variables[] =
|
|||||||
"LDLIBS", "",
|
"LDLIBS", "",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
"LINK.o", "$(LD) $(LDFLAGS)",
|
||||||
"LINK.obj", "$(LD) $(LDFLAGS)",
|
"LINK.obj", "$(LD) $(LDFLAGS)",
|
||||||
#ifndef GCC_IS_NATIVE
|
#ifndef GCC_IS_NATIVE
|
||||||
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
||||||
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
#endif
|
#endif
|
||||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.C", "$(COMPILE.cc)",
|
||||||
|
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||||
|
"LINK.C", "$(LINK.cc)",
|
||||||
|
"LINK.cpp", "$(LINK.cc)",
|
||||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||||
"LEX.l", "$(LEX) $(LFLAGS)",
|
"LEX.l", "$(LEX) $(LFLAGS)",
|
||||||
|
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||||
|
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||||
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
||||||
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
||||||
|
"LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
||||||
|
"COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
|
||||||
|
"PREPROCESS.S", "$(CC) -E $(CPPFLAGS)",
|
||||||
|
"PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
|
||||||
|
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
||||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
|
||||||
"MV", "rename/new_version",
|
"MV", "rename/new_version",
|
||||||
"CP", "copy",
|
"CP", "copy",
|
||||||
|
".LIBPATTERNS", "%.olb lib%.a",
|
||||||
|
|
||||||
#else /* !VMS */
|
#else /* !VMS */
|
||||||
|
|
||||||
@@ -389,9 +527,11 @@ static char *default_variables[] =
|
|||||||
# else
|
# else
|
||||||
"CXX", "gcc",
|
"CXX", "gcc",
|
||||||
# endif /* __MSDOS__ */
|
# endif /* __MSDOS__ */
|
||||||
|
"OBJC", "gcc",
|
||||||
#else
|
#else
|
||||||
"CC", "cc",
|
"CC", "cc",
|
||||||
"CXX", "g++",
|
"CXX", "g++",
|
||||||
|
"OBJC", "cc",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
||||||
@@ -459,14 +599,29 @@ static char *default_variables[] =
|
|||||||
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||||
|
/* On case-insensitive filesystems, treat *.C files as *.c files,
|
||||||
|
to avoid erroneously compiling C sources as C++, which will
|
||||||
|
probably fail. */
|
||||||
"COMPILE.C", "$(COMPILE.cc)",
|
"COMPILE.C", "$(COMPILE.cc)",
|
||||||
|
#else
|
||||||
|
"COMPILE.C", "$(COMPILE.c)",
|
||||||
|
#endif
|
||||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||||
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||||
"LINK.C", "$(LINK.cc)",
|
"LINK.C", "$(LINK.cc)",
|
||||||
|
#else
|
||||||
|
"LINK.C", "$(LINK.c)",
|
||||||
|
#endif
|
||||||
"LINK.cpp", "$(LINK.cc)",
|
"LINK.cpp", "$(LINK.cc)",
|
||||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||||
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
||||||
|
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||||
|
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||||
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||||
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
@@ -494,63 +649,71 @@ static char *default_variables[] =
|
|||||||
"SCCS_OUTPUT_OPTION", "-G$@",
|
"SCCS_OUTPUT_OPTION", "-G$@",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AMIGA
|
#if defined(_AMIGA)
|
||||||
".LIBPATTERNS", "%.lib",
|
".LIBPATTERNS", "%.lib",
|
||||||
#else
|
#elif defined(__MSDOS__)
|
||||||
#ifdef __MSDOS__
|
|
||||||
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
".LIBPATTERNS", "lib%.dylib lib%.a",
|
||||||
|
#elif defined(__CYGWIN__) || defined(WINDOWS32)
|
||||||
|
".LIBPATTERNS", "lib%.dll.a %.dll.a lib%.a %.lib lib%.dll %.dll",
|
||||||
#else
|
#else
|
||||||
".LIBPATTERNS", "lib%.so lib%.a",
|
".LIBPATTERNS", "lib%.so lib%.a",
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
|
/* Make this assignment to avoid undefined variable warnings. */
|
||||||
|
"GNUMAKEFLAGS", "",
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Set up the default .SUFFIXES list. */
|
/* Set up the default .SUFFIXES list. */
|
||||||
|
|
||||||
void
|
void
|
||||||
set_default_suffixes ()
|
set_default_suffixes (void)
|
||||||
{
|
{
|
||||||
suffix_file = enter_file (".SUFFIXES");
|
suffix_file = enter_file (strcache_add (".SUFFIXES"));
|
||||||
|
suffix_file->builtin = 1;
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
(void) define_variable ("SUFFIXES", 8, "", o_default, 0);
|
define_variable_cname ("SUFFIXES", "", o_default, 0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *p = default_suffixes;
|
struct dep *d;
|
||||||
suffix_file->deps = (struct dep *)
|
const char *p = default_suffixes;
|
||||||
multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1),
|
suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ ((char **)&p, struct dep),
|
||||||
sizeof (struct dep));
|
NULL);
|
||||||
(void) define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0);
|
for (d = suffix_file->deps; d; d = d->next)
|
||||||
|
d->file->builtin = 1;
|
||||||
|
|
||||||
|
define_variable_cname ("SUFFIXES", default_suffixes, o_default, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enter the default suffix rules as file rules. This used to be done in
|
/* Enter the default suffix rules as file rules. This used to be done in
|
||||||
install_default_implicit_rules, but that loses because we want the
|
install_default_implicit_rules, but that loses because we want the
|
||||||
suffix rules installed before reading makefiles, and thee pattern rules
|
suffix rules installed before reading makefiles, and the pattern rules
|
||||||
installed after. */
|
installed after. */
|
||||||
|
|
||||||
void
|
void
|
||||||
install_default_suffix_rules ()
|
install_default_suffix_rules (void)
|
||||||
{
|
{
|
||||||
register char **s;
|
const char **s;
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (s = default_suffix_rules; *s != 0; s += 2)
|
for (s = default_suffix_rules; *s != 0; s += 2)
|
||||||
{
|
{
|
||||||
register struct file *f = enter_file (s[0]);
|
struct file *f = enter_file (strcache_add (s[0]));
|
||||||
/* Don't clobber cmds given in a makefile if there were any. */
|
/* This function should run before any makefile is parsed. */
|
||||||
if (f->cmds == 0)
|
assert (f->cmds == 0);
|
||||||
{
|
f->cmds = xmalloc (sizeof (struct commands));
|
||||||
f->cmds = (struct commands *) xmalloc (sizeof (struct commands));
|
|
||||||
f->cmds->fileinfo.filenm = 0;
|
f->cmds->fileinfo.filenm = 0;
|
||||||
f->cmds->commands = s[1];
|
f->cmds->commands = xstrdup (s[1]);
|
||||||
f->cmds->command_lines = 0;
|
f->cmds->command_lines = 0;
|
||||||
}
|
f->cmds->recipe_prefix = RECIPEPREFIX_DEFAULT;
|
||||||
|
f->builtin = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,9 +721,9 @@ install_default_suffix_rules ()
|
|||||||
/* Install the default pattern rules. */
|
/* Install the default pattern rules. */
|
||||||
|
|
||||||
void
|
void
|
||||||
install_default_implicit_rules ()
|
install_default_implicit_rules (void)
|
||||||
{
|
{
|
||||||
register struct pspec *p;
|
struct pspec *p;
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
return;
|
return;
|
||||||
@@ -573,13 +736,22 @@ install_default_implicit_rules ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
define_default_variables ()
|
define_default_variables (void)
|
||||||
{
|
{
|
||||||
register char **s;
|
const char **s;
|
||||||
|
|
||||||
if (no_builtin_variables_flag)
|
if (no_builtin_variables_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (s = default_variables; *s != 0; s += 2)
|
for (s = default_variables; *s != 0; s += 2)
|
||||||
(void) define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
|
define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
undefine_default_variables (void)
|
||||||
|
{
|
||||||
|
const char **s;
|
||||||
|
|
||||||
|
for (s = default_variables; *s != 0; s += 2)
|
||||||
|
undefine_variable_global (s[0], strlen (s[0]), o_default);
|
||||||
}
|
}
|
||||||
|
|||||||
139
dep.h
139
dep.h
@@ -1,25 +1,34 @@
|
|||||||
/* Definitions of dependency data structures for GNU Make.
|
/* Definitions of dependency data structures for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
/* Flag bits for the second argument to `read_makefile'.
|
|
||||||
These flags are saved in the `changed' field of each
|
/* Structure used in chains of names, for parsing and globbing. */
|
||||||
`struct dep' in the chain returned by `read_all_makefiles'. */
|
|
||||||
|
#define NAMESEQ(_t) \
|
||||||
|
_t *next; \
|
||||||
|
const char *name
|
||||||
|
|
||||||
|
struct nameseq
|
||||||
|
{
|
||||||
|
NAMESEQ (struct nameseq);
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Flag bits for the second argument to 'read_makefile'.
|
||||||
|
These flags are saved in the 'flags' field of each
|
||||||
|
'struct goaldep' in the chain returned by 'read_all_makefiles'. */
|
||||||
|
|
||||||
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
||||||
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||||
@@ -28,51 +37,95 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#define RM_NOFLAG 0
|
#define RM_NOFLAG 0
|
||||||
|
|
||||||
/* Structure representing one dependency of a file.
|
/* Structure representing one dependency of a file.
|
||||||
Each struct file's `deps' points to a chain of these,
|
Each struct file's 'deps' points to a chain of these, through 'next'.
|
||||||
chained through the `next'.
|
'stem' is the stem for this dep line of static pattern rule or NULL. */
|
||||||
|
|
||||||
Note that the first two words of this match a struct nameseq. */
|
#define DEP(_t) \
|
||||||
|
NAMESEQ (_t); \
|
||||||
|
struct file *file; \
|
||||||
|
const char *stem; \
|
||||||
|
unsigned short flags : 8; \
|
||||||
|
unsigned short changed : 1; \
|
||||||
|
unsigned short ignore_mtime : 1; \
|
||||||
|
unsigned short staticpattern : 1; \
|
||||||
|
unsigned short need_2nd_expansion : 1
|
||||||
|
|
||||||
struct dep
|
struct dep
|
||||||
{
|
{
|
||||||
struct dep *next;
|
DEP (struct dep);
|
||||||
char *name;
|
|
||||||
struct file *file;
|
|
||||||
unsigned int changed : 8;
|
|
||||||
unsigned int ignore_mtime : 1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Structure representing one goal.
|
||||||
|
The goals to be built constitute a chain of these, chained through 'next'.
|
||||||
|
'stem' is not used, but it's simpler to include and ignore it. */
|
||||||
|
|
||||||
/* Structure used in chains of names, for parsing and globbing. */
|
struct goaldep
|
||||||
|
|
||||||
struct nameseq
|
|
||||||
{
|
{
|
||||||
struct nameseq *next;
|
DEP (struct goaldep);
|
||||||
char *name;
|
unsigned short error;
|
||||||
|
gmk_floc floc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Options for parsing lists of filenames. */
|
||||||
|
|
||||||
|
#define PARSEFS_NONE 0x0000
|
||||||
|
#define PARSEFS_NOSTRIP 0x0001
|
||||||
|
#define PARSEFS_NOAR 0x0002
|
||||||
|
#define PARSEFS_NOGLOB 0x0004
|
||||||
|
#define PARSEFS_EXISTS 0x0008
|
||||||
|
#define PARSEFS_NOCACHE 0x0010
|
||||||
|
|
||||||
|
#define PARSE_FILE_SEQ(_s,_t,_c,_p,_f) \
|
||||||
|
(_t *)parse_file_seq ((_s),sizeof (_t),(_c),(_p),(_f))
|
||||||
|
#define PARSE_SIMPLE_SEQ(_s,_t) \
|
||||||
|
(_t *)parse_file_seq ((_s),sizeof (_t),MAP_NUL,NULL,PARSEFS_NONE)
|
||||||
|
|
||||||
extern struct nameseq *multi_glob PARAMS ((struct nameseq *chain, unsigned int size));
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
extern struct nameseq *parse_file_seq ();
|
void *parse_file_seq ();
|
||||||
#else
|
#else
|
||||||
extern struct nameseq *parse_file_seq PARAMS ((char **stringp, int stopchar, unsigned int size, int strip));
|
void *parse_file_seq (char **stringp, unsigned int size,
|
||||||
|
int stopmap, const char *prefix, int flags);
|
||||||
#endif
|
#endif
|
||||||
extern char *tilde_expand PARAMS ((char *name));
|
|
||||||
|
char *tilde_expand (const char *name);
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
extern struct nameseq *ar_glob PARAMS ((char *arname, char *member_pattern, unsigned int size));
|
struct nameseq *ar_glob (const char *arname, const char *member_pattern, unsigned int size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef iAPX286
|
#define dep_name(d) ((d)->name ? (d)->name : (d)->file->name)
|
||||||
#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
|
|
||||||
|
#define alloc_seq_elt(_t) xcalloc (sizeof (_t))
|
||||||
|
void free_ns_chain (struct nameseq *n);
|
||||||
|
|
||||||
|
#if defined(MAKE_MAINTAINER_MODE) && defined(__GNUC__)
|
||||||
|
/* Use inline to get real type-checking. */
|
||||||
|
#define SI static inline
|
||||||
|
SI struct nameseq *alloc_ns() { return alloc_seq_elt (struct nameseq); }
|
||||||
|
SI struct dep *alloc_dep() { return alloc_seq_elt (struct dep); }
|
||||||
|
SI struct goaldep *alloc_goaldep() { return alloc_seq_elt (struct goaldep); }
|
||||||
|
|
||||||
|
SI void free_ns(struct nameseq *n) { free (n); }
|
||||||
|
SI void free_dep(struct dep *d) { free_ns ((struct nameseq *)d); }
|
||||||
|
SI void free_goaldep(struct goaldep *g) { free_dep ((struct dep *)g); }
|
||||||
|
|
||||||
|
SI void free_dep_chain(struct dep *d) { free_ns_chain((struct nameseq *)d); }
|
||||||
|
SI void free_goal_chain(struct goaldep *g) { free_dep_chain((struct dep *)g); }
|
||||||
#else
|
#else
|
||||||
/* Buggy compiler can't hack this. */
|
# define alloc_ns() alloc_seq_elt (struct nameseq)
|
||||||
extern char *dep_name ();
|
# define alloc_dep() alloc_seq_elt (struct dep)
|
||||||
|
# define alloc_goaldep() alloc_seq_elt (struct goaldep)
|
||||||
|
|
||||||
|
# define free_ns(_n) free (_n)
|
||||||
|
# define free_dep(_d) free_ns (_d)
|
||||||
|
# define free_goaldep(_g) free_dep (_g)
|
||||||
|
|
||||||
|
# define free_dep_chain(_d) free_ns_chain ((struct nameseq *)(_d))
|
||||||
|
# define free_goal_chain(_g) free_ns_chain ((struct nameseq *)(_g))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern struct dep *copy_dep_chain PARAMS ((struct dep *d));
|
struct dep *copy_dep_chain (const struct dep *d);
|
||||||
extern struct dep *read_all_makefiles PARAMS ((char **makefiles));
|
|
||||||
extern int eval_buffer PARAMS ((char *buffer));
|
struct goaldep *read_all_makefiles (const char **makefiles);
|
||||||
extern int update_goal_chain PARAMS ((struct dep *goals, int makefiles));
|
void eval_buffer (char *buffer, const gmk_floc *floc);
|
||||||
extern void uniquize_deps PARAMS ((struct dep *));
|
enum update_status update_goal_chain (struct goaldep *goals);
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
Makefile Makefile.in
|
|
||||||
fdl.texi make-stds.texi texinfo.tex
|
|
||||||
make.info*
|
|
||||||
make*.html
|
|
||||||
make.aux make.cp make.cps make.fn make.fns make.ky
|
|
||||||
make.pg make.toc make.tp make.vr make.log
|
|
||||||
make.dvi make.ps make.pdf
|
|
||||||
22
doc/.gitignore
vendored
Normal file
22
doc/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
manual/
|
||||||
|
gendocs_template
|
||||||
|
fdl.texi
|
||||||
|
make-stds.texi
|
||||||
|
stamp-vti
|
||||||
|
version.texi
|
||||||
|
make.info*
|
||||||
|
make*.html
|
||||||
|
make.aux
|
||||||
|
make.cp
|
||||||
|
make.cps
|
||||||
|
make.dvi
|
||||||
|
make.fn
|
||||||
|
make.fns
|
||||||
|
make.ky
|
||||||
|
make.log
|
||||||
|
make.pdf
|
||||||
|
make.pg
|
||||||
|
make.ps
|
||||||
|
make.toc
|
||||||
|
make.tp
|
||||||
|
make.vr
|
||||||
@@ -1,7 +1,19 @@
|
|||||||
## Process this file with automake to create Makefile.in.
|
# -*-Makefile-*-, or close enough
|
||||||
|
# Copyright (C) 2000-2016 Free Software Foundation, Inc.
|
||||||
## Makefile for GNU make documentation.
|
# This file is part of GNU Make.
|
||||||
## Copyright 2002 Free Software Foundation, Inc.
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
TEXI2HTML = texi2html
|
TEXI2HTML = texi2html
|
||||||
TEXI2HTML_FLAGS = -split_chapter
|
TEXI2HTML_FLAGS = -split_chapter
|
||||||
@@ -10,14 +22,3 @@ info_TEXINFOS = make.texi
|
|||||||
make_TEXINFOS = fdl.texi make-stds.texi
|
make_TEXINFOS = fdl.texi make-stds.texi
|
||||||
|
|
||||||
CLEANFILES = make*.html
|
CLEANFILES = make*.html
|
||||||
|
|
||||||
## ----------------------------- ##
|
|
||||||
## Other documentation formats. ##
|
|
||||||
## ----------------------------- ##
|
|
||||||
|
|
||||||
html: make_1.html
|
|
||||||
|
|
||||||
make_1.html: $(info_TEXINFOS) $(make_TEXINFOS)
|
|
||||||
$(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/make.texi
|
|
||||||
|
|
||||||
.PHONY: html
|
|
||||||
|
|||||||
5469
doc/make.texi
5469
doc/make.texi
File diff suppressed because it is too large
Load Diff
31
dosbuild.bat
31
dosbuild.bat
@@ -1,7 +1,26 @@
|
|||||||
@echo Building Make for MSDOS
|
@echo off
|
||||||
@rem Echo ON so they will see what is going on.
|
rem Copyright (C) 1998-2016 Free Software Foundation, Inc.
|
||||||
|
rem This file is part of GNU Make.
|
||||||
|
rem
|
||||||
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
rem the terms of the GNU General Public License as published by the Free
|
||||||
|
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||||
|
rem any later version.
|
||||||
|
rem
|
||||||
|
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||||
|
rem more details.
|
||||||
|
rem
|
||||||
|
rem You should have received a copy of the GNU General Public License along
|
||||||
|
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
echo Building Make for MSDOS
|
||||||
|
|
||||||
|
rem Echo ON so they will see what is going on.
|
||||||
@echo on
|
@echo on
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g output.c -o output.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
|
||||||
@@ -16,6 +35,8 @@ gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o
|
|||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g hash.c -o hash.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g strcache.c -o strcache.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o
|
||||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o
|
||||||
@@ -31,9 +52,11 @@ ar rv libglob.a glob.o fnmatch.o
|
|||||||
@echo off
|
@echo off
|
||||||
cd ..
|
cd ..
|
||||||
echo commands.o > respf.$$$
|
echo commands.o > respf.$$$
|
||||||
for %%f in (job dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||||
for %%f in (expand function vpath version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
||||||
echo glob/libglob.a >> respf.$$$
|
echo glob/libglob.a >> respf.$$$
|
||||||
|
rem gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g guile.c -o guile.o
|
||||||
|
rem echo guile.o >> respf.$$$
|
||||||
@echo Linking...
|
@echo Linking...
|
||||||
@echo on
|
@echo on
|
||||||
gcc -o make.new @respf.$$$
|
gcc -o make.new @respf.$$$
|
||||||
|
|||||||
383
expand.c
383
expand.c
@@ -1,23 +1,20 @@
|
|||||||
/* Variable expansion functions for GNU Make.
|
/* Variable expansion functions for GNU Make.
|
||||||
Copyright (C) 1988, 89, 91, 92, 93, 95 Free Software Foundation, Inc.
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@@ -27,6 +24,10 @@ Boston, MA 02111-1307, USA. */
|
|||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "rule.h"
|
#include "rule.h"
|
||||||
|
|
||||||
|
/* Initially, any errors reported when expanding strings will be reported
|
||||||
|
against the file where the error appears. */
|
||||||
|
const gmk_floc **expanding_var = &reading_file;
|
||||||
|
|
||||||
/* The next two describe the variable output buffer.
|
/* The next two describe the variable output buffer.
|
||||||
This buffer is used to hold the variable-expansion of a line of the
|
This buffer is used to hold the variable-expansion of a line of the
|
||||||
makefile. It is made bigger with realloc whenever it is too small.
|
makefile. It is made bigger with realloc whenever it is too small.
|
||||||
@@ -52,9 +53,7 @@ char *variable_buffer;
|
|||||||
the following call. */
|
the following call. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
variable_buffer_output (ptr, string, length)
|
variable_buffer_output (char *ptr, const char *string, unsigned int length)
|
||||||
char *ptr, *string;
|
|
||||||
unsigned int length;
|
|
||||||
{
|
{
|
||||||
register unsigned int newlen = length + (ptr - variable_buffer);
|
register unsigned int newlen = length + (ptr - variable_buffer);
|
||||||
|
|
||||||
@@ -64,26 +63,25 @@ variable_buffer_output (ptr, string, length)
|
|||||||
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
||||||
? newlen + 100
|
? newlen + 100
|
||||||
: 2 * variable_buffer_length);
|
: 2 * variable_buffer_length);
|
||||||
variable_buffer = (char *) xrealloc (variable_buffer,
|
variable_buffer = xrealloc (variable_buffer, variable_buffer_length);
|
||||||
variable_buffer_length);
|
|
||||||
ptr = variable_buffer + offset;
|
ptr = variable_buffer + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
bcopy (string, ptr, length);
|
memcpy (ptr, string, length);
|
||||||
return ptr + length;
|
return ptr + length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a pointer to the beginning of the variable buffer. */
|
/* Return a pointer to the beginning of the variable buffer. */
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
initialize_variable_output ()
|
initialize_variable_output (void)
|
||||||
{
|
{
|
||||||
/* If we don't have a variable output buffer yet, get one. */
|
/* If we don't have a variable output buffer yet, get one. */
|
||||||
|
|
||||||
if (variable_buffer == 0)
|
if (variable_buffer == 0)
|
||||||
{
|
{
|
||||||
variable_buffer_length = 200;
|
variable_buffer_length = 200;
|
||||||
variable_buffer = (char *) xmalloc (variable_buffer_length);
|
variable_buffer = xmalloc (variable_buffer_length);
|
||||||
variable_buffer[0] = '\0';
|
variable_buffer[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,22 +90,39 @@ initialize_variable_output ()
|
|||||||
|
|
||||||
/* Recursively expand V. The returned string is malloc'd. */
|
/* Recursively expand V. The returned string is malloc'd. */
|
||||||
|
|
||||||
static char *allocated_variable_append PARAMS ((const struct variable *v));
|
static char *allocated_variable_append (const struct variable *v);
|
||||||
|
|
||||||
char *
|
char *
|
||||||
recursively_expand_for_file (v, file)
|
recursively_expand_for_file (struct variable *v, struct file *file)
|
||||||
struct variable *v;
|
|
||||||
struct file *file;
|
|
||||||
{
|
{
|
||||||
char *value;
|
char *value;
|
||||||
|
const gmk_floc *this_var;
|
||||||
|
const gmk_floc **saved_varp;
|
||||||
struct variable_set_list *save = 0;
|
struct variable_set_list *save = 0;
|
||||||
|
int set_reading = 0;
|
||||||
|
|
||||||
|
/* Don't install a new location if this location is empty.
|
||||||
|
This can happen for command-line variables, builtin variables, etc. */
|
||||||
|
saved_varp = expanding_var;
|
||||||
|
if (v->fileinfo.filenm)
|
||||||
|
{
|
||||||
|
this_var = &v->fileinfo;
|
||||||
|
expanding_var = &this_var;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we have no other file-reading context, use the variable's context. */
|
||||||
|
if (!reading_file)
|
||||||
|
{
|
||||||
|
set_reading = 1;
|
||||||
|
reading_file = &v->fileinfo;
|
||||||
|
}
|
||||||
|
|
||||||
if (v->expanding)
|
if (v->expanding)
|
||||||
{
|
{
|
||||||
if (!v->exp_count)
|
if (!v->exp_count)
|
||||||
/* Expanding V causes infinite recursion. Lose. */
|
/* Expanding V causes infinite recursion. Lose. */
|
||||||
fatal (reading_file,
|
OS (fatal, *expanding_var,
|
||||||
_("Recursive variable `%s' references itself (eventually)"),
|
_("Recursive variable '%s' references itself (eventually)"),
|
||||||
v->name);
|
v->name);
|
||||||
--v->exp_count;
|
--v->exp_count;
|
||||||
}
|
}
|
||||||
@@ -125,9 +140,14 @@ recursively_expand_for_file (v, file)
|
|||||||
value = allocated_variable_expand (v->value);
|
value = allocated_variable_expand (v->value);
|
||||||
v->expanding = 0;
|
v->expanding = 0;
|
||||||
|
|
||||||
|
if (set_reading)
|
||||||
|
reading_file = 0;
|
||||||
|
|
||||||
if (file)
|
if (file)
|
||||||
current_variable_set_list = save;
|
current_variable_set_list = save;
|
||||||
|
|
||||||
|
expanding_var = saved_varp;
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,12 +157,9 @@ recursively_expand_for_file (v, file)
|
|||||||
__inline
|
__inline
|
||||||
#endif
|
#endif
|
||||||
static char *
|
static char *
|
||||||
reference_variable (o, name, length)
|
reference_variable (char *o, const char *name, unsigned int length)
|
||||||
char *o;
|
|
||||||
char *name;
|
|
||||||
unsigned int length;
|
|
||||||
{
|
{
|
||||||
register struct variable *v;
|
struct variable *v;
|
||||||
char *value;
|
char *value;
|
||||||
|
|
||||||
v = lookup_variable (name, length);
|
v = lookup_variable (name, length);
|
||||||
@@ -150,7 +167,8 @@ reference_variable (o, name, length)
|
|||||||
if (v == 0)
|
if (v == 0)
|
||||||
warn_undefined (name, length);
|
warn_undefined (name, length);
|
||||||
|
|
||||||
if (v == 0 || *v->value == '\0')
|
/* If there's no variable by that name or it has no value, stop now. */
|
||||||
|
if (v == 0 || (*v->value == '\0' && !v->append))
|
||||||
return o;
|
return o;
|
||||||
|
|
||||||
value = (v->recursive ? recursively_expand (v) : v->value);
|
value = (v->recursive ? recursively_expand (v) : v->value);
|
||||||
@@ -167,35 +185,37 @@ reference_variable (o, name, length)
|
|||||||
LENGTH bytes of STRING are actually scanned. If LENGTH is -1, scan until
|
LENGTH bytes of STRING are actually scanned. If LENGTH is -1, scan until
|
||||||
a null byte is found.
|
a null byte is found.
|
||||||
|
|
||||||
Write the results to LINE, which must point into `variable_buffer'. If
|
Write the results to LINE, which must point into 'variable_buffer'. If
|
||||||
LINE is NULL, start at the beginning of the buffer.
|
LINE is NULL, start at the beginning of the buffer.
|
||||||
Return a pointer to LINE, or to the beginning of the buffer if LINE is
|
Return a pointer to LINE, or to the beginning of the buffer if LINE is
|
||||||
NULL. */
|
NULL.
|
||||||
|
*/
|
||||||
char *
|
char *
|
||||||
variable_expand_string (line, string, length)
|
variable_expand_string (char *line, const char *string, long length)
|
||||||
register char *line;
|
|
||||||
char *string;
|
|
||||||
long length;
|
|
||||||
{
|
{
|
||||||
register struct variable *v;
|
struct variable *v;
|
||||||
register char *p, *o, *p1;
|
const char *p, *p1;
|
||||||
char save_char = '\0';
|
char *save;
|
||||||
|
char *o;
|
||||||
unsigned int line_offset;
|
unsigned int line_offset;
|
||||||
|
|
||||||
if (!line)
|
if (!line)
|
||||||
line = initialize_variable_output();
|
line = initialize_variable_output ();
|
||||||
|
|
||||||
p = string;
|
|
||||||
o = line;
|
o = line;
|
||||||
line_offset = line - variable_buffer;
|
line_offset = line - variable_buffer;
|
||||||
|
|
||||||
if (length >= 0)
|
if (length == 0)
|
||||||
{
|
{
|
||||||
save_char = string[length];
|
variable_buffer_output (o, "", 1);
|
||||||
string[length] = '\0';
|
return (variable_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We need a copy of STRING: due to eval, it's possible that it will get
|
||||||
|
freed as we process it (it might be the value of a variable that's reset
|
||||||
|
for example). Also having a nil-terminated string is handy. */
|
||||||
|
save = length < 0 ? xstrdup (string) : xstrndup (string, length);
|
||||||
|
p = save;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* Copy all following uninteresting chars all at once to the
|
/* Copy all following uninteresting chars all at once to the
|
||||||
@@ -204,7 +224,7 @@ variable_expand_string (line, string, length)
|
|||||||
|
|
||||||
p1 = strchr (p, '$');
|
p1 = strchr (p, '$');
|
||||||
|
|
||||||
o = variable_buffer_output (o, p, p1 != 0 ? p1 - p : strlen (p) + 1);
|
o = variable_buffer_output (o, p, p1 != 0 ? (unsigned int)(p1 - p) : strlen (p) + 1);
|
||||||
|
|
||||||
if (p1 == 0)
|
if (p1 == 0)
|
||||||
break;
|
break;
|
||||||
@@ -215,8 +235,10 @@ variable_expand_string (line, string, length)
|
|||||||
switch (*p)
|
switch (*p)
|
||||||
{
|
{
|
||||||
case '$':
|
case '$':
|
||||||
/* $$ seen means output one $ to the variable output buffer. */
|
case '\0':
|
||||||
o = variable_buffer_output (o, p, 1);
|
/* $$ or $ at the end of the string means output one $ to the
|
||||||
|
variable output buffer. */
|
||||||
|
o = variable_buffer_output (o, p1, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '(':
|
case '(':
|
||||||
@@ -225,10 +247,11 @@ variable_expand_string (line, string, length)
|
|||||||
{
|
{
|
||||||
char openparen = *p;
|
char openparen = *p;
|
||||||
char closeparen = (openparen == '(') ? ')' : '}';
|
char closeparen = (openparen == '(') ? ')' : '}';
|
||||||
register char *beg = p + 1;
|
const char *begp;
|
||||||
int free_beg = 0;
|
const char *beg = p + 1;
|
||||||
char *op, *begp;
|
char *op;
|
||||||
char *end, *colon;
|
char *abeg = NULL;
|
||||||
|
const char *end, *colon;
|
||||||
|
|
||||||
op = o;
|
op = o;
|
||||||
begp = p;
|
begp = p;
|
||||||
@@ -245,7 +268,7 @@ variable_expand_string (line, string, length)
|
|||||||
end = strchr (beg, closeparen);
|
end = strchr (beg, closeparen);
|
||||||
if (end == 0)
|
if (end == 0)
|
||||||
/* Unterminated variable reference. */
|
/* Unterminated variable reference. */
|
||||||
fatal (reading_file, _("unterminated variable reference"));
|
O (fatal, *expanding_var, _("unterminated variable reference"));
|
||||||
p1 = lindex (beg, end, '$');
|
p1 = lindex (beg, end, '$');
|
||||||
if (p1 != 0)
|
if (p1 != 0)
|
||||||
{
|
{
|
||||||
@@ -261,11 +284,11 @@ variable_expand_string (line, string, length)
|
|||||||
}
|
}
|
||||||
/* If COUNT is >= 0, there were unmatched opening parens
|
/* If COUNT is >= 0, there were unmatched opening parens
|
||||||
or braces, so we go to the simple case of a variable name
|
or braces, so we go to the simple case of a variable name
|
||||||
such as `$($(a)'. */
|
such as '$($(a)'. */
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
{
|
{
|
||||||
beg = expand_argument (beg, p); /* Expand the name. */
|
abeg = expand_argument (beg, p); /* Expand the name. */
|
||||||
free_beg = 1; /* Remember to free BEG when finished. */
|
beg = abeg;
|
||||||
end = strchr (beg, '\0');
|
end = strchr (beg, '\0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -283,10 +306,8 @@ variable_expand_string (line, string, length)
|
|||||||
if (colon)
|
if (colon)
|
||||||
{
|
{
|
||||||
/* This looks like a substitution reference: $(FOO:A=B). */
|
/* This looks like a substitution reference: $(FOO:A=B). */
|
||||||
char *subst_beg, *subst_end, *replace_beg, *replace_end;
|
const char *subst_beg = colon + 1;
|
||||||
|
const char *subst_end = lindex (subst_beg, end, '=');
|
||||||
subst_beg = colon + 1;
|
|
||||||
subst_end = strchr (subst_beg, '=');
|
|
||||||
if (subst_end == 0)
|
if (subst_end == 0)
|
||||||
/* There is no = in sight. Punt on the substitution
|
/* There is no = in sight. Punt on the substitution
|
||||||
reference and treat this as a variable name containing
|
reference and treat this as a variable name containing
|
||||||
@@ -294,8 +315,8 @@ variable_expand_string (line, string, length)
|
|||||||
colon = 0;
|
colon = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
replace_beg = subst_end + 1;
|
const char *replace_beg = subst_end + 1;
|
||||||
replace_end = end;
|
const char *replace_end = end;
|
||||||
|
|
||||||
/* Extract the variable name before the colon
|
/* Extract the variable name before the colon
|
||||||
and look up that variable. */
|
and look up that variable. */
|
||||||
@@ -303,51 +324,50 @@ variable_expand_string (line, string, length)
|
|||||||
if (v == 0)
|
if (v == 0)
|
||||||
warn_undefined (beg, colon - beg);
|
warn_undefined (beg, colon - beg);
|
||||||
|
|
||||||
|
/* If the variable is not empty, perform the
|
||||||
|
substitution. */
|
||||||
if (v != 0 && *v->value != '\0')
|
if (v != 0 && *v->value != '\0')
|
||||||
{
|
{
|
||||||
char *value = (v->recursive ? recursively_expand (v)
|
char *pattern, *replace, *ppercent, *rpercent;
|
||||||
|
char *value = (v->recursive
|
||||||
|
? recursively_expand (v)
|
||||||
: v->value);
|
: v->value);
|
||||||
char *pattern, *percent;
|
|
||||||
if (free_beg)
|
/* Copy the pattern and the replacement. Add in an
|
||||||
{
|
extra % at the beginning to use in case there
|
||||||
*subst_end = '\0';
|
isn't one in the pattern. */
|
||||||
pattern = subst_beg;
|
pattern = alloca (subst_end - subst_beg + 2);
|
||||||
}
|
*(pattern++) = '%';
|
||||||
else
|
memcpy (pattern, subst_beg, subst_end - subst_beg);
|
||||||
{
|
|
||||||
pattern = (char *) alloca (subst_end - subst_beg
|
|
||||||
+ 1);
|
|
||||||
bcopy (subst_beg, pattern, subst_end - subst_beg);
|
|
||||||
pattern[subst_end - subst_beg] = '\0';
|
pattern[subst_end - subst_beg] = '\0';
|
||||||
}
|
|
||||||
percent = find_percent (pattern);
|
replace = alloca (replace_end - replace_beg + 2);
|
||||||
if (percent != 0)
|
*(replace++) = '%';
|
||||||
{
|
memcpy (replace, replace_beg,
|
||||||
char *replace;
|
|
||||||
if (free_beg)
|
|
||||||
{
|
|
||||||
*replace_end = '\0';
|
|
||||||
replace = replace_beg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
replace = (char *) alloca (replace_end
|
|
||||||
- replace_beg
|
|
||||||
+ 1);
|
|
||||||
bcopy (replace_beg, replace,
|
|
||||||
replace_end - replace_beg);
|
replace_end - replace_beg);
|
||||||
replace[replace_end - replace_beg] = '\0';
|
replace[replace_end - replace_beg] = '\0';
|
||||||
}
|
|
||||||
|
|
||||||
o = patsubst_expand (o, value, pattern, replace,
|
/* Look for %. Set the percent pointers properly
|
||||||
percent, (char *) 0);
|
based on whether we find one or not. */
|
||||||
|
ppercent = find_percent (pattern);
|
||||||
|
if (ppercent)
|
||||||
|
{
|
||||||
|
++ppercent;
|
||||||
|
rpercent = find_percent (replace);
|
||||||
|
if (rpercent)
|
||||||
|
++rpercent;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
o = subst_expand (o, value,
|
{
|
||||||
pattern, replace_beg,
|
ppercent = pattern;
|
||||||
strlen (pattern),
|
rpercent = replace;
|
||||||
end - replace_beg,
|
--pattern;
|
||||||
0, 1);
|
--replace;
|
||||||
|
}
|
||||||
|
|
||||||
|
o = patsubst_expand_pat (o, value, pattern, replace,
|
||||||
|
ppercent, rpercent);
|
||||||
|
|
||||||
if (v->recursive)
|
if (v->recursive)
|
||||||
free (value);
|
free (value);
|
||||||
}
|
}
|
||||||
@@ -359,112 +379,103 @@ variable_expand_string (line, string, length)
|
|||||||
Look up the value of the variable. */
|
Look up the value of the variable. */
|
||||||
o = reference_variable (o, beg, end - beg);
|
o = reference_variable (o, beg, end - beg);
|
||||||
|
|
||||||
if (free_beg)
|
free (abeg);
|
||||||
free (beg);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\0':
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (isblank ((unsigned char)p[-1]))
|
if (ISSPACE (p[-1]))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* A $ followed by a random char is a variable reference:
|
/* A $ followed by a random char is a variable reference:
|
||||||
$a is equivalent to $(a). */
|
$a is equivalent to $(a). */
|
||||||
{
|
o = reference_variable (o, p, 1);
|
||||||
/* We could do the expanding here, but this way
|
|
||||||
avoids code repetition at a small performance cost. */
|
|
||||||
char name[5];
|
|
||||||
name[0] = '$';
|
|
||||||
name[1] = '(';
|
|
||||||
name[2] = *p;
|
|
||||||
name[3] = ')';
|
|
||||||
name[4] = '\0';
|
|
||||||
p1 = allocated_variable_expand (name);
|
|
||||||
o = variable_buffer_output (o, p1, strlen (p1));
|
|
||||||
free (p1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
break;
|
break;
|
||||||
else
|
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (save_char)
|
free (save);
|
||||||
string[length] = save_char;
|
|
||||||
|
|
||||||
(void)variable_buffer_output (o, "", 1);
|
variable_buffer_output (o, "", 1);
|
||||||
return (variable_buffer + line_offset);
|
return (variable_buffer + line_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan LINE for variable references and expansion-function calls.
|
/* Scan LINE for variable references and expansion-function calls.
|
||||||
Build in `variable_buffer' the result of expanding the references and calls.
|
Build in 'variable_buffer' the result of expanding the references and calls.
|
||||||
Return the address of the resulting string, which is null-terminated
|
Return the address of the resulting string, which is null-terminated
|
||||||
and is valid only until the next time this function is called. */
|
and is valid only until the next time this function is called. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
variable_expand (line)
|
variable_expand (const char *line)
|
||||||
char *line;
|
|
||||||
{
|
{
|
||||||
return variable_expand_string(NULL, line, (long)-1);
|
return variable_expand_string (NULL, line, (long)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand an argument for an expansion function.
|
/* Expand an argument for an expansion function.
|
||||||
The text starting at STR and ending at END is variable-expanded
|
The text starting at STR and ending at END is variable-expanded
|
||||||
into a null-terminated string that is returned as the value.
|
into a null-terminated string that is returned as the value.
|
||||||
This is done without clobbering `variable_buffer' or the current
|
This is done without clobbering 'variable_buffer' or the current
|
||||||
variable-expansion that is in progress. */
|
variable-expansion that is in progress. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
expand_argument (str, end)
|
expand_argument (const char *str, const char *end)
|
||||||
char *str, *end;
|
|
||||||
{
|
{
|
||||||
char *tmp;
|
char *tmp, *alloc = NULL;
|
||||||
|
char *r;
|
||||||
|
|
||||||
if (str == end)
|
if (str == end)
|
||||||
return xstrdup("");
|
return xstrdup ("");
|
||||||
|
|
||||||
if (!end || *end == '\0')
|
if (!end || *end == '\0')
|
||||||
tmp = str;
|
return allocated_variable_expand (str);
|
||||||
else
|
|
||||||
{
|
|
||||||
tmp = (char *) alloca (end - str + 1);
|
|
||||||
bcopy (str, tmp, end - str);
|
|
||||||
tmp[end - str] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
return allocated_variable_expand (tmp);
|
if (end - str + 1 > 1000)
|
||||||
|
tmp = alloc = xmalloc (end - str + 1);
|
||||||
|
else
|
||||||
|
tmp = alloca (end - str + 1);
|
||||||
|
|
||||||
|
memcpy (tmp, str, end - str);
|
||||||
|
tmp[end - str] = '\0';
|
||||||
|
|
||||||
|
r = allocated_variable_expand (tmp);
|
||||||
|
|
||||||
|
free (alloc);
|
||||||
|
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand LINE for FILE. Error messages refer to the file and line where
|
/* Expand LINE for FILE. Error messages refer to the file and line where
|
||||||
FILE's commands were found. Expansion uses FILE's variable set list. */
|
FILE's commands were found. Expansion uses FILE's variable set list. */
|
||||||
|
|
||||||
static char *
|
char *
|
||||||
variable_expand_for_file (line, file)
|
variable_expand_for_file (const char *line, struct file *file)
|
||||||
char *line;
|
|
||||||
register struct file *file;
|
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
struct variable_set_list *save;
|
struct variable_set_list *savev;
|
||||||
|
const gmk_floc *savef;
|
||||||
|
|
||||||
if (file == 0)
|
if (file == 0)
|
||||||
return variable_expand (line);
|
return variable_expand (line);
|
||||||
|
|
||||||
save = current_variable_set_list;
|
savev = current_variable_set_list;
|
||||||
current_variable_set_list = file->variables;
|
current_variable_set_list = file->variables;
|
||||||
|
|
||||||
|
savef = reading_file;
|
||||||
if (file->cmds && file->cmds->fileinfo.filenm)
|
if (file->cmds && file->cmds->fileinfo.filenm)
|
||||||
reading_file = &file->cmds->fileinfo;
|
reading_file = &file->cmds->fileinfo;
|
||||||
else
|
else
|
||||||
reading_file = 0;
|
reading_file = 0;
|
||||||
|
|
||||||
result = variable_expand (line);
|
result = variable_expand (line);
|
||||||
current_variable_set_list = save;
|
|
||||||
reading_file = 0;
|
current_variable_set_list = savev;
|
||||||
|
reading_file = savef;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -474,13 +485,13 @@ variable_expand_for_file (line, file)
|
|||||||
any upper variable sets. Then expand the resulting value. */
|
any upper variable sets. Then expand the resulting value. */
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
variable_append (name, length, set)
|
variable_append (const char *name, unsigned int length,
|
||||||
const char *name;
|
const struct variable_set_list *set, int local)
|
||||||
unsigned int length;
|
|
||||||
const struct variable_set_list *set;
|
|
||||||
{
|
{
|
||||||
const struct variable *v;
|
const struct variable *v;
|
||||||
char *buf = 0;
|
char *buf = 0;
|
||||||
|
/* If this set is local and the next is not a parent, then next is local. */
|
||||||
|
int nextlocal = local && set->next_is_parent == 0;
|
||||||
|
|
||||||
/* If there's nothing left to check, return the empty buffer. */
|
/* If there's nothing left to check, return the empty buffer. */
|
||||||
if (!set)
|
if (!set)
|
||||||
@@ -489,14 +500,14 @@ variable_append (name, length, set)
|
|||||||
/* Try to find the variable in this variable set. */
|
/* Try to find the variable in this variable set. */
|
||||||
v = lookup_variable_in_set (name, length, set->set);
|
v = lookup_variable_in_set (name, length, set->set);
|
||||||
|
|
||||||
/* If there isn't one, look to see if there's one in a set above us. */
|
/* If there isn't one, or this one is private, try the set above us. */
|
||||||
if (!v)
|
if (!v || (!local && v->private_var))
|
||||||
return variable_append (name, length, set->next);
|
return variable_append (name, length, set->next, nextlocal);
|
||||||
|
|
||||||
/* If this variable type is append, first get any upper values.
|
/* If this variable type is append, first get any upper values.
|
||||||
If not, initialize the buffer. */
|
If not, initialize the buffer. */
|
||||||
if (v->append)
|
if (v->append)
|
||||||
buf = variable_append (name, length, set->next);
|
buf = variable_append (name, length, set->next, nextlocal);
|
||||||
else
|
else
|
||||||
buf = initialize_variable_output ();
|
buf = initialize_variable_output ();
|
||||||
|
|
||||||
@@ -505,15 +516,19 @@ variable_append (name, length, set)
|
|||||||
if (buf > variable_buffer)
|
if (buf > variable_buffer)
|
||||||
buf = variable_buffer_output (buf, " ", 1);
|
buf = variable_buffer_output (buf, " ", 1);
|
||||||
|
|
||||||
|
/* Either expand it or copy it, depending. */
|
||||||
|
if (! v->recursive)
|
||||||
return variable_buffer_output (buf, v->value, strlen (v->value));
|
return variable_buffer_output (buf, v->value, strlen (v->value));
|
||||||
|
|
||||||
|
buf = variable_expand_string (buf, v->value, strlen (v->value));
|
||||||
|
return (buf + strlen (buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
allocated_variable_append (v)
|
allocated_variable_append (const struct variable *v)
|
||||||
const struct variable *v;
|
|
||||||
{
|
{
|
||||||
char *val, *retval;
|
char *val;
|
||||||
|
|
||||||
/* Construct the appended variable value. */
|
/* Construct the appended variable value. */
|
||||||
|
|
||||||
@@ -522,28 +537,22 @@ allocated_variable_append (v)
|
|||||||
|
|
||||||
variable_buffer = 0;
|
variable_buffer = 0;
|
||||||
|
|
||||||
val = variable_append (v->name, strlen (v->name), current_variable_set_list);
|
val = variable_append (v->name, strlen (v->name),
|
||||||
|
current_variable_set_list, 1);
|
||||||
variable_buffer_output (val, "", 1);
|
variable_buffer_output (val, "", 1);
|
||||||
val = variable_buffer;
|
val = variable_buffer;
|
||||||
|
|
||||||
variable_buffer = obuf;
|
variable_buffer = obuf;
|
||||||
variable_buffer_length = olen;
|
variable_buffer_length = olen;
|
||||||
|
|
||||||
/* Now expand it and return that. */
|
return val;
|
||||||
|
|
||||||
retval = allocated_variable_expand (val);
|
|
||||||
|
|
||||||
free (val);
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like variable_expand_for_file, but the returned string is malloc'd.
|
/* Like variable_expand_for_file, but the returned string is malloc'd.
|
||||||
This function is called a lot. It wants to be efficient. */
|
This function is called a lot. It wants to be efficient. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
allocated_variable_expand_for_file (line, file)
|
allocated_variable_expand_for_file (const char *line, struct file *file)
|
||||||
char *line;
|
|
||||||
struct file *file;
|
|
||||||
{
|
{
|
||||||
char *value;
|
char *value;
|
||||||
|
|
||||||
@@ -554,13 +563,33 @@ allocated_variable_expand_for_file (line, file)
|
|||||||
|
|
||||||
value = variable_expand_for_file (line, file);
|
value = variable_expand_for_file (line, file);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Waste a little memory and save time. */
|
|
||||||
value = xrealloc (value, strlen (value))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
variable_buffer = obuf;
|
variable_buffer = obuf;
|
||||||
variable_buffer_length = olen;
|
variable_buffer_length = olen;
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Install a new variable_buffer context, returning the current one for
|
||||||
|
safe-keeping. */
|
||||||
|
|
||||||
|
void
|
||||||
|
install_variable_buffer (char **bufp, unsigned int *lenp)
|
||||||
|
{
|
||||||
|
*bufp = variable_buffer;
|
||||||
|
*lenp = variable_buffer_length;
|
||||||
|
|
||||||
|
variable_buffer = 0;
|
||||||
|
initialize_variable_output ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Restore a previously-saved variable_buffer setting (free the current one).
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
restore_variable_buffer (char *buf, unsigned int len)
|
||||||
|
{
|
||||||
|
free (variable_buffer);
|
||||||
|
|
||||||
|
variable_buffer = buf;
|
||||||
|
variable_buffer_length = len;
|
||||||
|
}
|
||||||
|
|||||||
122
filedef.h
122
filedef.h
@@ -1,50 +1,43 @@
|
|||||||
/* Definition of target file data structures for GNU Make.
|
/* Definition of target file data structures for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
2002 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
|
|
||||||
/* Structure that represents the info on one file
|
/* Structure that represents the info on one file
|
||||||
that the makefile says how to make.
|
that the makefile says how to make.
|
||||||
All of these are chained together through `next'. */
|
All of these are chained together through 'next'. */
|
||||||
|
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
struct file
|
struct file
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
char *hname; /* Hashed filename */
|
const char *hname; /* Hashed filename */
|
||||||
char *vpath; /* VPATH/vpath pathname */
|
const char *vpath; /* VPATH/vpath pathname */
|
||||||
struct dep *deps; /* all dependencies, including duplicates */
|
struct dep *deps; /* all dependencies, including duplicates */
|
||||||
struct commands *cmds; /* Commands to execute for this target. */
|
struct commands *cmds; /* Commands to execute for this target. */
|
||||||
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
const char *stem; /* Implicit stem, if an implicit
|
||||||
char *stem; /* Implicit stem, if an implicit
|
|
||||||
rule has been used */
|
rule has been used */
|
||||||
struct dep *also_make; /* Targets that are made by making this. */
|
struct dep *also_make; /* Targets that are made by making this. */
|
||||||
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
|
||||||
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
|
||||||
has been performed. */
|
|
||||||
struct file *prev; /* Previous entry for same file name;
|
struct file *prev; /* Previous entry for same file name;
|
||||||
used when there are multiple double-colon
|
used when there are multiple double-colon
|
||||||
entries for the same file. */
|
entries for the same file. */
|
||||||
|
struct file *last; /* Last entry for the same file name. */
|
||||||
|
|
||||||
/* File that this file was renamed to. After any time that a
|
/* File that this file was renamed to. After any time that a
|
||||||
file could be renamed, call `check_renamed' (below). */
|
file could be renamed, call 'check_renamed' (below). */
|
||||||
struct file *renamed;
|
struct file *renamed;
|
||||||
|
|
||||||
/* List of variable sets used for this file. */
|
/* List of variable sets used for this file. */
|
||||||
@@ -62,18 +55,28 @@ struct file
|
|||||||
the same file. Otherwise this is null. */
|
the same file. Otherwise this is null. */
|
||||||
struct file *double_colon;
|
struct file *double_colon;
|
||||||
|
|
||||||
short int update_status; /* Status of the last attempt to update,
|
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
||||||
or -1 if none has been made. */
|
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
||||||
|
has been performed. */
|
||||||
enum /* State of the commands. */
|
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
||||||
{ /* Note: It is important that cs_not_started be zero. */
|
enum update_status /* Status of the last attempt to update. */
|
||||||
cs_not_started, /* Not yet started. */
|
{
|
||||||
|
us_success = 0, /* Successfully updated. Must be 0! */
|
||||||
|
us_none, /* No attempt to update has been made. */
|
||||||
|
us_question, /* Needs to be updated (-q is is set). */
|
||||||
|
us_failed /* Update failed. */
|
||||||
|
} update_status ENUM_BITFIELD (2);
|
||||||
|
enum cmd_state /* State of the commands. */
|
||||||
|
{
|
||||||
|
cs_not_started = 0, /* Not yet started. Must be 0! */
|
||||||
cs_deps_running, /* Dep commands running. */
|
cs_deps_running, /* Dep commands running. */
|
||||||
cs_running, /* Commands running. */
|
cs_running, /* Commands running. */
|
||||||
cs_finished /* Commands finished. */
|
cs_finished /* Commands finished. */
|
||||||
} command_state ENUM_BITFIELD (2);
|
} command_state ENUM_BITFIELD (2);
|
||||||
|
|
||||||
|
unsigned int builtin:1; /* True if the file is a builtin rule. */
|
||||||
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
||||||
|
unsigned int loaded:1; /* True if the file is a loaded object. */
|
||||||
unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
|
unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
|
||||||
has only one-second resolution. */
|
has only one-second resolution. */
|
||||||
unsigned int tried_implicit:1; /* Nonzero if have searched
|
unsigned int tried_implicit:1; /* Nonzero if have searched
|
||||||
@@ -84,38 +87,43 @@ struct file
|
|||||||
unsigned int is_target:1; /* Nonzero if file is described as target. */
|
unsigned int is_target:1; /* Nonzero if file is described as target. */
|
||||||
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
|
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
|
||||||
unsigned int phony:1; /* Nonzero if this is a phony file
|
unsigned int phony:1; /* Nonzero if this is a phony file
|
||||||
i.e., a dependency of .PHONY. */
|
i.e., a prerequisite of .PHONY. */
|
||||||
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
||||||
/* Nonzero, for an intermediate file,
|
unsigned int secondary:1; /* Nonzero means remove_intermediates should
|
||||||
means remove_intermediates should not delete it. */
|
not delete it. */
|
||||||
unsigned int secondary:1;
|
|
||||||
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
||||||
this target cannot be remade. */
|
this target cannot be remade. */
|
||||||
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
||||||
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
||||||
pattern-specific variables. */
|
pattern-specific variables. */
|
||||||
unsigned int considered:1; /* equal to `considered' if file has been
|
unsigned int considered:1; /* equal to 'considered' if file has been
|
||||||
considered on current scan of goal chain */
|
considered on current scan of goal chain */
|
||||||
|
unsigned int no_diag:1; /* True if the file failed to update and no
|
||||||
|
diagnostics has been issued (dontcare). */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern struct file *default_goal_file, *suffix_file, *default_file;
|
extern struct file *suffix_file, *default_file;
|
||||||
|
|
||||||
|
|
||||||
extern struct file *lookup_file PARAMS ((char *name));
|
struct file *lookup_file (const char *name);
|
||||||
extern struct file *enter_file PARAMS ((char *name));
|
struct file *enter_file (const char *name);
|
||||||
extern void remove_intermediates PARAMS ((int sig));
|
struct dep *split_prereqs (char *prereqstr);
|
||||||
extern void snap_deps PARAMS ((void));
|
struct dep *enter_prereqs (struct dep *prereqs, const char *stem);
|
||||||
extern void rename_file PARAMS ((struct file *file, char *name));
|
void remove_intermediates (int sig);
|
||||||
extern void rehash_file PARAMS ((struct file *file, char *name));
|
void snap_deps (void);
|
||||||
extern void set_command_state PARAMS ((struct file *file, int state));
|
void rename_file (struct file *file, const char *name);
|
||||||
extern void notice_finished_file PARAMS ((struct file *file));
|
void rehash_file (struct file *file, const char *name);
|
||||||
extern void init_hash_files PARAMS ((void));
|
void set_command_state (struct file *file, enum cmd_state state);
|
||||||
extern char *build_target_list PARAMS ((char *old_list));
|
void notice_finished_file (struct file *file);
|
||||||
|
void init_hash_files (void);
|
||||||
|
char *build_target_list (char *old_list);
|
||||||
|
void print_prereqs (const struct dep *deps);
|
||||||
|
void print_file_data_base (void);
|
||||||
|
|
||||||
#if FILE_TIMESTAMP_HI_RES
|
#if FILE_TIMESTAMP_HI_RES
|
||||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||||
file_timestamp_cons (fname, (st).st_mtime, (st).st_mtim.ST_MTIM_NSEC)
|
file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC)
|
||||||
#else
|
#else
|
||||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||||
file_timestamp_cons (fname, (st).st_mtime, 0)
|
file_timestamp_cons (fname, (st).st_mtime, 0)
|
||||||
@@ -135,7 +143,7 @@ extern char *build_target_list PARAMS ((char *old_list));
|
|||||||
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
||||||
|
|
||||||
/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
|
/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
|
||||||
representing a file timestamp. The upper bound is not necessarily 19,
|
representing a file timestamp. The upper bound is not necessarily 29,
|
||||||
since the year might be less than -999 or greater than 9999.
|
since the year might be less than -999 or greater than 9999.
|
||||||
|
|
||||||
Subtract one for the sign bit if in case file timestamps can be negative;
|
Subtract one for the sign bit if in case file timestamps can be negative;
|
||||||
@@ -152,10 +160,9 @@ extern char *build_target_list PARAMS ((char *old_list));
|
|||||||
* 302 / 1000) \
|
* 302 / 1000) \
|
||||||
+ 1 + 1 + 4 + 25)
|
+ 1 + 1 + 4 + 25)
|
||||||
|
|
||||||
extern FILE_TIMESTAMP file_timestamp_cons PARAMS ((char const *,
|
FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, long int);
|
||||||
time_t, int));
|
FILE_TIMESTAMP file_timestamp_now (int *);
|
||||||
extern FILE_TIMESTAMP file_timestamp_now PARAMS ((int *));
|
void file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts);
|
||||||
extern void file_timestamp_sprintf PARAMS ((char *p, FILE_TIMESTAMP ts));
|
|
||||||
|
|
||||||
/* Return the mtime of file F (a struct file *), caching it.
|
/* Return the mtime of file F (a struct file *), caching it.
|
||||||
The value is NONEXISTENT_MTIME if the file does not exist. */
|
The value is NONEXISTENT_MTIME if the file does not exist. */
|
||||||
@@ -165,7 +172,7 @@ extern void file_timestamp_sprintf PARAMS ((char *p, FILE_TIMESTAMP ts));
|
|||||||
we don't find it.
|
we don't find it.
|
||||||
The value is NONEXISTENT_MTIME if the file does not exist. */
|
The value is NONEXISTENT_MTIME if the file does not exist. */
|
||||||
#define file_mtime_no_search(f) file_mtime_1 ((f), 0)
|
#define file_mtime_no_search(f) file_mtime_1 ((f), 0)
|
||||||
extern FILE_TIMESTAMP f_mtime PARAMS ((struct file *file, int search));
|
FILE_TIMESTAMP f_mtime (struct file *file, int search);
|
||||||
#define file_mtime_1(f, v) \
|
#define file_mtime_1(f, v) \
|
||||||
((f)->last_mtime == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)
|
((f)->last_mtime == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)
|
||||||
|
|
||||||
@@ -187,13 +194,16 @@ extern FILE_TIMESTAMP f_mtime PARAMS ((struct file *file, int search));
|
|||||||
<< FILE_TIMESTAMP_LO_BITS) \
|
<< FILE_TIMESTAMP_LO_BITS) \
|
||||||
+ ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
|
+ ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
|
||||||
|
|
||||||
/* Modtime value to use for `infinitely new'. We used to get the current time
|
/* Modtime value to use for 'infinitely new'. We used to get the current time
|
||||||
from the system and use that whenever we wanted `new'. But that causes
|
from the system and use that whenever we wanted 'new'. But that causes
|
||||||
trouble when the machine running make and the machine holding a file have
|
trouble when the machine running make and the machine holding a file have
|
||||||
different ideas about what time it is; and can also lose for `force'
|
different ideas about what time it is; and can also lose for 'force'
|
||||||
targets, which need to be considered newer than anything that depends on
|
targets, which need to be considered newer than anything that depends on
|
||||||
them, even if said dependents' modtimes are in the future. */
|
them, even if said dependents' modtimes are in the future. */
|
||||||
#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
|
#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
|
||||||
|
|
||||||
#define check_renamed(file) \
|
#define check_renamed(file) \
|
||||||
while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
|
while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
|
||||||
|
|
||||||
|
/* Have we snapped deps yet? */
|
||||||
|
extern int snapped_deps;
|
||||||
|
|||||||
1791
function.c
1791
function.c
File diff suppressed because it is too large
Load Diff
44
getloadavg.c
44
getloadavg.c
@@ -1,21 +1,17 @@
|
|||||||
/* Get the system load averages.
|
/* Get the system load averages.
|
||||||
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997
|
Copyright (C) 1985-2016 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* Compile-time symbols that this file uses:
|
/* Compile-time symbols that this file uses:
|
||||||
|
|
||||||
@@ -88,9 +84,9 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Exclude all the code except the test program at the end
|
/* Exclude all the code except the test program at the end
|
||||||
if the system has its own `getloadavg' function.
|
if the system has its own 'getloadavg' function.
|
||||||
|
|
||||||
The declaration of `errno' is needed by the test program
|
The declaration of 'errno' is needed by the test program
|
||||||
as well as the function itself, so it comes first. */
|
as well as the function itself, so it comes first. */
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -355,7 +351,7 @@ extern int errno;
|
|||||||
|
|
||||||
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
||||||
nlist method. */
|
nlist method. */
|
||||||
# if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL))
|
# if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) && !defined(__riscos__)
|
||||||
# define LOAD_AVE_TYPE double
|
# define LOAD_AVE_TYPE double
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -498,9 +494,7 @@ static kvm_t *kd;
|
|||||||
or -1 if an error occurred. */
|
or -1 if an error occurred. */
|
||||||
|
|
||||||
int
|
int
|
||||||
getloadavg (loadavg, nelem)
|
getloadavg (double loadavg[], int nelem)
|
||||||
double loadavg[];
|
|
||||||
int nelem;
|
|
||||||
{
|
{
|
||||||
int elem = 0; /* Return value. */
|
int elem = 0; /* Return value. */
|
||||||
|
|
||||||
@@ -706,7 +700,7 @@ getloadavg (loadavg, nelem)
|
|||||||
for (i = 0; i < conf.config_maxclass; ++i)
|
for (i = 0; i < conf.config_maxclass; ++i)
|
||||||
{
|
{
|
||||||
struct class_stats stats;
|
struct class_stats stats;
|
||||||
bzero ((char *) &stats, sizeof stats);
|
memset (&stats, '\0', sizeof stats);
|
||||||
|
|
||||||
desc.sd_type = CPUTYPE_CLASS;
|
desc.sd_type = CPUTYPE_CLASS;
|
||||||
desc.sd_objid = i;
|
desc.sd_objid = i;
|
||||||
@@ -749,7 +743,7 @@ getloadavg (loadavg, nelem)
|
|||||||
# define LDAV_DONE
|
# define LDAV_DONE
|
||||||
/* This call can return -1 for an error, but with good args
|
/* This call can return -1 for an error, but with good args
|
||||||
it's not supposed to fail. The first argument is for no
|
it's not supposed to fail. The first argument is for no
|
||||||
apparent reason of type `long int *'. */
|
apparent reason of type 'long int *'. */
|
||||||
dg_sys_info ((long int *) &load_info,
|
dg_sys_info ((long int *) &load_info,
|
||||||
DG_SYS_INFO_LOAD_INFO_TYPE,
|
DG_SYS_INFO_LOAD_INFO_TYPE,
|
||||||
DG_SYS_INFO_LOAD_VERSION_0);
|
DG_SYS_INFO_LOAD_VERSION_0);
|
||||||
@@ -991,12 +985,10 @@ getloadavg (loadavg, nelem)
|
|||||||
#endif /* ! HAVE_GETLOADAVG */
|
#endif /* ! HAVE_GETLOADAVG */
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
main (argc, argv)
|
main (int argc, char **argv)
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
int naptime = 0;
|
int naptime = 0;
|
||||||
|
|
||||||
|
|||||||
91
getopt.c
91
getopt.c
@@ -1,29 +1,25 @@
|
|||||||
/* Getopt for GNU.
|
/* Getopt for GNU.
|
||||||
NOTE: getopt is now part of the C library, so if you don't know what
|
NOTE: getopt is now part of the C library, so if you don't know what
|
||||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||||
before changing it!
|
before changing it!
|
||||||
|
|
||||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
|
Copyright (C) 1987-2016 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
Bugs can be reported to bug-glibc@gnu.org.
|
Bugs can be reported to bug-glibc@gnu.org.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
under the terms of the GNU General Public License as published by the
|
terms of the GNU General Public License as published by the Free Software
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||||
#ifndef _NO_PROTO
|
#ifndef _NO_PROTO
|
||||||
@@ -85,7 +81,7 @@
|
|||||||
#define _(msgid) gettext (msgid)
|
#define _(msgid) gettext (msgid)
|
||||||
|
|
||||||
|
|
||||||
/* This version of `getopt' appears to the caller like standard Unix `getopt'
|
/* This version of `getopt' appears to the caller like standard Unix 'getopt'
|
||||||
but it behaves differently for the user, since it allows the user
|
but it behaves differently for the user, since it allows the user
|
||||||
to intersperse the options with the other arguments.
|
to intersperse the options with the other arguments.
|
||||||
|
|
||||||
@@ -210,9 +206,7 @@ extern char *getenv ();
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
my_index (str, chr)
|
my_index (const char *str, int chr)
|
||||||
const char *str;
|
|
||||||
int chr;
|
|
||||||
{
|
{
|
||||||
while (*str)
|
while (*str)
|
||||||
{
|
{
|
||||||
@@ -262,8 +256,7 @@ static char *const *original_argv;
|
|||||||
/* Make sure the environment variable bash 2.0 puts in the environment
|
/* Make sure the environment variable bash 2.0 puts in the environment
|
||||||
is valid for the getopt call we must make sure that the ARGV passed
|
is valid for the getopt call we must make sure that the ARGV passed
|
||||||
to getopt is that one passed to the process. */
|
to getopt is that one passed to the process. */
|
||||||
static void
|
static void __attribute__ ((unused))
|
||||||
__attribute__ ((unused))
|
|
||||||
store_args_and_env (int argc, char *const *argv)
|
store_args_and_env (int argc, char *const *argv)
|
||||||
{
|
{
|
||||||
/* XXX This is no good solution. We should rather copy the args so
|
/* XXX This is no good solution. We should rather copy the args so
|
||||||
@@ -300,8 +293,7 @@ static void exchange (char **);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
exchange (argv)
|
exchange (char **argv)
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
int bottom = first_nonopt;
|
int bottom = first_nonopt;
|
||||||
int middle = last_nonopt;
|
int middle = last_nonopt;
|
||||||
@@ -385,10 +377,7 @@ exchange (argv)
|
|||||||
static const char *_getopt_initialize (int, char *const *, const char *);
|
static const char *_getopt_initialize (int, char *const *, const char *);
|
||||||
#endif
|
#endif
|
||||||
static const char *
|
static const char *
|
||||||
_getopt_initialize (argc, argv, optstring)
|
_getopt_initialize (int argc, char *const *argv, const char *optstring)
|
||||||
int argc;
|
|
||||||
char *const *argv;
|
|
||||||
const char *optstring;
|
|
||||||
{
|
{
|
||||||
/* Start processing options with ARGV-element 1 (since ARGV-element 0
|
/* Start processing options with ARGV-element 1 (since ARGV-element 0
|
||||||
is the program name); the sequence of previously skipped
|
is the program name); the sequence of previously skipped
|
||||||
@@ -507,13 +496,8 @@ _getopt_initialize (argc, argv, optstring)
|
|||||||
long-named options. */
|
long-named options. */
|
||||||
|
|
||||||
int
|
int
|
||||||
_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
_getopt_internal (int argc, char *const *argv, const char *optstring,
|
||||||
int argc;
|
const struct option *longopts, int *longind, int long_only)
|
||||||
char *const *argv;
|
|
||||||
const char *optstring;
|
|
||||||
const struct option *longopts;
|
|
||||||
int *longind;
|
|
||||||
int long_only;
|
|
||||||
{
|
{
|
||||||
optarg = NULL;
|
optarg = NULL;
|
||||||
|
|
||||||
@@ -672,7 +656,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
if (ambig && !exact)
|
if (ambig && !exact)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
|
||||||
argv[0], argv[optind]);
|
argv[0], argv[optind]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
optind++;
|
optind++;
|
||||||
@@ -696,12 +680,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
if (argv[optind - 1][1] == '-')
|
if (argv[optind - 1][1] == '-')
|
||||||
/* --option */
|
/* --option */
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
_("%s: option '--%s' doesn't allow an argument\n"),
|
||||||
argv[0], pfound->name);
|
argv[0], pfound->name);
|
||||||
else
|
else
|
||||||
/* +option or -option */
|
/* +option or -option */
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
_("%s: option '%c%s' doesn't allow an argument\n"),
|
||||||
argv[0], argv[optind - 1][0], pfound->name);
|
argv[0], argv[optind - 1][0], pfound->name);
|
||||||
|
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
@@ -718,7 +702,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%s' requires an argument\n"),
|
_("%s: option '%s' requires an argument\n"),
|
||||||
argv[0], argv[optind - 1]);
|
argv[0], argv[optind - 1]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
optopt = pfound->val;
|
optopt = pfound->val;
|
||||||
@@ -747,11 +731,11 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
{
|
{
|
||||||
if (argv[optind][1] == '-')
|
if (argv[optind][1] == '-')
|
||||||
/* --option */
|
/* --option */
|
||||||
fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
|
fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
|
||||||
argv[0], nextchar);
|
argv[0], nextchar);
|
||||||
else
|
else
|
||||||
/* +option or -option */
|
/* +option or -option */
|
||||||
fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
|
fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
|
||||||
argv[0], argv[optind][0], nextchar);
|
argv[0], argv[optind][0], nextchar);
|
||||||
}
|
}
|
||||||
nextchar = (char *) "";
|
nextchar = (char *) "";
|
||||||
@@ -857,7 +841,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
if (ambig && !exact)
|
if (ambig && !exact)
|
||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
|
||||||
argv[0], argv[optind]);
|
argv[0], argv[optind]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
optind++;
|
optind++;
|
||||||
@@ -876,7 +860,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr, _("\
|
fprintf (stderr, _("\
|
||||||
%s: option `-W %s' doesn't allow an argument\n"),
|
%s: option '-W %s' doesn't allow an argument\n"),
|
||||||
argv[0], pfound->name);
|
argv[0], pfound->name);
|
||||||
|
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
@@ -891,7 +875,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
{
|
{
|
||||||
if (opterr)
|
if (opterr)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: option `%s' requires an argument\n"),
|
_("%s: option '%s' requires an argument\n"),
|
||||||
argv[0], argv[optind - 1]);
|
argv[0], argv[optind - 1]);
|
||||||
nextchar += strlen (nextchar);
|
nextchar += strlen (nextchar);
|
||||||
return optstring[0] == ':' ? ':' : '?';
|
return optstring[0] == ':' ? ':' : '?';
|
||||||
@@ -961,10 +945,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
getopt (argc, argv, optstring)
|
getopt (int argc, char *const *argv, const char *optstring)
|
||||||
int argc;
|
|
||||||
char *const *argv;
|
|
||||||
const char *optstring;
|
|
||||||
{
|
{
|
||||||
return _getopt_internal (argc, argv, optstring,
|
return _getopt_internal (argc, argv, optstring,
|
||||||
(const struct option *) 0,
|
(const struct option *) 0,
|
||||||
@@ -980,9 +961,7 @@ getopt (argc, argv, optstring)
|
|||||||
the above definition of `getopt'. */
|
the above definition of `getopt'. */
|
||||||
|
|
||||||
int
|
int
|
||||||
main (argc, argv)
|
main (int argc, char **argv)
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int digit_optind = 0;
|
int digit_optind = 0;
|
||||||
@@ -1022,7 +1001,7 @@ main (argc, argv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
printf ("option c with value `%s'\n", optarg);
|
printf ("option c with value '%s'\n", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
|
|||||||
27
getopt.h
27
getopt.h
@@ -1,23 +1,20 @@
|
|||||||
/* Declarations for getopt.
|
/* Declarations for getopt.
|
||||||
Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
|
Copyright (C) 1989-2016 Free Software Foundation, Inc.
|
||||||
|
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
Bugs can be reported to bug-glibc@gnu.org.
|
Bugs can be reported to bug-glibc@gnu.org.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
under the terms of the GNU General Public License as published by the
|
terms of the GNU General Public License as published by the Free Software
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifndef _GETOPT_H
|
#ifndef _GETOPT_H
|
||||||
#define _GETOPT_H 1
|
#define _GETOPT_H 1
|
||||||
|
|||||||
52
getopt1.c
52
getopt1.c
@@ -1,24 +1,20 @@
|
|||||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
Copyright (C) 1987-1994, 1996-2016 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
Bugs can be reported to bug-glibc@gnu.org.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
under the terms of the GNU General Public License as published by the
|
terms of the GNU General Public License as published by the Free Software
|
||||||
Free Software Foundation; either version 2, or (at your option) any
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -66,12 +62,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
getopt_long (argc, argv, options, long_options, opt_index)
|
getopt_long (int argc, char *const *argv, const char *options,
|
||||||
int argc;
|
const struct option *long_options, int *opt_index)
|
||||||
char *const *argv;
|
|
||||||
const char *options;
|
|
||||||
const struct option *long_options;
|
|
||||||
int *opt_index;
|
|
||||||
{
|
{
|
||||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||||
}
|
}
|
||||||
@@ -82,12 +74,8 @@ getopt_long (argc, argv, options, long_options, opt_index)
|
|||||||
instead. */
|
instead. */
|
||||||
|
|
||||||
int
|
int
|
||||||
getopt_long_only (argc, argv, options, long_options, opt_index)
|
getopt_long_only (int argc, char *const *argv, const char *options,
|
||||||
int argc;
|
const struct option *long_options, int *opt_index)
|
||||||
char *const *argv;
|
|
||||||
const char *options;
|
|
||||||
const struct option *long_options;
|
|
||||||
int *opt_index;
|
|
||||||
{
|
{
|
||||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||||
}
|
}
|
||||||
@@ -100,9 +88,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main (argc, argv)
|
main (int argc, char **argv)
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int digit_optind = 0;
|
int digit_optind = 0;
|
||||||
@@ -161,11 +147,11 @@ main (argc, argv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
printf ("option c with value `%s'\n", optarg);
|
printf ("option c with value '%s'\n", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
printf ("option d with value `%s'\n", optarg);
|
printf ("option d with value '%s'\n", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
|
|||||||
24
gettext.h
24
gettext.h
@@ -1,20 +1,18 @@
|
|||||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||||
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
|
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
under the terms of the GNU Library General Public License as published
|
terms of the GNU General Public License as published by the Free Software
|
||||||
by the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
Library General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU General Public License along with
|
||||||
License along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
#ifndef _LIBGETTEXT_H
|
#ifndef _LIBGETTEXT_H
|
||||||
#define _LIBGETTEXT_H 1
|
#define _LIBGETTEXT_H 1
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
Makefile Makefile.in
|
|
||||||
.deps
|
|
||||||
@@ -1,3 +1,41 @@
|
|||||||
|
2013-10-20 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c (glob): Cherry-pick a471e96a5352a5f0bde6d32dd36d33524811a2b1
|
||||||
|
from git://sourceware.org/git/glibc.git to fix SV 18123,
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=10278
|
||||||
|
|
||||||
|
2008-09-28 Juan Manuel Guerrero <juan.guerrero@gmx.de>
|
||||||
|
|
||||||
|
* glob.c (my_realloc) [__DJGPP__]: Don't define, and don't
|
||||||
|
redefine realloc to call it, since the DJGPP's realloc handles
|
||||||
|
NULL pointers correctly.
|
||||||
|
|
||||||
|
2007-12-22 Juan Manuel Guerrero <juan.guerrero@gmx.de> (tiny change)
|
||||||
|
|
||||||
|
* glob.c [__GNU_LIBRARY__ && __DJGPP__]: Add a realloc
|
||||||
|
declaration that matches the one in the DJGPP libc.
|
||||||
|
|
||||||
|
2006-02-24 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* glob.c (my_malloc) [WINDOWS32]: Provide a full ISO C prototype,
|
||||||
|
to avoid compiler warnings.
|
||||||
|
|
||||||
|
2005-06-25 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* fnmatch.h, glob.h [WINDOWS32]: Fix ifdefs in headers.
|
||||||
|
Fixes Savannah bug #13477.
|
||||||
|
|
||||||
|
2005-03-11 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c (glob_in_dir): Change FNM_CASEFOLD to be enabled if
|
||||||
|
HAVE_CASE_INSENSITIVE_FS is defined.
|
||||||
|
|
||||||
|
2003-01-30 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.h: Patch for FreeBSD by Mike Barcroft <mike@freebsd.org>
|
||||||
|
Reported by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>. On
|
||||||
|
FreeBSD, declare __size_t to simply size_t.
|
||||||
|
|
||||||
2002-04-22 Paul D. Smith <psmith@gnu.org>
|
2002-04-22 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* Makefile.am: Use automake 1.6.
|
* Makefile.am: Use automake 1.6.
|
||||||
@@ -133,4 +171,21 @@ Fri Jun 21 00:27:51 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
|||||||
|
|
||||||
* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
|
* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
|
||||||
only for ?s, not for *s. Fix from Chet Ramey.
|
only for ?s, not for *s. Fix from Chet Ramey.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
||||||
|
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
# -*-Makefile-*-, or close enough
|
# -*-Makefile-*-, or close enough
|
||||||
|
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.7 foreign
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
# Only build the library when the system doesn't already have GNU glob.
|
# Only build the library when the system doesn't already have GNU glob.
|
||||||
if USE_LOCAL_GLOB
|
if USE_LOCAL_GLOB
|
||||||
|
|||||||
@@ -1,22 +1,20 @@
|
|||||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
# Makefile for standalone libglob.a (fnmatch, glob). -*-Makefile-*-
|
||||||
|
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc.
|
# 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# modify it under the terms of the GNU Library General Public License
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# as published by the Free Software Foundation; either version 2 of
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# the License, or (at your option) any later version.
|
# version.
|
||||||
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# Library General Public License for more details.
|
# details.
|
||||||
|
#
|
||||||
# You should have received a copy of the GNU Library General Public
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# License along with this library; see the file COPYING.LIB. If
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# not, write to the Free Software Foundation, Inc.,
|
|
||||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||||
VPATH = /glob/
|
VPATH = /glob/
|
||||||
|
|||||||
@@ -1,22 +1,20 @@
|
|||||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
||||||
|
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc.
|
# 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# modify it under the terms of the GNU Library General Public License
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# as published by the Free Software Foundation; either version 2 of
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# the License, or (at your option) any later version.
|
# version.
|
||||||
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# Library General Public License for more details.
|
# details.
|
||||||
|
#
|
||||||
# You should have received a copy of the GNU Library General Public
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# License along with this library; see the file COPYING.LIB. If
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# not, write to the Free Software Foundation, Inc.,
|
|
||||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||||
VPATH = /glob/
|
VPATH = /glob/
|
||||||
|
|||||||
@@ -1,4 +1,21 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||||
|
rem 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
|
rem This file is part of GNU Make.
|
||||||
|
rem
|
||||||
|
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
rem the terms of the GNU General Public License as published by the Free
|
||||||
|
rem Software Foundation; either version 3 of the License, or (at your option)
|
||||||
|
rem any later version.
|
||||||
|
rem
|
||||||
|
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for.
|
||||||
|
rem more details.
|
||||||
|
rem
|
||||||
|
rem You should have received a copy of the GNU General Public License along
|
||||||
|
rem with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
echo Configuring glob for DJGPP
|
echo Configuring glob for DJGPP
|
||||||
rem This batch file assumes a unix-type "sed" program
|
rem This batch file assumes a unix-type "sed" program
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
/* Copyright (C) 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Free Software
|
||||||
This file is part of the GNU C Library.
|
Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
published by the Free Software Foundation; either version 2 of the
|
published by the Free Software Foundation; either version 2 of the
|
||||||
License, or (at your option) any later version.
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public License
|
||||||
License along with this library; see the file COPYING.LIB. If not,
|
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||||
Boston, MA 02111-1307, USA. */
|
USA. */
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
/* Copyright (C) 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Free Software
|
||||||
This file is part of the GNU C Library.
|
Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
published by the Free Software Foundation; either version 2 of the
|
published by the Free Software Foundation; either version 2 of the
|
||||||
License, or (at your option) any later version.
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public License
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||||
Boston, MA 02111-1307, USA. */
|
USA. */
|
||||||
|
|
||||||
#ifndef _FNMATCH_H
|
#ifndef _FNMATCH_H
|
||||||
#define _FNMATCH_H 1
|
#define _FNMATCH_H 1
|
||||||
@@ -24,7 +25,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||||
# if !defined __GLIBC__ || !defined __P
|
# if !defined __GLIBC__
|
||||||
# undef __P
|
# undef __P
|
||||||
# define __P(protos) protos
|
# define __P(protos) protos
|
||||||
# endif
|
# endif
|
||||||
@@ -37,7 +38,7 @@ extern "C" {
|
|||||||
#endif /* C++ or ANSI C. */
|
#endif /* C++ or ANSI C. */
|
||||||
|
|
||||||
#ifndef const
|
#ifndef const
|
||||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined WINDOWS32
|
||||||
# define __const const
|
# define __const const
|
||||||
# else
|
# else
|
||||||
# define __const
|
# define __const
|
||||||
|
|||||||
46
glob/glob.c
46
glob/glob.c
@@ -1,19 +1,20 @@
|
|||||||
/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
published by the Free Software Foundation; either version 2 of the
|
published by the Free Software Foundation; either version 2 of the
|
||||||
License, or (at your option) any later version.
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public License
|
||||||
License along with this library; see the file COPYING.LIB. If not,
|
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||||
Boston, MA 02111-1307, USA. */
|
USA. */
|
||||||
|
|
||||||
/* AIX requires this to be the first thing in the file. */
|
/* AIX requires this to be the first thing in the file. */
|
||||||
#if defined _AIX && !defined __GNUC__
|
#if defined _AIX && !defined __GNUC__
|
||||||
@@ -181,19 +182,20 @@ extern void bcopy ();
|
|||||||
# define mempcpy(Dest, Src, Len) __mempcpy (Dest, Src, Len)
|
# define mempcpy(Dest, Src, Len) __mempcpy (Dest, Src, Len)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __GNU_LIBRARY__
|
#if !defined __GNU_LIBRARY__ && !defined __DJGPP__
|
||||||
# ifdef __GNUC__
|
# ifdef __GNUC__
|
||||||
__inline
|
__inline
|
||||||
# endif
|
# endif
|
||||||
# ifndef __SASC
|
# ifndef __SASC
|
||||||
# ifdef WINDOWS32
|
# ifdef WINDOWS32
|
||||||
static void *
|
static void *
|
||||||
|
my_realloc (void *p, unsigned int n)
|
||||||
# else
|
# else
|
||||||
static char *
|
static char *
|
||||||
# endif
|
|
||||||
my_realloc (p, n)
|
my_realloc (p, n)
|
||||||
char *p;
|
char *p;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
|
# endif
|
||||||
{
|
{
|
||||||
/* These casts are the for sake of the broken Ultrix compiler,
|
/* These casts are the for sake of the broken Ultrix compiler,
|
||||||
which warns of illegal pointer combinations otherwise. */
|
which warns of illegal pointer combinations otherwise. */
|
||||||
@@ -203,7 +205,7 @@ my_realloc (p, n)
|
|||||||
}
|
}
|
||||||
# define realloc my_realloc
|
# define realloc my_realloc
|
||||||
# endif /* __SASC */
|
# endif /* __SASC */
|
||||||
#endif /* __GNU_LIBRARY__ */
|
#endif /* __GNU_LIBRARY__ || __DJGPP__ */
|
||||||
|
|
||||||
|
|
||||||
#if !defined __alloca && !defined __GNU_LIBRARY__
|
#if !defined __alloca && !defined __GNU_LIBRARY__
|
||||||
@@ -299,11 +301,8 @@ static int glob_in_dir __P ((const char *pattern, const char *directory,
|
|||||||
static int prefix_array __P ((const char *prefix, char **array, size_t n));
|
static int prefix_array __P ((const char *prefix, char **array, size_t n));
|
||||||
static int collated_compare __P ((const __ptr_t, const __ptr_t));
|
static int collated_compare __P ((const __ptr_t, const __ptr_t));
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
/* these compilers like prototypes */
|
|
||||||
#if !defined _LIBC || !defined NO_GLOB_PATTERN_P
|
#if !defined _LIBC || !defined NO_GLOB_PATTERN_P
|
||||||
int __glob_pattern_p (const char *pattern, int quote);
|
int __glob_pattern_p __P ((const char *pattern, int quote));
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Find the end of the sub-pattern in a brace expression. We define
|
/* Find the end of the sub-pattern in a brace expression. We define
|
||||||
@@ -378,6 +377,11 @@ glob (pattern, flags, errfunc, pglob)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* POSIX requires all slashes to be matched. This means that with
|
||||||
|
a trailing slash we must match only directories. */
|
||||||
|
if (pattern[0] && pattern[strlen (pattern) - 1] == '/')
|
||||||
|
flags |= GLOB_ONLYDIR;
|
||||||
|
|
||||||
if (flags & GLOB_BRACE)
|
if (flags & GLOB_BRACE)
|
||||||
{
|
{
|
||||||
const char *begin = strchr (pattern, '{');
|
const char *begin = strchr (pattern, '{');
|
||||||
@@ -1303,7 +1307,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
|||||||
{
|
{
|
||||||
int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0)
|
int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0)
|
||||||
| ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
|
| ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
|
||||||
#if defined _AMIGA || defined VMS
|
#if defined HAVE_CASE_INSENSITIVE_FS
|
||||||
| FNM_CASEFOLD
|
| FNM_CASEFOLD
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|||||||
39
glob/glob.h
39
glob/glob.h
@@ -1,19 +1,20 @@
|
|||||||
/* Copyright (C) 1991, 92, 95, 96, 97, 98 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
published by the Free Software Foundation; either version 2 of the
|
published by the Free Software Foundation; either version 2 of the
|
||||||
License, or (at your option) any later version.
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
The GNU C Library is distributed in the hope that it will be useful,
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public License
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||||
Boston, MA 02111-1307, USA. */
|
USA. */
|
||||||
|
|
||||||
#ifndef _GLOB_H
|
#ifndef _GLOB_H
|
||||||
#define _GLOB_H 1
|
#define _GLOB_H 1
|
||||||
@@ -24,7 +25,7 @@ extern "C" {
|
|||||||
|
|
||||||
#undef __ptr_t
|
#undef __ptr_t
|
||||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||||
# if !defined __GLIBC__ || !defined __P
|
# if !defined __GLIBC__
|
||||||
# undef __P
|
# undef __P
|
||||||
# undef __PMT
|
# undef __PMT
|
||||||
# define __P(protos) protos
|
# define __P(protos) protos
|
||||||
@@ -47,19 +48,23 @@ extern "C" {
|
|||||||
|
|
||||||
/* We need `size_t' for the following definitions. */
|
/* We need `size_t' for the following definitions. */
|
||||||
#ifndef __size_t
|
#ifndef __size_t
|
||||||
|
# if defined __FreeBSD__
|
||||||
|
# define __size_t size_t
|
||||||
|
# else
|
||||||
# if defined __GNUC__ && __GNUC__ >= 2
|
# if defined __GNUC__ && __GNUC__ >= 2
|
||||||
typedef __SIZE_TYPE__ __size_t;
|
typedef __SIZE_TYPE__ __size_t;
|
||||||
# else
|
# else
|
||||||
/* This is a guess. */
|
/* This is a guess. */
|
||||||
/*hb
|
/*hb
|
||||||
* Conflicts with DECCs aready defined type __size_t.
|
* Conflicts with DECCs already defined type __size_t.
|
||||||
* Defining an own type with a name beginning with '__' is no good.
|
* Defining an own type with a name beginning with '__' is no good.
|
||||||
* Anyway if DECC is used and __SIZE_T is defined then __size_t is
|
* Anyway if DECC is used and __SIZE_T is defined then __size_t is
|
||||||
* already defined (and I hope it's exactly the one we need here).
|
* already defined (and I hope it's exactly the one we need here).
|
||||||
*/
|
*/
|
||||||
#if !(defined __DECC && defined __SIZE_T)
|
# if !(defined __DECC && defined __SIZE_T)
|
||||||
typedef unsigned long int __size_t;
|
typedef unsigned long int __size_t;
|
||||||
#endif
|
# endif
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
/* The GNU CC stddef.h version defines __size_t as empty. We need a real
|
/* The GNU CC stddef.h version defines __size_t as empty. We need a real
|
||||||
|
|||||||
53
gmk-default.scm
Normal file
53
gmk-default.scm
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
;; Contents of the (gnu make) Guile module
|
||||||
|
;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
|
||||||
|
;; This file is part of GNU Make.
|
||||||
|
;;
|
||||||
|
;; GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
;; the terms of the GNU General Public License as published by the Free
|
||||||
|
;; Software Foundation; either version 3 of the License, or (at your option)
|
||||||
|
;; any later version.
|
||||||
|
;;
|
||||||
|
;; GNU Make 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 for more
|
||||||
|
;; details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License along
|
||||||
|
;; with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
(define (to-string-maybe x)
|
||||||
|
(cond
|
||||||
|
;; In GNU make, "false" is the empty string
|
||||||
|
((or (not x)
|
||||||
|
(unspecified? x)
|
||||||
|
(variable? x)
|
||||||
|
(null? x)
|
||||||
|
(and (string? x) (string-null? x)))
|
||||||
|
#f)
|
||||||
|
;; We want something not false... not sure about this
|
||||||
|
((eq? x #t) "#t")
|
||||||
|
;; Basics
|
||||||
|
((or (symbol? x) (number? x))
|
||||||
|
(object->string x))
|
||||||
|
((char? x)
|
||||||
|
(string x))
|
||||||
|
;; Printable string (no special characters)
|
||||||
|
((and (string? x) (string-every char-set:printing x))
|
||||||
|
x)
|
||||||
|
;; No idea: fail
|
||||||
|
(else (error "Unknown object:" x))))
|
||||||
|
|
||||||
|
(define (obj-to-str x)
|
||||||
|
(let ((acc '()))
|
||||||
|
(define (walk x)
|
||||||
|
(cond ((pair? x) (walk (car x)) (walk (cdr x)))
|
||||||
|
((to-string-maybe x) => (lambda (s) (set! acc (cons s acc))))))
|
||||||
|
(walk x)
|
||||||
|
(string-join (reverse! acc))))
|
||||||
|
|
||||||
|
;; Return the value of the GNU make variable V
|
||||||
|
(define (gmk-var v)
|
||||||
|
(gmk-expand (format #f "$(~a)" (obj-to-str v))))
|
||||||
|
|
||||||
|
;; Export the public interfaces
|
||||||
|
(export gmk-expand gmk-eval gmk-var)
|
||||||
80
gnumake.h
Normal file
80
gnumake.h
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/* External interfaces usable by dynamic objects loaded into GNU Make.
|
||||||
|
--THIS API IS A "TECHNOLOGY PREVIEW" ONLY. IT IS NOT A STABLE INTERFACE--
|
||||||
|
|
||||||
|
Copyright (C) 2013-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#ifndef _GNUMAKE_H_
|
||||||
|
#define _GNUMAKE_H_
|
||||||
|
|
||||||
|
/* Specify the location of elements read from makefiles. */
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
const char *filenm;
|
||||||
|
unsigned long lineno;
|
||||||
|
unsigned long offset;
|
||||||
|
} gmk_floc;
|
||||||
|
|
||||||
|
typedef char *(*gmk_func_ptr)(const char *nm, unsigned int argc, char **argv);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
# ifdef GMK_BUILDING_MAKE
|
||||||
|
# define GMK_EXPORT __declspec(dllexport)
|
||||||
|
# else
|
||||||
|
# define GMK_EXPORT __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define GMK_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Free memory returned by the gmk_expand() function. */
|
||||||
|
GMK_EXPORT void gmk_free (char *str);
|
||||||
|
|
||||||
|
/* Allocate memory in GNU make's context. */
|
||||||
|
GMK_EXPORT char *gmk_alloc (unsigned int len);
|
||||||
|
|
||||||
|
/* Run $(eval ...) on the provided string BUFFER. */
|
||||||
|
GMK_EXPORT void gmk_eval (const char *buffer, const gmk_floc *floc);
|
||||||
|
|
||||||
|
/* Run GNU make expansion on the provided string STR.
|
||||||
|
Returns an allocated buffer that the caller must free with gmk_free(). */
|
||||||
|
GMK_EXPORT char *gmk_expand (const char *str);
|
||||||
|
|
||||||
|
/* Register a new GNU make function NAME (maximum of 255 chars long).
|
||||||
|
When the function is expanded in the makefile, FUNC will be invoked with
|
||||||
|
the appropriate arguments.
|
||||||
|
|
||||||
|
The return value of FUNC must be either NULL, in which case it expands to
|
||||||
|
the empty string, or a pointer to the result of the expansion in a string
|
||||||
|
created by gmk_alloc(). GNU make will free the memory when it's done.
|
||||||
|
|
||||||
|
MIN_ARGS is the minimum number of arguments the function requires.
|
||||||
|
MAX_ARGS is the maximum number of arguments (or 0 if there's no maximum).
|
||||||
|
MIN_ARGS and MAX_ARGS may not exceed 255.
|
||||||
|
|
||||||
|
The FLAGS value may be GMK_FUNC_DEFAULT, or one or more of the following
|
||||||
|
flags OR'd together:
|
||||||
|
|
||||||
|
GMK_FUNC_NOEXPAND: the arguments to the function will be not be expanded
|
||||||
|
before FUNC is called.
|
||||||
|
*/
|
||||||
|
GMK_EXPORT void gmk_add_function (const char *name, gmk_func_ptr func,
|
||||||
|
unsigned int min_args, unsigned int max_args,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
#define GMK_FUNC_DEFAULT 0x00
|
||||||
|
#define GMK_FUNC_NOEXPAND 0x01
|
||||||
|
|
||||||
|
#endif /* _GNUMAKE_H_ */
|
||||||
159
guile.c
Normal file
159
guile.c
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
/* GNU Guile interface for GNU Make.
|
||||||
|
Copyright (C) 2011-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_GUILE
|
||||||
|
|
||||||
|
#include "gnumake.h"
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "dep.h"
|
||||||
|
#include "variable.h"
|
||||||
|
|
||||||
|
#include <libguile.h>
|
||||||
|
|
||||||
|
/* Pre-2.0 versions of Guile don't have a typedef for gsubr function types. */
|
||||||
|
#if SCM_MAJOR_VERSION < 2
|
||||||
|
# define GSUBR_TYPE SCM (*) ()
|
||||||
|
/* Guile 1.x doesn't really support i18n. */
|
||||||
|
# define EVAL_STRING(_s) scm_c_eval_string (_s)
|
||||||
|
#else
|
||||||
|
# define GSUBR_TYPE scm_t_subr
|
||||||
|
# define EVAL_STRING(_s) scm_eval_string (scm_from_utf8_string (_s))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static SCM make_mod = SCM_EOL;
|
||||||
|
static SCM obj_to_str = SCM_EOL;
|
||||||
|
|
||||||
|
/* Convert an SCM object into a string. */
|
||||||
|
static char *
|
||||||
|
cvt_scm_to_str (SCM obj)
|
||||||
|
{
|
||||||
|
return scm_to_locale_string (scm_call_1 (obj_to_str, obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform the GNU make expansion function. */
|
||||||
|
static SCM
|
||||||
|
guile_expand_wrapper (SCM obj)
|
||||||
|
{
|
||||||
|
char *str = cvt_scm_to_str (obj);
|
||||||
|
SCM ret;
|
||||||
|
char *res;
|
||||||
|
|
||||||
|
DB (DB_BASIC, (_("guile: Expanding '%s'\n"), str));
|
||||||
|
res = gmk_expand (str);
|
||||||
|
ret = scm_from_locale_string (res);
|
||||||
|
|
||||||
|
free (str);
|
||||||
|
free (res);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform the GNU make eval function. */
|
||||||
|
static SCM
|
||||||
|
guile_eval_wrapper (SCM obj)
|
||||||
|
{
|
||||||
|
char *str = cvt_scm_to_str (obj);
|
||||||
|
|
||||||
|
DB (DB_BASIC, (_("guile: Evaluating '%s'\n"), str));
|
||||||
|
gmk_eval (str, 0);
|
||||||
|
|
||||||
|
return SCM_BOOL_F;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Invoked by scm_c_define_module(), in the context of the GNU make module. */
|
||||||
|
static void
|
||||||
|
guile_define_module (void *data UNUSED)
|
||||||
|
{
|
||||||
|
/* Ingest the predefined Guile module for GNU make. */
|
||||||
|
#include "gmk-default.h"
|
||||||
|
|
||||||
|
/* Register a subr for GNU make's eval capability. */
|
||||||
|
scm_c_define_gsubr ("gmk-expand", 1, 0, 0, (GSUBR_TYPE) guile_expand_wrapper);
|
||||||
|
|
||||||
|
/* Register a subr for GNU make's eval capability. */
|
||||||
|
scm_c_define_gsubr ("gmk-eval", 1, 0, 0, (GSUBR_TYPE) guile_eval_wrapper);
|
||||||
|
|
||||||
|
/* Define the rest of the module. */
|
||||||
|
scm_c_eval_string (GUILE_module_defn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize the GNU make Guile module. */
|
||||||
|
static void *
|
||||||
|
guile_init (void *arg UNUSED)
|
||||||
|
{
|
||||||
|
/* Define the module. */
|
||||||
|
make_mod = scm_c_define_module ("gnu make", guile_define_module, NULL);
|
||||||
|
|
||||||
|
/* Get a reference to the object-to-string translator, for later. */
|
||||||
|
obj_to_str = scm_variable_ref (scm_c_module_lookup (make_mod, "obj-to-str"));
|
||||||
|
|
||||||
|
/* Import the GNU make module exports into the generic space. */
|
||||||
|
scm_c_eval_string ("(use-modules (gnu make))");
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *
|
||||||
|
internal_guile_eval (void *arg)
|
||||||
|
{
|
||||||
|
return cvt_scm_to_str (EVAL_STRING (arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is the function registered with make */
|
||||||
|
static char *
|
||||||
|
func_guile (const char *funcname UNUSED, unsigned int argc UNUSED, char **argv)
|
||||||
|
{
|
||||||
|
static int init = 0;
|
||||||
|
|
||||||
|
if (! init)
|
||||||
|
{
|
||||||
|
/* Initialize the Guile interpreter. */
|
||||||
|
scm_with_guile (guile_init, NULL);
|
||||||
|
init = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argv[0] && argv[0][0] != '\0')
|
||||||
|
return scm_with_guile (internal_guile_eval, argv[0]);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----- Public interface ----- */
|
||||||
|
|
||||||
|
/* We could send the flocp to define_new_function(), but since guile is
|
||||||
|
"kind of" built-in, that didn't seem so useful. */
|
||||||
|
int
|
||||||
|
guile_gmake_setup (const gmk_floc *flocp UNUSED)
|
||||||
|
{
|
||||||
|
/* Create a make function "guile". */
|
||||||
|
gmk_add_function ("guile", func_guile, 0, 1, GMK_FUNC_DEFAULT);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int
|
||||||
|
guile_gmake_setup (const gmk_floc *flocp UNUSED)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
123
hash.c
123
hash.c
@@ -1,26 +1,23 @@
|
|||||||
/* hash.c -- hash table maintenance
|
/* hash.c -- hash table maintenance
|
||||||
Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
#define CALLOC(t, n) ((t *) calloc (sizeof (t), (n)))
|
#define CALLOC(t, n) ((t *) xcalloc (sizeof (t) * (n)))
|
||||||
#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n)))
|
#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n)))
|
||||||
#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n)))
|
#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n)))
|
||||||
#define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n)))
|
#define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n)))
|
||||||
@@ -29,7 +26,7 @@ static void hash_rehash __P((struct hash_table* ht));
|
|||||||
static unsigned long round_up_2 __P((unsigned long rough));
|
static unsigned long round_up_2 __P((unsigned long rough));
|
||||||
|
|
||||||
/* Implement double hashing with open addressing. The table size is
|
/* Implement double hashing with open addressing. The table size is
|
||||||
always a power of two. The secondary (`increment') hash function
|
always a power of two. The secondary ('increment') hash function
|
||||||
is forced to return an odd-value, in order to be relatively prime
|
is forced to return an odd-value, in order to be relatively prime
|
||||||
to the table size. This guarantees that the increment can
|
to the table size. This guarantees that the increment can
|
||||||
potentially hit every slot in the table during collision
|
potentially hit every slot in the table during collision
|
||||||
@@ -41,21 +38,17 @@ void *hash_deleted_item = &hash_deleted_item;
|
|||||||
given size. */
|
given size. */
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_init (ht, size, hash_1, hash_2, hash_cmp)
|
hash_init (struct hash_table *ht, unsigned long size,
|
||||||
struct hash_table* ht;
|
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)
|
||||||
unsigned long size;
|
|
||||||
hash_func_t hash_1;
|
|
||||||
hash_func_t hash_2;
|
|
||||||
hash_cmp_func_t hash_cmp;
|
|
||||||
{
|
{
|
||||||
ht->ht_size = round_up_2 (size);
|
ht->ht_size = round_up_2 (size);
|
||||||
ht->ht_empty_slots = ht->ht_size;
|
ht->ht_empty_slots = ht->ht_size;
|
||||||
ht->ht_vec = (void**) CALLOC (struct token *, ht->ht_size);
|
ht->ht_vec = (void**) CALLOC (struct token *, ht->ht_size);
|
||||||
if (ht->ht_vec == 0)
|
if (ht->ht_vec == 0)
|
||||||
{
|
{
|
||||||
fprintf (stderr, _("can't allocate %ld bytes for hash table: memory exhausted"),
|
fprintf (stderr, _("can't allocate %lu bytes for hash table: memory exhausted"),
|
||||||
ht->ht_size * sizeof(struct token *));
|
ht->ht_size * (unsigned long) sizeof (struct token *));
|
||||||
exit (1);
|
exit (MAKE_TROUBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */
|
ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */
|
||||||
@@ -68,14 +61,11 @@ hash_init (ht, size, hash_1, hash_2, hash_cmp)
|
|||||||
ht->ht_compare = hash_cmp;
|
ht->ht_compare = hash_cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load an array of items into `ht'. */
|
/* Load an array of items into 'ht'. */
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_load (ht, item_table, cardinality, size)
|
hash_load (struct hash_table *ht, void *item_table,
|
||||||
struct hash_table* ht;
|
unsigned long cardinality, unsigned long size)
|
||||||
void *item_table;
|
|
||||||
unsigned long cardinality;
|
|
||||||
unsigned long size;
|
|
||||||
{
|
{
|
||||||
char *items = (char *) item_table;
|
char *items = (char *) item_table;
|
||||||
while (cardinality--)
|
while (cardinality--)
|
||||||
@@ -85,15 +75,13 @@ hash_load (ht, item_table, cardinality, size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns the address of the table slot matching `key'. If `key' is
|
/* Returns the address of the table slot matching 'key'. If 'key' is
|
||||||
not found, return the address of an empty slot suitable for
|
not found, return the address of an empty slot suitable for
|
||||||
inserting `key'. The caller is responsible for incrementing
|
inserting 'key'. The caller is responsible for incrementing
|
||||||
ht_fill on insertion. */
|
ht_fill on insertion. */
|
||||||
|
|
||||||
void **
|
void **
|
||||||
hash_find_slot (ht, key)
|
hash_find_slot (struct hash_table *ht, const void *key)
|
||||||
struct hash_table* ht;
|
|
||||||
void const *key;
|
|
||||||
{
|
{
|
||||||
void **slot;
|
void **slot;
|
||||||
void **deleted_slot = 0;
|
void **deleted_slot = 0;
|
||||||
@@ -128,32 +116,25 @@ hash_find_slot (ht, key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_find_item (ht, key)
|
hash_find_item (struct hash_table *ht, const void *key)
|
||||||
struct hash_table* ht;
|
|
||||||
void const *key;
|
|
||||||
{
|
{
|
||||||
void **slot = hash_find_slot (ht, key);
|
void **slot = hash_find_slot (ht, key);
|
||||||
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_insert (ht, item)
|
hash_insert (struct hash_table *ht, const void *item)
|
||||||
struct hash_table* ht;
|
|
||||||
void *item;
|
|
||||||
{
|
{
|
||||||
void **slot = hash_find_slot (ht, item);
|
void **slot = hash_find_slot (ht, item);
|
||||||
void *old_item = slot ? *slot : 0;
|
const void *old_item = *slot;
|
||||||
hash_insert_at (ht, item, slot);
|
hash_insert_at (ht, item, slot);
|
||||||
return ((HASH_VACANT (old_item)) ? 0 : old_item);
|
return (void *)((HASH_VACANT (old_item)) ? 0 : old_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_insert_at (ht, item, slot)
|
hash_insert_at (struct hash_table *ht, const void *item, const void *slot)
|
||||||
struct hash_table* ht;
|
|
||||||
void *item;
|
|
||||||
void const *slot;
|
|
||||||
{
|
{
|
||||||
void *old_item = *(void **) slot;
|
const void *old_item = *(void **) slot;
|
||||||
if (HASH_VACANT (old_item))
|
if (HASH_VACANT (old_item))
|
||||||
{
|
{
|
||||||
ht->ht_fill++;
|
ht->ht_fill++;
|
||||||
@@ -172,18 +153,14 @@ hash_insert_at (ht, item, slot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_delete (ht, item)
|
hash_delete (struct hash_table *ht, const void *item)
|
||||||
struct hash_table* ht;
|
|
||||||
void const *item;
|
|
||||||
{
|
{
|
||||||
void **slot = hash_find_slot (ht, item);
|
void **slot = hash_find_slot (ht, item);
|
||||||
return hash_delete_at (ht, slot);
|
return hash_delete_at (ht, slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
hash_delete_at (ht, slot)
|
hash_delete_at (struct hash_table *ht, const void *slot)
|
||||||
struct hash_table* ht;
|
|
||||||
void const *slot;
|
|
||||||
{
|
{
|
||||||
void *item = *(void **) slot;
|
void *item = *(void **) slot;
|
||||||
if (!HASH_VACANT (item))
|
if (!HASH_VACANT (item))
|
||||||
@@ -197,8 +174,7 @@ hash_delete_at (ht, slot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_free_items (ht)
|
hash_free_items (struct hash_table *ht)
|
||||||
struct hash_table* ht;
|
|
||||||
{
|
{
|
||||||
void **vec = ht->ht_vec;
|
void **vec = ht->ht_vec;
|
||||||
void **end = &vec[ht->ht_size];
|
void **end = &vec[ht->ht_size];
|
||||||
@@ -214,8 +190,7 @@ hash_free_items (ht)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_delete_items (ht)
|
hash_delete_items (struct hash_table *ht)
|
||||||
struct hash_table* ht;
|
|
||||||
{
|
{
|
||||||
void **vec = ht->ht_vec;
|
void **vec = ht->ht_vec;
|
||||||
void **end = &vec[ht->ht_size];
|
void **end = &vec[ht->ht_size];
|
||||||
@@ -229,9 +204,7 @@ hash_delete_items (ht)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_free (ht, free_items)
|
hash_free (struct hash_table *ht, int free_items)
|
||||||
struct hash_table* ht;
|
|
||||||
int free_items;
|
|
||||||
{
|
{
|
||||||
if (free_items)
|
if (free_items)
|
||||||
hash_free_items (ht);
|
hash_free_items (ht);
|
||||||
@@ -246,9 +219,7 @@ hash_free (ht, free_items)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_map (ht, map)
|
hash_map (struct hash_table *ht, hash_map_func_t map)
|
||||||
struct hash_table *ht;
|
|
||||||
hash_map_func_t map;
|
|
||||||
{
|
{
|
||||||
void **slot;
|
void **slot;
|
||||||
void **end = &ht->ht_vec[ht->ht_size];
|
void **end = &ht->ht_vec[ht->ht_size];
|
||||||
@@ -261,10 +232,7 @@ hash_map (ht, map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_map_arg (ht, map, arg)
|
hash_map_arg (struct hash_table *ht, hash_map_arg_func_t map, void *arg)
|
||||||
struct hash_table *ht;
|
|
||||||
hash_map_arg_func_t map;
|
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
void **slot;
|
void **slot;
|
||||||
void **end = &ht->ht_vec[ht->ht_size];
|
void **end = &ht->ht_vec[ht->ht_size];
|
||||||
@@ -279,8 +247,7 @@ hash_map_arg (ht, map, arg)
|
|||||||
/* Double the size of the hash table in the event of overflow... */
|
/* Double the size of the hash table in the event of overflow... */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hash_rehash (ht)
|
hash_rehash (struct hash_table *ht)
|
||||||
struct hash_table* ht;
|
|
||||||
{
|
{
|
||||||
unsigned long old_ht_size = ht->ht_size;
|
unsigned long old_ht_size = ht->ht_size;
|
||||||
void **old_vec = ht->ht_vec;
|
void **old_vec = ht->ht_vec;
|
||||||
@@ -307,9 +274,7 @@ hash_rehash (ht)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
hash_print_stats (ht, out_FILE)
|
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
||||||
struct hash_table *ht;
|
|
||||||
FILE *out_FILE;
|
|
||||||
{
|
{
|
||||||
/* GKM FIXME: honor NO_FLOAT */
|
/* GKM FIXME: honor NO_FLOAT */
|
||||||
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
||||||
@@ -325,10 +290,7 @@ hash_print_stats (ht, out_FILE)
|
|||||||
user-supplied vector, or malloc one. */
|
user-supplied vector, or malloc one. */
|
||||||
|
|
||||||
void **
|
void **
|
||||||
hash_dump (ht, vector_0, compare)
|
hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
|
||||||
struct hash_table *ht;
|
|
||||||
void **vector_0;
|
|
||||||
qsort_cmp_t compare;
|
|
||||||
{
|
{
|
||||||
void **vector;
|
void **vector;
|
||||||
void **slot;
|
void **slot;
|
||||||
@@ -351,8 +313,7 @@ hash_dump (ht, vector_0, compare)
|
|||||||
/* Round a given number up to the nearest power of 2. */
|
/* Round a given number up to the nearest power of 2. */
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
round_up_2 (n)
|
round_up_2 (unsigned long n)
|
||||||
unsigned long n;
|
|
||||||
{
|
{
|
||||||
n |= (n >> 1);
|
n |= (n >> 1);
|
||||||
n |= (n >> 2);
|
n |= (n >> 2);
|
||||||
|
|||||||
55
hash.h
55
hash.h
@@ -1,20 +1,18 @@
|
|||||||
/* hash.h -- decls for hash table
|
/* hash.h -- decls for hash table
|
||||||
Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#ifndef _hash_h_
|
#ifndef _hash_h_
|
||||||
#define _hash_h_
|
#define _hash_h_
|
||||||
@@ -30,9 +28,9 @@
|
|||||||
#else /* Not C++ or ANSI C. */
|
#else /* Not C++ or ANSI C. */
|
||||||
# undef __P
|
# undef __P
|
||||||
# define __P(protos) ()
|
# define __P(protos) ()
|
||||||
/* We can get away without defining `const' here only because in this file
|
/* We can get away without defining 'const' here only because in this file
|
||||||
it is used only inside the prototype for `fnmatch', which is elided in
|
it is used only inside the prototype for 'fnmatch', which is elided in
|
||||||
non-ANSI C where `const' is problematical. */
|
non-ANSI C where 'const' is problematical. */
|
||||||
#endif /* C++ or ANSI C. */
|
#endif /* C++ or ANSI C. */
|
||||||
|
|
||||||
typedef unsigned long (*hash_func_t) __P((void const *key));
|
typedef unsigned long (*hash_func_t) __P((void const *key));
|
||||||
@@ -43,6 +41,9 @@ typedef void (*hash_map_arg_func_t) __P((void const *item, void *arg));
|
|||||||
struct hash_table
|
struct hash_table
|
||||||
{
|
{
|
||||||
void **ht_vec;
|
void **ht_vec;
|
||||||
|
hash_func_t ht_hash_1; /* primary hash function */
|
||||||
|
hash_func_t ht_hash_2; /* secondary hash function */
|
||||||
|
hash_cmp_func_t ht_compare; /* comparison function */
|
||||||
unsigned long ht_size; /* total number of slots (power of 2) */
|
unsigned long ht_size; /* total number of slots (power of 2) */
|
||||||
unsigned long ht_capacity; /* usable slots, limited by loading-factor */
|
unsigned long ht_capacity; /* usable slots, limited by loading-factor */
|
||||||
unsigned long ht_fill; /* items in table */
|
unsigned long ht_fill; /* items in table */
|
||||||
@@ -50,9 +51,6 @@ struct hash_table
|
|||||||
unsigned long ht_collisions; /* # of failed calls to comparison function */
|
unsigned long ht_collisions; /* # of failed calls to comparison function */
|
||||||
unsigned long ht_lookups; /* # of queries */
|
unsigned long ht_lookups; /* # of queries */
|
||||||
unsigned int ht_rehashes; /* # of times we've expanded table */
|
unsigned int ht_rehashes; /* # of times we've expanded table */
|
||||||
hash_func_t ht_hash_1; /* primary hash function */
|
|
||||||
hash_func_t ht_hash_2; /* secondary hash function */
|
|
||||||
hash_cmp_func_t ht_compare; /* comparison function */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
||||||
@@ -63,8 +61,8 @@ void hash_load __P((struct hash_table *ht, void *item_table,
|
|||||||
unsigned long cardinality, unsigned long size));
|
unsigned long cardinality, unsigned long size));
|
||||||
void **hash_find_slot __P((struct hash_table *ht, void const *key));
|
void **hash_find_slot __P((struct hash_table *ht, void const *key));
|
||||||
void *hash_find_item __P((struct hash_table *ht, void const *key));
|
void *hash_find_item __P((struct hash_table *ht, void const *key));
|
||||||
void *hash_insert __P((struct hash_table *ht, void *item));
|
void *hash_insert __P((struct hash_table *ht, const void *item));
|
||||||
void *hash_insert_at __P((struct hash_table *ht, void *item, void const *slot));
|
void *hash_insert_at __P((struct hash_table *ht, const void *item, void const *slot));
|
||||||
void *hash_delete __P((struct hash_table *ht, void const *item));
|
void *hash_delete __P((struct hash_table *ht, void const *item));
|
||||||
void *hash_delete_at __P((struct hash_table *ht, void const *slot));
|
void *hash_delete_at __P((struct hash_table *ht, void const *slot));
|
||||||
void hash_delete_items __P((struct hash_table *ht));
|
void hash_delete_items __P((struct hash_table *ht));
|
||||||
@@ -81,6 +79,9 @@ extern void *hash_deleted_item;
|
|||||||
|
|
||||||
/* hash and comparison macros for case-sensitive string keys. */
|
/* hash and comparison macros for case-sensitive string keys. */
|
||||||
|
|
||||||
|
/* Due to the strcache, it's not uncommon for the string pointers to
|
||||||
|
be identical. Take advantage of that to short-circuit string compares. */
|
||||||
|
|
||||||
#define STRING_HASH_1(KEY, RESULT) do { \
|
#define STRING_HASH_1(KEY, RESULT) do { \
|
||||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||||
while (*++_key_) \
|
while (*++_key_) \
|
||||||
@@ -104,10 +105,10 @@ extern void *hash_deleted_item;
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define STRING_COMPARE(X, Y, RESULT) do { \
|
#define STRING_COMPARE(X, Y, RESULT) do { \
|
||||||
RESULT = strcmp ((X), (Y)); \
|
RESULT = (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define return_STRING_COMPARE(X, Y) do { \
|
#define return_STRING_COMPARE(X, Y) do { \
|
||||||
return strcmp ((X), (Y)); \
|
return (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
@@ -140,10 +141,10 @@ extern void *hash_deleted_item;
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define STRING_N_COMPARE(X, Y, N, RESULT) do { \
|
#define STRING_N_COMPARE(X, Y, N, RESULT) do { \
|
||||||
RESULT = strncmp ((X), (Y), (N)); \
|
RESULT = (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define return_STRING_N_COMPARE(X, Y, N) do { \
|
#define return_STRING_N_COMPARE(X, Y, N) do { \
|
||||||
return strncmp ((X), (Y), (N)); \
|
return (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#ifdef HAVE_CASE_INSENSITIVE_FS
|
#ifdef HAVE_CASE_INSENSITIVE_FS
|
||||||
@@ -173,10 +174,10 @@ extern void *hash_deleted_item;
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define ISTRING_COMPARE(X, Y, RESULT) do { \
|
#define ISTRING_COMPARE(X, Y, RESULT) do { \
|
||||||
RESULT = strcmpi ((X), (Y)); \
|
RESULT = (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define return_ISTRING_COMPARE(X, Y) do { \
|
#define return_ISTRING_COMPARE(X, Y) do { \
|
||||||
return strcmpi ((X), (Y)); \
|
return (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
938
implicit.c
938
implicit.c
File diff suppressed because it is too large
Load Diff
142
job.h
142
job.h
@@ -1,24 +1,86 @@
|
|||||||
/* Definitions for managing subprocesses in GNU Make.
|
/* Definitions for managing subprocesses in GNU Make.
|
||||||
Copyright (C) 1992, 1993, 1996, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1992-2016 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#ifndef SEEN_JOB_H
|
#include "output.h"
|
||||||
#define SEEN_JOB_H
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# include <fcntl.h>
|
||||||
|
#else
|
||||||
|
# include <sys/file.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* How to set close-on-exec for a file descriptor. */
|
||||||
|
|
||||||
|
#if !defined(F_SETFD) || !defined(F_GETFD)
|
||||||
|
# ifdef WINDOWS32
|
||||||
|
# define CLOSE_ON_EXEC(_d) process_noinherit(_d)
|
||||||
|
# else
|
||||||
|
# define CLOSE_ON_EXEC(_d)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# ifndef FD_CLOEXEC
|
||||||
|
# define FD_CLOEXEC 1
|
||||||
|
# endif
|
||||||
|
# define CLOSE_ON_EXEC(_d) (void) fcntl ((_d), F_SETFD, FD_CLOEXEC)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_OUTPUT_SYNC
|
||||||
|
# define RECORD_SYNC_MUTEX(m) \
|
||||||
|
O (error, NILF, \
|
||||||
|
_("-O[TYPE] (--output-sync[=TYPE]) is not configured for this build."));
|
||||||
|
#else
|
||||||
|
# ifdef WINDOWS32
|
||||||
|
/* For emulations in w32/compat/posixfcn.c. */
|
||||||
|
# define F_GETFD 1
|
||||||
|
# define F_SETLKW 2
|
||||||
|
/* Implementation note: None of the values of l_type below can be zero
|
||||||
|
-- they are compared with a static instance of the struct, so zero
|
||||||
|
means unknown/invalid, see w32/compat/posixfcn.c. */
|
||||||
|
# define F_WRLCK 1
|
||||||
|
# define F_UNLCK 2
|
||||||
|
|
||||||
|
struct flock
|
||||||
|
{
|
||||||
|
short l_type;
|
||||||
|
short l_whence;
|
||||||
|
off_t l_start;
|
||||||
|
off_t l_len;
|
||||||
|
pid_t l_pid;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* This type is actually a HANDLE, but we want to avoid including
|
||||||
|
windows.h as much as possible. */
|
||||||
|
typedef intptr_t sync_handle_t;
|
||||||
|
|
||||||
|
/* Public functions emulated/provided in posixfcn.c. */
|
||||||
|
int fcntl (intptr_t fd, int cmd, ...);
|
||||||
|
intptr_t create_mutex (void);
|
||||||
|
int same_stream (FILE *f1, FILE *f2);
|
||||||
|
|
||||||
|
# define RECORD_SYNC_MUTEX(m) record_sync_mutex(m)
|
||||||
|
void record_sync_mutex (const char *str);
|
||||||
|
void prepare_mutex_handle_string (intptr_t hdl);
|
||||||
|
# else /* !WINDOWS32 */
|
||||||
|
|
||||||
|
typedef int sync_handle_t; /* file descriptor */
|
||||||
|
|
||||||
|
# define RECORD_SYNC_MUTEX(m) (void)(m)
|
||||||
|
|
||||||
|
# endif
|
||||||
|
#endif /* !NO_OUTPUT_SYNC */
|
||||||
|
|
||||||
/* Structure describing a running or dead child process. */
|
/* Structure describing a running or dead child process. */
|
||||||
|
|
||||||
@@ -29,48 +91,62 @@ struct child
|
|||||||
struct file *file; /* File being remade. */
|
struct file *file; /* File being remade. */
|
||||||
|
|
||||||
char **environment; /* Environment for commands. */
|
char **environment; /* Environment for commands. */
|
||||||
|
char *sh_batch_file; /* Script file for shell commands */
|
||||||
char **command_lines; /* Array of variable-expanded cmd lines. */
|
char **command_lines; /* Array of variable-expanded cmd lines. */
|
||||||
unsigned int command_line; /* Index into above. */
|
|
||||||
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
||||||
|
|
||||||
pid_t pid; /* Child process's ID number. */
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
char *comname; /* Temporary command file name */
|
||||||
int efn; /* Completion event flag number */
|
int efn; /* Completion event flag number */
|
||||||
int cstatus; /* Completion status */
|
int cstatus; /* Completion status */
|
||||||
|
int vms_launch_status; /* non-zero if lib$spawn, etc failed */
|
||||||
#endif
|
#endif
|
||||||
char *sh_batch_file; /* Script file for shell commands */
|
|
||||||
|
unsigned int command_line; /* Index into command_lines. */
|
||||||
|
struct output output; /* Output for this child. */
|
||||||
|
pid_t pid; /* Child process's ID number. */
|
||||||
unsigned int remote:1; /* Nonzero if executing remotely. */
|
unsigned int remote:1; /* Nonzero if executing remotely. */
|
||||||
|
unsigned int noerror:1; /* Nonzero if commands contained a '-'. */
|
||||||
unsigned int noerror:1; /* Nonzero if commands contained a `-'. */
|
|
||||||
|
|
||||||
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
||||||
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
||||||
|
unsigned int recursive:1; /* Nonzero for recursive command ('+' etc.) */
|
||||||
|
unsigned int dontcare:1; /* Saved dontcare flag. */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct child *children;
|
extern struct child *children;
|
||||||
|
|
||||||
extern void new_job PARAMS ((struct file *file));
|
/* A signal handler for SIGCHLD, if needed. */
|
||||||
extern void reap_children PARAMS ((int block, int err));
|
RETSIGTYPE child_handler (int sig);
|
||||||
extern void start_waiting_jobs PARAMS ((void));
|
int is_bourne_compatible_shell(const char *path);
|
||||||
|
void new_job (struct file *file);
|
||||||
|
void reap_children (int block, int err);
|
||||||
|
void start_waiting_jobs (void);
|
||||||
|
|
||||||
|
char **construct_command_argv (char *line, char **restp, struct file *file,
|
||||||
|
int cmd_flags, char** batch_file);
|
||||||
|
|
||||||
extern char **construct_command_argv PARAMS ((char *line, char **restp, struct file *file, char** batch_file));
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
extern int child_execute_job PARAMS ((char *argv, struct child *child));
|
int child_execute_job (struct child *child, char *argv);
|
||||||
#else
|
#else
|
||||||
extern void child_execute_job PARAMS ((int stdin_fd, int stdout_fd, char **argv, char **envp));
|
# define FD_STDIN (fileno (stdin))
|
||||||
|
# define FD_STDOUT (fileno (stdout))
|
||||||
|
# define FD_STDERR (fileno (stderr))
|
||||||
|
int child_execute_job (struct output *out, int good_stdin, char **argv, char **envp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AMIGA
|
#ifdef _AMIGA
|
||||||
extern void exec_command PARAMS ((char **argv));
|
void exec_command (char **argv) __attribute__ ((noreturn));
|
||||||
|
#elif defined(__EMX__)
|
||||||
|
int exec_command (char **argv, char **envp);
|
||||||
#else
|
#else
|
||||||
extern void exec_command PARAMS ((char **argv, char **envp));
|
void exec_command (char **argv, char **envp) __attribute__ ((noreturn));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern unsigned int job_slots_used;
|
extern unsigned int job_slots_used;
|
||||||
|
|
||||||
extern void block_sigs PARAMS ((void));
|
void block_sigs (void);
|
||||||
#ifdef POSIX
|
#ifdef POSIX
|
||||||
extern void unblock_sigs PARAMS ((void));
|
void unblock_sigs (void);
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SIGSETMASK
|
#ifdef HAVE_SIGSETMASK
|
||||||
extern int fatal_signal_mask;
|
extern int fatal_signal_mask;
|
||||||
@@ -80,4 +156,4 @@ extern int fatal_signal_mask;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SEEN_JOB_H */
|
extern unsigned int jobserver_tokens;
|
||||||
|
|||||||
267
load.c
Normal file
267
load.c
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
/* Loading dynamic objects for GNU Make.
|
||||||
|
Copyright (C) 2012-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#if MAKE_LOAD
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#define SYMBOL_EXTENSION "_gmk_setup"
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "variable.h"
|
||||||
|
|
||||||
|
/* Tru64 V4.0 does not have this flag */
|
||||||
|
#ifndef RTLD_GLOBAL
|
||||||
|
# define RTLD_GLOBAL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct load_list
|
||||||
|
{
|
||||||
|
struct load_list *next;
|
||||||
|
const char *name;
|
||||||
|
void *dlp;
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct load_list *loaded_syms = NULL;
|
||||||
|
|
||||||
|
static load_func_t
|
||||||
|
load_object (const gmk_floc *flocp, int noerror,
|
||||||
|
const char *ldname, const char *symname)
|
||||||
|
{
|
||||||
|
static void *global_dl = NULL;
|
||||||
|
load_func_t symp;
|
||||||
|
|
||||||
|
if (! global_dl)
|
||||||
|
{
|
||||||
|
global_dl = dlopen (NULL, RTLD_NOW|RTLD_GLOBAL);
|
||||||
|
if (! global_dl)
|
||||||
|
{
|
||||||
|
const char *err = dlerror ();
|
||||||
|
OS (fatal, flocp, _("Failed to open global symbol table: %s"), err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
symp = (load_func_t) dlsym (global_dl, symname);
|
||||||
|
if (! symp)
|
||||||
|
{
|
||||||
|
struct load_list *new;
|
||||||
|
void *dlp = NULL;
|
||||||
|
|
||||||
|
/* If the path has no "/", try the current directory first. */
|
||||||
|
if (! strchr (ldname, '/')
|
||||||
|
#ifdef HAVE_DOS_PATHS
|
||||||
|
&& ! strchr (ldname, '\\')
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
dlp = dlopen (concat (2, "./", ldname), RTLD_LAZY|RTLD_GLOBAL);
|
||||||
|
|
||||||
|
/* If we haven't opened it yet, try the default search path. */
|
||||||
|
if (! dlp)
|
||||||
|
dlp = dlopen (ldname, RTLD_LAZY|RTLD_GLOBAL);
|
||||||
|
|
||||||
|
/* Still no? Then fail. */
|
||||||
|
if (! dlp)
|
||||||
|
{
|
||||||
|
const char *err = dlerror ();
|
||||||
|
if (noerror)
|
||||||
|
DB (DB_BASIC, ("%s", err));
|
||||||
|
else
|
||||||
|
OS (error, flocp, "%s", err);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Assert that the GPL license symbol is defined. */
|
||||||
|
symp = (load_func_t) dlsym (dlp, "plugin_is_GPL_compatible");
|
||||||
|
if (! symp)
|
||||||
|
OS (fatal, flocp,
|
||||||
|
_("Loaded object %s is not declared to be GPL compatible"),
|
||||||
|
ldname);
|
||||||
|
|
||||||
|
symp = (load_func_t) dlsym (dlp, symname);
|
||||||
|
if (! symp)
|
||||||
|
{
|
||||||
|
const char *err = dlerror ();
|
||||||
|
OSSS (fatal, flocp, _("Failed to load symbol %s from %s: %s"),
|
||||||
|
symname, ldname, err);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add this symbol to a trivial lookup table. This is not efficient but
|
||||||
|
it's highly unlikely we'll be loading lots of objects, and we only
|
||||||
|
need it to look them up on unload, if we rebuild them. */
|
||||||
|
new = xmalloc (sizeof (struct load_list));
|
||||||
|
new->name = xstrdup (ldname);
|
||||||
|
new->dlp = dlp;
|
||||||
|
new->next = loaded_syms;
|
||||||
|
loaded_syms = new;
|
||||||
|
}
|
||||||
|
|
||||||
|
return symp;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
load_file (const gmk_floc *flocp, const char **ldname, int noerror)
|
||||||
|
{
|
||||||
|
int nmlen = strlen (*ldname);
|
||||||
|
char *new = alloca (nmlen + CSTRLEN (SYMBOL_EXTENSION) + 1);
|
||||||
|
char *symname = NULL;
|
||||||
|
char *loaded;
|
||||||
|
const char *fp;
|
||||||
|
int r;
|
||||||
|
load_func_t symp;
|
||||||
|
|
||||||
|
/* Break the input into an object file name and a symbol name. If no symbol
|
||||||
|
name was provided, compute one from the object file name. */
|
||||||
|
fp = strchr (*ldname, '(');
|
||||||
|
if (fp)
|
||||||
|
{
|
||||||
|
const char *ep;
|
||||||
|
|
||||||
|
/* There's an open paren, so see if there's a close paren: if so use
|
||||||
|
that as the symbol name. We can't have whitespace: it would have
|
||||||
|
been chopped up before this function is called. */
|
||||||
|
ep = strchr (fp+1, ')');
|
||||||
|
if (ep && ep[1] == '\0')
|
||||||
|
{
|
||||||
|
int l = fp - *ldname;;
|
||||||
|
|
||||||
|
++fp;
|
||||||
|
if (fp == ep)
|
||||||
|
OS (fatal, flocp, _("Empty symbol name for load: %s"), *ldname);
|
||||||
|
|
||||||
|
/* Make a copy of the ldname part. */
|
||||||
|
memcpy (new, *ldname, l);
|
||||||
|
new[l] = '\0';
|
||||||
|
*ldname = new;
|
||||||
|
nmlen = l;
|
||||||
|
|
||||||
|
/* Make a copy of the symbol name part. */
|
||||||
|
symname = new + l + 1;
|
||||||
|
memcpy (symname, fp, ep - fp);
|
||||||
|
symname[ep - fp] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add this name to the string cache so it can be reused later. */
|
||||||
|
*ldname = strcache_add (*ldname);
|
||||||
|
|
||||||
|
/* If this object has been loaded, we're done. */
|
||||||
|
loaded = allocated_variable_expand ("$(.LOADED)");
|
||||||
|
fp = strstr (loaded, *ldname);
|
||||||
|
r = fp && (fp==loaded || fp[-1]==' ') && (fp[nmlen]=='\0' || fp[nmlen]==' ');
|
||||||
|
if (r)
|
||||||
|
goto exit;
|
||||||
|
|
||||||
|
/* If we didn't find a symbol name yet, construct it from the ldname. */
|
||||||
|
if (! symname)
|
||||||
|
{
|
||||||
|
char *p = new;
|
||||||
|
|
||||||
|
fp = strrchr (*ldname, '/');
|
||||||
|
#ifdef HAVE_DOS_PATHS
|
||||||
|
if (fp)
|
||||||
|
{
|
||||||
|
const char *fp2 = strchr (fp, '\\');
|
||||||
|
|
||||||
|
if (fp2 > fp)
|
||||||
|
fp = fp2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fp = strrchr (*ldname, '\\');
|
||||||
|
/* The (improbable) case of d:foo. */
|
||||||
|
if (fp && *fp && fp[1] == ':')
|
||||||
|
fp++;
|
||||||
|
#endif
|
||||||
|
if (!fp)
|
||||||
|
fp = *ldname;
|
||||||
|
else
|
||||||
|
++fp;
|
||||||
|
while (isalnum (*fp) || *fp == '_')
|
||||||
|
*(p++) = *(fp++);
|
||||||
|
strcpy (p, SYMBOL_EXTENSION);
|
||||||
|
symname = new;
|
||||||
|
}
|
||||||
|
|
||||||
|
DB (DB_VERBOSE, (_("Loading symbol %s from %s\n"), symname, *ldname));
|
||||||
|
|
||||||
|
/* Load it! */
|
||||||
|
symp = load_object (flocp, noerror, *ldname, symname);
|
||||||
|
if (! symp)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Invoke the symbol. */
|
||||||
|
r = (*symp) (flocp);
|
||||||
|
|
||||||
|
/* If it succeeded, add the load file to the loaded variable. */
|
||||||
|
if (r > 0)
|
||||||
|
{
|
||||||
|
size_t loadlen = strlen (loaded);
|
||||||
|
char *newval = alloca (loadlen + strlen (*ldname) + 2);
|
||||||
|
/* Don't add a space if it's empty. */
|
||||||
|
if (loadlen)
|
||||||
|
{
|
||||||
|
memcpy (newval, loaded, loadlen);
|
||||||
|
newval[loadlen++] = ' ';
|
||||||
|
}
|
||||||
|
strcpy (&newval[loadlen], *ldname);
|
||||||
|
do_variable_definition (flocp, ".LOADED", newval, o_default, f_simple, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
exit:
|
||||||
|
free (loaded);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
unload_file (const char *name)
|
||||||
|
{
|
||||||
|
struct load_list *d;
|
||||||
|
|
||||||
|
for (d = loaded_syms; d != NULL; d = d->next)
|
||||||
|
if (streq (d->name, name) && d->dlp)
|
||||||
|
{
|
||||||
|
if (dlclose (d->dlp))
|
||||||
|
perror_with_name ("dlclose", d->name);
|
||||||
|
d->dlp = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int
|
||||||
|
load_file (const gmk_floc *flocp, const char **ldname UNUSED, int noerror)
|
||||||
|
{
|
||||||
|
if (! noerror)
|
||||||
|
O (fatal, flocp,
|
||||||
|
_("The 'load' operation is not supported on this platform."));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
unload_file (const char *name UNUSED)
|
||||||
|
{
|
||||||
|
O (fatal, NILF, "INTERNAL: Cannot unload when load is not supported!");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* MAKE_LOAD */
|
||||||
70
loadapi.c
Normal file
70
loadapi.c
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
/* API for GNU Make dynamic objects.
|
||||||
|
Copyright (C) 2013-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "variable.h"
|
||||||
|
#include "dep.h"
|
||||||
|
|
||||||
|
/* Allocate a buffer in our context, so we can free it. */
|
||||||
|
char *
|
||||||
|
gmk_alloc (unsigned int len)
|
||||||
|
{
|
||||||
|
return xmalloc (len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Free a buffer returned by gmk_expand(). */
|
||||||
|
void
|
||||||
|
gmk_free (char *s)
|
||||||
|
{
|
||||||
|
free (s);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Evaluate a buffer as make syntax.
|
||||||
|
Ideally eval_buffer() will take const char *, but not yet. */
|
||||||
|
void
|
||||||
|
gmk_eval (const char *buffer, const gmk_floc *floc)
|
||||||
|
{
|
||||||
|
/* Preserve existing variable buffer context. */
|
||||||
|
char *pbuf;
|
||||||
|
unsigned int plen;
|
||||||
|
char *s;
|
||||||
|
|
||||||
|
install_variable_buffer (&pbuf, &plen);
|
||||||
|
|
||||||
|
s = xstrdup (buffer);
|
||||||
|
eval_buffer (s, floc);
|
||||||
|
free (s);
|
||||||
|
|
||||||
|
restore_variable_buffer (pbuf, plen);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Expand a string and return an allocated buffer.
|
||||||
|
Caller must call gmk_free() with this buffer. */
|
||||||
|
char *
|
||||||
|
gmk_expand (const char *ref)
|
||||||
|
{
|
||||||
|
return allocated_variable_expand (ref);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Register a function to be called from makefiles. */
|
||||||
|
void
|
||||||
|
gmk_add_function (const char *name, gmk_func_ptr func,
|
||||||
|
unsigned int min, unsigned int max, unsigned int flags)
|
||||||
|
{
|
||||||
|
define_new_function (reading_file, name, min, max, flags, func);
|
||||||
|
}
|
||||||
31
loadtest.c
31
loadtest.c
@@ -1,31 +0,0 @@
|
|||||||
extern volatile void exit (int);
|
|
||||||
extern double load_average (void);
|
|
||||||
|
|
||||||
double max_load_average = -1;
|
|
||||||
unsigned int job_slots_used = 0;
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
printf ("load_average () = %.2f\n", load_average ());
|
|
||||||
exit (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
error (char *fmt, ...)
|
|
||||||
{
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
perror_with_name (char *a, char *b)
|
|
||||||
{
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
wait_for_children (int i)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
366
maintMakefile
366
maintMakefile
@@ -1,23 +1,47 @@
|
|||||||
# Maintainer-only makefile segment. This contains things that are relevant
|
# Maintainer-only makefile segment. This contains things that are relevant
|
||||||
# only if you have the full copy of the GNU make sources from the CVS
|
# only if you have the full copy of the GNU make sources from the Git
|
||||||
# tree, not a dist copy.
|
# tree, not a dist copy.
|
||||||
#
|
|
||||||
|
BUGLIST := bug-make@gnu.org
|
||||||
|
|
||||||
|
# These are related to my personal setup.
|
||||||
|
GPG_FINGERPRINT := 6338B6D4
|
||||||
|
|
||||||
|
# SRCROOTDIR is just a handy location to keep source files in
|
||||||
|
SRCROOTDIR ?= $(HOME)/src
|
||||||
|
|
||||||
|
# Where the gnulib project has been locally cloned
|
||||||
|
GNULIBDIR ?= $(SRCROOTDIR)/gnulib
|
||||||
|
|
||||||
|
# Where to put the CVS checkout of the GNU web repository
|
||||||
|
GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
|
||||||
|
|
||||||
|
# Where to put the CVS checkout of the GNU make web repository
|
||||||
|
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
|
||||||
|
|
||||||
|
# We like mondo-warnings!
|
||||||
|
AM_CFLAGS += -Wall -Wwrite-strings -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
|
||||||
|
|
||||||
|
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
|
||||||
|
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
||||||
|
|
||||||
|
# I want this one but I have to wait for the const cleanup!
|
||||||
|
# -Wwrite-strings
|
||||||
|
|
||||||
# Find the glob source files... this might be dangerous, but we're maintainers!
|
# Find the glob source files... this might be dangerous, but we're maintainers!
|
||||||
#
|
|
||||||
globsrc := $(wildcard glob/*.c)
|
globsrc := $(wildcard glob/*.c)
|
||||||
globhdr := $(wildcard glob/*.h)
|
globhdr := $(wildcard glob/*.h)
|
||||||
|
|
||||||
TEMPLATES = README README.DOS README.W32 \
|
TEMPLATES = README README.DOS README.W32 README.OS2 \
|
||||||
config.ami configh.dos config.h.W32 config.h-vms
|
config.ami configh.dos config.h.W32 config.h-vms
|
||||||
MTEMPLATES = Makefile.DOS SMakefile
|
MTEMPLATES = Makefile.DOS SMakefile
|
||||||
|
|
||||||
all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
|
# These are built as a side-effect of the dist rule
|
||||||
|
#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
|
||||||
|
|
||||||
# We need this to ensure that README and build.sh.in are created on time to
|
# Create preprocessor output files--GCC specific!
|
||||||
# avoid errors by automake.
|
%.i : %.c
|
||||||
#
|
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
|
||||||
#Makefile.in: README build.sh.in
|
|
||||||
|
|
||||||
# General rule for turning a .template into a regular file.
|
# General rule for turning a .template into a regular file.
|
||||||
#
|
#
|
||||||
@@ -54,8 +78,8 @@ NMakefile: NMakefile.template .dep_segment Makefile
|
|||||||
#
|
#
|
||||||
build.sh.in: build.template Makefile
|
build.sh.in: build.template Makefile
|
||||||
rm -f $@
|
rm -f $@
|
||||||
sed -e 's@%objs%@$(filter-out remote-%,$(make_OBJECTS)@g' \
|
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
|
||||||
-e 's@%globobjs%@$(patsubst %.c,%.o,$(globsrc)))@g' \
|
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
|
||||||
$< > $@
|
$< > $@
|
||||||
chmod a-w+x $@
|
chmod a-w+x $@
|
||||||
|
|
||||||
@@ -66,127 +90,128 @@ build.sh.in: build.template Makefile
|
|||||||
# Automake used to have a --generate-deps flag, but it's gone now, so we have
|
# Automake used to have a --generate-deps flag, but it's gone now, so we have
|
||||||
# to do it ourselves.
|
# to do it ourselves.
|
||||||
#
|
#
|
||||||
|
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
|
||||||
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
||||||
cat $(DEP_FILES) \
|
rm -f $@
|
||||||
| sed -e '/^[^:]*\.[ch] *:/d' \
|
(for f in $(DEPDIR)/*.Po; do \
|
||||||
|
echo ""; \
|
||||||
|
echo "# $$f"; \
|
||||||
|
sed -e '/^[^:]*\.[ch] *:/d' \
|
||||||
-e 's, /usr/[^ ]*,,g' \
|
-e 's, /usr/[^ ]*,,g' \
|
||||||
-e 's, $(srcdir)/, ,g' \
|
-e 's, $(srcdir)/, ,g' \
|
||||||
-e '/^ \\$$/d' \
|
-e '/^ *\\$$/d' \
|
||||||
> $@
|
-e '/^ *$$/d' \
|
||||||
|
< $$f; \
|
||||||
|
done) > $@
|
||||||
|
|
||||||
# Get rid of everything "else".
|
# Cleaning
|
||||||
#
|
|
||||||
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
|
|
||||||
|
|
||||||
CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
|
GIT := git
|
||||||
missing build.sh.in .dep_segment
|
|
||||||
|
|
||||||
# This rule tries to clean the tree right down to how it looks when you do a
|
# git-clean: Clean all "ignored" files. Leave untracked files.
|
||||||
# virgin CVS checkout.
|
# git-very-clean: Clean all files that aren't stored in source control.
|
||||||
|
|
||||||
.PHONY: cvs-clean
|
.PHONY: git-clean git-very-clean
|
||||||
cvs-clean: maintainer-clean
|
git-clean:
|
||||||
-rm -f *~
|
-$(GIT) clean -fdX
|
||||||
-rm -f config/*~ config/Makefile.in config/[a-z]*
|
git-very-clean: git-clean
|
||||||
-rm -f po/*~ po/Makefile.in.in po/Rules-quot po/[a-z]*
|
-$(GIT) clean -fd
|
||||||
-rm -f doc/*~ doc/Makefile.in doc/fdl.texi doc/make-stds.texi \
|
|
||||||
doc/texinfo.tex
|
|
||||||
-rm -f glob/*~ glob/Makefile.in
|
|
||||||
-rm -f ABOUT-NLS $(CVS-CLEAN-FILES)
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
#
|
## ---------------------- ##
|
||||||
# The sections below were stolen from the Makefile.maint used by fileutils,
|
## Generating ChangeLog. ##
|
||||||
# sh-utils, textutils, CPPI, Bison, and Autoconf.
|
## ---------------------- ##
|
||||||
|
|
||||||
|
gl2cl-date := 2013-10-10
|
||||||
|
gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog
|
||||||
|
|
||||||
|
# Rebuild the changelog whenever a new commit is added
|
||||||
|
ChangeLog: .check-git-HEAD
|
||||||
|
if test -f '$(gl2cl)'; then \
|
||||||
|
'$(gl2cl)' --since='$(gl2cl-date)' > '$@'; \
|
||||||
|
else \
|
||||||
|
echo "WARNING: $(gl2cl) is not available. No $@ generated."; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
.PHONY: .check-git-HEAD
|
||||||
|
.check-git-HEAD:
|
||||||
|
sha="`git rev-parse HEAD`"; \
|
||||||
|
[ -f '$@' ] && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
|
||||||
|
|| echo "$$sha" > '$@'
|
||||||
|
|
||||||
|
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
## Updating files. ##
|
## Updating files. ##
|
||||||
## ---------------- ##
|
## ---------------- ##
|
||||||
|
|
||||||
WGET = wget --passive-ftp --non-verbose
|
WGET = wget --passive-ftp -np -nv
|
||||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||||
|
|
||||||
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
||||||
echo $(target) is unchanged; rm -f $(target).t; \
|
echo $(target) is unchanged; rm -f $(target).t; \
|
||||||
else \
|
else \
|
||||||
mv $(target).t $(target); \
|
mv -f $(target).t $(target); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ------------------- #
|
# ------------------- #
|
||||||
# Updating PO files. #
|
# Updating PO files. #
|
||||||
# ------------------- #
|
# ------------------- #
|
||||||
|
|
||||||
po_repo = http://www.iro.umontreal.ca/contrib/po/maint/$(PACKAGE)
|
# PO archive mirrors --- Be careful; some might not be fully populated!
|
||||||
|
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
|
||||||
|
# http://translation.sf.net/maint/
|
||||||
|
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
||||||
|
|
||||||
|
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
||||||
|
po_repo = http://translationproject.org/latest/$(PACKAGE)
|
||||||
.PHONY: do-po-update po-update
|
.PHONY: do-po-update po-update
|
||||||
do-po-update:
|
do-po-update:
|
||||||
tmppo=/tmp/$(PACKAGE)-$(VERSION)-po &&\
|
tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
|
||||||
rm -rf $$tmppo && \
|
&& rm -rf "$$tmppo" \
|
||||||
mkdir $$tmppo && \
|
&& mkdir "$$tmppo" \
|
||||||
(cd $$tmppo && $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) &&\
|
&& (cd "$$tmppo" \
|
||||||
cp $$tmppo/*.po po
|
&& $(WGET) $(po_wget_flags) -A '*.po' $(po_repo)) \
|
||||||
|
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
|
||||||
|
&& rm -rf "$$tmppo"
|
||||||
cd po && $(MAKE) update-po
|
cd po && $(MAKE) update-po
|
||||||
$(MAKE) po-check
|
$(MAKE) po-check
|
||||||
|
|
||||||
po-update:
|
po-update:
|
||||||
if test -d "po"; then \
|
[ -d "po" ] && $(MAKE) do-po-update
|
||||||
$(MAKE) do-po-update; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -------------------------- #
|
# -------------------------- #
|
||||||
# Updating GNU build tools. #
|
# Updating GNU build files. #
|
||||||
# -------------------------- #
|
# -------------------------- #
|
||||||
|
|
||||||
# The following pseudo table associates a local directory and a URL
|
# The following pseudo table associates a local directory and a URL
|
||||||
# with each of the files that belongs to some other package and is
|
# with each of the files that belongs to some other package and is
|
||||||
# regularly updated from the specified URL.
|
# regularly updated from the specified URL.
|
||||||
# $(srcdir)/src/ansi2knr.c
|
|
||||||
|
|
||||||
|
|
||||||
wget_files ?= $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
|
|
||||||
$(srcdir)/doc/texinfo.tex $(srcdir)/doc/make-stds.texi \
|
|
||||||
$(srcdir)/doc/fdl.texi
|
|
||||||
|
|
||||||
wget-targets = $(patsubst %, get-%, $(wget_files))
|
|
||||||
|
|
||||||
config.guess-url_prefix = $(ftp-gnu)/config/
|
|
||||||
config.sub-url_prefix = $(ftp-gnu)/config/
|
|
||||||
|
|
||||||
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
|
||||||
|
|
||||||
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
|
|
||||||
|
|
||||||
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
|
||||||
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
|
||||||
fdl.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
|
||||||
|
|
||||||
|
cvs-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||||
|
git-url = http://git.savannah.gnu.org/cgit
|
||||||
target = $(patsubst get-%,%,$@)
|
target = $(patsubst get-%,%,$@)
|
||||||
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
|
|
||||||
|
|
||||||
.PHONY: $(wget-targets)
|
config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
|
||||||
$(wget-targets):
|
get-config/config.guess get-config/config.sub:
|
||||||
@echo $(WGET) $(url) -O $(target) \
|
@echo $(WGET) $(config-url) -O $(target) \
|
||||||
&& $(WGET) $(url) -O $(target).t \
|
&& $(WGET) $(config-url) -O $(target).t \
|
||||||
&& $(move_if_change)
|
&& $(move_if_change)
|
||||||
|
|
||||||
.PHONY: wget-update
|
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-config/%,%,$@)
|
||||||
wget-update: $(wget-targets)
|
get-config/texinfo.tex:
|
||||||
|
@echo $(WGET) $(gnulib-url) -O $(target) \
|
||||||
|
&& $(WGET) $(gnulib-url) -O $(target).t \
|
||||||
# Updating tools via CVS.
|
|
||||||
cvs_files ?= depcomp missing
|
|
||||||
cvs-targets = $(patsubst %, get-%, $(cvs_files))
|
|
||||||
|
|
||||||
automake_repo = :pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake
|
|
||||||
.PHONY: $(cvs-targets)
|
|
||||||
$(cvs-targets):
|
|
||||||
$(CVS) -d $(automake_repo) co -p automake/lib/$(notdir $(target)) \
|
|
||||||
>$(target).t \
|
|
||||||
&& $(move_if_change)
|
&& $(move_if_change)
|
||||||
|
|
||||||
.PHONY: cvs-update
|
gnustandards-url = $(cvs-url)/gnustandards/gnustandards/$(patsubst get-doc/%,%,$@)
|
||||||
cvs-update: $(cvs-targets)
|
get-doc/make-stds.texi get-doc/fdl.texi:
|
||||||
|
@echo $(WGET) $(gnustandards-url) -O $(target) \
|
||||||
|
&& $(WGET) $(gnustandards-url) -O $(target).t \
|
||||||
|
&& $(move_if_change)
|
||||||
|
|
||||||
|
.PHONY: scm-update
|
||||||
|
scm-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub get-doc/make-stds.texi get-doc/fdl.texi
|
||||||
|
|
||||||
|
|
||||||
# --------------------- #
|
# --------------------- #
|
||||||
@@ -194,23 +219,59 @@ cvs-update: $(cvs-targets)
|
|||||||
# --------------------- #
|
# --------------------- #
|
||||||
|
|
||||||
.PHONY: update
|
.PHONY: update
|
||||||
update: wget-update po-update
|
update: po-update scm-update
|
||||||
|
|
||||||
# cvs-update
|
|
||||||
|
# ---------------------------------- #
|
||||||
|
# Alternative configuration checks. #
|
||||||
|
# ---------------------------------- #
|
||||||
|
|
||||||
|
.PHONY: check-alt-config
|
||||||
|
check-alt-config: \
|
||||||
|
checkcfg.--disable-job-server \
|
||||||
|
checkcfg.--disable-load \
|
||||||
|
checkcfg.--without-guile \
|
||||||
|
checkcfg.CPPFLAGS^-DNO_OUTPUT_SYNC \
|
||||||
|
checkcfg.CPPFLAGS^-DNO_ARCHIVES
|
||||||
|
|
||||||
|
# Trick GNU make so it doesn't run the submake as a recursive make.
|
||||||
|
NR_MAKE = $(MAKE)
|
||||||
|
|
||||||
|
# Check builds both with build.sh and with make
|
||||||
|
checkcfg.%: distdir
|
||||||
|
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||||
|
@exec >'checkcfg.$*.log' 2>&1; \
|
||||||
|
rm -rf $(distdir)/_build \
|
||||||
|
&& mkdir $(distdir)/_build \
|
||||||
|
&& cd $(distdir)/_build \
|
||||||
|
&& echo "Testing configure with $(subst ^,=,$*)" \
|
||||||
|
&& ../configure --srcdir=.. $(subst ^,=,$*) \
|
||||||
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
CFLAGS='$(AM_CFLAGS)' \
|
||||||
|
&& ./build.sh \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) check \
|
||||||
|
&& rm -f *.o make \
|
||||||
|
&& $(NR_MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& ./make $(AM_MAKEFLAGS) check
|
||||||
|
|
||||||
|
|
||||||
## --------------- ##
|
## --------------- ##
|
||||||
## Sanity checks. ##
|
## Sanity checks. ##
|
||||||
## --------------- ##
|
## --------------- ##
|
||||||
|
|
||||||
# Checks that don't require cvs. Run `changelog-check' last as
|
# Before we build a distribution be sure we run our local checks
|
||||||
|
#distdir: local-check
|
||||||
|
|
||||||
|
.PHONY: local-check po-check changelog-check
|
||||||
|
|
||||||
|
# Checks that don't require Git. Run 'changelog-check' last as
|
||||||
# previous test may reveal problems requiring new ChangeLog entries.
|
# previous test may reveal problems requiring new ChangeLog entries.
|
||||||
local-check: po-check changelog-check
|
local-check: po-check changelog-check
|
||||||
|
|
||||||
# copyright-check writable-files
|
# copyright-check writable-files
|
||||||
|
|
||||||
changelog-check:
|
changelog-check:
|
||||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
if head $(top_srcdir)/ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||||
:; \
|
:; \
|
||||||
else \
|
else \
|
||||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||||
@@ -218,10 +279,131 @@ changelog-check:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||||
|
# Ignore makeint.h; it defines _().
|
||||||
po-check:
|
po-check:
|
||||||
if test -f po/POTFILES.in; then \
|
if test -f po/POTFILES.in; then \
|
||||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||||
grep -E -l '\b_\(' *.c | sort > $@-2; \
|
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "./makeint.h" || print "$$ARGV\n" and close ARGV }' `find . -name '*.[ch]'` | sed 's,^\./,,' | sort > $@-2; \
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
diff -u $@-1 $@-2 || exit 1; \
|
||||||
rm -f $@-1 $@-2; \
|
rm -f $@-1 $@-2; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
## --------------- ##
|
||||||
|
## Generate docs. ##
|
||||||
|
## --------------- ##
|
||||||
|
|
||||||
|
.PHONY: update-makeweb gendocs
|
||||||
|
|
||||||
|
CVS = cvs
|
||||||
|
|
||||||
|
makeweb-repo = $(USER)@cvs.sv.gnu.org:/web/make
|
||||||
|
gnuweb-repo = :pserver:anonymous@cvs.sv.gnu.org:/web/www
|
||||||
|
gnuweb-dir = www/server/standards
|
||||||
|
|
||||||
|
# Get the GNU make web page boilerplate etc.
|
||||||
|
update-makeweb:
|
||||||
|
[ -d '$(MAKEWEBDIR)' ] || mkdir -p '$(MAKEWEBDIR)'
|
||||||
|
[ -d '$(MAKEWEBDIR)'/CVS ] \
|
||||||
|
&& { cd '$(MAKEWEBDIR)' && $(CVS) update; } \
|
||||||
|
|| { mkdir -p '$(dir $(MAKEWEBDIR))' && cd '$(dir $(MAKEWEBDIR))' \
|
||||||
|
&& $(CVS) -d $(makeweb-repo) co -d '$(notdir $(MAKEWEBDIR))' make; }
|
||||||
|
|
||||||
|
# Get the GNU web page boilerplate etc.
|
||||||
|
update-gnuweb:
|
||||||
|
[ -d '$(GNUWEBDIR)' ] || mkdir -p '$(GNUWEBDIR)'
|
||||||
|
[ -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS ] \
|
||||||
|
&& { cd '$(GNUWEBDIR)/$(gnuweb-dir)' && $(CVS) update; } \
|
||||||
|
|| { cd '$(GNUWEBDIR)' && $(CVS) -d $(gnuweb-repo) co '$(gnuweb-dir)'; }
|
||||||
|
|
||||||
|
gendocs: update-gnuweb update-makeweb
|
||||||
|
cp $(GNULIBDIR)/doc/gendocs_template doc
|
||||||
|
cd doc \
|
||||||
|
&& rm -rf doc/manual \
|
||||||
|
&& $(GNULIBDIR)/build-aux/gendocs.sh --email '$(BUGLIST)' \
|
||||||
|
make 'GNU Make Manual'
|
||||||
|
find '$(MAKEWEBDIR)'/manual \( -name CVS -prune \) -o \( -name '[!.]*' -type f -exec rm -f '{}' \; \)
|
||||||
|
cp -r doc/manual '$(MAKEWEBDIR)'
|
||||||
|
@echo 'Status of $(MAKEWEBDIR) repo:' && cd '$(MAKEWEBDIR)' \
|
||||||
|
&& cvs -q -n update | grep -v '^M ' \
|
||||||
|
&& echo '- cvs add <new files>' \
|
||||||
|
&& echo '- cvs remove <deleted files>' \
|
||||||
|
&& echo '- cvs commit' \
|
||||||
|
&& echo '- cvs tag make-$(subst .,-,$(VERSION))'
|
||||||
|
|
||||||
|
## ------------------------- ##
|
||||||
|
## Make release targets. ##
|
||||||
|
## ------------------------- ##
|
||||||
|
|
||||||
|
.PHONY: tag-release
|
||||||
|
tag-release:
|
||||||
|
case '$(VERSION)' in \
|
||||||
|
(*.*.9*) message=" candidate" ;; \
|
||||||
|
(*) message= ;; \
|
||||||
|
esac; \
|
||||||
|
$(GIT) tag -m "GNU Make release$$message $(VERSION)" -u '$(GPG_FINGERPRINT)' '$(VERSION)'
|
||||||
|
|
||||||
|
## ------------------------- ##
|
||||||
|
## GNU FTP upload artifacts. ##
|
||||||
|
## ------------------------- ##
|
||||||
|
|
||||||
|
# This target creates the upload artifacts.
|
||||||
|
# Sign it with my key. If you don't have my key/passphrase then sorry,
|
||||||
|
# you're SOL! :)
|
||||||
|
|
||||||
|
GPG = gpg
|
||||||
|
GPGFLAGS = -u $(GPG_FINGERPRINT)
|
||||||
|
|
||||||
|
DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
|
||||||
|
DIST_ARCHIVES_DIRECTIVE = $(addsuffix .directive.asc,$(DIST_ARCHIVES))
|
||||||
|
|
||||||
|
# A simple rule to test signing, etc.
|
||||||
|
.PHONY: distsign
|
||||||
|
distsign: $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
|
||||||
|
|
||||||
|
%.sig : %
|
||||||
|
@echo "Signing file '$<':"
|
||||||
|
$(GPG) $(GPGFLAGS) -o "$@" -b "$<"
|
||||||
|
|
||||||
|
%.directive.asc: %
|
||||||
|
@echo "Creating directive file '$@':"
|
||||||
|
@( \
|
||||||
|
echo 'version: 1.1'; \
|
||||||
|
echo 'directory: make'; \
|
||||||
|
echo 'filename: $*'; \
|
||||||
|
echo 'comment: Official upload of GNU make version $(VERSION)'; \
|
||||||
|
) > "$*.directive"
|
||||||
|
$(GPG) $(GPGFLAGS) -o "$@" --clearsign "$*.directive"
|
||||||
|
@rm -f "$*.directive"
|
||||||
|
|
||||||
|
# Upload the artifacts
|
||||||
|
|
||||||
|
FTPPUT = ncftpput
|
||||||
|
gnu-upload-host = ftp-upload.gnu.org
|
||||||
|
gnu-upload-dir = /incoming
|
||||||
|
|
||||||
|
|
||||||
|
UPLOADS = upload-alpha upload-ftp
|
||||||
|
.PHONY: $(UPLOADS)
|
||||||
|
$(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
|
||||||
|
$(FTPPUT) "$(gnu-upload-host)" "$(gnu-upload-dir)/$(@:upload-%=%)" $^
|
||||||
|
|
||||||
|
|
||||||
|
# Rebuild Makefile.in if this file is modifed.
|
||||||
|
Makefile.in: maintMakefile
|
||||||
|
|
||||||
|
# Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
282
make.1
282
make.1
@@ -1,49 +1,35 @@
|
|||||||
.TH MAKE 1L "22 August 1989" "GNU" "LOCAL USER COMMANDS"
|
.TH MAKE 1 "28 February 2016" "GNU" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
make \- GNU make utility to maintain groups of programs
|
make \- GNU make utility to maintain groups of programs
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B "make "
|
.B make
|
||||||
[
|
[\fIOPTION\fR]... [\fITARGET\fR]...
|
||||||
.B \-f
|
|
||||||
.I makefile
|
|
||||||
] [ option ] ...
|
|
||||||
target ...
|
|
||||||
.SH WARNING
|
|
||||||
This man page is an extract of the documentation of
|
|
||||||
.I GNU make .
|
|
||||||
It is updated only occasionally, because the GNU project does not use nroff.
|
|
||||||
For complete, current documentation, refer to the Info file
|
|
||||||
.B make.info
|
|
||||||
which is made from the Texinfo source file
|
|
||||||
.BR make.texinfo .
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.LP
|
.LP
|
||||||
The purpose of the
|
The
|
||||||
.I make
|
.I make
|
||||||
utility is to determine automatically which
|
utility will determine automatically which pieces of a large program need to
|
||||||
pieces of a large program need to be recompiled, and issue the commands to
|
be recompiled, and issue the commands to recompile them. The manual describes
|
||||||
recompile them.
|
the GNU implementation of
|
||||||
The manual describes the GNU implementation of
|
.BR make ,
|
||||||
.IR make ,
|
which was written by Richard Stallman and Roland McGrath, and is currently
|
||||||
which was written by Richard Stallman and Roland McGrath.
|
maintained by Paul Smith. Our examples show C programs, since they are very
|
||||||
Our examples show C programs, since they are most common, but you can use
|
common, but you can use
|
||||||
.I make
|
.B make
|
||||||
with any programming language whose compiler can be run with a
|
with any programming language whose compiler can be run with a shell command.
|
||||||
shell command.
|
|
||||||
In fact,
|
In fact,
|
||||||
.I make
|
.B make
|
||||||
is not limited to programs.
|
is not limited to programs. You can use it to describe any task where some
|
||||||
You can use it to describe any task where some files must be
|
files must be updated automatically from others whenever the others change.
|
||||||
updated automatically from others whenever the others change.
|
|
||||||
.LP
|
.LP
|
||||||
To prepare to use
|
To prepare to use
|
||||||
.IR make ,
|
.BR make ,
|
||||||
you must write a file called the
|
you must write a file called the
|
||||||
.I makefile
|
.I makefile
|
||||||
that describes the relationships among files in your program, and the
|
that describes the relationships among files in your program, and the states
|
||||||
states the commands for updating each file.
|
the commands for updating each file. In a program, typically the executable
|
||||||
In a program, typically the executable file is updated from object
|
file is updated from object files, which are in turn made by compiling source
|
||||||
files, which are in turn made by compiling source files.
|
files.
|
||||||
.LP
|
.LP
|
||||||
Once a suitable makefile exists, each time you change some source files,
|
Once a suitable makefile exists, each time you change some source files,
|
||||||
this simple shell command:
|
this simple shell command:
|
||||||
@@ -54,16 +40,15 @@ this simple shell command:
|
|||||||
.sp 1
|
.sp 1
|
||||||
suffices to perform all necessary recompilations.
|
suffices to perform all necessary recompilations.
|
||||||
The
|
The
|
||||||
.I make
|
.B make
|
||||||
program uses the makefile data base and the last-modification times
|
program uses the makefile description and the last-modification times of the
|
||||||
of the files to decide which of the files need to be updated.
|
files to decide which of the files need to be updated. For each of those
|
||||||
For each of those files, it issues the commands recorded in the data base.
|
files, it issues the commands recorded in the makefile.
|
||||||
.LP
|
.LP
|
||||||
.I make
|
.B make
|
||||||
executes commands in the
|
executes commands in the
|
||||||
.I makefile
|
.I makefile
|
||||||
to update
|
to update one or more target
|
||||||
one or more target
|
|
||||||
.IR names ,
|
.IR names ,
|
||||||
where
|
where
|
||||||
.I name
|
.I name
|
||||||
@@ -71,7 +56,7 @@ is typically a program.
|
|||||||
If no
|
If no
|
||||||
.B \-f
|
.B \-f
|
||||||
option is present,
|
option is present,
|
||||||
.I make
|
.B make
|
||||||
will look for the makefiles
|
will look for the makefiles
|
||||||
.IR GNUmakefile ,
|
.IR GNUmakefile ,
|
||||||
.IR makefile ,
|
.IR makefile ,
|
||||||
@@ -90,29 +75,30 @@ listing, right near other important files such as
|
|||||||
.IR README .)
|
.IR README .)
|
||||||
The first name checked,
|
The first name checked,
|
||||||
.IR GNUmakefile ,
|
.IR GNUmakefile ,
|
||||||
is not recommended for most makefiles.
|
is not recommended for most makefiles. You should use this name if you have a
|
||||||
You should use this name if you have a makefile that is specific to GNU
|
makefile that is specific to GNU
|
||||||
.IR make ,
|
.BR make ,
|
||||||
and will not be understood by other versions of
|
and will not be understood by other versions of
|
||||||
.IR make .
|
.BR make .
|
||||||
If
|
If
|
||||||
.I makefile
|
.I makefile
|
||||||
is `\-', the standard input is read.
|
is '\-', the standard input is read.
|
||||||
.LP
|
.LP
|
||||||
.I make
|
.B make
|
||||||
updates a target if it depends on prerequisite files
|
updates a target if it depends on prerequisite files
|
||||||
that have been modified since the target was last modified,
|
that have been modified since the target was last modified,
|
||||||
or if the target does not exist.
|
or if the target does not exist.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.sp 1
|
.sp 1
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-b
|
\fB\-b\fR, \fB\-m\fR
|
||||||
.TP 0.5i
|
|
||||||
.B \-m
|
|
||||||
These options are ignored for compatibility with other versions of
|
These options are ignored for compatibility with other versions of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-C " dir
|
\fB\-B\fR, \fB\-\-always\-make\fR
|
||||||
|
Unconditionally make all targets.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
|
||||||
Change to directory
|
Change to directory
|
||||||
.I dir
|
.I dir
|
||||||
before reading the makefiles or doing anything else.
|
before reading the makefiles or doing anything else.
|
||||||
@@ -125,7 +111,7 @@ previous one:
|
|||||||
is equivalent to
|
is equivalent to
|
||||||
.BR "\-C " /etc.
|
.BR "\-C " /etc.
|
||||||
This is typically used with recursive invocations of
|
This is typically used with recursive invocations of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-d
|
.B \-d
|
||||||
Print debugging information in addition to normal processing.
|
Print debugging information in addition to normal processing.
|
||||||
@@ -133,22 +119,47 @@ The debugging information says which files are being considered for
|
|||||||
remaking, which file-times are being compared and with what results,
|
remaking, which file-times are being compared and with what results,
|
||||||
which files actually need to be remade, which implicit rules are
|
which files actually need to be remade, which implicit rules are
|
||||||
considered and which are applied---everything interesting about how
|
considered and which are applied---everything interesting about how
|
||||||
.I make
|
.B make
|
||||||
decides what to do.
|
decides what to do.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-e
|
.BI \-\-debug "[=FLAGS]"
|
||||||
|
Print debugging information in addition to normal processing.
|
||||||
|
If the
|
||||||
|
.I FLAGS
|
||||||
|
are omitted, then the behavior is the same as if
|
||||||
|
.B \-d
|
||||||
|
was specified.
|
||||||
|
.I FLAGS
|
||||||
|
may be
|
||||||
|
.I a
|
||||||
|
for all debugging output (same as using
|
||||||
|
.BR \-d ),
|
||||||
|
.I b
|
||||||
|
for basic debugging,
|
||||||
|
.I v
|
||||||
|
for more verbose basic debugging,
|
||||||
|
.I i
|
||||||
|
for showing implicit rules,
|
||||||
|
.I j
|
||||||
|
for details on invocation of commands, and
|
||||||
|
.I m
|
||||||
|
for debugging while remaking makefiles. Use
|
||||||
|
.I n
|
||||||
|
to disable all previous debugging flags.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-e\fR, \fB\-\-environment\-overrides\fR
|
||||||
Give variables taken from the environment precedence
|
Give variables taken from the environment precedence
|
||||||
over variables from makefiles.
|
over variables from makefiles.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-f " file
|
\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
|
||||||
Use
|
Use
|
||||||
.I file
|
.I file
|
||||||
as a makefile.
|
as a makefile.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-i
|
\fB\-i\fR, \fB\-\-ignore\-errors\fR
|
||||||
Ignore all errors in commands executed to remake files.
|
Ignore all errors in commands executed to remake files.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-I " dir
|
\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
|
||||||
Specifies a directory
|
Specifies a directory
|
||||||
.I dir
|
.I dir
|
||||||
to search for included makefiles.
|
to search for included makefiles.
|
||||||
@@ -157,48 +168,53 @@ If several
|
|||||||
options are used to specify several directories, the directories are
|
options are used to specify several directories, the directories are
|
||||||
searched in the order specified.
|
searched in the order specified.
|
||||||
Unlike the arguments to other flags of
|
Unlike the arguments to other flags of
|
||||||
.IR make ,
|
.BR make ,
|
||||||
directories given with
|
directories given with
|
||||||
.B \-I
|
.B \-I
|
||||||
flags may come directly after the flag:
|
flags may come directly after the flag:
|
||||||
.BI \-I dir
|
.BI \-I dir
|
||||||
is allowed, as well as
|
is allowed, as well as
|
||||||
.BI "\-I " dir.
|
.B \-I
|
||||||
|
.IR dir .
|
||||||
This syntax is allowed for compatibility with the C
|
This syntax is allowed for compatibility with the C
|
||||||
preprocessor's
|
preprocessor's
|
||||||
.B \-I
|
.B \-I
|
||||||
flag.
|
flag.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-j " jobs
|
\fB\-j\fR [\fIjobs\fR], \fB\-\-jobs\fR[=\fIjobs\fR]
|
||||||
Specifies the number of jobs (commands) to run simultaneously.
|
Specifies the number of
|
||||||
|
.I jobs
|
||||||
|
(commands) to run simultaneously.
|
||||||
If there is more than one
|
If there is more than one
|
||||||
.B \-j
|
.B \-j
|
||||||
option, the last one is effective.
|
option, the last one is effective.
|
||||||
If the
|
If the
|
||||||
.B \-j
|
.B \-j
|
||||||
option is given without an argument,
|
option is given without an argument,
|
||||||
.IR make
|
.BR make
|
||||||
will not limit the number of jobs that can run simultaneously.
|
will not limit the number of jobs that can run simultaneously.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-k
|
\fB\-k\fR, \fB\-\-keep\-going\fR
|
||||||
Continue as much as possible after an error.
|
Continue as much as possible after an error.
|
||||||
While the target that failed, and those that depend on it, cannot
|
While the target that failed, and those that depend on it, cannot
|
||||||
be remade, the other dependencies of these targets can be processed
|
be remade, the other dependencies of these targets can be processed
|
||||||
all the same.
|
all the same.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-l
|
\fB\-l\fR [\fIload\fR], \fB\-\-load\-average\fR[=\fIload\fR]
|
||||||
.TP 0.5i
|
|
||||||
.BI "\-l " load
|
|
||||||
Specifies that no new jobs (commands) should be started if there are
|
Specifies that no new jobs (commands) should be started if there are
|
||||||
others jobs running and the load average is at least
|
others jobs running and the load average is at least
|
||||||
.I load
|
.I load
|
||||||
(a floating-point number).
|
(a floating-point number).
|
||||||
With no argument, removes a previous load limit.
|
With no argument, removes a previous load limit.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-n
|
\fB\-L\fR, \fB\-\-check\-symlink\-times\fR
|
||||||
Print the commands that would be executed, but do not execute them.
|
Use the latest mtime between symlinks and target.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-o " file
|
\fB\-n\fR, \fB\-\-just\-print\fR, \fB\-\-dry\-run\fR, \fB\-\-recon\fR
|
||||||
|
Print the commands that would be executed, but do not execute them (except in
|
||||||
|
certain circumstances).
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR
|
||||||
Do not remake the file
|
Do not remake the file
|
||||||
.I file
|
.I file
|
||||||
even if it is older than its dependencies, and do not remake anything
|
even if it is older than its dependencies, and do not remake anything
|
||||||
@@ -206,7 +222,29 @@ on account of changes in
|
|||||||
.IR file .
|
.IR file .
|
||||||
Essentially the file is treated as very old and its rules are ignored.
|
Essentially the file is treated as very old and its rules are ignored.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-p
|
\fB\-O\fR[\fItype\fR], \fB\-\-output\-sync\fR[=\fItype\fR]
|
||||||
|
When running multiple jobs in parallel with \fB-j\fR, ensure the output of
|
||||||
|
each job is collected together rather than interspersed with output from
|
||||||
|
other jobs. If
|
||||||
|
.I type
|
||||||
|
is not specified or is
|
||||||
|
.B target
|
||||||
|
the output from the entire recipe for each target is grouped together. If
|
||||||
|
.I type
|
||||||
|
is
|
||||||
|
.B line
|
||||||
|
the output from each command line within a recipe is grouped together.
|
||||||
|
If
|
||||||
|
.I type
|
||||||
|
is
|
||||||
|
.B recurse
|
||||||
|
output from an entire recursive make is grouped together. If
|
||||||
|
.I type
|
||||||
|
is
|
||||||
|
.B none
|
||||||
|
output synchronization is disabled.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-p\fR, \fB\-\-print\-data\-base\fR
|
||||||
Print the data base (rules and variable values) that results from
|
Print the data base (rules and variable values) that results from
|
||||||
reading the makefiles; then execute as usual or as otherwise
|
reading the makefiles; then execute as usual or as otherwise
|
||||||
specified.
|
specified.
|
||||||
@@ -214,59 +252,69 @@ This also prints the version information given by the
|
|||||||
.B \-v
|
.B \-v
|
||||||
switch (see below).
|
switch (see below).
|
||||||
To print the data base without trying to remake any files, use
|
To print the data base without trying to remake any files, use
|
||||||
.B make
|
.IR "make \-p \-f/dev/null" .
|
||||||
.B \-p
|
|
||||||
.BI \-f /dev/null.
|
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-q
|
\fB\-q\fR, \fB\-\-question\fR
|
||||||
``Question mode''.
|
``Question mode''.
|
||||||
Do not run any commands, or print anything; just return an exit status
|
Do not run any commands, or print anything; just return an exit status
|
||||||
that is zero if the specified targets are already up to date, nonzero
|
that is zero if the specified targets are already up to date, nonzero
|
||||||
otherwise.
|
otherwise.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-r
|
\fB\-r\fR, \fB\-\-no\-builtin\-rules\fR
|
||||||
Eliminate use of the built-in implicit rules.
|
Eliminate use of the built\-in implicit rules.
|
||||||
Also clear out the default list of suffixes for suffix rules.
|
Also clear out the default list of suffixes for suffix rules.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-s
|
\fB\-R\fR, \fB\-\-no\-builtin\-variables\fR
|
||||||
|
Don't define any built\-in variables.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-s\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
|
||||||
Silent operation; do not print the commands as they are executed.
|
Silent operation; do not print the commands as they are executed.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-S
|
\fB\-S\fR, \fB\-\-no\-keep\-going\fR, \fB\-\-stop\fR
|
||||||
Cancel the effect of the
|
Cancel the effect of the
|
||||||
.B \-k
|
.B \-k
|
||||||
option.
|
option.
|
||||||
This is never necessary except in a recursive
|
This is never necessary except in a recursive
|
||||||
.I make
|
.B make
|
||||||
where
|
where
|
||||||
.B \-k
|
.B \-k
|
||||||
might be inherited from the top-level
|
might be inherited from the top-level
|
||||||
.I make
|
.B make
|
||||||
via MAKEFLAGS or if you set
|
via MAKEFLAGS or if you set
|
||||||
.B \-k
|
.B \-k
|
||||||
in MAKEFLAGS in your environment.
|
in MAKEFLAGS in your environment.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-t
|
\fB\-t\fR, \fB\-\-touch\fR
|
||||||
Touch files (mark them up to date without really changing them)
|
Touch files (mark them up to date without really changing them)
|
||||||
instead of running their commands.
|
instead of running their commands.
|
||||||
This is used to pretend that the commands were done, in order to fool
|
This is used to pretend that the commands were done, in order to fool
|
||||||
future invocations of
|
future invocations of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-v
|
.B \-\-trace
|
||||||
|
Information about the disposition of each target is printed (why the target is
|
||||||
|
being rebuilt and what commands are run to rebuild it).
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
Print the version of the
|
Print the version of the
|
||||||
.I make
|
.B make
|
||||||
program plus a copyright, a list of authors and a notice that there
|
program plus a copyright, a list of authors and a notice that there
|
||||||
is no warranty.
|
is no warranty.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-w
|
\fB\-w\fR, \fB\-\-print\-directory\fR
|
||||||
Print a message containing the working directory
|
Print a message containing the working directory
|
||||||
before and after other processing.
|
before and after other processing.
|
||||||
This may be useful for tracking down errors from complicated nests of
|
This may be useful for tracking down errors from complicated nests of
|
||||||
recursive
|
recursive
|
||||||
.I make
|
.B make
|
||||||
commands.
|
commands.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-W " file
|
.B \-\-no\-print\-directory
|
||||||
|
Turn off
|
||||||
|
.BR \-w ,
|
||||||
|
even if it was turned on implicitly.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-W\fR \fIfile\fR, \fB\-\-what\-if\fR=\fIfile\fR, \fB\-\-new\-file\fR=\fIfile\fR, \fB\-\-assume\-new\fR=\fIfile\fR
|
||||||
Pretend that the target
|
Pretend that the target
|
||||||
.I file
|
.I file
|
||||||
has just been modified.
|
has just been modified.
|
||||||
@@ -278,14 +326,56 @@ Without
|
|||||||
it is almost the same as running a
|
it is almost the same as running a
|
||||||
.I touch
|
.I touch
|
||||||
command on the given file before running
|
command on the given file before running
|
||||||
.IR make ,
|
.BR make ,
|
||||||
except that the modification time is changed only in the imagination of
|
except that the modification time is changed only in the imagination of
|
||||||
.IR make .
|
.BR make .
|
||||||
|
.TP 0.5i
|
||||||
|
.B \-\-warn\-undefined\-variables
|
||||||
|
Warn when an undefined variable is referenced.
|
||||||
|
.SH "EXIT STATUS"
|
||||||
|
GNU
|
||||||
|
.B make
|
||||||
|
exits with a status of zero if all makefiles were successfully parsed
|
||||||
|
and no targets that were built failed. A status of one will be returned
|
||||||
|
if the
|
||||||
|
.B \-q
|
||||||
|
flag was used and
|
||||||
|
.B make
|
||||||
|
determines that a target needs to be rebuilt. A status of two will be
|
||||||
|
returned if any errors were encountered.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.I "The GNU Make Manual"
|
The full documentation for
|
||||||
|
.B make
|
||||||
|
is maintained as a Texinfo manual. If the
|
||||||
|
.B info
|
||||||
|
and
|
||||||
|
.B make
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info make
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
See the chapter `Problems and Bugs' in
|
See the chapter ``Problems and Bugs'' in
|
||||||
.I "The GNU Make Manual" .
|
.IR "The GNU Make Manual" .
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
This manual page contributed by Dennis Morse of Stanford University.
|
This manual page contributed by Dennis Morse of Stanford University.
|
||||||
It has been reworked by Roland McGrath.
|
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||||
|
McGrath. Maintained by Paul Smith.
|
||||||
|
.SH "COPYRIGHT"
|
||||||
|
Copyright \(co 1992-1993, 1996-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of
|
||||||
|
.IR "GNU make" .
|
||||||
|
.LP
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
.LP
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
.LP
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see
|
||||||
|
.IR http://www.gnu.org/licenses/ .
|
||||||
|
|||||||
562
make.h
562
make.h
@@ -1,562 +0,0 @@
|
|||||||
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
|
|
||||||
2002 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
any later version.
|
|
||||||
|
|
||||||
GNU Make 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 for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
/* We use <config.h> instead of "config.h" so that a compilation
|
|
||||||
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
|
||||||
(which it would do because make.h was found in $srcdir). */
|
|
||||||
#include <config.h>
|
|
||||||
#undef HAVE_CONFIG_H
|
|
||||||
#define HAVE_CONFIG_H 1
|
|
||||||
|
|
||||||
/* AIX requires this to be the first thing in the file. */
|
|
||||||
#ifndef __GNUC__
|
|
||||||
# if HAVE_ALLOCA_H
|
|
||||||
# include <alloca.h>
|
|
||||||
# else
|
|
||||||
# ifdef _AIX
|
|
||||||
#pragma alloca
|
|
||||||
# else
|
|
||||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
|
||||||
char *alloca ();
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Use prototypes if available. */
|
|
||||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
|
||||||
# undef PARAMS
|
|
||||||
# define PARAMS(protos) protos
|
|
||||||
#else /* Not C++ or ANSI C. */
|
|
||||||
# undef PARAMS
|
|
||||||
# define PARAMS(protos) ()
|
|
||||||
#endif /* C++ or ANSI C. */
|
|
||||||
|
|
||||||
/* Specify we want GNU source code. This must be defined before any
|
|
||||||
system headers are included. */
|
|
||||||
|
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CRAY
|
|
||||||
/* This must happen before #include <signal.h> so
|
|
||||||
that the declaration therein is changed. */
|
|
||||||
# define signal bsdsignal
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If we're compiling for the dmalloc debugger, turn off string inlining. */
|
|
||||||
#if defined(HAVE_DMALLOC_H) && defined(__GNUC__)
|
|
||||||
# define __NO_STRING_INLINES
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#ifdef HAVE_SYS_TIMEB_H
|
|
||||||
/* SCO 3.2 "devsys 4.2" has a prototype for `ftime' in <time.h> that bombs
|
|
||||||
unless <sys/timeb.h> has been included first. Does every system have a
|
|
||||||
<sys/timeb.h>? If any does not, configure should check for it. */
|
|
||||||
# include <sys/timeb.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if TIME_WITH_SYS_TIME
|
|
||||||
# include <sys/time.h>
|
|
||||||
# include <time.h>
|
|
||||||
#else
|
|
||||||
# if HAVE_SYS_TIME_H
|
|
||||||
# include <sys/time.h>
|
|
||||||
# else
|
|
||||||
# include <time.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#ifndef errno
|
|
||||||
extern int errno;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef isblank
|
|
||||||
# define isblank(c) ((c) == ' ' || (c) == '\t')
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
# include <unistd.h>
|
|
||||||
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
|
||||||
POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */
|
|
||||||
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
|
||||||
# define POSIX 1
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Some systems define _POSIX_VERSION but are not really POSIX.1. */
|
|
||||||
#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
|
|
||||||
# undef POSIX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
|
|
||||||
# define POSIX 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef RETSIGTYPE
|
|
||||||
# define RETSIGTYPE void
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef sigmask
|
|
||||||
# define sigmask(sig) (1 << ((sig) - 1))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_SA_RESTART
|
|
||||||
# define SA_RESTART 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LIMITS_H
|
|
||||||
# include <limits.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_PARAM_H
|
|
||||||
# include <sys/param.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
|
||||||
# ifndef POSIX
|
|
||||||
# define PATH_MAX MAXPATHLEN
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#ifndef MAXPATHLEN
|
|
||||||
# define MAXPATHLEN 1024
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PATH_MAX
|
|
||||||
# define GET_PATH_MAX PATH_MAX
|
|
||||||
# define PATH_VAR(var) char var[PATH_MAX]
|
|
||||||
#else
|
|
||||||
# define NEED_GET_PATH_MAX 1
|
|
||||||
# define GET_PATH_MAX (get_path_max ())
|
|
||||||
# define PATH_VAR(var) char *var = (char *) alloca (GET_PATH_MAX)
|
|
||||||
extern unsigned int get_path_max PARAMS ((void));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CHAR_BIT
|
|
||||||
# define CHAR_BIT 8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Nonzero if the integer type T is signed. */
|
|
||||||
#define INTEGER_TYPE_SIGNED(t) ((t) -1 < 0)
|
|
||||||
|
|
||||||
/* The minimum and maximum values for the integer type T.
|
|
||||||
Use ~ (t) 0, not -1, for portability to 1's complement hosts. */
|
|
||||||
#define INTEGER_TYPE_MINIMUM(t) \
|
|
||||||
(! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
|
|
||||||
#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
|
|
||||||
|
|
||||||
#ifndef CHAR_MAX
|
|
||||||
# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef STAT_MACROS_BROKEN
|
|
||||||
# ifdef S_ISREG
|
|
||||||
# undef S_ISREG
|
|
||||||
# endif
|
|
||||||
# ifdef S_ISDIR
|
|
||||||
# undef S_ISDIR
|
|
||||||
# endif
|
|
||||||
#endif /* STAT_MACROS_BROKEN. */
|
|
||||||
|
|
||||||
#ifndef S_ISREG
|
|
||||||
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
|
||||||
#endif
|
|
||||||
#ifndef S_ISDIR
|
|
||||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
# include <types.h>
|
|
||||||
# include <unixlib.h>
|
|
||||||
# include <unixio.h>
|
|
||||||
# include <perror.h>
|
|
||||||
/* Needed to use alloca on VMS. */
|
|
||||||
# include <builtins.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __attribute__
|
|
||||||
/* This feature is available in gcc versions 2.5 and later. */
|
|
||||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
|
||||||
# define __attribute__(x)
|
|
||||||
# endif
|
|
||||||
/* The __-protected variants of `format' and `printf' attributes
|
|
||||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
|
||||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
|
||||||
# define __format__ format
|
|
||||||
# define __printf__ printf
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
|
|
||||||
# include <stdlib.h>
|
|
||||||
# include <string.h>
|
|
||||||
# define ANSI_STRING 1
|
|
||||||
#else /* No standard headers. */
|
|
||||||
# ifdef HAVE_STRING_H
|
|
||||||
# include <string.h>
|
|
||||||
# define ANSI_STRING 1
|
|
||||||
# else
|
|
||||||
# include <strings.h>
|
|
||||||
# endif
|
|
||||||
# ifdef HAVE_MEMORY_H
|
|
||||||
# include <memory.h>
|
|
||||||
# endif
|
|
||||||
# ifdef HAVE_STDLIB_H
|
|
||||||
# include <stdlib.h>
|
|
||||||
# else
|
|
||||||
extern char *malloc PARAMS ((int));
|
|
||||||
extern char *realloc PARAMS ((char *, int));
|
|
||||||
extern void free PARAMS ((char *));
|
|
||||||
|
|
||||||
extern void abort PARAMS ((void)) __attribute__ ((noreturn));
|
|
||||||
extern void exit PARAMS ((int)) __attribute__ ((noreturn));
|
|
||||||
# endif /* HAVE_STDLIB_H. */
|
|
||||||
|
|
||||||
#endif /* Standard headers. */
|
|
||||||
|
|
||||||
/* These should be in stdlib.h. Make sure we have them. */
|
|
||||||
#ifndef EXIT_SUCCESS
|
|
||||||
# define EXIT_SUCCESS 0
|
|
||||||
#endif
|
|
||||||
#ifndef EXIT_FAILURE
|
|
||||||
# define EXIT_FAILURE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ANSI_STRING
|
|
||||||
|
|
||||||
# ifndef bcmp
|
|
||||||
# define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
|
|
||||||
# endif
|
|
||||||
# ifndef bzero
|
|
||||||
# define bzero(s, n) memset ((s), 0, (n))
|
|
||||||
# endif
|
|
||||||
# if defined(HAVE_MEMMOVE) && !defined(bcopy)
|
|
||||||
# define bcopy(s, d, n) memmove ((d), (s), (n))
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#else /* Not ANSI_STRING. */
|
|
||||||
|
|
||||||
# ifndef HAVE_STRCHR
|
|
||||||
# define strchr(s, c) index((s), (c))
|
|
||||||
# define strrchr(s, c) rindex((s), (c))
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef bcmp
|
|
||||||
extern int bcmp PARAMS ((const char *, const char *, int));
|
|
||||||
# endif
|
|
||||||
# ifndef bzero
|
|
||||||
extern void bzero PARAMS ((char *, int));
|
|
||||||
#endif
|
|
||||||
# ifndef bcopy
|
|
||||||
extern void bcopy PARAMS ((const char *b1, char *b2, int));
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif /* ANSI_STRING. */
|
|
||||||
#undef ANSI_STRING
|
|
||||||
|
|
||||||
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
|
||||||
#undef strerror
|
|
||||||
|
|
||||||
#if !defined(ANSI_STRING) && !defined(__DECC)
|
|
||||||
extern char *strerror PARAMS ((int errnum));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_INTTYPES_H
|
|
||||||
# include <inttypes.h>
|
|
||||||
#endif
|
|
||||||
#define FILE_TIMESTAMP uintmax_t
|
|
||||||
|
|
||||||
#if !defined(HAVE_STRSIGNAL)
|
|
||||||
extern char *strsignal PARAMS ((int signum));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ISDIGIT offers the following features:
|
|
||||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
|
||||||
- It's guaranteed to evaluate its argument exactly once.
|
|
||||||
NOTE! Make relies on this behavior, don't change it!
|
|
||||||
- It's typically faster.
|
|
||||||
POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
|
||||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit() unless
|
|
||||||
it's important to use the locale's definition of `digit' even when the
|
|
||||||
host does not conform to POSIX. */
|
|
||||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
|
||||||
|
|
||||||
#ifndef iAPX286
|
|
||||||
# define streq(a, b) \
|
|
||||||
((a) == (b) || \
|
|
||||||
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
|
||||||
# ifdef HAVE_CASE_INSENSITIVE_FS
|
|
||||||
/* This is only used on Windows/DOS platforms, so we assume strcmpi(). */
|
|
||||||
# define strieq(a, b) \
|
|
||||||
((a) == (b) \
|
|
||||||
|| (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
|
|
||||||
&& (*(a) == '\0' || !strcmpi ((a) + 1, (b) + 1))))
|
|
||||||
# else
|
|
||||||
# define strieq(a, b) streq(a, b)
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
/* Buggy compiler can't handle this. */
|
|
||||||
# define streq(a, b) (strcmp ((a), (b)) == 0)
|
|
||||||
# define strieq(a, b) (strcmp ((a), (b)) == 0)
|
|
||||||
#endif
|
|
||||||
#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
|
|
||||||
#ifdef VMS
|
|
||||||
extern int strcmpi (const char *,const char *);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
|
|
||||||
# define ENUM_BITFIELD(bits) :bits
|
|
||||||
#else
|
|
||||||
# define ENUM_BITFIELD(bits)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Handle gettext and locales. */
|
|
||||||
|
|
||||||
#if HAVE_LOCALE_H
|
|
||||||
# include <locale.h>
|
|
||||||
#else
|
|
||||||
# define setlocale(category, locale)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <gettext.h>
|
|
||||||
|
|
||||||
#define _(msgid) gettext (msgid)
|
|
||||||
#define N_(msgid) gettext_noop (msgid)
|
|
||||||
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
|
|
||||||
|
|
||||||
/* Handle other OSs. */
|
|
||||||
|
|
||||||
#if defined(__MSDOS__) || defined(WINDOWS32)
|
|
||||||
# define PATH_SEPARATOR_CHAR ';'
|
|
||||||
#else
|
|
||||||
# if defined(VMS)
|
|
||||||
# define PATH_SEPARATOR_CHAR ','
|
|
||||||
# else
|
|
||||||
# define PATH_SEPARATOR_CHAR ':'
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
|
||||||
# include <fcntl.h>
|
|
||||||
# include <malloc.h>
|
|
||||||
# define pipe(p) _pipe(p, 512, O_BINARY)
|
|
||||||
# define kill(pid,sig) w32_kill(pid,sig)
|
|
||||||
|
|
||||||
extern void sync_Path_environment(void);
|
|
||||||
extern int kill(int pid, int sig);
|
|
||||||
extern int safe_stat(char *file, struct stat *sb);
|
|
||||||
extern char *end_of_token_w32(char *s, char stopchar);
|
|
||||||
extern int find_and_set_default_shell(char *token);
|
|
||||||
|
|
||||||
/* indicates whether or not we have Bourne shell */
|
|
||||||
extern int no_default_sh_exe;
|
|
||||||
|
|
||||||
/* is default_shell unixy? */
|
|
||||||
extern int unixy_shell;
|
|
||||||
#endif /* WINDOWS32 */
|
|
||||||
|
|
||||||
struct floc
|
|
||||||
{
|
|
||||||
char *filenm;
|
|
||||||
unsigned long lineno;
|
|
||||||
};
|
|
||||||
#define NILF ((struct floc *)0)
|
|
||||||
|
|
||||||
#define STRING_SIZE_TUPLE(_s) (_s), (sizeof (_s)-1)
|
|
||||||
|
|
||||||
|
|
||||||
/* Fancy processing for variadic functions in both ANSI and pre-ANSI
|
|
||||||
compilers. */
|
|
||||||
#if defined __STDC__ && __STDC__
|
|
||||||
extern void message (int prefix, const char *fmt, ...)
|
|
||||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
|
||||||
extern void error (const struct floc *flocp, const char *fmt, ...)
|
|
||||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
|
||||||
extern void fatal (const struct floc *flocp, const char *fmt, ...)
|
|
||||||
__attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
|
|
||||||
#else
|
|
||||||
extern void message ();
|
|
||||||
extern void error ();
|
|
||||||
extern void fatal ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void die PARAMS ((int)) __attribute__ ((noreturn));
|
|
||||||
extern void log_working_directory PARAMS ((int));
|
|
||||||
extern void pfatal_with_name PARAMS ((const char *)) __attribute__ ((noreturn));
|
|
||||||
extern void perror_with_name PARAMS ((const char *, const char *));
|
|
||||||
extern char *savestring PARAMS ((const char *, unsigned int));
|
|
||||||
extern char *concat PARAMS ((const char *, const char *, const char *));
|
|
||||||
extern char *xmalloc PARAMS ((unsigned int));
|
|
||||||
extern char *xrealloc PARAMS ((char *, unsigned int));
|
|
||||||
extern char *xstrdup PARAMS ((const char *));
|
|
||||||
extern char *find_next_token PARAMS ((char **, unsigned int *));
|
|
||||||
extern char *next_token PARAMS ((const char *));
|
|
||||||
extern char *end_of_token PARAMS ((char *));
|
|
||||||
extern void collapse_continuations PARAMS ((char *));
|
|
||||||
extern void remove_comments PARAMS((char *));
|
|
||||||
extern char *sindex PARAMS ((const char *, unsigned int, \
|
|
||||||
const char *, unsigned int));
|
|
||||||
extern char *lindex PARAMS ((const char *, const char *, int));
|
|
||||||
extern int alpha_compare PARAMS ((const void *, const void *));
|
|
||||||
extern void print_spaces PARAMS ((unsigned int));
|
|
||||||
extern char *find_char_unquote PARAMS ((char *, int, int, int));
|
|
||||||
extern char *find_percent PARAMS ((char *));
|
|
||||||
extern FILE *open_tmpfile PARAMS ((char **, const char *));
|
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
|
||||||
extern int ar_name PARAMS ((char *));
|
|
||||||
extern void ar_parse_name PARAMS ((char *, char **, char **));
|
|
||||||
extern int ar_touch PARAMS ((char *));
|
|
||||||
extern time_t ar_member_date PARAMS ((char *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int dir_file_exists_p PARAMS ((char *, char *));
|
|
||||||
extern int file_exists_p PARAMS ((char *));
|
|
||||||
extern int file_impossible_p PARAMS ((char *));
|
|
||||||
extern void file_impossible PARAMS ((char *));
|
|
||||||
extern char *dir_name PARAMS ((char *));
|
|
||||||
extern void hash_init_directories PARAMS ((void));
|
|
||||||
|
|
||||||
extern void define_default_variables PARAMS ((void));
|
|
||||||
extern void set_default_suffixes PARAMS ((void));
|
|
||||||
extern void install_default_suffix_rules PARAMS ((void));
|
|
||||||
extern void install_default_implicit_rules PARAMS ((void));
|
|
||||||
|
|
||||||
extern void build_vpath_lists PARAMS ((void));
|
|
||||||
extern void construct_vpath_list PARAMS ((char *pattern, char *dirpath));
|
|
||||||
extern int vpath_search PARAMS ((char **file, FILE_TIMESTAMP *mtime_ptr));
|
|
||||||
extern int gpath_search PARAMS ((char *file, int len));
|
|
||||||
|
|
||||||
extern void construct_include_path PARAMS ((char **arg_dirs));
|
|
||||||
|
|
||||||
extern void user_access PARAMS ((void));
|
|
||||||
extern void make_access PARAMS ((void));
|
|
||||||
extern void child_access PARAMS ((void));
|
|
||||||
|
|
||||||
#ifdef HAVE_VFORK_H
|
|
||||||
# include <vfork.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
|
||||||
because such systems often declare them in header files anyway. */
|
|
||||||
|
|
||||||
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
|
|
||||||
|
|
||||||
extern long int atol ();
|
|
||||||
# ifndef VMS
|
|
||||||
extern long int lseek ();
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif /* Not GNU C library or POSIX. */
|
|
||||||
|
|
||||||
#ifdef HAVE_GETCWD
|
|
||||||
# if !defined(VMS) && !defined(__DECC)
|
|
||||||
extern char *getcwd ();
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
extern char *getwd ();
|
|
||||||
# define getcwd(buf, len) getwd (buf)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern const struct floc *reading_file;
|
|
||||||
|
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
|
||||||
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
|
||||||
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
|
||||||
extern int print_version_flag, print_directory_flag;
|
|
||||||
extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
|
|
||||||
extern int clock_skew_detected;
|
|
||||||
|
|
||||||
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
|
||||||
extern int batch_mode_shell;
|
|
||||||
|
|
||||||
extern unsigned int job_slots;
|
|
||||||
extern int job_fds[2];
|
|
||||||
extern int job_rfd;
|
|
||||||
#ifndef NO_FLOAT
|
|
||||||
extern double max_load_average;
|
|
||||||
#else
|
|
||||||
extern int max_load_average;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern char *program;
|
|
||||||
extern char *starting_directory;
|
|
||||||
extern unsigned int makelevel;
|
|
||||||
extern char *version_string, *remote_description;
|
|
||||||
|
|
||||||
extern unsigned int commands_started;
|
|
||||||
|
|
||||||
extern int handling_fatal_signal;
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
|
|
||||||
#endif
|
|
||||||
#ifndef MAX
|
|
||||||
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
# define MAKE_SUCCESS 1
|
|
||||||
# define MAKE_TROUBLE 2
|
|
||||||
# define MAKE_FAILURE 3
|
|
||||||
#else
|
|
||||||
# define MAKE_SUCCESS 0
|
|
||||||
# define MAKE_TROUBLE 1
|
|
||||||
# define MAKE_FAILURE 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set up heap debugging library dmalloc. */
|
|
||||||
|
|
||||||
#ifdef HAVE_DMALLOC_H
|
|
||||||
#include <dmalloc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* If we have broken SA_RESTART support, then wrap stat() and readdir() with
|
|
||||||
versions that handle EINTR. Note that there are still plenty of system
|
|
||||||
calls that can fail with EINTR but this, reportedly, gets the vast
|
|
||||||
majority of failure cases. If you still experience failures you'll need
|
|
||||||
to either get a system where SA_RESTART works, or you need to avoid -j. */
|
|
||||||
|
|
||||||
#ifdef HAVE_BROKEN_RESTART
|
|
||||||
|
|
||||||
/* Here we make an assumption that a system with a broken SA_RESTART has
|
|
||||||
dirent.h. Right now the only system I know of in this category is PTX, and
|
|
||||||
it does have dirent.h.
|
|
||||||
*/
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
#define stat(_f,_b) atomic_stat ((_f), (_b))
|
|
||||||
#define readdir(_d) atomic_readdir (_d)
|
|
||||||
|
|
||||||
extern int atomic_stat PARAMS ((const char *file, struct stat *buf));
|
|
||||||
extern struct dirent *atomic_readdir PARAMS ((DIR *dir));
|
|
||||||
|
|
||||||
#endif
|
|
||||||
2
make.lnk
2
make.lnk
@@ -1,4 +1,4 @@
|
|||||||
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"
|
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"+"hash.o"+"strcache.o"+"output.o"
|
||||||
TO "make.new"
|
TO "make.new"
|
||||||
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
|
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
|
||||||
QUIET
|
QUIET
|
||||||
|
|||||||
21
make_msvc_net2003.sln
Normal file
21
make_msvc_net2003.sln
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_msvc.net2003", "make_msvc_net2003.vcproj", "{E96B5060-3240-4723-91C9-E64F1C877A04}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
|
Debug = Debug
|
||||||
|
Release = Release
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
|
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.ActiveCfg = Debug|Win32
|
||||||
|
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.Build.0 = Debug|Win32
|
||||||
|
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.ActiveCfg = Release|Win32
|
||||||
|
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
340
make_msvc_net2003.vcproj
Normal file
340
make_msvc_net2003.vcproj
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="make_msvc.net2003"
|
||||||
|
ProjectGUID="{E96B5060-3240-4723-91C9-E64F1C877A04}"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".;w32/include;glob"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
|
||||||
|
MinimalRebuild="TRUE"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="4"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
Detect64BitPortabilityProblems="FALSE"
|
||||||
|
DebugInformationFormat="4"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(OutDir)/make_msvc.net2003.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="$(OutDir)/make_msvc.net2003.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="Copying config.h.W32 to config.h"
|
||||||
|
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=".;w32/include;glob"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
|
||||||
|
RuntimeLibrary="0"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="4"
|
||||||
|
Detect64BitPortabilityProblems="FALSE"
|
||||||
|
DebugInformationFormat="3"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(OutDir)/make_msvc.net2003.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
Description="Copying config.h.W32 to config.h"
|
||||||
|
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="src"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||||
|
<File
|
||||||
|
RelativePath=".\ar.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\arscan.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\commands.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\default.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\dir.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\expand.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\file.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\function.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\getloadavg.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\getopt.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\getopt1.c">
|
||||||
|
</File>
|
||||||
|
|
||||||
|
<File
|
||||||
|
RelativePath=".\guile.c">
|
||||||
|
</File>
|
||||||
|
|
||||||
|
<File
|
||||||
|
RelativePath=".\hash.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\strcache.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\implicit.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\job.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\load.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\output.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\main.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\misc.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\read.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\remake.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\remote-stub.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\rule.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\signame.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\variable.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\version.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\vpath.c">
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="w32"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\compat\dirent.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\compat\posixfcn.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\subproc\misc.c">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\pathstuff.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\w32os.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\subproc\sub_proc.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\subproc\w32err.c">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="glob"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\glob\fnmatch.c">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\glob\glob.c">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="include"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||||
|
<File
|
||||||
|
RelativePath=".\commands.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\config.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\debug.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\dep.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\filedef.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\getopt.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gettext.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\gmk-default.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\hash.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\job.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\output.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\makeint.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\rule.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\variable.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\vmsdir.h">
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="w32"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\include\dirent.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\include\pathstuff.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\subproc\proc.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\include\sub_proc.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\w32\include\w32err.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="glob"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\glob\fnmatch.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\glob\glob.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
66
makefile.com
66
makefile.com
@@ -1,8 +1,7 @@
|
|||||||
$!
|
$!
|
||||||
$! Makefile.com - builds GNU Make for VMS
|
$! Makefile.com - builds GNU Make for VMS
|
||||||
$!
|
$!
|
||||||
$! P1 is non-empty if you want to link with the VAXCRTL library instead
|
$! P1 = LIST will provide compiler listings.
|
||||||
$! of the shareable executable
|
|
||||||
$! P2 = DEBUG will build an image with debug information
|
$! P2 = DEBUG will build an image with debug information
|
||||||
$! P3 = WALL will enable all warning messages (some are suppressed since
|
$! P3 = WALL will enable all warning messages (some are suppressed since
|
||||||
$! one macro intentionally causes an error condition)
|
$! one macro intentionally causes an error condition)
|
||||||
@@ -33,7 +32,7 @@ $ then
|
|||||||
$ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
|
$ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
|
||||||
$ ccopt = ""
|
$ ccopt = ""
|
||||||
$ else
|
$ else
|
||||||
$ ccopt = "/decc/prefix=all"
|
$ ccopt = "/decc/prefix=(all,except=(globfree,glob))"
|
||||||
$ if f$trnlnm("SYS").eqs.""
|
$ if f$trnlnm("SYS").eqs.""
|
||||||
$ then
|
$ then
|
||||||
$ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes.""
|
$ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes.""
|
||||||
@@ -50,6 +49,12 @@ $ endif
|
|||||||
$ endif
|
$ endif
|
||||||
$ endif
|
$ endif
|
||||||
$!
|
$!
|
||||||
|
$!
|
||||||
|
$ if (p1 .eqs. "LIST")
|
||||||
|
$ then
|
||||||
|
$ ccopt = ccopt + "/list/show=(expan,inclu)"
|
||||||
|
$ endif
|
||||||
|
$!
|
||||||
$! Should we build a debug image
|
$! Should we build a debug image
|
||||||
$!
|
$!
|
||||||
$ if (p2.eqs."DEBUG")
|
$ if (p2.eqs."DEBUG")
|
||||||
@@ -67,9 +72,12 @@ $ then
|
|||||||
$ gosub check_cc_qual
|
$ gosub check_cc_qual
|
||||||
$ endif
|
$ endif
|
||||||
$ filelist = "alloca ar arscan commands default dir expand file function " + -
|
$ filelist = "alloca ar arscan commands default dir expand file function " + -
|
||||||
"hash implicit job main misc read remake remote-stub rule " + -
|
"guile hash implicit job load main misc read remake " + -
|
||||||
"signame variable version vmsfunctions vmsify vpath " + -
|
"remote-stub rule output signame variable version " + -
|
||||||
"[.glob]glob [.glob]fnmatch getopt1 getopt"
|
"vmsfunctions vmsify vpath vms_progname vms_exit " + -
|
||||||
|
"vms_export_symbol [.glob]glob [.glob]fnmatch getopt1 " + -
|
||||||
|
"getopt strcache"
|
||||||
|
$!
|
||||||
$ copy config.h-vms config.h
|
$ copy config.h-vms config.h
|
||||||
$ n=0
|
$ n=0
|
||||||
$ open/write optf make.opt
|
$ open/write optf make.opt
|
||||||
@@ -77,25 +85,21 @@ $ loop:
|
|||||||
$ cfile = f$elem(n," ",filelist)
|
$ cfile = f$elem(n," ",filelist)
|
||||||
$ if cfile .eqs. " " then goto linkit
|
$ if cfile .eqs. " " then goto linkit
|
||||||
$ write sys$output "Compiling ''cfile'..."
|
$ write sys$output "Compiling ''cfile'..."
|
||||||
$ call compileit 'cfile' 'p1'
|
$ call compileit 'cfile'
|
||||||
$ n = n + 1
|
$ n = n + 1
|
||||||
$ goto loop
|
$ goto loop
|
||||||
$ linkit:
|
$ linkit:
|
||||||
$ close optf
|
$ close optf
|
||||||
$ if p1 .nes. "" then goto link_using_library
|
|
||||||
$ link/exe=make make.opt/opt'lopt
|
$ link/exe=make make.opt/opt'lopt
|
||||||
$ goto cleanup
|
$ goto cleanup
|
||||||
$
|
$
|
||||||
$ link_using_library:
|
|
||||||
$ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib'lopt
|
|
||||||
$
|
|
||||||
$ cleanup:
|
$ cleanup:
|
||||||
$ if f$trnlnm("SYS").nes."" then $ deassign sys
|
$ if f$trnlnm("SYS").nes."" then $ deassign sys
|
||||||
$ if f$trnlnm("OPTF").nes."" then $ close optf
|
$ if f$trnlnm("OPTF").nes."" then $ close optf
|
||||||
$ if f$search("make.opt").nes."" then $ del make.opt;*
|
$ if f$search("make.opt").nes."" then $ del make.opt;*
|
||||||
$ exit
|
$ exit
|
||||||
$!
|
$!
|
||||||
$!------------------------------------------------------------------------------
|
$!-----------------------------------------------------------------------------
|
||||||
$!
|
$!
|
||||||
$! Check if this is a define relating to the properties of the C/C++
|
$! Check if this is a define relating to the properties of the C/C++
|
||||||
$! compiler
|
$! compiler
|
||||||
@@ -111,7 +115,7 @@ $ close tmpc
|
|||||||
$ gosub cc_qual_check
|
$ gosub cc_qual_check
|
||||||
$ return
|
$ return
|
||||||
$!
|
$!
|
||||||
$!------------------------------------------------------------------------------
|
$!-----------------------------------------------------------------------------
|
||||||
$!
|
$!
|
||||||
$! Check for properties of C/C++ compiler
|
$! Check for properties of C/C++ compiler
|
||||||
$!
|
$!
|
||||||
@@ -124,15 +128,39 @@ $ set message/fac/ident/sever/text
|
|||||||
$ delete/nolog 'tmpnam'.*;*
|
$ delete/nolog 'tmpnam'.*;*
|
||||||
$ if cc_qual then ccopt = ccopt + ccqual
|
$ if cc_qual then ccopt = ccopt + ccqual
|
||||||
$ return
|
$ return
|
||||||
$!------------------------------------------------------------------------------
|
$!-----------------------------------------------------------------------------
|
||||||
$!
|
$!
|
||||||
$ compileit : subroutine
|
$ compileit : subroutine
|
||||||
$ ploc = f$locate("]",p1)
|
$ ploc = f$locate("]",p1)
|
||||||
$ filnam = p1
|
$! filnam = p1
|
||||||
$ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
|
$ if ploc .lt. f$length(p1)
|
||||||
$ write optf "''filnam'"
|
$ then
|
||||||
$ cc'ccopt'/include=([],[.glob]) -
|
$ objdir = f$extract(0, ploc+1, p1)
|
||||||
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
|
$ write optf p1
|
||||||
|
$ else
|
||||||
|
$ objdir := []
|
||||||
|
$ write optf objdir+p1
|
||||||
|
$ endif
|
||||||
|
$ cc'ccopt'/nested=none/include=([],[.glob])/obj='objdir' -
|
||||||
|
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file",-
|
||||||
|
"unlink=remove","HAVE_CONFIG_H","VMS") -
|
||||||
'p1'
|
'p1'
|
||||||
$ exit
|
$ exit
|
||||||
$ endsubroutine : compileit
|
$ endsubroutine : compileit
|
||||||
|
$!
|
||||||
|
$!-----------------------------------------------------------------------------
|
||||||
|
$!Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
|
$!This file is part of GNU Make.
|
||||||
|
$!
|
||||||
|
$!GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
$!the terms of the GNU General Public License as published by the Free Software
|
||||||
|
$!Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
$!version.
|
||||||
|
$!
|
||||||
|
$!GNU Make 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 for more
|
||||||
|
$!details.
|
||||||
|
$!
|
||||||
|
$!You should have received a copy of the GNU General Public License along with
|
||||||
|
$!this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
147
makefile.vms
147
makefile.vms
@@ -1,25 +1,26 @@
|
|||||||
# Copyright (C) 1988, 1989, 1996, 1997 Free Software Foundation, Inc.
|
# -*-Makefile-*- to build GNU make on VMS
|
||||||
|
#
|
||||||
|
# Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make 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 for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# VMS extensions from GNU Make 3.60 imported by
|
# VMS extensions from GNU Make 3.60 imported by
|
||||||
# Klaus Kämpf (kkaempf@rmi.de)
|
# Klaus Kämpf (kkaempf@rmi.de)
|
||||||
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
|
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
|
||||||
# Modified for version 3.80 by zinser@decus.de
|
# Modified for version 3.80 by zinser@decus.de
|
||||||
#
|
# Modified for versions 3.81, 3.99.90 by Hartmut Becker
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# GNU Make 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 for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
|
||||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
# Boston, MA 02111-1307, USA.
|
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
CP = copy
|
CP = copy
|
||||||
@@ -31,9 +32,12 @@ CP = copy
|
|||||||
#
|
#
|
||||||
|
|
||||||
ifeq ($(CC),cc)
|
ifeq ($(CC),cc)
|
||||||
CFLAGS = $(defines) /include=([],[.glob])/prefix=all/standard=relaxed
|
cinclude = /nested=none/include=([],[.glob])
|
||||||
|
cprefix = /prefix=(all,except=(glob,globfree))
|
||||||
|
cwarn = /standard=relaxed/warn=(disable=questcompare)
|
||||||
|
CFLAGS = $(defines) $(cinclude)$(cprefix)$(cwarn)
|
||||||
else
|
else
|
||||||
CFLAGS = $(defines) /include=([],[.glob])
|
CFLAGS = $(defines) $(cinclude)
|
||||||
endif
|
endif
|
||||||
#LDFLAGS = /deb
|
#LDFLAGS = /deb
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
@@ -80,22 +84,27 @@ extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj
|
|||||||
# as an alternative:
|
# as an alternative:
|
||||||
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
||||||
getopt = ,getopt.obj,getopt1.obj
|
getopt = ,getopt.obj,getopt1.obj
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = []
|
bindir = []
|
||||||
# Directory to install the man page in.
|
# Directory to install the man page in.
|
||||||
mandir = []
|
mandir = []
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
|
|
||||||
objs = commands.obj,job.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
guile = ,guile.obj
|
||||||
main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
|
||||||
default.obj,variable.obj,expand.obj,function.obj,\
|
objs = commands.obj,job.obj,output.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
||||||
vpath.obj,version.obj$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob)
|
load.obj,main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
||||||
srcs = commands.c job.c dir.c file.c misc.c hash.c\
|
default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
|
||||||
main.c read.c remake.c rule.c implicit.c \
|
vpath.obj,version.obj,vms_progname.obj,vms_exit.obj,\
|
||||||
default.c variable.c expand.c function.c \
|
vms_export_symbol.obj$(guile)$(ARCHIVES)$(extras)$(getopt)$(glob)
|
||||||
vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
|
||||||
commands.h dep.h filedef.h job.h make.h rule.h variable.h
|
srcs = commands.c job.c output.c dir.c file.c misc.c guile.c hash.c \
|
||||||
|
load.c main.c read.c remake.c rule.c implicit.c \
|
||||||
|
default.c variable.c expand.c function.c strcache.c \
|
||||||
|
vpath.c version.c vmsfunctions.c vmsify.c vms_progname.c vms_exit.c \
|
||||||
|
vms_export_symbol.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
||||||
|
commands.h dep.h filedef.h job.h output.h makeint.h rule.h variable.h
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all doc
|
.PHONY: all doc
|
||||||
@@ -109,39 +118,63 @@ make.exe: $(objs)
|
|||||||
|
|
||||||
.PHONY: clean realclean
|
.PHONY: clean realclean
|
||||||
clean:
|
clean:
|
||||||
$$ purge [...]
|
-purge [...]
|
||||||
-$(RM) make.exe;,*.obj;
|
-$(RM) make.exe;,*.obj;
|
||||||
-$(RM) *.opt;
|
|
||||||
-$(RM) [.glob]*.obj;
|
-$(RM) [.glob]*.obj;
|
||||||
|
|
||||||
# Automatically generated dependencies.
|
ar.obj: ar.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h dep.h \
|
||||||
commands.obj: commands.c make.h dep.h commands.h filedef.h variable.h job.h
|
[.glob]fnmatch.h
|
||||||
job.obj: job.c make.h commands.h job.h filedef.h variable.h
|
arscan.obj: arscan.c makeint.h config.h gnumake.h gettext.h
|
||||||
dir.obj: dir.c make.h
|
commands.obj: commands.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
file.obj: file.c make.h commands.h dep.h filedef.h variable.h
|
hash.h dep.h variable.h job.h output.h commands.h
|
||||||
misc.obj: misc.c make.h dep.h
|
default.obj: default.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
hash.obj: hash.c make.h hash.h
|
hash.h variable.h rule.h dep.h job.h output.h commands.h
|
||||||
main.obj: main.c make.h commands.h dep.h filedef.h variable.h job.h
|
dir.obj: dir.c makeint.h config.h gnumake.h gettext.h hash.h filedef.h \
|
||||||
read.obj: read.c make.h commands.h dep.h filedef.h variable.h
|
dep.h [.glob]glob.h
|
||||||
remake.obj: remake.c make.h commands.h job.h dep.h filedef.h
|
expand.obj: expand.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
rule.obj: rule.c make.h commands.h dep.h filedef.h variable.h rule.h
|
hash.h job.h output.h commands.h variable.h rule.h
|
||||||
implicit.obj: implicit.c make.h rule.h dep.h filedef.h
|
file.obj: file.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
default.obj: default.c make.h rule.h dep.h filedef.h commands.h variable.h
|
dep.h job.h output.h commands.h variable.h debug.h
|
||||||
variable.obj: variable.c make.h commands.h variable.h dep.h filedef.h
|
[.glob]fnmatch.obj: [.glob]fnmatch.c config.h [.glob]fnmatch.h
|
||||||
expand.obj: expand.c make.h commands.h filedef.h variable.h
|
function.obj: function.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
function.obj: function.c make.h variable.h dep.h commands.h job.h
|
hash.h variable.h dep.h job.h output.h commands.h debug.h
|
||||||
vpath.obj: vpath.c make.h filedef.h variable.h
|
getopt.obj: getopt.c config.h gettext.h getopt.h
|
||||||
|
getopt1.obj: getopt1.c config.h getopt.h
|
||||||
|
[.glob]glob.obj: [.glob]glob.c config.h [.glob]fnmatch.h [.glob]glob.h
|
||||||
|
guile.obj: guile.c makeint.h config.h gnumake.h gettext.h
|
||||||
|
hash.obj: hash.c makeint.h config.h gnumake.h gettext.h hash.h
|
||||||
|
implicit.obj: implicit.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
|
hash.h rule.h dep.h debug.h variable.h job.h output.h commands.h
|
||||||
|
job.obj: job.c makeint.h config.h gnumake.h gettext.h job.h output.h debug.h \
|
||||||
|
filedef.h hash.h commands.h variable.h debug.h vmsjobs.c
|
||||||
|
load.obj: load.c makeint.h config.h gnumake.h gettext.h
|
||||||
|
main.obj: main.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
|
dep.h variable.h job.h output.h commands.h rule.h debug.h getopt.h
|
||||||
|
misc.obj: misc.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
|
dep.h debug.h
|
||||||
|
output.obj: output.c makeint.h config.h gnumake.h gettext.h job.h output.h
|
||||||
|
read.obj: read.c makeint.h config.h gnumake.h gettext.h [.glob]glob.h \
|
||||||
|
filedef.h hash.h dep.h job.h output.h commands.h variable.h rule.h \
|
||||||
|
debug.h
|
||||||
|
remake.obj: remake.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
|
hash.h job.h output.h commands.h dep.h variable.h debug.h
|
||||||
|
remote-stub.obj: remote-stub.c makeint.h config.h gnumake.h gettext.h \
|
||||||
|
filedef.h hash.h job.h output.h commands.h
|
||||||
|
rule.obj: rule.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
|
dep.h job.h output.h commands.h variable.h rule.h
|
||||||
|
signame.obj: signame.c makeint.h config.h gnumake.h gettext.h
|
||||||
|
strcache.obj: strcache.c makeint.h config.h gnumake.h gettext.h hash.h
|
||||||
|
variable.obj: variable.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||||
|
hash.h dep.h job.h output.h commands.h variable.h rule.h
|
||||||
version.obj: version.c config.h
|
version.obj: version.c config.h
|
||||||
arscan.obj: arscan.c
|
vmsfunctions.obj: vmsfunctions.c makeint.h config.h gnumake.h gettext.h \
|
||||||
ar.obj: ar.c make.h filedef.h
|
debug.h job.h output.h vmsdir.h
|
||||||
signame.obj: signame.c
|
vmsify.obj: vmsify.c
|
||||||
remote-stub.obj: remote-stub.c
|
vpath.obj: vpath.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||||
[.glob]glob.obj: [.glob]glob.c
|
variable.h
|
||||||
[.glob]fnmatch.obj: [.glob]fnmatch.c
|
vms_progname.obj: vms_progname.c
|
||||||
getopt.obj: getopt.c
|
vms_exit.obj: vms_exit.c
|
||||||
getopt1.obj: getopt1.c
|
vms_export_symbol.obj: vms_export_symbol.c
|
||||||
vmsfunctions.obj: vmsfunctions.c make.h vmsdir.h
|
|
||||||
vmsify.obj: vmsify.c make.h
|
|
||||||
|
|
||||||
config.h: config.h-vms
|
config.h: config.h-vms
|
||||||
$(CP) $< $@
|
$(CP) $< $@
|
||||||
|
|||||||
767
makeint.h
Normal file
767
makeint.h
Normal file
@@ -0,0 +1,767 @@
|
|||||||
|
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
||||||
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* We use <config.h> instead of "config.h" so that a compilation
|
||||||
|
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
||||||
|
(which it would do because makeint.h was found in $srcdir). */
|
||||||
|
#include <config.h>
|
||||||
|
#undef HAVE_CONFIG_H
|
||||||
|
#define HAVE_CONFIG_H 1
|
||||||
|
|
||||||
|
/* Specify we want GNU source code. This must be defined before any
|
||||||
|
system headers are included. */
|
||||||
|
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
|
|
||||||
|
/* AIX requires this to be the first thing in the file. */
|
||||||
|
#if HAVE_ALLOCA_H
|
||||||
|
# include <alloca.h>
|
||||||
|
#else
|
||||||
|
# ifdef _AIX
|
||||||
|
#pragma alloca
|
||||||
|
# else
|
||||||
|
# if !defined(__GNUC__) && !defined(WINDOWS32)
|
||||||
|
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||||
|
char *alloca ();
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Disable assert() unless we're a maintainer.
|
||||||
|
Some asserts are compute-intensive. */
|
||||||
|
#ifndef MAKE_MAINTAINER_MODE
|
||||||
|
# define NDEBUG 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Include the externally-visible content.
|
||||||
|
Be sure to use the local one, and not one installed on the system.
|
||||||
|
Define GMK_BUILDING_MAKE for proper selection of dllexport/dllimport
|
||||||
|
declarations for MS-Windows. */
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
# define GMK_BUILDING_MAKE
|
||||||
|
#endif
|
||||||
|
#include "gnumake.h"
|
||||||
|
|
||||||
|
#ifdef CRAY
|
||||||
|
/* This must happen before #include <signal.h> so
|
||||||
|
that the declaration therein is changed. */
|
||||||
|
# define signal bsdsignal
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If we're compiling for the dmalloc debugger, turn off string inlining. */
|
||||||
|
#if defined(HAVE_DMALLOC_H) && defined(__GNUC__)
|
||||||
|
# define __NO_STRING_INLINES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_TIMEB_H
|
||||||
|
/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
|
||||||
|
unless <sys/timeb.h> has been included first. */
|
||||||
|
# include <sys/timeb.h>
|
||||||
|
#endif
|
||||||
|
#if TIME_WITH_SYS_TIME
|
||||||
|
# include <sys/time.h>
|
||||||
|
# include <time.h>
|
||||||
|
#else
|
||||||
|
# if HAVE_SYS_TIME_H
|
||||||
|
# include <sys/time.h>
|
||||||
|
# else
|
||||||
|
# include <time.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifndef errno
|
||||||
|
extern int errno;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __VMS
|
||||||
|
/* In strict ANSI mode, VMS compilers should not be defining the
|
||||||
|
VMS macro. Define it here instead of a bulk edit for the correct code.
|
||||||
|
*/
|
||||||
|
# ifndef VMS
|
||||||
|
# define VMS
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
||||||
|
POSIX.1 behavior with 'cc -YPOSIX', which predefines POSIX itself! */
|
||||||
|
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
||||||
|
# define POSIX 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Some systems define _POSIX_VERSION but are not really POSIX.1. */
|
||||||
|
#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
|
||||||
|
# undef POSIX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
|
||||||
|
# define POSIX 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef RETSIGTYPE
|
||||||
|
# define RETSIGTYPE void
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef sigmask
|
||||||
|
# define sigmask(sig) (1 << ((sig) - 1))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_SA_RESTART
|
||||||
|
# define SA_RESTART 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_VFORK_H
|
||||||
|
# include <vfork.h>
|
||||||
|
#endif
|
||||||
|
#if !HAVE_WORKING_VFORK
|
||||||
|
# define vfork fork
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIMITS_H
|
||||||
|
# include <limits.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
# include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
# ifndef POSIX
|
||||||
|
# define PATH_MAX MAXPATHLEN
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#ifndef MAXPATHLEN
|
||||||
|
# define MAXPATHLEN 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PATH_MAX
|
||||||
|
# define GET_PATH_MAX PATH_MAX
|
||||||
|
# define PATH_VAR(var) char var[PATH_MAX]
|
||||||
|
#else
|
||||||
|
# define NEED_GET_PATH_MAX 1
|
||||||
|
# define GET_PATH_MAX (get_path_max ())
|
||||||
|
# define PATH_VAR(var) char *var = alloca (GET_PATH_MAX)
|
||||||
|
unsigned int get_path_max (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CHAR_BIT
|
||||||
|
# define CHAR_BIT 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef USHRT_MAX
|
||||||
|
# define USHRT_MAX 65535
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Nonzero if the integer type T is signed.
|
||||||
|
Use <= to avoid GCC warnings about always-false expressions. */
|
||||||
|
#define INTEGER_TYPE_SIGNED(t) ((t) -1 <= 0)
|
||||||
|
|
||||||
|
/* The minimum and maximum values for the integer type T.
|
||||||
|
Use ~ (t) 0, not -1, for portability to 1's complement hosts. */
|
||||||
|
#define INTEGER_TYPE_MINIMUM(t) \
|
||||||
|
(! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
|
||||||
|
#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
|
||||||
|
|
||||||
|
#ifndef CHAR_MAX
|
||||||
|
# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STAT_MACROS_BROKEN
|
||||||
|
# ifdef S_ISREG
|
||||||
|
# undef S_ISREG
|
||||||
|
# endif
|
||||||
|
# ifdef S_ISDIR
|
||||||
|
# undef S_ISDIR
|
||||||
|
# endif
|
||||||
|
#endif /* STAT_MACROS_BROKEN. */
|
||||||
|
|
||||||
|
#ifndef S_ISREG
|
||||||
|
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||||
|
#endif
|
||||||
|
#ifndef S_ISDIR
|
||||||
|
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
# include <fcntl.h>
|
||||||
|
# include <types.h>
|
||||||
|
# include <unixlib.h>
|
||||||
|
# include <unixio.h>
|
||||||
|
# include <perror.h>
|
||||||
|
/* Needed to use alloca on VMS. */
|
||||||
|
# include <builtins.h>
|
||||||
|
|
||||||
|
extern int vms_use_mcr_command;
|
||||||
|
extern int vms_always_use_cmd_file;
|
||||||
|
extern int vms_gnv_shell;
|
||||||
|
extern int vms_comma_separator;
|
||||||
|
extern int vms_legacy_behavior;
|
||||||
|
extern int vms_unix_simulation;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __attribute__
|
||||||
|
/* This feature is available in gcc versions 2.5 and later. */
|
||||||
|
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||||
|
# define __attribute__(x)
|
||||||
|
# endif
|
||||||
|
/* The __-protected variants of 'format' and 'printf' attributes
|
||||||
|
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||||
|
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||||
|
# define __format__ format
|
||||||
|
# define __printf__ printf
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#define UNUSED __attribute__ ((unused))
|
||||||
|
|
||||||
|
#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
|
||||||
|
# include <stdlib.h>
|
||||||
|
# include <string.h>
|
||||||
|
# define ANSI_STRING 1
|
||||||
|
#else /* No standard headers. */
|
||||||
|
# ifdef HAVE_STRING_H
|
||||||
|
# include <string.h>
|
||||||
|
# define ANSI_STRING 1
|
||||||
|
# else
|
||||||
|
# include <strings.h>
|
||||||
|
# endif
|
||||||
|
# ifdef HAVE_MEMORY_H
|
||||||
|
# include <memory.h>
|
||||||
|
# endif
|
||||||
|
# ifdef HAVE_STDLIB_H
|
||||||
|
# include <stdlib.h>
|
||||||
|
# else
|
||||||
|
void *malloc (int);
|
||||||
|
void *realloc (void *, int);
|
||||||
|
void free (void *);
|
||||||
|
|
||||||
|
void abort (void) __attribute__ ((noreturn));
|
||||||
|
void exit (int) __attribute__ ((noreturn));
|
||||||
|
# endif /* HAVE_STDLIB_H. */
|
||||||
|
|
||||||
|
#endif /* Standard headers. */
|
||||||
|
|
||||||
|
/* These should be in stdlib.h. Make sure we have them. */
|
||||||
|
#ifndef EXIT_SUCCESS
|
||||||
|
# define EXIT_SUCCESS 0
|
||||||
|
#endif
|
||||||
|
#ifndef EXIT_FAILURE
|
||||||
|
# define EXIT_FAILURE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ANSI_STRING
|
||||||
|
|
||||||
|
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
||||||
|
#undef strerror
|
||||||
|
#if !defined(__DECC)
|
||||||
|
char *strerror (int errnum);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* !ANSI_STRING. */
|
||||||
|
#undef ANSI_STRING
|
||||||
|
|
||||||
|
#if HAVE_INTTYPES_H
|
||||||
|
# include <inttypes.h>
|
||||||
|
#endif
|
||||||
|
#if HAVE_STDINT_H
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif
|
||||||
|
#define FILE_TIMESTAMP uintmax_t
|
||||||
|
|
||||||
|
#if !defined(HAVE_STRSIGNAL)
|
||||||
|
char *strsignal (int signum);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ISDIGIT offers the following features:
|
||||||
|
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||||
|
- It's guaranteed to evaluate its argument exactly once.
|
||||||
|
NOTE! Make relies on this behavior, don't change it!
|
||||||
|
- It's typically faster.
|
||||||
|
POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||||
|
only '0' through '9' are digits. Prefer ISDIGIT to isdigit() unless
|
||||||
|
it's important to use the locale's definition of 'digit' even when the
|
||||||
|
host does not conform to POSIX. */
|
||||||
|
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||||
|
|
||||||
|
/* Test if two strings are equal. Is this worthwhile? Should be profiled. */
|
||||||
|
#define streq(a, b) \
|
||||||
|
((a) == (b) || \
|
||||||
|
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
||||||
|
|
||||||
|
/* Test if two strings are equal, but match case-insensitively on systems
|
||||||
|
which have case-insensitive filesystems. Should only be used for
|
||||||
|
filenames! */
|
||||||
|
#ifdef HAVE_CASE_INSENSITIVE_FS
|
||||||
|
# define patheq(a, b) \
|
||||||
|
((a) == (b) \
|
||||||
|
|| (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
|
||||||
|
&& (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1))))
|
||||||
|
#else
|
||||||
|
# define patheq(a, b) streq(a, b)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
|
||||||
|
# define ENUM_BITFIELD(bits) :bits
|
||||||
|
#else
|
||||||
|
# define ENUM_BITFIELD(bits)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Handle gettext and locales. */
|
||||||
|
|
||||||
|
#if HAVE_LOCALE_H
|
||||||
|
# include <locale.h>
|
||||||
|
#else
|
||||||
|
# define setlocale(category, locale)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gettext.h>
|
||||||
|
|
||||||
|
#define _(msgid) gettext (msgid)
|
||||||
|
#define N_(msgid) gettext_noop (msgid)
|
||||||
|
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
|
||||||
|
|
||||||
|
/* This is needed for getcwd() and chdir(), on some W32 systems. */
|
||||||
|
#if defined(HAVE_DIRECT_H)
|
||||||
|
# include <direct.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
# include <fcntl.h>
|
||||||
|
# include <malloc.h>
|
||||||
|
# define pipe(_p) _pipe((_p), 512, O_BINARY)
|
||||||
|
# define kill(_pid,_sig) w32_kill((_pid),(_sig))
|
||||||
|
/* MSVC and Watcom C don't have ftruncate. */
|
||||||
|
# if defined(_MSC_VER) || defined(__WATCOMC__)
|
||||||
|
# define ftruncate(_fd,_len) _chsize(_fd,_len)
|
||||||
|
# endif
|
||||||
|
/* MinGW64 doesn't have _S_ISDIR. */
|
||||||
|
# ifndef _S_ISDIR
|
||||||
|
# define _S_ISDIR(m) S_ISDIR(m)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
void sync_Path_environment (void);
|
||||||
|
int w32_kill (pid_t pid, int sig);
|
||||||
|
int find_and_set_default_shell (const char *token);
|
||||||
|
|
||||||
|
/* indicates whether or not we have Bourne shell */
|
||||||
|
extern int no_default_sh_exe;
|
||||||
|
|
||||||
|
/* is default_shell unixy? */
|
||||||
|
extern int unixy_shell;
|
||||||
|
|
||||||
|
/* We don't have a preferred fixed value for LOCALEDIR. */
|
||||||
|
# ifndef LOCALEDIR
|
||||||
|
# define LOCALEDIR NULL
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Include only the minimal stuff from windows.h. */
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif /* WINDOWS32 */
|
||||||
|
|
||||||
|
#define ANY_SET(_v,_m) (((_v)&(_m)) != 0)
|
||||||
|
#define NONE_SET(_v,_m) (! ANY_SET ((_v),(_m)))
|
||||||
|
|
||||||
|
#define MAP_NUL 0x0001
|
||||||
|
#define MAP_BLANK 0x0002
|
||||||
|
#define MAP_NEWLINE 0x0004
|
||||||
|
#define MAP_COMMENT 0x0008
|
||||||
|
#define MAP_SEMI 0x0010
|
||||||
|
#define MAP_EQUALS 0x0020
|
||||||
|
#define MAP_COLON 0x0040
|
||||||
|
#define MAP_PERCENT 0x0080
|
||||||
|
#define MAP_PIPE 0x0100
|
||||||
|
#define MAP_DOT 0x0200
|
||||||
|
#define MAP_COMMA 0x0400
|
||||||
|
|
||||||
|
/* These are the valid characters for a user-defined function. */
|
||||||
|
#define MAP_USERFUNC 0x2000
|
||||||
|
/* This means not only a '$', but skip the variable reference. */
|
||||||
|
#define MAP_VARIABLE 0x4000
|
||||||
|
/* The set of characters which are directory separators is OS-specific. */
|
||||||
|
#define MAP_DIRSEP 0x8000
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
# define MAP_VMSCOMMA MAP_COMMA
|
||||||
|
#else
|
||||||
|
# define MAP_VMSCOMMA 0x0000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MAP_SPACE (MAP_BLANK|MAP_NEWLINE)
|
||||||
|
|
||||||
|
/* Handle other OSs.
|
||||||
|
To overcome an issue parsing paths in a DOS/Windows environment when
|
||||||
|
built in a unix based environment, override the PATH_SEPARATOR_CHAR
|
||||||
|
definition unless being built for Cygwin. */
|
||||||
|
#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__)
|
||||||
|
# undef PATH_SEPARATOR_CHAR
|
||||||
|
# define PATH_SEPARATOR_CHAR ';'
|
||||||
|
# define MAP_PATHSEP MAP_SEMI
|
||||||
|
#elif !defined(PATH_SEPARATOR_CHAR)
|
||||||
|
# if defined (VMS)
|
||||||
|
# define PATH_SEPARATOR_CHAR (vms_comma_separator ? ',' : ':')
|
||||||
|
# define MAP_PATHSEP (vms_comma_separator ? MAP_COMMA : MAP_SEMI)
|
||||||
|
# else
|
||||||
|
# define PATH_SEPARATOR_CHAR ':'
|
||||||
|
# define MAP_PATHSEP MAP_COLON
|
||||||
|
# endif
|
||||||
|
#elif PATH_SEPARATOR_CHAR == ':'
|
||||||
|
# define MAP_PATHSEP MAP_COLON
|
||||||
|
#elif PATH_SEPARATOR_CHAR == ';'
|
||||||
|
# define MAP_PATHSEP MAP_SEMI
|
||||||
|
#elif PATH_SEPARATOR_CHAR == ','
|
||||||
|
# define MAP_PATHSEP MAP_COMMA
|
||||||
|
#else
|
||||||
|
# error "Unknown PATH_SEPARATOR_CHAR"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STOP_SET(_v,_m) ANY_SET(stopchar_map[(unsigned char)(_v)],(_m))
|
||||||
|
|
||||||
|
#define ISBLANK(c) STOP_SET((c),MAP_BLANK)
|
||||||
|
#define ISSPACE(c) STOP_SET((c),MAP_SPACE)
|
||||||
|
#define NEXT_TOKEN(s) while (ISSPACE (*(s))) ++(s)
|
||||||
|
#define END_OF_TOKEN(s) while (! STOP_SET (*(s), MAP_SPACE|MAP_NUL)) ++(s)
|
||||||
|
|
||||||
|
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
|
||||||
|
# define SET_STACK_SIZE
|
||||||
|
#endif
|
||||||
|
#ifdef SET_STACK_SIZE
|
||||||
|
# include <sys/resource.h>
|
||||||
|
extern struct rlimit stack_limit;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NILF ((gmk_floc *)0)
|
||||||
|
|
||||||
|
#define CSTRLEN(_s) (sizeof (_s)-1)
|
||||||
|
#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
|
||||||
|
|
||||||
|
/* The number of bytes needed to represent the largest integer as a string. */
|
||||||
|
#define INTSTR_LENGTH CSTRLEN ("18446744073709551616")
|
||||||
|
|
||||||
|
#define DEFAULT_TTYNAME "true"
|
||||||
|
#ifdef HAVE_TTYNAME
|
||||||
|
# define TTYNAME(_f) ttyname (_f)
|
||||||
|
#else
|
||||||
|
# define TTYNAME(_f) DEFAULT_TTYNAME
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
const char *concat (unsigned int, ...);
|
||||||
|
void message (int prefix, size_t length, const char *fmt, ...)
|
||||||
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||||
|
void error (const gmk_floc *flocp, size_t length, const char *fmt, ...)
|
||||||
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||||
|
void fatal (const gmk_floc *flocp, size_t length, const char *fmt, ...)
|
||||||
|
__attribute__ ((noreturn, __format__ (__printf__, 3, 4)));
|
||||||
|
|
||||||
|
#define O(_t,_a,_f) _t((_a), 0, (_f))
|
||||||
|
#define OS(_t,_a,_f,_s) _t((_a), strlen (_s), (_f), (_s))
|
||||||
|
#define OSS(_t,_a,_f,_s1,_s2) _t((_a), strlen (_s1) + strlen (_s2), \
|
||||||
|
(_f), (_s1), (_s2))
|
||||||
|
#define OSSS(_t,_a,_f,_s1,_s2,_s3) _t((_a), strlen (_s1) + strlen (_s2) + strlen (_s3), \
|
||||||
|
(_f), (_s1), (_s2), (_s3))
|
||||||
|
#define ON(_t,_a,_f,_n) _t((_a), INTSTR_LENGTH, (_f), (_n))
|
||||||
|
#define ONN(_t,_a,_f,_n1,_n2) _t((_a), INTSTR_LENGTH*2, (_f), (_n1), (_n2))
|
||||||
|
|
||||||
|
#define OSN(_t,_a,_f,_s,_n) _t((_a), strlen (_s) + INTSTR_LENGTH, \
|
||||||
|
(_f), (_s), (_n))
|
||||||
|
#define ONS(_t,_a,_f,_n,_s) _t((_a), INTSTR_LENGTH + strlen (_s), \
|
||||||
|
(_f), (_n), (_s))
|
||||||
|
|
||||||
|
#define OUT_OF_MEM() O (fatal, NILF, _("virtual memory exhausted"))
|
||||||
|
|
||||||
|
void die (int) __attribute__ ((noreturn));
|
||||||
|
void pfatal_with_name (const char *) __attribute__ ((noreturn));
|
||||||
|
void perror_with_name (const char *, const char *);
|
||||||
|
#define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s))
|
||||||
|
void *xmalloc (unsigned int);
|
||||||
|
void *xcalloc (unsigned int);
|
||||||
|
void *xrealloc (void *, unsigned int);
|
||||||
|
char *xstrdup (const char *);
|
||||||
|
char *xstrndup (const char *, unsigned int);
|
||||||
|
char *find_next_token (const char **, unsigned int *);
|
||||||
|
char *next_token (const char *);
|
||||||
|
char *end_of_token (const char *);
|
||||||
|
void collapse_continuations (char *);
|
||||||
|
char *lindex (const char *, const char *, int);
|
||||||
|
int alpha_compare (const void *, const void *);
|
||||||
|
void print_spaces (unsigned int);
|
||||||
|
char *find_percent (char *);
|
||||||
|
const char *find_percent_cached (const char **);
|
||||||
|
|
||||||
|
#ifndef NO_ARCHIVES
|
||||||
|
int ar_name (const char *);
|
||||||
|
void ar_parse_name (const char *, char **, char **);
|
||||||
|
int ar_touch (const char *);
|
||||||
|
time_t ar_member_date (const char *);
|
||||||
|
|
||||||
|
typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
|
||||||
|
long int hdrpos, long int datapos,
|
||||||
|
long int size, long int date, int uid,
|
||||||
|
int gid, int mode, const void *arg);
|
||||||
|
|
||||||
|
long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
|
||||||
|
int ar_name_equal (const char *name, const char *mem, int truncated);
|
||||||
|
#ifndef VMS
|
||||||
|
int ar_member_touch (const char *arname, const char *memname);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int dir_file_exists_p (const char *, const char *);
|
||||||
|
int file_exists_p (const char *);
|
||||||
|
int file_impossible_p (const char *);
|
||||||
|
void file_impossible (const char *);
|
||||||
|
const char *dir_name (const char *);
|
||||||
|
void hash_init_directories (void);
|
||||||
|
|
||||||
|
void define_default_variables (void);
|
||||||
|
void undefine_default_variables (void);
|
||||||
|
void set_default_suffixes (void);
|
||||||
|
void install_default_suffix_rules (void);
|
||||||
|
void install_default_implicit_rules (void);
|
||||||
|
|
||||||
|
void build_vpath_lists (void);
|
||||||
|
void construct_vpath_list (char *pattern, char *dirpath);
|
||||||
|
const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr,
|
||||||
|
unsigned int* vpath_index, unsigned int* path_index);
|
||||||
|
int gpath_search (const char *file, unsigned int len);
|
||||||
|
|
||||||
|
void construct_include_path (const char **arg_dirs);
|
||||||
|
|
||||||
|
void user_access (void);
|
||||||
|
void make_access (void);
|
||||||
|
void child_access (void);
|
||||||
|
|
||||||
|
char *strip_whitespace (const char **begpp, const char **endpp);
|
||||||
|
|
||||||
|
void show_goal_error ();
|
||||||
|
|
||||||
|
/* String caching */
|
||||||
|
void strcache_init (void);
|
||||||
|
void strcache_print_stats (const char *prefix);
|
||||||
|
int strcache_iscached (const char *str);
|
||||||
|
const char *strcache_add (const char *str);
|
||||||
|
const char *strcache_add_len (const char *str, unsigned int len);
|
||||||
|
|
||||||
|
/* Guile support */
|
||||||
|
int guile_gmake_setup (const gmk_floc *flocp);
|
||||||
|
|
||||||
|
/* Loadable object support. Sets to the strcached name of the loaded file. */
|
||||||
|
typedef int (*load_func_t)(const gmk_floc *flocp);
|
||||||
|
int load_file (const gmk_floc *flocp, const char **filename, int noerror);
|
||||||
|
void unload_file (const char *name);
|
||||||
|
|
||||||
|
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
||||||
|
because such systems often declare them in header files anyway. */
|
||||||
|
|
||||||
|
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
|
||||||
|
|
||||||
|
long int atol ();
|
||||||
|
# ifndef VMS
|
||||||
|
long int lseek ();
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif /* Not GNU C library or POSIX. */
|
||||||
|
|
||||||
|
#ifdef HAVE_GETCWD
|
||||||
|
# if !defined(VMS) && !defined(__DECC)
|
||||||
|
char *getcwd ();
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
char *getwd ();
|
||||||
|
# define getcwd(buf, len) getwd (buf)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_STRCASECMP
|
||||||
|
# if HAVE_STRICMP
|
||||||
|
# define strcasecmp stricmp
|
||||||
|
# elif HAVE_STRCMPI
|
||||||
|
# define strcasecmp strcmpi
|
||||||
|
# else
|
||||||
|
/* Create our own, in misc.c */
|
||||||
|
int strcasecmp (const char *s1, const char *s2);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_STRNCASECMP
|
||||||
|
# if HAVE_STRNICMP
|
||||||
|
# define strncasecmp strnicmp
|
||||||
|
# elif HAVE_STRNCMPI
|
||||||
|
# define strncasecmp strncmpi
|
||||||
|
# else
|
||||||
|
/* Create our own, in misc.c */
|
||||||
|
int strncasecmp (const char *s1, const char *s2, int n);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define OUTPUT_SYNC_NONE 0
|
||||||
|
#define OUTPUT_SYNC_LINE 1
|
||||||
|
#define OUTPUT_SYNC_TARGET 2
|
||||||
|
#define OUTPUT_SYNC_RECURSE 3
|
||||||
|
|
||||||
|
extern const gmk_floc *reading_file;
|
||||||
|
extern const gmk_floc **expanding_var;
|
||||||
|
|
||||||
|
extern char **environ;
|
||||||
|
|
||||||
|
extern unsigned short stopchar_map[];
|
||||||
|
|
||||||
|
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
||||||
|
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
||||||
|
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||||
|
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
||||||
|
extern int warn_undefined_variables_flag, trace_flag, posix_pedantic;
|
||||||
|
extern int not_parallel, second_expansion, clock_skew_detected;
|
||||||
|
extern int rebuilding_makefiles, one_shell, output_sync, verify_flag;
|
||||||
|
|
||||||
|
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
||||||
|
extern int batch_mode_shell;
|
||||||
|
|
||||||
|
/* Resetting the command script introduction prefix character. */
|
||||||
|
#define RECIPEPREFIX_NAME ".RECIPEPREFIX"
|
||||||
|
#define RECIPEPREFIX_DEFAULT '\t'
|
||||||
|
extern char cmd_prefix;
|
||||||
|
|
||||||
|
extern unsigned int job_slots;
|
||||||
|
#ifndef NO_FLOAT
|
||||||
|
extern double max_load_average;
|
||||||
|
#else
|
||||||
|
extern int max_load_average;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
extern char *program;
|
||||||
|
#else
|
||||||
|
extern const char *program;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
const char *vms_command (const char *argv0);
|
||||||
|
const char *vms_progname (const char *argv0);
|
||||||
|
|
||||||
|
void vms_exit (int);
|
||||||
|
# define _exit(foo) vms_exit(foo)
|
||||||
|
# define exit(foo) vms_exit(foo)
|
||||||
|
|
||||||
|
extern char *program_name;
|
||||||
|
|
||||||
|
void
|
||||||
|
set_program_name (const char *arv0);
|
||||||
|
|
||||||
|
int
|
||||||
|
need_vms_symbol (void);
|
||||||
|
|
||||||
|
int
|
||||||
|
create_foreign_command (const char *command, const char *image);
|
||||||
|
|
||||||
|
int
|
||||||
|
vms_export_dcl_symbol (const char *name, const char *value);
|
||||||
|
|
||||||
|
int
|
||||||
|
vms_putenv_symbol (const char *string);
|
||||||
|
|
||||||
|
void
|
||||||
|
vms_restore_symbol (const char *string);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern char *starting_directory;
|
||||||
|
extern unsigned int makelevel;
|
||||||
|
extern char *version_string, *remote_description, *make_host;
|
||||||
|
|
||||||
|
extern unsigned int commands_started;
|
||||||
|
|
||||||
|
extern int handling_fatal_signal;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef MIN
|
||||||
|
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
|
||||||
|
#endif
|
||||||
|
#ifndef MAX
|
||||||
|
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define MAKE_SUCCESS 0
|
||||||
|
#define MAKE_TROUBLE 1
|
||||||
|
#define MAKE_FAILURE 2
|
||||||
|
|
||||||
|
/* Set up heap debugging library dmalloc. */
|
||||||
|
|
||||||
|
#ifdef HAVE_DMALLOC_H
|
||||||
|
#include <dmalloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef initialize_main
|
||||||
|
# ifdef __EMX__
|
||||||
|
# define initialize_main(pargc, pargv) \
|
||||||
|
{ _wildcard(pargc, pargv); _response(pargc, pargv); }
|
||||||
|
# else
|
||||||
|
# define initialize_main(pargc, pargv)
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __EMX__
|
||||||
|
# if !defined chdir
|
||||||
|
# define chdir _chdir2
|
||||||
|
# endif
|
||||||
|
# if !defined getcwd
|
||||||
|
# define getcwd _getcwd2
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* NO_CHDIR2 causes make not to use _chdir2() and _getcwd2() instead of
|
||||||
|
chdir() and getcwd(). This avoids some error messages for the
|
||||||
|
make testsuite but restricts the drive letter support. */
|
||||||
|
# ifdef NO_CHDIR2
|
||||||
|
# warning NO_CHDIR2: usage of drive letters restricted
|
||||||
|
# undef chdir
|
||||||
|
# undef getcwd
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef initialize_main
|
||||||
|
# define initialize_main(pargc, pargv)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Some systems (like Solaris, PTX, etc.) do not support the SA_RESTART flag
|
||||||
|
properly according to POSIX. So, we try to wrap common system calls with
|
||||||
|
checks for EINTR. Note that there are still plenty of system calls that
|
||||||
|
can fail with EINTR but this, reportedly, gets the vast majority of
|
||||||
|
failure cases. If you still experience failures you'll need to either get
|
||||||
|
a system where SA_RESTART works, or you need to avoid -j. */
|
||||||
|
|
||||||
|
#define EINTRLOOP(_v,_c) while (((_v)=_c)==-1 && errno==EINTR)
|
||||||
|
|
||||||
|
/* While system calls that return integers are pretty consistent about
|
||||||
|
returning -1 on failure and setting errno in that case, functions that
|
||||||
|
return pointers are not always so well behaved. Sometimes they return
|
||||||
|
NULL for expected behavior: one good example is readdir() which returns
|
||||||
|
NULL at the end of the directory--and _doesn't_ reset errno. So, we have
|
||||||
|
to do it ourselves here. */
|
||||||
|
|
||||||
|
#define ENULLLOOP(_v,_c) do { errno = 0; (_v) = _c; } \
|
||||||
|
while((_v)==0 && errno==EINTR)
|
||||||
591
misc.c
591
misc.c
@@ -1,67 +1,40 @@
|
|||||||
/* Miscellaneous generic support functions for GNU Make.
|
/* Miscellaneous generic support functions for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997,
|
Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
||||||
2002 Free Software Foundation, Inc.
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "makeint.h"
|
||||||
|
#include "filedef.h"
|
||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
/* Variadic functions. We go through contortions to allow proper function
|
/* GNU make no longer supports pre-ANSI89 environments. */
|
||||||
prototypes for both ANSI and pre-ANSI C compilers, and also for those
|
|
||||||
which support stdarg.h vs. varargs.h, and finally those which have
|
|
||||||
vfprintf(), etc. and those who have _doprnt... or nothing.
|
|
||||||
|
|
||||||
This fancy stuff all came from GNU fileutils, except for the VA_PRINTF and
|
#include <stdarg.h>
|
||||||
VA_END macros used here since we have multiple print functions. */
|
|
||||||
|
|
||||||
#if HAVE_VPRINTF || HAVE_DOPRNT
|
#ifdef HAVE_FCNTL_H
|
||||||
# define HAVE_STDVARARGS 1
|
# include <fcntl.h>
|
||||||
# if __STDC__
|
|
||||||
# include <stdarg.h>
|
|
||||||
# define VA_START(args, lastarg) va_start(args, lastarg)
|
|
||||||
# else
|
|
||||||
# include <varargs.h>
|
|
||||||
# define VA_START(args, lastarg) va_start(args)
|
|
||||||
# endif
|
|
||||||
# if HAVE_VPRINTF
|
|
||||||
# define VA_PRINTF(fp, lastarg, args) vfprintf((fp), (lastarg), (args))
|
|
||||||
# else
|
|
||||||
# define VA_PRINTF(fp, lastarg, args) _doprnt((lastarg), (args), (fp))
|
|
||||||
# endif
|
|
||||||
# define VA_END(args) va_end(args)
|
|
||||||
#else
|
#else
|
||||||
/* # undef HAVE_STDVARARGS */
|
# include <sys/file.h>
|
||||||
# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
|
|
||||||
# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
|
|
||||||
# define VA_START(args, lastarg)
|
|
||||||
# define VA_PRINTF(fp, lastarg, args) fprintf((fp), (lastarg), va_alist)
|
|
||||||
# define VA_END(args)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Compare strings *S1 and *S2.
|
/* Compare strings *S1 and *S2.
|
||||||
Return negative if the first is less, positive if it is greater,
|
Return negative if the first is less, positive if it is greater,
|
||||||
zero if they are equal. */
|
zero if they are equal. */
|
||||||
|
|
||||||
int
|
int
|
||||||
alpha_compare (v1, v2)
|
alpha_compare (const void *v1, const void *v2)
|
||||||
const void *v1, *v2;
|
|
||||||
{
|
{
|
||||||
const char *s1 = *((char **)v1);
|
const char *s1 = *((char **)v1);
|
||||||
const char *s2 = *((char **)v2);
|
const char *s2 = *((char **)v2);
|
||||||
@@ -76,12 +49,9 @@ alpha_compare (v1, v2)
|
|||||||
This is done by copying the text at LINE into itself. */
|
This is done by copying the text at LINE into itself. */
|
||||||
|
|
||||||
void
|
void
|
||||||
collapse_continuations (line)
|
collapse_continuations (char *line)
|
||||||
char *line;
|
|
||||||
{
|
{
|
||||||
register char *in, *out, *p;
|
char *in, *out, *p;
|
||||||
register int backslash;
|
|
||||||
register unsigned int bs_write;
|
|
||||||
|
|
||||||
in = strchr (line, '\n');
|
in = strchr (line, '\n');
|
||||||
if (in == 0)
|
if (in == 0)
|
||||||
@@ -96,8 +66,8 @@ collapse_continuations (line)
|
|||||||
/* BS_WRITE gets the number of quoted backslashes at
|
/* BS_WRITE gets the number of quoted backslashes at
|
||||||
the end just before IN, and BACKSLASH gets nonzero
|
the end just before IN, and BACKSLASH gets nonzero
|
||||||
if the next character is quoted. */
|
if the next character is quoted. */
|
||||||
backslash = 0;
|
unsigned int backslash = 0;
|
||||||
bs_write = 0;
|
unsigned int bs_write = 0;
|
||||||
for (p = in - 1; p >= line && *p == '\\'; --p)
|
for (p = in - 1; p >= line && *p == '\\'; --p)
|
||||||
{
|
{
|
||||||
if (backslash)
|
if (backslash)
|
||||||
@@ -117,12 +87,17 @@ collapse_continuations (line)
|
|||||||
/* Skip the newline. */
|
/* Skip the newline. */
|
||||||
++in;
|
++in;
|
||||||
|
|
||||||
/* If the newline is quoted, discard following whitespace
|
|
||||||
and any preceding whitespace; leave just one space. */
|
|
||||||
if (backslash)
|
if (backslash)
|
||||||
{
|
{
|
||||||
in = next_token (in);
|
/* Backslash/newline handling:
|
||||||
while (out > line && isblank ((unsigned char)out[-1]))
|
In traditional GNU make all trailing whitespace, consecutive
|
||||||
|
backslash/newlines, and any leading non-newline whitespace on the
|
||||||
|
next line is reduced to a single space.
|
||||||
|
In POSIX, each backslash/newline and is replaced by a space. */
|
||||||
|
while (ISBLANK (*in))
|
||||||
|
++in;
|
||||||
|
if (! posix_pedantic)
|
||||||
|
while (out > line && ISBLANK (out[-1]))
|
||||||
--out;
|
--out;
|
||||||
*out++ = ' ';
|
*out++ = ' ';
|
||||||
}
|
}
|
||||||
@@ -152,172 +127,68 @@ collapse_continuations (line)
|
|||||||
|
|
||||||
*out = '\0';
|
*out = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Remove comments from LINE.
|
|
||||||
This is done by copying the text at LINE onto itself. */
|
|
||||||
|
|
||||||
void
|
|
||||||
remove_comments (line)
|
|
||||||
char *line;
|
|
||||||
{
|
|
||||||
char *comment;
|
|
||||||
|
|
||||||
comment = find_char_unquote (line, '#', 0, 0);
|
|
||||||
|
|
||||||
if (comment != 0)
|
|
||||||
/* Cut off the line at the #. */
|
|
||||||
*comment = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print N spaces (used in debug for target-depth). */
|
/* Print N spaces (used in debug for target-depth). */
|
||||||
|
|
||||||
void
|
void
|
||||||
print_spaces (n)
|
print_spaces (unsigned int n)
|
||||||
unsigned int n;
|
|
||||||
{
|
{
|
||||||
while (n-- > 0)
|
while (n-- > 0)
|
||||||
putchar (' ');
|
putchar (' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return a newly-allocated string whose contents
|
/* Return a string whose contents concatenate the NUM strings provided
|
||||||
concatenate those of s1, s2, s3. */
|
This string lives in static, re-used memory. */
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
concat (s1, s2, s3)
|
concat (unsigned int num, ...)
|
||||||
const char *s1, *s2, *s3;
|
|
||||||
{
|
{
|
||||||
unsigned int len1, len2, len3;
|
static unsigned int rlen = 0;
|
||||||
char *result;
|
static char *result = NULL;
|
||||||
|
unsigned int ri = 0;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
len1 = *s1 != '\0' ? strlen (s1) : 0;
|
va_start (args, num);
|
||||||
len2 = *s2 != '\0' ? strlen (s2) : 0;
|
|
||||||
len3 = *s3 != '\0' ? strlen (s3) : 0;
|
|
||||||
|
|
||||||
result = (char *) xmalloc (len1 + len2 + len3 + 1);
|
while (num-- > 0)
|
||||||
|
{
|
||||||
|
const char *s = va_arg (args, const char *);
|
||||||
|
unsigned int l = xstrlen (s);
|
||||||
|
|
||||||
if (*s1 != '\0')
|
if (l == 0)
|
||||||
bcopy (s1, result, len1);
|
continue;
|
||||||
if (*s2 != '\0')
|
|
||||||
bcopy (s2, result + len1, len2);
|
if (ri + l > rlen)
|
||||||
if (*s3 != '\0')
|
{
|
||||||
bcopy (s3, result + len1 + len2, len3);
|
rlen = ((rlen ? rlen : 60) + l) * 2;
|
||||||
*(result + len1 + len2 + len3) = '\0';
|
result = xrealloc (result, rlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy (result + ri, s, l);
|
||||||
|
ri += l;
|
||||||
|
}
|
||||||
|
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
/* Get some more memory if we don't have enough space for the
|
||||||
|
terminating '\0'. */
|
||||||
|
if (ri == rlen)
|
||||||
|
{
|
||||||
|
rlen = (rlen ? rlen : 60) * 2;
|
||||||
|
result = xrealloc (result, rlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
result[ri] = '\0';
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print a message on stdout. */
|
|
||||||
|
|
||||||
void
|
|
||||||
#if __STDC__ && HAVE_STDVARARGS
|
|
||||||
message (int prefix, const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
message (prefix, fmt, va_alist)
|
|
||||||
int prefix;
|
|
||||||
const char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if HAVE_STDVARARGS
|
|
||||||
va_list args;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
log_working_directory (1);
|
|
||||||
|
|
||||||
if (fmt != 0)
|
|
||||||
{
|
|
||||||
if (prefix)
|
|
||||||
{
|
|
||||||
if (makelevel == 0)
|
|
||||||
printf ("%s: ", program);
|
|
||||||
else
|
|
||||||
printf ("%s[%u]: ", program, makelevel);
|
|
||||||
}
|
|
||||||
VA_START (args, fmt);
|
|
||||||
VA_PRINTF (stdout, fmt, args);
|
|
||||||
VA_END (args);
|
|
||||||
putchar ('\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
fflush (stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print an error message. */
|
|
||||||
|
|
||||||
void
|
|
||||||
#if __STDC__ && HAVE_STDVARARGS
|
|
||||||
error (const struct floc *flocp, const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
error (flocp, fmt, va_alist)
|
|
||||||
const struct floc *flocp;
|
|
||||||
const char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if HAVE_STDVARARGS
|
|
||||||
va_list args;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
log_working_directory (1);
|
|
||||||
|
|
||||||
if (flocp && flocp->filenm)
|
|
||||||
fprintf (stderr, "%s:%lu: ", flocp->filenm, flocp->lineno);
|
|
||||||
else if (makelevel == 0)
|
|
||||||
fprintf (stderr, "%s: ", program);
|
|
||||||
else
|
|
||||||
fprintf (stderr, "%s[%u]: ", program, makelevel);
|
|
||||||
|
|
||||||
VA_START(args, fmt);
|
|
||||||
VA_PRINTF (stderr, fmt, args);
|
|
||||||
VA_END (args);
|
|
||||||
|
|
||||||
putc ('\n', stderr);
|
|
||||||
fflush (stderr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print an error message and exit. */
|
|
||||||
|
|
||||||
void
|
|
||||||
#if __STDC__ && HAVE_STDVARARGS
|
|
||||||
fatal (const struct floc *flocp, const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
fatal (flocp, fmt, va_alist)
|
|
||||||
const struct floc *flocp;
|
|
||||||
const char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if HAVE_STDVARARGS
|
|
||||||
va_list args;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
log_working_directory (1);
|
|
||||||
|
|
||||||
if (flocp && flocp->filenm)
|
|
||||||
fprintf (stderr, "%s:%lu: *** ", flocp->filenm, flocp->lineno);
|
|
||||||
else if (makelevel == 0)
|
|
||||||
fprintf (stderr, "%s: *** ", program);
|
|
||||||
else
|
|
||||||
fprintf (stderr, "%s[%u]: *** ", program, makelevel);
|
|
||||||
|
|
||||||
VA_START(args, fmt);
|
|
||||||
VA_PRINTF (stderr, fmt, args);
|
|
||||||
VA_END (args);
|
|
||||||
|
|
||||||
fputs (_(". Stop.\n"), stderr);
|
|
||||||
|
|
||||||
die (2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef HAVE_STRERROR
|
#ifndef HAVE_STRERROR
|
||||||
|
|
||||||
#undef strerror
|
#undef strerror
|
||||||
|
|
||||||
char *
|
char *
|
||||||
strerror (errnum)
|
strerror (int errnum)
|
||||||
int errnum;
|
|
||||||
{
|
{
|
||||||
extern int errno, sys_nerr;
|
extern int errno, sys_nerr;
|
||||||
#ifndef __DECC
|
#ifndef __DECC
|
||||||
@@ -332,26 +203,6 @@ strerror (errnum)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Print an error message from errno. */
|
|
||||||
|
|
||||||
void
|
|
||||||
perror_with_name (str, name)
|
|
||||||
const char *str, *name;
|
|
||||||
{
|
|
||||||
error (NILF, _("%s%s: %s"), str, name, strerror (errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print an error message from errno and exit. */
|
|
||||||
|
|
||||||
void
|
|
||||||
pfatal_with_name (name)
|
|
||||||
const char *name;
|
|
||||||
{
|
|
||||||
fatal (NILF, _("%s: %s"), name, strerror (errno));
|
|
||||||
|
|
||||||
/* NOTREACHED */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Like malloc but get fatal error if memory is exhausted. */
|
/* Like malloc but get fatal error if memory is exhausted. */
|
||||||
/* Don't bother if we're using dmalloc; it provides these for us. */
|
/* Don't bother if we're using dmalloc; it provides these for us. */
|
||||||
@@ -359,102 +210,89 @@ pfatal_with_name (name)
|
|||||||
#ifndef HAVE_DMALLOC_H
|
#ifndef HAVE_DMALLOC_H
|
||||||
|
|
||||||
#undef xmalloc
|
#undef xmalloc
|
||||||
|
#undef xcalloc
|
||||||
#undef xrealloc
|
#undef xrealloc
|
||||||
#undef xstrdup
|
#undef xstrdup
|
||||||
|
|
||||||
char *
|
void *
|
||||||
xmalloc (size)
|
xmalloc (unsigned int size)
|
||||||
unsigned int size;
|
|
||||||
{
|
{
|
||||||
char *result = (char *) malloc (size);
|
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
||||||
|
void *result = malloc (size ? size : 1);
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
void *
|
||||||
xrealloc (ptr, size)
|
xcalloc (unsigned int size)
|
||||||
char *ptr;
|
|
||||||
unsigned int size;
|
|
||||||
{
|
{
|
||||||
char *result;
|
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
||||||
|
void *result = calloc (size ? size : 1, 1);
|
||||||
|
if (result == 0)
|
||||||
|
OUT_OF_MEM();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/* Some older implementations of realloc() don't conform to ANSI. */
|
|
||||||
|
void *
|
||||||
|
xrealloc (void *ptr, unsigned int size)
|
||||||
|
{
|
||||||
|
void *result;
|
||||||
|
|
||||||
|
/* Some older implementations of realloc() don't conform to ISO. */
|
||||||
|
if (! size)
|
||||||
|
size = 1;
|
||||||
result = ptr ? realloc (ptr, size) : malloc (size);
|
result = ptr ? realloc (ptr, size) : malloc (size);
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
xstrdup (ptr)
|
xstrdup (const char *ptr)
|
||||||
const char *ptr;
|
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
|
|
||||||
#ifdef HAVE_STRDUP
|
#ifdef HAVE_STRDUP
|
||||||
result = strdup (ptr);
|
result = strdup (ptr);
|
||||||
#else
|
#else
|
||||||
result = (char *) malloc (strlen (ptr) + 1);
|
result = malloc (strlen (ptr) + 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
fatal (NILF, _("virtual memory exhausted"));
|
OUT_OF_MEM();
|
||||||
|
|
||||||
#ifdef HAVE_STRDUP
|
#ifdef HAVE_STRDUP
|
||||||
return result;
|
return result;
|
||||||
#else
|
#else
|
||||||
return strcpy(result, ptr);
|
return strcpy (result, ptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_DMALLOC_H */
|
#endif /* HAVE_DMALLOC_H */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
savestring (str, length)
|
xstrndup (const char *str, unsigned int length)
|
||||||
const char *str;
|
|
||||||
unsigned int length;
|
|
||||||
{
|
{
|
||||||
register char *out = (char *) xmalloc (length + 1);
|
char *result;
|
||||||
|
|
||||||
|
#ifdef HAVE_STRNDUP
|
||||||
|
result = strndup (str, length);
|
||||||
|
if (result == 0)
|
||||||
|
OUT_OF_MEM();
|
||||||
|
#else
|
||||||
|
result = xmalloc (length + 1);
|
||||||
if (length > 0)
|
if (length > 0)
|
||||||
bcopy (str, out, length);
|
strncpy (result, str, length);
|
||||||
out[length] = '\0';
|
result[length] = '\0';
|
||||||
return out;
|
#endif
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search string BIG (length BLEN) for an occurrence of
|
|
||||||
string SMALL (length SLEN). Return a pointer to the
|
|
||||||
beginning of the first occurrence, or return nil if none found. */
|
|
||||||
|
|
||||||
char *
|
|
||||||
sindex (big, blen, small, slen)
|
|
||||||
const char *big;
|
|
||||||
unsigned int blen;
|
|
||||||
const char *small;
|
|
||||||
unsigned int slen;
|
|
||||||
{
|
|
||||||
if (!blen)
|
|
||||||
blen = strlen (big);
|
|
||||||
if (!slen)
|
|
||||||
slen = strlen (small);
|
|
||||||
|
|
||||||
if (slen && blen >= slen)
|
|
||||||
{
|
|
||||||
register unsigned int b;
|
|
||||||
|
|
||||||
/* Quit when there's not enough room left for the small string. */
|
|
||||||
--slen;
|
|
||||||
blen -= slen;
|
|
||||||
|
|
||||||
for (b = 0; b < blen; ++b, ++big)
|
|
||||||
if (*big == *small && strneq (big + 1, small + 1, slen))
|
|
||||||
return (char *)big;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Limited INDEX:
|
/* Limited INDEX:
|
||||||
Search through the string STRING, which ends at LIMIT, for the character C.
|
Search through the string STRING, which ends at LIMIT, for the character C.
|
||||||
@@ -463,9 +301,7 @@ sindex (big, blen, small, slen)
|
|||||||
instead of at the first null. */
|
instead of at the first null. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
lindex (s, limit, c)
|
lindex (const char *s, const char *limit, int c)
|
||||||
register const char *s, *limit;
|
|
||||||
int c;
|
|
||||||
{
|
{
|
||||||
while (s < limit)
|
while (s < limit)
|
||||||
if (*s++ == c)
|
if (*s++ == c)
|
||||||
@@ -477,94 +313,57 @@ lindex (s, limit, c)
|
|||||||
/* Return the address of the first whitespace or null in the string S. */
|
/* Return the address of the first whitespace or null in the string S. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
end_of_token (s)
|
end_of_token (const char *s)
|
||||||
char *s;
|
|
||||||
{
|
{
|
||||||
while (*s != '\0' && !isblank ((unsigned char)*s))
|
END_OF_TOKEN (s);
|
||||||
++s;
|
return (char *)s;
|
||||||
return s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
|
||||||
/*
|
|
||||||
* Same as end_of_token, but take into account a stop character
|
|
||||||
*/
|
|
||||||
char *
|
|
||||||
end_of_token_w32 (s, stopchar)
|
|
||||||
char *s;
|
|
||||||
char stopchar;
|
|
||||||
{
|
|
||||||
register char *p = s;
|
|
||||||
register int backslash = 0;
|
|
||||||
|
|
||||||
while (*p != '\0' && *p != stopchar
|
|
||||||
&& (backslash || !isblank ((unsigned char)*p)))
|
|
||||||
{
|
|
||||||
if (*p++ == '\\')
|
|
||||||
{
|
|
||||||
backslash = !backslash;
|
|
||||||
while (*p == '\\')
|
|
||||||
{
|
|
||||||
backslash = !backslash;
|
|
||||||
++p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
backslash = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Return the address of the first nonwhitespace or null in the string S. */
|
/* Return the address of the first nonwhitespace or null in the string S. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
next_token (s)
|
next_token (const char *s)
|
||||||
const char *s;
|
|
||||||
{
|
{
|
||||||
while (isblank ((unsigned char)*s))
|
NEXT_TOKEN (s);
|
||||||
++s;
|
|
||||||
return (char *)s;
|
return (char *)s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the next token in PTR; return the address of it, and store the
|
/* Find the next token in PTR; return the address of it, and store the length
|
||||||
length of the token into *LENGTHPTR if LENGTHPTR is not nil. */
|
of the token into *LENGTHPTR if LENGTHPTR is not nil. Set *PTR to the end
|
||||||
|
of the token, so this function can be called repeatedly in a loop. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
find_next_token (ptr, lengthptr)
|
find_next_token (const char **ptr, unsigned int *lengthptr)
|
||||||
char **ptr;
|
|
||||||
unsigned int *lengthptr;
|
|
||||||
{
|
{
|
||||||
char *p = next_token (*ptr);
|
const char *p = next_token (*ptr);
|
||||||
char *end;
|
|
||||||
|
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
*ptr = end = end_of_token (p);
|
*ptr = end_of_token (p);
|
||||||
if (lengthptr != 0)
|
if (lengthptr != 0)
|
||||||
*lengthptr = end - p;
|
*lengthptr = *ptr - p;
|
||||||
return p;
|
|
||||||
|
return (char *)p;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy a chain of `struct dep', making a new chain
|
|
||||||
with the same contents as the old one. */
|
/* Copy a chain of 'struct dep'. For 2nd expansion deps, dup the name. */
|
||||||
|
|
||||||
struct dep *
|
struct dep *
|
||||||
copy_dep_chain (d)
|
copy_dep_chain (const struct dep *d)
|
||||||
register struct dep *d;
|
|
||||||
{
|
{
|
||||||
register struct dep *c;
|
|
||||||
struct dep *firstnew = 0;
|
struct dep *firstnew = 0;
|
||||||
struct dep *lastnew = 0;
|
struct dep *lastnew = 0;
|
||||||
|
|
||||||
while (d != 0)
|
while (d != 0)
|
||||||
{
|
{
|
||||||
c = (struct dep *) xmalloc (sizeof (struct dep));
|
struct dep *c = xmalloc (sizeof (struct dep));
|
||||||
bcopy ((char *) d, (char *) c, sizeof (struct dep));
|
memcpy (c, d, sizeof (struct dep));
|
||||||
if (c->name != 0)
|
|
||||||
|
if (c->need_2nd_expansion)
|
||||||
c->name = xstrdup (c->name);
|
c->name = xstrdup (c->name);
|
||||||
|
|
||||||
c->next = 0;
|
c->next = 0;
|
||||||
if (firstnew == 0)
|
if (firstnew == 0)
|
||||||
firstnew = lastnew = c;
|
firstnew = lastnew = c;
|
||||||
@@ -576,15 +375,71 @@ copy_dep_chain (d)
|
|||||||
|
|
||||||
return firstnew;
|
return firstnew;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef iAPX286
|
|
||||||
/* The losing compiler on this machine can't handle this macro. */
|
|
||||||
|
|
||||||
char *
|
/* Free a chain of struct nameseq.
|
||||||
dep_name (dep)
|
For struct dep chains use free_dep_chain. */
|
||||||
struct dep *dep;
|
|
||||||
|
void
|
||||||
|
free_ns_chain (struct nameseq *ns)
|
||||||
{
|
{
|
||||||
return dep->name == 0 ? dep->file->name : dep->name;
|
while (ns != 0)
|
||||||
|
{
|
||||||
|
struct nameseq *t = ns;
|
||||||
|
ns = ns->next;
|
||||||
|
free_ns (t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if !HAVE_STRCASECMP && !HAVE_STRICMP && !HAVE_STRCMPI
|
||||||
|
/* If we don't have strcasecmp() (from POSIX), or anything that can substitute
|
||||||
|
for it, define our own version. */
|
||||||
|
|
||||||
|
int
|
||||||
|
strcasecmp (const char *s1, const char *s2)
|
||||||
|
{
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
int c1 = (int) *(s1++);
|
||||||
|
int c2 = (int) *(s2++);
|
||||||
|
|
||||||
|
if (isalpha (c1))
|
||||||
|
c1 = tolower (c1);
|
||||||
|
if (isalpha (c2))
|
||||||
|
c2 = tolower (c2);
|
||||||
|
|
||||||
|
if (c1 != '\0' && c1 == c2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
return (c1 - c2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_STRNCASECMP && !HAVE_STRNICMP && !HAVE_STRNCMPI
|
||||||
|
/* If we don't have strncasecmp() (from POSIX), or anything that can
|
||||||
|
substitute for it, define our own version. */
|
||||||
|
|
||||||
|
int
|
||||||
|
strncasecmp (const char *s1, const char *s2, int n)
|
||||||
|
{
|
||||||
|
while (n-- > 0)
|
||||||
|
{
|
||||||
|
int c1 = (int) *(s1++);
|
||||||
|
int c2 = (int) *(s2++);
|
||||||
|
|
||||||
|
if (isalpha (c1))
|
||||||
|
c1 = tolower (c1);
|
||||||
|
if (isalpha (c2))
|
||||||
|
c2 = tolower (c2);
|
||||||
|
|
||||||
|
if (c1 != '\0' && c1 == c2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
return (c1 - c2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -641,8 +496,7 @@ static enum { make, user } current_access;
|
|||||||
/* Under -d, write a message describing the current IDs. */
|
/* Under -d, write a message describing the current IDs. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
log_access (flavor)
|
log_access (const char *flavor)
|
||||||
char *flavor;
|
|
||||||
{
|
{
|
||||||
if (! ISDB (DB_JOBS))
|
if (! ISDB (DB_JOBS))
|
||||||
return;
|
return;
|
||||||
@@ -659,7 +513,7 @@ log_access (flavor)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_access ()
|
init_access (void)
|
||||||
{
|
{
|
||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
user_uid = getuid ();
|
user_uid = getuid ();
|
||||||
@@ -683,7 +537,7 @@ init_access ()
|
|||||||
/* Give the process appropriate permissions for access to
|
/* Give the process appropriate permissions for access to
|
||||||
user data (i.e., to stat files, or to spawn a child process). */
|
user data (i.e., to stat files, or to spawn a child process). */
|
||||||
void
|
void
|
||||||
user_access ()
|
user_access (void)
|
||||||
{
|
{
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
@@ -759,7 +613,7 @@ user_access ()
|
|||||||
/* Give the process appropriate permissions for access to
|
/* Give the process appropriate permissions for access to
|
||||||
make data (i.e., the load average). */
|
make data (i.e., the load average). */
|
||||||
void
|
void
|
||||||
make_access ()
|
make_access (void)
|
||||||
{
|
{
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
@@ -807,7 +661,7 @@ make_access ()
|
|||||||
/* Give the process appropriate permissions for a child process.
|
/* Give the process appropriate permissions for a child process.
|
||||||
This is like user_access, but you can't get back to make_access. */
|
This is like user_access, but you can't get back to make_access. */
|
||||||
void
|
void
|
||||||
child_access ()
|
child_access (void)
|
||||||
{
|
{
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
@@ -837,10 +691,10 @@ child_access ()
|
|||||||
|
|
||||||
#endif /* GETLOADAVG_PRIVILEGED */
|
#endif /* GETLOADAVG_PRIVILEGED */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEED_GET_PATH_MAX
|
#ifdef NEED_GET_PATH_MAX
|
||||||
unsigned int
|
unsigned int
|
||||||
get_path_max ()
|
get_path_max (void)
|
||||||
{
|
{
|
||||||
static unsigned int value;
|
static unsigned int value;
|
||||||
|
|
||||||
@@ -856,38 +710,3 @@ get_path_max ()
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_BROKEN_RESTART
|
|
||||||
|
|
||||||
#undef stat
|
|
||||||
#undef readdir
|
|
||||||
|
|
||||||
int
|
|
||||||
atomic_stat(file, buf)
|
|
||||||
const char *file;
|
|
||||||
struct stat *buf;
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
|
|
||||||
while ((r = stat (file, buf)) < 0)
|
|
||||||
if (errno != EINTR)
|
|
||||||
break;
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct dirent *
|
|
||||||
atomic_readdir(dir)
|
|
||||||
DIR *dir;
|
|
||||||
{
|
|
||||||
struct dirent *r;
|
|
||||||
|
|
||||||
while ((r = readdir (dir)) == NULL)
|
|
||||||
if (errno != EINTR)
|
|
||||||
break;
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* HAVE_BROKEN_RESTART */
|
|
||||||
|
|||||||
84
os.h
Normal file
84
os.h
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
/* Declarations for operating system interfaces for GNU Make.
|
||||||
|
Copyright (C) 2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
|
/* This section provides OS-specific functions to support the jobserver. */
|
||||||
|
|
||||||
|
#ifdef MAKE_JOBSERVER
|
||||||
|
|
||||||
|
/* Returns 1 if the jobserver is enabled, else 0. */
|
||||||
|
unsigned int jobserver_enabled ();
|
||||||
|
|
||||||
|
/* Called in the master instance to set up the jobserver initially. */
|
||||||
|
unsigned int jobserver_setup (int job_slots);
|
||||||
|
|
||||||
|
/* Called in a child instance to connect to the jobserver. */
|
||||||
|
unsigned int jobserver_parse_auth (const char* auth);
|
||||||
|
|
||||||
|
/* Returns an allocated buffer used to pass to child instances. */
|
||||||
|
char *jobserver_get_auth ();
|
||||||
|
|
||||||
|
/* Clear this instance's jobserver configuration. */
|
||||||
|
void jobserver_clear ();
|
||||||
|
|
||||||
|
/* Recover all the jobserver tokens and return the number we got. */
|
||||||
|
unsigned int jobserver_acquire_all ();
|
||||||
|
|
||||||
|
/* Release a jobserver token. If it fails and is_fatal is 1, fatal. */
|
||||||
|
void jobserver_release (int is_fatal);
|
||||||
|
|
||||||
|
/* Notify the jobserver that a child exited. */
|
||||||
|
void jobserver_signal ();
|
||||||
|
|
||||||
|
/* Get ready to start a non-recursive child. */
|
||||||
|
void jobserver_pre_child ();
|
||||||
|
|
||||||
|
/* Complete starting a non-recursive child. */
|
||||||
|
void jobserver_post_child ();
|
||||||
|
|
||||||
|
/* Set up to acquire a new token. */
|
||||||
|
void jobserver_pre_acquire ();
|
||||||
|
|
||||||
|
/* Wait until we can acquire a jobserver token.
|
||||||
|
TIMEOUT is 1 if we have other jobs waiting for the load to go down;
|
||||||
|
in this case we won't wait forever, so we can check the load.
|
||||||
|
Returns 1 if we got a token, or 0 if we stopped waiting due to a child
|
||||||
|
exiting or a timeout. */
|
||||||
|
unsigned int jobserver_acquire (int timeout);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define jobserver_enabled() (0)
|
||||||
|
#define jobserver_setup(_slots) (0)
|
||||||
|
#define jobserver_parse_auth(_auth) (0)
|
||||||
|
#define jobserver_get_auth() (NULL)
|
||||||
|
#define jobserver_clear() (void)(0)
|
||||||
|
#define jobserver_release(_fatal) (void)(0)
|
||||||
|
#define jobserver_acquire_all() (0)
|
||||||
|
#define jobserver_signal() (void)(0)
|
||||||
|
#define jobserver_pre_child(_r) (void)(0)
|
||||||
|
#define jobserver_post_child(_r) (void)(0)
|
||||||
|
#define jobserver_pre_acquire() (void)(0)
|
||||||
|
#define jobserver_acquire(_tmout) (0)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Create a "bad" file descriptor for stdin when parallel jobs are run. */
|
||||||
|
#if !defined(VMD) && !defined(WINDOWS32) && !defined(_AMIGA) && !defined(__MSDOS__)
|
||||||
|
int get_bad_stdin ();
|
||||||
|
#else
|
||||||
|
# define get_bad_stdin() (-1)
|
||||||
|
#endif
|
||||||
723
output.c
Normal file
723
output.c
Normal file
@@ -0,0 +1,723 @@
|
|||||||
|
/* Output to stdout / stderr for GNU make
|
||||||
|
Copyright (C) 2013-2016 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "makeint.h"
|
||||||
|
#include "job.h"
|
||||||
|
|
||||||
|
/* GNU make no longer supports pre-ANSI89 environments. */
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# include <fcntl.h>
|
||||||
|
#else
|
||||||
|
# include <sys/file.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
# include <windows.h>
|
||||||
|
# include <io.h>
|
||||||
|
# include "sub_proc.h"
|
||||||
|
#endif /* WINDOWS32 */
|
||||||
|
|
||||||
|
struct output *output_context = NULL;
|
||||||
|
unsigned int stdio_traced = 0;
|
||||||
|
|
||||||
|
#define OUTPUT_NONE (-1)
|
||||||
|
|
||||||
|
#define OUTPUT_ISSET(_out) ((_out)->out >= 0 || (_out)->err >= 0)
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# define STREAM_OK(_s) ((fcntl (fileno (_s), F_GETFD) != -1) || (errno != EBADF))
|
||||||
|
#else
|
||||||
|
# define STREAM_OK(_s) 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Write a string to the current STDOUT or STDERR. */
|
||||||
|
static void
|
||||||
|
_outputs (struct output *out, int is_err, const char *msg)
|
||||||
|
{
|
||||||
|
if (! out || ! out->syncout)
|
||||||
|
{
|
||||||
|
FILE *f = is_err ? stderr : stdout;
|
||||||
|
fputs (msg, f);
|
||||||
|
fflush (f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int fd = is_err ? out->err : out->out;
|
||||||
|
int len = strlen (msg);
|
||||||
|
int r;
|
||||||
|
|
||||||
|
EINTRLOOP (r, lseek (fd, 0, SEEK_END));
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
EINTRLOOP (r, write (fd, msg, len));
|
||||||
|
if (r == len || r <= 0)
|
||||||
|
break;
|
||||||
|
len -= r;
|
||||||
|
msg += r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Write a message indicating that we've just entered or
|
||||||
|
left (according to ENTERING) the current directory. */
|
||||||
|
|
||||||
|
static int
|
||||||
|
log_working_directory (int entering)
|
||||||
|
{
|
||||||
|
static char *buf = NULL;
|
||||||
|
static unsigned int len = 0;
|
||||||
|
unsigned int need;
|
||||||
|
const char *fmt;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
/* Get enough space for the longest possible output. */
|
||||||
|
need = strlen (program) + INTSTR_LENGTH + 2 + 1;
|
||||||
|
if (starting_directory)
|
||||||
|
need += strlen (starting_directory);
|
||||||
|
|
||||||
|
/* Use entire sentences to give the translators a fighting chance. */
|
||||||
|
if (makelevel == 0)
|
||||||
|
if (starting_directory == 0)
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s: Entering an unknown directory\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s: Leaving an unknown directory\n");
|
||||||
|
else
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s: Entering directory '%s'\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s: Leaving directory '%s'\n");
|
||||||
|
else
|
||||||
|
if (starting_directory == 0)
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s[%u]: Entering an unknown directory\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s[%u]: Leaving an unknown directory\n");
|
||||||
|
else
|
||||||
|
if (entering)
|
||||||
|
fmt = _("%s[%u]: Entering directory '%s'\n");
|
||||||
|
else
|
||||||
|
fmt = _("%s[%u]: Leaving directory '%s'\n");
|
||||||
|
|
||||||
|
need += strlen (fmt);
|
||||||
|
|
||||||
|
if (need > len)
|
||||||
|
{
|
||||||
|
buf = xrealloc (buf, need);
|
||||||
|
len = need;
|
||||||
|
}
|
||||||
|
|
||||||
|
p = buf;
|
||||||
|
if (print_data_base_flag)
|
||||||
|
{
|
||||||
|
*(p++) = '#';
|
||||||
|
*(p++) = ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (makelevel == 0)
|
||||||
|
if (starting_directory == 0)
|
||||||
|
sprintf (p, fmt , program);
|
||||||
|
else
|
||||||
|
sprintf (p, fmt, program, starting_directory);
|
||||||
|
else if (starting_directory == 0)
|
||||||
|
sprintf (p, fmt, program, makelevel);
|
||||||
|
else
|
||||||
|
sprintf (p, fmt, program, makelevel, starting_directory);
|
||||||
|
|
||||||
|
_outputs (NULL, 0, buf);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set a file descriptor to be in O_APPEND mode.
|
||||||
|
If it fails, just ignore it. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_append_mode (int fd)
|
||||||
|
{
|
||||||
|
#if defined(F_GETFL) && defined(F_SETFL) && defined(O_APPEND)
|
||||||
|
int flags = fcntl (fd, F_GETFL, 0);
|
||||||
|
if (flags >= 0)
|
||||||
|
fcntl (fd, F_SETFL, flags | O_APPEND);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_OUTPUT_SYNC
|
||||||
|
|
||||||
|
/* Semaphore for use in -j mode with output_sync. */
|
||||||
|
static sync_handle_t sync_handle = -1;
|
||||||
|
|
||||||
|
#define FD_NOT_EMPTY(_f) ((_f) != OUTPUT_NONE && lseek ((_f), 0, SEEK_END) > 0)
|
||||||
|
|
||||||
|
/* Set up the sync handle. Disables output_sync on error. */
|
||||||
|
static int
|
||||||
|
sync_init ()
|
||||||
|
{
|
||||||
|
int combined_output = 0;
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
if ((!STREAM_OK (stdout) && !STREAM_OK (stderr))
|
||||||
|
|| (sync_handle = create_mutex ()) == -1)
|
||||||
|
{
|
||||||
|
perror_with_name ("output-sync suppressed: ", "stderr");
|
||||||
|
output_sync = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
combined_output = same_stream (stdout, stderr);
|
||||||
|
prepare_mutex_handle_string (sync_handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
if (STREAM_OK (stdout))
|
||||||
|
{
|
||||||
|
struct stat stbuf_o, stbuf_e;
|
||||||
|
|
||||||
|
sync_handle = fileno (stdout);
|
||||||
|
combined_output = (fstat (fileno (stdout), &stbuf_o) == 0
|
||||||
|
&& fstat (fileno (stderr), &stbuf_e) == 0
|
||||||
|
&& stbuf_o.st_dev == stbuf_e.st_dev
|
||||||
|
&& stbuf_o.st_ino == stbuf_e.st_ino);
|
||||||
|
}
|
||||||
|
else if (STREAM_OK (stderr))
|
||||||
|
sync_handle = fileno (stderr);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
perror_with_name ("output-sync suppressed: ", "stderr");
|
||||||
|
output_sync = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return combined_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Support routine for output_sync() */
|
||||||
|
static void
|
||||||
|
pump_from_tmp (int from, FILE *to)
|
||||||
|
{
|
||||||
|
static char buffer[8192];
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
int prev_mode;
|
||||||
|
|
||||||
|
/* "from" is opened by open_tmpfd, which does it in binary mode, so
|
||||||
|
we need the mode of "to" to match that. */
|
||||||
|
prev_mode = _setmode (fileno (to), _O_BINARY);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (lseek (from, 0, SEEK_SET) == -1)
|
||||||
|
perror ("lseek()");
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
EINTRLOOP (len, read (from, buffer, sizeof (buffer)));
|
||||||
|
if (len < 0)
|
||||||
|
perror ("read()");
|
||||||
|
if (len <= 0)
|
||||||
|
break;
|
||||||
|
if (fwrite (buffer, len, 1, to) < 1)
|
||||||
|
{
|
||||||
|
perror ("fwrite()");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fflush (to);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
/* Switch "to" back to its original mode, so that log messages by
|
||||||
|
Make have the same EOL format as without --output-sync. */
|
||||||
|
_setmode (fileno (to), prev_mode);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Obtain the lock for writing output. */
|
||||||
|
static void *
|
||||||
|
acquire_semaphore (void)
|
||||||
|
{
|
||||||
|
static struct flock fl;
|
||||||
|
|
||||||
|
fl.l_type = F_WRLCK;
|
||||||
|
fl.l_whence = SEEK_SET;
|
||||||
|
fl.l_start = 0;
|
||||||
|
fl.l_len = 1;
|
||||||
|
if (fcntl (sync_handle, F_SETLKW, &fl) != -1)
|
||||||
|
return &fl;
|
||||||
|
perror ("fcntl()");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Release the lock for writing output. */
|
||||||
|
static void
|
||||||
|
release_semaphore (void *sem)
|
||||||
|
{
|
||||||
|
struct flock *flp = (struct flock *)sem;
|
||||||
|
flp->l_type = F_UNLCK;
|
||||||
|
if (fcntl (sync_handle, F_SETLKW, flp) == -1)
|
||||||
|
perror ("fcntl()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns a file descriptor to a temporary file. The file is automatically
|
||||||
|
closed/deleted on exit. Don't use a FILE* stream. */
|
||||||
|
int
|
||||||
|
output_tmpfd ()
|
||||||
|
{
|
||||||
|
int fd = -1;
|
||||||
|
FILE *tfile = tmpfile ();
|
||||||
|
|
||||||
|
if (! tfile)
|
||||||
|
pfatal_with_name ("tmpfile");
|
||||||
|
|
||||||
|
/* Create a duplicate so we can close the stream. */
|
||||||
|
fd = dup (fileno (tfile));
|
||||||
|
if (fd < 0)
|
||||||
|
pfatal_with_name ("dup");
|
||||||
|
|
||||||
|
fclose (tfile);
|
||||||
|
|
||||||
|
set_append_mode (fd);
|
||||||
|
|
||||||
|
return fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Adds file descriptors to the child structure to support output_sync; one
|
||||||
|
for stdout and one for stderr as long as they are open. If stdout and
|
||||||
|
stderr share a device they can share a temp file too.
|
||||||
|
Will reset output_sync on error. */
|
||||||
|
static void
|
||||||
|
setup_tmpfile (struct output *out)
|
||||||
|
{
|
||||||
|
/* Is make's stdout going to the same place as stderr? */
|
||||||
|
static int combined_output = -1;
|
||||||
|
|
||||||
|
if (combined_output < 0)
|
||||||
|
combined_output = sync_init ();
|
||||||
|
|
||||||
|
if (STREAM_OK (stdout))
|
||||||
|
{
|
||||||
|
int fd = output_tmpfd ();
|
||||||
|
if (fd < 0)
|
||||||
|
goto error;
|
||||||
|
CLOSE_ON_EXEC (fd);
|
||||||
|
out->out = fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (STREAM_OK (stderr))
|
||||||
|
{
|
||||||
|
if (out->out != OUTPUT_NONE && combined_output)
|
||||||
|
out->err = out->out;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int fd = output_tmpfd ();
|
||||||
|
if (fd < 0)
|
||||||
|
goto error;
|
||||||
|
CLOSE_ON_EXEC (fd);
|
||||||
|
out->err = fd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* If we failed to create a temp file, disable output sync going forward. */
|
||||||
|
error:
|
||||||
|
output_close (out);
|
||||||
|
output_sync = OUTPUT_SYNC_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Synchronize the output of jobs in -j mode to keep the results of
|
||||||
|
each job together. This is done by holding the results in temp files,
|
||||||
|
one for stdout and potentially another for stderr, and only releasing
|
||||||
|
them to "real" stdout/stderr when a semaphore can be obtained. */
|
||||||
|
|
||||||
|
void
|
||||||
|
output_dump (struct output *out)
|
||||||
|
{
|
||||||
|
int outfd_not_empty = FD_NOT_EMPTY (out->out);
|
||||||
|
int errfd_not_empty = FD_NOT_EMPTY (out->err);
|
||||||
|
|
||||||
|
if (outfd_not_empty || errfd_not_empty)
|
||||||
|
{
|
||||||
|
int traced = 0;
|
||||||
|
|
||||||
|
/* Try to acquire the semaphore. If it fails, dump the output
|
||||||
|
unsynchronized; still better than silently discarding it.
|
||||||
|
We want to keep this lock for as little time as possible. */
|
||||||
|
void *sem = acquire_semaphore ();
|
||||||
|
|
||||||
|
/* Log the working directory for this dump. */
|
||||||
|
if (print_directory_flag && output_sync != OUTPUT_SYNC_RECURSE)
|
||||||
|
traced = log_working_directory (1);
|
||||||
|
|
||||||
|
if (outfd_not_empty)
|
||||||
|
pump_from_tmp (out->out, stdout);
|
||||||
|
if (errfd_not_empty && out->err != out->out)
|
||||||
|
pump_from_tmp (out->err, stderr);
|
||||||
|
|
||||||
|
if (traced)
|
||||||
|
log_working_directory (0);
|
||||||
|
|
||||||
|
/* Exit the critical section. */
|
||||||
|
if (sem)
|
||||||
|
release_semaphore (sem);
|
||||||
|
|
||||||
|
/* Truncate and reset the output, in case we use it again. */
|
||||||
|
if (out->out != OUTPUT_NONE)
|
||||||
|
{
|
||||||
|
int e;
|
||||||
|
lseek (out->out, 0, SEEK_SET);
|
||||||
|
EINTRLOOP (e, ftruncate (out->out, 0));
|
||||||
|
}
|
||||||
|
if (out->err != OUTPUT_NONE && out->err != out->out)
|
||||||
|
{
|
||||||
|
int e;
|
||||||
|
lseek (out->err, 0, SEEK_SET);
|
||||||
|
EINTRLOOP (e, ftruncate (out->err, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* NO_OUTPUT_SYNC */
|
||||||
|
|
||||||
|
|
||||||
|
/* Provide support for temporary files. */
|
||||||
|
|
||||||
|
#ifndef HAVE_STDLIB_H
|
||||||
|
# ifdef HAVE_MKSTEMP
|
||||||
|
int mkstemp (char *template);
|
||||||
|
# else
|
||||||
|
char *mktemp (char *template);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FILE *
|
||||||
|
output_tmpfile (char **name, const char *template)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_FDOPEN
|
||||||
|
int fd;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined HAVE_MKSTEMP || defined HAVE_MKTEMP
|
||||||
|
# define TEMPLATE_LEN strlen (template)
|
||||||
|
#else
|
||||||
|
# define TEMPLATE_LEN L_tmpnam
|
||||||
|
#endif
|
||||||
|
*name = xmalloc (TEMPLATE_LEN + 1);
|
||||||
|
strcpy (*name, template);
|
||||||
|
|
||||||
|
#if defined HAVE_MKSTEMP && defined HAVE_FDOPEN
|
||||||
|
/* It's safest to use mkstemp(), if we can. */
|
||||||
|
fd = mkstemp (*name);
|
||||||
|
if (fd == -1)
|
||||||
|
return 0;
|
||||||
|
return fdopen (fd, "w");
|
||||||
|
#else
|
||||||
|
# ifdef HAVE_MKTEMP
|
||||||
|
(void) mktemp (*name);
|
||||||
|
# else
|
||||||
|
(void) tmpnam (*name);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_FDOPEN
|
||||||
|
/* Can't use mkstemp(), but guard against a race condition. */
|
||||||
|
EINTRLOOP (fd, open (*name, O_CREAT|O_EXCL|O_WRONLY, 0600));
|
||||||
|
if (fd == -1)
|
||||||
|
return 0;
|
||||||
|
return fdopen (fd, "w");
|
||||||
|
# else
|
||||||
|
/* Not secure, but what can we do? */
|
||||||
|
return fopen (*name, "w");
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* This code is stolen from gnulib.
|
||||||
|
If/when we abandon the requirement to work with K&R compilers, we can
|
||||||
|
remove this (and perhaps other parts of GNU make!) and migrate to using
|
||||||
|
gnulib directly.
|
||||||
|
|
||||||
|
This is called only through atexit(), which means die() has already been
|
||||||
|
invoked. So, call exit() here directly. Apparently that works...?
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Close standard output, exiting with status 'exit_failure' on failure.
|
||||||
|
If a program writes *anything* to stdout, that program should close
|
||||||
|
stdout and make sure that it succeeds before exiting. Otherwise,
|
||||||
|
suppose that you go to the extreme of checking the return status
|
||||||
|
of every function that does an explicit write to stdout. The last
|
||||||
|
printf can succeed in writing to the internal stream buffer, and yet
|
||||||
|
the fclose(stdout) could still fail (due e.g., to a disk full error)
|
||||||
|
when it tries to write out that buffered data. Thus, you would be
|
||||||
|
left with an incomplete output file and the offending program would
|
||||||
|
exit successfully. Even calling fflush is not always sufficient,
|
||||||
|
since some file systems (NFS and CODA) buffer written/flushed data
|
||||||
|
until an actual close call.
|
||||||
|
|
||||||
|
Besides, it's wasteful to check the return value from every call
|
||||||
|
that writes to stdout -- just let the internal stream state record
|
||||||
|
the failure. That's what the ferror test is checking below.
|
||||||
|
|
||||||
|
It's important to detect such failures and exit nonzero because many
|
||||||
|
tools (most notably 'make' and other build-management systems) depend
|
||||||
|
on being able to detect failure in other tools via their exit status. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
close_stdout (void)
|
||||||
|
{
|
||||||
|
int prev_fail = ferror (stdout);
|
||||||
|
int fclose_fail = fclose (stdout);
|
||||||
|
|
||||||
|
if (prev_fail || fclose_fail)
|
||||||
|
{
|
||||||
|
if (fclose_fail)
|
||||||
|
perror_with_name (_("write error: stdout"), "");
|
||||||
|
else
|
||||||
|
O (error, NILF, _("write error: stdout"));
|
||||||
|
exit (MAKE_TROUBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
output_init (struct output *out)
|
||||||
|
{
|
||||||
|
if (out)
|
||||||
|
{
|
||||||
|
out->out = out->err = OUTPUT_NONE;
|
||||||
|
out->syncout = !!output_sync;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Configure this instance of make. Be sure stdout is line-buffered. */
|
||||||
|
|
||||||
|
#ifdef HAVE_SETVBUF
|
||||||
|
# ifdef SETVBUF_REVERSED
|
||||||
|
setvbuf (stdout, _IOLBF, xmalloc (BUFSIZ), BUFSIZ);
|
||||||
|
# else /* setvbuf not reversed. */
|
||||||
|
/* Some buggy systems lose if we pass 0 instead of allocating ourselves. */
|
||||||
|
setvbuf (stdout, 0, _IOLBF, BUFSIZ);
|
||||||
|
# endif /* setvbuf reversed. */
|
||||||
|
#elif HAVE_SETLINEBUF
|
||||||
|
setlinebuf (stdout);
|
||||||
|
#endif /* setlinebuf missing. */
|
||||||
|
|
||||||
|
/* Force stdout/stderr into append mode. This ensures parallel jobs won't
|
||||||
|
lose output due to overlapping writes. */
|
||||||
|
set_append_mode (fileno (stdout));
|
||||||
|
set_append_mode (fileno (stderr));
|
||||||
|
|
||||||
|
#ifdef HAVE_ATEXIT
|
||||||
|
if (STREAM_OK (stdout))
|
||||||
|
atexit (close_stdout);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
output_close (struct output *out)
|
||||||
|
{
|
||||||
|
if (! out)
|
||||||
|
{
|
||||||
|
if (stdio_traced)
|
||||||
|
log_working_directory (0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NO_OUTPUT_SYNC
|
||||||
|
output_dump (out);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (out->out >= 0)
|
||||||
|
close (out->out);
|
||||||
|
if (out->err >= 0 && out->err != out->out)
|
||||||
|
close (out->err);
|
||||||
|
|
||||||
|
output_init (out);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We're about to generate output: be sure it's set up. */
|
||||||
|
void
|
||||||
|
output_start ()
|
||||||
|
{
|
||||||
|
#ifndef NO_OUTPUT_SYNC
|
||||||
|
/* If we're syncing output make sure the temporary file is set up. */
|
||||||
|
if (output_context && output_context->syncout)
|
||||||
|
if (! OUTPUT_ISSET(output_context))
|
||||||
|
setup_tmpfile (output_context);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If we're not syncing this output per-line or per-target, make sure we emit
|
||||||
|
the "Entering..." message where appropriate. */
|
||||||
|
if (output_sync == OUTPUT_SYNC_NONE || output_sync == OUTPUT_SYNC_RECURSE)
|
||||||
|
if (! stdio_traced && print_directory_flag)
|
||||||
|
stdio_traced = log_working_directory (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
outputs (int is_err, const char *msg)
|
||||||
|
{
|
||||||
|
if (! msg || *msg == '\0')
|
||||||
|
return;
|
||||||
|
|
||||||
|
output_start ();
|
||||||
|
|
||||||
|
_outputs (output_context, is_err, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static struct fmtstring
|
||||||
|
{
|
||||||
|
char *buffer;
|
||||||
|
size_t size;
|
||||||
|
} fmtbuf = { NULL, 0 };
|
||||||
|
|
||||||
|
static char *
|
||||||
|
get_buffer (size_t need)
|
||||||
|
{
|
||||||
|
/* Make sure we have room. NEED includes space for \0. */
|
||||||
|
if (need > fmtbuf.size)
|
||||||
|
{
|
||||||
|
fmtbuf.size += need * 2;
|
||||||
|
fmtbuf.buffer = xrealloc (fmtbuf.buffer, fmtbuf.size);
|
||||||
|
}
|
||||||
|
|
||||||
|
fmtbuf.buffer[need-1] = '\0';
|
||||||
|
|
||||||
|
return fmtbuf.buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print a message on stdout. */
|
||||||
|
|
||||||
|
void
|
||||||
|
message (int prefix, size_t len, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
len += strlen (fmt) + strlen (program) + INTSTR_LENGTH + 4 + 1 + 1;
|
||||||
|
p = get_buffer (len);
|
||||||
|
|
||||||
|
if (prefix)
|
||||||
|
{
|
||||||
|
if (makelevel == 0)
|
||||||
|
sprintf (p, "%s: ", program);
|
||||||
|
else
|
||||||
|
sprintf (p, "%s[%u]: ", program, makelevel);
|
||||||
|
p += strlen (p);
|
||||||
|
}
|
||||||
|
|
||||||
|
va_start (args, fmt);
|
||||||
|
vsprintf (p, fmt, args);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
strcat (p, "\n");
|
||||||
|
|
||||||
|
assert (fmtbuf.buffer[len-1] == '\0');
|
||||||
|
outputs (0, fmtbuf.buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message. */
|
||||||
|
|
||||||
|
void
|
||||||
|
error (const gmk_floc *flocp, size_t len, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
len += (strlen (fmt) + strlen (program)
|
||||||
|
+ (flocp && flocp->filenm ? strlen (flocp->filenm) : 0)
|
||||||
|
+ INTSTR_LENGTH + 4 + 1 + 1);
|
||||||
|
p = get_buffer (len);
|
||||||
|
|
||||||
|
if (flocp && flocp->filenm)
|
||||||
|
sprintf (p, "%s:%lu: ", flocp->filenm, flocp->lineno + flocp->offset);
|
||||||
|
else if (makelevel == 0)
|
||||||
|
sprintf (p, "%s: ", program);
|
||||||
|
else
|
||||||
|
sprintf (p, "%s[%u]: ", program, makelevel);
|
||||||
|
p += strlen (p);
|
||||||
|
|
||||||
|
va_start (args, fmt);
|
||||||
|
vsprintf (p, fmt, args);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
strcat (p, "\n");
|
||||||
|
|
||||||
|
assert (fmtbuf.buffer[len-1] == '\0');
|
||||||
|
outputs (1, fmtbuf.buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message and exit. */
|
||||||
|
|
||||||
|
void
|
||||||
|
fatal (const gmk_floc *flocp, size_t len, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
const char *stop = _(". Stop.\n");
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
len += (strlen (fmt) + strlen (program)
|
||||||
|
+ (flocp && flocp->filenm ? strlen (flocp->filenm) : 0)
|
||||||
|
+ INTSTR_LENGTH + 8 + strlen (stop) + 1);
|
||||||
|
p = get_buffer (len);
|
||||||
|
|
||||||
|
if (flocp && flocp->filenm)
|
||||||
|
sprintf (p, "%s:%lu: *** ", flocp->filenm, flocp->lineno + flocp->offset);
|
||||||
|
else if (makelevel == 0)
|
||||||
|
sprintf (p, "%s: *** ", program);
|
||||||
|
else
|
||||||
|
sprintf (p, "%s[%u]: *** ", program, makelevel);
|
||||||
|
p += strlen (p);
|
||||||
|
|
||||||
|
va_start (args, fmt);
|
||||||
|
vsprintf (p, fmt, args);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
strcat (p, stop);
|
||||||
|
|
||||||
|
assert (fmtbuf.buffer[len-1] == '\0');
|
||||||
|
outputs (1, fmtbuf.buffer);
|
||||||
|
|
||||||
|
die (MAKE_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message from errno. */
|
||||||
|
|
||||||
|
void
|
||||||
|
perror_with_name (const char *str, const char *name)
|
||||||
|
{
|
||||||
|
const char *err = strerror (errno);
|
||||||
|
OSSS (error, NILF, _("%s%s: %s"), str, name, err);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print an error message from errno and exit. */
|
||||||
|
|
||||||
|
void
|
||||||
|
pfatal_with_name (const char *name)
|
||||||
|
{
|
||||||
|
const char *err = strerror (errno);
|
||||||
|
OSS (fatal, NILF, _("%s: %s"), name, err);
|
||||||
|
|
||||||
|
/* NOTREACHED */
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user