mirror of
https://github.com/mirror/make.git
synced 2026-08-20 00:43:29 +08:00
Compare commits
736 Commits
filedef-cl
...
4.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec61980122 | ||
|
|
9bb994e831 | ||
|
|
e2ebea35f1 | ||
|
|
c73ed7dd1c | ||
|
|
ba8383efd8 | ||
|
|
6f7fb050b4 | ||
|
|
45200a42d3 | ||
|
|
4c9e10fd94 | ||
|
|
6e640321fd | ||
|
|
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 | ||
|
|
d1d9c0274b | ||
|
|
ee9584dc8d | ||
|
|
9dc79463a9 | ||
|
|
1d3dfeb74b | ||
|
|
2de1b62112 | ||
|
|
ae003efd61 | ||
|
|
ebd05dbeb3 | ||
|
|
76652d5d02 | ||
|
|
dac7b49de4 | ||
|
|
d7ebcadadb | ||
|
|
4a11acf047 | ||
|
|
5df75e7265 | ||
|
|
bc91c0b23f | ||
|
|
5297a83b27 | ||
|
|
7ea029a07c | ||
|
|
9b41488ad1 | ||
|
|
988deb489b | ||
|
|
d2429d7508 | ||
|
|
299c72e6ed | ||
|
|
ee3a4f9dd6 | ||
|
|
f2ceb0d68a | ||
|
|
bccb277dda | ||
|
|
a56563badd | ||
|
|
21cf8c6444 | ||
|
|
4d72c4c11e | ||
|
|
6c9a393f95 | ||
|
|
724925be2b | ||
|
|
2f20fc1cc7 | ||
|
|
8572d6adf0 | ||
|
|
4a07398023 | ||
|
|
99e01f61fd | ||
|
|
9052b52dfc | ||
|
|
5dedf7be63 | ||
|
|
2276c37ae7 | ||
|
|
306462f0bd | ||
|
|
3a8a7a5d00 | ||
|
|
7ed1a08985 | ||
|
|
cae1db6ecd | ||
|
|
dad29566b3 | ||
|
|
d242ee9053 | ||
|
|
1d9d40a209 | ||
|
|
c0312423d9 | ||
|
|
9302338304 | ||
|
|
74f08c639d | ||
|
|
635a784ebf | ||
|
|
4c28600a50 | ||
|
|
ce2c6eadf1 | ||
|
|
5d582d4ba0 | ||
|
|
8f2b1e2c7c | ||
|
|
e5324a8c6a | ||
|
|
d5a04ee984 | ||
|
|
50ba270762 | ||
|
|
8ddf04c627 | ||
|
|
1a82956eae | ||
|
|
3c132f10f3 | ||
|
|
88187d9f4b | ||
|
|
775b644765 | ||
|
|
fcbfe98cbe | ||
|
|
cbe92a2241 | ||
|
|
d5f7eb2897 | ||
|
|
3e6f48b444 | ||
|
|
0d70d05458 | ||
|
|
f04e78f11b | ||
|
|
c392c19335 | ||
|
|
4972b017b6 | ||
|
|
4a5550c822 | ||
|
|
e5c40f6e5a | ||
|
|
5ed9fb46b2 | ||
|
|
f9c91ec34d | ||
|
|
f3a974bf32 | ||
|
|
c67266ceac | ||
|
|
4145bcbcda | ||
|
|
c637af71d9 | ||
|
|
a81013175c | ||
|
|
75f879f37f | ||
|
|
e68a27ec7b |
31
.cvsignore
31
.cvsignore
@@ -1,31 +0,0 @@
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING*
|
||||
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 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
|
||||
226
ABOUT-NLS
226
ABOUT-NLS
@@ -1,226 +0,0 @@
|
||||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project
|
||||
is a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do *not*
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
One advise in advance
|
||||
=====================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias or message inheritance) as the
|
||||
implementation here. It is also not possible to offer this additional
|
||||
functionality on top of a `catgets' implementation. Future versions of
|
||||
GNU `gettext' will very likely convey even more functionality. So it
|
||||
might be a good idea to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need not provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the
|
||||
programs they contain can be made to speak your own native language.
|
||||
Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system provides
|
||||
usable `catgets' (if using this is selected by the installer) or
|
||||
`gettext' functions. If neither is available, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is *not* required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --with-catgets
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `catgets' or `gettext' to use
|
||||
the internationalizing routines provided within this package, enable
|
||||
the use of the `catgets' functions (if found on the locale system), or
|
||||
else, *totally* disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
By default the configuration process will not test for the `catgets'
|
||||
function and therefore they will not be used. The reasons are already
|
||||
given above: the emulation on top of `catgets' cannot provide all the
|
||||
extensions provided by the GNU `gettext' library. If you nevertheless
|
||||
want to use the `catgets' functions use
|
||||
|
||||
./configure --with-catgets
|
||||
|
||||
to enable the test for `catgets' (this causes no harm if `catgets' is
|
||||
not available on your system). If you really select this option we
|
||||
would like to hear about the reasons because we cannot think of any
|
||||
good one ourself.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
ISO 639 `LL' two-letter code prior to using the programs in the
|
||||
package. For example, let's suppose that you speak German. At the
|
||||
shell prompt, merely execute `setenv LANG de' (in `csh'),
|
||||
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
|
||||
can be done from your `.login' or `.profile' file, once and for all.
|
||||
|
||||
An operating system might already offer message localization for
|
||||
many of its programs, while other programs have been installed locally
|
||||
with the full capabilities of GNU `gettext'. Just using `gettext'
|
||||
extended syntax for `LANG' would break proper localization of already
|
||||
available operating system programs. In this case, users should set
|
||||
both `LANGUAGE' and `LANG' variables in their environment, as programs
|
||||
using GNU `gettext' give preference to `LANGUAGE'. For example, some
|
||||
Swedish users would rather read translations in German than English for
|
||||
when Swedish is not available. This is easily accomplished by setting
|
||||
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list, courtesy of Linux
|
||||
International. You may reach your translation team at the address
|
||||
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
|
||||
language. Language codes are *not* the same as the country codes given
|
||||
in ISO 3166. The following translation teams exist, as of December
|
||||
1997:
|
||||
|
||||
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
|
||||
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
|
||||
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
|
||||
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
|
||||
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
|
||||
Swedish `sv', and Turkish `tr'.
|
||||
|
||||
For example, you may reach the Chinese translation team by writing to
|
||||
`zh@li.org'.
|
||||
|
||||
If you'd like to volunteer to *work* at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is *not* the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
*actively* in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of December
|
||||
1997. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination.
|
||||
|
||||
Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
.----------------------------------------------------.
|
||||
bash | [] [] [] | 3
|
||||
bison | [] [] [] | 3
|
||||
clisp | [] [] [] [] | 4
|
||||
cpio | [] [] [] [] [] [] | 6
|
||||
diffutils | [] [] [] [] [] | 5
|
||||
enscript | [] [] [] [] [] [] | 6
|
||||
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
findutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
flex | [] [] [] [] | 4
|
||||
gcal | [] [] [] [] [] | 5
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
|
||||
grep | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
id-utils | [] [] [] | 3
|
||||
indent | [] [] [] [] [] | 5
|
||||
libc | [] [] [] [] [] [] [] | 7
|
||||
m4 | [] [] [] [] [] [] | 6
|
||||
make | [] [] [] [] [] [] | 6
|
||||
music | [] [] | 2
|
||||
ptx | [] [] [] [] [] [] [] [] | 8
|
||||
recode | [] [] [] [] [] [] [] [] [] | 9
|
||||
sh-utils | [] [] [] [] [] [] [] [] | 8
|
||||
sharutils | [] [] [] [] [] [] | 6
|
||||
tar | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
texinfo | [] [] [] | 3
|
||||
textutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
wdiff | [] [] [] [] [] [] [] [] | 8
|
||||
`----------------------------------------------------'
|
||||
17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If December 1997 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites.
|
||||
|
||||
38
AUTHORS
38
AUTHORS
@@ -7,6 +7,9 @@ GNU make development up to version 3.75 by:
|
||||
Development starting with GNU make 3.76 by:
|
||||
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
|
||||
Written by:
|
||||
@@ -23,6 +26,7 @@ GNU make porting efforts:
|
||||
|
||||
Port to VMS by:
|
||||
Klaus Kaempf <kkaempf@progis.de>
|
||||
Hartmut Becker <Hartmut.Becker@hp.com>
|
||||
Archive support/Bug fixes by:
|
||||
John W. Eaton <jwe@bevo.che.wisc.edu>
|
||||
Martin Zinser <zinser@decus.decus.de>
|
||||
@@ -30,27 +34,55 @@ GNU make porting efforts:
|
||||
Port to Amiga by:
|
||||
Aaron Digulla <digulla@fh-konstanz.de>
|
||||
|
||||
|
||||
Port to MS-DOS (DJGPP) and MS-Windows 95/NT by:
|
||||
Port to MS-DOS (DJGPP), OS/2, and MS-Windows (native/MinGW) by:
|
||||
DJ Delorie <dj@delorie.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:
|
||||
|
||||
Janet Carson <janet_carson@tivoli.com>
|
||||
Howard Chu <hyc@highlandsun.com>
|
||||
Ludovic Courtès <ludo@gnu.org>
|
||||
Paul Eggert <eggert@twinsun.com>
|
||||
Ramon Garcia Fernandez <ramon.garcia.f@gmail.com>
|
||||
Klaus Heinz <kamar@ease.rhein-main.de>
|
||||
Michael Joosten
|
||||
Jim Kelton <jim_kelton@tivoli.com>
|
||||
David Lubbren <uhay@rz.uni-karlsruhe.de>
|
||||
Tim Magill <tim.magill@telops.gte.com>
|
||||
Markus Mauhart <qwe123@chello.at>
|
||||
Greg McGary <greg@mcgary.org>
|
||||
Thien-Thi Nguyen <ttn@gnuvola.org>
|
||||
Thomas Riedl <thomas.riedl@siemens.com>
|
||||
Han-Wen Nienhuys <hanwen@cs.uu.nl>
|
||||
Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
Carl Staelin (Princeton University)
|
||||
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 ...
|
||||
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/>.
|
||||
|
||||
850
COPYING
850
COPYING
@@ -1,286 +1,626 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
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
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
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.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
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
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
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
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
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
|
||||
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
|
||||
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".
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
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.
|
||||
0. Definitions.
|
||||
|
||||
1. You may copy and distribute 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 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.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
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
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
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.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
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,
|
||||
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:
|
||||
1. Source Code.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
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
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
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
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
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.
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
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.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
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.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
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
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
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.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
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.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
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
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
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
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
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.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
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
|
||||
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.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE 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.
|
||||
THERE IS NO 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.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
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
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
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
|
||||
@@ -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 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.
|
||||
|
||||
<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
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
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
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
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
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
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.
|
||||
The GNU 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 Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
35
ChangeLog.1
35
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'.
|
||||
|
||||
* 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)
|
||||
|
||||
@@ -3218,7 +3218,7 @@ Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
|
||||
* variable.c (expand_function: `shell'): Use
|
||||
`shell_function_completed'. Block children before forking 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
|
||||
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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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
|
||||
that is a bad idea (except for setuid programs). Cleaned up slightly.
|
||||
|
||||
@@ -4879,7 +4879,7 @@ Sun Jul 24 02:15:30 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
|
||||
* variable.c (expand_function): Made `foreach' function put
|
||||
spaces between output texts like it's supposed to.
|
||||
|
||||
|
||||
Sat Jul 23 17:32:55 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
|
||||
* rule.c (default_suffixes, default_suffix_rules): Added rule
|
||||
@@ -4909,20 +4909,20 @@ Fri Jul 22 23:13:16 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
|
||||
* commands.c (execute_file_commands): Fixed a bug wherein
|
||||
random memory could get written for files with no deps.
|
||||
|
||||
|
||||
Wed Jul 20 19:30:31 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
|
||||
* read.c (readline): Fix bug wherein it would not recognize a
|
||||
backslash-newline if the buffer filled up and was enlarged
|
||||
right before reading the newline.
|
||||
|
||||
|
||||
Tue Jul 19 19:55:02 1988 Roland McGrath (mcgrath at chilli.Berkeley.EDU)
|
||||
|
||||
* read.c: Added default suffix rules for .cc (using $(C++),
|
||||
which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web
|
||||
and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and
|
||||
$(CTANGLE)).
|
||||
|
||||
|
||||
Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
|
||||
* Made error formats use %u rather than %ld for line numbers,
|
||||
@@ -4972,9 +4972,26 @@ Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
|
||||
* variable.c (pattern_matches): Fix a bug that made patterns
|
||||
not beginning with `%' never match.
|
||||
|
||||
|
||||
Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
||||
|
||||
* Took Make out of RCS.
|
||||
|
||||
* 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/>.
|
||||
|
||||
@@ -1,12 +1,415 @@
|
||||
2000-06-22 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* job.c (start_job_command): Increment commands_started before the
|
||||
special check for ":" (empty command) to avoid spurious "is up to
|
||||
date" messages. Also move the test for question_flag after we
|
||||
expand arguments, and only stop if the expansion provided an
|
||||
actual command to run, not just whitespace. This fixes PR/1780.
|
||||
|
||||
2000-06-21 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* read.c (read_makefile): If we find a semicolon in the target
|
||||
definition, remember where it was. If the line turns out to be a
|
||||
target-specific variable, add back the semicolon and everything
|
||||
after it. Fixes PR/1709.
|
||||
|
||||
2000-06-19 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* config.h-vms.template: #define uintmax_t for this system.
|
||||
* config.ami.template: Ditto.
|
||||
* config.h.W32.template: Ditto.
|
||||
|
||||
* configure.in: We don't use select(2) anymore, so don't bother
|
||||
checking for it.
|
||||
* acconfig.h: Ditto.
|
||||
* acinclude.m4: Ditto.
|
||||
|
||||
* file.c (all_secondary): New static global; if 1 it means
|
||||
.SECONDARY with no prerequisites was seen in the makefile.
|
||||
(snap_deps): Set it appropriately.
|
||||
(remove_intermediates): Check it.
|
||||
(num_intermediates): Remove this global, it's not used anywhere.
|
||||
(considered): Move this to remake.c and make it static.
|
||||
|
||||
* NEWS: Document the change to .SECONDARY.
|
||||
* make.texinfo (Special Targets): Document the change to .SECONDARY.
|
||||
|
||||
* implicit.c (pattern_search): Remove the increment of
|
||||
num_intermediates; it's not used.
|
||||
* filedef.h: Remove num_intermediates and considered.
|
||||
|
||||
* function.c (handle_function): If the last argument was empty, we
|
||||
were pretending it didn't exist rather than providing an empty
|
||||
value. Keep looking until we're past the end, not just at the end.
|
||||
|
||||
* implicit.c (pattern_search): Multi-target implicit rules weren't
|
||||
expanding the "also made" targets correctly if the pattern didn't
|
||||
contain a slash but the target did; in that case the directory
|
||||
part wasn't being added back to the stem on the "also made"
|
||||
targets. Reported by Seth M LaForge <sethml@newtonlabs.com>, with
|
||||
a patch.
|
||||
|
||||
2000-06-17 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* Makefile.DOS.template (DESTDIR, bindir, datadir, libdir)
|
||||
(infodir, mandir, includedir): Support installation under a
|
||||
non-default DESTDIR.
|
||||
|
||||
* remake.c (f_mtime): Fix the spelling of __MSDOS__.
|
||||
|
||||
* configh.DOS.template (HAVE_FDOPEN, HAVE_MKSTEMP): Define.
|
||||
|
||||
2000-06-14 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* acinclude.m4 (pds_WITH_GETTEXT): rewrite fp_WITH_GETTEXT and
|
||||
rename it to avoid confusion. This version is very specific: it
|
||||
won't accept any gettext that isn't GNU. If the user doesn't
|
||||
explicitly ask for the included gettext, we look to see if the
|
||||
system gettext is GNU (testing both the actual libintl library,
|
||||
and the libintl.h header file). Only if the system gettext is
|
||||
really GNU gettext will we allow it to be used.
|
||||
(pds_CHECK_SYSTEM_GETTEXT): A helper function.
|
||||
|
||||
2000-06-13 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* gettext.h: If we have libintl.h, use that instead of any of the
|
||||
contents of gettext.h. We won't check for libintl.h unless we're
|
||||
using the system gettext.
|
||||
|
||||
* function.c (func_word): Clarify error message.
|
||||
|
||||
2000-06-10 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Support nanosecond resolution on hosts with 64-bit time_t and
|
||||
uintmax_t (e.g. 64-bit Sparc Solaris), by splitting
|
||||
FILE_TIMESTAMP into a 30-bit part for nanoseconds, with the
|
||||
rest for seconds, if FILE_TIMESTAMP is at least 64 bits wide.
|
||||
|
||||
* make.h: Always define FILE_TIMESTAMP to be uintmax_t, for
|
||||
simplicity.
|
||||
|
||||
* filedef.h (FILE_TIMESTAMP_HI_RES, FILE_TIMESTAMP_LO_BITS)
|
||||
(UNKNOWN_MTIME, NONEXISTENT_MTIME, OLD_MTIME)
|
||||
(ORDINARY_MTIME_MIN, ORDINARY_MTIME_MAX): New macros.
|
||||
(FILE_TIMESTAMP_STAT_MODTIME): Now takes fname arg. All uses changed.
|
||||
(FILE_TIMESTAMP_DIV, FILE_TIMESTAMP_MOD)
|
||||
(FILE_TIMESTAMP_FROM_S_AND_NS): Remove.
|
||||
(FILE_TIMESTAMP_S, FILE_TIMESTAMP_NS): Use shifts instead of
|
||||
multiplication and division. Offset the timestamps by
|
||||
ORDINARY_MTIME_MIN.
|
||||
(file_timestamp_cons): New decl.
|
||||
(NEW_MTIME): Now just the maximal timestamp value, as we no longer use
|
||||
-1 to refer to nonexistent files.
|
||||
|
||||
* file.c (snap_deps, print_file): Use NONEXISTENT_MTIME,
|
||||
UNKNOWN_MTIME, and OLD_MTIME instead of magic constants.
|
||||
* filedef.h (file_mtime_1): Likewise.
|
||||
* main.c (main): Likewise.
|
||||
* remake.c (update_file_1, notice_finished_file, check_dep)
|
||||
(f_mtime, name_mtime, library_search): Likewise.
|
||||
* vpath.c (selective_vpath_search): Likewise.
|
||||
|
||||
* remake.c (f_mtime): Do not assume that (time_t) -1 equals
|
||||
NONEXISTENT_MTIME. When futzing with time stamps, adjust by
|
||||
multiples of 2**30, not 10**9. Do not calculate timestamp
|
||||
adjustments on DOS unless they are needed.
|
||||
|
||||
* commands.c (delete_target): Do not assume that
|
||||
FILE_TIMESTAMP_S yields -1 for a nonexistent file, as that is
|
||||
no longer true with the new representation.
|
||||
|
||||
* file.c (file_timestamp_cons): New function, replacing
|
||||
FILE_TIMESTAMP_FROM_S_AND_NS. All uses changed.
|
||||
(file_timestamp_now): Use FILE_TIMESTAMP_HI_RES instead of 1 <
|
||||
FILE_TIMESTAMPS_PER_S to determine whether we're using hi-res
|
||||
timestamps.
|
||||
(print_file): Print OLD_MTIME values as "very old" instead of
|
||||
as a timestamp.
|
||||
|
||||
2000-05-31 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* remake.c (name_mtime): Check for stat failures. Retry if EINTR.
|
||||
|
||||
2000-05-24 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* main.c (decode_switches): The "positive_int" switch uses atoi()
|
||||
which succeeds for any input, and doesn't notice if extra,
|
||||
non-digit text is after the number. This causes make to mis-parse
|
||||
command lines like "make -j 5foo" as "make -j5" (ignoring "foo"
|
||||
completely) instead of "make -j0 5foo" (where "5foo" is a
|
||||
target). Fix this by checking the value by hand. We could use
|
||||
strtol() if we were sure of having it; this is the only
|
||||
questionable use of atoi() I found so we'll just stick with that.
|
||||
Fixes PR/1716.
|
||||
|
||||
* i18n/ja.po, i18n/nl.po, i18n/pt_BR.po: New translation files.
|
||||
* configure.in (ALL_LINGUAS): Added pt_BR.
|
||||
|
||||
2000-05-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* remake.c (f_mtime): Fix bug when handling future odd
|
||||
timestamps in the WINDOWS32 case. Do not bother initializing
|
||||
static var to zero. Simplify code that works around WINDOWS32
|
||||
and __MSDOS__ time skew brain damage.
|
||||
|
||||
2000-05-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* job.c: Don't include time.h, as make.h already does this.
|
||||
|
||||
2000-05-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* configure.in (AC_CHECK_HEADERS): Add sys/time.h.
|
||||
(AC_HEADER_TIME): Add.
|
||||
(clock_gettime): Prefer -lrt to -lposix4, for Solaris 7.
|
||||
(gettimeofday): Add check for standard version of gettimeofday.
|
||||
This merges changes written by Paul D. Smith.
|
||||
|
||||
* file.c (file_timestamp_now): Use gettimeofday if available
|
||||
and if clock_gettime does not work. Don't bother with
|
||||
high-resolution clocks if file timestamps have only one-second
|
||||
resolution.
|
||||
|
||||
* make.h <sys/time.h>: Include, conditionally on the usual
|
||||
TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H macros. This is needed
|
||||
for gettimeofday.
|
||||
|
||||
2000-05-20 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* read.c (read_makefile): We weren't keeping makefile names around
|
||||
unless there was a rule defined in them; but now we need to keep
|
||||
them for variables as well. Forget trying to be fancy: just keep
|
||||
every makefile name we successfully open.
|
||||
|
||||
* remote-cstms.c (start_remote_job_p): Change DB_EXTRA (?) to DB_JOBS.
|
||||
|
||||
2000-05-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* commands.c (chop_commands): Ensure ctype macro args are nonnegative.
|
||||
* expand.c (variable_expand_string): Likewise.
|
||||
* function.c (subst_expand, lookup_function, msdos_openpipe):
|
||||
Likewise.
|
||||
* job.c (vms_redirect, start_job_command, new_job, child_execute_job,
|
||||
construct_command_argv_internal, construct_command_argv): Likewise.
|
||||
* main.c (decode_env_switches, quote_for_env): Likewise.
|
||||
* misc.c (collapse_continuations, end_of_token, end_of_token_w32,
|
||||
next_token): Likewise.
|
||||
* read.c (read_makefile, do_define, conditional_line,
|
||||
find_char_unquote,get_next_mword): Likewise.
|
||||
* variable.c (try_variable_definition): Likewise.
|
||||
* vpath.c (construct_vpath_list): Likewise.
|
||||
* w32/pathstuff.c (convert_vpath_to_windows32): Likewise.
|
||||
|
||||
2000-05-10 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* main.c (main) [__MSDOS__]: Add SIGFPE to signals we block when
|
||||
running child programs, to prevent Make from dying on Windows 9X
|
||||
when the child triggers an FP exception.
|
||||
|
||||
2000-05-08 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* dir.c (find_directory) [WINDOWS32]: If we strip a trailing "\"
|
||||
from the directory name, remember to add it back. The argument
|
||||
might really be inside a longer string (e.g. %Path%) and if you
|
||||
don't restore the "\" it'll be truncated permanently. Fixes PR/1722.
|
||||
Reported by <steven@surfcast.com>
|
||||
|
||||
2000-05-02 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* job.c (construct_command_argv_internal) [WINDOWS32]: Added "rd"
|
||||
and "rmdir" to the list of command.com commands.
|
||||
Reported by Elod Horvath <Elod_Horvath@lnotes5.bankofny.com>
|
||||
|
||||
2000-04-24 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/ja.po: New translation file from the Japanese language team.
|
||||
|
||||
2000-04-18 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* remake.c (f_mtime): If ar_member_date() returns -1 (the member
|
||||
doesn't exist), then return (FILE_TIMESTAMP)-1 rather than
|
||||
returning the timestamp calculated from the value -1. Fixes PR/1696.
|
||||
Reported by Gilles Bourhis <Gilles.Bourhis@univ-rennes1.fr>.
|
||||
|
||||
2000-04-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* config.h.W32.template: Add LOCALEDIR macro resolving to "".
|
||||
* w32/subproc/sub_proc.c (process_begin): Remove reference to
|
||||
debug_flag; change it to a DB() call. Fixes PR/1700.
|
||||
Reported by Jim Smith <jwksmith@attglobal.net>
|
||||
|
||||
2000-04-17 Bruno Haible <haible@clisp.cons.org>
|
||||
|
||||
* arscan.c [BeOS]: Add replacement for nonexistent <ar.h> from GNU
|
||||
binutils.
|
||||
|
||||
2000-04-11 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* function.c (expand_builtin_function): If no arguments were
|
||||
provided, just quit early rather than changing each function to
|
||||
test for this.
|
||||
(function_table[]): Change the min # of arguments to 0 for all
|
||||
those functions for which it makes sense (currently everything
|
||||
that used to take a minimum of 1 argument, except $(call ...)).
|
||||
Fixes PR/1689.
|
||||
|
||||
2000-04-09 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* README.DOS: Add instructions to install a binary distro.
|
||||
Mention latest versions of Windows.
|
||||
|
||||
2000-04-07 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* main.c (main): Rename TMP_TEMPLATE into DEFAULT_TMPDIR, and use
|
||||
it for the directory of the temporary file. If P_tmpdir is
|
||||
defined, use it in preference to "/tmp/". Try $TMPDIR, $TEMP, and
|
||||
$TMP in the environment before defaulting to DEFAULT_TMPDIR.
|
||||
(print_version): Add year 2000 to the Copyright line.
|
||||
|
||||
2000-04-04 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Version 3.79 released.
|
||||
|
||||
* make.texinfo: Update documentation with new features for 3.79.
|
||||
|
||||
* function.c (func_wordlist): Don't re-order arguments to
|
||||
wordlist.
|
||||
|
||||
2000-04-03 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* remake.c (f_mtime): Archive member timestamps are stored as
|
||||
time_t, without nanoseconds. But, f_mtime() wants to return
|
||||
nanosecond info on those systems that support it. So, convert the
|
||||
return value of ar_member_date() into a FILE_TIMESTAMP, using 0 as
|
||||
the nanoseconds.
|
||||
|
||||
2000-03-28 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Version 3.78.92 released.
|
||||
|
||||
* build.template: Updates for gettext support; some bugs fixed.
|
||||
|
||||
2000-03-27 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* config.guess, config.sub: Updated from config CVS archive at
|
||||
:pserver:anoncvs@subversions.gnu.org:/home/cvs as of today.
|
||||
|
||||
* read.c (record_files): Check if expanding a static pattern
|
||||
rule's prerequisite pattern leaves an empty string as the
|
||||
prerequisite, and issue an error if so. Fixes PR/1670.
|
||||
(read_makefile): Store the starting linenumber for a rule in
|
||||
TGTS_STARTED.
|
||||
(record_waiting_files): Use the TGTS_STARTED value for the file
|
||||
location passed to record_file() instead of the current
|
||||
linenumber, so error messages list the line where the target was
|
||||
defined instead of the line after the end of the rule definition.
|
||||
|
||||
* remake.c (start_updating, finish_updating, is_updating): Fix
|
||||
PR/1671; circular dependencies in double-colon rules are not
|
||||
diagnosed. These macros set the updating flag in the root
|
||||
double-colon file instead of the current one, if it's part of a
|
||||
double-colon list. This solution provided by Tim Magill
|
||||
<magill@gate.net>; I just changed the macro names :).
|
||||
(update_file_1): Call them.
|
||||
(check_dep): Call them.
|
||||
|
||||
The change to not automatically evaluate the $(call ...)
|
||||
function's arguments breaks recursive use of call. Although using
|
||||
$(if ...) and $(foreach ...) in $(call ...) macros is important,
|
||||
the error conditions generated are simply to obscure for me to
|
||||
feel comfortable with. If a method is devised to get both
|
||||
working, we'll revisit. For now, remove this change.
|
||||
|
||||
* function.c (function_table): Turn on the expand bit for func_call.
|
||||
(func_call): Don't expand arguments for builtin functions; that
|
||||
will have already been done.
|
||||
|
||||
2000-03-26 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* file.c (remove_intermediates): Never remove targets explicitly
|
||||
requested on the command-line by checking the cmd_target flag.
|
||||
Fixed PR/1669.
|
||||
|
||||
2000-03-23 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* filedef.h (FILE_TIMESTAMP_STAT_MODTIME): Use st_mtime instead of
|
||||
st_mtim.tv_sec; the latter doesn't work on Unixware.
|
||||
|
||||
2000-03-18 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* file.c (file_hash_enter): If we're trying to change a file into
|
||||
itself, just return. We used to assert this wasn't true, but
|
||||
someone came up with a weird case involving archives. After
|
||||
playing with it for a while I decided it was OK to ignore it.
|
||||
|
||||
* default.c: Define COFLAGS to empty to avoid spurious warnings.
|
||||
|
||||
* filedef.h: Change #if ST_MTIM_NSEC to #ifdef; this is a macro
|
||||
containing the name of the nsec field, not true/false.
|
||||
* make.h: Ditto.
|
||||
Reported by Marco Franzen <Marco.Franzen@Thyron.com>.
|
||||
|
||||
2000-03-08 Tim Magill <magill@gate.net>
|
||||
|
||||
* remake.c (update_file): Return the exit status of the pruned
|
||||
file when pruning, not just 0. Fixes PR/1634.
|
||||
|
||||
2000-02-24 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* configure.in: Close a minor potential security hole; if you're
|
||||
reading makefiles from stdin (who does that?) you could run into a
|
||||
race condition with the temp file using mktemp() or tmpnam(). Add
|
||||
a check for mkstemp() and fdopen().
|
||||
* main.c (open_tmpfile): New function to open a temporary file.
|
||||
If we have mkstemp() (and fdopen()), use that. If not use
|
||||
mktemp() or tmpnam(). If we have fdopen(), use open() to open the
|
||||
file O_CREAT|O_EXCL. If not, fall back to normal fopen() (insecure).
|
||||
(main): Call it.
|
||||
* job.c (child_execute_job) [VMS]: Call it.
|
||||
|
||||
* variable.c (lookup_variable): If we find a variable which is
|
||||
being expanded, then note it but keep looking through the rest of
|
||||
the set list to see if we can find one that isn't. If we do,
|
||||
return that. If we don't, return the original. Fix for PR/1610.
|
||||
|
||||
While implementing this I realized that it also solves PR/1380 in
|
||||
a much more elegant way. I don't know what I was smoking before.
|
||||
So, remove the hackage surrounding the original fix for that (see
|
||||
below). Change this function back to lookup_variable and remove
|
||||
the extra setlist argument.
|
||||
* variable.h (recursively_expand_setlist): Remove the macro,
|
||||
rename the prototype, and remove the extra setlist argument.
|
||||
(lookup_variable): Ditto.
|
||||
* expand.c (recursively_expand): Rename and remove the extra
|
||||
setlist argument.
|
||||
(reference_variable): Use lookup_variable() again.
|
||||
(allocated_variable_append): Remove the extra setlist argument.
|
||||
|
||||
2000-02-21 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* README.template: A few updates.
|
||||
|
||||
* i18n/de.po: New version from the German translation team.
|
||||
|
||||
2000-02-09 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Version 3.78.91 released.
|
||||
|
||||
2000-02-07 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* read.c (read_makefile): Reset *p2 to ':', not *colonp. If any
|
||||
filenames contained backslashes the resulting output (without
|
||||
backslashes) will be shorter, so setting *colonp doesn't change
|
||||
the right character. Fix for PR/1586.
|
||||
|
||||
For += target-specific variables we need to remember which
|
||||
variable set we found the variable in, so we can start looking
|
||||
there in the next iteration (otherwise we'll see it again in
|
||||
recursively_expand and fail!). This is getting to be a hack; if
|
||||
it gets any worse we'll have to rethink this entire algorithm;
|
||||
probably implementing expansion of these separately from the
|
||||
"normal" expansion, instead of alongside.
|
||||
from there in the next iteration (otherwise we might see it again
|
||||
in recursively_expand and fail!). This is turning into a hack; if
|
||||
it gets any worse we'll have to rethink this entire algorithm...
|
||||
implementing expansion of these references separately from the
|
||||
"normal" expansion, say, instead of using the same codepath.
|
||||
Actually, it's already "worse enough" :-/.
|
||||
Fix for PR/1380.
|
||||
|
||||
* variable.h (recursively_expand_setlist): Rename
|
||||
recursively_expand to add a struct variable_set_list argument, and
|
||||
@@ -15,8 +418,7 @@
|
||||
variable_set_list argument, and make a macro for lookup_variable.
|
||||
|
||||
* expand.c (recursively_expand_setlist): Take an extra struct
|
||||
variable_set_list argument and pass it to
|
||||
allocated_variable_append().
|
||||
variable_set_list argument and pass it to allocated_variable_append().
|
||||
(reference_variable): Use lookup_variable_setlist() and pass the
|
||||
returned variable_set_list to recursively_expand_setlist.
|
||||
(allocated_variable_append): Take an extra setlist argument and
|
||||
@@ -24,7 +426,7 @@
|
||||
expansion. If it's null, use current_variable_set_list as before.
|
||||
|
||||
* variable.c (lookup_variable_setlist): If the LISTP argument is
|
||||
not nil, return the list where we found the variable in it.
|
||||
not nil, set it to the list containing the variable we found.
|
||||
|
||||
2000-02-04 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
@@ -87,6 +489,16 @@
|
||||
|
||||
* default.c (default_variables) [__MSDOS__]: Define CXX to gpp.
|
||||
|
||||
2000-01-27 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* gettext.c: Some warning cleanups, and a fix for systems which
|
||||
don't define HAVE_ALLOCA (the workaround code was included
|
||||
twice).
|
||||
|
||||
2000-01-26 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Version 3.78.90 released.
|
||||
|
||||
2000-01-25 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Change gettext support to use the simplified version in libit 0.7.
|
||||
@@ -2668,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
|
||||
stores now the names of the variables only and reads their contents
|
||||
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()
|
||||
|
||||
* Makefile.ami: renamed file.h to filedep.h
|
||||
@@ -6218,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
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (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
|
||||
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
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
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
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`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:
|
||||
|
||||
@@ -34,13 +52,7 @@ The simplest way to compile this package is:
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
If you're building GNU make on a system which does not already have
|
||||
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
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
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
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
You can give `configure' initial values for configuration parameters
|
||||
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
|
||||
====================================
|
||||
|
||||
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
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
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
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
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 in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
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
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
give `configure' the option `--exec-prefix=PREFIX', the package will
|
||||
use PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
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
|
||||
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
|
||||
=================
|
||||
|
||||
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.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
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
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--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
|
||||
|
||||
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 host type.
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
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
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
produce code for.
|
||||
|
||||
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
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the 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
|
||||
operates.
|
||||
Variables not defined in a site shell script can be set in the
|
||||
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'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
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'
|
||||
`--silent'
|
||||
`-q'
|
||||
@@ -179,9 +226,6 @@ operates.
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
# -*-Makefile-*- template for DJGPP
|
||||
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-1998, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.DOS is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy, distribute and modify it.
|
||||
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
@@ -15,26 +26,25 @@ VPATH = $(srcdir)
|
||||
prefix = /dev/env/DJDIR
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = ${exec_prefix}/bin
|
||||
datadir = ${prefix}/share
|
||||
libdir = ${prefix}/lib
|
||||
infodir = ${prefix}/info
|
||||
# DJGPP doesn't have separate man tree, use info instead.
|
||||
mandir = ${prefix}/info
|
||||
includedir = ${prefix}/include
|
||||
bindir = /bin
|
||||
datadir = /share
|
||||
libdir = /lib
|
||||
infodir = /info
|
||||
mandir = /man
|
||||
includedir = /include
|
||||
oldincludedir = c:/djgpp/include
|
||||
|
||||
DESTDIR =
|
||||
DESTDIR = /dev/env/DJDIR
|
||||
|
||||
pkgdatadir = $(datadir)/make
|
||||
pkglibdir = $(libdir)/make
|
||||
pkgincludedir = $(includedir)/make
|
||||
localedir = $(prefix)/share/locale
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
INSTALL = ${bindir}/ginstall -c
|
||||
INSTALL_PROGRAM = ${bindir}/ginstall -c
|
||||
INSTALL_DATA = ${bindir}/ginstall -c -m 644
|
||||
INSTALL_SCRIPT = ${bindir}/ginstall -c
|
||||
INSTALL = ${exec_prefix}/bin/ginstall -c
|
||||
INSTALL_PROGRAM = ${exec_prefix}/bin/ginstall -c
|
||||
INSTALL_DATA = ${exec_prefix}/bin/ginstall -c -m 644
|
||||
INSTALL_SCRIPT = ${exec_prefix}/bin/ginstall -c
|
||||
transform = s,x,x,
|
||||
|
||||
# This will fail even if they don't have a Unix-like shell (stock DOS
|
||||
@@ -48,11 +58,15 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
EXEEXT = .exe
|
||||
OBJEXT = o
|
||||
|
||||
AR = ar
|
||||
AWK = gawk
|
||||
CC = gcc
|
||||
CPP = gcc -E
|
||||
LIBOBJS =
|
||||
MAKEINFO = ${bindir}/makeinfo
|
||||
MAKEINFO = ${exec_prefix}/bin/makeinfo
|
||||
PACKAGE = make
|
||||
PERL = perl
|
||||
RANLIB = ranlib
|
||||
@@ -61,24 +75,23 @@ VERSION = %VERSION%
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.2
|
||||
|
||||
bin_PROGRAMS = %PROGRAMS%
|
||||
bin_PROGRAMS = %PROGRAMS%$(EXEEXT)
|
||||
|
||||
make_SOURCES = %SOURCES%
|
||||
# This should include the glob/ prefix
|
||||
libglob_a_SOURCES = %GLOB_SOURCES%
|
||||
make_LDADD = glob/libglob.a
|
||||
|
||||
info_TEXINFOS = make.texinfo
|
||||
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
|
||||
|
||||
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
|
||||
mkinstalldirs = ${bindir}/gmkdir -p
|
||||
SUBDIRS = glob doc
|
||||
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = build.sh
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
@@ -100,16 +113,16 @@ CFLAGS = -O2 -g
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXINFO_TEX = $(srcdir)/texinfo.tex
|
||||
INFO_DEPS = make.info
|
||||
DVIS = make.dvi
|
||||
TEXINFOS = make.texinfo
|
||||
TEXINFO_TEX = $(srcdir)/config/texinfo.tex
|
||||
INFO_DEPS = doc/make.info
|
||||
DVIS = doc/make.dvi
|
||||
TEXINFOS = doc/make.texi
|
||||
noinst_TEXINFOS = doc/fdl.texi doc/make-stds.texi
|
||||
man1dir = $(mandir)/man1
|
||||
MANS = $(man_MANS)
|
||||
|
||||
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 gettext.c install-sh missing mkinstalldirs stamp-h.in texinfo.tex
|
||||
|
||||
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)
|
||||
|
||||
@@ -122,7 +135,7 @@ HEADERS = $(wildcard $(srcdir)/*.h)
|
||||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .dvi .info .o .ps .s .texi .texinfo .txi
|
||||
.SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
@@ -154,17 +167,11 @@ uninstall-binPROGRAMS:
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o *.exe make.new core
|
||||
-rm -f *.$(OBJEXT) *$(EXEEXT) make.new core
|
||||
|
||||
clean-compile:
|
||||
|
||||
@@ -173,71 +180,75 @@ distclean-compile:
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
make: $(make_OBJECTS) $(make_DEPENDENCIES)
|
||||
make$(EXEEXT): $(make_OBJECTS) $(make_DEPENDENCIES)
|
||||
@command.com /c if exist make del make
|
||||
@command.com /c if exist make.exe del make.exe
|
||||
$(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS)
|
||||
|
||||
make.info: make.texinfo
|
||||
make.dvi: make.texinfo
|
||||
# Documentation
|
||||
|
||||
make.info: make.texi
|
||||
make.dvi: make.texi
|
||||
make.ps: make.dvi make.texi
|
||||
make.html: make.texi
|
||||
|
||||
|
||||
DVIPS = dvips
|
||||
|
||||
.texi.info:
|
||||
$(MAKEINFO) $(srcdir)/$< -o ./$@
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
@command.com /c if exist make.info* del make.info*
|
||||
@command.com /c if exist make.i* del make.i*
|
||||
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||
|
||||
.texi:
|
||||
$(MAKEINFO) $(srcdir)/$< -o ./$@
|
||||
@command.com /c if exist make.info* del make.info*
|
||||
@command.com /c if exist make.i* del make.i*
|
||||
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||
|
||||
.texinfo.info:
|
||||
$(MAKEINFO) $(srcdir)/$< -o ./$@
|
||||
|
||||
.texinfo:
|
||||
$(MAKEINFO) $(srcdir)/$< -o ./$@
|
||||
|
||||
.texinfo.dvi:
|
||||
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.txi.info:
|
||||
$(MAKEINFO) $(srcdir)/$< -o ./$@
|
||||
|
||||
.txi.dvi:
|
||||
.texi.dvi:
|
||||
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
.dvi.ps:
|
||||
$(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)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(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)
|
||||
@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:
|
||||
$(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
|
||||
$(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)
|
||||
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:
|
||||
-rm -f make.aux make.cp make.cps make.dvi make.fn make.fns make.ky \
|
||||
make.kys make.ps make.log make.pg make.toc make.tp make.tps \
|
||||
make.vr make.vrs make.op make.tr make.cv make.cn
|
||||
-rm -f $(srcdir)/doc/make.aux $(srcdir)/doc/make.cp $(srcdir)/doc/make.cps $(srcdir)/doc/make.dvi \
|
||||
$(srcdir)/doc/make.fn $(srcdir)/doc/make.fns $(srcdir)/doc/make.ky $(srcdir)/doc/make.kys \
|
||||
$(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:
|
||||
|
||||
distclean-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:
|
||||
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@@ -282,13 +293,10 @@ uninstall-man:
|
||||
# but do a sanity check: if $SUBDIRS will ever have more than
|
||||
# a single directory, yell bloody murder.
|
||||
all-recursive:
|
||||
ifeq ($(words $(SUBDIRS)), 1)
|
||||
ifeq ($(findstring glob, $(SUBDIRS)), glob)
|
||||
@command.com /c if not exist glob\\nul md glob
|
||||
@echo Making all in $(SUBDIRS)
|
||||
$(MAKE) -C $(SUBDIRS) -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)
|
||||
@echo Making all in glob
|
||||
$(MAKE) -C glob -f ../Makefile INCLUDES='-I$(srcdir) -I$(srcdir)/glob' DEFS='-I.. -I$(srcdir)' VPATH=$(srcdir)/glob libglob.a
|
||||
endif
|
||||
|
||||
$(SUBDIRS):
|
||||
@@ -301,11 +309,13 @@ libglob.a: $(libglob_a_OBJECTS)
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive check-recursive:
|
||||
ifeq ($(words $(SUBDIRS)), 1)
|
||||
@echo Making $(shell echo $@ | sed s/-recursive//) in $(SUBDIRS)
|
||||
$(MAKE) -C $(SUBDIRS) -f ../Makefile $(shell echo $@ | sed s/-recursive//)-am
|
||||
ifeq ($(words $(SUBDIRS)), 2)
|
||||
@echo Making $(shell echo $@ | sed s/-recursive//) in glob
|
||||
$(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
|
||||
@echo FATAL: There is more than one directory in "($(SUBDIRS))"
|
||||
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
|
||||
@$(EXIT_FAIL)
|
||||
endif
|
||||
|
||||
@@ -313,10 +323,10 @@ tags-in-glob: $(libglob_a_SOURCES)
|
||||
etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS
|
||||
|
||||
tags-recursive:
|
||||
ifeq ($(words $(SUBDIRS)), 1)
|
||||
ifeq ($(words $(SUBDIRS)), 2)
|
||||
$(MAKE) tags-in-glob
|
||||
else
|
||||
@echo FATAL: There is more than one directory in "($(SUBDIRS))"
|
||||
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
|
||||
@$(EXIT_FAIL)
|
||||
endif
|
||||
|
||||
@@ -367,15 +377,44 @@ distdir: $(DISTFILES)
|
||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
|
||||
|
||||
info: $(INFO_DEPS) info-recursive
|
||||
dvi: $(DVIS) dvi-recursive
|
||||
info: info-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
|
||||
@:
|
||||
installcheck: installcheck-recursive
|
||||
all-recursive-am: config.h
|
||||
$(MAKE) all-recursive
|
||||
|
||||
all-am: Makefile $(INFO_DEPS) $(PROGRAMS) config.h
|
||||
all-am: Makefile $(PROGRAMS) config.h info
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
@@ -457,7 +496,8 @@ maintainer-clean-depend info dvi check-local installcheck \
|
||||
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
|
||||
install-exec install-data install uninstall all installdirs \
|
||||
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
|
||||
@@ -466,7 +506,7 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
#
|
||||
dist-hook:
|
||||
(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) \
|
||||
| (cd $(distdir); tar xfBp -)
|
||||
|
||||
@@ -543,3 +583,5 @@ check-regression:
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
# --------------- DEPENDENCIES
|
||||
|
||||
209
Makefile.am
209
Makefile.am
@@ -1,62 +1,98 @@
|
||||
# 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.4
|
||||
|
||||
SUBDIRS = $(GLOBDIR) i18n
|
||||
|
||||
bin_PROGRAMS = make
|
||||
|
||||
# These source files also have gettext references
|
||||
SRCS = ar.c arscan.c commands.c dir.c expand.c file.c function.c \
|
||||
getopt.c implicit.c job.c main.c misc.c read.c remake.c \
|
||||
rule.c signame.c variable.c vpath.c
|
||||
|
||||
make_SOURCES = $(SRCS) default.c remote-$(REMOTE).c version.c \
|
||||
getopt1.c
|
||||
|
||||
noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
|
||||
debug.h signame.h getopt.h gettext.h
|
||||
|
||||
make_LDADD = $(LIBOBJS) @ALLOCA@ $(GLOBLIB)
|
||||
|
||||
man_MANS = make.1
|
||||
info_TEXINFOS = make.texinfo
|
||||
|
||||
DEFS = -DALIASPATH=\"$(aliaspath)\" -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
||||
|
||||
INCLUDES = -I. -I$(srcdir) $(GLOBINC)
|
||||
|
||||
EXTRA_DIST = README build.sh.in $(man_MANS) README.customs remote-cstms.c\
|
||||
make-stds.texi SCOPTIONS SMakefile\
|
||||
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\
|
||||
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
||||
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat\
|
||||
readme.vms makefile.vms makefile.com config.h-vms vmsdir.h\
|
||||
vmsfunctions.c vmsify.c\
|
||||
gettext.c\
|
||||
glob/COPYING.LIB glob/ChangeLog glob/Makefile.am\
|
||||
glob/Makefile.ami glob/Makefile.in glob/SCOPTIONS\
|
||||
glob/SMakefile glob/configure.bat glob/fnmatch.c\
|
||||
glob/fnmatch.h glob/glob.c glob/glob.h
|
||||
|
||||
MOSTLYCLEANFILES = loadavg.c
|
||||
CLEANFILES = loadavg
|
||||
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options
|
||||
ACLOCAL_AMFLAGS = -I config
|
||||
|
||||
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
|
||||
include_HEADERS = gnumake.h
|
||||
|
||||
if USE_CUSTOMS
|
||||
remote = remote-cstms.c
|
||||
else
|
||||
remote = remote-stub.c
|
||||
endif
|
||||
|
||||
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
||||
function.c getopt.c getopt1.c guile.c implicit.c job.c load.c \
|
||||
loadapi.c main.c misc.c $(ossrc) output.c read.c remake.c \
|
||||
rule.c signame.c strcache.c variable.c version.c vpath.c \
|
||||
hash.c $(remote)
|
||||
|
||||
EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
|
||||
|
||||
noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
|
||||
debug.h getopt.h gettext.h hash.h output.h os.h
|
||||
|
||||
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
|
||||
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
||||
|
||||
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_DIST = ChangeLog README build.sh.in $(man_MANS) \
|
||||
README.customs README.OS2 \
|
||||
SCOPTIONS SMakefile \
|
||||
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
|
||||
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
||||
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
|
||||
make_msvc_net2003.sln make_msvc_net2003.vcproj \
|
||||
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
|
||||
|
||||
# This is built during configure, but behind configure's back
|
||||
|
||||
DISTCLEANFILES = build.sh
|
||||
|
||||
# --------------- Internationalization Section
|
||||
|
||||
POTFILES = $(SRCS) remote-cstms.c vmsfunctions.c
|
||||
|
||||
localedir = $(prefix)/share/locale
|
||||
aliaspath = $(localedir):.
|
||||
|
||||
all-local: $(srcdir)/stamp-pot
|
||||
|
||||
$(srcdir)/stamp-pot: $(POTFILES)
|
||||
@echo "$(POTFILES)" > $@
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
# --------------- Local INSTALL Section
|
||||
|
||||
@@ -64,8 +100,8 @@ $(srcdir)/stamp-pot: $(POTFILES)
|
||||
#
|
||||
|
||||
# Whether or not make needs to be installed setgid.
|
||||
# The value should be either `true' or `false'.
|
||||
# On many systems, the getloadavg function (used to implement the `-l'
|
||||
# The value should be either 'true' or 'false'.
|
||||
# On many systems, the getloadavg function (used to implement the '-l'
|
||||
# switch) will not work unless make is installed setgid kmem.
|
||||
#
|
||||
inst_setgid = @NEED_SETGID@
|
||||
@@ -81,19 +117,28 @@ install-exec-local:
|
||||
echo "chgrp $(inst_group) $$app && chmod g+s $$app"; \
|
||||
else \
|
||||
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 "of $$app."; \
|
||||
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
|
||||
|
||||
# Install the w32 and tests subdirectories
|
||||
#
|
||||
dist-hook:
|
||||
(cd $(srcdir); \
|
||||
sub=`find w32 tests -follow \( -name CVS -prune -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) \
|
||||
| (cd $(distdir); tar xfBp -)
|
||||
|
||||
@@ -111,24 +156,17 @@ check-local: check-regression check-loadavg
|
||||
|
||||
.PHONY: check-loadavg check-regression
|
||||
|
||||
# > check-loadavg
|
||||
#
|
||||
loadavg: loadavg.c config.h
|
||||
@rm -f loadavg
|
||||
$(LINK) -DTEST $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(make_LDFLAGS) loadavg.c $(LIBS)
|
||||
|
||||
# We copy getloadavg.c into a different file rather than compiling it
|
||||
# directly because some compilers clobber getloadavg.o in the process.
|
||||
#
|
||||
loadavg.c: getloadavg.c
|
||||
ln $(srcdir)/getloadavg.c loadavg.c || \
|
||||
cp $(srcdir)/getloadavg.c loadavg.c
|
||||
|
||||
check-loadavg: loadavg
|
||||
check-loadavg: loadavg$(EXEEXT)
|
||||
@echo The system uptime program believes the load average to be:
|
||||
-uptime
|
||||
@echo The GNU load average checking code believes:
|
||||
-./loadavg
|
||||
@echo The GNU load average checking code thinks:
|
||||
-./loadavg$(EXEEXT)
|
||||
|
||||
# The loadavg function is invoked during "make check" to test getloadavg.
|
||||
check_PROGRAMS = loadavg
|
||||
nodist_loadavg_SOURCES = getloadavg.c
|
||||
loadavg_CPPFLAGS = -DTEST
|
||||
loadavg_LDADD = @GETLOADAVG_LIBS@
|
||||
|
||||
# > check-regression
|
||||
#
|
||||
@@ -138,33 +176,34 @@ check-loadavg: loadavg
|
||||
#
|
||||
MAKETESTFLAGS =
|
||||
|
||||
check-regression:
|
||||
@if test -f "$(srcdir)/tests/run_make_tests"; then \
|
||||
check-regression: tests/config-flags.pm
|
||||
@if test -f '$(srcdir)/tests/run_make_tests'; then \
|
||||
ulimit -n 128; \
|
||||
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; \
|
||||
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 \
|
||||
rm -f tests/$$f; ln -s ../srctests/$$f tests; \
|
||||
done; fi ;; \
|
||||
esac; \
|
||||
echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make $(MAKETESTFLAGS)"; \
|
||||
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 -srcdir '$(abs_srcdir)' -make '../make$(EXEEXT)' $(MAKETESTFLAGS); \
|
||||
else \
|
||||
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||
fi; \
|
||||
else \
|
||||
else \
|
||||
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
|
||||
fi
|
||||
|
||||
|
||||
# --------------- Local CLEAN section
|
||||
|
||||
maintainer-clean-local:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
fi
|
||||
|
||||
|
||||
# --------------- 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@
|
||||
|
||||
127
Makefile.ami
127
Makefile.ami
@@ -1,23 +1,23 @@
|
||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
||||
# `build.sh' instead.
|
||||
# -*-Makefile-*- for GNU make on Amiga
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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 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.
|
||||
# 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.
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Makefile for GNU Make
|
||||
@@ -31,18 +31,18 @@ CPPFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
# 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.
|
||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||
# Some compilers apparently accept this
|
||||
# without complaint but produce losing code,
|
||||
# so beware.
|
||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||
# See also `config.h'.
|
||||
# See also 'config.h'.
|
||||
defines =
|
||||
|
||||
# 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
|
||||
|
||||
# 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.
|
||||
exec_prefix =
|
||||
|
||||
# Directory to install `make' in.
|
||||
# Directory to install 'make' in.
|
||||
bindir = sc:c
|
||||
# Directory to find libraries in for `-lXXX'.
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir = lib:
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir = include:
|
||||
@@ -88,20 +88,20 @@ infodir = doc:
|
||||
mandir = t:
|
||||
# Number to put on the man page filename.
|
||||
manext = 1
|
||||
# Prefix to put on installed `make' binary file name.
|
||||
# Prefix to put on installed 'make' binary file name.
|
||||
binprefix =
|
||||
# Prefix to put on installed `make' man page file name.
|
||||
# Prefix to put on installed 'make' man page file name.
|
||||
manprefix = $(binprefix)
|
||||
|
||||
# Whether or not make needs to be installed setgid.
|
||||
# The value should be either `true' or `false'.
|
||||
# On many systems, the getloadavg function (used to implement the `-l'
|
||||
# The value should be either 'true' or 'false'.
|
||||
# On many systems, the getloadavg function (used to implement the '-l'
|
||||
# switch) will not work unless make is installed setgid kmem.
|
||||
install_setgid = false
|
||||
# Install make setgid to this group so it can read /dev/kmem.
|
||||
group = sys
|
||||
|
||||
# Program to install `make'.
|
||||
# Program to install 'make'.
|
||||
INSTALL_PROGRAM = copy
|
||||
# Program to install the man page.
|
||||
INSTALL_DATA = copy
|
||||
@@ -117,21 +117,24 @@ TEXI2DVI = texi2dvi
|
||||
ETAGS = etags -w
|
||||
CTAGS = ctags -w
|
||||
|
||||
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 \
|
||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
||||
$(GETOPT) $(ALLOCA) $(extras)
|
||||
#guile = guile.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 \
|
||||
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||
remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras) $(guile)
|
||||
|
||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||
$(srcdir)vpath.c $(srcdir)version.c \
|
||||
$(srcdir)remote-$(REMOTE).c \
|
||||
$(srcdir)ar.c $(srcdir)arscan.c \
|
||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
||||
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
||||
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
||||
$(srcdir)job.h $(srcdir)makeint.h $(srcdir)rule.h \
|
||||
$(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
|
||||
info: make.info
|
||||
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
|
||||
|
||||
make.info: make.texinfo
|
||||
@@ -178,8 +181,6 @@ glob/libglob.a: FORCE config.h
|
||||
cd glob; $(MAKE) libglob.a
|
||||
FORCE:
|
||||
|
||||
tagsrcs = $(srcs) $(srcdir)remote-*.c
|
||||
|
||||
.PHONY: install installdirs
|
||||
install: installdirs \
|
||||
$(bindir)$(binprefix)make $(infodir)make.info \
|
||||
@@ -195,7 +196,7 @@ $(bindir)$(binprefix)make: make
|
||||
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
||||
else \
|
||||
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 $@."; \
|
||||
fi; \
|
||||
else true; fi
|
||||
@@ -212,9 +213,9 @@ $(infodir)make.info: make.info
|
||||
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
||||
done
|
||||
# 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.
|
||||
# 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.
|
||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
||||
@@ -265,41 +266,43 @@ glob-clean glob-realclean:
|
||||
.NOEXPORT:
|
||||
|
||||
# The automatically generated dependencies below may omit config.h
|
||||
# because it is included with ``#include <config.h>'' rather than
|
||||
# ``#include "config.h"''. So we add the explicit dependency to make sure.
|
||||
# because it is included with '#include <config.h>' rather than
|
||||
# '#include "config.h"'. So we add the explicit dependency to make sure.
|
||||
$(objs): config.h
|
||||
|
||||
# Automatically generated dependencies will be put at the end of the file.
|
||||
|
||||
# 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
|
||||
job.o: job.c make.h job.h filedef.h commands.h variable.h
|
||||
dir.o: dir.c make.h
|
||||
file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h
|
||||
misc.o: misc.c make.h dep.h
|
||||
main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \
|
||||
job.o: job.c makeint.h job.h filedef.h commands.h variable.h
|
||||
dir.o: dir.c makeint.h
|
||||
file.o: file.c makeint.h dep.h filedef.h job.h commands.h variable.h
|
||||
misc.o: misc.c makeint.h dep.h
|
||||
main.o: main.c makeint.h dep.h filedef.h variable.h job.h commands.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
|
||||
remake.o: remake.c make.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 \
|
||||
remake.o: remake.c makeint.h filedef.h job.h commands.h dep.h
|
||||
rule.o: rule.c makeint.h dep.h filedef.h job.h commands.h variable.h \
|
||||
rule.h
|
||||
implicit.o: implicit.c make.h rule.h dep.h filedef.h
|
||||
default.o: default.c make.h rule.h dep.h filedef.h job.h commands.h \
|
||||
implicit.o: implicit.c makeint.h rule.h dep.h filedef.h
|
||||
default.o: default.c makeint.h rule.h dep.h filedef.h job.h commands.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
|
||||
expand.o: expand.c make.h filedef.h job.h commands.h variable.h
|
||||
function.o: function.c make.h filedef.h variable.h dep.h job.h \
|
||||
expand.o: expand.c makeint.h filedef.h job.h commands.h variable.h
|
||||
function.o: function.c makeint.h filedef.h variable.h dep.h job.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
|
||||
ar.o: ar.c make.h filedef.h dep.h
|
||||
arscan.o: arscan.c make.h
|
||||
ar.o: ar.c makeint.h filedef.h dep.h
|
||||
arscan.o: arscan.c makeint.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
|
||||
getopt1.o : getopt1.c getopt.h
|
||||
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
|
||||
# `build_w32.bat' instead.
|
||||
# -*-Makefile-*- to build GNU make with nmake
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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 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 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
|
||||
# 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/>.
|
||||
|
||||
LINK = link
|
||||
CC = cl
|
||||
MAKE = nmake
|
||||
|
||||
OUTDIR=.
|
||||
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_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||
|
||||
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||
/INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
|
||||
/OUT:WinDebug/make.exe /DEBUG
|
||||
/STACK:0x400000 /INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
|
||||
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
|
||||
|
||||
@@ -76,6 +72,8 @@ $(OUTDIR):
|
||||
|
||||
LIBS = kernel32.lib user32.lib advapi32.lib
|
||||
|
||||
guile = $(OUTDIR)/guile.obj
|
||||
|
||||
OBJS = \
|
||||
$(OUTDIR)/ar.obj \
|
||||
$(OUTDIR)/arscan.obj \
|
||||
@@ -88,22 +86,29 @@ OBJS = \
|
||||
$(OUTDIR)/getloadavg.obj \
|
||||
$(OUTDIR)/getopt.obj \
|
||||
$(OUTDIR)/getopt1.obj \
|
||||
$(OUTDIR)/hash.obj \
|
||||
$(OUTDIR)/implicit.obj \
|
||||
$(OUTDIR)/job.obj \
|
||||
$(OUTDIR)/load.obj \
|
||||
$(OUTDIR)/main.obj \
|
||||
$(OUTDIR)/misc.obj \
|
||||
$(OUTDIR)/output.obj \
|
||||
$(OUTDIR)/read.obj \
|
||||
$(OUTDIR)/remake.obj \
|
||||
$(OUTDIR)/remote-stub.obj \
|
||||
$(OUTDIR)/rule.obj \
|
||||
$(OUTDIR)/signame.obj \
|
||||
$(OUTDIR)/strcache.obj \
|
||||
$(OUTDIR)/variable.obj \
|
||||
$(OUTDIR)/version.obj \
|
||||
$(OUTDIR)/vpath.obj \
|
||||
$(OUTDIR)/glob.obj \
|
||||
$(OUTDIR)/fnmatch.obj \
|
||||
$(OUTDIR)/dirent.obj \
|
||||
$(OUTDIR)/pathstuff.obj
|
||||
$(OUTDIR)/pathstuff.obj \
|
||||
$(OUTDIR)/posixfcn.obj \
|
||||
$(OUTDIR)/w32os.obj \
|
||||
$(guile)
|
||||
|
||||
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
||||
$(LINK) @<<
|
||||
@@ -119,5 +124,9 @@ $(OUTDIR)/fnmatch.obj : glob/fnmatch.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
$(OUTDIR)/dirent.obj : w32/compat/dirent.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
$(OUTDIR)/posixfcn.obj : w32/compat/posixfcn.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
$(OUTDIR)/w32os.obj : w32/w32os.c
|
||||
$(CC) $(CFLAGS) /c $?
|
||||
|
||||
40
README.Amiga
40
README.Amiga
@@ -11,7 +11,7 @@ GNU make):
|
||||
- Can run multi-line statements
|
||||
- Allows to use Device-Names in targets:
|
||||
|
||||
c:make : make.o
|
||||
c:make : make.o
|
||||
|
||||
is ok. To distinguish between device-names and target : or ::, MAKE
|
||||
looks for spaces. If there are any around :, it's taken as a target
|
||||
@@ -19,14 +19,14 @@ GNU make):
|
||||
that "make:make.o" tries to create "make.o" on the device "make:".
|
||||
- Replaces @@ by a newline in any command line:
|
||||
|
||||
if exists make @@\
|
||||
delete make.bak quiet @@\
|
||||
rename make make.bak @@\
|
||||
endif @@\
|
||||
$(CC) Link Make.o To make
|
||||
if exists make @@\
|
||||
delete make.bak quiet @@\
|
||||
rename make make.bak @@\
|
||||
endif @@\
|
||||
$(CC) Link Make.o To make
|
||||
|
||||
works. Note that the @@ must stand alone (ie. "make@@\" is illegal).
|
||||
Also be carefull that there is a space after the "\" (ie, at the
|
||||
works. Note that the @@ must stand alone (i.e., "make@@\" is illegal).
|
||||
Also be careful that there is a space after the "\" (i.e., at the
|
||||
beginning of the next line).
|
||||
- Can be made resident to save space and time
|
||||
- Amiga specific wildcards can be used in $(wildcard ...)
|
||||
@@ -36,17 +36,17 @@ BUGS:
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
directory.
|
||||
|
||||
@@ -54,8 +54,24 @@ is an smakefile.
|
||||
|
||||
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:
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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,
|
||||
including pipes and redirection, even when COMMAND.COM is your
|
||||
@@ -34,30 +34,41 @@ New (since 3.74) DOS-specific features:
|
||||
environment (requires Perl and auxiliary tools; see below).
|
||||
|
||||
|
||||
To build:
|
||||
To install a binary distribution:
|
||||
|
||||
Simply unzip the makNNNb.zip file (where NNN is the version number)
|
||||
preserving the directory structure (-d switch if you use PKUNZIP).
|
||||
If you are installing Make on Windows 9X or Windows 2000, use an
|
||||
unzip program that supports long filenames in zip files. After
|
||||
unzipping, make sure the directory with make.exe is on your PATH,
|
||||
and that's all you need to use Make.
|
||||
|
||||
|
||||
To build from sources:
|
||||
|
||||
1. Unzip the archive, preserving the directory structure (-d switch
|
||||
if you use PKUNZIP). If you build Make on Windows 95, use an
|
||||
unzip program that supports long filenames in zip files.
|
||||
if you use PKUNZIP). If you build Make on Windows 9X or Windows
|
||||
2000, use an unzip program that supports long filenames in zip
|
||||
files.
|
||||
|
||||
If you are unpacking an official GNU source distribution, use
|
||||
either DJTAR (which is part of the DJGPP development
|
||||
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
|
||||
where its sources are kept, just type "configure.bat" and press
|
||||
[Enter]. Otherwise, you need to supply the path to the source
|
||||
directory as an argument to the batch file, like this:
|
||||
|
||||
c:\djgpp\gnu\make-%VERSION%\configure.bat c:/djgpp/gnu/make-%VERSION%
|
||||
c:\djgpp\gnu\make-%VERSION%\configure.bat c:/djgpp/gnu/make-%VERSION%
|
||||
|
||||
Note the forward slashes in the source path argument: you MUST
|
||||
use them here.
|
||||
|
||||
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
|
||||
should be available from the usual DJGPP sites) and rerun
|
||||
configure.bat.
|
||||
@@ -73,35 +84,44 @@ To build:
|
||||
If you are building from outside of the source directory, you
|
||||
need to tell Make where the sources are, like this:
|
||||
|
||||
make srcdir=c:/djgpp/gnu/make-%VERSION%
|
||||
make srcdir=c:/djgpp/gnu/make-%VERSION%
|
||||
|
||||
(configure.bat will tell you this when it finishes). You MUST
|
||||
use a full, not relative, name of the source directory here, or
|
||||
else Make might fail.
|
||||
|
||||
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
|
||||
be available from the DJGPP sites).
|
||||
|
||||
By default, GNU make will install into your DJGPP installation
|
||||
area. If you wish to use a different directory, override the
|
||||
DESTDIR variable when invoking "make install", like this:
|
||||
|
||||
make install DESTDIR=c:/other/dir
|
||||
|
||||
This causes the make executable to be placed in c:/other/dir/bin,
|
||||
the man pages in c:/other/dir/man, etc.
|
||||
|
||||
Without a Unix-style shell, you will have to install programs
|
||||
and the docs manually. Copy make.exe to a directory on your
|
||||
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:
|
||||
|
||||
* 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:
|
||||
|
||||
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
|
||||
install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
|
||||
|
||||
(If your Info directory is other than C:\DJGPP\INFO, change this
|
||||
command accordingly.)
|
||||
|
||||
7. The `clean' targets also require Unix-style shell, and GNU Sed
|
||||
and `rm' programs (the latter from Fileutils).
|
||||
7. The 'clean' targets also require Unix-style shell, and GNU Sed
|
||||
and 'rm' programs (the latter from Fileutils).
|
||||
|
||||
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
|
||||
@@ -124,7 +144,7 @@ Notes:
|
||||
|
||||
This port supports both DOS shells (the stock COMMAND.COM and its
|
||||
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>).
|
||||
|
||||
When the $SHELL variable points to a Unix-style shell, Make
|
||||
@@ -146,17 +166,17 @@ Notes:
|
||||
redirection and pipes, and shall only call the shell when a
|
||||
batch file or a command internal to the shell is invoked. (Even
|
||||
when a command is an internal shell command, Make will first
|
||||
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
|
||||
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
|
||||
in that case.)
|
||||
|
||||
The key to all this is the extended functionality of `spawn' and
|
||||
`system' functions from the DJGPP library; this port just calls
|
||||
`system' where it would invoke the shell on Unix. The most
|
||||
The key to all this is the extended functionality of 'spawn' and
|
||||
'system' functions from the DJGPP library; this port just calls
|
||||
'system' where it would invoke the shell on Unix. The most
|
||||
important aspect of these functions is that they use a special
|
||||
mechanism to pass long (up to 16KB) command lines to DJGPP
|
||||
programs. In addition, `system' emulates some internal
|
||||
commands, like `cd' (so that you can now use forward slashes
|
||||
programs. In addition, 'system' emulates some internal
|
||||
commands, like 'cd' (so that you can now use forward slashes
|
||||
with it, and can also change the drive if the directory is on
|
||||
another drive). Another aspect worth mentioning is that you can
|
||||
call Unix shell scripts directly, provided that the shell whose
|
||||
@@ -166,7 +186,7 @@ Notes:
|
||||
reference for more details.
|
||||
|
||||
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
|
||||
arbitrary complex commands, including pipes and redirection,
|
||||
inside $(shell), which is in many cases a valid substitute for
|
||||
@@ -177,12 +197,12 @@ Notes:
|
||||
|
||||
Many Unix Makefiles include a line which sets the SHELL, for
|
||||
those versions of Make which don't have this as the default.
|
||||
Since many DOS systems don't have `sh' installed (in fact, most
|
||||
of them don't even have a `/bin' directory), this port takes
|
||||
Since many DOS systems don't have 'sh' installed (in fact, most
|
||||
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
|
||||
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
|
||||
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
|
||||
that order). If the basename doesn't include a filename
|
||||
extension, Make will look for any known extension that indicates
|
||||
@@ -217,8 +237,8 @@ Notes:
|
||||
require such a shell). More important, you can convert Unix
|
||||
Makefiles to MSDOS and leave the line which sets the shell
|
||||
intact, so that people who do have Unixy shell could use it for
|
||||
targets which aren't converted to DOS (like `install' and
|
||||
`uninstall', for example).
|
||||
targets which aren't converted to DOS (like 'install' and
|
||||
'uninstall', for example).
|
||||
|
||||
|
||||
3. Default directories.
|
||||
@@ -238,14 +258,14 @@ Notes:
|
||||
If you run Make on Windows 9x, you should be aware of the
|
||||
letter-case issue. Make is internally case-sensitive, but all
|
||||
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
|
||||
functions honor the letter-case of the filenames they get from
|
||||
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
|
||||
many Makefiles otherwise. (The details of which filenames are
|
||||
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
|
||||
upper case in the directory, is a valid DOS 8+3 filename and
|
||||
doesn't include characters invalid on MSDOS FAT filesystems,
|
||||
@@ -262,8 +282,8 @@ Notes:
|
||||
|
||||
There are a lot of places throughout the program sources which
|
||||
make implicit assumptions about the pathname syntax. In
|
||||
particular, the directories are assumed to be separated by `/',
|
||||
and any pathname which doesn't begin with a `/' is assumed to be
|
||||
particular, the directories are assumed to be separated by '/',
|
||||
and any pathname which doesn't begin with a '/' is assumed to be
|
||||
relative to the current directory. This port attempts to
|
||||
support DOS-style pathnames which might include the drive letter
|
||||
and use backslashes instead of forward slashes. However, this
|
||||
@@ -276,7 +296,7 @@ Notes:
|
||||
is the standard programs which come with MSDOS. Otherwise, you
|
||||
are advised to stay away from backslashes whenever possible. In
|
||||
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
|
||||
to break that).
|
||||
|
||||
@@ -295,9 +315,26 @@ Bug reports:
|
||||
<djgpp@delorie.com>, which is an email gateway into the above news
|
||||
group). For other bugs, please follow the procedure explained in
|
||||
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.
|
||||
|
||||
|
||||
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,241 +1,314 @@
|
||||
Port of GNU make to Windows NT and Windows 95
|
||||
Builds natively with MSVC 2.x or MSVC 4.x compilers.
|
||||
Should also build fine with MSVC 5.x and 6.x (though not confirmed).
|
||||
This version of GNU make has been tested on:
|
||||
Microsoft Windows 2000/XP/2003/Vista/7/8/10
|
||||
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
|
||||
Tulloh, who is also the author of this README.
|
||||
It builds with the MinGW port of GCC (tested with GCC 3.4.2, 4.8.1,
|
||||
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
|
||||
|
||||
3. Make sure %lib% is set to msvc lib directory. Example:
|
||||
|
||||
set lib=c:/msdev/lib
|
||||
|
||||
4. nmake /f NMakefile
|
||||
The Windows port of GNU make is maintained jointly by various people.
|
||||
It was originally made by Rob Tulloh.
|
||||
It is currently maintained by Eli Zaretskii.
|
||||
|
||||
|
||||
A short cut to steps 1, 2, and 3 is to run VCVARS32.bat before
|
||||
invoking namke. For example:
|
||||
Do this first, regardless of the build method you choose:
|
||||
---------------------------------------------------------
|
||||
|
||||
c:
|
||||
cd \msdev\bin
|
||||
VCVARS32.bat
|
||||
cd \path\to\make-%VERSION%
|
||||
nmake /f NMakefile
|
||||
|
||||
There is a bat file (build_w32.bat) for folks who have fear of nmake.
|
||||
|
||||
Outputs:
|
||||
|
||||
WinDebug/make.exe
|
||||
WinRel/make.exe
|
||||
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 ...
|
||||
|
||||
nmake /f NMakefile
|
||||
|
||||
(this produces WinDebug/make.exe and WinRel/make.exe).
|
||||
|
||||
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
|
||||
|
||||
-------------------
|
||||
-- Notes/Caveats --
|
||||
-------------------
|
||||
|
||||
GNU make on Windows 32-bit 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
|
||||
does not rely on any 3rd party software or add-on packages for
|
||||
building. The only thing needed is a version of Visual C++,
|
||||
which is the predominant compiler used on Windows32 platforms.
|
||||
This version of make is ported natively to Windows32 platforms
|
||||
(Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP,
|
||||
Windows 95, and Windows 98). It does not rely on any 3rd party
|
||||
software or add-on packages for building. The only thing
|
||||
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
|
||||
which provide a GNU make binary. These are separate projects
|
||||
and are not connected to this port effort.
|
||||
Do not confuse this port of GNU make with other Windows32 projects
|
||||
which provide a GNU make binary. These are separate projects
|
||||
and are not connected to this port effort.
|
||||
|
||||
GNU make and sh.exe:
|
||||
|
||||
This port prefers you have a working sh.exe somewhere on your
|
||||
system. If you don't have sh.exe, the port falls back to
|
||||
MSDOS mode for launching programs (via a batch file).
|
||||
The MSDOS mode style execution has not been tested that
|
||||
carefully though (The author uses GNU bash as sh.exe).
|
||||
This port prefers if you have a working sh.exe somewhere on
|
||||
your system. If you don't have sh.exe, the port falls back to
|
||||
MSDOS mode for launching programs (via a batch file). The
|
||||
MSDOS mode style execution has not been tested that carefully
|
||||
though (The author uses GNU bash as sh.exe).
|
||||
|
||||
There are very few true ports of Bourne shell for NT right now.
|
||||
There is a version of GNU bash available from Cygnus "Cygwin"
|
||||
porting effort (http://sourceware.cygnus.com/cygwin).
|
||||
Other possibilities are the MKS version of sh.exe, or building
|
||||
There are very few true ports of Bourne shell for NT right now.
|
||||
There is a version of GNU bash available from Cygnus "Cygwin"
|
||||
porting effort (http://www.cygwin.com/).
|
||||
Other possibilities are the MKS version of sh.exe, or building
|
||||
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):
|
||||
|
||||
Some versions of Bourne shell does not behave well when invoked
|
||||
as 'sh -c' from CreateProcess(). The main problem is they seem
|
||||
to have a hard time handling quoted strings correctly. This can
|
||||
be circumvented by writing commands to be executed to a batch
|
||||
file and then executing the command by calling 'sh file'.
|
||||
Some versions of Bourne shell do not behave well when invoked
|
||||
as 'sh -c' from CreateProcess(). The main problem is they seem
|
||||
to have a hard time handling quoted strings correctly. This can
|
||||
be circumvented by writing commands to be executed to a batch
|
||||
file and then executing the command by calling 'sh file'.
|
||||
|
||||
To work around this difficulty, this version of make supports
|
||||
a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
|
||||
time, make forces all command lines to be executed via script
|
||||
files instead of by command line.
|
||||
To work around this difficulty, this version of make supports
|
||||
a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
|
||||
time, make forces all command lines to be executed via script
|
||||
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
|
||||
in batch mode. All command lines will be put into batch files
|
||||
and executed via $(COMSPEC) (%COMSPEC%).
|
||||
A native Windows32 system with no Bourne shell will also run
|
||||
in batch mode. All command lines will be put into batch files
|
||||
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:
|
||||
|
||||
Good news! Make now has native support for Cygwin sh. To enable,
|
||||
define the HAVE_CYGWIN_SHELL in config.h and rebuild make
|
||||
from scratch. This version of make tested with B20.1 of Cygwin.
|
||||
Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.
|
||||
Good news! Make now has native support for Cygwin sh. To enable,
|
||||
define the HAVE_CYGWIN_SHELL in config.h and rebuild make
|
||||
from scratch. This version of make tested with B20.1 of Cygwin.
|
||||
Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.
|
||||
|
||||
GNU make and the MKS shell:
|
||||
|
||||
There is now semi-official support for the MKS shell. To turn this
|
||||
support on, define HAVE_MKS_SHELL in the config.h.W32 before you
|
||||
build make. Do not define BATCH_MODE_ONLY_SHELL if you turn
|
||||
on HAVE_MKS_SHELL.
|
||||
There is now semi-official support for the MKS shell. To turn this
|
||||
support on, define HAVE_MKS_SHELL in the config.h.W32 before you
|
||||
build make. Do not define BATCH_MODE_ONLY_SHELL if you turn
|
||||
on HAVE_MKS_SHELL.
|
||||
|
||||
GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
|
||||
|
||||
There is a caveat that should be noted with respect to handling
|
||||
single character pathnames on Windows systems. When colon is
|
||||
used in PATH variables, make tries to be smart about knowing when
|
||||
you are using colon as a separator versus colon as a drive
|
||||
letter. Unfortunately, something as simple as the string 'x:/'
|
||||
could be interpreted 2 ways: (x and /) or (x:/).
|
||||
There is a caveat that should be noted with respect to handling
|
||||
single character pathnames on Windows systems. When colon is
|
||||
used in PATH variables, make tries to be smart about knowing when
|
||||
you are using colon as a separator versus colon as a drive
|
||||
letter. Unfortunately, something as simple as the string 'x:/'
|
||||
could be interpreted 2 ways: (x and /) or (x:/).
|
||||
|
||||
Make chooses to interpret a letter plus colon (e.g. x:/) as a
|
||||
drive letter pathname. If it is necessary to use single
|
||||
character directories in paths (VPATH, vpath, Path, PATH), the
|
||||
user must do one of two things:
|
||||
Make chooses to interpret a letter plus colon (e.g. x:/) as a
|
||||
drive letter pathname. If it is necessary to use single
|
||||
character directories in paths (VPATH, vpath, Path, PATH), the
|
||||
user must do one of two things:
|
||||
|
||||
a. Use semicolon as the separator to disambiguate colon. For
|
||||
example use 'x;/' if you want to say 'x' and '/' are
|
||||
separate components.
|
||||
a. Use semicolon as the separator to disambiguate colon. For
|
||||
example use 'x;/' if you want to say 'x' and '/' are
|
||||
separate components.
|
||||
|
||||
b. Qualify the directory name so that there is more than
|
||||
one character in the path(s) used. For example, none
|
||||
of these settings are ambiguous:
|
||||
b. Qualify the directory name so that there is more than
|
||||
one character in the path(s) used. For example, none
|
||||
of these settings are ambiguous:
|
||||
|
||||
./x:./y
|
||||
/some/path/x:/some/path/y
|
||||
x:/some/path/x:x:/some/path/y
|
||||
./x:./y
|
||||
/some/path/x:/some/path/y
|
||||
x:/some/path/x:x:/some/path/y
|
||||
|
||||
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
|
||||
result and convert the paths internally to the format needed
|
||||
when interacting with the operating system.
|
||||
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
|
||||
result and convert the paths internally to the format needed
|
||||
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.
|
||||
This should ease the pain of deciding how to handle various path
|
||||
problems which exist between platforms. If colon is used on
|
||||
both Unix and Windows systems, then no ifdef'ing will be
|
||||
necessary in the makefile source.
|
||||
You are encouraged to use colon as the separator character.
|
||||
This should ease the pain of deciding how to handle various path
|
||||
problems which exist between platforms. If colon is used on
|
||||
both Unix and Windows systems, then no ifdef'ing will be
|
||||
necessary in the makefile source.
|
||||
|
||||
GNU make test suite:
|
||||
|
||||
I verified all functionality with a slightly modified version
|
||||
of make-test-%VERSION% (modifications to get test suite to run
|
||||
on Windows NT). All tests pass in an environment that includes
|
||||
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!
|
||||
I verified all functionality with a slightly modified version
|
||||
of make-test-%VERSION% (modifications to get test suite to run
|
||||
on Windows NT). All tests pass in an environment that includes
|
||||
sh.exe. Tests were performed on both Windows NT and Windows 95.
|
||||
|
||||
Pathnames and white space:
|
||||
|
||||
Unlike Unix, Windows 95/NT systems encourage pathnames which
|
||||
contain white space (e.g. C:\Program Files\). These sorts of pathnames
|
||||
are legal under Unix too, but are never encouraged. There is
|
||||
at least one place in make (VPATH/vpath handling) where paths
|
||||
containing white space will simply not work. There may be others
|
||||
too. I chose to not try and port make in such a way so that
|
||||
these sorts of paths could be handled. I offer these suggestions
|
||||
as workarounds:
|
||||
Unlike Unix, Windows 95/NT systems encourage pathnames which
|
||||
contain white space (e.g. C:\Program Files\). These sorts of
|
||||
pathnames are valid on Unix too, but are never encouraged.
|
||||
There is at least one place in make (VPATH/vpath handling) where
|
||||
paths containing white space will simply not work. There may be
|
||||
others too. I chose to not try and port make in such a way so
|
||||
that these sorts of paths could be handled. I offer these
|
||||
suggestions as workarounds:
|
||||
|
||||
1. Use 8.3 notation
|
||||
2. Rename the directory so it does not contain white space.
|
||||
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.
|
||||
|
||||
If you are unhappy with this choice, this is free software
|
||||
and you are free to take a crack at making this work. The code
|
||||
in w32/pathstuff.c and vpath.c would be the places to start.
|
||||
If you are unhappy with this choice, this is free software
|
||||
and you are free to take a crack at making this work. The code
|
||||
in w32/pathstuff.c and vpath.c would be the places to start.
|
||||
|
||||
Pathnames and Case insensitivity:
|
||||
|
||||
Unlike Unix, Windows 95/NT systems are case insensitive but case
|
||||
preserving. For example if you tell the file system to create a
|
||||
file named "Target", it will preserve the case. Subsequent access to
|
||||
the file with other case permutations will succeed (i.e. opening a
|
||||
file named "target" or "TARGET" will open the file "Target").
|
||||
Unlike Unix, Windows 95/NT systems are case insensitive but case
|
||||
preserving. For example if you tell the file system to create a
|
||||
file named "Target", it will preserve the case. Subsequent access to
|
||||
the file with other case permutations will succeed (i.e. opening a
|
||||
file named "target" or "TARGET" will open the file "Target").
|
||||
|
||||
By default, GNU make retains its case sensitivity when comparing
|
||||
target names and existing files or directories. It can be
|
||||
configured, however, into a case preserving and case insensitive
|
||||
mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
|
||||
config.h.W32.
|
||||
By default, GNU make retains its case sensitivity when comparing
|
||||
target names and existing files or directories. It can be
|
||||
configured, however, into a case preserving and case insensitive
|
||||
mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
|
||||
config.h.W32.
|
||||
|
||||
For example, the following makefile will create a file named
|
||||
Target in the directory subdir which will subsequently be used
|
||||
to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
|
||||
Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
|
||||
will not be made:
|
||||
For example, the following makefile will create a file named
|
||||
Target in the directory subdir which will subsequently be used
|
||||
to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
|
||||
Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
|
||||
will not be made:
|
||||
|
||||
subdir/Target:
|
||||
touch $@
|
||||
subdir/Target:
|
||||
touch $@
|
||||
|
||||
SUBDIR/DepTarget: SubDir/TARGET
|
||||
cp $^ $@
|
||||
SUBDIR/DepTarget: SubDir/TARGET
|
||||
cp $^ $@
|
||||
|
||||
Reliance on this behavior also eliminates the ability of GNU make
|
||||
to use case in comparison of matching rules. For example, it is
|
||||
not possible to set up a C++ rule using %.C that is different
|
||||
than a C rule using %.c. GNU make will consider these to be the
|
||||
same rule and will issue a warning.
|
||||
Reliance on this behavior also eliminates the ability of GNU make
|
||||
to use case in comparison of matching rules. For example, it is
|
||||
not possible to set up a C++ rule using %.C that is different
|
||||
than a C rule using %.c. GNU make will consider these to be the
|
||||
same rule and will issue a warning.
|
||||
|
||||
SAMBA/NTFS/VFAT:
|
||||
|
||||
I have not had any success building the debug version of this
|
||||
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
|
||||
filename it is passed on the command line. It seems to change
|
||||
the name always to to lower case. I contend that
|
||||
the VC++ compiler should not change the casename of files that
|
||||
are passed as arguments on the command line. I don't think this
|
||||
was a problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
|
||||
I have not had any success building the debug version of this
|
||||
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
|
||||
filename it is passed on the command line. It seems to change
|
||||
the name always to to lower case. I contend that the VC++
|
||||
compiler should not change the casename of files that are passed
|
||||
as arguments on the command line. I don't think this was a
|
||||
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
|
||||
NTFS and long file names. I have not done any considerable work
|
||||
under VFAT. VFAT users may wish to be aware that this port
|
||||
of make does respect case sensitivity.
|
||||
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
|
||||
under VFAT. VFAT users may wish to be aware that this port of
|
||||
make does respect case sensitivity.
|
||||
|
||||
FAT:
|
||||
|
||||
Version 3.76 added support for FAT filesystems. Make
|
||||
works around some difficulties with stat'ing of
|
||||
files and caching of filenames and directories internally.
|
||||
Version 3.76 added support for FAT filesystems. Make works
|
||||
around some difficulties with stat'ing of files and caching of
|
||||
filenames and directories internally.
|
||||
|
||||
Bug reports:
|
||||
|
||||
Please submit bugs via the normal bug reporting mechanism which
|
||||
is described in the GNU make manual and the base README.
|
||||
Please submit bugs via the normal bug reporting mechanism which
|
||||
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
|
||||
documentation. You should also install the man pages (contrary to
|
||||
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
|
||||
install'' there directly).
|
||||
me; I had to cd to the 'pmake-2.1.33/doc' directory and run 'pmake
|
||||
install' there directly).
|
||||
|
||||
|
||||
BUILDING GNU MAKE
|
||||
-----------------
|
||||
|
||||
Once you've installed Customs, you can build GNU make to use it. When
|
||||
configuring GNU make, merely use the ``--with-customs=DIR'' option.
|
||||
Provide the directory containing the ``lib'' and ``include/customs''
|
||||
configuring GNU make, merely use the '--with-customs=DIR' option.
|
||||
Provide the directory containing the 'lib' and 'include/customs'
|
||||
subdirectories as DIR. For example, if you installed the 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
|
||||
the INSTALL file.
|
||||
@@ -93,3 +93,20 @@ SunOS 4.1.x:
|
||||
#else
|
||||
|
||||
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/>.
|
||||
|
||||
292
README.git
Normal file
292
README.git
Normal file
@@ -0,0 +1,292 @@
|
||||
-*-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, using 'git shortlog',
|
||||
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
|
||||
155
README.template
155
README.template
@@ -8,16 +8,33 @@ your operating system.
|
||||
|
||||
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,
|
||||
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
|
||||
build the program, type `sh build.sh'. This should compile the program
|
||||
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
|
||||
'configure' as described in INSTALL. Then, instead of typing 'make' to
|
||||
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
|
||||
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
|
||||
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 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
|
||||
-----------
|
||||
|
||||
GNU Make can be obtained in many different ways. See a description here:
|
||||
|
||||
http://www.gnu.org/software/software.html
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
GNU make is fully documented in the GNU Make manual, which is contained
|
||||
in this distribution as the file make.texinfo. You can also find
|
||||
@@ -28,12 +45,35 @@ site. There is information there about ordering hardcopy documentation.
|
||||
http://www.gnu.org/doc/doc.html
|
||||
http://www.gnu.org/manual/manual.html
|
||||
|
||||
You can also find the latest versions of GNU Make from there.
|
||||
|
||||
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
|
||||
Development
|
||||
-----------
|
||||
|
||||
GNU Make development is hosted by Savannah, the FSF's online development
|
||||
management tool. Savannah is here:
|
||||
|
||||
http://savannah.gnu.org
|
||||
|
||||
And the GNU Make development page is here:
|
||||
|
||||
http://savannah.gnu.org/projects/make/
|
||||
|
||||
You can find most information concerning the development of GNU Make at
|
||||
this site.
|
||||
|
||||
|
||||
Bug Reporting
|
||||
-------------
|
||||
|
||||
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
|
||||
information on submitting useful and complete bug reports.
|
||||
|
||||
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:
|
||||
|
||||
http://savannah.gnu.org/bugs/?group=make
|
||||
|
||||
If you need help using GNU make, try these forums:
|
||||
|
||||
help-make@gnu.org
|
||||
@@ -41,15 +81,73 @@ If you need help using GNU make, try these forums:
|
||||
news:gnu.utils.help
|
||||
news:gnu.utils.bug
|
||||
|
||||
Also:
|
||||
|
||||
Git Access
|
||||
----------
|
||||
|
||||
The GNU make source repository is available via Git from the
|
||||
GNU Savannah Git server; look here for details:
|
||||
|
||||
http://savannah.gnu.org/git/?group=make
|
||||
|
||||
Please note: you won't be able to build GNU make from Git without
|
||||
installing appropriate maintainer's tools, such as GNU m4, automake,
|
||||
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
|
||||
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
|
||||
be checked in. Use at your own risk.
|
||||
|
||||
|
||||
System-specific Notes
|
||||
---------------------
|
||||
|
||||
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. 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
|
||||
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
|
||||
properly on your system. (You must run 'configure' beforehand, but you
|
||||
need not build Make itself to run this test.)
|
||||
|
||||
Another potential source of porting problems is the support for large
|
||||
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
|
||||
difficulties, then as a workaround you should be able to disable LFS by
|
||||
adding the '--disable-largefile' option to the 'configure' script.
|
||||
|
||||
On systems that support micro- and nano-second timestamp values and
|
||||
where stat(2) provides this information, GNU make will use it when
|
||||
comparing timestamps to get the most accurate possible result. However,
|
||||
note that many current implementations of tools that *set* timestamps do
|
||||
not preserve micro- or nano-second granularity. This means that "cp -p"
|
||||
and other similar tools (tar, etc.) may not exactly duplicate timestamps
|
||||
with micro- and nano-second granularity on some systems. If your build
|
||||
system contains rules that depend on proper behavior of tools like "cp
|
||||
-p", you should consider using the .LOW_RESOLUTION_TIME pseudo-target to
|
||||
force make to treat them properly. See the manual for details.
|
||||
|
||||
|
||||
Ports
|
||||
-----
|
||||
|
||||
- See README.customs for details on integrating GNU make with the
|
||||
Customs distributed build environment from the Pmake distribution.
|
||||
|
||||
- See README.W32 for details about GNU Make on Windows NT, 95, or 98.
|
||||
- See README.VMS for details about GNU Make on OpenVMS.
|
||||
|
||||
- See README.Amiga for details about GNU Make on AmigaDOS.
|
||||
|
||||
- See README.W32 for details about GNU Make on Windows NT, 95, or 98.
|
||||
|
||||
- See README.DOS for compilation instructions on MS-DOS and MS-Windows
|
||||
using DJGPP tools.
|
||||
|
||||
@@ -57,25 +155,24 @@ Also:
|
||||
of DJGPP; see the WWW page http://www.delorie.com/djgpp/ for more
|
||||
information.
|
||||
|
||||
Please note there are two _separate_ ports of GNU make for Microsoft
|
||||
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
|
||||
at the right README!
|
||||
|
||||
GNU Make is free software. See the file COPYING for copying conditions.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
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.
|
||||
|
||||
System-specific Notes
|
||||
---------------------
|
||||
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.
|
||||
|
||||
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.
|
||||
It is said that using `cc' without `-O' does work.
|
||||
|
||||
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
|
||||
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
|
||||
need not build Make itself to run this test.)
|
||||
|
||||
Another potential source of porting problems is the support for large
|
||||
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
|
||||
difficulties, then as a workaround you should be able to disable LFS by
|
||||
adding the `--disable-largefile' option to the `configure' script.
|
||||
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
|
||||
# `build.sh' instead.
|
||||
# -*-Makefile-*- for building GNU make with smake
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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 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.
|
||||
# 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.
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#
|
||||
# Makefile for GNU Make
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||
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%/
|
||||
|
||||
CC = sc
|
||||
@@ -37,18 +37,18 @@ CPPFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
# 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.
|
||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||
# Some compilers apparently accept this
|
||||
# without complaint but produce losing code,
|
||||
# so beware.
|
||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||
# See also `config.h'.
|
||||
# See also 'config.h'.
|
||||
defines =
|
||||
|
||||
# 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
|
||||
|
||||
# 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.
|
||||
exec_prefix =
|
||||
|
||||
# Directory to install `make' in.
|
||||
# Directory to install 'make' in.
|
||||
bindir = sc:c
|
||||
# Directory to find libraries in for `-lXXX'.
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir = lib:
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir = include:
|
||||
@@ -94,20 +94,20 @@ infodir = doc:
|
||||
mandir = t:
|
||||
# Number to put on the man page filename.
|
||||
manext = 1
|
||||
# Prefix to put on installed `make' binary file name.
|
||||
# Prefix to put on installed 'make' binary file name.
|
||||
binprefix =
|
||||
# Prefix to put on installed `make' man page file name.
|
||||
# Prefix to put on installed 'make' man page file name.
|
||||
manprefix = $(binprefix)
|
||||
|
||||
# Whether or not make needs to be installed setgid.
|
||||
# The value should be either `true' or `false'.
|
||||
# On many systems, the getloadavg function (used to implement the `-l'
|
||||
# The value should be either 'true' or 'false'.
|
||||
# On many systems, the getloadavg function (used to implement the '-l'
|
||||
# switch) will not work unless make is installed setgid kmem.
|
||||
install_setgid = false
|
||||
# Install make setgid to this group so it can read /dev/kmem.
|
||||
group = sys
|
||||
|
||||
# Program to install `make'.
|
||||
# Program to install 'make'.
|
||||
INSTALL_PROGRAM = copy
|
||||
# Program to install the man page.
|
||||
INSTALL_DATA = copy
|
||||
@@ -123,21 +123,26 @@ TEXI2DVI = texi2dvi
|
||||
ETAGS = etags -w
|
||||
CTAGS = ctags -w
|
||||
|
||||
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 \
|
||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
||||
$(GLOB) $(GETOPT) $(ALLOCA) $(extras)
|
||||
#guile = guile.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 \
|
||||
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||
output.o remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) \
|
||||
$(extras) $(guile)
|
||||
|
||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||
$(srcdir)vpath.c $(srcdir)version.c \
|
||||
$(srcdir)remote-$(REMOTE).c \
|
||||
$(srcdir)ar.c $(srcdir)arscan.c \
|
||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||
$(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
|
||||
|
||||
|
||||
@@ -147,7 +152,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||
all: make
|
||||
info: make.info
|
||||
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
|
||||
|
||||
make.info: make.texinfo
|
||||
|
||||
96
TODO.private
96
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!
|
||||
|
||||
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,
|
||||
seem to have some merit (and that I can remember).
|
||||
|
||||
@@ -28,29 +28,26 @@ priority on my list of things I don't have time to do right now is
|
||||
fixing up the GNU make test suite. Most importantly it needs to be made
|
||||
"parallelizable", so more than one regression can run at the same time
|
||||
(essentially, make the "work" directory local). Also, the CWD during
|
||||
the test should be in the work directory; right now sometimes tests leak
|
||||
files into the main directory which causes subsequent tests to fail
|
||||
(some tests may need to be tweaked). Beyond that, any cleanup done to
|
||||
make writing, reading, or handling tests simpler would be great! Please
|
||||
feel free to make whatever changes you like to the current tests, given
|
||||
some high-level goals, and that you'll port the current tests to
|
||||
whatever you do :).
|
||||
the test should be in the work directory or, better, a test-specific
|
||||
temporary directory so each test gets a new directory; right now
|
||||
sometimes tests leak files into the main directory which causes
|
||||
subsequent tests to fail (some tests may need to be tweaked). Beyond
|
||||
that, any cleanup done to make writing, reading, or handling tests
|
||||
simpler would be great! Please feel free to make whatever changes you
|
||||
like to the current tests, given some high-level goals, and that you'll
|
||||
port the current tests to whatever you do :).
|
||||
|
||||
|
||||
The Rest of the List
|
||||
--------------------
|
||||
|
||||
1) Allow variables/functions to expand to other make rules which are
|
||||
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
|
||||
1) 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 :),
|
||||
and I have very definite ideas about how I want it done. Please
|
||||
pick something else unless you must have this feature. If you try
|
||||
it, please work _extremely_ closely with me on it.
|
||||
and I have very definite ideas about how I would like it done.
|
||||
Please pick something else unless you must have this feature. If
|
||||
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
|
||||
this for a class project. Their approach is reasonable and
|
||||
workable, but doesn't really fit into my ideas for #2. Maybe
|
||||
@@ -59,7 +56,7 @@ The Rest of the List
|
||||
|
||||
[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
|
||||
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
|
||||
@@ -67,25 +64,19 @@ The Rest of the List
|
||||
best syntax or not... what if you say "a.foo + a.bar a.bam : a.baz";
|
||||
what does that mean?
|
||||
|
||||
4) Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o,
|
||||
etc., or something like that). I have an implementation of this
|
||||
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.
|
||||
3) Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o,
|
||||
etc., or something like that). Maybe using regex?
|
||||
|
||||
5) More robust clock skew detection algorithm: less false hits. I have
|
||||
some notes on this from various discussions.
|
||||
4) Provide a .TARGETS variable, containing the names of the targets
|
||||
defined in the makefile.
|
||||
|
||||
6) Provide MAKETARGETS and MAKEVARIABLES variables, containing the
|
||||
names of the targets and variables defined in the makefile.
|
||||
|
||||
Actually, I now think a $(targets ...) function, at least, would be
|
||||
Actually, I now think a $(targets ...) function, at least, might be
|
||||
better than a MAKETARGETS variable. The argument would be types of
|
||||
targets to list: "phony" is the most useful one. I suppose
|
||||
"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,
|
||||
DOS, MS-Windows, Amiga, etc. with a minimum of specialization.
|
||||
|
||||
@@ -94,26 +85,33 @@ The Rest of the List
|
||||
dunno, maybe something like $[...]? This may well not be worth
|
||||
doing until #1 is done.
|
||||
|
||||
9) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY
|
||||
psuedo-targets have different capabilities. For example, .PRECIOUS
|
||||
6) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY
|
||||
pseudo-targets have different capabilities. For example, .PRECIOUS
|
||||
can take a "%", the others can't. Etc. These should all work the
|
||||
same, insofar as that makes sense.
|
||||
|
||||
10) A syntax that specifies a build order _without_ implying a
|
||||
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.
|
||||
7) Improved debugging/logging/etc. capabilities. Part of this is done:
|
||||
I introduced a number of debugging enhancements. Tim Magill is (I
|
||||
think) looking into options to control output more selectively.
|
||||
One thing I want to do in debugging is add a flag to allow debugging
|
||||
of variables as they're expanded (!). This would be incredibly
|
||||
verbose, but could be invaluable when nothing else seems to work and
|
||||
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.
|
||||
|
||||
11) Improved debugging/logging/etc. capabilities. This area is in
|
||||
desparate need of work; the current -d, -s, etc. options are simply
|
||||
insufficient. We need different levels of output: some that are
|
||||
much less verbose. E.g., maybe just print one line about why make
|
||||
decides to rebuild each target. Also, we could use something like
|
||||
the -E option for preprocessors; this would print out makefiles
|
||||
after resolving all includes, immediate variable reverences, etc.
|
||||
Also, a way to turn on and off obeying the "@" token for scripts
|
||||
that's independent of -n (so we could have them in effect for -n,
|
||||
and have them not in effect without -n).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2016 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
Maybe other things. Contact me about the user interface.
|
||||
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/>.
|
||||
|
||||
60
acconfig.h
60
acconfig.h
@@ -1,60 +0,0 @@
|
||||
/* Name of this package (needed by automake) */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version of this package (needed by automake) */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if NLS is requested. */
|
||||
#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. */
|
||||
#undef LOCALEDIR
|
||||
|
||||
/* Define as 1 if you have the stpcpy function. */
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
/* Define to the name of the SCCS `get' command. */
|
||||
#undef SCCS_GET
|
||||
|
||||
/* 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 to `unsigned long' or `unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#undef uintmax_t
|
||||
|
||||
/* These are for AC_FUNC_SELECT */
|
||||
|
||||
/* Define if the system doesn't provide fd_set. */
|
||||
#undef fd_set
|
||||
|
||||
/* Define the type of the first arg to select(). */
|
||||
#undef fd_set_size_t
|
||||
|
||||
/* Define this if select() args need to be cast away from fd_set (HP-UX). */
|
||||
#undef SELECT_FD_SET_CAST
|
||||
506
acinclude.m4
506
acinclude.m4
@@ -1,6 +1,21 @@
|
||||
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
||||
dnl
|
||||
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 Got this from the lynx 2.8 distribution.
|
||||
@@ -43,9 +58,6 @@ fi
|
||||
#
|
||||
AC_CHECK_FUNCS(gethostbyname,,[
|
||||
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"
|
||||
test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&AC_FD_MSG
|
||||
@@ -66,7 +78,7 @@ dnl set to 'no').
|
||||
AC_DEFUN([CF_RECHECK_FUNC],[
|
||||
AC_CHECK_LIB($2,$1,[
|
||||
CF_UPPER(cf_tr_func,$1)
|
||||
AC_DEFINE_UNQUOTED(HAVE_$cf_tr_func)
|
||||
AC_DEFINE_UNQUOTED(HAVE_$cf_tr_func,1,[Define if you have function $1])
|
||||
ac_cv_func_$1=yes
|
||||
$3="-l$2 [$]$3"],[
|
||||
ac_cv_func_$1=unknown
|
||||
@@ -84,491 +96,37 @@ $1=`echo $2 | tr '[a-z]' '[A-Z]'`
|
||||
changequote([,])dnl
|
||||
])dnl
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Got this from the GNU tar 1.13.11 distribution
|
||||
dnl by Paul Eggert <eggert@twinsun.com>
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl By default, many hosts won't let programs access large files;
|
||||
dnl one must use special compiler options to get large-file access to work.
|
||||
dnl For more details about this brain damage please see:
|
||||
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
|
||||
|
||||
dnl Written by Paul Eggert <eggert@twinsun.com>.
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
|
||||
AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
|
||||
[AC_CACHE_CHECK([for $1 value to request large file support],
|
||||
ac_cv_sys_largefile_$1,
|
||||
[if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
|
||||
then
|
||||
ac_cv_sys_largefile_$1=`cat conftest.1`
|
||||
else
|
||||
ac_cv_sys_largefile_$1=no
|
||||
ifelse($1, CFLAGS,
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
|
||||
changequote(, )dnl
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
if test "$GCC" = yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
|
||||
fi
|
||||
;;
|
||||
# IRIX 6.2 and later require cc -n32.
|
||||
changequote(, )dnl
|
||||
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
if test "$GCC" != yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-n32
|
||||
fi
|
||||
esac
|
||||
if test "$ac_cv_sys_largefile_CFLAGS" != no; then
|
||||
ac_save_CC="$CC"
|
||||
CC="$CC $ac_cv_sys_largefile_CFLAGS"
|
||||
AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
|
||||
CC="$ac_save_CC"
|
||||
fi])
|
||||
fi
|
||||
rm -f conftest*])])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
|
||||
AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
|
||||
[case $2 in
|
||||
no) ;;
|
||||
?*)
|
||||
case "[$]$1" in
|
||||
'') $1=$2 ;;
|
||||
*) $1=[$]$1' '$2 ;;
|
||||
esac ;;
|
||||
esac])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
|
||||
AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
|
||||
[AC_CACHE_CHECK([for $1], $2,
|
||||
[$2=no
|
||||
changequote(, )dnl
|
||||
$4
|
||||
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
||||
case "$ac_flag" in
|
||||
-D$1)
|
||||
$2=1 ;;
|
||||
-D$1=*)
|
||||
$2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
|
||||
esac
|
||||
done
|
||||
changequote([, ])dnl
|
||||
])
|
||||
if test "[$]$2" != no; then
|
||||
AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
|
||||
fi])
|
||||
|
||||
AC_DEFUN(AC_SYS_LARGEFILE,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_ARG_ENABLE(largefile,
|
||||
[ --disable-largefile omit support for large files])
|
||||
if test "$enable_largefile" != no; then
|
||||
AC_CHECK_TOOL(GETCONF, getconf)
|
||||
AC_SYS_LARGEFILE_FLAGS(CFLAGS)
|
||||
AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
|
||||
AC_SYS_LARGEFILE_FLAGS(LIBS)
|
||||
|
||||
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
||||
case "$ac_flag" in
|
||||
no) ;;
|
||||
-D_FILE_OFFSET_BITS=*) ;;
|
||||
-D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
|
||||
-D_LARGE_FILES | -D_LARGE_FILES=*) ;;
|
||||
-D?* | -I?*)
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
|
||||
*)
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
|
||||
esac
|
||||
done
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
|
||||
ac_cv_sys_file_offset_bits,
|
||||
[Number of bits in a file offset, on hosts where this is settable.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
ac_cv_sys_file_offset_bits=64 ;;
|
||||
esac])
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
|
||||
ac_cv_sys_largefile_source,
|
||||
[Define to make fseeko etc. visible, on some hosts.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
ac_cv_sys_largefile_source=1 ;;
|
||||
esac])
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
|
||||
ac_cv_sys_large_files,
|
||||
[Define for large files, on AIX-style hosts.],
|
||||
[case "$host_os" in
|
||||
# AIX 4.2 and later
|
||||
aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
|
||||
ac_cv_sys_large_files=1 ;;
|
||||
esac])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
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)
|
||||
|
||||
dnl Define HAVE_INTTYPES_H if <inttypes.h> exists,
|
||||
dnl doesn't clash with <sys/types.h>, and declares uintmax_t.
|
||||
|
||||
AC_DEFUN(jm_AC_HEADER_INTTYPES_H,
|
||||
[
|
||||
if test x = y; then
|
||||
dnl This code is deliberately never run via ./configure.
|
||||
dnl FIXME: this is a gross hack to make autoheader put an entry
|
||||
dnl for `HAVE_INTTYPES_H' in config.h.in.
|
||||
AC_CHECK_FUNCS(INTTYPES_H)
|
||||
fi
|
||||
AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>
|
||||
#include <inttypes.h>],
|
||||
[uintmax_t i = (uintmax_t) -1;],
|
||||
jm_ac_cv_header_inttypes_h=yes,
|
||||
jm_ac_cv_header_inttypes_h=no)])
|
||||
if test $jm_ac_cv_header_inttypes_h = yes; then
|
||||
ac_kludge=HAVE_INTTYPES_H
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl From Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC,
|
||||
[AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim],
|
||||
AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
|
||||
[AC_CACHE_CHECK([for nanoseconds field of struct stat],
|
||||
ac_cv_struct_st_mtim_nsec,
|
||||
[ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
ac_cv_struct_st_mtim_nsec=no
|
||||
# tv_nsec -- the usual case
|
||||
# _tv_nsec -- Solaris 2.6, if
|
||||
# st_mtim.tv_nsec -- the usual case
|
||||
# st_mtim._tv_nsec -- Solaris 2.6, if
|
||||
# (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
|
||||
# && !defined __EXTENSIONS__)
|
||||
# st__tim.tv_nsec -- UnixWare 2.1.2
|
||||
for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
|
||||
# st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
|
||||
# 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"
|
||||
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])
|
||||
done
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"])
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
])
|
||||
|
||||
if test $ac_cv_struct_st_mtim_nsec != no; then
|
||||
AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec)
|
||||
AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec],
|
||||
[Define if struct stat contains a nanoseconds field])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl From Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
dnl Define uintmax_t to `unsigned long' or `unsigned long long'
|
||||
dnl if <inttypes.h> does not exist.
|
||||
|
||||
AC_DEFUN(jm_AC_TYPE_UINTMAX_T,
|
||||
[
|
||||
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
|
||||
if test $jm_ac_cv_header_inttypes_h = no; then
|
||||
AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
|
||||
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
|
||||
[unsigned long long ullmax = (unsigned long long) -1;
|
||||
return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
|
||||
ac_cv_type_unsigned_long_long=yes,
|
||||
ac_cv_type_unsigned_long_long=no)])
|
||||
if test $ac_cv_type_unsigned_long_long = yes; then
|
||||
AC_DEFINE(uintmax_t, unsigned long long)
|
||||
else
|
||||
AC_DEFINE(uintmax_t, unsigned long)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl From Steve Robbins <steve@nyongwa.montreal.qc.ca>
|
||||
|
||||
dnl From a proposed change made on the autoconf list on 2 Feb 1999
|
||||
dnl http://sourceware.cygnus.com/ml/autoconf/1999-02/msg00001.html
|
||||
dnl Patch for AIX 3.2 by Lars Hecking <lhecking@nmrc.ucc.ie> on 17 May 1999
|
||||
|
||||
AC_DEFUN(AC_FUNC_SELECT,
|
||||
[AC_CHECK_FUNCS(select)
|
||||
if test "$ac_cv_func_select" = yes; then
|
||||
AC_CHECK_HEADERS(unistd.h sys/types.h sys/time.h sys/select.h sys/socket.h)
|
||||
AC_MSG_CHECKING([argument types of select()])
|
||||
AC_CACHE_VAL(ac_cv_type_fd_set_size_t,dnl
|
||||
[AC_CACHE_VAL(ac_cv_type_fd_set,dnl
|
||||
[for ac_cv_type_fd_set in 'fd_set' 'int' 'void'; do
|
||||
for ac_cv_type_fd_set_size_t in 'int' 'size_t' 'unsigned long' 'unsigned'; do
|
||||
for ac_type_timeval in 'struct timeval' 'const struct timeval'; do
|
||||
AC_TRY_COMPILE(dnl
|
||||
[#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif],
|
||||
[#ifdef __STDC__
|
||||
extern select ($ac_cv_type_fd_set_size_t,
|
||||
$ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *,
|
||||
$ac_type_timeval *);
|
||||
#else
|
||||
extern select ();
|
||||
$ac_cv_type_fd_set_size_t s;
|
||||
$ac_cv_type_fd_set *p;
|
||||
$ac_type_timeval *t;
|
||||
#endif],
|
||||
[ac_found=yes ; break 3],ac_found=no)
|
||||
done
|
||||
done
|
||||
done
|
||||
])dnl AC_CACHE_VAL
|
||||
])dnl AC_CACHE_VAL
|
||||
if test "$ac_found" = no; then
|
||||
AC_MSG_ERROR([can't determine argument types])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([select($ac_cv_type_fd_set_size_t,$ac_cv_type_fd_set *,...)])
|
||||
AC_DEFINE_UNQUOTED(fd_set_size_t, $ac_cv_type_fd_set_size_t)
|
||||
ac_cast=
|
||||
if test "$ac_cv_type_fd_set" != fd_set; then
|
||||
# Arguments 2-4 are not fd_set. Some weirdo systems use fd_set type for
|
||||
# FD_SET macros, but insist that you cast the argument to select. I don't
|
||||
# understand why that might be, but it means we cannot define fd_set.
|
||||
AC_EGREP_CPP(dnl
|
||||
changequote(<<,>>)dnl
|
||||
<<(^|[^a-zA-Z_0-9])fd_set[^a-zA-Z_0-9]>>dnl
|
||||
changequote([,]),dnl
|
||||
[#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif],dnl
|
||||
# We found fd_set type in a header, need special cast
|
||||
ac_cast="($ac_cv_type_fd_set *)",dnl
|
||||
# No fd_set type; it is safe to define it
|
||||
AC_DEFINE_UNQUOTED(fd_set,$ac_cv_type_fd_set))
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(SELECT_FD_SET_CAST,$ac_cast)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# The following is taken from automake 1.4,
|
||||
# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE"
|
||||
# because only the former supports 64-bit integral types on HP-UX 10.20.
|
||||
|
||||
## ----------------------------------------- ##
|
||||
## ANSIfy the C compiler whenever possible. ##
|
||||
## From Franc,ois Pinard ##
|
||||
## ----------------------------------------- ##
|
||||
|
||||
# serial 2
|
||||
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
# If the C compiler in not in ANSI C mode by default, try to add an option
|
||||
# to output variable @code{CC} to make it so. This macro tries various
|
||||
# options that select ANSI C on some system or another. It considers the
|
||||
# compiler to be in ANSI C mode if it handles function prototypes correctly.
|
||||
#
|
||||
# If you use this macro, you should check after calling it whether the C
|
||||
# compiler has been set to accept ANSI C; if not, the shell variable
|
||||
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
||||
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
||||
# program @code{ansi2knr}, which comes with Ghostscript.
|
||||
# @end defmac
|
||||
|
||||
AC_DEFUN(AM_PROG_CC_STDC,
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_BEFORE([$0], [AC_C_INLINE])
|
||||
AC_BEFORE([$0], [AC_C_CONST])
|
||||
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
|
||||
dnl a magic option to avoid problems with ANSI preprocessor commands
|
||||
dnl like #elif.
|
||||
dnl FIXME: can't do this because then AC_AIX won't work due to a
|
||||
dnl circular dependency.
|
||||
dnl AC_BEFORE([$0], [AC_PROG_CPP])
|
||||
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
|
||||
AC_CACHE_VAL(am_cv_prog_cc_stdc,
|
||||
[am_cv_prog_cc_stdc=no
|
||||
ac_save_CC="$CC"
|
||||
# Don't try gcc -ansi; that turns off useful extensions and
|
||||
# breaks some systems' header files.
|
||||
# AIX -qlanglvl=ansi
|
||||
# Ultrix and OSF/1 -std1
|
||||
# HP-UX -Aa -D_HPUX_SOURCE
|
||||
# SVR4 -Xc -D__EXTENSIONS__
|
||||
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
static char *e (p, i)
|
||||
char **p;
|
||||
int i;
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
static char *f (char * (*g) (char **, int), char **p, ...)
|
||||
{
|
||||
char *s;
|
||||
va_list v;
|
||||
va_start (v,p);
|
||||
s = g (p, va_arg (v,int));
|
||||
va_end (v);
|
||||
return s;
|
||||
}
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};
|
||||
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
||||
int argc;
|
||||
char **argv;
|
||||
], [
|
||||
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
||||
],
|
||||
[am_cv_prog_cc_stdc="$ac_arg"; break])
|
||||
done
|
||||
CC="$ac_save_CC"
|
||||
])
|
||||
if test -z "$am_cv_prog_cc_stdc"; then
|
||||
AC_MSG_RESULT([none needed])
|
||||
else
|
||||
AC_MSG_RESULT($am_cv_prog_cc_stdc)
|
||||
fi
|
||||
case "x$am_cv_prog_cc_stdc" in
|
||||
x|xno) ;;
|
||||
*) CC="$CC $am_cv_prog_cc_stdc" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Enable internationalization support for GNU make.
|
||||
dnl Obtained from the libit 0.7 distribution
|
||||
dnl
|
||||
AC_DEFUN(fp_WITH_GETTEXT, [
|
||||
|
||||
AC_MSG_CHECKING(whether NLS is wanted)
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls disallow Native Language Support],
|
||||
enable_nls=$enableval, enable_nls=yes)
|
||||
AC_MSG_RESULT($enable_nls)
|
||||
use_nls=$enable_nls
|
||||
AM_CONDITIONAL(USE_NLS, test $use_nls = yes)
|
||||
|
||||
if test $enable_nls = yes; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
|
||||
AC_ARG_WITH(catgets,
|
||||
[ --with-catgets say that catgets is not supported],
|
||||
[AC_MSG_WARN([catgets not supported, --with-catgets ignored])])
|
||||
|
||||
AC_CHECK_FUNCS(gettext)
|
||||
AC_CHECK_LIB(intl, gettext, :)
|
||||
if test $ac_cv_lib_intl_gettext$ac_cv_func_gettext != nono; then
|
||||
AC_MSG_CHECKING(whether the included gettext is preferred)
|
||||
AC_ARG_WITH(included-gettext,
|
||||
[ --without-included-gettext avoid our provided version of gettext],
|
||||
with_included_gettext=$withval, with_included_gettext=yes)
|
||||
AC_MSG_RESULT($with_included_gettext)
|
||||
if test $with_included_gettext$ac_cv_func_gettext = nono; then
|
||||
LIBS="$LIBS -lintl"
|
||||
fi
|
||||
else
|
||||
with_included_gettext=yes
|
||||
fi
|
||||
if test $with_included_gettext = yes; then
|
||||
LIBOBJS="$LIBOBJS gettext.o"
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AC_DEFINE(HAVE_DCGETTEXT)
|
||||
else
|
||||
AC_CHECK_HEADERS(libintl.h)
|
||||
AC_CHECK_FUNCS(dcgettext gettext)
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(locale.h)
|
||||
AC_CHECK_FUNCS(getcwd setlocale stpcpy)
|
||||
AM_LC_MESSAGES
|
||||
|
||||
if test -z "$ALL_LINGUAS"; then
|
||||
AC_MSG_WARN(This package does not install translations yet.)
|
||||
else
|
||||
ac_items="$ALL_LINGUAS"
|
||||
for ac_item in $ac_items; do
|
||||
ALL_POFILES="$ALL_POFILES $ac_item.po"
|
||||
ALL_MOFILES="$ALL_MOFILES $ac_item.mo"
|
||||
done
|
||||
fi
|
||||
AC_SUBST(ALL_LINGUAS)
|
||||
AC_SUBST(ALL_POFILES)
|
||||
AC_SUBST(ALL_MOFILES)
|
||||
|
||||
AC_MSG_CHECKING(which translations to install)
|
||||
if test -z "$LINGUAS"; then
|
||||
ac_print="$ALL_LINGUAS"
|
||||
MOFILES="$ALL_MOFILES"
|
||||
else
|
||||
ac_items="$LINGUAS"
|
||||
for ac_item in $ac_items; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$ac_item*)
|
||||
ac_print="$ac_print $ac_item"
|
||||
MOFILES="$MOFILES $ac_item.mo"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
AC_SUBST(MOFILES)
|
||||
if test -z "$ac_print"; then
|
||||
AC_MSG_RESULT(none)
|
||||
else
|
||||
AC_MSG_RESULT($ac_print)
|
||||
fi
|
||||
|
||||
if test "x$prefix" = xNONE; then
|
||||
AC_DEFINE_UNQUOTED(LOCALEDIR, "$ac_default_prefix/share/locale")
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(LOCALEDIR, "$prefix/share/locale")
|
||||
fi
|
||||
fi])
|
||||
|
||||
7
alloca.c
7
alloca.c
@@ -114,9 +114,9 @@ static int stack_dir; /* 1 or -1 once known. */
|
||||
#define STACK_DIR stack_dir
|
||||
|
||||
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. */
|
||||
|
||||
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. */
|
||||
|
||||
pointer
|
||||
alloca (size)
|
||||
unsigned size;
|
||||
alloca (unsigned size)
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
116
amiga.c
116
amiga.c
@@ -1,23 +1,20 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
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 "make.h"
|
||||
#include "makeint.h"
|
||||
#include "variable.h"
|
||||
#include "amiga.h"
|
||||
#include <assert.h>
|
||||
@@ -27,11 +24,10 @@ MA 02111-1307, USA. */
|
||||
#include <proto/dos.h>
|
||||
|
||||
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
|
||||
MyExecute (argv)
|
||||
char ** argv;
|
||||
MyExecute (char **argv)
|
||||
{
|
||||
char * buffer, * ptr;
|
||||
char ** aptr;
|
||||
@@ -40,84 +36,82 @@ char ** argv;
|
||||
|
||||
for (aptr=argv; *aptr; aptr++)
|
||||
{
|
||||
len += strlen (*aptr) + 4;
|
||||
len += strlen (*aptr) + 4;
|
||||
}
|
||||
|
||||
buffer = AllocMem (len, MEMF_ANY);
|
||||
|
||||
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;
|
||||
|
||||
for (aptr=argv; *aptr; aptr++)
|
||||
{
|
||||
if (((*aptr)[0] == ';' && !(*aptr)[1]))
|
||||
{
|
||||
*ptr ++ = '"';
|
||||
strcpy (ptr, *aptr);
|
||||
ptr += strlen (ptr);
|
||||
*ptr ++ = '"';
|
||||
}
|
||||
else if ((*aptr)[0] == '@' && (*aptr)[1] == '@' && !(*aptr)[2])
|
||||
{
|
||||
*ptr ++ = '\n';
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy (ptr, *aptr);
|
||||
ptr += strlen (ptr);
|
||||
}
|
||||
*ptr ++ = ' ';
|
||||
*ptr = 0;
|
||||
if (((*aptr)[0] == ';' && !(*aptr)[1]))
|
||||
{
|
||||
*ptr ++ = '"';
|
||||
strcpy (ptr, *aptr);
|
||||
ptr += strlen (ptr);
|
||||
*ptr ++ = '"';
|
||||
}
|
||||
else if ((*aptr)[0] == '@' && (*aptr)[1] == '@' && !(*aptr)[2])
|
||||
{
|
||||
*ptr ++ = '\n';
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy (ptr, *aptr);
|
||||
ptr += strlen (ptr);
|
||||
}
|
||||
*ptr ++ = ' ';
|
||||
*ptr = 0;
|
||||
}
|
||||
|
||||
ptr[-1] = '\n';
|
||||
|
||||
status = SystemTags (buffer,
|
||||
SYS_UserShell, TRUE,
|
||||
TAG_END);
|
||||
SYS_UserShell, TRUE,
|
||||
TAG_END);
|
||||
|
||||
FreeMem (buffer, len);
|
||||
|
||||
if (SetSignal(0L,0L) & SIGBREAKF_CTRL_C)
|
||||
status = 20;
|
||||
if (SetSignal (0L,0L) & SIGBREAKF_CTRL_C)
|
||||
status = 20;
|
||||
|
||||
/* Warnings don't count */
|
||||
if (status == 5)
|
||||
status = 0;
|
||||
status = 0;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
char *
|
||||
wildcard_expansion (wc, o)
|
||||
char * wc, * o;
|
||||
wildcard_expansion (char *wc, char *o)
|
||||
{
|
||||
# define PATH_SIZE 1024
|
||||
# define PATH_SIZE 1024
|
||||
struct AnchorPath * apath;
|
||||
|
||||
if ( (apath = AllocMem (sizeof (struct AnchorPath) + PATH_SIZE,
|
||||
MEMF_CLEAR))
|
||||
)
|
||||
MEMF_CLEAR))
|
||||
)
|
||||
{
|
||||
apath->ap_Strlen = PATH_SIZE;
|
||||
apath->ap_Strlen = PATH_SIZE;
|
||||
|
||||
if (MatchFirst (wc, apath) == 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
o = variable_buffer_output (o, apath->ap_Buf,
|
||||
strlen (apath->ap_Buf));
|
||||
o = variable_buffer_output (o, " ",1);
|
||||
} while (MatchNext (apath) == 0);
|
||||
}
|
||||
if (MatchFirst (wc, apath) == 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
o = variable_buffer_output (o, apath->ap_Buf,
|
||||
strlen (apath->ap_Buf));
|
||||
o = variable_buffer_output (o, " ",1);
|
||||
} while (MatchNext (apath) == 0);
|
||||
}
|
||||
|
||||
MatchEnd (apath);
|
||||
FreeMem (apath, sizeof (struct AnchorPath) + PATH_SIZE);
|
||||
MatchEnd (apath);
|
||||
FreeMem (apath, sizeof (struct AnchorPath) + PATH_SIZE);
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
28
amiga.h
28
amiga.h
@@ -1,22 +1,18 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
|
||||
extern int MyExecute PARAMS ((char ** argv));
|
||||
extern char * wildcard_expansion PARAMS ((char * wc, char * o));
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
int MyExecute (char ** argv);
|
||||
char * wildcard_expansion (char * wc, char * o);
|
||||
|
||||
283
ar.c
283
ar.c
@@ -1,86 +1,90 @@
|
||||
/* Interface to `ar' archives for GNU Make.
|
||||
Copyright (C) 1988,89,90,91,92,93,97 Free Software Foundation, Inc.
|
||||
/* Interface to 'ar' archives 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 2, or (at your option)
|
||||
any later version.
|
||||
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.
|
||||
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. */
|
||||
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 "make.h"
|
||||
#include "makeint.h"
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
#ifndef NO_ARCHIVES
|
||||
|
||||
#include "filedef.h"
|
||||
#include "dep.h"
|
||||
#include <fnmatch.h>
|
||||
|
||||
/* Defined in arscan.c. */
|
||||
extern long int ar_scan PARAMS ((char *archive, long int (*function) (), long int arg));
|
||||
extern int ar_name_equal PARAMS ((char *name, char *mem, int truncated));
|
||||
#ifndef VMS
|
||||
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
|
||||
/* Return nonzero if NAME is an archive-member reference, zero if not. An
|
||||
archive-member reference is a name like 'lib(member)' where member is a
|
||||
non-empty string.
|
||||
If a name like 'lib((entry))' is used, a fatal error is signaled at
|
||||
the attempt to use this unsupported feature. */
|
||||
|
||||
int
|
||||
ar_name (name)
|
||||
char *name;
|
||||
ar_name (const char *name)
|
||||
{
|
||||
char *p = strchr (name, '('), *end = name + strlen (name) - 1;
|
||||
const char *p = strchr (name, '(');
|
||||
const char *end;
|
||||
|
||||
if (p == 0 || p == name || *end != ')')
|
||||
if (p == 0 || p == name)
|
||||
return 0;
|
||||
|
||||
end = p + strlen (p) - 1;
|
||||
if (*end != ')' || end == p + 1)
|
||||
return 0;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/* 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;
|
||||
put the malloc'd member name in *MEMNAME_P if MEMNAME_P is non-nil. */
|
||||
Creates one allocated string containing both names, pointed to by ARNAME_P.
|
||||
MEMNAME_P points to the member. */
|
||||
|
||||
void
|
||||
ar_parse_name (name, arname_p, memname_p)
|
||||
char *name, **arname_p, **memname_p;
|
||||
ar_parse_name (const char *name, char **arname_p, char **memname_p)
|
||||
{
|
||||
char *p = strchr (name, '('), *end = name + strlen (name) - 1;
|
||||
char *p;
|
||||
|
||||
if (arname_p != 0)
|
||||
*arname_p = savestring (name, p - name);
|
||||
|
||||
if (memname_p != 0)
|
||||
*memname_p = savestring (p + 1, end - (p + 1));
|
||||
*arname_p = xstrdup (name);
|
||||
p = strchr (*arname_p, '(');
|
||||
*(p++) = '\0';
|
||||
p[strlen (p) - 1] = '\0';
|
||||
*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, unsigned int mode UNUSED,
|
||||
const void *name)
|
||||
{
|
||||
return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||
}
|
||||
|
||||
/* Return the modtime of NAME. */
|
||||
|
||||
time_t
|
||||
ar_member_date (name)
|
||||
char *name;
|
||||
ar_member_date (const char *name)
|
||||
{
|
||||
char *arname;
|
||||
int arname_used = 0;
|
||||
char *memname;
|
||||
long int val;
|
||||
|
||||
@@ -97,137 +101,118 @@ ar_member_date (name)
|
||||
struct file *arfile;
|
||||
arfile = lookup_file (arname);
|
||||
if (arfile == 0 && file_exists_p (arname))
|
||||
{
|
||||
arfile = enter_file (arname);
|
||||
arname_used = 1;
|
||||
}
|
||||
arfile = enter_file (strcache_add (arname));
|
||||
|
||||
if (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 (memname);
|
||||
free (arname);
|
||||
|
||||
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. */
|
||||
|
||||
#ifdef VMS
|
||||
int
|
||||
ar_touch (name)
|
||||
char *name;
|
||||
ar_touch (const 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;
|
||||
}
|
||||
#else
|
||||
int
|
||||
ar_touch (name)
|
||||
char *name;
|
||||
ar_touch (const char *name)
|
||||
{
|
||||
char *arname, *memname;
|
||||
int arname_used = 0;
|
||||
register int val;
|
||||
int val;
|
||||
|
||||
ar_parse_name (name, &arname, &memname);
|
||||
|
||||
/* 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;
|
||||
arfile = lookup_file (arname);
|
||||
if (arfile == 0)
|
||||
{
|
||||
arfile = enter_file (arname);
|
||||
arname_used = 1;
|
||||
}
|
||||
|
||||
(void) f_mtime (arfile, 0);
|
||||
arfile = enter_file (strcache_add (arname));
|
||||
f_mtime (arfile, 0);
|
||||
}
|
||||
|
||||
val = 1;
|
||||
switch (ar_member_touch (arname, memname))
|
||||
{
|
||||
case -1:
|
||||
error (NILF, _("touch: Archive `%s' does not exist"), arname);
|
||||
OS (error, NILF, _("touch: Archive '%s' does not exist"), arname);
|
||||
break;
|
||||
case -2:
|
||||
error (NILF, _("touch: `%s' is not a valid archive"), arname);
|
||||
OS (error, NILF, _("touch: '%s' is not a valid archive"), arname);
|
||||
break;
|
||||
case -3:
|
||||
perror_with_name ("touch: ", arname);
|
||||
break;
|
||||
case 1:
|
||||
error (NILF,
|
||||
_("touch: Member `%s' does not exist in `%s'"), memname, arname);
|
||||
OSS (error, NILF,
|
||||
_("touch: Member '%s' does not exist in '%s'"), memname, arname);
|
||||
break;
|
||||
case 0:
|
||||
val = 0;
|
||||
break;
|
||||
default:
|
||||
error (NILF,
|
||||
_("touch: Bad return code from ar_member_touch on `%s'"), name);
|
||||
OS (error, NILF,
|
||||
_("touch: Bad return code from ar_member_touch on '%s'"), name);
|
||||
}
|
||||
|
||||
if (!arname_used)
|
||||
free (arname);
|
||||
free (memname);
|
||||
free (arname);
|
||||
|
||||
return val;
|
||||
}
|
||||
#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
|
||||
{
|
||||
char *arname;
|
||||
char *pattern;
|
||||
const char *arname;
|
||||
const char *pattern;
|
||||
#ifdef VMS
|
||||
char *suffix;
|
||||
#endif
|
||||
unsigned int size;
|
||||
struct nameseq *chain;
|
||||
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. */
|
||||
|
||||
static long int
|
||||
ar_glob_match (desc, mem, truncated,
|
||||
hdrpos, datapos, size, date, uid, gid, mode,
|
||||
state)
|
||||
int desc;
|
||||
char *mem;
|
||||
int truncated;
|
||||
long int hdrpos, datapos, size, date;
|
||||
int uid, gid, mode;
|
||||
struct ar_glob_state *state;
|
||||
ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||
long int size UNUSED, long int date UNUSED, int uid UNUSED,
|
||||
int gid UNUSED, unsigned int mode UNUSED, const void *arg)
|
||||
{
|
||||
struct ar_glob_state *state = (struct ar_glob_state *)arg;
|
||||
|
||||
if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0)
|
||||
{
|
||||
/* We have a match. Add it to the chain. */
|
||||
struct nameseq *new = (struct nameseq *) xmalloc (state->size);
|
||||
new->name = concat (state->arname, mem, ")");
|
||||
struct nameseq *new = xcalloc (state->size);
|
||||
#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;
|
||||
state->chain = new;
|
||||
++state->n;
|
||||
@@ -239,33 +224,31 @@ ar_glob_match (desc, mem, truncated,
|
||||
/* Return nonzero if PATTERN contains any metacharacters.
|
||||
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
||||
static int
|
||||
glob_pattern_p (pattern, quote)
|
||||
const char *pattern;
|
||||
const int quote;
|
||||
ar_glob_pattern_p (const char *pattern, int quote)
|
||||
{
|
||||
register const char *p;
|
||||
int open = 0;
|
||||
const char *p;
|
||||
int opened = 0;
|
||||
|
||||
for (p = pattern; *p != '\0'; ++p)
|
||||
switch (*p)
|
||||
{
|
||||
case '?':
|
||||
case '*':
|
||||
return 1;
|
||||
return 1;
|
||||
|
||||
case '\\':
|
||||
if (quote)
|
||||
++p;
|
||||
break;
|
||||
if (quote)
|
||||
++p;
|
||||
break;
|
||||
|
||||
case '[':
|
||||
open = 1;
|
||||
break;
|
||||
opened = 1;
|
||||
break;
|
||||
|
||||
case ']':
|
||||
if (open)
|
||||
return 1;
|
||||
break;
|
||||
if (opened)
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -275,42 +258,64 @@ glob_pattern_p (pattern, quote)
|
||||
Return a malloc'd chain of matching elements (or nil if none). */
|
||||
|
||||
struct nameseq *
|
||||
ar_glob (arname, member_pattern, size)
|
||||
char *arname, *member_pattern;
|
||||
unsigned int size;
|
||||
ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
||||
{
|
||||
struct ar_glob_state state;
|
||||
char **names;
|
||||
struct nameseq *n;
|
||||
const char **names;
|
||||
unsigned int i;
|
||||
|
||||
if (! glob_pattern_p (member_pattern, 1))
|
||||
#ifdef VMS
|
||||
char *vms_member_pattern;
|
||||
#endif
|
||||
if (! ar_glob_pattern_p (member_pattern, 1))
|
||||
return 0;
|
||||
|
||||
/* Scan the archive for matches.
|
||||
ar_glob_match will accumulate them in STATE.chain. */
|
||||
i = strlen (arname);
|
||||
state.arname = (char *) alloca (i + 2);
|
||||
bcopy (arname, state.arname, i);
|
||||
state.arname[i] = '(';
|
||||
state.arname[i + 1] = '\0';
|
||||
state.arname = arname;
|
||||
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.chain = 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)
|
||||
return 0;
|
||||
|
||||
/* 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;
|
||||
for (n = state.chain; n != 0; n = n->next)
|
||||
names[i++] = n->name;
|
||||
|
||||
/* 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. */
|
||||
i = 0;
|
||||
@@ -320,4 +325,4 @@ ar_glob (arname, member_pattern, size)
|
||||
return state.chain;
|
||||
}
|
||||
|
||||
#endif /* Not NO_ARCHIVES. */
|
||||
#endif /* Not NO_ARCHIVES. */
|
||||
|
||||
@@ -1,63 +1,69 @@
|
||||
#!/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@
|
||||
|
||||
# Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
|
||||
# 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 2, or (at your option)
|
||||
# any later version.
|
||||
# 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.
|
||||
# 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.
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# See Makefile.in for comments describing these variables.
|
||||
|
||||
srcdir='@srcdir@'
|
||||
CC='@CC@'
|
||||
CFLAGS='@CFLAGS@'
|
||||
CFLAGS='@CFLAGS@ @GUILE_CFLAGS@'
|
||||
CPPFLAGS='@CPPFLAGS@'
|
||||
LDFLAGS='@LDFLAGS@'
|
||||
defines='@DEFS@ -DLIBDIR="${libdir}" -DINCLUDEDIR="${includedir}"'
|
||||
LDFLAGS='@AM_LDFLAGS@ @LDFLAGS@'
|
||||
ALLOCA='@ALLOCA@'
|
||||
LOADLIBES='@LIBS@'
|
||||
extras='@LIBOBJS@'
|
||||
LOADLIBES='@LIBS@ @GUILE_LIBS@ @LIBINTL@'
|
||||
eval extras=\'@LIBOBJS@\'
|
||||
REMOTE='@REMOTE@'
|
||||
GLOBLIB='@GLOBLIB@'
|
||||
PATH_SEPARATOR='@PATH_SEPARATOR@'
|
||||
OBJEXT='@OBJEXT@'
|
||||
EXEEXT='@EXEEXT@'
|
||||
|
||||
# Common prefix for machine-independent installed files.
|
||||
prefix='@prefix@'
|
||||
# Common prefix for machine-dependent installed files.
|
||||
exec_prefix='@exec_prefix@'
|
||||
# Directory to find libraries in for `-lXXX'.
|
||||
exec_prefix=`eval echo @exec_prefix@`
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir=${exec_prefix}/lib
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir=${prefix}/include
|
||||
|
||||
localedir=${prefix}/share/locale
|
||||
aliaspath=${localedir}${PATH_SEPARATOR}.
|
||||
|
||||
defines="-DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||
|
||||
# Exit as soon as any command fails.
|
||||
set -e
|
||||
|
||||
# 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
|
||||
objs="$objs %globobjs%"
|
||||
globinc=-I${srcdir}/glob
|
||||
fi
|
||||
|
||||
# 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}...
|
||||
$CC $defines $CPPFLAGS $CFLAGS \
|
||||
-c -I. -I${srcdir} ${srcdir}/$file
|
||||
-c -I. -I${srcdir} ${globinc} ${srcdir}/$file
|
||||
done
|
||||
|
||||
# The object files were actually all put in the current directory.
|
||||
@@ -70,6 +76,6 @@ done
|
||||
|
||||
# Link all the objects together.
|
||||
echo linking make...
|
||||
$CC $LDFLAGS $objs $LOADLIBES -o make.new
|
||||
$CC $CFLAGS $LDFLAGS $objs $LOADLIBES -o makenew${EXEEXT}
|
||||
echo done
|
||||
mv -f make.new make
|
||||
mv -f makenew${EXEEXT} make${EXEEXT}
|
||||
|
||||
381
build_w32.bat
Normal file → Executable file
381
build_w32.bat
Normal file → Executable file
@@ -1,137 +1,250 @@
|
||||
set make=gnumake
|
||||
cd w32\subproc
|
||||
echo "Creating the subproc library"
|
||||
%ComSpec% /c build.bat
|
||||
cd ..\..
|
||||
del link.dbg link.rel
|
||||
del config.h
|
||||
copy config.h.W32 config.h
|
||||
echo off
|
||||
echo "Creating GNU make for Windows 95/NT"
|
||||
@echo off
|
||||
rem Copyright (C) 1996-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/>.
|
||||
|
||||
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
|
||||
if not exist .\WinDebug\nul mkdir .\WinDebug
|
||||
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 WinDebug\variable.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 rule.c
|
||||
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
|
||||
echo WinDebug\remote-stub.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 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
|
||||
cl.exe /nologo /MT /W4 /EHsc %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
|
||||
@echo off
|
||||
echo %OUTDIR%\%1.obj >>%OUTDIR%\link.sc
|
||||
goto :EOF
|
||||
|
||||
:GccCompile
|
||||
:: GCC Compile
|
||||
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
|
||||
echo WinRel\variable.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 rule.c
|
||||
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
|
||||
echo WinRel\remote-stub.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 commands.c
|
||||
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
|
||||
echo WinRel\file.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 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!"
|
||||
gcc -mthreads -Wall -std=gnu99 -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 off
|
||||
goto :EOF
|
||||
|
||||
:Link
|
||||
echo Linking %OUTDIR%/%MAKE%.exe
|
||||
if "%COMPILER%" == "gcc" goto GccLink
|
||||
|
||||
:: MSVC Link
|
||||
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
|
||||
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
|
||||
|
||||
626
commands.c
626
commands.c
@@ -1,62 +1,94 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
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 "make.h"
|
||||
#include "dep.h"
|
||||
#include "makeint.h"
|
||||
#include "filedef.h"
|
||||
#include "dep.h"
|
||||
#include "variable.h"
|
||||
#include "job.h"
|
||||
#include "commands.h"
|
||||
#ifdef WINDOWS32
|
||||
#include <windows.h>
|
||||
#include "w32err.h"
|
||||
#endif
|
||||
|
||||
extern int remote_kill PARAMS ((int id, int sig));
|
||||
#if VMS
|
||||
# define FILE_LIST_SEPARATOR (vms_comma_separator ? ',' : ' ')
|
||||
#else
|
||||
# define FILE_LIST_SEPARATOR ' '
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UNISTD_H
|
||||
extern int getpid ();
|
||||
#ifndef HAVE_UNISTD_H
|
||||
int getpid ();
|
||||
#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. */
|
||||
|
||||
static void
|
||||
set_file_variables (file)
|
||||
register struct file *file;
|
||||
void
|
||||
set_file_variables (struct file *file)
|
||||
{
|
||||
register char *p;
|
||||
char *at, *percent, *star, *less;
|
||||
struct dep *d;
|
||||
const char *at, *percent, *star, *less;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
/* If the target is an archive member `lib(member)',
|
||||
then $@ is `lib' and $% is `member'. */
|
||||
#ifndef NO_ARCHIVES
|
||||
/* If the target is an archive member 'lib(member)',
|
||||
then $@ is 'lib' and $% is 'member'. */
|
||||
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
unsigned int len;
|
||||
p = strchr (file->name, '(');
|
||||
at = (char *) alloca (p - file->name + 1);
|
||||
bcopy (file->name, at, p - file->name);
|
||||
at[p - file->name] = '\0';
|
||||
len = strlen (p + 1);
|
||||
percent = (char *) alloca (len);
|
||||
bcopy (p + 1, percent, len - 1);
|
||||
percent[len - 1] = '\0';
|
||||
const char *cp;
|
||||
char *p;
|
||||
|
||||
cp = strchr (file->name, '(');
|
||||
p = alloca (cp - file->name + 1);
|
||||
memcpy (p, file->name, cp - file->name);
|
||||
p[cp - file->name] = '\0';
|
||||
at = p;
|
||||
len = strlen (cp + 1);
|
||||
p = alloca (len);
|
||||
memcpy (p, cp + 1, len - 1);
|
||||
p[len - 1] = '\0';
|
||||
percent = p;
|
||||
}
|
||||
else
|
||||
#endif /* NO_ARCHIVES. */
|
||||
#endif /* NO_ARCHIVES. */
|
||||
{
|
||||
at = file->name;
|
||||
percent = "";
|
||||
@@ -66,48 +98,54 @@ set_file_variables (file)
|
||||
if (file->stem == 0)
|
||||
{
|
||||
/* In Unix make, $* is set to the target name with
|
||||
any suffix in the .SUFFIXES list stripped off for
|
||||
explicit rules. We store this in the `stem' member. */
|
||||
register struct dep *d;
|
||||
char *name;
|
||||
any suffix in the .SUFFIXES list stripped off for
|
||||
explicit rules. We store this in the 'stem' member. */
|
||||
const char *name;
|
||||
unsigned int len;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
name = strchr (file->name, '(') + 1;
|
||||
len = strlen (name) - 1;
|
||||
}
|
||||
{
|
||||
name = strchr (file->name, '(') + 1;
|
||||
len = strlen (name) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
name = file->name;
|
||||
len = strlen (name);
|
||||
}
|
||||
{
|
||||
name = file->name;
|
||||
len = strlen (name);
|
||||
}
|
||||
|
||||
for (d = enter_file (".SUFFIXES")->deps; d != 0; d = d->next)
|
||||
{
|
||||
unsigned int slen = strlen (dep_name (d));
|
||||
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
||||
{
|
||||
file->stem = savestring (name, len - slen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (d = enter_file (strcache_add (".SUFFIXES"))->deps; d ; d = d->next)
|
||||
{
|
||||
unsigned int slen = strlen (dep_name (d));
|
||||
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
||||
{
|
||||
file->stem = strcache_add_len (name, len - slen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (d == 0)
|
||||
file->stem = "";
|
||||
file->stem = "";
|
||||
}
|
||||
star = file->stem;
|
||||
|
||||
/* $< is the first dependency. */
|
||||
less = file->deps != 0 ? dep_name (file->deps) : "";
|
||||
/* $< is the first not order-only dependency. */
|
||||
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)
|
||||
/* This file got its commands from .DEFAULT.
|
||||
In this case $< is the same as $@. */
|
||||
less = at;
|
||||
|
||||
#define DEFINE_VARIABLE(name, len, value) \
|
||||
#define DEFINE_VARIABLE(name, len, value) \
|
||||
(void) define_variable_for_file (name,len,value,o_automatic,0,file)
|
||||
|
||||
/* Define the variables. */
|
||||
@@ -117,103 +155,156 @@ set_file_variables (file)
|
||||
DEFINE_VARIABLE ("@", 1, at);
|
||||
DEFINE_VARIABLE ("%", 1, percent);
|
||||
|
||||
/* Compute the values for $^, $+, and $?. */
|
||||
/* Compute the values for $^, $+, $?, and $|. */
|
||||
|
||||
{
|
||||
register unsigned int qmark_len, plus_len;
|
||||
char *caret_value, *plus_value;
|
||||
register char *cp;
|
||||
char *qmark_value;
|
||||
register char *qp;
|
||||
register struct dep *d;
|
||||
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;
|
||||
char *cp;
|
||||
char *caret_value;
|
||||
char *qp;
|
||||
char *bp;
|
||||
unsigned int len;
|
||||
|
||||
struct hash_table dep_hash;
|
||||
void **slot;
|
||||
|
||||
/* Compute first the value for $+, which is supposed to contain
|
||||
duplicate dependencies as they were listed in the makefile. */
|
||||
|
||||
plus_len = 0;
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
plus_len += strlen (dep_name (d)) + 1;
|
||||
|
||||
len = plus_len == 0 ? 1 : plus_len;
|
||||
cp = plus_value = (char *) alloca (len);
|
||||
|
||||
qmark_len = plus_len; /* Will be this or less. */
|
||||
bar_len = 0;
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
char *c = dep_name (d);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
len = strlen (c) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
len = strlen (c);
|
||||
|
||||
bcopy (c, cp, len);
|
||||
cp += len;
|
||||
#if VMS
|
||||
*cp++ = ',';
|
||||
#else
|
||||
*cp++ = ' ';
|
||||
#endif
|
||||
if (! d->changed)
|
||||
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
||||
if (!d->need_2nd_expansion)
|
||||
{
|
||||
if (d->ignore_mtime)
|
||||
bar_len += strlen (dep_name (d)) + 1;
|
||||
else
|
||||
plus_len += strlen (dep_name (d)) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (bar_len == 0)
|
||||
bar_len++;
|
||||
|
||||
if (plus_len == 0)
|
||||
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. */
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
||||
{
|
||||
const char *c = dep_name (d);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
len = strlen (c) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
len = strlen (c);
|
||||
|
||||
memcpy (cp, c, len);
|
||||
cp += len;
|
||||
*cp++ = FILE_LIST_SEPARATOR;
|
||||
if (! (d->changed || always_make_flag))
|
||||
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
||||
}
|
||||
|
||||
/* Kill the last space and define the variable. */
|
||||
|
||||
cp[cp > plus_value ? -1 : 0] = '\0';
|
||||
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);
|
||||
|
||||
/* Compute the values for $^ and $?. */
|
||||
/* Compute the values for $^, $?, and $|. */
|
||||
|
||||
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
|
||||
len = qmark_len == 0 ? 1 : qmark_len;
|
||||
qp = qmark_value = (char *) alloca (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)
|
||||
{
|
||||
char *c = dep_name (d);
|
||||
if (d->need_2nd_expansion)
|
||||
continue;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
len = strlen (c) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
len = strlen (c);
|
||||
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. */
|
||||
|
||||
bcopy (c, cp, len);
|
||||
cp += len;
|
||||
#if VMS
|
||||
*cp++ = ',';
|
||||
#else
|
||||
*cp++ = ' ';
|
||||
#endif
|
||||
if (d->changed)
|
||||
{
|
||||
bcopy (c, qp, len);
|
||||
qp += len;
|
||||
#if VMS
|
||||
*qp++ = ',';
|
||||
#else
|
||||
*qp++ = ' ';
|
||||
#endif
|
||||
}
|
||||
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
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
len = strlen (c) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
len = strlen (c);
|
||||
|
||||
if (d->ignore_mtime)
|
||||
{
|
||||
memcpy (bp, c, len);
|
||||
bp += len;
|
||||
*bp++ = FILE_LIST_SEPARATOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy (cp, c, len);
|
||||
cp += len;
|
||||
*cp++ = FILE_LIST_SEPARATOR;
|
||||
if (d->changed || always_make_flag)
|
||||
{
|
||||
memcpy (qp, c, len);
|
||||
qp += len;
|
||||
*qp++ = FILE_LIST_SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hash_free (&dep_hash, 0);
|
||||
|
||||
/* Kill the last spaces and define the variables. */
|
||||
|
||||
cp[cp > caret_value ? -1 : 0] = '\0';
|
||||
@@ -221,19 +312,20 @@ set_file_variables (file)
|
||||
|
||||
qp[qp > qmark_value ? -1 : 0] = '\0';
|
||||
DEFINE_VARIABLE ("?", 1, qmark_value);
|
||||
|
||||
bp[bp > bar_value ? -1 : 0] = '\0';
|
||||
DEFINE_VARIABLE ("|", 1, bar_value);
|
||||
}
|
||||
|
||||
#undef DEFINE_VARIABLE
|
||||
#undef DEFINE_VARIABLE
|
||||
}
|
||||
|
||||
/* Chop CMDS up into individual command lines if necessary.
|
||||
Also set the `lines_flag' and `any_recurse' members. */
|
||||
Also set the 'lines_flags' and 'any_recurse' members. */
|
||||
|
||||
void
|
||||
chop_commands (cmds)
|
||||
register struct commands *cmds;
|
||||
chop_commands (struct commands *cmds)
|
||||
{
|
||||
register char *p;
|
||||
unsigned int nlines, idx;
|
||||
char **lines;
|
||||
|
||||
@@ -243,66 +335,85 @@ chop_commands (cmds)
|
||||
if (!cmds || cmds->command_lines != 0)
|
||||
return;
|
||||
|
||||
/* Chop CMDS->commands up into lines in CMDS->command_lines.
|
||||
Also set the corresponding CMDS->lines_flags elements,
|
||||
and the CMDS->any_recurse flag. */
|
||||
/* Chop CMDS->commands up into lines in CMDS->command_lines. */
|
||||
|
||||
nlines = 5;
|
||||
lines = (char **) xmalloc (5 * sizeof (char *));
|
||||
idx = 0;
|
||||
p = cmds->commands;
|
||||
while (*p != '\0')
|
||||
if (one_shell)
|
||||
{
|
||||
char *end = p;
|
||||
find_end:;
|
||||
end = strchr (end, '\n');
|
||||
if (end == 0)
|
||||
end = p + strlen (p);
|
||||
else if (end > p && end[-1] == '\\')
|
||||
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;
|
||||
lines = xmalloc (nlines * sizeof (char *));
|
||||
idx = 0;
|
||||
p = cmds->commands;
|
||||
while (*p != '\0')
|
||||
{
|
||||
int backslash = 1;
|
||||
register char *b;
|
||||
for (b = end - 2; b >= p && *b == '\\'; --b)
|
||||
backslash = !backslash;
|
||||
if (backslash)
|
||||
const char *end = p;
|
||||
find_end:;
|
||||
end = strchr (end, '\n');
|
||||
if (end == 0)
|
||||
end = p + strlen (p);
|
||||
else if (end > p && end[-1] == '\\')
|
||||
{
|
||||
++end;
|
||||
goto find_end;
|
||||
int backslash = 1;
|
||||
const char *b;
|
||||
for (b = end - 2; b >= p && *b == '\\'; --b)
|
||||
backslash = !backslash;
|
||||
if (backslash)
|
||||
{
|
||||
++end;
|
||||
goto find_end;
|
||||
}
|
||||
}
|
||||
|
||||
if (idx == nlines)
|
||||
{
|
||||
nlines += 2;
|
||||
lines = xrealloc (lines, nlines * sizeof (char *));
|
||||
}
|
||||
lines[idx++] = xstrndup (p, end - p);
|
||||
p = end;
|
||||
if (*p != '\0')
|
||||
++p;
|
||||
}
|
||||
|
||||
if (idx == nlines)
|
||||
if (idx != nlines)
|
||||
{
|
||||
nlines += 2;
|
||||
lines = (char **) xrealloc ((char *) lines,
|
||||
nlines * sizeof (char *));
|
||||
nlines = idx;
|
||||
lines = xrealloc (lines, nlines * sizeof (char *));
|
||||
}
|
||||
lines[idx++] = savestring (p, end - p);
|
||||
p = end;
|
||||
if (*p != '\0')
|
||||
++p;
|
||||
}
|
||||
|
||||
if (idx != nlines)
|
||||
{
|
||||
nlines = idx;
|
||||
lines = (char **) xrealloc ((char *) lines,
|
||||
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->command_lines = lines;
|
||||
|
||||
cmds->any_recurse = 0;
|
||||
cmds->lines_flags = (char *) xmalloc (nlines);
|
||||
cmds->lines_flags = xmalloc (nlines);
|
||||
|
||||
for (idx = 0; idx < nlines; ++idx)
|
||||
{
|
||||
int flags = 0;
|
||||
unsigned char flags = 0;
|
||||
const char *p = lines[idx];
|
||||
|
||||
for (p = lines[idx];
|
||||
isblank (*p) || *p == '-' || *p == '@' || *p == '+';
|
||||
++p)
|
||||
switch (*p)
|
||||
while (ISBLANK (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||
switch (*(p++))
|
||||
{
|
||||
case '+':
|
||||
flags |= COMMANDS_RECURSE;
|
||||
@@ -314,16 +425,14 @@ chop_commands (cmds)
|
||||
flags |= COMMANDS_NOERROR;
|
||||
break;
|
||||
}
|
||||
if (!(flags & COMMANDS_RECURSE))
|
||||
{
|
||||
unsigned int len = strlen (p);
|
||||
if (sindex (p, len, "$(MAKE)", 7) != 0
|
||||
|| sindex (p, len, "${MAKE}", 7) != 0)
|
||||
flags |= COMMANDS_RECURSE;
|
||||
}
|
||||
|
||||
/* If no explicit '+' was given, look for MAKE variable references. */
|
||||
if (!(flags & COMMANDS_RECURSE)
|
||||
&& (strstr (p, "$(MAKE)") != 0 || strstr (p, "${MAKE}") != 0))
|
||||
flags |= COMMANDS_RECURSE;
|
||||
|
||||
cmds->lines_flags[idx] = flags;
|
||||
cmds->any_recurse |= flags & COMMANDS_RECURSE;
|
||||
cmds->any_recurse |= flags & COMMANDS_RECURSE ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,22 +441,21 @@ chop_commands (cmds)
|
||||
fork off a child process to run the first command line in the sequence. */
|
||||
|
||||
void
|
||||
execute_file_commands (file)
|
||||
struct file *file;
|
||||
execute_file_commands (struct file *file)
|
||||
{
|
||||
register char *p;
|
||||
const char *p;
|
||||
|
||||
/* Don't go through all the preparations if
|
||||
the commands are nothing but whitespace. */
|
||||
|
||||
for (p = file->cmds->commands; *p != '\0'; ++p)
|
||||
if (!isspace ((unsigned char)*p) && *p != '-' && *p != '@')
|
||||
if (!ISSPACE (*p) && *p != '-' && *p != '@' && *p != '+')
|
||||
break;
|
||||
if (*p == '\0')
|
||||
{
|
||||
/* If there are no commands, assume everything worked. */
|
||||
set_command_state (file, cs_running);
|
||||
file->update_status = 0;
|
||||
file->update_status = us_success;
|
||||
notice_finished_file (file);
|
||||
return;
|
||||
}
|
||||
@@ -358,6 +466,11 @@ execute_file_commands (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. */
|
||||
new_job (file);
|
||||
}
|
||||
@@ -370,8 +483,7 @@ int handling_fatal_signal = 0;
|
||||
/* Handle fatal signals. */
|
||||
|
||||
RETSIGTYPE
|
||||
fatal_error_signal (sig)
|
||||
int sig;
|
||||
fatal_error_signal (int sig)
|
||||
{
|
||||
#ifdef __MSDOS__
|
||||
extern int dos_status, dos_command_running;
|
||||
@@ -392,6 +504,27 @@ fatal_error_signal (sig)
|
||||
|
||||
exit (10);
|
||||
#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;
|
||||
|
||||
/* Set the handling for this signal to the default.
|
||||
@@ -403,10 +536,10 @@ fatal_error_signal (sig)
|
||||
|
||||
if (sig == SIGTERM)
|
||||
{
|
||||
register struct child *c;
|
||||
struct child *c;
|
||||
for (c = children; c != 0; c = c->next)
|
||||
if (!c->remote)
|
||||
(void) kill (c->pid, SIGTERM);
|
||||
if (!c->remote)
|
||||
(void) kill (c->pid, SIGTERM);
|
||||
}
|
||||
|
||||
/* If we got a signal that means the user
|
||||
@@ -421,21 +554,21 @@ fatal_error_signal (sig)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
register struct child *c;
|
||||
struct child *c;
|
||||
|
||||
/* 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. */
|
||||
for (c = children; c != 0; c = c->next)
|
||||
if (c->remote)
|
||||
(void) remote_kill (c->pid, sig);
|
||||
if (c->remote)
|
||||
(void) remote_kill (c->pid, sig);
|
||||
|
||||
for (c = children; c != 0; c = c->next)
|
||||
delete_child_targets (c);
|
||||
delete_child_targets (c);
|
||||
|
||||
/* Clean up the children. We don't just use the call below because
|
||||
we don't want to print the "Waiting for children" message. */
|
||||
we don't want to print the "Waiting for children" message. */
|
||||
while (job_slots_used > 0)
|
||||
reap_children (1, 0);
|
||||
reap_children (1, 0);
|
||||
}
|
||||
else
|
||||
/* Wait for our children to die. */
|
||||
@@ -450,13 +583,21 @@ fatal_error_signal (sig)
|
||||
if (sig == SIGQUIT)
|
||||
/* We don't want to send ourselves SIGQUIT, because it will
|
||||
cause a core dump. Just exit instead. */
|
||||
exit (EXIT_FAILURE);
|
||||
exit (MAKE_TROUBLE);
|
||||
#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
|
||||
will be unblocked when we return and arrive then to kill us. */
|
||||
if (kill (getpid (), sig) < 0)
|
||||
pfatal_with_name ("kill");
|
||||
#endif /* not WINDOWS32 */
|
||||
#endif /* not Amiga */
|
||||
#endif /* not __MSDOS__ */
|
||||
}
|
||||
@@ -465,11 +606,10 @@ fatal_error_signal (sig)
|
||||
and it has changed on disk since we last stat'd it. */
|
||||
|
||||
static void
|
||||
delete_target (file, on_behalf_of)
|
||||
struct file *file;
|
||||
char *on_behalf_of;
|
||||
delete_target (struct file *file, const char *on_behalf_of)
|
||||
{
|
||||
struct stat st;
|
||||
int e;
|
||||
|
||||
if (file->precious || file->phony)
|
||||
return;
|
||||
@@ -477,30 +617,37 @@ delete_target (file, on_behalf_of)
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
if (ar_member_date (file->name) != FILE_TIMESTAMP_S (file->last_mtime))
|
||||
{
|
||||
if (on_behalf_of)
|
||||
error (NILF, _("*** [%s] Archive member `%s' may be bogus; not deleted"),
|
||||
on_behalf_of, file->name);
|
||||
else
|
||||
error (NILF, _("*** Archive member `%s' may be bogus; not deleted"),
|
||||
file->name);
|
||||
}
|
||||
time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
|
||||
? (time_t) -1
|
||||
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
||||
if (ar_member_date (file->name) != file_date)
|
||||
{
|
||||
if (on_behalf_of)
|
||||
OSS (error, NILF,
|
||||
_("*** [%s] Archive member '%s' may be bogus; not deleted"),
|
||||
on_behalf_of, file->name);
|
||||
else
|
||||
OS (error, NILF,
|
||||
_("*** Archive member '%s' may be bogus; not deleted"),
|
||||
file->name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (stat (file->name, &st) == 0
|
||||
EINTRLOOP (e, stat (file->name, &st));
|
||||
if (e == 0
|
||||
&& S_ISREG (st.st_mode)
|
||||
&& FILE_TIMESTAMP_STAT_MODTIME (st) != file->last_mtime)
|
||||
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
||||
{
|
||||
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
|
||||
error (NILF, _("*** Deleting file `%s'"), file->name);
|
||||
OS (error, NILF, _("*** Deleting file '%s'"), file->name);
|
||||
if (unlink (file->name) < 0
|
||||
&& errno != ENOENT) /* It disappeared; so what. */
|
||||
perror_with_name ("unlink: ", file->name);
|
||||
&& errno != ENOENT) /* It disappeared; so what. */
|
||||
perror_with_name ("unlink: ", file->name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,8 +656,7 @@ delete_target (file, on_behalf_of)
|
||||
Set the flag in CHILD to say they've been deleted. */
|
||||
|
||||
void
|
||||
delete_child_targets (child)
|
||||
struct child *child;
|
||||
delete_child_targets (struct child *child)
|
||||
{
|
||||
struct dep *d;
|
||||
|
||||
@@ -518,9 +664,9 @@ delete_child_targets (child)
|
||||
return;
|
||||
|
||||
/* 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)
|
||||
delete_target (d->file, child->file->name);
|
||||
|
||||
@@ -530,33 +676,35 @@ delete_child_targets (child)
|
||||
/* Print out the commands in CMDS. */
|
||||
|
||||
void
|
||||
print_commands (cmds)
|
||||
register struct commands *cmds;
|
||||
print_commands (const struct commands *cmds)
|
||||
{
|
||||
register char *s;
|
||||
const char *s;
|
||||
|
||||
fputs (_("# commands to execute"), stdout);
|
||||
fputs (_("# recipe to execute"), stdout);
|
||||
|
||||
if (cmds->fileinfo.filenm == 0)
|
||||
puts (_(" (built-in):"));
|
||||
else
|
||||
printf (_(" (from `%s', line %lu):\n"),
|
||||
printf (_(" (from '%s', line %lu):\n"),
|
||||
cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
||||
|
||||
s = cmds->commands;
|
||||
while (*s != '\0')
|
||||
{
|
||||
char *end;
|
||||
const char *end;
|
||||
int bs;
|
||||
|
||||
while (isspace ((unsigned char)*s))
|
||||
++s;
|
||||
/* Print one full logical recipe line: find a non-escaped newline. */
|
||||
for (end = s, bs = 0; *end != '\0'; ++end)
|
||||
{
|
||||
if (*end == '\n' && !bs)
|
||||
break;
|
||||
|
||||
end = strchr (s, '\n');
|
||||
if (end == 0)
|
||||
end = s + strlen (s);
|
||||
bs = *end == '\\' ? !bs : 0;
|
||||
}
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
||||
56
commands.h
56
commands.h
@@ -1,42 +1,42 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Structure that gives the commands to make a file
|
||||
and information about where these commands came from. */
|
||||
|
||||
struct commands
|
||||
{
|
||||
struct floc fileinfo; /* Where commands were defined. */
|
||||
char *commands; /* Commands text. */
|
||||
unsigned int ncommand_lines;/* Number of command lines. */
|
||||
char **command_lines; /* Commands chopped up into lines. */
|
||||
char *lines_flags; /* One set of flag bits for each line. */
|
||||
int any_recurse; /* Nonzero if any `lines_recurse' elt has */
|
||||
/* the COMMANDS_RECURSE bit set. */
|
||||
floc fileinfo; /* Where commands were defined. */
|
||||
char *commands; /* Commands text. */
|
||||
char **command_lines; /* Commands chopped up into lines. */
|
||||
unsigned char *lines_flags; /* One set of flag bits for each line. */
|
||||
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. */
|
||||
};
|
||||
|
||||
/* Bits in `lines_flags'. */
|
||||
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
||||
#define COMMANDS_SILENT 2 /* Silent: @. */
|
||||
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
||||
/* Bits in 'lines_flags'. */
|
||||
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
||||
#define COMMANDS_SILENT 2 /* Silent: @. */
|
||||
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
||||
|
||||
extern void execute_file_commands PARAMS ((struct file *file));
|
||||
extern void print_commands PARAMS ((struct commands *cmds));
|
||||
extern void delete_child_targets PARAMS ((struct child *child));
|
||||
extern void chop_commands PARAMS ((struct commands *cmds));
|
||||
RETSIGTYPE fatal_error_signal (int sig);
|
||||
void execute_file_commands (struct file *file);
|
||||
void print_commands (const struct commands *cmds);
|
||||
void delete_child_targets (struct child *child);
|
||||
void chop_commands (struct commands *cmds);
|
||||
void set_file_variables (struct file *file);
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
/* 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.
|
||||
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
|
||||
/* #undef _ALL_SOURCE */
|
||||
#endif
|
||||
@@ -23,10 +37,14 @@
|
||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||
/* #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 */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* 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. */
|
||||
#define gid_t int
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
@@ -35,25 +53,25 @@
|
||||
/* 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. */
|
||||
/* 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. */
|
||||
/* Embed GNU Guile support */
|
||||
/* #undef HAVE_GUILE */
|
||||
|
||||
/* Define if the 'long double' type works. */
|
||||
/* #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 if you have a working `mmap' system call. */
|
||||
/* Define if you have a working 'mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if system calls automatically restart after interruption
|
||||
@@ -66,7 +84,7 @@
|
||||
/* Define if your struct stat has st_blocks. */
|
||||
/* #undef HAVE_ST_BLOCKS */
|
||||
|
||||
/* Define if you have the strcoll function and it is properly defined. */
|
||||
/* Define if you have the strcoll function and it is properly defined. */
|
||||
#define HAVE_STRCOLL 1
|
||||
|
||||
/* Define if your struct stat has st_rdev. */
|
||||
@@ -75,7 +93,7 @@
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* 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. */
|
||||
@@ -91,16 +109,10 @@
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
/* #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. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* Define if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define if your struct nlist has an n_un member. */
|
||||
@@ -112,7 +124,7 @@
|
||||
/* 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. */
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
#define pid_t int
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except
|
||||
@@ -133,25 +145,25 @@
|
||||
/* 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
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
#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 */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS
|
||||
|
||||
/* Define on System V Release 4. */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
/* Define if 'sys_siglist' is declared by <signal.h>. */
|
||||
/* #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 for Encore UMAX. */
|
||||
@@ -161,19 +173,16 @@
|
||||
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. */
|
||||
/* Define to the name of the SCCS 'get' command. */
|
||||
#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 */
|
||||
|
||||
/* Define this to enable job server support in GNU make. */
|
||||
@@ -183,13 +192,13 @@
|
||||
if it exists. */
|
||||
/* #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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Define if you have the dup2 function. */
|
||||
@@ -225,7 +234,7 @@
|
||||
/* Define if you have the seteuid function. */
|
||||
/* #undef HAVE_SETEUID */
|
||||
|
||||
/* Define if you have the setlinebuf function. */
|
||||
/* Define if you have the setlinebuf function. */
|
||||
/* #undef HAVE_SETLINEBUF */
|
||||
|
||||
/* Define if you have the setregid function. */
|
||||
@@ -234,15 +243,21 @@
|
||||
/* Define if you have the setreuid function. */
|
||||
/* #undef HAVE_SETREUID */
|
||||
|
||||
/* Define if you have the sigsetmask function. */
|
||||
/* 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. */
|
||||
/* Define to 1 if you have the strcasecmp function. */
|
||||
/* #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 HAVE_STRERROR 1
|
||||
|
||||
@@ -303,9 +318,18 @@
|
||||
/* Define if you have the kstat library (-lkstat). */
|
||||
/* #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). */
|
||||
/* #undef HAVE_LIBSUN */
|
||||
|
||||
/* Output sync sypport */
|
||||
#define NO_OUTPUT_SYNC
|
||||
|
||||
/* Define for Case Insensitve behavior */
|
||||
#define HAVE_CASE_INSENSITIVE_FS
|
||||
|
||||
|
||||
1088
config.guess
vendored
1088
config.guess
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,36 @@
|
||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> */
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
||||
|
||||
/* 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.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
/* maybe this should be placed into make.h */
|
||||
#if defined(__VAX) && defined(__DECC)
|
||||
#define alloca(n) __ALLOCA(n)
|
||||
#endif
|
||||
|
||||
/* Define to 1 if NLS is requested. */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
@@ -25,7 +40,10 @@
|
||||
/* 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. */
|
||||
/* Embed GNU Guile support */
|
||||
/* #undef HAVE_GUILE */
|
||||
|
||||
/* Define to 1 if your locale.h file contains LC_MESSAGES. */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
|
||||
/* Define to the installation directory for locales. */
|
||||
@@ -34,7 +52,7 @@
|
||||
/* Define as 1 if you have the stpcpy function. */
|
||||
/* #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 */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
@@ -47,114 +65,117 @@
|
||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||
/* #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 */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* 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 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 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 */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
/* Define to 1 if you have the fdopen function. */
|
||||
#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 */
|
||||
|
||||
/* Define if your system has its own `getloadavg' function. */
|
||||
/* Define to 1 if your system has its own 'getloadavg' function. */
|
||||
/* #undef HAVE_GETLOADAVG */
|
||||
|
||||
/* Define if you have the getmntent function. */
|
||||
/* Define to 1 if you have the getmntent function. */
|
||||
/* #undef HAVE_GETMNTENT */
|
||||
|
||||
/* Define if the `long double' type works. */
|
||||
/* Define to 1 if the 'long double' type works. */
|
||||
/* #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 if you have a working `mmap' system call. */
|
||||
/* Define to 1 if you have a working 'mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if system calls automatically restart after interruption
|
||||
/* Define to 1 if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #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 */
|
||||
|
||||
/* Define if your struct stat has st_blocks. */
|
||||
/* Define to 1 if your struct stat has 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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
/* Define to 1 if you have the strftime function. */
|
||||
/* #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 */
|
||||
|
||||
/* Define if your struct tm has tm_zone. */
|
||||
/* Define to 1 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
|
||||
/* Define to 1 if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
/* #undef HAVE_TZNAME */
|
||||
|
||||
/* Define if you have <unistd.h>. */
|
||||
/* Define to 1 if you have <unistd.h>. */
|
||||
#ifdef __DECC
|
||||
#define HAVE_UNISTD_H 1
|
||||
#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 */
|
||||
|
||||
/* 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 to 1 if you have the wait3 system call. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* Define to 1 if on 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 */
|
||||
|
||||
/* Define if you have <nlist.h>. */
|
||||
/* Define to 1 if you have <nlist.h>. */
|
||||
/* #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 */
|
||||
|
||||
/* 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 */
|
||||
#if __DECC_VER < 50090000
|
||||
#define pid_t int
|
||||
#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. */
|
||||
/* #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 */
|
||||
|
||||
/* Define as the return type of signal handlers (int or 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
|
||||
before release 3. */
|
||||
/* #undef SETVBUF_REVERSED */
|
||||
@@ -162,25 +183,25 @@
|
||||
/* 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
|
||||
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. */
|
||||
/* Define to 1 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. */
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* #undef STDC_HEADERS */
|
||||
|
||||
/* Define on System V Release 4. */
|
||||
/* #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 */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
#if __DECC_VER < 50090000
|
||||
#define uid_t int
|
||||
#endif
|
||||
@@ -192,19 +213,16 @@
|
||||
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. */
|
||||
/* Define to the name of the SCCS 'get' command. */
|
||||
/* #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 */
|
||||
|
||||
/* Define this to enable job server support in GNU make. */
|
||||
@@ -214,137 +232,149 @@
|
||||
if it exists. */
|
||||
/* #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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Define if you have the dup2 function. */
|
||||
/* Define to 1 if you have the dup2 function. */
|
||||
#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 if you have the getgroups function. */
|
||||
/* Define to 1 if you have the getgroups function. */
|
||||
/* #undef HAVE_GETGROUPS */
|
||||
|
||||
/* Define if you have the gethostbyname function. */
|
||||
/* Define to 1 if you have the gethostbyname function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
/* Define to 1 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. */
|
||||
/* Define to 1 if you have the memmove function. */
|
||||
#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 if you have the psignal function. */
|
||||
/* Define to 1 if you have the psignal function. */
|
||||
/* #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 */
|
||||
|
||||
/* Define if you have the setegid function. */
|
||||
/* Define to 1 if you have the setegid function. */
|
||||
/* #undef HAVE_SETEGID */
|
||||
|
||||
/* Define if you have the seteuid function. */
|
||||
/* Define to 1 if you have the seteuid function. */
|
||||
/* #undef HAVE_SETEUID */
|
||||
|
||||
/* Define if you have the setlinebuf function. */
|
||||
/* Define to 1 if you have the setlinebuf function. */
|
||||
/* #undef HAVE_SETLINEBUF */
|
||||
|
||||
/* Define if you have the setregid function. */
|
||||
/* Define to 1 if you have the setregid function. */
|
||||
/* #undefine HAVE_SETREGID */
|
||||
|
||||
/* Define if you have the setreuid function. */
|
||||
/* Define to 1 if you have the setreuid function. */
|
||||
/* #define HAVE_SETREUID */
|
||||
|
||||
/* Define if you have the sigsetmask function. */
|
||||
/* Define to 1 if you have the sigsetmask function. */
|
||||
#define HAVE_SIGSETMASK 1
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
/* Define to 1 if you have the socket function. */
|
||||
/* #undef HAVE_SOCKET */
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
/* Define to 1 if you have the strcasecmp function. */
|
||||
#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 if you have the strsignal function. */
|
||||
/* Define to 1 if you have the strsignal function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define if you have the wait3 function. */
|
||||
/* Define to 1 if you have the wait3 function. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define if you have the waitpid function. */
|
||||
/* Define to 1 if you have the waitpid function. */
|
||||
/* #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 if you have the <fcntl.h> header file. */
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#ifdef __DECC
|
||||
#define HAVE_FCNTL_H 1
|
||||
#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 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 */
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
/* #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 */
|
||||
|
||||
/* 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 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 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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Define if you have the <sys/timeb.h> header file. */
|
||||
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||
#ifndef __GNUC__
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
#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 */
|
||||
|
||||
/* Define if you have the dgc library (-ldgc). */
|
||||
/* Define to 1 if you have the dgc library (-ldgc). */
|
||||
/* #undef HAVE_LIBDGC */
|
||||
|
||||
/* Define if you have the kstat library (-lkstat). */
|
||||
/* Define to 1 if you have the kstat library (-lkstat). */
|
||||
/* #undef HAVE_LIBKSTAT *
|
||||
|
||||
/* Define if you have the sun library (-lsun). */
|
||||
/* Define to 1 if you have the sun library (-lsun). */
|
||||
/* #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. */
|
||||
#define FILE_TIMESTAMP_HI_RES 0
|
||||
|
||||
/* Define for case insensitve filenames */
|
||||
#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 */
|
||||
|
||||
/* VMS specific, V7.0 has opendir() and friends, so it's undefined */
|
||||
@@ -354,15 +384,9 @@
|
||||
/* #undef HAVE_VMSDIR_H */
|
||||
/* #undef _DIRENT_HAVE_D_NAMLEN */
|
||||
|
||||
/* On older systems without 7.0 backport of CRTL the first one is defined */
|
||||
#ifdef __CRTL_VER
|
||||
# if __CRTL_VER < 70000000
|
||||
# define HAVE_VMSDIR_H 1
|
||||
# endif
|
||||
#else
|
||||
# if __VMS_VER < 70000000
|
||||
# define HAVE_VMSDIR_H 1
|
||||
# endif
|
||||
/* On older systems without 7.0 backport of CRTL use non-VMS code for opendir() etc. */
|
||||
#if __CRTL_VER < 70000000
|
||||
# define HAVE_VMSDIR_H 1
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
||||
@@ -377,20 +401,32 @@
|
||||
#ifdef __DECC
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#define getopt gnu_getopt
|
||||
#define optarg gnu_optarg
|
||||
#define optopt gnu_optopt
|
||||
#define optind gnu_optind
|
||||
#define opterr gnu_opterr
|
||||
#define getopt gnu_getopt
|
||||
#define optarg gnu_optarg
|
||||
#define optopt gnu_optopt
|
||||
#define optind gnu_optind
|
||||
#define opterr gnu_opterr
|
||||
#define globfree gnu_globfree
|
||||
#define glob gnu_glob
|
||||
#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. */
|
||||
/* #undef C_ALLOCA */
|
||||
/* maybe this should be placed into makeint.h */
|
||||
#if defined(__VAX) && defined(__DECC)
|
||||
#define alloca(n) __ALLOCA(n)
|
||||
#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. */
|
||||
#define MAKE_HOST "VMS"
|
||||
|
||||
@@ -1,363 +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.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
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/>. */
|
||||
|
||||
/* 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
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* 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. */
|
||||
/* 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 */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* 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
|
||||
language is requested. */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
/* Use high resolution file timestamps if nonzero. */
|
||||
#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 `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 to 1 if you have 'alloca', as a function or macro. */
|
||||
#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 */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
/* Define to 1 if you have the 'atexit' function. */
|
||||
#define HAVE_ATEXIT 1
|
||||
|
||||
/* Define if your system has a working fnmatch function. */
|
||||
/* #undef HAVE_FNMATCH */
|
||||
/* Use case insensitive file names */
|
||||
/* #undef HAVE_CASE_INSENSITIVE_FS */
|
||||
|
||||
/* Define if your system has its own `getloadavg' function. */
|
||||
/* #undef HAVE_GETLOADAVG */
|
||||
/* Define to 1 if you have the clock_gettime function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Define if you have the getmntent function. */
|
||||
/* #undef HAVE_GETMNTENT */
|
||||
/* Embed GNU Guile support. Windows build sets this on the
|
||||
compilation command line. */
|
||||
/* #undef HAVE_GUILE */
|
||||
|
||||
/* Define if the `long double' type works. */
|
||||
/* #undef HAVE_LONG_DOUBLE */
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
/* #undef HAVE_DCGETTEXT */
|
||||
|
||||
/* Define if you support file names longer than 14 characters. */
|
||||
#undef HAVE_LONG_FILE_NAMES
|
||||
#define HAVE_LONG_FILE_NAMES 1
|
||||
/* 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 if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
/* 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 if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||
/* 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 if your struct stat has st_blksize. */
|
||||
/* #undef HAVE_ST_BLKSIZE */
|
||||
/* 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 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 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 to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
|
||||
*/
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
/* 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 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
#define HAVE_LIMITS_H 1
|
||||
/* Define to 1 if you have the 'fdopen' function. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_FDOPEN 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the <mach/mach.h> header file. */
|
||||
/* #undef HAVE_MACH_MACH_H */
|
||||
/* Define to 1 if you have the 'fileno' function. */
|
||||
#define HAVE_FILENO 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
#define HAVE_MEMORY_H 1
|
||||
/* Define to 1 if you have the 'getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
/* Define to 1 if you have the 'getgroups' function. */
|
||||
/* #undef HAVE_GETGROUPS */
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
#define HAVE_STRING_H 1
|
||||
/* Define to 1 if you have the 'gethostbyname' function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
/* Define to 1 if you have the 'gethostname' function. */
|
||||
/* #undef HAVE_GETHOSTNAME */
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
/* Define to 1 if you have the 'getloadavg' function. */
|
||||
/* #undef HAVE_GETLOADAVG */
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
/* Define to 1 if you have the 'getrlimit' function. */
|
||||
/* #undef HAVE_GETRLIMIT */
|
||||
|
||||
/* Define if you have the <sys/timeb.h> header file. */
|
||||
#undef HAVE_SYS_TIMEB_H
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
/* #undef HAVE_GETTEXT */
|
||||
|
||||
/* Define if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
/* Define to 1 if you have a standard gettimeofday function */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
/* Define if you have the iconv() function. */
|
||||
/* #undef HAVE_ICONV */
|
||||
|
||||
/* Define if you have the dgc library (-ldgc). */
|
||||
/* 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 if you have the kstat library (-lkstat). */
|
||||
/* Define to 1 if you have the 'kstat' library (-lkstat). */
|
||||
/* #undef HAVE_LIBKSTAT */
|
||||
|
||||
/* Define if you have the sun library (-lsun). */
|
||||
/* #undef HAVE_LIBSUN */
|
||||
/* 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. */
|
||||
#define MAKE_HOST "Windows32"
|
||||
|
||||
/* Define to 1 to enable job server support in GNU make. */
|
||||
#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
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* If you have a shell that does not grok 'sh -c quoted-command-line'
|
||||
* correctly, you need this setting. Please see below for specific
|
||||
* 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.
|
||||
* 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
|
||||
* BATCH_MODE_ONLY_SHELL if you define HAVE_MKS_SHELL
|
||||
*/
|
||||
#undef HAVE_MKS_SHELL
|
||||
/*#define HAVE_MKS_SHELL 1 */
|
||||
|
||||
/*
|
||||
* Enforce the mutual exclusivity restriction.
|
||||
@@ -369,6 +530,3 @@
|
||||
#ifdef HAVE_CYGWIN_SHELL
|
||||
#undef BATCH_MODE_ONLY_SHELL
|
||||
#endif
|
||||
|
||||
/* Define if you prefer Case Insensitive behavior */
|
||||
#undef HAVE_CASE_INSENSITIVE_FS
|
||||
|
||||
1220
config.sub
vendored
1220
config.sub
vendored
File diff suppressed because it is too large
Load Diff
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
|
||||
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/>.
|
||||
18
config/Makefile.am
Normal file
18
config/Makefile.am
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# 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/>.
|
||||
|
||||
# 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,52 +1,113 @@
|
||||
|
||||
/* Many things are defined already by a system header. */
|
||||
#include <sys/config.h>
|
||||
|
||||
/* Name of this package (needed by automake) */
|
||||
#define PACKAGE "%PACKAGE%"
|
||||
|
||||
/* Version of this package (needed by automake) */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
# define SYS_SIGLIST_DECLARED 1
|
||||
|
||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
||||
# define HAVE_SYS_SIGLIST 1
|
||||
|
||||
#else
|
||||
|
||||
/* Define NSIG. */
|
||||
# define NSIG SIGMAX
|
||||
|
||||
#endif
|
||||
|
||||
/* Define if you have sigsetmask. */
|
||||
#define HAVE_SIGSETMASK 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
#define SCCS_GET "get"
|
||||
|
||||
/* Define to `unsigned long' or `unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#define uintmax_t unsigned long long
|
||||
|
||||
/* Define the type of the first arg to select(). */
|
||||
#define fd_set_size_t int
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the vprintf library function. */
|
||||
#undef HAVE_VPRINTF
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "i386-pc-msdosdjgpp"
|
||||
/* 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. */
|
||||
#include <sys/config.h>
|
||||
|
||||
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
||||
|
||||
/* Define to 1 if 'sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
||||
# define SYS_SIGLIST_DECLARED 1
|
||||
|
||||
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||
# define HAVE_DECL_SYS_SIGLIST 1
|
||||
|
||||
#else
|
||||
|
||||
/* Define NSIG. */
|
||||
# define NSIG SIGMAX
|
||||
|
||||
#endif
|
||||
|
||||
/* Use high resolution file timestamps if nonzero. */
|
||||
#define FILE_TIMESTAMP_HI_RES 0
|
||||
|
||||
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have the fdopen function. */
|
||||
#define HAVE_FDOPEN 1
|
||||
|
||||
/* Define to 1 if you have the 'getgroups' function. */
|
||||
#define HAVE_GETGROUPS 1
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_MKSTEMP 1
|
||||
|
||||
/* Define to 1 if you have the 'mktemp' function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||
#define HAVE_SETLINEBUF 1
|
||||
|
||||
/* Define to 1 if you have the 'setvbuf' function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
#define SCCS_GET "get"
|
||||
|
||||
/* Define to 'unsigned long' or 'unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#define uintmax_t unsigned long long
|
||||
|
||||
/* Define the type of the first arg to select(). */
|
||||
#define fd_set_size_t int
|
||||
|
||||
/* Define to 1 if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define to 1 if you have the 'strncasecmp' function. */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Name of the package */
|
||||
#define PACKAGE "%PACKAGE%"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "bug-%PACKAGE%@gnu.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "GNU %PACKAGE%"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "GNU %PACKAGE% %VERSION%"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "%PACKAGE%"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "%VERSION%"
|
||||
|
||||
/* Output sync sypport */
|
||||
#define NO_OUTPUT_SYNC
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "i386-pc-msdosdjgpp"
|
||||
|
||||
/* Grok DOS paths (drive specs and backslash path element separators) */
|
||||
#define HAVE_DOS_PATHS
|
||||
|
||||
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.2],[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
|
||||
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
|
||||
|
||||
rem The SmallEnv trick protects against too small environment block,
|
||||
|
||||
282
configure.in
282
configure.in
@@ -1,282 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_REVISION([$Id$])
|
||||
AC_PREREQ(2.13)dnl dnl Minimum Autoconf version required.
|
||||
AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir.
|
||||
|
||||
AM_INIT_AUTOMAKE(make, 3.78.91)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Regular configure stuff
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_CHECK_PROG(AR, ar, ar, ar)
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CPP dnl Later checks need this.
|
||||
AC_AIX
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
|
||||
AC_CHECK_PROG(PERL, perl, perl, perl) dnl Needed for the test suite (only)
|
||||
|
||||
dnl This test must come as early as possible after the compiler configuration
|
||||
dnl tests, because the choice of the file model can (in principle) affect
|
||||
dnl whether functions and headers are available, whether they work, etc.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_DIRENT
|
||||
AC_TYPE_UID_T dnl Also does gid_t.
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_HEADERS(stdlib.h unistd.h limits.h sys/param.h fcntl.h string.h \
|
||||
memory.h sys/timeb.h)
|
||||
AC_PROG_CC_C_O
|
||||
AM_PROG_CC_STDC
|
||||
AC_C_CONST dnl getopt needs this.
|
||||
AC_C_INLINE dnl gettext needs this.
|
||||
AC_HEADER_STAT
|
||||
|
||||
AC_STRUCT_ST_MTIM_NSEC
|
||||
jm_AC_TYPE_UINTMAX_T
|
||||
|
||||
AC_SUBST(LIBOBJS)
|
||||
|
||||
AC_DEFUN(AC_CHECK_SYMBOL, [dnl
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
|
||||
AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);],
|
||||
ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
|
||||
if test "$ac_cv_check_symbol_$1" = yes; then
|
||||
changequote(,)dnl
|
||||
ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
|
||||
changequote([,])dnl
|
||||
AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
|
||||
|
||||
# clock_gettime is in -lposix4 in Solaris 2.6.
|
||||
AC_CHECK_LIB(posix4, clock_gettime)
|
||||
|
||||
AC_CHECK_FUNCS(memmove strchr memcpy strdup psignal mktemp pstat_getdynamic \
|
||||
clock_gettime dup2 getcwd sigsetmask sigaction getgroups \
|
||||
setlinebuf seteuid setegid setreuid setregid pipe \
|
||||
strerror strsignal)
|
||||
AC_CHECK_SYMBOL(sys_siglist)
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_VFORK
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_STRCOLL
|
||||
AC_FUNC_CLOSEDIR_VOID
|
||||
AC_FUNC_SETVBUF_REVERSED
|
||||
AC_FUNC_SELECT
|
||||
|
||||
AC_CHECK_LIB(kstat, kstat_open) dnl _Must_ come before AC_FUNC_GETLOADAVG.
|
||||
AC_FUNC_GETLOADAVG
|
||||
|
||||
# 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)
|
||||
fi
|
||||
AC_MSG_RESULT($make_cv_union_wait)
|
||||
|
||||
AC_DECL_SYS_SIGLIST
|
||||
|
||||
dnl Handle internationalization
|
||||
|
||||
ALL_LINGUAS="de es fr ko nl pl ru"
|
||||
fp_WITH_GETTEXT
|
||||
|
||||
# The presence of the following is not meant to imply
|
||||
# that make necessarily works on those systems.
|
||||
AC_CHECK_LIB(sun, getpwnam)
|
||||
|
||||
AC_SUBST(REMOTE) REMOTE=stub
|
||||
make_try_customs=no
|
||||
AC_ARG_WITH(customs,
|
||||
[ --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,
|
||||
REMOTE=cstms
|
||||
LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags",
|
||||
with_customs=no
|
||||
CPPFLAGS="$make_cppflags" make_badcust=yes)
|
||||
;;
|
||||
esac])
|
||||
|
||||
dnl See if we can handle the job server feature, and if the user wants it.
|
||||
|
||||
AC_ARG_ENABLE(job-server,
|
||||
[ --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
|
||||
|
||||
case "$ac_cv_func_pipe/$ac_cv_func_sigaction/$has_wait_nohang/$make_cv_job_server" in
|
||||
yes/yes/yes/yes) AC_DEFINE(MAKE_JOBSERVER) ;;
|
||||
esac
|
||||
|
||||
dnl Allow building with dmalloc
|
||||
|
||||
AC_ARG_ENABLE(dmalloc,
|
||||
[ --enable-dmalloc Enable support for the dmalloc debugging library],
|
||||
[make_cv_dmalloc="$enableval"],
|
||||
[make_cv_dmalloc="no"])
|
||||
|
||||
case "$make_cv_dmalloc" in
|
||||
yes) AC_CHECK_HEADERS(dmalloc.h)
|
||||
AC_CHECK_LIB(dmalloc, dmalloc_shutdown)
|
||||
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK" ;;
|
||||
esac
|
||||
|
||||
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"])
|
||||
|
||||
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);;
|
||||
esac
|
||||
fi
|
||||
rm -f s.conftest conftoast
|
||||
|
||||
AC_MSG_CHECKING(if system libc has GNU glob)
|
||||
AC_CACHE_VAL(make_cv_sys_gnu_glob, [
|
||||
AC_TRY_CPP([
|
||||
#include <features.h>
|
||||
#include <glob.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#define GLOB_INTERFACE_VERSION 1
|
||||
#if defined _LIBC || !defined __GNU_LIBRARY__ || __GNU_LIBRARY__ <= 1
|
||||
# error no gnu glob
|
||||
#else
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_GLOB_INTERFACE_VERSION != GLOB_INTERFACE_VERSION
|
||||
# error no gnu glob
|
||||
# endif
|
||||
#endif
|
||||
], make_cv_sys_gnu_glob=yes, make_cv_sys_gnu_glob=no)])
|
||||
case "$make_cv_sys_gnu_glob" in
|
||||
yes) AC_MSG_RESULT(yes) ;;
|
||||
no) AC_MSG_RESULT([no; using local copy])
|
||||
AC_SUBST(GLOBDIR) GLOBDIR=glob
|
||||
AC_SUBST(GLOBINC) GLOBINC='-I$(srcdir)/glob'
|
||||
AC_SUBST(GLOBLIB) GLOBLIB=glob/libglob.a
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_DEFINE_UNQUOTED(MAKE_HOST,"$host",[Build host information.])
|
||||
MAKE_HOST="$host"
|
||||
AC_SUBST(MAKE_HOST)
|
||||
|
||||
MAINT_MAKEFILE=/dev/null
|
||||
if test -r "$srcdir/maintMakefile"; then
|
||||
MAINT_MAKEFILE="$srcdir/maintMakefile"
|
||||
fi
|
||||
AC_SUBST_FILE(MAINT_MAKEFILE)
|
||||
|
||||
AC_OUTPUT(build.sh Makefile glob/Makefile i18n/Makefile)
|
||||
|
||||
dnl If we don't yet have build.sh.in, build.sh is a bogus 0-length file
|
||||
dnl so remove it.
|
||||
dnl Can't do this because then remote builds with build.sh don't work.
|
||||
dnl test -f build.sh.in || rm -f build.sh
|
||||
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-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 2, or (at your option)
|
||||
any later version.
|
||||
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 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. */
|
||||
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 DB_NONE (0x000)
|
||||
#define DB_BASIC (0x001)
|
||||
|
||||
372
default.c
372
default.c
@@ -1,72 +1,94 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
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 "make.h"
|
||||
#include "makeint.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "filedef.h"
|
||||
#include "variable.h"
|
||||
#include "rule.h"
|
||||
#include "dep.h"
|
||||
#include "filedef.h"
|
||||
#include "job.h"
|
||||
#include "commands.h"
|
||||
#include "variable.h"
|
||||
|
||||
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
||||
your system (gcc/bison/flex vs cc/yacc/lex). */
|
||||
#ifdef __MSDOS__
|
||||
#define GCC_IS_NATIVE
|
||||
#if defined(__MSDOS__) || defined(__EMX__)
|
||||
# define GCC_IS_NATIVE
|
||||
#endif
|
||||
|
||||
|
||||
/* This is the default list of suffixes for suffix rules.
|
||||
`.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. */
|
||||
'.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. */
|
||||
|
||||
static char default_suffixes[]
|
||||
#ifdef VMS
|
||||
= ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \
|
||||
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||
.w .ch .cweb .web .com .sh .elc .el";
|
||||
/* VMS should include all UNIX/POSIX + some VMS extensions */
|
||||
= ".out .exe .a .olb .hlb .tlb .mlb .ln .o .obj .c .cxx .cc .cpp .pas .p \
|
||||
.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
|
||||
= ".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 \
|
||||
.w .ch .web .sh .elc .el";
|
||||
#endif
|
||||
|
||||
static struct pspec default_pattern_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
{ "(%)", "%",
|
||||
"$(AR) $(ARFLAGS) $@ $<" },
|
||||
"@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) $@ $<" },
|
||||
|
||||
#else
|
||||
{ "(%)", "%",
|
||||
"$(AR) $(ARFLAGS) $@ $<" },
|
||||
#endif
|
||||
/* The X.out rules are only in BSD's default set because
|
||||
BSD Make has no null-suffix rules, so `foo.out' and
|
||||
`foo' are the same thing. */
|
||||
BSD Make has no null-suffix rules, so 'foo.out' and
|
||||
'foo' are the same thing. */
|
||||
#ifdef VMS
|
||||
{ "%.exe", "%",
|
||||
"copy $< $@" },
|
||||
#else
|
||||
{ "%.out", "%",
|
||||
"@rm -f $@ \n cp $< $@" },
|
||||
"$(CP) $< $@" },
|
||||
|
||||
#endif
|
||||
{ "%.out", "%",
|
||||
"@rm -f $@ \n cp $< $@" },
|
||||
|
||||
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
||||
{ "%.c", "%.w %.ch",
|
||||
"$(CTANGLE) $^ $@" },
|
||||
"$(CTANGLE) $^ $@" },
|
||||
{ "%.tex", "%.w %.ch",
|
||||
"$(CWEAVE) $^ $@" },
|
||||
"$(CWEAVE) $^ $@" },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
@@ -74,43 +96,82 @@ static struct pspec default_pattern_rules[] =
|
||||
static struct pspec default_terminal_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
|
||||
/* RCS. */
|
||||
{ "%", "%$$5lv", /* Multinet style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "%_v", /* Normal style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "[.rcs]%_v", /* Normal style */
|
||||
"if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
|
||||
/* SCCS. */
|
||||
/* ain't no SCCS on vms */
|
||||
/* ain't no SCCS on vms */
|
||||
|
||||
#else
|
||||
/* RCS. */
|
||||
{ "%", "%,v",
|
||||
"$(CHECKOUT,v)" },
|
||||
"$(CHECKOUT,v)" },
|
||||
{ "%", "RCS/%,v",
|
||||
"$(CHECKOUT,v)" },
|
||||
"$(CHECKOUT,v)" },
|
||||
{ "%", "RCS/%",
|
||||
"$(CHECKOUT,v)" },
|
||||
"$(CHECKOUT,v)" },
|
||||
|
||||
/* SCCS. */
|
||||
{ "%", "s.%",
|
||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||
{ "%", "SCCS/s.%",
|
||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||
#endif /* !VMS */
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
static char *default_suffix_rules[] =
|
||||
static const char *default_suffix_rules[] =
|
||||
{
|
||||
#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",
|
||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".mar.exe",
|
||||
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".s.o",
|
||||
"$(COMPILE.s) -o $@ $<",
|
||||
".s.exe",
|
||||
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".c.exe",
|
||||
@@ -145,6 +206,8 @@ static char *default_suffix_rules[] =
|
||||
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
||||
".c.obj",
|
||||
"$(COMPILE.c) /obj=$@ $<",
|
||||
".c.o",
|
||||
"$(COMPILE.c) /obj=$@ $<",
|
||||
".cc.ii",
|
||||
"$(COMPILE.cc)/prep /list=$@ $<",
|
||||
".cc.ss",
|
||||
@@ -153,10 +216,20 @@ static char *default_suffix_rules[] =
|
||||
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
||||
".cc.obj",
|
||||
"$(COMPILE.cc) /obj=$@ $<",
|
||||
".cc.o",
|
||||
"$(COMPILE.cc) /obj=$@ $<",
|
||||
".cxx.obj",
|
||||
"$(COMPILE.cxx) /obj=$@ $<",
|
||||
".cxx.o",
|
||||
"$(COMPILE.cxx) /obj=$@ $<",
|
||||
".for.obj",
|
||||
"$(COMPILE.for) /obj=$@ $<",
|
||||
".for.o",
|
||||
"$(COMPILE.for) /obj=$@ $<",
|
||||
".pas.obj",
|
||||
"$(COMPILE.pas) /obj=$@ $<",
|
||||
".pas.o",
|
||||
"$(COMPILE.pas) /obj=$@ $<",
|
||||
|
||||
".y.c",
|
||||
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||
@@ -169,6 +242,27 @@ static char *default_suffix_rules[] =
|
||||
".tex.dvi",
|
||||
"$(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 */
|
||||
|
||||
".o",
|
||||
@@ -187,6 +281,8 @@ static char *default_suffix_rules[] =
|
||||
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".f",
|
||||
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".m",
|
||||
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".p",
|
||||
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".F",
|
||||
@@ -216,6 +312,8 @@ static char *default_suffix_rules[] =
|
||||
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||
".f.o",
|
||||
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||
".m.o",
|
||||
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||
".p.o",
|
||||
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||
".F.o",
|
||||
@@ -244,15 +342,18 @@ static char *default_suffix_rules[] =
|
||||
#endif
|
||||
".l.c",
|
||||
"@$(RM) $@ \n $(LEX.l) $< > $@",
|
||||
".ym.m",
|
||||
"$(YACC.m) $< \n mv -f y.tab.c $@",
|
||||
".lm.m",
|
||||
"@$(RM) $@ \n $(LEX.m) $< > $@",
|
||||
|
||||
".F.f",
|
||||
"$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
|
||||
".r.f",
|
||||
"$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
|
||||
|
||||
/* This might actually make lex.yy.c if there's no %R%
|
||||
directive in $*.l, but in that case why were you
|
||||
trying to make $*.r anyway? */
|
||||
/* This might actually make lex.yy.c if there's no %R% directive in $*.l,
|
||||
but in that case why were you trying to make $*.r anyway? */
|
||||
".l.r",
|
||||
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
|
||||
|
||||
@@ -281,13 +382,13 @@ static char *default_suffix_rules[] =
|
||||
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
||||
|
||||
".w.c",
|
||||
"$(CTANGLE) $< - $@", /* The `-' says there is no `.ch' file. */
|
||||
"$(CTANGLE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||
|
||||
".web.p",
|
||||
"$(TANGLE) $<",
|
||||
|
||||
".w.tex",
|
||||
"$(CWEAVE) $< - $@", /* The `-' says there is no `.ch' file. */
|
||||
"$(CWEAVE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||
|
||||
".web.tex",
|
||||
"$(WEAVE) $<",
|
||||
@@ -297,15 +398,20 @@ static char *default_suffix_rules[] =
|
||||
0, 0,
|
||||
};
|
||||
|
||||
static char *default_variables[] =
|
||||
static const char *default_variables[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
#ifdef __ALPHA
|
||||
"ARCH", "ALPHA",
|
||||
#else
|
||||
#endif
|
||||
#ifdef __ia64
|
||||
"ARCH", "IA64",
|
||||
#endif
|
||||
#ifdef __VAX
|
||||
"ARCH", "VAX",
|
||||
#endif
|
||||
"AR", "library/obj",
|
||||
"AR", "library",
|
||||
"LIBRARY", "library",
|
||||
"ARFLAGS", "/replace",
|
||||
"AS", "macro",
|
||||
"MACRO", "macro",
|
||||
@@ -315,15 +421,21 @@ static char *default_variables[] =
|
||||
"CC", "cc",
|
||||
#endif
|
||||
"CD", "builtin_cd",
|
||||
"MAKE", "make",
|
||||
"ECHO", "write sys$$output \"",
|
||||
"ECHO", "builtin_echo",
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"C++", "gcc/plus",
|
||||
"CXX", "gcc/plus",
|
||||
#else
|
||||
"C++", "cxx",
|
||||
"CXX", "cxx",
|
||||
#ifndef __ia64
|
||||
"CXXLD", "cxxlink",
|
||||
"CXXLINK", "cxxlink",
|
||||
#else
|
||||
/* CXXLINK is not used on VMS/IA64 */
|
||||
"CXXLD", "link",
|
||||
"CXXLINK", "link",
|
||||
#endif
|
||||
#endif
|
||||
"CO", "co",
|
||||
"CPP", "$(CC) /preprocess_only",
|
||||
@@ -359,23 +471,49 @@ static char *default_variables[] =
|
||||
"LDLIBS", "",
|
||||
#endif
|
||||
|
||||
"LINK.o", "$(LD) $(LDFLAGS)",
|
||||
"LINK.obj", "$(LD) $(LDFLAGS)",
|
||||
#ifndef GCC_IS_NATIVE
|
||||
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
||||
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
#endif
|
||||
"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.C", "$(COMPILE.cc)",
|
||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||
"LINK.C", "$(LINK.cc)",
|
||||
"LINK.cpp", "$(LINK.cc)",
|
||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||
"LEX.l", "$(LEX) $(LFLAGS)",
|
||||
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||
"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.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.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)",
|
||||
|
||||
"MV", "rename/new_version",
|
||||
"CP", "copy",
|
||||
".LIBPATTERNS", "%.olb lib%.a",
|
||||
|
||||
#else /* !VMS */
|
||||
|
||||
@@ -385,33 +523,35 @@ static char *default_variables[] =
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"CC", "gcc",
|
||||
# ifdef __MSDOS__
|
||||
"CXX", "gpp", /* g++ is an invalid name on MSDOS */
|
||||
"CXX", "gpp", /* g++ is an invalid name on MSDOS */
|
||||
# else
|
||||
"CXX", "gcc",
|
||||
# endif /* __MSDOS__ */
|
||||
"OBJC", "gcc",
|
||||
#else
|
||||
"CC", "cc",
|
||||
"CXX", "g++",
|
||||
"OBJC", "cc",
|
||||
#endif
|
||||
|
||||
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
||||
and to the empty string if $@ does exist. */
|
||||
"CHECKOUT,v",
|
||||
"+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
|
||||
|
||||
"CHECKOUT,v", "+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
|
||||
"CO", "co",
|
||||
"COFLAGS", "",
|
||||
|
||||
"CPP", "$(CC) -E",
|
||||
#ifdef CRAY
|
||||
#ifdef CRAY
|
||||
"CF77PPFLAGS", "-P",
|
||||
"CF77PP", "/lib/cpp",
|
||||
"CFT", "cft77",
|
||||
"CF", "cf77",
|
||||
"FC", "$(CF)",
|
||||
#else /* Not CRAY. */
|
||||
#ifdef _IBMR2
|
||||
#else /* Not CRAY. */
|
||||
#ifdef _IBMR2
|
||||
"FC", "xlf",
|
||||
#else
|
||||
#ifdef __convex__
|
||||
#ifdef __convex__
|
||||
"FC", "fc",
|
||||
#else
|
||||
"FC", "f77",
|
||||
@@ -421,7 +561,7 @@ static char *default_variables[] =
|
||||
However, there is no way to make implicit rules use them and FC. */
|
||||
"F77", "$(FC)",
|
||||
"F77FLAGS", "$(FFLAGS)",
|
||||
#endif /* Cray. */
|
||||
#endif /* Cray. */
|
||||
"GET", SCCS_GET,
|
||||
"LD", "ld",
|
||||
#ifdef GCC_IS_NATIVE
|
||||
@@ -431,20 +571,20 @@ static char *default_variables[] =
|
||||
#endif
|
||||
"LINT", "lint",
|
||||
"M2C", "m2c",
|
||||
#ifdef pyr
|
||||
#ifdef pyr
|
||||
"PC", "pascal",
|
||||
#else
|
||||
#ifdef CRAY
|
||||
#ifdef CRAY
|
||||
"PC", "PASCAL",
|
||||
"SEGLDR", "segldr",
|
||||
#else
|
||||
"PC", "pc",
|
||||
#endif /* CRAY. */
|
||||
#endif /* pyr. */
|
||||
#endif /* CRAY. */
|
||||
#endif /* pyr. */
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"YACC", "bison -y",
|
||||
#else
|
||||
"YACC", "yacc", /* Or "bison -y" */
|
||||
"YACC", "yacc", /* Or "bison -y" */
|
||||
#endif
|
||||
"MAKEINFO", "makeinfo",
|
||||
"TEX", "tex",
|
||||
@@ -459,14 +599,29 @@ static char *default_variables[] =
|
||||
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"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",
|
||||
#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)",
|
||||
#else
|
||||
"COMPILE.C", "$(COMPILE.c)",
|
||||
#endif
|
||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||
"LINK.C", "$(LINK.cc)",
|
||||
#else
|
||||
"LINK.C", "$(LINK.c)",
|
||||
#endif
|
||||
"LINK.cpp", "$(LINK.cc)",
|
||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
||||
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
@@ -486,71 +641,79 @@ static char *default_variables[] =
|
||||
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
|
||||
#ifndef NO_MINUS_C_MINUS_O
|
||||
#ifndef NO_MINUS_C_MINUS_O
|
||||
"OUTPUT_OPTION", "-o $@",
|
||||
#endif
|
||||
|
||||
#ifdef SCCS_GET_MINUS_G
|
||||
#ifdef SCCS_GET_MINUS_G
|
||||
"SCCS_OUTPUT_OPTION", "-G$@",
|
||||
#endif
|
||||
|
||||
#ifdef _AMIGA
|
||||
#if defined(_AMIGA)
|
||||
".LIBPATTERNS", "%.lib",
|
||||
#else
|
||||
#ifdef __MSDOS__
|
||||
#elif defined(__MSDOS__)
|
||||
".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
|
||||
".LIBPATTERNS", "lib%.so lib%.a",
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !VMS */
|
||||
/* Make this assignment to avoid undefined variable warnings. */
|
||||
"GNUMAKEFLAGS", "",
|
||||
0, 0
|
||||
};
|
||||
|
||||
/* Set up the default .SUFFIXES list. */
|
||||
|
||||
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)
|
||||
(void) define_variable ("SUFFIXES", 8, "", o_default, 0);
|
||||
define_variable_cname ("SUFFIXES", "", o_default, 0);
|
||||
else
|
||||
{
|
||||
char *p = default_suffixes;
|
||||
suffix_file->deps = (struct dep *)
|
||||
multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1),
|
||||
sizeof (struct dep));
|
||||
(void) define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0);
|
||||
struct dep *d;
|
||||
const char *p = default_suffixes;
|
||||
suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ ((char **)&p, struct dep),
|
||||
NULL);
|
||||
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
|
||||
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. */
|
||||
|
||||
void
|
||||
install_default_suffix_rules ()
|
||||
install_default_suffix_rules (void)
|
||||
{
|
||||
register char **s;
|
||||
const char **s;
|
||||
|
||||
if (no_builtin_rules_flag)
|
||||
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]);
|
||||
/* Don't clobber cmds given in a makefile if there were any. */
|
||||
if (f->cmds == 0)
|
||||
{
|
||||
f->cmds = (struct commands *) xmalloc (sizeof (struct commands));
|
||||
f->cmds->fileinfo.filenm = 0;
|
||||
f->cmds->commands = s[1];
|
||||
f->cmds->command_lines = 0;
|
||||
}
|
||||
struct file *f = enter_file (strcache_add (s[0]));
|
||||
/* This function should run before any makefile is parsed. */
|
||||
assert (f->cmds == 0);
|
||||
f->cmds = xmalloc (sizeof (struct commands));
|
||||
f->cmds->fileinfo.filenm = 0;
|
||||
f->cmds->commands = xstrdup (s[1]);
|
||||
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. */
|
||||
|
||||
void
|
||||
install_default_implicit_rules ()
|
||||
install_default_implicit_rules (void)
|
||||
{
|
||||
register struct pspec *p;
|
||||
struct pspec *p;
|
||||
|
||||
if (no_builtin_rules_flag)
|
||||
return;
|
||||
@@ -573,13 +736,22 @@ install_default_implicit_rules ()
|
||||
}
|
||||
|
||||
void
|
||||
define_default_variables ()
|
||||
define_default_variables (void)
|
||||
{
|
||||
register char **s;
|
||||
const char **s;
|
||||
|
||||
if (no_builtin_variables_flag)
|
||||
return;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
159
dep.h
159
dep.h
@@ -1,76 +1,131 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
|
||||
/* Flag bits for the second argument to `read_makefile'.
|
||||
These flags are saved in the `changed' field of each
|
||||
`struct dep' in the chain returned by `read_all_makefiles'. */
|
||||
|
||||
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
||||
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
||||
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
||||
#define RM_NOFLAG 0
|
||||
|
||||
/* Structure representing one dependency of a file.
|
||||
Each struct file's `deps' points to a chain of these,
|
||||
chained through the `next'.
|
||||
|
||||
Note that the first two words of this match a struct nameseq. */
|
||||
|
||||
struct dep
|
||||
{
|
||||
struct dep *next;
|
||||
char *name;
|
||||
struct file *file;
|
||||
int changed;
|
||||
};
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Structure used in chains of names, for parsing and globbing. */
|
||||
|
||||
#define NAMESEQ(_t) \
|
||||
_t *next; \
|
||||
const char *name
|
||||
|
||||
struct nameseq
|
||||
{
|
||||
struct nameseq *next;
|
||||
char *name;
|
||||
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_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
||||
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
||||
#define RM_NOFLAG 0
|
||||
|
||||
/* Structure representing one dependency of a file.
|
||||
Each struct file's 'deps' points to a chain of these, through 'next'.
|
||||
'stem' is the stem for this dep line of static pattern rule or NULL. */
|
||||
|
||||
#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
|
||||
{
|
||||
DEP (struct dep);
|
||||
};
|
||||
|
||||
/* 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. */
|
||||
|
||||
struct goaldep
|
||||
{
|
||||
DEP (struct goaldep);
|
||||
unsigned short error;
|
||||
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
|
||||
extern struct nameseq *parse_file_seq ();
|
||||
void *parse_file_seq ();
|
||||
#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
|
||||
extern char *tilde_expand PARAMS ((char *name));
|
||||
|
||||
char *tilde_expand (const char *name);
|
||||
|
||||
#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
|
||||
|
||||
#ifndef iAPX286
|
||||
#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
|
||||
#define dep_name(d) ((d)->name ? (d)->name : (d)->file->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
|
||||
/* Buggy compiler can't hack this. */
|
||||
extern char *dep_name ();
|
||||
# define alloc_ns() alloc_seq_elt (struct nameseq)
|
||||
# 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
|
||||
|
||||
extern struct dep *copy_dep_chain PARAMS ((struct dep *d));
|
||||
extern struct dep *read_all_makefiles PARAMS ((char **makefiles));
|
||||
extern int update_goal_chain PARAMS ((struct dep *goals, int makefiles));
|
||||
extern void uniquize_deps PARAMS ((struct dep *));
|
||||
struct dep *copy_dep_chain (const struct dep *d);
|
||||
|
||||
struct goaldep *read_all_makefiles (const char **makefiles);
|
||||
void eval_buffer (char *buffer, const floc *floc);
|
||||
enum update_status update_goal_chain (struct goaldep *goals);
|
||||
|
||||
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
|
||||
24
doc/Makefile.am
Normal file
24
doc/Makefile.am
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 2000-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/>.
|
||||
|
||||
TEXI2HTML = texi2html
|
||||
TEXI2HTML_FLAGS = -split_chapter
|
||||
|
||||
info_TEXINFOS = make.texi
|
||||
make_TEXINFOS = fdl.texi make-stds.texi
|
||||
|
||||
CLEANFILES = make*.html
|
||||
File diff suppressed because it is too large
Load Diff
107
dosbuild.bat
107
dosbuild.bat
@@ -1,42 +1,65 @@
|
||||
@echo Building Make for MSDOS
|
||||
|
||||
@rem Echo ON so they will see what is going 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 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 file.c -o file.o
|
||||
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g misc.c -o misc.o
|
||||
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g main.c -o main.o
|
||||
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g read.c -o read.o
|
||||
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g remake.c -o remake.o
|
||||
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g rule.c -o rule.o
|
||||
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g implicit.c -o implicit.o
|
||||
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g default.c -o default.o
|
||||
|
||||
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 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 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 arscan.c -o arscan.o
|
||||
|
||||
@echo off
|
||||
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
|
||||
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 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 misc.c -o misc.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g main.c -o main.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g read.c -o read.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g remake.c -o remake.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g rule.c -o rule.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g implicit.c -o implicit.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g default.c -o default.o
|
||||
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 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 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 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 signame.c -o signame.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g remote-stub.c -o remote-stub.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt.c -o getopt.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt1.c -o getopt1.o
|
||||
@cd glob
|
||||
@if exist libglob.a del libglob.a
|
||||
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g glob.c -o glob.o
|
||||
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g fnmatch.c -o fnmatch.o
|
||||
ar rv libglob.a glob.o fnmatch.o
|
||||
@echo off
|
||||
cd ..
|
||||
echo commands.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 hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> 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 on
|
||||
gcc -o make.new @respf.$$$
|
||||
@if exist make.exe echo Make.exe is now built!
|
||||
@if not exist make.exe echo Make.exe build failed...
|
||||
@if exist make.exe del respf.$$$
|
||||
|
||||
664
expand.c
664
expand.c
@@ -1,31 +1,33 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
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 <assert.h>
|
||||
|
||||
#include "make.h"
|
||||
#include "filedef.h"
|
||||
#include "job.h"
|
||||
#include "commands.h"
|
||||
#include "variable.h"
|
||||
#include "rule.h"
|
||||
|
||||
/* Initially, any errors reported when expanding strings will be reported
|
||||
against the file where the error appears. */
|
||||
const floc **expanding_var = &reading_file;
|
||||
|
||||
/* The next two describe the variable output buffer.
|
||||
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.
|
||||
@@ -51,9 +53,7 @@ char *variable_buffer;
|
||||
the following call. */
|
||||
|
||||
char *
|
||||
variable_buffer_output (ptr, string, length)
|
||||
char *ptr, *string;
|
||||
unsigned int length;
|
||||
variable_buffer_output (char *ptr, const char *string, unsigned int length)
|
||||
{
|
||||
register unsigned int newlen = length + (ptr - variable_buffer);
|
||||
|
||||
@@ -61,28 +61,27 @@ variable_buffer_output (ptr, string, length)
|
||||
{
|
||||
unsigned int offset = ptr - variable_buffer;
|
||||
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
||||
? newlen + 100
|
||||
: 2 * variable_buffer_length);
|
||||
variable_buffer = (char *) xrealloc (variable_buffer,
|
||||
variable_buffer_length);
|
||||
? newlen + 100
|
||||
: 2 * variable_buffer_length);
|
||||
variable_buffer = xrealloc (variable_buffer, variable_buffer_length);
|
||||
ptr = variable_buffer + offset;
|
||||
}
|
||||
|
||||
bcopy (string, ptr, length);
|
||||
memcpy (ptr, string, length);
|
||||
return ptr + length;
|
||||
}
|
||||
|
||||
/* Return a pointer to the beginning of the variable buffer. */
|
||||
|
||||
static char *
|
||||
initialize_variable_output ()
|
||||
initialize_variable_output (void)
|
||||
{
|
||||
/* If we don't have a variable output buffer yet, get one. */
|
||||
|
||||
if (variable_buffer == 0)
|
||||
{
|
||||
variable_buffer_length = 200;
|
||||
variable_buffer = (char *) xmalloc (variable_buffer_length);
|
||||
variable_buffer = xmalloc (variable_buffer_length);
|
||||
variable_buffer[0] = '\0';
|
||||
}
|
||||
|
||||
@@ -91,71 +90,88 @@ initialize_variable_output ()
|
||||
|
||||
/* Recursively expand V. The returned string is malloc'd. */
|
||||
|
||||
static char *allocated_variable_append PARAMS ((struct variable *v,
|
||||
struct variable_set_list *l));
|
||||
static char *allocated_variable_append (const struct variable *v);
|
||||
|
||||
char *
|
||||
recursively_expand_setlist (v, list)
|
||||
register struct variable *v;
|
||||
struct variable_set_list *list;
|
||||
recursively_expand_for_file (struct variable *v, struct file *file)
|
||||
{
|
||||
char *value;
|
||||
const floc *this_var;
|
||||
const floc **saved_varp;
|
||||
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)
|
||||
/* Expanding V causes infinite recursion. Lose. */
|
||||
fatal (reading_file,
|
||||
_("Recursive variable `%s' references itself (eventually)"),
|
||||
v->name);
|
||||
{
|
||||
if (!v->exp_count)
|
||||
/* Expanding V causes infinite recursion. Lose. */
|
||||
OS (fatal, *expanding_var,
|
||||
_("Recursive variable '%s' references itself (eventually)"),
|
||||
v->name);
|
||||
--v->exp_count;
|
||||
}
|
||||
|
||||
if (file)
|
||||
{
|
||||
save = current_variable_set_list;
|
||||
current_variable_set_list = file->variables;
|
||||
}
|
||||
|
||||
v->expanding = 1;
|
||||
if (v->append)
|
||||
value = allocated_variable_append (v, list);
|
||||
value = allocated_variable_append (v);
|
||||
else
|
||||
value = allocated_variable_expand (v->value);
|
||||
v->expanding = 0;
|
||||
|
||||
if (set_reading)
|
||||
reading_file = 0;
|
||||
|
||||
if (file)
|
||||
current_variable_set_list = save;
|
||||
|
||||
expanding_var = saved_varp;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/* Warn that NAME is an undefined variable. */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
static void
|
||||
warn_undefined (name, length)
|
||||
char *name;
|
||||
unsigned int length;
|
||||
{
|
||||
if (warn_undefined_variables_flag)
|
||||
error (reading_file,
|
||||
_("warning: undefined variable `%.*s'"), (int)length, name);
|
||||
}
|
||||
|
||||
/* Expand a simple reference to variable NAME, which is LENGTH chars long. */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
static char *
|
||||
reference_variable (o, name, length)
|
||||
char *o;
|
||||
char *name;
|
||||
unsigned int length;
|
||||
reference_variable (char *o, const char *name, unsigned int length)
|
||||
{
|
||||
register struct variable *v;
|
||||
struct variable_set_list *setlist;
|
||||
struct variable *v;
|
||||
char *value;
|
||||
|
||||
v = lookup_variable_setlist (name, length, &setlist);
|
||||
v = lookup_variable (name, length);
|
||||
|
||||
if (v == 0)
|
||||
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;
|
||||
|
||||
value = (v->recursive ? recursively_expand_setlist (v, setlist) : v->value);
|
||||
value = (v->recursive ? recursively_expand (v) : v->value);
|
||||
|
||||
o = variable_buffer_output (o, value, strlen (value));
|
||||
|
||||
@@ -169,364 +185,374 @@ reference_variable (o, name, length)
|
||||
LENGTH bytes of STRING are actually scanned. If LENGTH is -1, scan until
|
||||
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.
|
||||
Return a pointer to LINE, or to the beginning of the buffer if LINE is
|
||||
NULL. */
|
||||
|
||||
NULL.
|
||||
*/
|
||||
char *
|
||||
variable_expand_string (line, string, length)
|
||||
register char *line;
|
||||
char *string;
|
||||
long length;
|
||||
variable_expand_string (char *line, const char *string, long length)
|
||||
{
|
||||
register struct variable *v;
|
||||
register char *p, *o, *p1;
|
||||
char save_char = '\0';
|
||||
struct variable *v;
|
||||
const char *p, *p1;
|
||||
char *save;
|
||||
char *o;
|
||||
unsigned int line_offset;
|
||||
|
||||
if (!line)
|
||||
line = initialize_variable_output();
|
||||
|
||||
p = string;
|
||||
line = initialize_variable_output ();
|
||||
o = line;
|
||||
line_offset = line - variable_buffer;
|
||||
|
||||
if (length >= 0)
|
||||
if (length == 0)
|
||||
{
|
||||
save_char = string[length];
|
||||
string[length] = '\0';
|
||||
variable_buffer_output (o, "", 1);
|
||||
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)
|
||||
{
|
||||
/* Copy all following uninteresting chars all at once to the
|
||||
variable output buffer, and skip them. Uninteresting chars end
|
||||
at the next $ or the end of the input. */
|
||||
at the next $ or the end of the input. */
|
||||
|
||||
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)
|
||||
break;
|
||||
break;
|
||||
p = p1 + 1;
|
||||
|
||||
/* Dispatch on the char that follows the $. */
|
||||
|
||||
switch (*p)
|
||||
{
|
||||
case '$':
|
||||
/* $$ seen means output one $ to the variable output buffer. */
|
||||
o = variable_buffer_output (o, p, 1);
|
||||
break;
|
||||
{
|
||||
case '$':
|
||||
case '\0':
|
||||
/* $$ or $ at the end of the string means output one $ to the
|
||||
variable output buffer. */
|
||||
o = variable_buffer_output (o, p1, 1);
|
||||
break;
|
||||
|
||||
case '(':
|
||||
case '{':
|
||||
/* $(...) or ${...} is the general case of substitution. */
|
||||
{
|
||||
char openparen = *p;
|
||||
char closeparen = (openparen == '(') ? ')' : '}';
|
||||
register char *beg = p + 1;
|
||||
int free_beg = 0;
|
||||
char *op, *begp;
|
||||
char *end, *colon;
|
||||
case '(':
|
||||
case '{':
|
||||
/* $(...) or ${...} is the general case of substitution. */
|
||||
{
|
||||
char openparen = *p;
|
||||
char closeparen = (openparen == '(') ? ')' : '}';
|
||||
const char *begp;
|
||||
const char *beg = p + 1;
|
||||
char *op;
|
||||
char *abeg = NULL;
|
||||
const char *end, *colon;
|
||||
|
||||
op = o;
|
||||
begp = p;
|
||||
if (handle_function (&op, &begp))
|
||||
{
|
||||
o = op;
|
||||
p = begp;
|
||||
break;
|
||||
}
|
||||
op = o;
|
||||
begp = p;
|
||||
if (handle_function (&op, &begp))
|
||||
{
|
||||
o = op;
|
||||
p = begp;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Is there a variable reference inside the parens or braces?
|
||||
If so, expand it before expanding the entire reference. */
|
||||
/* Is there a variable reference inside the parens or braces?
|
||||
If so, expand it before expanding the entire reference. */
|
||||
|
||||
end = strchr (beg, closeparen);
|
||||
if (end == 0)
|
||||
end = strchr (beg, closeparen);
|
||||
if (end == 0)
|
||||
/* Unterminated variable reference. */
|
||||
fatal (reading_file, _("unterminated variable reference"));
|
||||
p1 = lindex (beg, end, '$');
|
||||
if (p1 != 0)
|
||||
{
|
||||
/* BEG now points past the opening paren or brace.
|
||||
Count parens or braces until it is matched. */
|
||||
int count = 0;
|
||||
for (p = beg; *p != '\0'; ++p)
|
||||
{
|
||||
if (*p == openparen)
|
||||
++count;
|
||||
else if (*p == closeparen && --count < 0)
|
||||
break;
|
||||
}
|
||||
/* If COUNT is >= 0, there were unmatched opening parens
|
||||
or braces, so we go to the simple case of a variable name
|
||||
such as `$($(a)'. */
|
||||
if (count < 0)
|
||||
{
|
||||
beg = expand_argument (beg, p); /* Expand the name. */
|
||||
free_beg = 1; /* Remember to free BEG when finished. */
|
||||
end = strchr (beg, '\0');
|
||||
}
|
||||
}
|
||||
else
|
||||
/* Advance P to the end of this reference. After we are
|
||||
O (fatal, *expanding_var, _("unterminated variable reference"));
|
||||
p1 = lindex (beg, end, '$');
|
||||
if (p1 != 0)
|
||||
{
|
||||
/* BEG now points past the opening paren or brace.
|
||||
Count parens or braces until it is matched. */
|
||||
int count = 0;
|
||||
for (p = beg; *p != '\0'; ++p)
|
||||
{
|
||||
if (*p == openparen)
|
||||
++count;
|
||||
else if (*p == closeparen && --count < 0)
|
||||
break;
|
||||
}
|
||||
/* If COUNT is >= 0, there were unmatched opening parens
|
||||
or braces, so we go to the simple case of a variable name
|
||||
such as '$($(a)'. */
|
||||
if (count < 0)
|
||||
{
|
||||
abeg = expand_argument (beg, p); /* Expand the name. */
|
||||
beg = abeg;
|
||||
end = strchr (beg, '\0');
|
||||
}
|
||||
}
|
||||
else
|
||||
/* Advance P to the end of this reference. After we are
|
||||
finished expanding this one, P will be incremented to
|
||||
continue the scan. */
|
||||
p = end;
|
||||
p = end;
|
||||
|
||||
/* This is not a reference to a built-in function and
|
||||
any variable references inside are now expanded.
|
||||
Is the resultant text a substitution reference? */
|
||||
/* This is not a reference to a built-in function and
|
||||
any variable references inside are now expanded.
|
||||
Is the resultant text a substitution reference? */
|
||||
|
||||
colon = lindex (beg, end, ':');
|
||||
if (colon != 0)
|
||||
{
|
||||
/* This looks like a substitution reference: $(FOO:A=B). */
|
||||
char *subst_beg, *subst_end, *replace_beg, *replace_end;
|
||||
colon = lindex (beg, end, ':');
|
||||
if (colon)
|
||||
{
|
||||
/* This looks like a substitution reference: $(FOO:A=B). */
|
||||
const char *subst_beg = colon + 1;
|
||||
const char *subst_end = lindex (subst_beg, end, '=');
|
||||
if (subst_end == 0)
|
||||
/* There is no = in sight. Punt on the substitution
|
||||
reference and treat this as a variable name containing
|
||||
a colon, in the code below. */
|
||||
colon = 0;
|
||||
else
|
||||
{
|
||||
const char *replace_beg = subst_end + 1;
|
||||
const char *replace_end = end;
|
||||
|
||||
subst_beg = colon + 1;
|
||||
subst_end = strchr (subst_beg, '=');
|
||||
if (subst_end == 0)
|
||||
/* There is no = in sight. Punt on the substitution
|
||||
reference and treat this as a variable name containing
|
||||
a colon, in the code below. */
|
||||
colon = 0;
|
||||
else
|
||||
{
|
||||
replace_beg = subst_end + 1;
|
||||
replace_end = end;
|
||||
/* Extract the variable name before the colon
|
||||
and look up that variable. */
|
||||
v = lookup_variable (beg, colon - beg);
|
||||
if (v == 0)
|
||||
warn_undefined (beg, colon - beg);
|
||||
|
||||
/* Extract the variable name before the colon
|
||||
and look up that variable. */
|
||||
v = lookup_variable (beg, colon - beg);
|
||||
if (v == 0)
|
||||
warn_undefined (beg, colon - beg);
|
||||
/* If the variable is not empty, perform the
|
||||
substitution. */
|
||||
if (v != 0 && *v->value != '\0')
|
||||
{
|
||||
char *pattern, *replace, *ppercent, *rpercent;
|
||||
char *value = (v->recursive
|
||||
? recursively_expand (v)
|
||||
: v->value);
|
||||
|
||||
if (v != 0 && *v->value != '\0')
|
||||
{
|
||||
char *value = (v->recursive ? recursively_expand (v)
|
||||
: v->value);
|
||||
char *pattern, *percent;
|
||||
if (free_beg)
|
||||
{
|
||||
*subst_end = '\0';
|
||||
pattern = subst_beg;
|
||||
}
|
||||
else
|
||||
{
|
||||
pattern = (char *) alloca (subst_end - subst_beg
|
||||
+ 1);
|
||||
bcopy (subst_beg, pattern, subst_end - subst_beg);
|
||||
pattern[subst_end - subst_beg] = '\0';
|
||||
}
|
||||
percent = find_percent (pattern);
|
||||
if (percent != 0)
|
||||
{
|
||||
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[replace_end - replace_beg] = '\0';
|
||||
}
|
||||
/* Copy the pattern and the replacement. Add in an
|
||||
extra % at the beginning to use in case there
|
||||
isn't one in the pattern. */
|
||||
pattern = alloca (subst_end - subst_beg + 2);
|
||||
*(pattern++) = '%';
|
||||
memcpy (pattern, subst_beg, subst_end - subst_beg);
|
||||
pattern[subst_end - subst_beg] = '\0';
|
||||
|
||||
o = patsubst_expand (o, value, pattern, replace,
|
||||
percent, (char *) 0);
|
||||
}
|
||||
else
|
||||
o = subst_expand (o, value,
|
||||
pattern, replace_beg,
|
||||
strlen (pattern),
|
||||
end - replace_beg,
|
||||
0, 1);
|
||||
if (v->recursive)
|
||||
free (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
replace = alloca (replace_end - replace_beg + 2);
|
||||
*(replace++) = '%';
|
||||
memcpy (replace, replace_beg,
|
||||
replace_end - replace_beg);
|
||||
replace[replace_end - replace_beg] = '\0';
|
||||
|
||||
if (colon == 0)
|
||||
/* This is an ordinary variable reference.
|
||||
Look up the value of the variable. */
|
||||
o = reference_variable (o, beg, end - beg);
|
||||
/* Look for %. Set the percent pointers properly
|
||||
based on whether we find one or not. */
|
||||
ppercent = find_percent (pattern);
|
||||
if (ppercent)
|
||||
{
|
||||
++ppercent;
|
||||
rpercent = find_percent (replace);
|
||||
if (rpercent)
|
||||
++rpercent;
|
||||
}
|
||||
else
|
||||
{
|
||||
ppercent = pattern;
|
||||
rpercent = replace;
|
||||
--pattern;
|
||||
--replace;
|
||||
}
|
||||
|
||||
if (free_beg)
|
||||
free (beg);
|
||||
}
|
||||
break;
|
||||
o = patsubst_expand_pat (o, value, pattern, replace,
|
||||
ppercent, rpercent);
|
||||
|
||||
case '\0':
|
||||
break;
|
||||
if (v->recursive)
|
||||
free (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
if (isblank (p[-1]))
|
||||
break;
|
||||
if (colon == 0)
|
||||
/* This is an ordinary variable reference.
|
||||
Look up the value of the variable. */
|
||||
o = reference_variable (o, beg, end - beg);
|
||||
|
||||
/* A $ followed by a random char is a variable reference:
|
||||
$a is equivalent to $(a). */
|
||||
{
|
||||
/* 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);
|
||||
}
|
||||
free (abeg);
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (ISSPACE (p[-1]))
|
||||
break;
|
||||
|
||||
/* A $ followed by a random char is a variable reference:
|
||||
$a is equivalent to $(a). */
|
||||
o = reference_variable (o, p, 1);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (*p == '\0')
|
||||
break;
|
||||
else
|
||||
++p;
|
||||
break;
|
||||
|
||||
++p;
|
||||
}
|
||||
|
||||
if (save_char)
|
||||
string[length] = save_char;
|
||||
free (save);
|
||||
|
||||
(void)variable_buffer_output (o, "", 1);
|
||||
variable_buffer_output (o, "", 1);
|
||||
return (variable_buffer + line_offset);
|
||||
}
|
||||
|
||||
/* 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
|
||||
and is valid only until the next time this function is called. */
|
||||
|
||||
char *
|
||||
variable_expand (line)
|
||||
char *line;
|
||||
variable_expand (const 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.
|
||||
The text starting at STR and ending at END is variable-expanded
|
||||
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. */
|
||||
|
||||
char *
|
||||
expand_argument (str, end)
|
||||
char *str, *end;
|
||||
expand_argument (const char *str, const char *end)
|
||||
{
|
||||
char *tmp;
|
||||
char *tmp, *alloc = NULL;
|
||||
char *r;
|
||||
|
||||
if (str == end)
|
||||
return xstrdup ("");
|
||||
|
||||
if (!end || *end == '\0')
|
||||
tmp = str;
|
||||
else
|
||||
{
|
||||
tmp = (char *) alloca (end - str + 1);
|
||||
bcopy (str, tmp, end - str);
|
||||
tmp[end - str] = '\0';
|
||||
}
|
||||
return allocated_variable_expand (str);
|
||||
|
||||
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
|
||||
FILE's commands were found. Expansion uses FILE's variable set list. */
|
||||
|
||||
static char *
|
||||
variable_expand_for_file (line, file)
|
||||
char *line;
|
||||
register struct file *file;
|
||||
char *
|
||||
variable_expand_for_file (const char *line, struct file *file)
|
||||
{
|
||||
char *result;
|
||||
struct variable_set_list *save;
|
||||
struct variable_set_list *savev;
|
||||
const floc *savef;
|
||||
|
||||
if (file == 0)
|
||||
return variable_expand (line);
|
||||
|
||||
save = current_variable_set_list;
|
||||
savev = current_variable_set_list;
|
||||
current_variable_set_list = file->variables;
|
||||
|
||||
savef = reading_file;
|
||||
if (file->cmds && file->cmds->fileinfo.filenm)
|
||||
reading_file = &file->cmds->fileinfo;
|
||||
else
|
||||
reading_file = 0;
|
||||
|
||||
result = variable_expand (line);
|
||||
current_variable_set_list = save;
|
||||
reading_file = 0;
|
||||
|
||||
current_variable_set_list = savev;
|
||||
reading_file = savef;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Like allocated_variable_expand, but we first expand this variable in the
|
||||
context of the next variable set, then we append the expanded value. */
|
||||
/* Like allocated_variable_expand, but for += target-specific variables.
|
||||
First recursively construct the variable value from its appended parts in
|
||||
any upper variable sets. Then expand the resulting value. */
|
||||
|
||||
static char *
|
||||
allocated_variable_append (v, list)
|
||||
struct variable *v;
|
||||
struct variable_set_list *list;
|
||||
variable_append (const char *name, unsigned int length,
|
||||
const struct variable_set_list *set, int local)
|
||||
{
|
||||
struct variable_set_list *save;
|
||||
int len = strlen (v->name);
|
||||
char *var = alloca (len + 4);
|
||||
char *value;
|
||||
const struct variable *v;
|
||||
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 (!set)
|
||||
return initialize_variable_output ();
|
||||
|
||||
/* Try to find the variable in this variable set. */
|
||||
v = lookup_variable_in_set (name, length, set->set);
|
||||
|
||||
/* If there isn't one, or this one is private, try the set above us. */
|
||||
if (!v || (!local && v->private_var))
|
||||
return variable_append (name, length, set->next, nextlocal);
|
||||
|
||||
/* If this variable type is append, first get any upper values.
|
||||
If not, initialize the buffer. */
|
||||
if (v->append)
|
||||
buf = variable_append (name, length, set->next, nextlocal);
|
||||
else
|
||||
buf = initialize_variable_output ();
|
||||
|
||||
/* Append this value to the buffer, and return it.
|
||||
If we already have a value, first add a space. */
|
||||
if (buf > variable_buffer)
|
||||
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));
|
||||
|
||||
buf = variable_expand_string (buf, v->value, strlen (v->value));
|
||||
return (buf + strlen (buf));
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
allocated_variable_append (const struct variable *v)
|
||||
{
|
||||
char *val;
|
||||
|
||||
/* Construct the appended variable value. */
|
||||
|
||||
char *obuf = variable_buffer;
|
||||
unsigned int olen = variable_buffer_length;
|
||||
|
||||
variable_buffer = 0;
|
||||
|
||||
if (!list)
|
||||
list = current_variable_set_list;
|
||||
|
||||
assert(list->next != 0);
|
||||
save = current_variable_set_list;
|
||||
current_variable_set_list = list->next;
|
||||
|
||||
var[0] = '$';
|
||||
var[1] = '(';
|
||||
strcpy (&var[2], v->name);
|
||||
var[len+2] = ')';
|
||||
var[len+3] = '\0';
|
||||
|
||||
value = variable_expand_for_file (var, 0);
|
||||
|
||||
current_variable_set_list = save;
|
||||
|
||||
value += strlen (value);
|
||||
value = variable_buffer_output (value, " ", 1);
|
||||
value = variable_expand_string (value, v->value, (long)-1);
|
||||
|
||||
value = variable_buffer;
|
||||
|
||||
#if 0
|
||||
/* Waste a little memory and save time. */
|
||||
value = xrealloc (value, strlen (value))
|
||||
#endif
|
||||
val = variable_append (v->name, strlen (v->name),
|
||||
current_variable_set_list, 1);
|
||||
variable_buffer_output (val, "", 1);
|
||||
val = variable_buffer;
|
||||
|
||||
variable_buffer = obuf;
|
||||
variable_buffer_length = olen;
|
||||
|
||||
return value;
|
||||
return val;
|
||||
}
|
||||
|
||||
/* Like variable_expand_for_file, but the returned string is malloc'd.
|
||||
This function is called a lot. It wants to be efficient. */
|
||||
|
||||
char *
|
||||
allocated_variable_expand_for_file (line, file)
|
||||
char *line;
|
||||
struct file *file;
|
||||
allocated_variable_expand_for_file (const char *line, struct file *file)
|
||||
{
|
||||
char *value;
|
||||
|
||||
@@ -537,13 +563,33 @@ allocated_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_length = olen;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
245
filedef.h
245
filedef.h
@@ -1,48 +1,43 @@
|
||||
/* Definition of target file data structures for GNU Make.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,97 Free Software Foundation, Inc.
|
||||
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 2, or (at your option)
|
||||
any later version.
|
||||
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.
|
||||
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. */
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Structure that represents the info on one file
|
||||
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"
|
||||
|
||||
struct file
|
||||
{
|
||||
struct file *next;
|
||||
char *name;
|
||||
char *hname; /* Hashed filename */
|
||||
char *vpath; /* VPATH/vpath pathname */
|
||||
struct dep *deps;
|
||||
struct commands *cmds; /* Commands to execute for this target. */
|
||||
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
||||
char *stem; /* Implicit stem, if an implicit
|
||||
rule has been used */
|
||||
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;
|
||||
used when there are multiple double-colon
|
||||
entries for the same file. */
|
||||
const char *name;
|
||||
const char *hname; /* Hashed filename */
|
||||
const char *vpath; /* VPATH/vpath pathname */
|
||||
struct dep *deps; /* all dependencies, including duplicates */
|
||||
struct commands *cmds; /* Commands to execute for this target. */
|
||||
const char *stem; /* Implicit stem, if an implicit
|
||||
rule has been used */
|
||||
struct dep *also_make; /* Targets that are made by making this. */
|
||||
struct file *prev; /* Previous entry for same file name;
|
||||
used when there are multiple double-colon
|
||||
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 could be renamed, call `check_renamed' (below). */
|
||||
file could be renamed, call 'check_renamed' (below). */
|
||||
struct file *renamed;
|
||||
|
||||
/* List of variable sets used for this file. */
|
||||
@@ -60,89 +55,98 @@ struct file
|
||||
the same file. Otherwise this is null. */
|
||||
struct file *double_colon;
|
||||
|
||||
short int update_status; /* Status of the last attempt to update,
|
||||
or -1 if none has been made. */
|
||||
|
||||
enum /* State of the commands. */
|
||||
{ /* Note: It is important that cs_not_started be zero. */
|
||||
cs_not_started, /* Not yet started. */
|
||||
cs_deps_running, /* Dep commands running. */
|
||||
cs_running, /* Commands running. */
|
||||
cs_finished /* Commands finished. */
|
||||
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
||||
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
||||
has been performed. */
|
||||
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
||||
enum update_status /* Status of the last attempt to update. */
|
||||
{
|
||||
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_running, /* Commands running. */
|
||||
cs_finished /* Commands finished. */
|
||||
} command_state ENUM_BITFIELD (2);
|
||||
|
||||
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
||||
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 loaded:1; /* True if the file is a loaded object. */
|
||||
unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
|
||||
has only one-second resolution. */
|
||||
unsigned int tried_implicit:1; /* Nonzero if have searched
|
||||
for implicit rule for making
|
||||
this file; don't search again. */
|
||||
unsigned int updating:1; /* Nonzero while updating deps of this file */
|
||||
unsigned int updated:1; /* Nonzero if this file has been remade. */
|
||||
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 phony:1; /* Nonzero if this is a phony file
|
||||
i.e., a dependency of .PHONY. */
|
||||
for implicit rule for making
|
||||
this file; don't search again. */
|
||||
unsigned int updating:1; /* Nonzero while updating deps of this file */
|
||||
unsigned int updated:1; /* Nonzero if this file has been remade. */
|
||||
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 phony:1; /* Nonzero if this is a phony file
|
||||
i.e., a prerequisite of .PHONY. */
|
||||
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
||||
/* Nonzero, for an intermediate file,
|
||||
means remove_intermediates should not delete it. */
|
||||
unsigned int secondary:1;
|
||||
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
||||
this target cannot be remade. */
|
||||
unsigned int secondary:1; /* Nonzero means remove_intermediates should
|
||||
not delete it. */
|
||||
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
||||
this target cannot be remade. */
|
||||
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
||||
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
||||
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 */
|
||||
unsigned int no_diag:1; /* True if the file failed to update and no
|
||||
diagnostics has been issued (dontcare). */
|
||||
};
|
||||
|
||||
/* Number of intermediate files entered. */
|
||||
|
||||
extern unsigned int num_intermediates;
|
||||
|
||||
/* Current value for pruning the scan of the goal chain (toggle 0/1). */
|
||||
|
||||
extern unsigned int considered;
|
||||
|
||||
extern struct file *default_goal_file, *suffix_file, *default_file;
|
||||
extern struct file *default_file;
|
||||
|
||||
|
||||
extern struct file *lookup_file PARAMS ((char *name));
|
||||
extern struct file *enter_file PARAMS ((char *name));
|
||||
extern void remove_intermediates PARAMS ((int sig));
|
||||
extern void snap_deps PARAMS ((void));
|
||||
extern void rename_file PARAMS ((struct file *file, char *name));
|
||||
extern void rehash_file PARAMS ((struct file *file, char *name));
|
||||
extern void file_hash_enter PARAMS ((struct file *file, char *name,
|
||||
unsigned int oldhash, char *oldname));
|
||||
extern void set_command_state PARAMS ((struct file *file, int state));
|
||||
extern void notice_finished_file PARAMS ((struct file *file));
|
||||
struct file *lookup_file (const char *name);
|
||||
struct file *enter_file (const char *name);
|
||||
struct dep *split_prereqs (char *prereqstr);
|
||||
struct dep *enter_prereqs (struct dep *prereqs, const char *stem);
|
||||
void remove_intermediates (int sig);
|
||||
void snap_deps (void);
|
||||
void rename_file (struct file *file, const char *name);
|
||||
void rehash_file (struct file *file, const char *name);
|
||||
void set_command_state (struct file *file, enum cmd_state state);
|
||||
void notice_finished_file (struct file *file);
|
||||
void init_hash_files (void);
|
||||
void verify_file_data_base (void);
|
||||
char *build_target_list (char *old_list);
|
||||
void print_prereqs (const struct dep *deps);
|
||||
void print_file_data_base (void);
|
||||
int try_implicit_rule (struct file *file, unsigned int depth);
|
||||
int stemlen_compare (const void *v1, const void *v2);
|
||||
|
||||
|
||||
#if ST_MTIM_NSEC
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(st) \
|
||||
FILE_TIMESTAMP_FROM_S_AND_NS ((st).st_mtim.tv_sec, \
|
||||
(st).st_mtim.ST_MTIM_NSEC)
|
||||
# define FILE_TIMESTAMPS_PER_S \
|
||||
MIN ((FILE_TIMESTAMP) 1000000000, \
|
||||
(INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP) \
|
||||
/ INTEGER_TYPE_MAXIMUM (time_t)))
|
||||
#if FILE_TIMESTAMP_HI_RES
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||
file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC)
|
||||
#else
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(st) ((st).st_mtime)
|
||||
# define FILE_TIMESTAMPS_PER_S 1
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||
file_timestamp_cons (fname, (st).st_mtime, 0)
|
||||
#endif
|
||||
|
||||
#define FILE_TIMESTAMP_FROM_S_AND_NS(s, ns) \
|
||||
((s) * FILE_TIMESTAMPS_PER_S \
|
||||
+ (ns) * FILE_TIMESTAMPS_PER_S / 1000000000)
|
||||
#define FILE_TIMESTAMP_DIV(a, b) ((a)/(b) - ((a)%(b) < 0))
|
||||
#define FILE_TIMESTAMP_MOD(a, b) ((a)%(b) + ((a)%(b) < 0) * (b))
|
||||
#define FILE_TIMESTAMP_S(ts) FILE_TIMESTAMP_DIV ((ts), FILE_TIMESTAMPS_PER_S)
|
||||
#define FILE_TIMESTAMP_NS(ts) \
|
||||
(((FILE_TIMESTAMP_MOD ((ts), FILE_TIMESTAMPS_PER_S) * 1000000000) \
|
||||
+ (FILE_TIMESTAMPS_PER_S - 1)) \
|
||||
/ FILE_TIMESTAMPS_PER_S)
|
||||
/* If FILE_TIMESTAMP is 64 bits (or more), use nanosecond resolution.
|
||||
(Multiply by 2**30 instead of by 10**9 to save time at the cost of
|
||||
slightly decreasing the number of available timestamps.) With
|
||||
64-bit FILE_TIMESTAMP, this stops working on 2514-05-30 01:53:04
|
||||
UTC, but by then uintmax_t should be larger than 64 bits. */
|
||||
#define FILE_TIMESTAMPS_PER_S (FILE_TIMESTAMP_HI_RES ? 1000000000 : 1)
|
||||
#define FILE_TIMESTAMP_LO_BITS (FILE_TIMESTAMP_HI_RES ? 30 : 0)
|
||||
|
||||
#define FILE_TIMESTAMP_S(ts) (((ts) - ORDINARY_MTIME_MIN) \
|
||||
>> FILE_TIMESTAMP_LO_BITS)
|
||||
#define FILE_TIMESTAMP_NS(ts) ((int) (((ts) - ORDINARY_MTIME_MIN) \
|
||||
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
||||
|
||||
/* 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.
|
||||
|
||||
Subtract one for the sign bit if in case file timestamps can be negative;
|
||||
@@ -159,35 +163,50 @@ extern void notice_finished_file PARAMS ((struct file *file));
|
||||
* 302 / 1000) \
|
||||
+ 1 + 1 + 4 + 25)
|
||||
|
||||
extern FILE_TIMESTAMP file_timestamp_now PARAMS ((void));
|
||||
extern void file_timestamp_sprintf PARAMS ((char *p, FILE_TIMESTAMP ts));
|
||||
FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, long int);
|
||||
FILE_TIMESTAMP file_timestamp_now (int *);
|
||||
void file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts);
|
||||
|
||||
/* Return the mtime of file F (a struct file *), caching it.
|
||||
The value is -1 if the file does not exist. */
|
||||
The value is NONEXISTENT_MTIME if the file does not exist. */
|
||||
#define file_mtime(f) file_mtime_1 ((f), 1)
|
||||
/* Return the mtime of file F (a struct file *), caching it.
|
||||
Don't search using vpath for the file--if it doesn't actually exist,
|
||||
we don't find it.
|
||||
The value is -1 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)
|
||||
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) \
|
||||
((f)->last_mtime ? (f)->last_mtime : f_mtime ((f), v))
|
||||
((f)->last_mtime == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)
|
||||
|
||||
/* 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
|
||||
/* Special timestamp values. */
|
||||
|
||||
/* The file's timestamp is not yet known. */
|
||||
#define UNKNOWN_MTIME 0
|
||||
|
||||
/* The file does not exist. */
|
||||
#define NONEXISTENT_MTIME 1
|
||||
|
||||
/* The file does not exist, and we assume that it is older than any
|
||||
actual file. */
|
||||
#define OLD_MTIME 2
|
||||
|
||||
/* The smallest and largest ordinary timestamps. */
|
||||
#define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
|
||||
#define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
|
||||
<< FILE_TIMESTAMP_LO_BITS) \
|
||||
+ ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
|
||||
|
||||
/* 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
|
||||
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
|
||||
them, even if said dependents' modtimes are in the future.
|
||||
|
||||
If FILE_TIMESTAMP is unsigned, its maximum value is the same as
|
||||
((FILE_TIMESTAMP) -1), so use one less than that, because -1 is
|
||||
used for non-existing files. */
|
||||
#define NEW_MTIME \
|
||||
(INTEGER_TYPE_SIGNED (FILE_TIMESTAMP) \
|
||||
? INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP) \
|
||||
: (INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP) - 1))
|
||||
them, even if said dependents' modtimes are in the future. */
|
||||
#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
|
||||
|
||||
#define check_renamed(file) \
|
||||
while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
|
||||
|
||||
/* Have we snapped deps yet? */
|
||||
extern int snapped_deps;
|
||||
|
||||
2590
function.c
2590
function.c
File diff suppressed because it is too large
Load Diff
135
getloadavg.c
135
getloadavg.c
@@ -1,21 +1,17 @@
|
||||
/* Get the system load averages.
|
||||
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1985-2016 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
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.
|
||||
|
||||
This program 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.
|
||||
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, 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/>. */
|
||||
|
||||
/* Compile-time symbols that this file uses:
|
||||
|
||||
@@ -40,7 +36,7 @@
|
||||
NLIST_STRUCT Include nlist.h, not a.out.h, and
|
||||
the nlist n_name element is a pointer,
|
||||
not an array.
|
||||
NLIST_NAME_UNION struct nlist has an n_un member, not n_name.
|
||||
HAVE_STRUCT_NLIST_N_UN_N_NAME struct nlist has an n_un member, not n_name.
|
||||
LINUX_LDAV_FILE [__linux__]: File containing load averages.
|
||||
|
||||
Specific system predefines this file uses, aside from setting
|
||||
@@ -88,9 +84,9 @@
|
||||
|
||||
|
||||
/* 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. */
|
||||
|
||||
#include <errno.h>
|
||||
@@ -99,6 +95,13 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
#if !HAVE_SETLOCALE
|
||||
# define setlocale(Category, Locale) /* empty */
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETLOADAVG
|
||||
|
||||
|
||||
@@ -192,6 +195,10 @@ extern int errno;
|
||||
# define tek4300 /* Define by emacs, but not by other users. */
|
||||
# endif
|
||||
|
||||
/* AC_FUNC_GETLOADAVG thinks QNX is SVR4, but it isn't. */
|
||||
# if defined(__QNX__)
|
||||
# undef SVR4
|
||||
# endif
|
||||
|
||||
/* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */
|
||||
# ifndef LOAD_AVE_TYPE
|
||||
@@ -309,67 +316,6 @@ extern int errno;
|
||||
# define LDAV_CVT(n) (((double) (n)) / FSCALE)
|
||||
# endif
|
||||
|
||||
/* VAX C can't handle multi-line #ifs, or lines longer that 256 characters. */
|
||||
# ifndef NLIST_STRUCT
|
||||
|
||||
# ifdef MORE_BSD
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef sun
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef decstation
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef hpux
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# if defined (_SEQUENT_) || defined (sequent)
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef sgi
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef SVR4
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef sony_news
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef OSF_ALPHA
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# if defined (ardent) && defined (titan)
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef tek4300
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef butterfly
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# if defined(alliant) && defined(i860) /* Alliant FX/2800 */
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# ifdef _AIX
|
||||
# define NLIST_STRUCT
|
||||
# endif
|
||||
|
||||
# endif /* defined (NLIST_STRUCT) */
|
||||
|
||||
|
||||
# if defined(sgi) || (defined(mips) && !defined(BSD))
|
||||
# define FIXUP_KERNEL_SYMBOL_ADDR(nl) ((nl)[0].n_value &= ~(1 << 31))
|
||||
@@ -405,7 +351,7 @@ extern int errno;
|
||||
|
||||
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
||||
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
|
||||
# endif
|
||||
|
||||
@@ -413,11 +359,11 @@ extern int errno;
|
||||
|
||||
# ifndef VMS
|
||||
# ifndef __linux__
|
||||
# ifndef NLIST_STRUCT
|
||||
# include <a.out.h>
|
||||
# else /* NLIST_STRUCT */
|
||||
# ifdef HAVE_NLIST_H
|
||||
# include <nlist.h>
|
||||
# endif /* NLIST_STRUCT */
|
||||
# else
|
||||
# include <a.out.h>
|
||||
# endif
|
||||
|
||||
# ifdef SUNOS_5
|
||||
# include <fcntl.h>
|
||||
@@ -548,9 +494,7 @@ static kvm_t *kd;
|
||||
or -1 if an error occurred. */
|
||||
|
||||
int
|
||||
getloadavg (loadavg, nelem)
|
||||
double loadavg[];
|
||||
int nelem;
|
||||
getloadavg (double loadavg[], int nelem)
|
||||
{
|
||||
int elem = 0; /* Return value. */
|
||||
|
||||
@@ -646,8 +590,11 @@ getloadavg (loadavg, nelem)
|
||||
if (count <= 0)
|
||||
return -1;
|
||||
|
||||
/* The following sscanf must use the C locale. */
|
||||
setlocale (LC_NUMERIC, "C");
|
||||
count = sscanf (ldavgbuf, "%lf %lf %lf",
|
||||
&load_ave[0], &load_ave[1], &load_ave[2]);
|
||||
setlocale (LC_NUMERIC, "");
|
||||
if (count < 1)
|
||||
return -1;
|
||||
|
||||
@@ -753,7 +700,7 @@ getloadavg (loadavg, nelem)
|
||||
for (i = 0; i < conf.config_maxclass; ++i)
|
||||
{
|
||||
struct class_stats stats;
|
||||
bzero ((char *) &stats, sizeof stats);
|
||||
memset (&stats, '\0', sizeof stats);
|
||||
|
||||
desc.sd_type = CPUTYPE_CLASS;
|
||||
desc.sd_objid = i;
|
||||
@@ -796,7 +743,7 @@ getloadavg (loadavg, nelem)
|
||||
# define LDAV_DONE
|
||||
/* This call can return -1 for an error, but with good args
|
||||
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_LOAD_INFO_TYPE,
|
||||
DG_SYS_INFO_LOAD_VERSION_0);
|
||||
@@ -923,13 +870,13 @@ getloadavg (loadavg, nelem)
|
||||
strcpy (nl[0].n_name, LDAV_SYMBOL);
|
||||
strcpy (nl[1].n_name, "");
|
||||
# else /* NLIST_STRUCT */
|
||||
# ifdef NLIST_NAME_UNION
|
||||
# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
|
||||
nl[0].n_un.n_name = LDAV_SYMBOL;
|
||||
nl[1].n_un.n_name = 0;
|
||||
# else /* not NLIST_NAME_UNION */
|
||||
# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
nl[0].n_name = LDAV_SYMBOL;
|
||||
nl[1].n_name = 0;
|
||||
# endif /* not NLIST_NAME_UNION */
|
||||
# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
# endif /* NLIST_STRUCT */
|
||||
|
||||
# ifndef SUNOS_5
|
||||
@@ -1038,10 +985,10 @@ getloadavg (loadavg, nelem)
|
||||
#endif /* ! HAVE_GETLOADAVG */
|
||||
|
||||
#ifdef TEST
|
||||
#include "makeint.h"
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int naptime = 0;
|
||||
|
||||
|
||||
91
getopt.c
91
getopt.c
@@ -1,29 +1,25 @@
|
||||
/* Getopt for GNU.
|
||||
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
|
||||
before changing it!
|
||||
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
|
||||
before changing it!
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2016 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
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 the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
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.
|
||||
|
||||
This program 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.
|
||||
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/>. */
|
||||
|
||||
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>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
#ifndef _NO_PROTO
|
||||
@@ -85,7 +81,7 @@
|
||||
#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
|
||||
to intersperse the options with the other arguments.
|
||||
|
||||
@@ -210,9 +206,7 @@ extern char *getenv ();
|
||||
#endif
|
||||
|
||||
static char *
|
||||
my_index (str, chr)
|
||||
const char *str;
|
||||
int chr;
|
||||
my_index (const char *str, int chr)
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
@@ -262,8 +256,7 @@ static char *const *original_argv;
|
||||
/* 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
|
||||
to getopt is that one passed to the process. */
|
||||
static void
|
||||
__attribute__ ((unused))
|
||||
static void __attribute__ ((unused))
|
||||
store_args_and_env (int argc, char *const *argv)
|
||||
{
|
||||
/* XXX This is no good solution. We should rather copy the args so
|
||||
@@ -300,8 +293,7 @@ static void exchange (char **);
|
||||
#endif
|
||||
|
||||
static void
|
||||
exchange (argv)
|
||||
char **argv;
|
||||
exchange (char **argv)
|
||||
{
|
||||
int bottom = first_nonopt;
|
||||
int middle = last_nonopt;
|
||||
@@ -385,10 +377,7 @@ exchange (argv)
|
||||
static const char *_getopt_initialize (int, char *const *, const char *);
|
||||
#endif
|
||||
static const char *
|
||||
_getopt_initialize (argc, argv, optstring)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *optstring;
|
||||
_getopt_initialize (int argc, char *const *argv, const char *optstring)
|
||||
{
|
||||
/* Start processing options with ARGV-element 1 (since ARGV-element 0
|
||||
is the program name); the sequence of previously skipped
|
||||
@@ -507,13 +496,8 @@ _getopt_initialize (argc, argv, optstring)
|
||||
long-named options. */
|
||||
|
||||
int
|
||||
_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *optstring;
|
||||
const struct option *longopts;
|
||||
int *longind;
|
||||
int long_only;
|
||||
_getopt_internal (int argc, char *const *argv, const char *optstring,
|
||||
const struct option *longopts, int *longind, int long_only)
|
||||
{
|
||||
optarg = NULL;
|
||||
|
||||
@@ -672,7 +656,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
|
||||
fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
optind++;
|
||||
@@ -696,12 +680,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
_("%s: option `--%s' doesn't allow an argument\n"),
|
||||
_("%s: option '--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
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);
|
||||
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -718,7 +702,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
_("%s: option '%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
nextchar += strlen (nextchar);
|
||||
optopt = pfound->val;
|
||||
@@ -747,11 +731,11 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
if (argv[optind][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
|
||||
fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
|
||||
argv[0], nextchar);
|
||||
else
|
||||
/* +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);
|
||||
}
|
||||
nextchar = (char *) "";
|
||||
@@ -857,7 +841,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
|
||||
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
optind++;
|
||||
@@ -876,7 +860,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
if (opterr)
|
||||
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);
|
||||
|
||||
nextchar += strlen (nextchar);
|
||||
@@ -891,7 +875,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr,
|
||||
_("%s: option `%s' requires an argument\n"),
|
||||
_("%s: option '%s' requires an argument\n"),
|
||||
argv[0], argv[optind - 1]);
|
||||
nextchar += strlen (nextchar);
|
||||
return optstring[0] == ':' ? ':' : '?';
|
||||
@@ -961,10 +945,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
}
|
||||
|
||||
int
|
||||
getopt (argc, argv, optstring)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *optstring;
|
||||
getopt (int argc, char *const *argv, const char *optstring)
|
||||
{
|
||||
return _getopt_internal (argc, argv, optstring,
|
||||
(const struct option *) 0,
|
||||
@@ -980,9 +961,7 @@ getopt (argc, argv, optstring)
|
||||
the above definition of `getopt'. */
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
@@ -1022,7 +1001,7 @@ main (argc, argv)
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
printf ("option c with value '%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
|
||||
27
getopt.h
27
getopt.h
@@ -1,23 +1,20 @@
|
||||
/* 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.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
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 the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
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.
|
||||
|
||||
This program 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.
|
||||
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, 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/>. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
#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.
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-1994, 1996-2016 Free Software Foundation, Inc.
|
||||
|
||||
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.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
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 the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
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.
|
||||
|
||||
This program 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.
|
||||
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, 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/>. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@@ -66,12 +62,8 @@
|
||||
#endif
|
||||
|
||||
int
|
||||
getopt_long (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
getopt_long (int argc, 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);
|
||||
}
|
||||
@@ -82,12 +74,8 @@ getopt_long (argc, argv, options, long_options, opt_index)
|
||||
instead. */
|
||||
|
||||
int
|
||||
getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
getopt_long_only (int argc, 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);
|
||||
}
|
||||
@@ -100,9 +88,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
@@ -161,11 +147,11 @@ main (argc, argv)
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
printf ("option c with value '%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
printf ("option d with value `%s'\n", optarg);
|
||||
printf ("option d with value '%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
|
||||
206
gettext.h
206
gettext.h
@@ -1,177 +1,57 @@
|
||||
/* Begin of libgettext.h */
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995, 1996, 1997, 1998 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.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
This program 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/>. */
|
||||
|
||||
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. */
|
||||
|
||||
/* Because on some systems (e.g. Solaris) we sometimes have to include
|
||||
the systems libintl.h as well as this file we have more complex
|
||||
include protection above. But the systems header might perhaps also
|
||||
define _LIBINTL_H and therefore we have to protect the definition here. */
|
||||
|
||||
#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
|
||||
#ifndef _LIBINTL_H
|
||||
# define _LIBINTL_H 1
|
||||
#endif
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__ || defined __cplusplus
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
# if !defined __cplusplus || defined __GNUC__
|
||||
# define NULL ((void *) 0)
|
||||
# else
|
||||
# define NULL (0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_LC_MESSAGES
|
||||
/* This value determines the behaviour of the gettext() and dgettext()
|
||||
function. But some system does not have this defined. Define it
|
||||
to a default value. */
|
||||
# define LC_MESSAGES (-1)
|
||||
#endif
|
||||
|
||||
/* Declarations for gettext-using-catgets interface. Derived from
|
||||
Jim Meyering's libintl.h. */
|
||||
struct _msg_ent
|
||||
{
|
||||
const char *_msg;
|
||||
int _msg_number;
|
||||
};
|
||||
|
||||
#if HAVE_CATGETS
|
||||
/* These two variables are defined in the automatically by po-to-tbl.sed
|
||||
generated file `cat-id-tbl.c'. */
|
||||
extern const struct _msg_ent _msg_tbl[];
|
||||
extern int _msg_tbl_length;
|
||||
#endif
|
||||
|
||||
/* For automatical extraction of messages sometimes no real
|
||||
translation is needed. Instead the string itself is the result. */
|
||||
#define gettext_noop(Str) (Str)
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
extern char *gettext PARAMS ((const char *__msgid));
|
||||
/* static char *gettext__ PARAMS ((const char *__msgid)); */
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
|
||||
/* static char *dgettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid)); */
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
|
||||
int __category));
|
||||
extern char *dcgettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid, int __category));
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
extern char *textdomain PARAMS ((const char *__domainname));
|
||||
/* static char *textdomain__ PARAMS ((const char *__domainname)); */
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
extern char *bindtextdomain PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
/* static char *bindtextdomain__ PARAMS ((const char *__domainname,
|
||||
const char *__dirname)); */
|
||||
#ifndef _LIBGETTEXT_H
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
/* NLS can be disabled through the configure --disable-nls option. */
|
||||
#if ENABLE_NLS
|
||||
|
||||
/* Solaris 2.3 has the gettext function but dcgettext is missing.
|
||||
So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
|
||||
has dcgettext. */
|
||||
# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
|
||||
|
||||
# define gettext(Msgid) \
|
||||
dgettext (NULL, Msgid)
|
||||
|
||||
# define dgettext(Domainname, Msgid) \
|
||||
dcgettext (Domainname, Msgid, LC_MESSAGES)
|
||||
|
||||
# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
|
||||
/* This global variable is defined in loadmsgcat.c. We need a sign,
|
||||
whether a new catalog was loaded, which can be associated with all
|
||||
translations. */
|
||||
extern int _nl_msg_cat_cntr;
|
||||
|
||||
# define dcgettext(Domainname, Msgid, Category) \
|
||||
(__extension__ \
|
||||
({ \
|
||||
char *__result; \
|
||||
if (__builtin_constant_p (Msgid)) \
|
||||
{ \
|
||||
static char *__translation__; \
|
||||
static int __catalog_counter__; \
|
||||
if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
|
||||
{ \
|
||||
__translation__ = \
|
||||
dcgettext__ (Domainname, Msgid, Category); \
|
||||
__catalog_counter__ = _nl_msg_cat_cntr; \
|
||||
} \
|
||||
__result = __translation__; \
|
||||
} \
|
||||
else \
|
||||
__result = dcgettext__ (Domainname, Msgid, Category); \
|
||||
__result; \
|
||||
}))
|
||||
# endif
|
||||
# endif
|
||||
/* Get declarations of GNU message catalog functions. */
|
||||
# include <libintl.h>
|
||||
|
||||
#else
|
||||
|
||||
# define gettext(Msgid) (Msgid)
|
||||
# define dgettext(Domainname, Msgid) (Msgid)
|
||||
# define dcgettext(Domainname, Msgid, Category) (Msgid)
|
||||
# define textdomain(Domainname) ((char *) Domainname)
|
||||
# define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
|
||||
/* Disabled NLS.
|
||||
The casts to 'const char *' serve the purpose of producing warnings
|
||||
for invalid uses of the value returned from these functions.
|
||||
On pre-ANSI systems without 'const', the config.h file is supposed to
|
||||
contain "#define const". */
|
||||
# define gettext(Msgid) ((const char *) (Msgid))
|
||||
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
|
||||
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
|
||||
# define ngettext(Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||
# define textdomain(Domainname) ((const char *) (Domainname))
|
||||
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
|
||||
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/* A pseudo function call that serves as a marker for the automated
|
||||
extraction of messages, but does not call gettext(). The run-time
|
||||
translation is done at a different place in the code.
|
||||
The argument, String, should be a literal string. Concatenated strings
|
||||
and other string expressions won't work.
|
||||
The macro's expansion is not parenthesized, so that it is suitable as
|
||||
initializer for static 'char[]' or 'const char[]' variables. */
|
||||
#define gettext_noop(String) String
|
||||
|
||||
#endif
|
||||
|
||||
/* End of libgettext.h */
|
||||
#endif /* _LIBGETTEXT_H */
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.deps Makefile.in
|
||||
@@ -1,3 +1,47 @@
|
||||
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>
|
||||
|
||||
* Makefile.am: Use automake 1.6.
|
||||
Use new automake condition USE_LOCAL_GLOB to decide whether or not
|
||||
to build the local GNU glob library or use the system one.
|
||||
|
||||
1999-09-12 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* fnmatch.c: Last GLIBC version wouldn't compile outside of GLIBC
|
||||
@@ -126,5 +170,22 @@ Sat Jun 22 10:44:09 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||
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
|
||||
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,10 +1,30 @@
|
||||
# -*-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.4 foreign
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
noinst_LIBRARIES = libglob.a
|
||||
# Only build the library when the system doesn't already have GNU glob.
|
||||
if USE_LOCAL_GLOB
|
||||
noinst_LIBRARIES = libglob.a
|
||||
endif
|
||||
|
||||
libglob_a_SOURCES = glob.c glob.h fnmatch.c fnmatch.h
|
||||
|
||||
|
||||
EXTRA_DIST = COPYING.LIB Makefile.ami SCOPTIONS SMakefile \
|
||||
configure.bat
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
||||
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library 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
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Makefile for standalone libglob.a (fnmatch, glob). -*-Makefile-*-
|
||||
# Copyright (C) 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/>.
|
||||
|
||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||
VPATH = /glob/
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
||||
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public License
|
||||
# as published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
|
||||
# This library 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
|
||||
# Library General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; see the file COPYING.LIB. If
|
||||
# not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# Copyright (C) 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/>.
|
||||
|
||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||
VPATH = /glob/
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
@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
|
||||
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.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Free Software
|
||||
Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; see the file COPYING.LIB. 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 Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/* Copyright (C) 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Free Software
|
||||
Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
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
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library 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
|
||||
Library General Public License for more details.
|
||||
The GNU C Library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. 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 Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA. */
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
#define _FNMATCH_H 1
|
||||
@@ -24,7 +25,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__ || !defined __P
|
||||
# if !defined __GLIBC__
|
||||
# undef __P
|
||||
# define __P(protos) protos
|
||||
# endif
|
||||
@@ -37,7 +38,7 @@ extern "C" {
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
#ifndef const
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined WINDOWS32
|
||||
# define __const const
|
||||
# else
|
||||
# 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
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; see the file COPYING.LIB. 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 Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA. */
|
||||
|
||||
/* AIX requires this to be the first thing in the file. */
|
||||
#if defined _AIX && !defined __GNUC__
|
||||
@@ -181,19 +182,20 @@ extern void bcopy ();
|
||||
# define mempcpy(Dest, Src, Len) __mempcpy (Dest, Src, Len)
|
||||
#endif
|
||||
|
||||
#ifndef __GNU_LIBRARY__
|
||||
#if !defined __GNU_LIBRARY__ && !defined __DJGPP__
|
||||
# ifdef __GNUC__
|
||||
__inline
|
||||
# endif
|
||||
# ifndef __SASC
|
||||
# ifdef WINDOWS32
|
||||
static void *
|
||||
my_realloc (void *p, unsigned int n)
|
||||
# else
|
||||
static char *
|
||||
# endif
|
||||
my_realloc (p, n)
|
||||
char *p;
|
||||
unsigned int n;
|
||||
# endif
|
||||
{
|
||||
/* These casts are the for sake of the broken Ultrix compiler,
|
||||
which warns of illegal pointer combinations otherwise. */
|
||||
@@ -203,7 +205,7 @@ my_realloc (p, n)
|
||||
}
|
||||
# define realloc my_realloc
|
||||
# endif /* __SASC */
|
||||
#endif /* __GNU_LIBRARY__ */
|
||||
#endif /* __GNU_LIBRARY__ || __DJGPP__ */
|
||||
|
||||
|
||||
#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 collated_compare __P ((const __ptr_t, const __ptr_t));
|
||||
|
||||
#ifdef VMS
|
||||
/* these compilers like prototypes */
|
||||
#if !defined _LIBC || !defined NO_GLOB_PATTERN_P
|
||||
int __glob_pattern_p (const char *pattern, int quote);
|
||||
#endif
|
||||
int __glob_pattern_p __P ((const char *pattern, int quote));
|
||||
#endif
|
||||
|
||||
/* Find the end of the sub-pattern in a brace expression. We define
|
||||
@@ -378,6 +377,11 @@ glob (pattern, flags, errfunc, pglob)
|
||||
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)
|
||||
{
|
||||
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)
|
||||
| ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
|
||||
#if defined _AMIGA || defined VMS
|
||||
#if defined HAVE_CASE_INSENSITIVE_FS
|
||||
| FNM_CASEFOLD
|
||||
#endif
|
||||
);
|
||||
|
||||
43
glob/glob.h
43
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
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
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
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library 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
|
||||
Library General Public License for more details.
|
||||
The GNU C Library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. 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 Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA. */
|
||||
|
||||
#ifndef _GLOB_H
|
||||
#define _GLOB_H 1
|
||||
@@ -24,7 +25,7 @@ extern "C" {
|
||||
|
||||
#undef __ptr_t
|
||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__ || !defined __P
|
||||
# if !defined __GLIBC__
|
||||
# undef __P
|
||||
# undef __PMT
|
||||
# define __P(protos) protos
|
||||
@@ -47,19 +48,23 @@ extern "C" {
|
||||
|
||||
/* We need `size_t' for the following definitions. */
|
||||
#ifndef __size_t
|
||||
# if defined __GNUC__ && __GNUC__ >= 2
|
||||
typedef __SIZE_TYPE__ __size_t;
|
||||
# if defined __FreeBSD__
|
||||
# define __size_t size_t
|
||||
# else
|
||||
# if defined __GNUC__ && __GNUC__ >= 2
|
||||
typedef __SIZE_TYPE__ __size_t;
|
||||
# else
|
||||
/* This is a guess. */
|
||||
/*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.
|
||||
* 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).
|
||||
*/
|
||||
#if !(defined __DECC && defined __SIZE_T)
|
||||
# if !(defined __DECC && defined __SIZE_T)
|
||||
typedef unsigned long int __size_t;
|
||||
#endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
/* 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)
|
||||
79
gnumake.h
Normal file
79
gnumake.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* 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;
|
||||
} 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_ */
|
||||
396
gpl.texinfo
396
gpl.texinfo
@@ -1,396 +0,0 @@
|
||||
@setfilename gpl.info
|
||||
|
||||
@unnumbered GNU GENERAL PUBLIC LICENSE
|
||||
@center Version 2, June 1991
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@unnumberedsec Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
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
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
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
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
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
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
@iftex
|
||||
@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
@end iftex
|
||||
@ifinfo
|
||||
@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
@end ifinfo
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
This License applies to any program or other work which contains
|
||||
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
|
||||
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.
|
||||
|
||||
@item
|
||||
You may copy and distribute 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 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
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
@item
|
||||
You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
@item
|
||||
You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
@item
|
||||
If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
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.)
|
||||
@end enumerate
|
||||
|
||||
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
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
@item
|
||||
You may copy and distribute the Program (or a work based on it,
|
||||
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:
|
||||
|
||||
@enumerate a
|
||||
@item
|
||||
Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
@item
|
||||
Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
@item
|
||||
Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
@end enumerate
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
@item
|
||||
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.
|
||||
|
||||
@item
|
||||
You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
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.
|
||||
|
||||
@item
|
||||
Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
@item
|
||||
If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
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
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
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
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
@item
|
||||
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.
|
||||
|
||||
@item
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and ``any
|
||||
later version'', you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
@item
|
||||
If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
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.
|
||||
|
||||
@iftex
|
||||
@heading NO WARRANTY
|
||||
@end iftex
|
||||
@ifinfo
|
||||
@center NO WARRANTY
|
||||
@end ifinfo
|
||||
|
||||
@item
|
||||
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO 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.
|
||||
|
||||
@item
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE 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.
|
||||
@end enumerate
|
||||
|
||||
@iftex
|
||||
@heading END OF TERMS AND CONDITIONS
|
||||
@end iftex
|
||||
@ifinfo
|
||||
@center END OF TERMS AND CONDITIONS
|
||||
@end ifinfo
|
||||
|
||||
@page
|
||||
@unnumberedsec How to Apply These Terms to Your New Programs
|
||||
|
||||
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
|
||||
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 attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the ``copyright'' line and a pointer to where the full notice is found.
|
||||
|
||||
@smallexample
|
||||
@var{one line to give the program's name and an idea of what it does.}
|
||||
Copyright (C) 19@var{yy} @var{name of author}
|
||||
|
||||
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 the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program 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, write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
@end smallexample
|
||||
|
||||
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
|
||||
when it starts in an interactive mode:
|
||||
|
||||
@smallexample
|
||||
Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
|
||||
type `show w'. This is free software, and you are welcome
|
||||
to redistribute it under certain conditions; type `show c'
|
||||
for details.
|
||||
@end smallexample
|
||||
|
||||
The hypothetical commands @samp{show w} and @samp{show c} should show
|
||||
the appropriate parts of the General Public License. Of course, the
|
||||
commands you use may be called something other than @samp{show w} and
|
||||
@samp{show c}; they could even be mouse-clicks or menu items---whatever
|
||||
suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a ``copyright disclaimer'' for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
Yoyodyne, Inc., hereby disclaims all copyright
|
||||
interest in the program `Gnomovision'
|
||||
(which makes passes at compilers) written
|
||||
by James Hacker.
|
||||
|
||||
@var{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
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.
|
||||
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 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 floc *flocp UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
330
hash.c
Normal file
330
hash.c
Normal file
@@ -0,0 +1,330 @@
|
||||
/* hash.c -- hash table maintenance
|
||||
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||
|
||||
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 "hash.h"
|
||||
|
||||
#define CALLOC(t, n) ((t *) xcalloc (sizeof (t) * (n)))
|
||||
#define MALLOC(t, n) ((t *) xmalloc (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)))
|
||||
|
||||
static void hash_rehash __P((struct hash_table* ht));
|
||||
static unsigned long round_up_2 __P((unsigned long rough));
|
||||
|
||||
/* Implement double hashing with open addressing. The table size is
|
||||
always a power of two. The secondary ('increment') hash function
|
||||
is forced to return an odd-value, in order to be relatively prime
|
||||
to the table size. This guarantees that the increment can
|
||||
potentially hit every slot in the table during collision
|
||||
resolution. */
|
||||
|
||||
void *hash_deleted_item = &hash_deleted_item;
|
||||
|
||||
/* Force the table size to be a power of two, possibly rounding up the
|
||||
given size. */
|
||||
|
||||
void
|
||||
hash_init (struct hash_table *ht, 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_empty_slots = ht->ht_size;
|
||||
ht->ht_vec = (void**) CALLOC (struct token *, ht->ht_size);
|
||||
if (ht->ht_vec == 0)
|
||||
{
|
||||
fprintf (stderr, _("can't allocate %lu bytes for hash table: memory exhausted"),
|
||||
ht->ht_size * (unsigned long) sizeof (struct token *));
|
||||
exit (MAKE_TROUBLE);
|
||||
}
|
||||
|
||||
ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_collisions = 0;
|
||||
ht->ht_lookups = 0;
|
||||
ht->ht_rehashes = 0;
|
||||
ht->ht_hash_1 = hash_1;
|
||||
ht->ht_hash_2 = hash_2;
|
||||
ht->ht_compare = hash_cmp;
|
||||
}
|
||||
|
||||
/* Load an array of items into 'ht'. */
|
||||
|
||||
void
|
||||
hash_load (struct hash_table *ht, void *item_table,
|
||||
unsigned long cardinality, unsigned long size)
|
||||
{
|
||||
char *items = (char *) item_table;
|
||||
while (cardinality--)
|
||||
{
|
||||
hash_insert (ht, items);
|
||||
items += size;
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns the address of the table slot matching 'key'. If 'key' is
|
||||
not found, return the address of an empty slot suitable for
|
||||
inserting 'key'. The caller is responsible for incrementing
|
||||
ht_fill on insertion. */
|
||||
|
||||
void **
|
||||
hash_find_slot (struct hash_table *ht, const void *key)
|
||||
{
|
||||
void **slot;
|
||||
void **deleted_slot = 0;
|
||||
unsigned int hash_2 = 0;
|
||||
unsigned int hash_1 = (*ht->ht_hash_1) (key);
|
||||
|
||||
ht->ht_lookups++;
|
||||
for (;;)
|
||||
{
|
||||
hash_1 &= (ht->ht_size - 1);
|
||||
slot = &ht->ht_vec[hash_1];
|
||||
|
||||
if (*slot == 0)
|
||||
return (deleted_slot ? deleted_slot : slot);
|
||||
if (*slot == hash_deleted_item)
|
||||
{
|
||||
if (deleted_slot == 0)
|
||||
deleted_slot = slot;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (key == *slot)
|
||||
return slot;
|
||||
if ((*ht->ht_compare) (key, *slot) == 0)
|
||||
return slot;
|
||||
ht->ht_collisions++;
|
||||
}
|
||||
if (!hash_2)
|
||||
hash_2 = (*ht->ht_hash_2) (key) | 1;
|
||||
hash_1 += hash_2;
|
||||
}
|
||||
}
|
||||
|
||||
void *
|
||||
hash_find_item (struct hash_table *ht, const void *key)
|
||||
{
|
||||
void **slot = hash_find_slot (ht, key);
|
||||
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
||||
}
|
||||
|
||||
void *
|
||||
hash_insert (struct hash_table *ht, const void *item)
|
||||
{
|
||||
void **slot = hash_find_slot (ht, item);
|
||||
const void *old_item = *slot;
|
||||
hash_insert_at (ht, item, slot);
|
||||
return (void *)((HASH_VACANT (old_item)) ? 0 : old_item);
|
||||
}
|
||||
|
||||
void *
|
||||
hash_insert_at (struct hash_table *ht, const void *item, const void *slot)
|
||||
{
|
||||
const void *old_item = *(void **) slot;
|
||||
if (HASH_VACANT (old_item))
|
||||
{
|
||||
ht->ht_fill++;
|
||||
if (old_item == 0)
|
||||
ht->ht_empty_slots--;
|
||||
old_item = item;
|
||||
}
|
||||
*(void const **) slot = item;
|
||||
if (ht->ht_empty_slots < ht->ht_size - ht->ht_capacity)
|
||||
{
|
||||
hash_rehash (ht);
|
||||
return (void *) hash_find_slot (ht, item);
|
||||
}
|
||||
else
|
||||
return (void *) slot;
|
||||
}
|
||||
|
||||
void *
|
||||
hash_delete (struct hash_table *ht, const void *item)
|
||||
{
|
||||
void **slot = hash_find_slot (ht, item);
|
||||
return hash_delete_at (ht, slot);
|
||||
}
|
||||
|
||||
void *
|
||||
hash_delete_at (struct hash_table *ht, const void *slot)
|
||||
{
|
||||
void *item = *(void **) slot;
|
||||
if (!HASH_VACANT (item))
|
||||
{
|
||||
*(void const **) slot = hash_deleted_item;
|
||||
ht->ht_fill--;
|
||||
return item;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
hash_free_items (struct hash_table *ht)
|
||||
{
|
||||
void **vec = ht->ht_vec;
|
||||
void **end = &vec[ht->ht_size];
|
||||
for (; vec < end; vec++)
|
||||
{
|
||||
void *item = *vec;
|
||||
if (!HASH_VACANT (item))
|
||||
free (item);
|
||||
*vec = 0;
|
||||
}
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_empty_slots = ht->ht_size;
|
||||
}
|
||||
|
||||
void
|
||||
hash_delete_items (struct hash_table *ht)
|
||||
{
|
||||
void **vec = ht->ht_vec;
|
||||
void **end = &vec[ht->ht_size];
|
||||
for (; vec < end; vec++)
|
||||
*vec = 0;
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_collisions = 0;
|
||||
ht->ht_lookups = 0;
|
||||
ht->ht_rehashes = 0;
|
||||
ht->ht_empty_slots = ht->ht_size;
|
||||
}
|
||||
|
||||
void
|
||||
hash_free (struct hash_table *ht, int free_items)
|
||||
{
|
||||
if (free_items)
|
||||
hash_free_items (ht);
|
||||
else
|
||||
{
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_empty_slots = ht->ht_size;
|
||||
}
|
||||
free (ht->ht_vec);
|
||||
ht->ht_vec = 0;
|
||||
ht->ht_capacity = 0;
|
||||
}
|
||||
|
||||
void
|
||||
hash_map (struct hash_table *ht, hash_map_func_t map)
|
||||
{
|
||||
void **slot;
|
||||
void **end = &ht->ht_vec[ht->ht_size];
|
||||
|
||||
for (slot = ht->ht_vec; slot < end; slot++)
|
||||
{
|
||||
if (!HASH_VACANT (*slot))
|
||||
(*map) (*slot);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
hash_map_arg (struct hash_table *ht, hash_map_arg_func_t map, void *arg)
|
||||
{
|
||||
void **slot;
|
||||
void **end = &ht->ht_vec[ht->ht_size];
|
||||
|
||||
for (slot = ht->ht_vec; slot < end; slot++)
|
||||
{
|
||||
if (!HASH_VACANT (*slot))
|
||||
(*map) (*slot, arg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Double the size of the hash table in the event of overflow... */
|
||||
|
||||
static void
|
||||
hash_rehash (struct hash_table *ht)
|
||||
{
|
||||
unsigned long old_ht_size = ht->ht_size;
|
||||
void **old_vec = ht->ht_vec;
|
||||
void **ovp;
|
||||
|
||||
if (ht->ht_fill >= ht->ht_capacity)
|
||||
{
|
||||
ht->ht_size *= 2;
|
||||
ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4);
|
||||
}
|
||||
ht->ht_rehashes++;
|
||||
ht->ht_vec = (void **) CALLOC (struct token *, ht->ht_size);
|
||||
|
||||
for (ovp = old_vec; ovp < &old_vec[old_ht_size]; ovp++)
|
||||
{
|
||||
if (! HASH_VACANT (*ovp))
|
||||
{
|
||||
void **slot = hash_find_slot (ht, *ovp);
|
||||
*slot = *ovp;
|
||||
}
|
||||
}
|
||||
ht->ht_empty_slots = ht->ht_size - ht->ht_fill;
|
||||
free (old_vec);
|
||||
}
|
||||
|
||||
void
|
||||
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
||||
{
|
||||
/* GKM FIXME: honor NO_FLOAT */
|
||||
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
||||
100.0 * (double) ht->ht_fill / (double) ht->ht_size);
|
||||
fprintf (out_FILE, _("Rehash=%d, "), ht->ht_rehashes);
|
||||
fprintf (out_FILE, _("Collisions=%ld/%ld=%.0f%%"), ht->ht_collisions, ht->ht_lookups,
|
||||
(ht->ht_lookups
|
||||
? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups)
|
||||
: 0));
|
||||
}
|
||||
|
||||
/* Dump all items into a NULL-terminated vector. Use the
|
||||
user-supplied vector, or malloc one. */
|
||||
|
||||
void **
|
||||
hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
|
||||
{
|
||||
void **vector;
|
||||
void **slot;
|
||||
void **end = &ht->ht_vec[ht->ht_size];
|
||||
|
||||
if (vector_0 == 0)
|
||||
vector_0 = MALLOC (void *, ht->ht_fill + 1);
|
||||
vector = vector_0;
|
||||
|
||||
for (slot = ht->ht_vec; slot < end; slot++)
|
||||
if (!HASH_VACANT (*slot))
|
||||
*vector++ = *slot;
|
||||
*vector = 0;
|
||||
|
||||
if (compare)
|
||||
qsort (vector_0, ht->ht_fill, sizeof (void *), compare);
|
||||
return vector_0;
|
||||
}
|
||||
|
||||
/* Round a given number up to the nearest power of 2. */
|
||||
|
||||
static unsigned long
|
||||
round_up_2 (unsigned long n)
|
||||
{
|
||||
n |= (n >> 1);
|
||||
n |= (n >> 2);
|
||||
n |= (n >> 4);
|
||||
n |= (n >> 8);
|
||||
n |= (n >> 16);
|
||||
|
||||
#if !defined(HAVE_LIMITS_H) || ULONG_MAX > 4294967295
|
||||
/* We only need this on systems where unsigned long is >32 bits. */
|
||||
n |= (n >> 32);
|
||||
#endif
|
||||
|
||||
return n + 1;
|
||||
}
|
||||
234
hash.h
Normal file
234
hash.h
Normal file
@@ -0,0 +1,234 @@
|
||||
/* hash.h -- decls for hash table
|
||||
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||
|
||||
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 _hash_h_
|
||||
#define _hash_h_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__ || !defined __P
|
||||
# undef __P
|
||||
# define __P(protos) protos
|
||||
# endif
|
||||
#else /* Not C++ or ANSI C. */
|
||||
# undef __P
|
||||
# define __P(protos) ()
|
||||
/* 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
|
||||
non-ANSI C where 'const' is problematical. */
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
typedef unsigned long (*hash_func_t) __P((void const *key));
|
||||
typedef int (*hash_cmp_func_t) __P((void const *x, void const *y));
|
||||
typedef void (*hash_map_func_t) __P((void const *item));
|
||||
typedef void (*hash_map_arg_func_t) __P((void const *item, void *arg));
|
||||
|
||||
struct hash_table
|
||||
{
|
||||
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_capacity; /* usable slots, limited by loading-factor */
|
||||
unsigned long ht_fill; /* items in table */
|
||||
unsigned long ht_empty_slots; /* empty slots not including deleted slots */
|
||||
unsigned long ht_collisions; /* # of failed calls to comparison function */
|
||||
unsigned long ht_lookups; /* # of queries */
|
||||
unsigned int ht_rehashes; /* # of times we've expanded table */
|
||||
};
|
||||
|
||||
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
||||
|
||||
void hash_init __P((struct hash_table *ht, unsigned long size,
|
||||
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp));
|
||||
void hash_load __P((struct hash_table *ht, void *item_table,
|
||||
unsigned long cardinality, unsigned long size));
|
||||
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_insert __P((struct hash_table *ht, const void *item));
|
||||
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_at __P((struct hash_table *ht, void const *slot));
|
||||
void hash_delete_items __P((struct hash_table *ht));
|
||||
void hash_free_items __P((struct hash_table *ht));
|
||||
void hash_free __P((struct hash_table *ht, int free_items));
|
||||
void hash_map __P((struct hash_table *ht, hash_map_func_t map));
|
||||
void hash_map_arg __P((struct hash_table *ht, hash_map_arg_func_t map, void *arg));
|
||||
void hash_print_stats __P((struct hash_table *ht, FILE *out_FILE));
|
||||
void **hash_dump __P((struct hash_table *ht, void **vector_0, qsort_cmp_t compare));
|
||||
|
||||
extern void *hash_deleted_item;
|
||||
#define HASH_VACANT(item) ((item) == 0 || (void *) (item) == hash_deleted_item)
|
||||
|
||||
|
||||
/* 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 { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
while (*++_key_) \
|
||||
(RESULT) += (*_key_ << (_key_[1] & 0xf)); \
|
||||
} while (0)
|
||||
#define return_STRING_HASH_1(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
STRING_HASH_1 ((KEY), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define STRING_HASH_2(KEY, RESULT) do { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
while (*++_key_) \
|
||||
(RESULT) += (*_key_ << (_key_[1] & 0x7)); \
|
||||
} while (0)
|
||||
#define return_STRING_HASH_2(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
STRING_HASH_2 ((KEY), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define STRING_COMPARE(X, Y, RESULT) do { \
|
||||
RESULT = (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||
} while (0)
|
||||
#define return_STRING_COMPARE(X, Y) do { \
|
||||
return (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define STRING_N_HASH_1(KEY, N, RESULT) do { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
int _n_ = (N); \
|
||||
if (_n_) \
|
||||
while (--_n_ && *++_key_) \
|
||||
(RESULT) += (*_key_ << (_key_[1] & 0xf)); \
|
||||
(RESULT) += *++_key_; \
|
||||
} while (0)
|
||||
#define return_STRING_N_HASH_1(KEY, N) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
STRING_N_HASH_1 ((KEY), (N), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define STRING_N_HASH_2(KEY, N, RESULT) do { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
int _n_ = (N); \
|
||||
if (_n_) \
|
||||
while (--_n_ && *++_key_) \
|
||||
(RESULT) += (*_key_ << (_key_[1] & 0x7)); \
|
||||
(RESULT) += *++_key_; \
|
||||
} while (0)
|
||||
#define return_STRING_N_HASH_2(KEY, N) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
STRING_N_HASH_2 ((KEY), (N), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define STRING_N_COMPARE(X, Y, N, RESULT) do { \
|
||||
RESULT = (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||
} while (0)
|
||||
#define return_STRING_N_COMPARE(X, Y, N) do { \
|
||||
return (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||
} while (0)
|
||||
|
||||
#ifdef HAVE_CASE_INSENSITIVE_FS
|
||||
|
||||
/* hash and comparison macros for case-insensitive string _key_s. */
|
||||
|
||||
#define ISTRING_HASH_1(KEY, RESULT) do { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
while (*++_key_) \
|
||||
(RESULT) += ((isupper (*_key_) ? tolower (*_key_) : *_key_) << (_key_[1] & 0xf)); \
|
||||
} while (0)
|
||||
#define return_ISTRING_HASH_1(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
ISTRING_HASH_1 ((KEY), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define ISTRING_HASH_2(KEY, RESULT) do { \
|
||||
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||
while (*++_key_) \
|
||||
(RESULT) += ((isupper (*_key_) ? tolower (*_key_) : *_key_) << (_key_[1] & 0x7)); \
|
||||
} while (0)
|
||||
#define return_ISTRING_HASH_2(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
ISTRING_HASH_2 ((KEY), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define ISTRING_COMPARE(X, Y, RESULT) do { \
|
||||
RESULT = (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||
} while (0)
|
||||
#define return_ISTRING_COMPARE(X, Y) do { \
|
||||
return (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
#define ISTRING_HASH_1(KEY, RESULT) STRING_HASH_1 ((KEY), (RESULT))
|
||||
#define return_ISTRING_HASH_1(KEY) return_STRING_HASH_1 (KEY)
|
||||
|
||||
#define ISTRING_HASH_2(KEY, RESULT) STRING_HASH_2 ((KEY), (RESULT))
|
||||
#define return_ISTRING_HASH_2(KEY) return_STRING_HASH_2 (KEY)
|
||||
|
||||
#define ISTRING_COMPARE(X, Y, RESULT) STRING_COMPARE ((X), (Y), (RESULT))
|
||||
#define return_ISTRING_COMPARE(X, Y) return_STRING_COMPARE ((X), (Y))
|
||||
|
||||
#endif
|
||||
|
||||
/* hash and comparison macros for integer _key_s. */
|
||||
|
||||
#define INTEGER_HASH_1(KEY, RESULT) do { \
|
||||
(RESULT) += ((unsigned long)(KEY)); \
|
||||
} while (0)
|
||||
#define return_INTEGER_HASH_1(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
INTEGER_HASH_1 ((KEY), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define INTEGER_HASH_2(KEY, RESULT) do { \
|
||||
(RESULT) += ~((unsigned long)(KEY)); \
|
||||
} while (0)
|
||||
#define return_INTEGER_HASH_2(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
INTEGER_HASH_2 ((KEY), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
#define INTEGER_COMPARE(X, Y, RESULT) do { \
|
||||
(RESULT) = X - Y; \
|
||||
} while (0)
|
||||
#define return_INTEGER_COMPARE(X, Y) do { \
|
||||
int _result_; \
|
||||
INTEGER_COMPARE (X, Y, _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
/* hash and comparison macros for address keys. */
|
||||
|
||||
#define ADDRESS_HASH_1(KEY, RESULT) INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3, (RESULT))
|
||||
#define ADDRESS_HASH_2(KEY, RESULT) INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3, (RESULT))
|
||||
#define ADDRESS_COMPARE(X, Y, RESULT) INTEGER_COMPARE ((X), (Y), (RESULT))
|
||||
#define return_ADDRESS_HASH_1(KEY) return_INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3)
|
||||
#define return_ADDRESS_HASH_2(KEY) return_INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3)
|
||||
#define return_ADDRESS_COMPARE(X, Y) return_INTEGER_COMPARE ((X), (Y))
|
||||
|
||||
#endif /* not _hash_h_ */
|
||||
@@ -1,3 +0,0 @@
|
||||
*.mo *.pot
|
||||
|
||||
Makefile.in Makefile
|
||||
@@ -1,75 +0,0 @@
|
||||
# Makefile for PO directories.
|
||||
# François Pinard <pinard@iro.umontreal.ca>, 1998.
|
||||
|
||||
AUTOMAKE_OPTIONS = gnits
|
||||
|
||||
localedir = $(prefix)/share/locale
|
||||
|
||||
ALL_POFILES = @ALL_POFILES@
|
||||
ALL_MOFILES = @ALL_MOFILES@
|
||||
MOFILES = @MOFILES@
|
||||
|
||||
EXTRA_DIST = $(PACKAGE).pot $(ALL_POFILES) $(ALL_MOFILES)
|
||||
|
||||
MSGFMT = msgfmt
|
||||
MSGMERGE = msgmerge
|
||||
XGETTEXT = xgettext
|
||||
|
||||
SUFFIXES = .po .pox .mo
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.mo \
|
||||
&& rm -f $$file && $(MSGFMT) -o $$file $<
|
||||
|
||||
all: $(ALL_MOFILES)
|
||||
|
||||
install-data-local: $(MOFILES)
|
||||
if USE_NLS
|
||||
files='$(MOFILES)'; \
|
||||
for file in $$files; do \
|
||||
base=`basename $$file`; \
|
||||
langdir=$(DESTDIR)$(localedir)/`echo $$base | sed 's/\.mo$$//'`/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $$langdir; \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$file $$langdir/$(PACKAGE).mo"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file $$langdir/$(PACKAGE).mo; \
|
||||
done
|
||||
endif
|
||||
|
||||
uninstall-local:
|
||||
if USE_NLS
|
||||
files='$(MOFILES)'; \
|
||||
for file in $$files; do \
|
||||
base=`basename $$file`; \
|
||||
langdir=$(DESTDIR)$(localedir)/`echo $$base | sed 's/\.mo$$//'`/LC_MESSAGES; \
|
||||
rm -f $$langdir/$(PACKAGE).mo; \
|
||||
done
|
||||
endif
|
||||
|
||||
MAINTAINER_CLEAN = $(PACKAGE).pot $(MOFILES)
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(top_srcdir)/stamp-pot
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ `cat $(top_srcdir)/stamp-pot`
|
||||
test ! -f $(PACKAGE).po || ( rm -f $@ && mv $(PACKAGE).po $@ )
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
files='$(ALL_MOFILES)'; \
|
||||
for file in $$files; do \
|
||||
base=`basename $$file`; \
|
||||
lang=`echo $$base | sed 's/\.mo$$//'`; \
|
||||
mv $(srcdir)/$$lang.po $(srcdir)/$$lang.old.po; \
|
||||
echo "$$lang:"; \
|
||||
cd $(srcdir) \
|
||||
&& if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
else \
|
||||
echo "msgmerge for $$file failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
fi; \
|
||||
done
|
||||
1772
i18n/de.po
1772
i18n/de.po
File diff suppressed because it is too large
Load Diff
1932
i18n/es.po
1932
i18n/es.po
File diff suppressed because it is too large
Load Diff
1445
i18n/fr.po
1445
i18n/fr.po
File diff suppressed because it is too large
Load Diff
1445
i18n/ko.po
1445
i18n/ko.po
File diff suppressed because it is too large
Load Diff
1441
i18n/nl.po
1441
i18n/nl.po
File diff suppressed because it is too large
Load Diff
1467
i18n/pl.po
1467
i18n/pl.po
File diff suppressed because it is too large
Load Diff
1424
i18n/ru.po
1424
i18n/ru.po
File diff suppressed because it is too large
Load Diff
1235
implicit.c
1235
implicit.c
File diff suppressed because it is too large
Load Diff
168
job.h
168
job.h
@@ -1,83 +1,159 @@
|
||||
/* 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.
|
||||
|
||||
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 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.
|
||||
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. */
|
||||
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 SEEN_JOB_H
|
||||
#define SEEN_JOB_H
|
||||
#include "output.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. */
|
||||
|
||||
struct child
|
||||
{
|
||||
struct child *next; /* Link in the chain. */
|
||||
struct child *next; /* Link in the chain. */
|
||||
|
||||
struct file *file; /* File being remade. */
|
||||
struct file *file; /* File being remade. */
|
||||
|
||||
char **environment; /* Environment for commands. */
|
||||
|
||||
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]. */
|
||||
|
||||
pid_t pid; /* Child process's ID number. */
|
||||
#ifdef VMS
|
||||
int efn; /* Completion event flag number */
|
||||
int cstatus; /* Completion status */
|
||||
#endif
|
||||
char **environment; /* Environment for commands. */
|
||||
char *sh_batch_file; /* Script file for shell commands */
|
||||
unsigned int remote:1; /* Nonzero if executing remotely. */
|
||||
char **command_lines; /* Array of variable-expanded cmd lines. */
|
||||
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
||||
|
||||
unsigned int noerror:1; /* Nonzero if commands contained a `-'. */
|
||||
#ifdef VMS
|
||||
char *comname; /* Temporary command file name */
|
||||
int efn; /* Completion event flag number */
|
||||
int cstatus; /* Completion status */
|
||||
int vms_launch_status; /* non-zero if lib$spawn, etc failed */
|
||||
#endif
|
||||
|
||||
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 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 noerror:1; /* Nonzero if commands contained a '-'. */
|
||||
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 recursive:1; /* Nonzero for recursive command ('+' etc.) */
|
||||
unsigned int dontcare:1; /* Saved dontcare flag. */
|
||||
};
|
||||
|
||||
extern struct child *children;
|
||||
|
||||
extern void new_job PARAMS ((struct file *file));
|
||||
extern void reap_children PARAMS ((int block, int err));
|
||||
extern void start_waiting_jobs PARAMS ((void));
|
||||
/* A signal handler for SIGCHLD, if needed. */
|
||||
RETSIGTYPE child_handler (int sig);
|
||||
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
|
||||
extern int child_execute_job PARAMS ((char *argv, struct child *child));
|
||||
int child_execute_job (struct child *child, char *argv);
|
||||
#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
|
||||
|
||||
#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
|
||||
extern void exec_command PARAMS ((char **argv, char **envp));
|
||||
void exec_command (char **argv, char **envp) __attribute__ ((noreturn));
|
||||
#endif
|
||||
|
||||
extern unsigned int job_slots_used;
|
||||
|
||||
extern void block_sigs PARAMS ((void));
|
||||
void block_sigs (void);
|
||||
#ifdef POSIX
|
||||
extern void unblock_sigs PARAMS ((void));
|
||||
void unblock_sigs (void);
|
||||
#else
|
||||
#ifdef HAVE_SIGSETMASK
|
||||
#ifdef HAVE_SIGSETMASK
|
||||
extern int fatal_signal_mask;
|
||||
#define unblock_sigs() sigsetmask (0)
|
||||
#define unblock_sigs() sigsetmask (0)
|
||||
#else
|
||||
#define unblock_sigs()
|
||||
#define unblock_sigs()
|
||||
#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 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 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 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 */
|
||||
82
loadapi.c
Normal file
82
loadapi.c
Normal file
@@ -0,0 +1,82 @@
|
||||
/* 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 *gfloc)
|
||||
{
|
||||
/* Preserve existing variable buffer context. */
|
||||
char *pbuf;
|
||||
unsigned int plen;
|
||||
char *s;
|
||||
floc fl;
|
||||
floc *flp;
|
||||
|
||||
if (gfloc)
|
||||
{
|
||||
fl.filenm = gfloc->filenm;
|
||||
fl.lineno = gfloc->lineno;
|
||||
fl.offset = 0;
|
||||
flp = &fl;
|
||||
}
|
||||
else
|
||||
flp = NULL;
|
||||
|
||||
install_variable_buffer (&pbuf, &plen);
|
||||
|
||||
s = xstrdup (buffer);
|
||||
eval_buffer (s, flp);
|
||||
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;
|
||||
}
|
||||
386
maintMakefile
386
maintMakefile
@@ -1,21 +1,47 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
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!
|
||||
#
|
||||
globsrc := $(wildcard glob/*.c)
|
||||
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
|
||||
MTEMPLATES = Makefile.DOS SMakefile
|
||||
|
||||
# We need this to ensure that README and build.sh.in are created on time to
|
||||
# avoid errors by automake.
|
||||
#
|
||||
#Makefile.in: README build.sh.in
|
||||
# These are built as a side-effect of the dist rule
|
||||
#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
|
||||
|
||||
# Create preprocessor output files--GCC specific!
|
||||
%.i : %.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
|
||||
|
||||
# General rule for turning a .template into a regular file.
|
||||
#
|
||||
@@ -52,40 +78,332 @@ NMakefile: NMakefile.template .dep_segment Makefile
|
||||
#
|
||||
build.sh.in: build.template Makefile
|
||||
rm -f $@
|
||||
sed -e 's@%objs%@$(filter-out remote-%,$(make_OBJECTS)@g' \
|
||||
-e 's@%globobjs%@$(patsubst %.c,%.o,$(globsrc)))@g' \
|
||||
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
|
||||
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
|
||||
$< > $@
|
||||
chmod a-w+x $@
|
||||
|
||||
|
||||
# Use automake to build a dependency list file, for "foreign" makefiles like
|
||||
# Makefile.DOS.
|
||||
#
|
||||
# Automake used to have a --generate-deps flag, but it's gone now, so we have
|
||||
# to do it ourselves.
|
||||
#
|
||||
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
|
||||
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
||||
$(AUTOMAKE) --generate-deps --build-dir=. --srcdir-name=.
|
||||
rm -f $@
|
||||
(for f in $(DEPDIR)/*.Po; do \
|
||||
echo ""; \
|
||||
echo "# $$f"; \
|
||||
sed -e '/^[^:]*\.[ch] *:/d' \
|
||||
-e 's, /usr/[^ ]*,,g' \
|
||||
-e 's, $(srcdir)/, ,g' \
|
||||
-e '/^ *\\$$/d' \
|
||||
-e '/^ *$$/d' \
|
||||
< $$f; \
|
||||
done) > $@
|
||||
|
||||
# We clean everything here. The GNU standards for makefile conventions say
|
||||
# you shouldn't remove configure, etc., but this makefile is only available
|
||||
# in a full development distribution, so they'll only be removed then.
|
||||
# Cleaning
|
||||
|
||||
GIT := git
|
||||
|
||||
# git-clean: Clean all "ignored" files. Leave untracked files.
|
||||
# git-very-clean: Clean all files that aren't stored in source control.
|
||||
|
||||
.PHONY: git-clean git-very-clean
|
||||
git-clean:
|
||||
-$(GIT) clean -fdX
|
||||
git-very-clean: git-clean
|
||||
-$(GIT) clean -fd
|
||||
|
||||
|
||||
|
||||
## ---------------------- ##
|
||||
## Generating ChangeLog. ##
|
||||
## ---------------------- ##
|
||||
|
||||
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. ##
|
||||
## ---------------- ##
|
||||
|
||||
WGET = wget --passive-ftp -np -nv
|
||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||
|
||||
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
||||
echo $(target) is unchanged; rm -f $(target).t; \
|
||||
else \
|
||||
mv -f $(target).t $(target); \
|
||||
fi
|
||||
|
||||
# ------------------- #
|
||||
# Updating PO files. #
|
||||
# ------------------- #
|
||||
|
||||
# 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
|
||||
do-po-update:
|
||||
tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
|
||||
&& rm -rf "$$tmppo" \
|
||||
&& mkdir "$$tmppo" \
|
||||
&& (cd "$$tmppo" \
|
||||
&& $(WGET) $(po_wget_flags) -A '*.po' $(po_repo)) \
|
||||
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
|
||||
&& rm -rf "$$tmppo"
|
||||
cd po && $(MAKE) update-po
|
||||
$(MAKE) po-check
|
||||
|
||||
po-update:
|
||||
[ -d "po" ] && $(MAKE) do-po-update
|
||||
|
||||
# -------------------------- #
|
||||
# Updating GNU build files. #
|
||||
# -------------------------- #
|
||||
|
||||
# The following pseudo table associates a local directory and a URL
|
||||
# with each of the files that belongs to some other package and is
|
||||
# regularly updated from the specified URL.
|
||||
|
||||
cvs-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||
git-url = http://git.savannah.gnu.org/cgit
|
||||
target = $(patsubst get-%,%,$@)
|
||||
|
||||
config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
|
||||
get-config/config.guess get-config/config.sub:
|
||||
@echo $(WGET) $(config-url) -O $(target) \
|
||||
&& $(WGET) $(config-url) -O $(target).t \
|
||||
&& $(move_if_change)
|
||||
|
||||
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-config/%,%,$@)
|
||||
get-config/texinfo.tex:
|
||||
@echo $(WGET) $(gnulib-url) -O $(target) \
|
||||
&& $(WGET) $(gnulib-url) -O $(target).t \
|
||||
&& $(move_if_change)
|
||||
|
||||
gnustandards-url = $(cvs-url)/gnustandards/gnustandards/$(patsubst get-doc/%,%,$@)
|
||||
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
|
||||
|
||||
|
||||
# --------------------- #
|
||||
# Updating everything. #
|
||||
# --------------------- #
|
||||
|
||||
.PHONY: update
|
||||
update: po-update scm-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. ##
|
||||
## --------------- ##
|
||||
|
||||
# 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.
|
||||
local-check: po-check changelog-check
|
||||
|
||||
# copyright-check writable-files
|
||||
|
||||
changelog-check:
|
||||
if head $(top_srcdir)/ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||
# Ignore makeint.h; it defines _().
|
||||
po-check:
|
||||
if test -f po/POTFILES.in; then \
|
||||
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||
$(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; \
|
||||
rm -f $@-1 $@-2; \
|
||||
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.
|
||||
#
|
||||
# And _I_ want them to be removed ;)
|
||||
# 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.
|
||||
#
|
||||
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
|
||||
|
||||
MAINTAINERCLEANFILES = $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
|
||||
missing build.sh.in .dep_segment
|
||||
|
||||
# Put the alpha distribution files up for anonymous FTP.
|
||||
# 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.
|
||||
#
|
||||
ALPHA := ~ftp/gnu
|
||||
TARFILE := $(distdir).tar.gz
|
||||
|
||||
.PHONY: alpha
|
||||
alpha: $(ALPHA) $(TARFILE)
|
||||
@rm -f $(ALPHA)/$(TARFILE)
|
||||
cp -p $(TARFILE) $(ALPHA)
|
||||
|
||||
# This is needed because normal builds with GCC don't compile alloca.c, so
|
||||
# alloca.P doesn't get built :-/.
|
||||
#
|
||||
.deps/alloca.P: alloca.c
|
||||
$(COMPILE) -M -o $@ $<
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
916
make-stds.texi
916
make-stds.texi
@@ -1,916 +0,0 @@
|
||||
@comment This file is included by both standards.texi and make.texinfo.
|
||||
@comment It was broken out of standards.texi on 1/6/93 by roland.
|
||||
|
||||
@node Makefile Conventions
|
||||
@chapter Makefile Conventions
|
||||
@comment standards.texi does not print an index, but make.texinfo does.
|
||||
@cindex makefile, conventions for
|
||||
@cindex conventions for makefiles
|
||||
@cindex standards for makefiles
|
||||
|
||||
This
|
||||
@ifinfo
|
||||
node
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@ifset CODESTD
|
||||
section
|
||||
@end ifset
|
||||
@ifclear CODESTD
|
||||
chapter
|
||||
@end ifclear
|
||||
@end iftex
|
||||
describes conventions for writing the Makefiles for GNU programs.
|
||||
Using Automake will help you write a Makefile that follows these
|
||||
conventions.
|
||||
|
||||
@menu
|
||||
* Makefile Basics:: General Conventions for Makefiles
|
||||
* Utilities in Makefiles:: Utilities in Makefiles
|
||||
* Command Variables:: Variables for Specifying Commands
|
||||
* Directory Variables:: Variables for Installation Directories
|
||||
* Standard Targets:: Standard Targets for Users
|
||||
* Install Command Categories:: Three categories of commands in the `install'
|
||||
rule: normal, pre-install and post-install.
|
||||
@end menu
|
||||
|
||||
@node Makefile Basics
|
||||
@section General Conventions for Makefiles
|
||||
|
||||
Every Makefile should contain this line:
|
||||
|
||||
@example
|
||||
SHELL = /bin/sh
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
to avoid trouble on systems where the @code{SHELL} variable might be
|
||||
inherited from the environment. (This is never a problem with GNU
|
||||
@code{make}.)
|
||||
|
||||
Different @code{make} programs have incompatible suffix lists and
|
||||
implicit rules, and this sometimes creates confusion or misbehavior. So
|
||||
it is a good idea to set the suffix list explicitly using only the
|
||||
suffixes you need in the particular Makefile, like this:
|
||||
|
||||
@example
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
The first line clears out the suffix list, the second introduces all
|
||||
suffixes which may be subject to implicit rules in this Makefile.
|
||||
|
||||
Don't assume that @file{.} is in the path for command execution. When
|
||||
you need to run programs that are a part of your package during the
|
||||
make, please make sure that it uses @file{./} if the program is built as
|
||||
part of the make or @file{$(srcdir)/} if the file is an unchanging part
|
||||
of the source code. Without one of these prefixes, the current search
|
||||
path is used.
|
||||
|
||||
The distinction between @file{./} (the @dfn{build directory}) and
|
||||
@file{$(srcdir)/} (the @dfn{source directory}) is important because
|
||||
users can build in a separate directory using the @samp{--srcdir} option
|
||||
to @file{configure}. A rule of the form:
|
||||
|
||||
@smallexample
|
||||
foo.1 : foo.man sedscript
|
||||
sed -e sedscript foo.man > foo.1
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
will fail when the build directory is not the source directory, because
|
||||
@file{foo.man} and @file{sedscript} are in the the source directory.
|
||||
|
||||
When using GNU @code{make}, relying on @samp{VPATH} to find the source
|
||||
file will work in the case where there is a single dependency file,
|
||||
since the @code{make} automatic variable @samp{$<} will represent the
|
||||
source file wherever it is. (Many versions of @code{make} set @samp{$<}
|
||||
only in implicit rules.) A Makefile target like
|
||||
|
||||
@smallexample
|
||||
foo.o : bar.c
|
||||
$(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
should instead be written as
|
||||
|
||||
@smallexample
|
||||
foo.o : bar.c
|
||||
$(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@@
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
in order to allow @samp{VPATH} to work correctly. When the target has
|
||||
multiple dependencies, using an explicit @samp{$(srcdir)} is the easiest
|
||||
way to make the rule work well. For example, the target above for
|
||||
@file{foo.1} is best written as:
|
||||
|
||||
@smallexample
|
||||
foo.1 : foo.man sedscript
|
||||
sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@
|
||||
@end smallexample
|
||||
|
||||
GNU distributions usually contain some files which are not source
|
||||
files---for example, Info files, and the output from Autoconf, Automake,
|
||||
Bison or Flex. Since these files normally appear in the source
|
||||
directory, they should always appear in the source directory, not in the
|
||||
build directory. So Makefile rules to update them should put the
|
||||
updated files in the source directory.
|
||||
|
||||
However, if a file does not appear in the distribution, then the
|
||||
Makefile should not put it in the source directory, because building a
|
||||
program in ordinary circumstances should not modify the source directory
|
||||
in any way.
|
||||
|
||||
Try to make the build and installation targets, at least (and all their
|
||||
subtargets) work correctly with a parallel @code{make}.
|
||||
|
||||
@node Utilities in Makefiles
|
||||
@section Utilities in Makefiles
|
||||
|
||||
Write the Makefile commands (and any shell scripts, such as
|
||||
@code{configure}) to run in @code{sh}, not in @code{csh}. Don't use any
|
||||
special features of @code{ksh} or @code{bash}.
|
||||
|
||||
The @code{configure} script and the Makefile rules for building and
|
||||
installation should not use any utilities directly except these:
|
||||
|
||||
@c dd find
|
||||
@c gunzip gzip md5sum
|
||||
@c mkfifo mknod tee uname
|
||||
|
||||
@example
|
||||
cat cmp cp diff echo egrep expr false grep install-info
|
||||
ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true
|
||||
@end example
|
||||
|
||||
The compression program @code{gzip} can be used in the @code{dist} rule.
|
||||
|
||||
Stick to the generally supported options for these programs. For
|
||||
example, don't use @samp{mkdir -p}, convenient as it may be, because
|
||||
most systems don't support it.
|
||||
|
||||
It is a good idea to avoid creating symbolic links in makefiles, since a
|
||||
few systems don't support them.
|
||||
|
||||
The Makefile rules for building and installation can also use compilers
|
||||
and related programs, but should do so via @code{make} variables so that the
|
||||
user can substitute alternatives. Here are some of the programs we
|
||||
mean:
|
||||
|
||||
@example
|
||||
ar bison cc flex install ld ldconfig lex
|
||||
make makeinfo ranlib texi2dvi yacc
|
||||
@end example
|
||||
|
||||
Use the following @code{make} variables to run those programs:
|
||||
|
||||
@example
|
||||
$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX)
|
||||
$(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
|
||||
@end example
|
||||
|
||||
When you use @code{ranlib} or @code{ldconfig}, you should make sure
|
||||
nothing bad happens if the system does not have the program in question.
|
||||
Arrange to ignore an error from that command, and print a message before
|
||||
the command to tell the user that failure of this command does not mean
|
||||
a problem. (The Autoconf @samp{AC_PROG_RANLIB} macro can help with
|
||||
this.)
|
||||
|
||||
If you use symbolic links, you should implement a fallback for systems
|
||||
that don't have symbolic links.
|
||||
|
||||
Additional utilities that can be used via Make variables are:
|
||||
|
||||
@example
|
||||
chgrp chmod chown mknod
|
||||
@end example
|
||||
|
||||
It is ok to use other utilities in Makefile portions (or scripts)
|
||||
intended only for particular systems where you know those utilities
|
||||
exist.
|
||||
|
||||
@node Command Variables
|
||||
@section Variables for Specifying Commands
|
||||
|
||||
Makefiles should provide variables for overriding certain commands, options,
|
||||
and so on.
|
||||
|
||||
In particular, you should run most utility programs via variables.
|
||||
Thus, if you use Bison, have a variable named @code{BISON} whose default
|
||||
value is set with @samp{BISON = bison}, and refer to it with
|
||||
@code{$(BISON)} whenever you need to use Bison.
|
||||
|
||||
File management utilities such as @code{ln}, @code{rm}, @code{mv}, and
|
||||
so on, need not be referred to through variables in this way, since users
|
||||
don't need to replace them with other programs.
|
||||
|
||||
Each program-name variable should come with an options variable that is
|
||||
used to supply options to the program. Append @samp{FLAGS} to the
|
||||
program-name variable name to get the options variable name---for
|
||||
example, @code{BISONFLAGS}. (The names @code{CFLAGS} for the C
|
||||
compiler, @code{YFLAGS} for yacc, and @code{LFLAGS} for lex, are
|
||||
exceptions to this rule, but we keep them because they are standard.)
|
||||
Use @code{CPPFLAGS} in any compilation command that runs the
|
||||
preprocessor, and use @code{LDFLAGS} in any compilation command that
|
||||
does linking as well as in any direct use of @code{ld}.
|
||||
|
||||
If there are C compiler options that @emph{must} be used for proper
|
||||
compilation of certain files, do not include them in @code{CFLAGS}.
|
||||
Users expect to be able to specify @code{CFLAGS} freely themselves.
|
||||
Instead, arrange to pass the necessary options to the C compiler
|
||||
independently of @code{CFLAGS}, by writing them explicitly in the
|
||||
compilation commands or by defining an implicit rule, like this:
|
||||
|
||||
@smallexample
|
||||
CFLAGS = -g
|
||||
ALL_CFLAGS = -I. $(CFLAGS)
|
||||
.c.o:
|
||||
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
|
||||
@end smallexample
|
||||
|
||||
Do include the @samp{-g} option in @code{CFLAGS}, because that is not
|
||||
@emph{required} for proper compilation. You can consider it a default
|
||||
that is only recommended. If the package is set up so that it is
|
||||
compiled with GCC by default, then you might as well include @samp{-O}
|
||||
in the default value of @code{CFLAGS} as well.
|
||||
|
||||
Put @code{CFLAGS} last in the compilation command, after other variables
|
||||
containing compiler options, so the user can use @code{CFLAGS} to
|
||||
override the others.
|
||||
|
||||
@code{CFLAGS} should be used in every invocation of the C compiler,
|
||||
both those which do compilation and those which do linking.
|
||||
|
||||
Every Makefile should define the variable @code{INSTALL}, which is the
|
||||
basic command for installing a file into the system.
|
||||
|
||||
Every Makefile should also define the variables @code{INSTALL_PROGRAM}
|
||||
and @code{INSTALL_DATA}. (The default for each of these should be
|
||||
@code{$(INSTALL)}.) Then it should use those variables as the commands
|
||||
for actual installation, for executables and nonexecutables
|
||||
respectively. Use these variables as follows:
|
||||
|
||||
@example
|
||||
$(INSTALL_PROGRAM) foo $(bindir)/foo
|
||||
$(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
|
||||
@end example
|
||||
|
||||
Optionally, you may prepend the value of @code{DESTDIR} to the target
|
||||
filename. Doing this allows the installer to create a snapshot of the
|
||||
installation to be copied onto the real target filesystem later. Do not
|
||||
set the value of @code{DESTDIR} in your Makefile, and do not include it
|
||||
in any installed files. With support for @code{DESTDIR}, the above
|
||||
examples become:
|
||||
|
||||
@example
|
||||
$(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo
|
||||
$(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Always use a file name, not a directory name, as the second argument of
|
||||
the installation commands. Use a separate command for each file to be
|
||||
installed.
|
||||
|
||||
@node Directory Variables
|
||||
@section Variables for Installation Directories
|
||||
|
||||
Installation directories should always be named by variables, so it is
|
||||
easy to install in a nonstandard place. The standard names for these
|
||||
variables are described below. They are based on a standard filesystem
|
||||
layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
|
||||
other modern operating systems.
|
||||
|
||||
These two variables set the root for the installation. All the other
|
||||
installation directories should be subdirectories of one of these two,
|
||||
and nothing should be directly installed into these two directories.
|
||||
|
||||
@table @samp
|
||||
@item prefix
|
||||
A prefix used in constructing the default values of the variables listed
|
||||
below. The default value of @code{prefix} should be @file{/usr/local}.
|
||||
When building the complete GNU system, the prefix will be empty and
|
||||
@file{/usr} will be a symbolic link to @file{/}.
|
||||
(If you are using Autoconf, write it as @samp{@@prefix@@}.)
|
||||
|
||||
Running @samp{make install} with a different value of @code{prefix}
|
||||
from the one used to build the program should @var{not} recompile
|
||||
the program.
|
||||
|
||||
@item exec_prefix
|
||||
A prefix used in constructing the default values of some of the
|
||||
variables listed below. The default value of @code{exec_prefix} should
|
||||
be @code{$(prefix)}.
|
||||
(If you are using Autoconf, write it as @samp{@@exec_prefix@@}.)
|
||||
|
||||
Generally, @code{$(exec_prefix)} is used for directories that contain
|
||||
machine-specific files (such as executables and subroutine libraries),
|
||||
while @code{$(prefix)} is used directly for other directories.
|
||||
|
||||
Running @samp{make install} with a different value of @code{exec_prefix}
|
||||
from the one used to build the program should @var{not} recompile the
|
||||
program.
|
||||
@end table
|
||||
|
||||
Executable programs are installed in one of the following directories.
|
||||
|
||||
@table @samp
|
||||
@item bindir
|
||||
The directory for installing executable programs that users can run.
|
||||
This should normally be @file{/usr/local/bin}, but write it as
|
||||
@file{$(exec_prefix)/bin}.
|
||||
(If you are using Autoconf, write it as @samp{@@bindir@@}.)
|
||||
|
||||
@item sbindir
|
||||
The directory for installing executable programs that can be run from
|
||||
the shell, but are only generally useful to system administrators. This
|
||||
should normally be @file{/usr/local/sbin}, but write it as
|
||||
@file{$(exec_prefix)/sbin}.
|
||||
(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
|
||||
|
||||
@item libexecdir
|
||||
@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
|
||||
The directory for installing executable programs to be run by other
|
||||
programs rather than by users. This directory should normally be
|
||||
@file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}.
|
||||
(If you are using Autoconf, write it as @samp{@@libexecdir@@}.)
|
||||
@end table
|
||||
|
||||
Data files used by the program during its execution are divided into
|
||||
categories in two ways.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Some files are normally modified by programs; others are never normally
|
||||
modified (though users may edit some of these).
|
||||
|
||||
@item
|
||||
Some files are architecture-independent and can be shared by all
|
||||
machines at a site; some are architecture-dependent and can be shared
|
||||
only by machines of the same kind and operating system; others may never
|
||||
be shared between two machines.
|
||||
@end itemize
|
||||
|
||||
This makes for six different possibilities. However, we want to
|
||||
discourage the use of architecture-dependent files, aside from object
|
||||
files and libraries. It is much cleaner to make other data files
|
||||
architecture-independent, and it is generally not hard.
|
||||
|
||||
Therefore, here are the variables Makefiles should use to specify
|
||||
directories:
|
||||
|
||||
@table @samp
|
||||
@item datadir
|
||||
The directory for installing read-only architecture independent data
|
||||
files. This should normally be @file{/usr/local/share}, but write it as
|
||||
@file{$(prefix)/share}.
|
||||
(If you are using Autoconf, write it as @samp{@@datadir@@}.)
|
||||
As a special exception, see @file{$(infodir)}
|
||||
and @file{$(includedir)} below.
|
||||
|
||||
@item sysconfdir
|
||||
The directory for installing read-only data files that pertain to a
|
||||
single machine--that is to say, files for configuring a host. Mailer
|
||||
and network configuration files, @file{/etc/passwd}, and so forth belong
|
||||
here. All the files in this directory should be ordinary ASCII text
|
||||
files. This directory should normally be @file{/usr/local/etc}, but
|
||||
write it as @file{$(prefix)/etc}.
|
||||
(If you are using Autoconf, write it as @samp{@@sysconfdir@@}.)
|
||||
|
||||
Do not install executables here in this directory (they probably belong
|
||||
in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not install
|
||||
files that are modified in the normal course of their use (programs
|
||||
whose purpose is to change the configuration of the system excluded).
|
||||
Those probably belong in @file{$(localstatedir)}.
|
||||
|
||||
@item sharedstatedir
|
||||
The directory for installing architecture-independent data files which
|
||||
the programs modify while they run. This should normally be
|
||||
@file{/usr/local/com}, but write it as @file{$(prefix)/com}.
|
||||
(If you are using Autoconf, write it as @samp{@@sharedstatedir@@}.)
|
||||
|
||||
@item localstatedir
|
||||
The directory for installing data files which the programs modify while
|
||||
they run, and that pertain to one specific machine. Users should never
|
||||
need to modify files in this directory to configure the package's
|
||||
operation; put such configuration information in separate files that go
|
||||
in @file{$(datadir)} or @file{$(sysconfdir)}. @file{$(localstatedir)}
|
||||
should normally be @file{/usr/local/var}, but write it as
|
||||
@file{$(prefix)/var}.
|
||||
(If you are using Autoconf, write it as @samp{@@localstatedir@@}.)
|
||||
|
||||
@item libdir
|
||||
The directory for object files and libraries of object code. Do not
|
||||
install executables here, they probably ought to go in @file{$(libexecdir)}
|
||||
instead. The value of @code{libdir} should normally be
|
||||
@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}.
|
||||
(If you are using Autoconf, write it as @samp{@@libdir@@}.)
|
||||
|
||||
@item infodir
|
||||
The directory for installing the Info files for this package. By
|
||||
default, it should be @file{/usr/local/info}, but it should be written
|
||||
as @file{$(prefix)/info}.
|
||||
(If you are using Autoconf, write it as @samp{@@infodir@@}.)
|
||||
|
||||
@item lispdir
|
||||
The directory for installing any Emacs Lisp files in this package. By
|
||||
default, it should be @file{/usr/local/share/emacs/site-lisp}, but it
|
||||
should be written as @file{$(prefix)/share/emacs/site-lisp}.
|
||||
|
||||
If you are using Autoconf, write the default as @samp{@@lispdir@@}.
|
||||
In order to make @samp{@@lispdir@@} work, you need the following lines
|
||||
in your @file{configure.in} file:
|
||||
|
||||
@example
|
||||
lispdir='$@{datadir@}/emacs/site-lisp'
|
||||
AC_SUBST(lispdir)
|
||||
@end example
|
||||
|
||||
@item includedir
|
||||
@c rewritten to avoid overfull hbox --roland
|
||||
The directory for installing header files to be included by user
|
||||
programs with the C @samp{#include} preprocessor directive. This
|
||||
should normally be @file{/usr/local/include}, but write it as
|
||||
@file{$(prefix)/include}.
|
||||
(If you are using Autoconf, write it as @samp{@@includedir@@}.)
|
||||
|
||||
Most compilers other than GCC do not look for header files in directory
|
||||
@file{/usr/local/include}. So installing the header files this way is
|
||||
only useful with GCC. Sometimes this is not a problem because some
|
||||
libraries are only really intended to work with GCC. But some libraries
|
||||
are intended to work with other compilers. They should install their
|
||||
header files in two places, one specified by @code{includedir} and one
|
||||
specified by @code{oldincludedir}.
|
||||
|
||||
@item oldincludedir
|
||||
The directory for installing @samp{#include} header files for use with
|
||||
compilers other than GCC. This should normally be @file{/usr/include}.
|
||||
(If you are using Autoconf, you can write it as @samp{@@oldincludedir@@}.)
|
||||
|
||||
The Makefile commands should check whether the value of
|
||||
@code{oldincludedir} is empty. If it is, they should not try to use
|
||||
it; they should cancel the second installation of the header files.
|
||||
|
||||
A package should not replace an existing header in this directory unless
|
||||
the header came from the same package. Thus, if your Foo package
|
||||
provides a header file @file{foo.h}, then it should install the header
|
||||
file in the @code{oldincludedir} directory if either (1) there is no
|
||||
@file{foo.h} there or (2) the @file{foo.h} that exists came from the Foo
|
||||
package.
|
||||
|
||||
To tell whether @file{foo.h} came from the Foo package, put a magic
|
||||
string in the file---part of a comment---and @code{grep} for that string.
|
||||
@end table
|
||||
|
||||
Unix-style man pages are installed in one of the following:
|
||||
|
||||
@table @samp
|
||||
@item mandir
|
||||
The top-level directory for installing the man pages (if any) for this
|
||||
package. It will normally be @file{/usr/local/man}, but you should
|
||||
write it as @file{$(prefix)/man}.
|
||||
(If you are using Autoconf, write it as @samp{@@mandir@@}.)
|
||||
|
||||
@item man1dir
|
||||
The directory for installing section 1 man pages. Write it as
|
||||
@file{$(mandir)/man1}.
|
||||
@item man2dir
|
||||
The directory for installing section 2 man pages. Write it as
|
||||
@file{$(mandir)/man2}
|
||||
@item @dots{}
|
||||
|
||||
@strong{Don't make the primary documentation for any GNU software be a
|
||||
man page. Write a manual in Texinfo instead. Man pages are just for
|
||||
the sake of people running GNU software on Unix, which is a secondary
|
||||
application only.}
|
||||
|
||||
@item manext
|
||||
The file name extension for the installed man page. This should contain
|
||||
a period followed by the appropriate digit; it should normally be @samp{.1}.
|
||||
|
||||
@item man1ext
|
||||
The file name extension for installed section 1 man pages.
|
||||
@item man2ext
|
||||
The file name extension for installed section 2 man pages.
|
||||
@item @dots{}
|
||||
Use these names instead of @samp{manext} if the package needs to install man
|
||||
pages in more than one section of the manual.
|
||||
@end table
|
||||
|
||||
And finally, you should set the following variable:
|
||||
|
||||
@table @samp
|
||||
@item srcdir
|
||||
The directory for the sources being compiled. The value of this
|
||||
variable is normally inserted by the @code{configure} shell script.
|
||||
(If you are using Autconf, use @samp{srcdir = @@srcdir@@}.)
|
||||
@end table
|
||||
|
||||
For example:
|
||||
|
||||
@smallexample
|
||||
@c I have changed some of the comments here slightly to fix an overfull
|
||||
@c hbox, so the make manual can format correctly. --roland
|
||||
# Common prefix for installation directories.
|
||||
# NOTE: This directory must exist when you start the install.
|
||||
prefix = /usr/local
|
||||
exec_prefix = $(prefix)
|
||||
# Where to put the executable for the command `gcc'.
|
||||
bindir = $(exec_prefix)/bin
|
||||
# Where to put the directories used by the compiler.
|
||||
libexecdir = $(exec_prefix)/libexec
|
||||
# Where to put the Info files.
|
||||
infodir = $(prefix)/info
|
||||
@end smallexample
|
||||
|
||||
If your program installs a large number of files into one of the
|
||||
standard user-specified directories, it might be useful to group them
|
||||
into a subdirectory particular to that program. If you do this, you
|
||||
should write the @code{install} rule to create these subdirectories.
|
||||
|
||||
Do not expect the user to include the subdirectory name in the value of
|
||||
any of the variables listed above. The idea of having a uniform set of
|
||||
variable names for installation directories is to enable the user to
|
||||
specify the exact same values for several different GNU packages. In
|
||||
order for this to be useful, all the packages must be designed so that
|
||||
they will work sensibly when the user does so.
|
||||
|
||||
@node Standard Targets
|
||||
@section Standard Targets for Users
|
||||
|
||||
All GNU programs should have the following targets in their Makefiles:
|
||||
|
||||
@table @samp
|
||||
@item all
|
||||
Compile the entire program. This should be the default target. This
|
||||
target need not rebuild any documentation files; Info files should
|
||||
normally be included in the distribution, and DVI files should be made
|
||||
only when explicitly asked for.
|
||||
|
||||
By default, the Make rules should compile and link with @samp{-g}, so
|
||||
that executable programs have debugging symbols. Users who don't mind
|
||||
being helpless can strip the executables later if they wish.
|
||||
|
||||
@item install
|
||||
Compile the program and copy the executables, libraries, and so on to
|
||||
the file names where they should reside for actual use. If there is a
|
||||
simple test to verify that a program is properly installed, this target
|
||||
should run that test.
|
||||
|
||||
Do not strip executables when installing them. Devil-may-care users can
|
||||
use the @code{install-strip} target to do that.
|
||||
|
||||
If possible, write the @code{install} target rule so that it does not
|
||||
modify anything in the directory where the program was built, provided
|
||||
@samp{make all} has just been done. This is convenient for building the
|
||||
program under one user name and installing it under another.
|
||||
|
||||
The commands should create all the directories in which files are to be
|
||||
installed, if they don't already exist. This includes the directories
|
||||
specified as the values of the variables @code{prefix} and
|
||||
@code{exec_prefix}, as well as all subdirectories that are needed.
|
||||
One way to do this is by means of an @code{installdirs} target
|
||||
as described below.
|
||||
|
||||
Use @samp{-} before any command for installing a man page, so that
|
||||
@code{make} will ignore any errors. This is in case there are systems
|
||||
that don't have the Unix man page documentation system installed.
|
||||
|
||||
The way to install Info files is to copy them into @file{$(infodir)}
|
||||
with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run
|
||||
the @code{install-info} program if it is present. @code{install-info}
|
||||
is a program that edits the Info @file{dir} file to add or update the
|
||||
menu entry for the given Info file; it is part of the Texinfo package.
|
||||
Here is a sample rule to install an Info file:
|
||||
|
||||
@comment This example has been carefully formatted for the Make manual.
|
||||
@comment Please do not reformat it without talking to roland@gnu.ai.mit.edu.
|
||||
@smallexample
|
||||
$(DESTDIR)$(infodir)/foo.info: foo.info
|
||||
$(POST_INSTALL)
|
||||
# There may be a newer info file in . than in srcdir.
|
||||
-if test -f foo.info; then d=.; \
|
||||
else d=$(srcdir); fi; \
|
||||
$(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@@; \
|
||||
# Run install-info only if it exists.
|
||||
# Use `if' instead of just prepending `-' to the
|
||||
# line so we notice real errors from install-info.
|
||||
# We use `$(SHELL) -c' because some shells do not
|
||||
# fail gracefully when there is an unknown command.
|
||||
if $(SHELL) -c 'install-info --version' \
|
||||
>/dev/null 2>&1; then \
|
||||
install-info --dir-file=$(DESTDIR)$(infodir)/dir \
|
||||
$(DESTDIR)$(infodir)/foo.info; \
|
||||
else true; fi
|
||||
@end smallexample
|
||||
|
||||
When writing the @code{install} target, you must classify all the
|
||||
commands into three categories: normal ones, @dfn{pre-installation}
|
||||
commands and @dfn{post-installation} commands. @xref{Install Command
|
||||
Categories}.
|
||||
|
||||
@item uninstall
|
||||
Delete all the installed files---the copies that the @samp{install}
|
||||
target creates.
|
||||
|
||||
This rule should not modify the directories where compilation is done,
|
||||
only the directories where files are installed.
|
||||
|
||||
The uninstallation commands are divided into three categories, just like
|
||||
the installation commands. @xref{Install Command Categories}.
|
||||
|
||||
@item install-strip
|
||||
Like @code{install}, but strip the executable files while installing
|
||||
them. In many cases, the definition of this target can be very simple:
|
||||
|
||||
@smallexample
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
|
||||
install
|
||||
@end smallexample
|
||||
|
||||
Normally we do not recommend stripping an executable unless you are sure
|
||||
the program has no bugs. However, it can be reasonable to install a
|
||||
stripped executable for actual execution while saving the unstripped
|
||||
executable elsewhere in case there is a bug.
|
||||
|
||||
@comment The gratuitous blank line here is to make the table look better
|
||||
@comment in the printed Make manual. Please leave it in.
|
||||
@item clean
|
||||
|
||||
Delete all files from the current directory that are normally created by
|
||||
building the program. Don't delete the files that record the
|
||||
configuration. Also preserve files that could be made by building, but
|
||||
normally aren't because the distribution comes with them.
|
||||
|
||||
Delete @file{.dvi} files here if they are not part of the distribution.
|
||||
|
||||
@item distclean
|
||||
Delete all files from the current directory that are created by
|
||||
configuring or building the program. If you have unpacked the source
|
||||
and built the program without creating any other files, @samp{make
|
||||
distclean} should leave only the files that were in the distribution.
|
||||
|
||||
@item mostlyclean
|
||||
Like @samp{clean}, but may refrain from deleting a few files that people
|
||||
normally don't want to recompile. For example, the @samp{mostlyclean}
|
||||
target for GCC does not delete @file{libgcc.a}, because recompiling it
|
||||
is rarely necessary and takes a lot of time.
|
||||
|
||||
@item maintainer-clean
|
||||
Delete almost everything from the current directory that can be
|
||||
reconstructed with this Makefile. This typically includes everything
|
||||
deleted by @code{distclean}, plus more: C source files produced by
|
||||
Bison, tags tables, Info files, and so on.
|
||||
|
||||
The reason we say ``almost everything'' is that running the command
|
||||
@samp{make maintainer-clean} should not delete @file{configure} even if
|
||||
@file{configure} can be remade using a rule in the Makefile. More generally,
|
||||
@samp{make maintainer-clean} should not delete anything that needs to
|
||||
exist in order to run @file{configure} and then begin to build the
|
||||
program. This is the only exception; @code{maintainer-clean} should
|
||||
delete everything else that can be rebuilt.
|
||||
|
||||
The @samp{maintainer-clean} target is intended to be used by a maintainer of
|
||||
the package, not by ordinary users. You may need special tools to
|
||||
reconstruct some of the files that @samp{make maintainer-clean} deletes.
|
||||
Since these files are normally included in the distribution, we don't
|
||||
take care to make them easy to reconstruct. If you find you need to
|
||||
unpack the full distribution again, don't blame us.
|
||||
|
||||
To help make users aware of this, the commands for the special
|
||||
@code{maintainer-clean} target should start with these two:
|
||||
|
||||
@smallexample
|
||||
@@echo 'This command is intended for maintainers to use; it'
|
||||
@@echo 'deletes files that may need special tools to rebuild.'
|
||||
@end smallexample
|
||||
|
||||
@item TAGS
|
||||
Update a tags table for this program.
|
||||
@c ADR: how?
|
||||
|
||||
@item info
|
||||
Generate any Info files needed. The best way to write the rules is as
|
||||
follows:
|
||||
|
||||
@smallexample
|
||||
info: foo.info
|
||||
|
||||
foo.info: foo.texi chap1.texi chap2.texi
|
||||
$(MAKEINFO) $(srcdir)/foo.texi
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
You must define the variable @code{MAKEINFO} in the Makefile. It should
|
||||
run the @code{makeinfo} program, which is part of the Texinfo
|
||||
distribution.
|
||||
|
||||
Normally a GNU distribution comes with Info files, and that means the
|
||||
Info files are present in the source directory. Therefore, the Make
|
||||
rule for an info file should update it in the source directory. When
|
||||
users build the package, ordinarily Make will not update the Info files
|
||||
because they will already be up to date.
|
||||
|
||||
@item dvi
|
||||
Generate DVI files for all Texinfo documentation.
|
||||
For example:
|
||||
|
||||
@smallexample
|
||||
dvi: foo.dvi
|
||||
|
||||
foo.dvi: foo.texi chap1.texi chap2.texi
|
||||
$(TEXI2DVI) $(srcdir)/foo.texi
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
You must define the variable @code{TEXI2DVI} in the Makefile. It should
|
||||
run the program @code{texi2dvi}, which is part of the Texinfo
|
||||
distribution.@footnote{@code{texi2dvi} uses @TeX{} to do the real work
|
||||
of formatting. @TeX{} is not distributed with Texinfo.} Alternatively,
|
||||
write just the dependencies, and allow GNU @code{make} to provide the command.
|
||||
|
||||
@item dist
|
||||
Create a distribution tar file for this program. The tar file should be
|
||||
set up so that the file names in the tar file start with a subdirectory
|
||||
name which is the name of the package it is a distribution for. This
|
||||
name can include the version number.
|
||||
|
||||
For example, the distribution tar file of GCC version 1.40 unpacks into
|
||||
a subdirectory named @file{gcc-1.40}.
|
||||
|
||||
The easiest way to do this is to create a subdirectory appropriately
|
||||
named, use @code{ln} or @code{cp} to install the proper files in it, and
|
||||
then @code{tar} that subdirectory.
|
||||
|
||||
Compress the tar file file with @code{gzip}. For example, the actual
|
||||
distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
|
||||
|
||||
The @code{dist} target should explicitly depend on all non-source files
|
||||
that are in the distribution, to make sure they are up to date in the
|
||||
distribution.
|
||||
@ifset CODESTD
|
||||
@xref{Releases, , Making Releases}.
|
||||
@end ifset
|
||||
@ifclear CODESTD
|
||||
@xref{Releases, , Making Releases, standards, GNU Coding Standards}.
|
||||
@end ifclear
|
||||
|
||||
@item check
|
||||
Perform self-tests (if any). The user must build the program before
|
||||
running the tests, but need not install the program; you should write
|
||||
the self-tests so that they work when the program is built but not
|
||||
installed.
|
||||
@end table
|
||||
|
||||
The following targets are suggested as conventional names, for programs
|
||||
in which they are useful.
|
||||
|
||||
@table @code
|
||||
@item installcheck
|
||||
Perform installation tests (if any). The user must build and install
|
||||
the program before running the tests. You should not assume that
|
||||
@file{$(bindir)} is in the search path.
|
||||
|
||||
@item installdirs
|
||||
It's useful to add a target named @samp{installdirs} to create the
|
||||
directories where files are installed, and their parent directories.
|
||||
There is a script called @file{mkinstalldirs} which is convenient for
|
||||
this; you can find it in the Texinfo package.
|
||||
@c It's in /gd/gnu/lib/mkinstalldirs.
|
||||
You can use a rule like this:
|
||||
|
||||
@comment This has been carefully formatted to look decent in the Make manual.
|
||||
@comment Please be sure not to make it extend any further to the right.--roland
|
||||
@smallexample
|
||||
# Make sure all installation directories (e.g. $(bindir))
|
||||
# actually exist by making them if necessary.
|
||||
installdirs: mkinstalldirs
|
||||
$(srcdir)/mkinstalldirs $(bindir) $(datadir) \
|
||||
$(libdir) $(infodir) \
|
||||
$(mandir)
|
||||
@end smallexample
|
||||
|
||||
This rule should not modify the directories where compilation is done.
|
||||
It should do nothing but create installation directories.
|
||||
@end table
|
||||
|
||||
@node Install Command Categories
|
||||
@section Install Command Categories
|
||||
|
||||
@cindex pre-installation commands
|
||||
@cindex post-installation commands
|
||||
When writing the @code{install} target, you must classify all the
|
||||
commands into three categories: normal ones, @dfn{pre-installation}
|
||||
commands and @dfn{post-installation} commands.
|
||||
|
||||
Normal commands move files into their proper places, and set their
|
||||
modes. They may not alter any files except the ones that come entirely
|
||||
from the package they belong to.
|
||||
|
||||
Pre-installation and post-installation commands may alter other files;
|
||||
in particular, they can edit global configuration files or data bases.
|
||||
|
||||
Pre-installation commands are typically executed before the normal
|
||||
commands, and post-installation commands are typically run after the
|
||||
normal commands.
|
||||
|
||||
The most common use for a post-installation command is to run
|
||||
@code{install-info}. This cannot be done with a normal command, since
|
||||
it alters a file (the Info directory) which does not come entirely and
|
||||
solely from the package being installed. It is a post-installation
|
||||
command because it needs to be done after the normal command which
|
||||
installs the package's Info files.
|
||||
|
||||
Most programs don't need any pre-installation commands, but we have the
|
||||
feature just in case it is needed.
|
||||
|
||||
To classify the commands in the @code{install} rule into these three
|
||||
categories, insert @dfn{category lines} among them. A category line
|
||||
specifies the category for the commands that follow.
|
||||
|
||||
A category line consists of a tab and a reference to a special Make
|
||||
variable, plus an optional comment at the end. There are three
|
||||
variables you can use, one for each category; the variable name
|
||||
specifies the category. Category lines are no-ops in ordinary execution
|
||||
because these three Make variables are normally undefined (and you
|
||||
@emph{should not} define them in the makefile).
|
||||
|
||||
Here are the three possible category lines, each with a comment that
|
||||
explains what it means:
|
||||
|
||||
@smallexample
|
||||
$(PRE_INSTALL) # @r{Pre-install commands follow.}
|
||||
$(POST_INSTALL) # @r{Post-install commands follow.}
|
||||
$(NORMAL_INSTALL) # @r{Normal commands follow.}
|
||||
@end smallexample
|
||||
|
||||
If you don't use a category line at the beginning of the @code{install}
|
||||
rule, all the commands are classified as normal until the first category
|
||||
line. If you don't use any category lines, all the commands are
|
||||
classified as normal.
|
||||
|
||||
These are the category lines for @code{uninstall}:
|
||||
|
||||
@smallexample
|
||||
$(PRE_UNINSTALL) # @r{Pre-uninstall commands follow.}
|
||||
$(POST_UNINSTALL) # @r{Post-uninstall commands follow.}
|
||||
$(NORMAL_UNINSTALL) # @r{Normal commands follow.}
|
||||
@end smallexample
|
||||
|
||||
Typically, a pre-uninstall command would be used for deleting entries
|
||||
from the Info directory.
|
||||
|
||||
If the @code{install} or @code{uninstall} target has any dependencies
|
||||
which act as subroutines of installation, then you should start
|
||||
@emph{each} dependency's commands with a category line, and start the
|
||||
main target's commands with a category line also. This way, you can
|
||||
ensure that each command is placed in the right category regardless of
|
||||
which of the dependencies actually run.
|
||||
|
||||
Pre-installation and post-installation commands should not run any
|
||||
programs except for these:
|
||||
|
||||
@example
|
||||
[ basename bash cat chgrp chmod chown cmp cp dd diff echo
|
||||
egrep expand expr false fgrep find getopt grep gunzip gzip
|
||||
hostname install install-info kill ldconfig ln ls md5sum
|
||||
mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee
|
||||
test touch true uname xargs yes
|
||||
@end example
|
||||
|
||||
@cindex binary packages
|
||||
The reason for distinguishing the commands in this way is for the sake
|
||||
of making binary packages. Typically a binary package contains all the
|
||||
executables and other files that need to be installed, and has its own
|
||||
method of installing them---so it does not need to run the normal
|
||||
installation commands. But installing the binary package does need to
|
||||
execute the pre-installation and post-installation commands.
|
||||
|
||||
Programs to build binary packages work by extracting the
|
||||
pre-installation and post-installation commands. Here is one way of
|
||||
extracting the pre-installation commands:
|
||||
|
||||
@smallexample
|
||||
make -n install -o all \
|
||||
PRE_INSTALL=pre-install \
|
||||
POST_INSTALL=post-install \
|
||||
NORMAL_INSTALL=normal-install \
|
||||
| gawk -f pre-install.awk
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
where the file @file{pre-install.awk} could contain this:
|
||||
|
||||
@smallexample
|
||||
$0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ @{on = 0@}
|
||||
on @{print $0@}
|
||||
$0 ~ /^\t[ \t]*pre_install[ \t]*$/ @{on = 1@}
|
||||
@end smallexample
|
||||
|
||||
The resulting file of pre-installation commands is executed as a shell
|
||||
script as part of installing the binary package.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user