mirror of
https://github.com/mirror/make.git
synced 2026-08-20 00:43:29 +08:00
Compare commits
585 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a66bf2d736 | ||
|
|
31c2024b2e | ||
|
|
7df0fe77d8 | ||
|
|
9fc787c658 | ||
|
|
1afb0ad372 | ||
|
|
86a058029b | ||
|
|
0a3a0756b9 | ||
|
|
3712e8a819 | ||
|
|
9ed452b041 | ||
|
|
b11bef0bea | ||
|
|
bd716a1ec1 | ||
|
|
b484efca56 | ||
|
|
562344122f | ||
|
|
9a2451af0b | ||
|
|
7f9ce6e97b | ||
|
|
621e9edfe9 | ||
|
|
986632ec23 | ||
|
|
95ffcda425 | ||
|
|
dcca1b5b0e | ||
|
|
9cad73ad82 | ||
|
|
8e7a28a6a4 | ||
|
|
98de32a681 | ||
|
|
5369be5079 | ||
|
|
8de07f3e4a | ||
|
|
f970315766 | ||
|
|
579ee85941 | ||
|
|
7e51810bb5 | ||
|
|
bd30df4478 | ||
|
|
1f2fd22fec | ||
|
|
ab1210b1fe | ||
|
|
241787d8e4 | ||
|
|
faeeb27166 | ||
|
|
cab353d1dd | ||
|
|
8b01e6bebf | ||
|
|
55c00544cc | ||
|
|
8d577c2ff4 | ||
|
|
e44d6a12bb | ||
|
|
423c3955d9 | ||
|
|
ac67346d0f | ||
|
|
e364498113 | ||
|
|
85047eb904 | ||
|
|
0faa98a0bb | ||
|
|
8411528fdd | ||
|
|
d2a3e9ca9c | ||
|
|
e1863c05d8 | ||
|
|
b981bfd197 | ||
|
|
88713683fe | ||
|
|
a7cac0f0e3 | ||
|
|
165ccf3137 | ||
|
|
24620378ba | ||
|
|
9c8b68a905 | ||
|
|
432cb6575d | ||
|
|
a4937bc897 | ||
|
|
889303cdfe | ||
|
|
99385ee6f7 | ||
|
|
f5f5adb62c | ||
|
|
865d90bb1e | ||
|
|
30b25acc4e | ||
|
|
f8905059c3 | ||
|
|
12a3104c3d | ||
|
|
7b485daffb | ||
|
|
757849cd93 | ||
|
|
9d58570c77 | ||
|
|
d49ab08ae0 | ||
|
|
10a4b120bd | ||
|
|
309768aff1 | ||
|
|
9c28d5125d | ||
|
|
a7794f483b | ||
|
|
5d653b535a | ||
|
|
53b4a9e668 | ||
|
|
d4723d643d | ||
|
|
107ab16bf6 | ||
|
|
07f2666b91 | ||
|
|
f4b746b8c2 | ||
|
|
d7f25cfda5 | ||
|
|
b9a01a8b3b | ||
|
|
d654bff457 | ||
|
|
74ed682c54 | ||
|
|
e498e464dc | ||
|
|
d1d737d0fa | ||
|
|
87e5b64f41 | ||
|
|
70df3c35bf | ||
|
|
01a745025d | ||
|
|
4792e154b6 | ||
|
|
188b2a0f23 | ||
|
|
52191d9d61 | ||
|
|
dc9ae5e017 | ||
|
|
723e047428 | ||
|
|
b69b04dc8c | ||
|
|
b539908f73 | ||
|
|
2fb91e19a0 | ||
|
|
f96c114e22 | ||
|
|
98197303b1 | ||
|
|
f8786092ad | ||
|
|
1d4c15b4e1 | ||
|
|
b1c7f0df4e | ||
|
|
8e12202870 | ||
|
|
1f4ca0539b | ||
|
|
d0944ee2e8 | ||
|
|
38066b6f19 | ||
|
|
3bf3fde984 | ||
|
|
543521cd47 | ||
|
|
e8122ecb5d | ||
|
|
55a0c0e414 | ||
|
|
8a3436c65d | ||
|
|
fd30db1290 | ||
|
|
c3524b83b9 | ||
|
|
0296e40fc7 | ||
|
|
f69922b335 | ||
|
|
65931ce7a9 | ||
|
|
1a991ada47 | ||
|
|
7e77685bc3 | ||
|
|
300d1296fb | ||
|
|
822f8dae41 | ||
|
|
d2d44f76c4 | ||
|
|
6c3e88e60f | ||
|
|
9cd01958da | ||
|
|
4120f91846 | ||
|
|
30a5ee0d85 | ||
|
|
8a6205b43f | ||
|
|
bc120f27bd | ||
|
|
5c0fba7240 | ||
|
|
fa0f2c516a | ||
|
|
20ecc58126 | ||
|
|
1b90248893 | ||
|
|
a4d8444b59 | ||
|
|
0a81d50d66 | ||
|
|
3aa2aa7e82 | ||
|
|
29a94ceb76 | ||
|
|
ab78cbc71c | ||
|
|
c5bfa40044 | ||
|
|
deff9dacc9 | ||
|
|
40a49f244d | ||
|
|
87ac68fe79 | ||
|
|
72462ef1e1 | ||
|
|
f80222c15b | ||
|
|
4b81f5ca92 | ||
|
|
5601726151 | ||
|
|
9453a7451d | ||
|
|
5e7bf7c554 | ||
|
|
138d020e1b | ||
|
|
5b65c5b916 | ||
|
|
cc85b927cd | ||
|
|
bee4d93a59 | ||
|
|
353fcfdb30 | ||
|
|
d4043519f7 | ||
|
|
ef11217de7 | ||
|
|
e8f5d322cf | ||
|
|
dc922e3f4c | ||
|
|
c11024b3b3 | ||
|
|
2fc0f614be | ||
|
|
bf60bbd67a | ||
|
|
d2eaed1f0a | ||
|
|
8ab3564a71 | ||
|
|
ecf307bb0b | ||
|
|
a674abe702 | ||
|
|
80183457ad | ||
|
|
cece7ad61f | ||
|
|
943c06de47 | ||
|
|
171eb41908 | ||
|
|
9babfe49a5 | ||
|
|
b16852a77f | ||
|
|
96cf67bd29 | ||
|
|
5370238316 | ||
|
|
398058a873 | ||
|
|
b730fbc6b8 | ||
|
|
c21c1455fd | ||
|
|
58dae24352 | ||
|
|
c7732bd5ad | ||
|
|
2627d83221 | ||
|
|
381baeef7a | ||
|
|
5367d393dd | ||
|
|
f0529daced | ||
|
|
a668c520b2 | ||
|
|
c8bf04e141 | ||
|
|
0a56034aac | ||
|
|
94735f0ad7 | ||
|
|
7c77486d1f | ||
|
|
13f13b96b3 | ||
|
|
c3cd78066c | ||
|
|
15f7957939 | ||
|
|
1d992d8fe7 | ||
|
|
3484c9675a | ||
|
|
a0c5d0c63f | ||
|
|
64dd61bcb8 | ||
|
|
75336026ae | ||
|
|
b8467292c9 | ||
|
|
e44c51ce41 | ||
|
|
cb2be0db36 | ||
|
|
01bad6f73a | ||
|
|
82793f85f5 | ||
|
|
a66469e003 | ||
|
|
b5ea49bae7 | ||
|
|
2926f7b466 | ||
|
|
a87ff20158 | ||
|
|
9acb657eb1 | ||
|
|
19a69bafc0 | ||
|
|
9a7fe22b19 | ||
|
|
9253a34a57 | ||
|
|
f88eb23b02 | ||
|
|
441b643355 | ||
|
|
8b034b7d18 | ||
|
|
5667376edc | ||
|
|
93843ccd08 | ||
|
|
7f01830927 | ||
|
|
30843dea3a | ||
|
|
14d7654551 | ||
|
|
054d6d91e7 | ||
|
|
e56aad4061 | ||
|
|
049f8e88fc | ||
|
|
da7df54309 | ||
|
|
f3a4b4ce6f | ||
|
|
0daa9d37c4 | ||
|
|
50e2cb1b1a | ||
|
|
330d97a9ba | ||
|
|
b5d017c624 | ||
|
|
79e9347892 | ||
|
|
2bd957a89d | ||
|
|
7f7e6f80c5 | ||
|
|
af87d56157 | ||
|
|
4bf3c33f83 | ||
|
|
cb64352c75 | ||
|
|
6a52395ed1 | ||
|
|
29cd1e9699 | ||
|
|
450b7e1a3d | ||
|
|
5058a94ee7 | ||
|
|
4baf9ab456 | ||
|
|
ac1c6b404a | ||
|
|
51fb930ef2 | ||
|
|
a45f25ece3 | ||
|
|
b70aa3709e | ||
|
|
8e0a5645b8 | ||
|
|
7899c6f383 | ||
|
|
6ca41d9b17 | ||
|
|
686a74bfb2 | ||
|
|
ca17e5538f | ||
|
|
5c69b3fe53 | ||
|
|
1d298acf9d | ||
|
|
5a5a1aff6a | ||
|
|
002702c89c | ||
|
|
a3bd466e25 | ||
|
|
97fe6e7dd1 | ||
|
|
85f9f6985d | ||
|
|
0d12b1a207 | ||
|
|
299f5faf93 | ||
|
|
0d5d963bcf | ||
|
|
715927552f | ||
|
|
7670c84f77 | ||
|
|
2efd6b47bf | ||
|
|
ca8885d5be | ||
|
|
3a285e342e | ||
|
|
f263ff4ce9 | ||
|
|
fbe5b2c9cd | ||
|
|
a94b0b0ea5 | ||
|
|
b9c4a38022 | ||
|
|
90ee335724 | ||
|
|
7d3743dfdc | ||
|
|
a839588fc9 | ||
|
|
8a0d46468a | ||
|
|
bc578b6c8e | ||
|
|
1820908804 | ||
|
|
145661a541 | ||
|
|
a95dc485fa | ||
|
|
30b2e4207d | ||
|
|
7f5309ebb4 | ||
|
|
6cb5be7813 | ||
|
|
adb50bd4c9 | ||
|
|
cf1c79c9a3 | ||
|
|
76827d7c10 | ||
|
|
eb632d7676 | ||
|
|
fdb5fcc28d | ||
|
|
23c2b99e9d | ||
|
|
405c89ba1e | ||
|
|
a77c5c0910 | ||
|
|
88f1bc8b55 | ||
|
|
6405534814 | ||
|
|
c0751bd3fc | ||
|
|
1befa76448 | ||
|
|
e3b394f3f0 | ||
|
|
ef6461611b | ||
|
|
fca11f6039 | ||
|
|
d6e1c6e6c5 | ||
|
|
aa07c06387 | ||
|
|
dc25e84754 | ||
|
|
666ad44568 | ||
|
|
dddd1be5ec | ||
|
|
eb4f966971 | ||
|
|
715a11735f | ||
|
|
89f7058b99 | ||
|
|
9fb4cdeedb | ||
|
|
0bdc191501 | ||
|
|
49cc211819 | ||
|
|
4e2e5eb199 | ||
|
|
3f6bb04e75 | ||
|
|
c992c4d80f | ||
|
|
3057357c0a | ||
|
|
cb0bedc3d0 | ||
|
|
dc2a6ceb81 | ||
|
|
4f47fbf953 | ||
|
|
9fcd90e36c | ||
|
|
83ce81fcaa | ||
|
|
63888b91f6 | ||
|
|
934f51d166 | ||
|
|
bfc3e1ca7c | ||
|
|
c7d07fd0b5 | ||
|
|
d472624f33 | ||
|
|
0369a93825 | ||
|
|
ef2b0425e7 | ||
|
|
a5c774a51b | ||
|
|
9a9f83e8b5 | ||
|
|
e4d5d43424 | ||
|
|
b06b8c64a2 | ||
|
|
f15efca811 | ||
|
|
b664d3a91d | ||
|
|
b5c065418f | ||
|
|
bd6f63e563 | ||
|
|
6979e7e43b | ||
|
|
dc90160079 | ||
|
|
a81ee5209b | ||
|
|
15a79d723d | ||
|
|
b34438bee8 | ||
|
|
1454a04f81 | ||
|
|
ae2ab76fac | ||
|
|
391456aad7 | ||
|
|
a86d1693ba | ||
|
|
3b1432d86a | ||
|
|
c3188c6f31 | ||
|
|
5acda13ace | ||
|
|
036760a9fd | ||
|
|
91be515567 | ||
|
|
b6b6875986 | ||
|
|
8f029808af | ||
|
|
95f1a32d27 | ||
|
|
59691939f9 | ||
|
|
e954532d48 | ||
|
|
f5d7411c49 | ||
|
|
fba20a776d | ||
|
|
df2fa7c5a5 | ||
|
|
9903cda2a7 | ||
|
|
ded9121846 | ||
|
|
02ff72c970 | ||
|
|
90b30b6e0e | ||
|
|
96c0761689 | ||
|
|
bbe7b86718 | ||
|
|
7ba7dbca47 | ||
|
|
b85b7e0a55 | ||
|
|
587588c1fa | ||
|
|
94bda718c4 | ||
|
|
4e4d8f246f | ||
|
|
8a0f9d7b42 | ||
|
|
c7b469f0f3 | ||
|
|
c78b7265bd | ||
|
|
fc644b4c45 | ||
|
|
97f106fa10 | ||
|
|
7746a1f74f | ||
|
|
c0239cdbfa | ||
|
|
866aa6267a | ||
|
|
b4cec7790f | ||
|
|
deace771d6 | ||
|
|
f4d9937274 | ||
|
|
b6f45ddc53 | ||
|
|
fe43fa9de3 | ||
|
|
5f188b39a4 | ||
|
|
76d2d2ca41 | ||
|
|
4e51b6d9a4 | ||
|
|
606cf9b169 | ||
|
|
131f115730 | ||
|
|
b1d34394a8 | ||
|
|
baee33eb0f | ||
|
|
bd2d124f27 | ||
|
|
4254e88cfa | ||
|
|
174e910a1d | ||
|
|
acbdc33e1c | ||
|
|
f87715a62c | ||
|
|
56653d8524 | ||
|
|
f907a4d90c | ||
|
|
f5891a26d8 | ||
|
|
f9c15cac35 | ||
|
|
bf1794767e | ||
|
|
5d19c91605 | ||
|
|
8688ef20cf | ||
|
|
44ac2cdb4d | ||
|
|
48045f99e5 | ||
|
|
5973926ce6 | ||
|
|
d65b267e4a | ||
|
|
0afbbf8595 | ||
|
|
3cc351decd | ||
|
|
8f30b68871 | ||
|
|
5abe477620 | ||
|
|
295a05fbd6 | ||
|
|
958ea92eb8 | ||
|
|
70c726c875 | ||
|
|
7deb42aafd | ||
|
|
e2f16fdf45 | ||
|
|
139c28ae69 | ||
|
|
e8fd23cc83 | ||
|
|
1471af2de2 | ||
|
|
56f70324e8 | ||
|
|
be6b22a283 | ||
|
|
dceb954f9c | ||
|
|
38b23bc3f0 | ||
|
|
bf9822658f | ||
|
|
c8840352ac | ||
|
|
d4ee001292 | ||
|
|
a72bff7cb3 | ||
|
|
0b30c8d9ce | ||
|
|
668af46980 | ||
|
|
b9f831b858 | ||
|
|
71385e1225 | ||
|
|
81f3e4babd | ||
|
|
5b4d419476 | ||
|
|
7b16a8e3ca | ||
|
|
14f3f501bc | ||
|
|
3fd62c76c2 | ||
|
|
27ef86f6b1 | ||
|
|
656b15a404 | ||
|
|
f8f3b9005b | ||
|
|
4c995f262a | ||
|
|
c7f2c384ee | ||
|
|
ed4a06e6de | ||
|
|
b50116c4ae | ||
|
|
b23b0c3552 | ||
|
|
bb7cb05da5 | ||
|
|
8d5b3d4298 | ||
|
|
2750526aa5 | ||
|
|
84e9bcd65e | ||
|
|
91b016c414 | ||
|
|
be883de241 | ||
|
|
c233a70323 | ||
|
|
8025f93312 | ||
|
|
43d81ff866 | ||
|
|
c1f71b0336 | ||
|
|
0b17d143ba | ||
|
|
2a23064da5 | ||
|
|
e54dfb4284 | ||
|
|
19b6504f8a | ||
|
|
bb4d040fad | ||
|
|
891ebd4d97 | ||
|
|
a940199072 | ||
|
|
eda0e24ccd | ||
|
|
52ebc531ce | ||
|
|
891409f212 | ||
|
|
6ccf33cdbd | ||
|
|
e4da308580 | ||
|
|
7595f38f62 | ||
|
|
c25294ad3b | ||
|
|
f222b19158 | ||
|
|
776d8b7bc2 | ||
|
|
a8f101d0bc | ||
|
|
367a49591e | ||
|
|
94aead216e | ||
|
|
24aac7f8f6 | ||
|
|
29e539bad0 | ||
|
|
22886f8a74 | ||
|
|
50eb3cf5e5 | ||
|
|
6d8d9b74d9 | ||
|
|
afc4906aca | ||
|
|
8af9389f87 | ||
|
|
08bfd86103 | ||
|
|
6e0527913c | ||
|
|
bde826b18a | ||
|
|
0806a403d6 | ||
|
|
86af3872a9 | ||
|
|
df267b31c5 | ||
|
|
a6bdc58385 | ||
|
|
24338ec929 | ||
|
|
586daef9bc | ||
|
|
5a7a42cfce | ||
|
|
d0c4e92f11 | ||
|
|
ce9c63b32b | ||
|
|
a4e3523fe4 | ||
|
|
7a8549f5dd | ||
|
|
4cd3539024 | ||
|
|
64e16d6c00 | ||
|
|
3d0d9e5d75 | ||
|
|
4bd6db9df1 | ||
|
|
3bcb608bda | ||
|
|
0e6c4f5b0e | ||
|
|
a34b85490d | ||
|
|
1fd3f9d79c | ||
|
|
3dd1faa5c8 | ||
|
|
82103b1a49 | ||
|
|
11095a90f1 | ||
|
|
66459baee2 | ||
|
|
5ee856d96d | ||
|
|
0ffd22cb44 | ||
|
|
f7598efb67 | ||
|
|
6636dc1d5c | ||
|
|
bf58e35105 | ||
|
|
e437226241 | ||
|
|
b237dff775 | ||
|
|
a53903e4c3 | ||
|
|
1e9dc3ce45 | ||
|
|
0e30f46a62 | ||
|
|
7dfa2461c3 | ||
|
|
261d7b44fa | ||
|
|
b581e1350f | ||
|
|
a36cfed31a | ||
|
|
da1b137e38 | ||
|
|
d6a7894d3a | ||
|
|
f388233b03 | ||
|
|
6cdaff0948 | ||
|
|
1dd9ed1c05 | ||
|
|
978819e1d6 | ||
|
|
467115baae | ||
|
|
974d14ac4f | ||
|
|
dd30b0552f | ||
|
|
af88a3550a | ||
|
|
e50e0fdf88 | ||
|
|
26d8d00cb7 | ||
|
|
e4c14a675c | ||
|
|
9d5b5bd2f5 | ||
|
|
49ee105c68 | ||
|
|
3daf8df6ee | ||
|
|
4923580e3a | ||
|
|
d584d0c1c6 | ||
|
|
18251c4633 | ||
|
|
2860d3b247 | ||
|
|
28078b517a | ||
|
|
cb2f200269 | ||
|
|
0759af440a | ||
|
|
a2232470c2 | ||
|
|
d2516343bc | ||
|
|
93bd1bd93c | ||
|
|
659fc6b55e | ||
|
|
9d153cc1b1 | ||
|
|
6d995b036e | ||
|
|
e8ca9b8eb1 | ||
|
|
c90f47e832 | ||
|
|
939167cfc1 | ||
|
|
1ce563a181 | ||
|
|
dff0be9e68 | ||
|
|
6c21790595 | ||
|
|
6c9e53d648 | ||
|
|
49ca261bd5 | ||
|
|
be6a8bc869 | ||
|
|
539f513773 | ||
|
|
d27cac1598 | ||
|
|
e8e4c19873 | ||
|
|
547abfa13e | ||
|
|
71fd6bfa1c | ||
|
|
b0d67e0e15 | ||
|
|
fb6410f435 | ||
|
|
341312cc57 | ||
|
|
29d78ddb28 | ||
|
|
73e7767ffc | ||
|
|
6e51d9c90a | ||
|
|
704c60cec0 | ||
|
|
9714e501fb | ||
|
|
0799ce730d | ||
|
|
08c8105c54 | ||
|
|
e334942e57 | ||
|
|
f305a52c02 | ||
|
|
213ccc2234 | ||
|
|
e3e3f15ebc | ||
|
|
59306b0223 | ||
|
|
be5b33e876 | ||
|
|
f29b86c314 | ||
|
|
be8c3dbc97 | ||
|
|
fafeb87027 | ||
|
|
1f16ee5c2d | ||
|
|
2b3ee46f4e | ||
|
|
a35db90275 | ||
|
|
ee3d37a591 | ||
|
|
76f034acaa | ||
|
|
74216b00a4 | ||
|
|
db401d8e0a | ||
|
|
e3986eea43 | ||
|
|
1a5beef51f | ||
|
|
652234e967 | ||
|
|
acb2e64966 | ||
|
|
276d0c7c64 | ||
|
|
955899ef77 | ||
|
|
4068c5e4a3 | ||
|
|
1fa3db1468 | ||
|
|
b7c728046e | ||
|
|
d33ff30145 | ||
|
|
d15a484098 | ||
|
|
dd70c67ea4 | ||
|
|
b04a205f3e | ||
|
|
d696707cb5 | ||
|
|
bd108cf45c | ||
|
|
6374309c6d | ||
|
|
8bbdbb02b3 | ||
|
|
47cd8d4624 |
32
.cvsignore
32
.cvsignore
@@ -1,32 +0,0 @@
|
||||
*.gz *.Z *.tar *.tgz
|
||||
=*
|
||||
TODO COPYING* ABOUT-NLS
|
||||
make-3* make-test*
|
||||
*.info *.info-*
|
||||
stamp-*
|
||||
makebook*
|
||||
|
||||
.*gdbinit
|
||||
|
||||
*.dep *.dvi *.toc *.aux *.log
|
||||
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
|
||||
|
||||
README README.DOS README.W32
|
||||
aclocal.m4 autom4te.cache
|
||||
config.h.in config.h config.status config.cache configure
|
||||
Makefile.in Makefile
|
||||
build.sh.in build.sh
|
||||
SMakefile NMakefile Makefile.DOS
|
||||
config.ami configh.dos config.h.W32 config.h-vms
|
||||
|
||||
loadavg loadavg.c make
|
||||
|
||||
.deps .dep_segment
|
||||
|
||||
_*
|
||||
sun4 i386 i386-netbsd hp300-netbsd hp300 rs6000 sun3 news800 amiga
|
||||
hp700 hp834 mips sol2 i486-linux
|
||||
|
||||
customs
|
||||
|
||||
install-sh mkinstalldirs
|
||||
50
.gitignore
vendored
Normal file
50
.gitignore
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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
|
||||
|
||||
# Distribution artifacts
|
||||
.dep_segment
|
||||
.check-git-HEAD
|
||||
ChangeLog
|
||||
Makefile.DOS
|
||||
NMakefile
|
||||
README
|
||||
README.DOS
|
||||
README.OS2
|
||||
README.W32
|
||||
SMakefile
|
||||
build.sh
|
||||
build.sh.in
|
||||
config.ami
|
||||
config.h-vms
|
||||
config.h.W32
|
||||
configh.dos
|
||||
make-[0-9]*/
|
||||
make-[0-9]*.tar.*
|
||||
checkcfg.*.log
|
||||
37
AUTHORS
37
AUTHORS
@@ -7,6 +7,9 @@ GNU make development up to version 3.75 by:
|
||||
Development starting with GNU make 3.76 by:
|
||||
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,28 +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-2014 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>.
|
||||
|
||||
857
ChangeLog
857
ChangeLog
@@ -1,857 +0,0 @@
|
||||
2002-10-03 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Version 3.80 released.
|
||||
|
||||
* dir.c: Change hash functions to use K&R function definition style.
|
||||
* function.c: Ditto.
|
||||
* read.c: Ditto.
|
||||
* variable.c: Ditto.
|
||||
|
||||
Update to automake 1.7.
|
||||
|
||||
* Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7.
|
||||
(pdf): Remove this target as automake now provides one.
|
||||
|
||||
* configure.in: Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS.
|
||||
|
||||
2002-09-30 Martin P.J. Zinser <zinser@decus.de>
|
||||
|
||||
* makefile.com: Updates for GNU make 3.80.
|
||||
* makefile.vms: Ditto.
|
||||
|
||||
2002-09-23 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* read.c (enum make_word_type): Remove w_comment.
|
||||
(get_next_mword): Don't treat comment characters as special; where
|
||||
this function is used we will never see a comment (it's stripped
|
||||
before we get here) and treating comments specially means that
|
||||
targets like "foo\#bar" aren't handled properly.
|
||||
|
||||
2002-09-18 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* doc/make.texi (Bugs): Update with some info on Savannah, etc.
|
||||
|
||||
* read.c (eval): Expansion of arguments to export/unexport was
|
||||
ignoring all arguments after the first one. Change the algorithm
|
||||
to expand the whole line once, then parse the results.
|
||||
|
||||
2002-09-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Fix Bug #940 (plus another bug I found while looking at this):
|
||||
|
||||
* read.c (record_target_var): enter_file() will add a new entry if
|
||||
it's a double-colon target: we don't want to do that in this
|
||||
situation. Invoke lookup_file() and only enter_file() if it does
|
||||
not already exist. If the file we get back is a double-colon then
|
||||
add this variable to the "root" double-colon target.
|
||||
|
||||
* variable.c (initialize_file_variables): If this file is a
|
||||
double-colon target but is not the "root" target, then initialize
|
||||
the root and make the root's variable list the parent of our
|
||||
variable list.
|
||||
|
||||
2002-09-13 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* doc/make.texi (MAKE Variable): Add some indexing for "+".
|
||||
|
||||
* hash.c (round_up_2): Get rid of a warning.
|
||||
|
||||
2002-09-12 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Makefile.am (loadavg_SOURCES, loadavg.c): Tiptoe around automake
|
||||
so it doesn't complain about getloadavg.c.
|
||||
|
||||
* commands.c (set_file_variables): Make sure we always alloca() at
|
||||
least 1 character for the value of $? (for '\0').
|
||||
|
||||
2002-09-11 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* hash.h (STRING_COMPARE, ISTRING_COMPARE, STRING_N_COMPARE): Fix
|
||||
macro to use RESULT instead of the incorrect _RESULT_.
|
||||
|
||||
* make.h (HAVE_BROKEN_RESTART): Add prototypes for atomic_stat()
|
||||
and atomic_readdir(). We need to #include dirent.h to get this to
|
||||
work.
|
||||
* misc.c (atomic_readdir): Fix typos.
|
||||
|
||||
2002-09-10 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* read.c (eval): Expand variable lists given to export and
|
||||
unexport, so that "export $(LIST_OF_VARIABLES)" (etc.) works.
|
||||
(conditional_line): Ditto for "ifdef". Fixes bug #103.
|
||||
|
||||
* doc/make.texi (Variables/Recursion): Document this.
|
||||
(Conditional Syntax): And here.
|
||||
|
||||
2002-09-09 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* configure.in: Check for memmove().
|
||||
|
||||
2002-09-07 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* configure.in (HAVE_BROKEN_RESTART): Define this on PTX systems;
|
||||
Michael Sterrett <msterret@coat.com> reports that while it has
|
||||
SA_RESTART, it does not work properly.
|
||||
|
||||
* misc.c (atomic_stat): If HAVE_BROKEN_RESTART, create a function
|
||||
that invokes stat() and loops to do it again if it returns EINTR.
|
||||
(atomic_readdir): Ditto, with readdir().
|
||||
|
||||
* make.h (stat, readdir): If HAVE_BROKEN_RESTART, alias stat()
|
||||
and readdir() to atomic_stat() and atomic_readdir().
|
||||
|
||||
2002-09-04 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* implicit.c (pattern_search): Daniel <barkalow@reputation.com>
|
||||
reports that GNU make sometimes doesn't recognize that targets can
|
||||
be made, when directories can be created as prerequisites. He
|
||||
reports that changing the order of predicates in the DEP->changed
|
||||
flag test so that lookup_file() is always performed, solves this
|
||||
problem.
|
||||
|
||||
2002-08-08 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* configure.in: Require a newer version of gettext.
|
||||
|
||||
* misc.c (perror_with_name): Translate the format string (for
|
||||
right-to-left language support).
|
||||
(pfatal_with_name): Ditto.
|
||||
|
||||
* main.c: Create a static array of strings to store the usage
|
||||
text. This is done to facilitate translations.
|
||||
(struct command_switch): Remove argdesc and description fields.
|
||||
(switches): Remove values for obsolete fields.
|
||||
(print_usage): Print each element of the usage array.
|
||||
|
||||
* hash.c: Change function definitions to be K&R style.
|
||||
|
||||
2002-08-02 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* NEWS: Remove the mention of .TARGETS; we aren't going to publish
|
||||
this one because it's too hard to get right. We'll look at it for
|
||||
a future release.
|
||||
* main.c (main): Don't create the .TARGETS variable.
|
||||
* variable.c (handle_special_var): Don't handle .TARGETS.
|
||||
|
||||
2002-08-01 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* main.c (switches): Add a new option, -B (--always-make). If
|
||||
specified, make will rebuild all targets that it encounters even
|
||||
if they don't appear to be out of date.
|
||||
(always_make_flag): New flag.
|
||||
* make.h: Extern always_make_flag.
|
||||
* remake.c (update_file_1): Check always_make_flag; if it's set we
|
||||
will always rebuild any target we can, even if none of its
|
||||
prerequisites are newer.
|
||||
* NEWS: Mention it.
|
||||
|
||||
* doc/make.texi (Shell Function): Make it clear that make
|
||||
variables marked as "export" are not passed to instances of the
|
||||
shell function.
|
||||
|
||||
Add new introspection variable .VARIABLES and .TARGETS.
|
||||
|
||||
* variable.c (handle_special_var): New function. If the variable
|
||||
reference passed in is "special" (.VARIABLES or .TARGETS),
|
||||
calculate the new value if necessary. .VARIABLES is handled here:
|
||||
walk through the hash of defined variables and construct a value
|
||||
which is a list of the names. .TARGETS is handled by
|
||||
build_target_list().
|
||||
(lookup_variable): Invoke handle_special_var().
|
||||
* file.c (build_target_list): Walk through the hask of known files
|
||||
and construct a list of the names of all the ones marked as
|
||||
targets.
|
||||
* main.c (main): Initialize them to empty (and as simple variables).
|
||||
* doc/make.texi (Special Variables): Document them.
|
||||
* NEWS: Mention them.
|
||||
|
||||
* variable.h (struct variable): Add a new flag "exportable" which
|
||||
is true if the variable name is valid for export.
|
||||
* variable.c (define_variable_in_set): Set "exportable" when a new
|
||||
variable is defined.
|
||||
(target_environment): Use the "exportable" flag instead of
|
||||
re-checking the name here... an efficiency improvement.
|
||||
|
||||
2002-07-31 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* config.h-vms.template: Updates to build on VMS. Thanks to
|
||||
Brian_Benning@aksteel.com for helping verify the build.
|
||||
* makefile.com: Build the new hash.c file.
|
||||
* hash.h: Use strcpmi(), not stricmp(), in the
|
||||
HAVE_CASE_INSENSITIVE_FS case.
|
||||
|
||||
2002-07-30 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Add missing
|
||||
backslashes to the HAVE_CASE_INSENSITIVE_FS case.
|
||||
Reported by <Brian_Benning@aksteel.com>.
|
||||
|
||||
2002-07-10 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (pop_variable_scope): Remove variable made unused by
|
||||
new hash infrastructure.
|
||||
* read.c (dep_hash_cmp): Rewrite this to handle ignore_mtime
|
||||
comparisons as well as name comparisons.
|
||||
* variable.h: Add a prototype for new hash_init_function_table().
|
||||
* file.c (lookup_file): Remove variables made unused by new hash
|
||||
infrastructure.
|
||||
* dir.c (directory_contents_hash_2): Missing return of hash value.
|
||||
(dir_contents_file_exists_p): Remove variables made unused by new
|
||||
hash infrastructure.
|
||||
|
||||
|
||||
Installed Greg McGary's integration of the hash functions from the
|
||||
GNU id-utils package:
|
||||
|
||||
2002-07-10 Greg McGary <greg@mcgary.org>
|
||||
|
||||
* scripts/functions/filter-out: Add literals to to the
|
||||
pattern space in order to add complexity, and trigger
|
||||
use of an internal hash table. Fix documentation strings.
|
||||
* scripts/targets/INTERMEDIATE: Reverse order of files
|
||||
passed to expected `rm' command.
|
||||
|
||||
2002-07-10 Greg McGary <greg@mcgary.org>
|
||||
|
||||
* Makefile.am (SRCS): Add hash.c (noinst_HEADERS): Add hash.h
|
||||
* hash.c: New file, taken from id-utils.
|
||||
* hash.h: New file, taken from id-utils.
|
||||
|
||||
* make.h (HASH, HASHI): Remove macros.
|
||||
(find_char_unquote): Change arglist in decl.
|
||||
(hash_init_directories): New function decl.
|
||||
* variable.h (hash.h): New #include.
|
||||
(MAKELEVEL_NAME, MAKELEVEL_LENGTH): New constants.
|
||||
* filedef.h (hash.h): New #include.
|
||||
(struct file) [next]: Remove member.
|
||||
(file_hash_enter): Remove function decl.
|
||||
(init_hash_files): New function decl.
|
||||
|
||||
* ar.c (ar_name): Delay call to strlen until needed.
|
||||
* main.c (initialize_global_hash_tables): New function.
|
||||
(main): Call it. Use MAKELEVEL_NAME & MAKELEVEL_LENGTH.
|
||||
* misc.c (remove_comments): Pass char constants to find_char_unquote.
|
||||
* remake.c (notice_finished_file): Update last_mtime on `prev' chain.
|
||||
|
||||
* dir.c (hash.h): New #include.
|
||||
(struct directory_contents) [next, files]: Remove members.
|
||||
[ctime]: Add member for VMS. [dirfiles]: Add hash-table member.
|
||||
(directory_contents_hash_1, directory_contents_hash_2,
|
||||
directory_contents_hash_cmp): New functions.
|
||||
(directories_contents): Change type to `struct hash_table'.
|
||||
(struct directory) [next]: Remove member.
|
||||
(directory_hash_1, directory_hash_2, directory_hash_cmp): New funcs.
|
||||
(directory): Change type to `struct hash_table'.
|
||||
(struct dirfile) [next]: Remove member.
|
||||
[length]: Add member. [impossible]: widen type to fill alignment gap.
|
||||
(dirfile_hash_1, dirfile_hash_2, dirfile_hash_cmp): New functions.
|
||||
(find_directory): Use new hash table package.
|
||||
(dir_contents_file_exists_p): Likewise.
|
||||
(file_impossible): Likewise.
|
||||
(file_impossible_p): Likewise.
|
||||
(print_dir_data_base): Likewise.
|
||||
(open_dirstream): Likewise.
|
||||
(read_dirstream): Likewise.
|
||||
(hash_init_directories): New function.
|
||||
|
||||
* file.c (hash.h): New #include.
|
||||
(file_hash_1, file_hash_2, file_hash_cmp): New functions.
|
||||
(files): Change type to `struct hash_table'.
|
||||
(lookup_file): Use new hash table package.
|
||||
(enter_file): Likewise.
|
||||
(remove_intermediates): Likewise.
|
||||
(snap_deps): Likewise.
|
||||
(print_file_data_base): Likewise.
|
||||
|
||||
* function.c
|
||||
(function_table_entry_hash_1, function_table_entry_hash_2,
|
||||
function_table_entry_hash_cmp): New functions.
|
||||
(lookup_function): Remove `table' argument.
|
||||
Use new hash table package.
|
||||
(struct a_word) [chain, length]: New members.
|
||||
(a_word_hash_1, a_word_hash_2, a_word_hash_cmp): New functions.
|
||||
(struct a_pattern): New struct.
|
||||
(func_filter_filterout): Pass through patterns noting boundaries
|
||||
and '%', if present. Note a_word length. Use a hash table if
|
||||
arglists are large enough to justify cost.
|
||||
(function_table_init): Renamed from function_table.
|
||||
(function_table): Declare as `struct hash_table'.
|
||||
(FUNCTION_TABLE_ENTRIES): New constant.
|
||||
(hash_init_function_table): New function.
|
||||
|
||||
* read.c (hash.h): New #include.
|
||||
(read_makefile): Pass char constants to find_char_unquote.
|
||||
(dep_hash_1, dep_hash_2, dep_hash_cmp): New functions.
|
||||
(uniquize_deps): Use hash table to efficiently identify duplicates.
|
||||
(find_char_unquote): Accept two char-constant stop chars, rather
|
||||
than a string constant, avoiding zillions of calls to strchr.
|
||||
Tighten inner search loops to test only for desired delimiters.
|
||||
|
||||
* variable.c (variable_hash_1, variable_hash_2,
|
||||
variable_hash_cmp): New functions.
|
||||
(variable_table): Declare as `struct hash_table'.
|
||||
(global_variable_set): Remove initialization.
|
||||
(init_hash_global_variable_set): New function.
|
||||
(define_variable_in_set): Use new hash table package.
|
||||
(lookup_variable): Likewise.
|
||||
(lookup_variable_in_set): Likewise.
|
||||
(initialize_file_variables): Likewise.
|
||||
(pop_variable_scope): Likewise.
|
||||
(create_new_variable_set): Likewise.
|
||||
(merge_variable_sets): Likewise.
|
||||
(define_automatic_variables): Likewise.
|
||||
(target_environment): Likewise.
|
||||
(print_variable_set): Likewise.
|
||||
|
||||
2002-07-10 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Implement the SysV make syntax $$@, $$(@D), and $$(@F) in the
|
||||
prerequisite list. A real SysV make will expand the entire
|
||||
prerequisites list _twice_: we don't do that as it's a big
|
||||
backward-compatibility problem. We only replace those specific
|
||||
variables.
|
||||
|
||||
* read.c (record_files): Replace any $@, $(@D), and $(@F) variable
|
||||
references left in the list of prerequisites. Check for .POSIX as
|
||||
we record targets, so we can disable non-POSIX behavior while
|
||||
reading makefiles as well as running them.
|
||||
(eval): Check the prerequisite list to see if we have anything
|
||||
that looks like a SysV prerequisite variable reference.
|
||||
|
||||
2002-07-09 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* doc/make.texi (Prerequisite Types): Add a new section describing
|
||||
order-only prerequisites.
|
||||
|
||||
* read.c (uniquize_deps): If we have the same file as both a
|
||||
normal and order-only prereq, get rid of the order-only prereq,
|
||||
since the normal one supersedes it.
|
||||
|
||||
2002-07-08 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* AUTHORS: Added Greg McGary to the AUTHORS file.
|
||||
* NEWS: Blurbed order-only prerequisites.
|
||||
* file.c (print_file): Show order-only deps properly when printing
|
||||
the database.
|
||||
|
||||
* maintMakefile: Add "update" targets for wget'ing the latest
|
||||
versions of various external files. Taken from Makefile.maint in
|
||||
autoconf, etc.
|
||||
|
||||
* dosbuild.bat: Somehow we got _double_ ^M's. Remove them.
|
||||
Reported by Eli Zaretskii <eliz@is.elta.co.il>.
|
||||
|
||||
2002-07-07 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* po/*.po: Remove. We'll use wget to retrieve them at release
|
||||
time.
|
||||
|
||||
* variable.c (do_variable_definition) [W32]: On W32 using cmd
|
||||
rather than a shell you get an exception. Make sure we look up
|
||||
the variable. Patch provided by Eli Zaretskii <eliz@is.elta.co.il>.
|
||||
|
||||
* remake.c (notice_finished_file): Fix handling of -t flag.
|
||||
Patch provided by Henning Makholm <henning@makholm.net>.
|
||||
|
||||
* implicit.c (pattern_search): Some systems apparently run short
|
||||
of stack space, and using alloca() in this function caused an
|
||||
overrun. I modified it to use xmalloc() on the two variables
|
||||
which seemed like they might get large. Fixes Bug #476.
|
||||
|
||||
* main.c (print_version): Update copyright notice to conform with
|
||||
GNU standards.
|
||||
(print_usage): Update help output.
|
||||
|
||||
* function.c (func_eval): Create a new make function, $(eval
|
||||
...). Expand the arguments, put them into a buffer, then invoke
|
||||
eval_buffer() on the resulting string.
|
||||
(func_quote): Create a new function, $(quote VARNAME). Inserts
|
||||
the value of the variable VARNAME without expanding it any
|
||||
further.
|
||||
|
||||
* read.c (struct ebuffer): Change the linebuffer structure to an
|
||||
"eval buffer", which can be either a file or a buffer.
|
||||
(eval_makefile): Move the code in the old read_makefile() which
|
||||
located a makefile into here: create a struct ebuffer with that
|
||||
information. Have it invoke the new function eval() with that
|
||||
ebuffer.
|
||||
(eval_buffer): Create a new function that creates a struct ebuffer
|
||||
that holds a string buffer instead of a file. Have it invoke
|
||||
eval() with that ebuffer.
|
||||
(eval): New function that contains the guts of the old
|
||||
read_makefile() function: this function parses makefiles. Obtains
|
||||
data to parse from the provided ebuffer. Some modifications to
|
||||
make the flow of the function cleaner and clearer. Still could
|
||||
use some work here...
|
||||
(do_define): Takes a struct ebuffer instead of a FILE*. Read the
|
||||
contents of the define/endef variable from the ebuffer.
|
||||
(readstring): Read the next line from a string-style ebuffer.
|
||||
(readline): Read the next line from an ebuffer. If it's a string
|
||||
ebuffer, invoke readstring(). If it's a FILE* ebuffer, read it
|
||||
from the file.
|
||||
|
||||
* dep.h (eval_buffer): Prototype eval_buffer();
|
||||
|
||||
* variable.c (do_variable_definition): Make sure that all
|
||||
non-target-specific variables are registered in the global set.
|
||||
If we're invoked from an $(eval ...) we might be inside a $(call
|
||||
...) or other function which has pushed a variable scope; we still
|
||||
want to define our variables from evaluated makefile code in the
|
||||
global scope.
|
||||
|
||||
2002-07-03 Greg McGary <greg@mcgary.org>
|
||||
|
||||
* dep.h (struct dep) [ignore_mtime]: New member.
|
||||
[changed]: convert to a bitfield.
|
||||
* implicit.c (pattern_search): Zero ignore_mtime.
|
||||
* main.c (main, handle_non_switch_argument): Likewise.
|
||||
* rule.c (convert_suffix_rule): Likewise.
|
||||
* read.c (read_all_makefiles, read_makefile, multi_glob): Likewise.
|
||||
(read_makefile): Parse '|' in prerequisite list.
|
||||
(uniquize_deps): Consider ignore_mtime when comparing deps.
|
||||
* remake.c (update_file_1, check_dep): Don't force remake for
|
||||
dependencies that have d->ignore_mtime.
|
||||
* commands.c (FILE_LIST_SEPARATOR): New constant.
|
||||
(set_file_variables): Don't include a
|
||||
prerequisite in $+, $^ or $? if d->ignore_mtime.
|
||||
Define $|.
|
||||
|
||||
2002-06-18 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* make.texinfo: Updates for next revision. New date/rev/etc.
|
||||
Recreate all Info menus. Change license on the manual to the GNU
|
||||
Free Documentation License. A number of typos.
|
||||
(Variables Simplify): Don't use "-" before it's defined.
|
||||
(Automatic Prerequisites): Rewrite the target example to work
|
||||
properly if the compile fails. Remove incorrect comments about
|
||||
how "set -e" behaves.
|
||||
(Text Functions): Move the "word", "wordlist", "words", and
|
||||
"firstword" functions here, from "File Name Functions".
|
||||
* make-stds.texi: Update from latest GNU version.
|
||||
* fdl.texi: (created) Import the latest GNU version.
|
||||
|
||||
2002-06-06 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (do_variable_definition): New function: extract the
|
||||
part of try_variable_definition() that actually sets the value
|
||||
into a separate function.
|
||||
(try_variable_definition): Call do_variable_definition() after
|
||||
parsing the variable definition string.
|
||||
(define_variable_in_set): Make the name argument const.
|
||||
|
||||
* variable.h (enum variable_flavor): Make public.
|
||||
(do_variable_definition): Create prototype.
|
||||
|
||||
* read.c (read_all_makefiles): Create a new built-in variable,
|
||||
MAKEFILE_LIST.
|
||||
(read_makefile): Add each makefile read in to this variable value.
|
||||
|
||||
2002-05-18 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* Makefile.DOS.template: Tweak according to changes in the
|
||||
distribution. Add back the dependencies of *.o files.
|
||||
|
||||
* configh.dos.template: Synchronize with config.h.in.
|
||||
|
||||
2002-05-09 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* file.c (file_timestamp_now): Use K&R function declaration.
|
||||
|
||||
* getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils
|
||||
getloadavg.c. Autoconf thinks QNX is SVR4-like, but it isn't, so
|
||||
#undef it. Remove predefined setup of NLIST_STRUCT. Decide
|
||||
whether to include nlist.h based on HAVE_NLIST_H. Change obsolete
|
||||
NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME.
|
||||
* configure.in (NLIST_STRUCT): Define this if we have nlist.h and
|
||||
nlist.n_name is a pointer rather than an array.
|
||||
|
||||
* acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest
|
||||
version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS.
|
||||
* configure.in: Use it instead of the old version.
|
||||
|
||||
* main.c (main): Prefer setvbuf() to setlinebuf().
|
||||
|
||||
2002-05-08 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Makefile.am (make_LDADD): Add GETLOADAVG_LIBS.
|
||||
(loadavg_LDADD): Ditto.
|
||||
|
||||
2002-04-29 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* expand.c (recursively_expand_for_file): Rename
|
||||
recursively_expand() to recursively_expand_for_file() and provide
|
||||
an extra argument, struct file. If the argument is provided, set
|
||||
the variable scope to that of the file before expanding.
|
||||
* variable.h (recursively_expand): Make this a macro that invokes
|
||||
recursively_expand_for_file() with a NULL file pointer.
|
||||
* variable.c (target_environment): Call the renamed function and
|
||||
provide the current file context.
|
||||
Fixes Debian bug #144306.
|
||||
|
||||
2002-04-28 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Allow $(call ...) user-defined variables to be self-referencing
|
||||
without throwing an error. Allows implementation of transitive
|
||||
closures, among other possibly useful things.
|
||||
Requested by: Philip Guenther <guenther@sendmail.com>
|
||||
|
||||
* variable.h (struct variable): Add a new field: exp_count, and
|
||||
new macros to hold its size and maximum value.
|
||||
(warn_undefined): Make this a macro.
|
||||
* variable.c (define_variable_in_set): Initialize it.
|
||||
* expand.c (recursively_expand): If we detect recursive expansion
|
||||
of a variable, check the exp_count field. If it's greater than 0
|
||||
allow the recursion and decrement the count.
|
||||
(warn_undefined): Remove this (now a macro in variable.h).
|
||||
* function.c (func_call): Before we expand the user-defined
|
||||
function, modify its exp_count field to contain the maximum
|
||||
number of recursive calls we'll allow. After the call, reset it
|
||||
to 0.
|
||||
|
||||
2002-04-21 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Modified to use latest autoconf (2.53), automake (1.6.1), and
|
||||
gettext (0.11.1). We're using gettext's new "external" support,
|
||||
to avoid including libintl source with GNU make.
|
||||
|
||||
* README.cvs: New file. Explain how to build GNU make from CVS.
|
||||
|
||||
* configure.in: Modify checking for the system glob library.
|
||||
Use AC_EGREP_CPP instead of AC_TRY_CPP. Remove the setting of
|
||||
GLOBDIR (we will always put "glob" in SUBDIRS, so automake
|
||||
etc. will manage it correctly). Set an automake conditional
|
||||
USE_LOCAL_GLOB to decide whether to compile the glob library.
|
||||
|
||||
* getloadavg.c (main): Include make.h in the "TEST" program to
|
||||
avoid warnings.
|
||||
|
||||
* Makefile.am: Remove special rules for loadavg. Replace them
|
||||
with Automake capabilities for building extra programs.
|
||||
|
||||
* signame.c: This file does nothing if the system provide
|
||||
strsignal(). If not, it implements strsignal(). If the system
|
||||
doesn't define sys_siglist, then we make our own; otherwise we use
|
||||
the system version.
|
||||
* signame.h: Removed.
|
||||
|
||||
* main.c (main): No need to invoke signame_init(). Update copyright.
|
||||
|
||||
* ABOUT-NLS: Removed.
|
||||
* gettext.c: Removed.
|
||||
* gettext.h: Get a simplified copy from the gettext package.
|
||||
* po/*: Created.
|
||||
* i18n/*.po: Moved to po/.
|
||||
* i18n/: Removed.
|
||||
|
||||
* config/*: Created. Contains package configuration helper files.
|
||||
* config.guess, config.sub: Moved to config directory.
|
||||
|
||||
* configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile.
|
||||
Rework to use new-style autoconf features. Use the "external"
|
||||
mode for gettext. Make the build.sh config file conditional on
|
||||
whether build.sh.in exists, to avoid autoconf errors.
|
||||
* acinclude.m4: Removed almost all macros as being obsolete.
|
||||
Rewrote remaining macros to use AC_DEFINE.
|
||||
* acconfig.h: Removed.
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Add config/config.rpath. Use a
|
||||
conditional to handle customs support. Remove special handling
|
||||
for i18n features.
|
||||
|
||||
2002-04-20 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* function.c (func_call): Don't mark the argument variables $1,
|
||||
etc. as recursive. They've already been fully expanded so
|
||||
there's no need to do it again, and doing so strips escaped $'s.
|
||||
Reported by Sebastian Glita <glseba@yahoo.com>.
|
||||
|
||||
* remake.c (notice_finished_file): Walk through double-colon
|
||||
entries via the prev field, not the next field!
|
||||
Reported by Greg McGary <greg@mcgary.org>.
|
||||
|
||||
* main.c (main): If the user specifies -q and asks for a specific
|
||||
target which is a makefile, we got an assert. In that case it
|
||||
turns out we should continue normally instead.
|
||||
|
||||
* i18n/de.po, i18n/fr.po: Installed an updated translation.
|
||||
|
||||
* i18n/he.po: Installed a new translation.
|
||||
|
||||
2002-01-07 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/es.po, i18n/ru.po: Installed an updated translation.
|
||||
|
||||
2001-12-04 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/ja.po: Installed an updated translation.
|
||||
|
||||
2001-09-04 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/da.po: Installed an updated translation.
|
||||
|
||||
2001-08-03 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/fr.po: Installed an updated translation.
|
||||
Resolves Debian bug #106720.
|
||||
|
||||
2001-06-13 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/da.po, configure.in (ALL_LINGUAS): Installed a new
|
||||
translation.
|
||||
|
||||
2001-06-11 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/ko.po: Installed a new translation.
|
||||
|
||||
2001-05-06 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Modify the EINTR handling.
|
||||
|
||||
* job.c (new_job): Reorganize the jobserver algorithm. Reorder
|
||||
the way in which we manage the file descriptor/signal handler race
|
||||
trap to be more efficient.
|
||||
|
||||
2001-05-06 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Restart almost all system calls that are interrupted, instead
|
||||
of worrying about EINTR. The lone exception is the read() for
|
||||
job tokens.
|
||||
|
||||
* configure.in (HAVE_SA_RESTART): New macro.
|
||||
(MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART.
|
||||
* main.c (main): Use SA_RESTART instead of the old,
|
||||
nonstandard SA_INTERRUPT.
|
||||
|
||||
* configure.in (AC_CHECK_FUNCS): Add bsd_signal.
|
||||
* main.c (bsd_signal): New function or macro,
|
||||
if the implementation doesn't supply it.
|
||||
(The bsd_signal function will be in POSIX 1003.1-200x.)
|
||||
(HANDLESIG): Remove.
|
||||
(main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG.
|
||||
|
||||
* make.h (EINTR_SET): Remove.
|
||||
(SA_RESTART): New macro.
|
||||
|
||||
* arscan.c (ar_member_touch): Don't worry about EINTR.
|
||||
* function.c (func_shell): Likewise.
|
||||
* job.c (reap_children, free_child, new_job): Likewise.
|
||||
* main.c (main): Likewise.
|
||||
* remake.c (touch_file, name_mtime): Likewise.
|
||||
|
||||
* arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal;
|
||||
if fstat failed with errno!=EINTR, the error was ignored.
|
||||
|
||||
* job.c (set_child_handler_action_flags): New function.
|
||||
(new_job): Use it to temporarily clear the SIGCHLD action flags
|
||||
while reading the token.
|
||||
|
||||
2001-05-02 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* job.c (start_job_command): Don't add define/endef per-line flags
|
||||
to the top-level flags setting.
|
||||
|
||||
2001-04-03 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low
|
||||
bit on error, so check for odd return values, not non-0 return
|
||||
values.
|
||||
(VMS_get_member_info): Calculate the timezone differences correctly.
|
||||
Reported by John Fowler <jfowler@nyx.net>.
|
||||
|
||||
|
||||
2001-03-14 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (lookup_variable) [VMS]: Null-terminate the variable
|
||||
value before invoking define_variable().
|
||||
Reported by John Fowler <jfowler@nyx.net>.
|
||||
|
||||
2001-02-07 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* read.c (record_target_var): If we reset the variable due to a
|
||||
command-line variable setting overriding it, turn off the "append"
|
||||
flag.
|
||||
|
||||
2001-01-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (lookup_variable) [VMS]: When getting values from the
|
||||
environment, allocate enough space for the _value_ plus escapes,
|
||||
not enough space for the name plus escapes :-/.
|
||||
Reported by John Fowler <jfowler@nyx.net>.
|
||||
|
||||
* remake.c (f_mtime): Removed the "***" prefix from the mod time
|
||||
warnings that make generates, so it doesn't look like an error.
|
||||
Reported by Karl Berry <karl@gnu.org>.
|
||||
|
||||
|
||||
Fix for PR/2020: Rework appended target-specific variables. I'm
|
||||
fairly confident this algorithm is finally correct.
|
||||
|
||||
* expand.c (allocated_variable_append): Rewrite. Instead of
|
||||
expanding each appended variable then adding all the expanded
|
||||
strings together, we append all the unexpanded values going up
|
||||
through the variable set contexts, then expand the final result.
|
||||
This behaves just like non-target-specific appended variable
|
||||
values, while the old way didn't in various corner cases.
|
||||
(variable_append): New function: recursively append the unexpanded
|
||||
value of a variable, walking from the outermost variable scope to
|
||||
the innermost.
|
||||
* variable.c (lookup_variable): Remove the code that looked up the
|
||||
variable set list if the found variable was "append". We don't
|
||||
need this anymore.
|
||||
(lookup_variable_in_set): Make this non-static so we can use it
|
||||
elsewhere.
|
||||
(try_variable_definition): Use lookup_variable_in_set() rather
|
||||
than faking out current_variable_set_list by hand (cleanup).
|
||||
* variable.h: Add a prototype for the now non-static
|
||||
lookup_variable_in_set().
|
||||
|
||||
2000-11-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the
|
||||
WINDOWS32 port to assume timestamps can be up to 3 seconds away
|
||||
before throwing a fit.
|
||||
|
||||
2000-11-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* read.c (readline): CRLF calculations had a hole, if you hit the
|
||||
buffer grow scenario just right. Reworked the algorithm to avoid
|
||||
the need for len or lastlen at all. Problem description with
|
||||
sample code chages provided by Chris Faylor <cgf@redhat.com>.
|
||||
|
||||
2000-10-24 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* gettext.c (SWAP): Declare this with the prototype, otherwise
|
||||
some systems don't work (non-32-bit? Reported for Cray T3E).
|
||||
Reported by Thorstein Thorsteinsson <thor@signe.teokem.lu.se>.
|
||||
|
||||
2000-10-05 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro
|
||||
AM_LC_MESSAGES; it doesn't seem to do anything anyway??
|
||||
|
||||
* i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation.
|
||||
|
||||
2000-09-22 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* gettext.c: Don't #define _GETTEXT_H here; we only include some
|
||||
parts of the real gettext.h here, and we expect to really include
|
||||
the real gettext.h later. If we keep this #define, it's ignored.
|
||||
|
||||
2000-09-21 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* main.c (log_working_directory): Rework the text to use complete
|
||||
sentences, to make life simpler for the translators.
|
||||
|
||||
2000-08-29 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* file.c (remove_intermediates): Print a debug message before we
|
||||
remove intermediate files, so the user (if she uses -d) knows
|
||||
what's going on.
|
||||
|
||||
2000-08-21 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (try_variable_definition): Change how we handle
|
||||
target-specific append variable defns: instead of just setting the
|
||||
value, expand it as an append _but_ only within the current
|
||||
target's context. Otherwise we lose all but the last value if the
|
||||
variable is appended more than once within the current target
|
||||
context. Fixes PR/1831.
|
||||
|
||||
2000-08-16 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* function.c (func_shell): Nul-terminate the buffer before
|
||||
printing an exec error message (just in case it's not!).
|
||||
Fixes PR/1860, reported by Joey Hess <joey@valinux.com>.
|
||||
|
||||
2000-07-25 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* job.c (construct_command_argv_internal): Add "~" to the list of
|
||||
sh_chars[] which disallow optimizing out the shell call.
|
||||
|
||||
2000-07-23 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which
|
||||
supersedes --disable-nsec-timestamps.
|
||||
* make.texinfo: Consistently use "time stamp" instead of "timestamp".
|
||||
* README: Remove --disable-nsec-timestamps.
|
||||
|
||||
* filedef.h (struct file.low_resolution_time): New member.
|
||||
* file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME.
|
||||
* remake.c (update_file_1):
|
||||
Avoid spurious rebuilds due to low resolution time stamps,
|
||||
generalizing the earlier code that applied only to archive members.
|
||||
(f_mtime): Archive members always have low resolution time stamps.
|
||||
|
||||
* configure.in: Remove --disable-nsec-timestamps, as this has
|
||||
been superseded by .LOW_RESOLUTION_TIME.
|
||||
|
||||
2000-07-23 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* configure.in (enable_nsec_timestamps): Renamed from
|
||||
make_cv_nsec_timestamps, since enable/disable options
|
||||
shouldn't be cached.
|
||||
|
||||
2000-07-23 Bruno Haible <haible@clisp.cons.org>
|
||||
and Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* file.c (file_timestamp_now):
|
||||
Use preprocessor-time check for FILE_TIMESTAMP_HI_RES
|
||||
so that clock_gettime is not linked unless needed.
|
||||
|
||||
* filedef.h (FILE_TIMESTAMP_HI_RES):
|
||||
Remove definition; "configure" now does this.
|
||||
|
||||
* configure.in (jm_AC_TYPE_UINTMAX_T): Move up,
|
||||
to before high resolution file timestamp check,
|
||||
since that check now uses uintmax_t.
|
||||
(FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use
|
||||
high resolution file timestamps.
|
||||
(HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES,
|
||||
so that we don't link in clock_gettime unnecessarily.
|
||||
|
||||
2000-07-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* i18n/ja.po: New version of the translation file.
|
||||
|
||||
2000-07-07 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* remake.c (f_mtime): If NO_FLOAT is defined, don't bother with
|
||||
the offset calculation.
|
||||
(name_mtime): Replace EINTR test with EINTR_SET macro.
|
||||
|
||||
2000-07-07 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Fix for PR/1811:
|
||||
|
||||
* remake.c (update_file_1):
|
||||
Avoid spurious rebuilds of archive members due to their
|
||||
timestamp resolution being only one second.
|
||||
(f_mtime): Avoid spurious warnings of timestamps in the future due to
|
||||
the clock's resolution being lower than file timestamps'.
|
||||
When warning about future timestamps, report only the discrepancy,
|
||||
not the absolute value of the timestamp and the current time.
|
||||
|
||||
* file.c (file_timestamp_now): New arg RESOLUTION.
|
||||
* filedef.h (file_timestamp_now): Likewise.
|
||||
(FILE_TIMESTAMP_NS): Now returns int. All uses changed.
|
||||
|
||||
2000-07-05 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (lookup_variable) [VMS]: Remove vestigial references
|
||||
to listp. Fixes PR/1793.
|
||||
|
||||
2000-06-26 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it.
|
||||
|
||||
* dir.c (vms_hash): Ensure ctype macro args are nonnegative.
|
||||
|
||||
* remake.c (f_mtime): Remove unused var memtime.
|
||||
|
||||
2000-06-25 Martin Buchholz <martin@xemacs.org>
|
||||
|
||||
* make.texinfo, NEWS, TODO.private: Minor spelling corrections.
|
||||
Ran spell-check on make.texinfo.
|
||||
|
||||
|
||||
See ChangeLog.2 for earlier changes.
|
||||
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/>.
|
||||
|
||||
39
ChangeLog.2
39
ChangeLog.2
@@ -1,18 +1,3 @@
|
||||
2000-06-23 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* main.c (main): Replace EXIT_SUCCESS, EXIT_FAILURE, and
|
||||
EXIT_TROUBLE with MAKE_SUCCESS, MAKE_FAILURE, and MAKE_TROUBLE.
|
||||
* make.h: Define these macros.
|
||||
|
||||
* Version 3.79.1 released.
|
||||
|
||||
* configure.in: Add a new option, --disable-nsec-timestamps, to
|
||||
avoid using sub-second timestamps on systems that support it. It
|
||||
can lead to problems, e.g. if your makefile relies on "cp -p".
|
||||
* README.template: Document the issue with "cp -p".
|
||||
|
||||
* config.guess, config.sub: Updated.
|
||||
|
||||
2000-06-22 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* job.c (start_job_command): Increment commands_started before the
|
||||
@@ -3095,7 +3080,7 @@ Sun May 12 19:19:43 1996 Aaron Digulla <digulla@fh-konstanz.de>
|
||||
* main.c: (main), variable.c Changed handling of ENV-vars. Make
|
||||
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
|
||||
@@ -6645,4 +6630,24 @@ Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
|
||||
|
||||
|
||||
|
||||
See ChangeLog.1 for earlier changes.
|
||||
See ChangeLog.1, available in the Git repository at:
|
||||
|
||||
http://git.savannah.gnu.org/cgit/make.git/tree/
|
||||
|
||||
for earlier changes.
|
||||
|
||||
|
||||
Copyright (C) 1991-2007 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
5633
ChangeLog.3
Normal file
5633
ChangeLog.3
Normal file
File diff suppressed because it is too large
Load Diff
170
INSTALL
170
INSTALL
@@ -1,25 +1,43 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
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, 2002 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-2014 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
|
||||
|
||||
@@ -71,16 +82,15 @@ make_SOURCES = %SOURCES%
|
||||
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
|
||||
SUBDIRS = glob doc
|
||||
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = build.sh
|
||||
@@ -104,14 +114,15 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXINFO_TEX = $(srcdir)/config/texinfo.tex
|
||||
INFO_DEPS = make.info
|
||||
DVIS = make.dvi
|
||||
TEXINFOS = make.texinfo
|
||||
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
|
||||
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)
|
||||
|
||||
@@ -124,7 +135,7 @@ HEADERS = $(wildcard $(srcdir)/*.h)
|
||||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .dvi .info .o .obj .ps .texinfo .tex
|
||||
.SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
|
||||
|
||||
mostlyclean-hdr:
|
||||
|
||||
@@ -174,56 +185,70 @@ make$(EXEEXT): $(make_OBJECTS) $(make_DEPENDENCIES)
|
||||
@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
|
||||
|
||||
.texinfo.info:
|
||||
.texi.info:
|
||||
@command.com /c if exist make.info* del make.info*
|
||||
@command.com /c if exist make.i* del make.i*
|
||||
$(MAKEINFO) -I$(srcdir) $< -o ./$@
|
||||
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||
|
||||
.texinfo:
|
||||
.texi:
|
||||
@command.com /c if exist make.info* del make.info*
|
||||
@command.com /c if exist make.i* del make.i*
|
||||
$(MAKEINFO) -I$(srcdir) $< -o ./$@
|
||||
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||
|
||||
.texinfo.dvi:
|
||||
.texi.dvi:
|
||||
TEXINPUTS="$(srcdir);$$TEXINPUTS" MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||
|
||||
|
||||
.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)
|
||||
@@ -268,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):
|
||||
@@ -287,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
|
||||
|
||||
@@ -299,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
|
||||
|
||||
@@ -353,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
|
||||
|
||||
@@ -443,7 +496,8 @@ maintainer-clean-depend info dvi check-local installcheck \
|
||||
all-recursive-am all-am install-exec-am install-data-am uninstall-am \
|
||||
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
|
||||
@@ -452,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 -)
|
||||
|
||||
@@ -531,38 +585,3 @@ check-regression:
|
||||
.NOEXPORT:
|
||||
|
||||
# --------------- DEPENDENCIES
|
||||
ar.o: ar.c make.h config.h gettext.h filedef.h dep.h glob/fnmatch.h
|
||||
arscan.o: arscan.c make.h config.h gettext.h
|
||||
commands.o: commands.c make.h config.h gettext.h dep.h filedef.h \
|
||||
variable.h job.h commands.h
|
||||
default.o: default.c make.h config.h gettext.h rule.h dep.h filedef.h \
|
||||
job.h commands.h variable.h
|
||||
dir.o: dir.c make.h config.h gettext.h glob/glob.h
|
||||
expand.o: expand.c make.h config.h gettext.h filedef.h job.h commands.h \
|
||||
variable.h rule.h
|
||||
file.o: file.c make.h config.h gettext.h dep.h filedef.h job.h \
|
||||
commands.h variable.h debug.h
|
||||
function.o: function.c make.h config.h gettext.h filedef.h variable.h \
|
||||
dep.h job.h commands.h debug.h
|
||||
getopt.o: getopt.c config.h gettext.h getopt.h
|
||||
getopt1.o: getopt1.c config.h getopt.h
|
||||
implicit.o: implicit.c make.h config.h gettext.h rule.h dep.h filedef.h \
|
||||
debug.h
|
||||
job.o: job.c make.h config.h gettext.h job.h debug.h filedef.h \
|
||||
commands.h variable.h
|
||||
main.o: main.c make.h config.h gettext.h dep.h filedef.h variable.h \
|
||||
job.h commands.h rule.h debug.h getopt.h
|
||||
misc.o: misc.c make.h config.h gettext.h dep.h debug.h
|
||||
read.o: read.c make.h config.h gettext.h glob/glob.h dep.h filedef.h \
|
||||
job.h commands.h variable.h rule.h debug.h
|
||||
remake.o: remake.c make.h config.h gettext.h filedef.h job.h commands.h \
|
||||
dep.h variable.h debug.h
|
||||
remote-stub.o: remote-stub.c make.h config.h gettext.h filedef.h job.h \
|
||||
commands.h
|
||||
rule.o: rule.c make.h config.h gettext.h dep.h filedef.h job.h \
|
||||
commands.h variable.h rule.h
|
||||
signame.o: signame.c make.h config.h gettext.h
|
||||
variable.o: variable.c make.h config.h gettext.h dep.h filedef.h job.h \
|
||||
commands.h variable.h rule.h
|
||||
version.o: version.c config.h
|
||||
vpath.o: vpath.c make.h config.h gettext.h filedef.h variable.h
|
||||
|
||||
132
Makefile.am
132
Makefile.am
@@ -1,11 +1,37 @@
|
||||
# This is a -*-Makefile-*-, or close enough
|
||||
#
|
||||
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.7 dist-bzip2 check-news
|
||||
AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news
|
||||
ACLOCAL_AMFLAGS = -I config
|
||||
|
||||
SUBDIRS = glob config po doc
|
||||
MAKE_HOST = @MAKE_HOST@
|
||||
|
||||
# Only process if target is MS-Windows
|
||||
if WINDOWSENV
|
||||
MAYBE_W32 = w32
|
||||
W32INC = -I $(top_srcdir)/w32/include
|
||||
W32LIB = -Lw32 -lw32
|
||||
endif
|
||||
|
||||
SUBDIRS = glob config po doc $(MAYBE_W32)
|
||||
|
||||
bin_PROGRAMS = make
|
||||
include_HEADERS = gnumake.h
|
||||
|
||||
if USE_CUSTOMS
|
||||
remote = remote-cstms.c
|
||||
@@ -14,47 +40,51 @@ else
|
||||
endif
|
||||
|
||||
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
||||
function.c getopt.c getopt1.c implicit.c job.c main.c \
|
||||
misc.c read.c remake.c $(remote) rule.c signame.c \
|
||||
variable.c version.c vpath.c hash.c
|
||||
function.c getopt.c getopt1.c guile.c implicit.c job.c load.c \
|
||||
loadapi.c main.c misc.c output.c read.c remake.c rule.c \
|
||||
signame.c strcache.c variable.c version.c vpath.c hash.c \
|
||||
$(remote)
|
||||
|
||||
EXTRA_make_SOURCES = remote-stub.c remote-cstms.c
|
||||
EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
|
||||
|
||||
noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
|
||||
debug.h getopt.h gettext.h hash.h
|
||||
noinst_HEADERS = commands.h dep.h filedef.h job.h makeint.h rule.h variable.h \
|
||||
debug.h getopt.h gettext.h hash.h output.h
|
||||
|
||||
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
|
||||
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
|
||||
$(GUILE_LIBS)
|
||||
# Only process if target is MS-Windows
|
||||
if WINDOWSENV
|
||||
make_LDADD += $(W32LIB)
|
||||
endif
|
||||
|
||||
man_MANS = make.1
|
||||
|
||||
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.
|
||||
# Note we need all the glob stuff here, rather than in glob/Makefile.am,
|
||||
# because often that directory isn't built on the systems used by the
|
||||
# maintainers.
|
||||
|
||||
EXTRA_DIST = README build.sh.in $(man_MANS)\
|
||||
README.customs\
|
||||
SCOPTIONS SMakefile\
|
||||
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\
|
||||
EXTRA_DIST = 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\
|
||||
readme.vms makefile.vms makefile.com config.h-vms \
|
||||
vmsdir.h vmsfunctions.c vmsify.c
|
||||
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 \
|
||||
gmk-default.scm gmk-default.h
|
||||
|
||||
MAKE_HOST = @MAKE_HOST@
|
||||
# This is built during configure, but behind configure's back
|
||||
|
||||
|
||||
# Forward targets
|
||||
|
||||
html:
|
||||
cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||
|
||||
.PHONY: html
|
||||
DISTCLEANFILES = build.sh
|
||||
|
||||
# --------------- Internationalization Section
|
||||
|
||||
@@ -66,8 +96,8 @@ localedir = $(datadir)/locale
|
||||
#
|
||||
|
||||
# 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@
|
||||
@@ -83,19 +113,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 .cvsignore -o -name work -prune \) -o \( -name \*.orig -o -name \*.rej -o -name \*~ -prune \) -o -type f -print`; \
|
||||
sub=`find w32 tests -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name Makefile \) -prune -o -type f -print`; \
|
||||
tar chf - $$sub) \
|
||||
| (cd $(distdir); tar xfBp -)
|
||||
|
||||
@@ -113,21 +152,18 @@ check-local: check-regression check-loadavg
|
||||
|
||||
.PHONY: check-loadavg check-regression
|
||||
|
||||
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 thinks:
|
||||
-./loadavg
|
||||
-./loadavg$(EXEEXT)
|
||||
|
||||
# The loadavg function is invoked during "make check" to test getloadavg.
|
||||
noinst_PROGRAMS = loadavg
|
||||
loadavg_SOURCES = loadavg.c
|
||||
loadavg_CFLAGS = -DTEST
|
||||
check_PROGRAMS = loadavg
|
||||
nodist_loadavg_SOURCES = getloadavg.c
|
||||
loadavg_CPPFLAGS = -DTEST
|
||||
loadavg_LDADD = @GETLOADAVG_LIBS@
|
||||
|
||||
loadavg.c: $(srcdir)/getloadavg.c
|
||||
cp $(srcdir)/getloadavg.c loadavg.c
|
||||
|
||||
# > check-regression
|
||||
#
|
||||
# Look for the make test suite, and run it if found and we can find perl.
|
||||
@@ -136,19 +172,19 @@ loadavg.c: $(srcdir)/getloadavg.c
|
||||
#
|
||||
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 \
|
||||
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; \
|
||||
@@ -159,4 +195,10 @@ check-regression:
|
||||
|
||||
# --------------- 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-2014 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
|
||||
|
||||
646
NEWS
646
NEWS
@@ -1,18 +1,385 @@
|
||||
GNU make NEWS -*-indented-text-*-
|
||||
History of user-visible changes.
|
||||
03 October 2002
|
||||
05 Oct 2014
|
||||
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
See the end for copying conditions.
|
||||
See the end of this file for copyrights and conditions.
|
||||
|
||||
All changes mentioned here are more fully described in the GNU make
|
||||
manual, which is contained in this distribution as the file make.texinfo.
|
||||
|
||||
Please send GNU make bug reports to <bug-make@gnu.org>.
|
||||
See the README file and the GNU make manual for details on sending bug
|
||||
reports.
|
||||
manual, which is contained in this distribution as the file doc/make.texi.
|
||||
See the README file and the GNU make manual for instructions for
|
||||
reporting bugs.
|
||||
|
||||
Version 3.80
|
||||
Version 4.1 (05 Oct 2014)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=105&set=custom
|
||||
|
||||
* New variables: $(MAKE_TERMOUT) and $(MAKE_TERMERR) are set to non-empty
|
||||
values if stdout or stderr, respectively, are believed to be writing to a
|
||||
terminal. These variables are exported by default.
|
||||
|
||||
* Allow a no-text-argument form of the $(file ...) function. Without a text
|
||||
argument nothing is written to the file: it is simply opened in the
|
||||
requested mode, then closed again.
|
||||
|
||||
* Change the fatal error for mixed explicit and implicit rules, that was
|
||||
introduced in GNU make 3.82, to a non-fatal error. However, this syntax is
|
||||
still deprecated and may return to being illegal in a future version of GNU
|
||||
make. Makefiles that rely on this syntax should be fixed.
|
||||
See https://savannah.gnu.org/bugs/?33034
|
||||
|
||||
|
||||
Version 4.0 (09 Oct 2013)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=101&set=custom
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
If .POSIX is specified, then make adheres to the POSIX backslash/newline
|
||||
handling requirements, which introduces the following changes to the
|
||||
standard backslash/newline handling in non-recipe lines:
|
||||
* Any trailing space before the backslash is preserved
|
||||
* Each backslash/newline (plus subsequent whitespace) is converted to a
|
||||
single space
|
||||
|
||||
* New feature: GNU Guile integration
|
||||
This version of GNU make can be compiled with GNU Guile integration.
|
||||
GNU Guile serves as an embedded extension language for make.
|
||||
See the "Guile Function" section in the GNU Make manual for details.
|
||||
Currently GNU Guile 1.8 and 2.0+ are supported. In Guile 1.8 there is no
|
||||
support for internationalized character sets. In Guile 2.0+, scripts can be
|
||||
encoded in UTF-8.
|
||||
|
||||
* New command line option: --output-sync (-O) enables grouping of output by
|
||||
target or by recursive make. This is useful during parallel builds to avoid
|
||||
mixing output from different jobs together giving hard-to-understand
|
||||
results. Original implementation by David Boyce <dsb@boyski.com>.
|
||||
Reworked and enhanced by Frank Heckenbach <f.heckenbach@fh-soft.de>.
|
||||
Windows support by Eli Zaretskii <eliz@gnu.org>.
|
||||
|
||||
* New command line option: --trace enables tracing of targets. When enabled
|
||||
the recipe to be invoked is printed even if it would otherwise be suppressed
|
||||
by .SILENT or a "@" prefix character. Also before each recipe is run the
|
||||
makefile name and linenumber where it was defined are shown as well as the
|
||||
prerequisites that caused the target to be considered out of date.
|
||||
|
||||
* New command line option argument: --debug now accepts a "n" (none) flag
|
||||
which disables all debugging settings that are currently enabled.
|
||||
|
||||
* New feature: The "job server" capability is now supported on Windows.
|
||||
Implementation contributed by Troy Runkel <Troy.Runkel@mathworks.com>
|
||||
|
||||
* New feature: The .ONESHELL capability is now supported on Windows. Support
|
||||
added by Eli Zaretskii <eliz@gnu.org>.
|
||||
|
||||
* New feature: "!=" shell assignment operator as an alternative to the
|
||||
$(shell ...) function. Implemented for compatibility with BSD makefiles.
|
||||
Note there are subtle differences between "!=" and $(shell ...). See the
|
||||
description in the GNU make manual.
|
||||
WARNING: Backward-incompatibility!
|
||||
Variables ending in "!" previously defined as "variable!= value" will now be
|
||||
interpreted as shell assignment. Change your assignment to add whitespace
|
||||
between the "!" and "=": "variable! = value"
|
||||
|
||||
* New feature: "::=" simple assignment operator as defined by POSIX in 2012.
|
||||
This operator has identical functionality to ":=" in GNU make, but will be
|
||||
portable to any implementation of make conforming to a sufficiently new
|
||||
version of POSIX (see http://austingroupbugs.net/view.php?id=330). It is
|
||||
not necessary to define the .POSIX target to access this operator.
|
||||
|
||||
* New feature: Loadable objects
|
||||
This version of GNU make contains a "technology preview": the ability to
|
||||
load dynamic objects into the make runtime. These objects can be created by
|
||||
the user and can add extended functionality, usable by makefiles.
|
||||
|
||||
* New function: $(file ...) writes to a file.
|
||||
|
||||
* New variable: $(GNUMAKEFLAGS) will be parsed for make flags, just like
|
||||
MAKEFLAGS is. It can be set in the environment or the makefile, containing
|
||||
GNU make-specific flags to allow your makefile to be portable to other
|
||||
versions of make. Once this variable is parsed, GNU make will set it to the
|
||||
empty string so that flags will not be duplicated on recursion.
|
||||
|
||||
* New variable: `MAKE_HOST' gives the name of the host architecture
|
||||
make was compiled for. This is the same value you see after 'Built for'
|
||||
when running 'make --version'.
|
||||
|
||||
* Behavior of MAKEFLAGS and MFLAGS is more rigorously defined. All simple
|
||||
flags are grouped together in the first word of MAKEFLAGS. No options that
|
||||
accept arguments appear in the first word. If no simple flags are present
|
||||
MAKEFLAGS begins with a space. Flags with both short and long versions
|
||||
always use the short versions in MAKEFLAGS. Flags are listed in
|
||||
alphabetical order using ASCII ordering. MFLAGS never begins with "- ".
|
||||
|
||||
* Setting the -r and -R options in MAKEFLAGS inside a makefile now works as
|
||||
expected, removing all built-in rules and variables, respectively.
|
||||
|
||||
* If a recipe fails, the makefile name and linenumber of the recipe are shown.
|
||||
|
||||
* A .RECIPEPREFIX setting is remembered per-recipe and variables expanded
|
||||
in that recipe also use that recipe prefix setting.
|
||||
|
||||
* In -p output, .RECIPEPREFIX settings are shown and all target-specific
|
||||
variables are output as if in a makefile, instead of as comments.
|
||||
|
||||
* On MS-Windows, recipes that use ".." quoting will no longer force
|
||||
invocation of commands via temporary batch files and stock Windows
|
||||
shells, they will be short-circuited and invoked directly. (In
|
||||
other words, " is no longer a special character for stock Windows
|
||||
shells.) This avoids hitting shell limits for command length when
|
||||
quotes are used, but nothing else in the command requires the shell.
|
||||
This change could potentially mean some minor incompatibilities in
|
||||
behavior when the recipe uses quoted string on shell command lines.
|
||||
|
||||
|
||||
Version 3.82 (28 Jul 2010)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=104&set=custom
|
||||
|
||||
* Compiling GNU make now requires a conforming ISO C 1989 compiler and
|
||||
standard runtime library.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
The POSIX standard for make was changed in the 2008 version in a
|
||||
fundamentally incompatible way: make is required to invoke the shell as if
|
||||
the '-e' flag were provided. Because this would break many makefiles that
|
||||
have been written to conform to the original text of the standard, the
|
||||
default behavior of GNU make remains to invoke the shell with simply '-c'.
|
||||
However, any makefile specifying the .POSIX special target will follow the
|
||||
new POSIX standard and pass '-e' to the shell. See also .SHELLFLAGS
|
||||
below.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
The '$?' variable now contains all prerequisites that caused the target to
|
||||
be considered out of date, even if they do not exist (previously only
|
||||
existing targets were provided in $?).
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
Wildcards were not documented as returning sorted values, but the results
|
||||
have been sorted up until this release.. If your makefiles require sorted
|
||||
results from wildcard expansions, use the $(sort ...) function to request
|
||||
it explicitly.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
As a result of parser enhancements, three backward-compatibility issues
|
||||
exist: first, a prerequisite containing an "=" cannot be escaped with a
|
||||
backslash any longer. You must create a variable containing an "=" and
|
||||
use that variable in the prerequisite. Second, variable names can no
|
||||
longer contain whitespace, unless you put the whitespace in a variable and
|
||||
use the variable. Third, in previous versions of make it was sometimes
|
||||
not flagged as an error for explicit and pattern targets to appear in the
|
||||
same rule. Now this is always reported as an error.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
The pattern-specific variables and pattern rules are now applied in the
|
||||
shortest stem first order instead of the definition order (variables
|
||||
and rules with the same stem length are still applied in the definition
|
||||
order). This produces the usually-desired behavior where more specific
|
||||
patterns are preferred. To detect this feature search for 'shortest-stem'
|
||||
in the .FEATURES special variable.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
The library search behavior has changed to be compatible with the standard
|
||||
linker behavior. Prior to this version for prerequisites specified using
|
||||
the -lfoo syntax make first searched for libfoo.so in the current
|
||||
directory, vpath directories, and system directories. If that didn't yield
|
||||
a match, make then searched for libfoo.a in these directories. Starting
|
||||
with this version make searches first for libfoo.so and then for libfoo.a
|
||||
in each of these directories in order.
|
||||
|
||||
* New command line option: --eval=STRING causes STRING to be evaluated as
|
||||
makefile syntax (akin to using the $(eval ...) function). The evaluation
|
||||
is performed after all default rules and variables are defined, but before
|
||||
any makefiles are read.
|
||||
|
||||
* New special variable: .RECIPEPREFIX allows you to reset the recipe
|
||||
introduction character from the default (TAB) to something else. The
|
||||
first character of this variable value is the new recipe introduction
|
||||
character. If the variable is set to the empty string, TAB is used again.
|
||||
It can be set and reset at will; recipes will use the value active when
|
||||
they were first parsed. To detect this feature check the value of
|
||||
$(.RECIPEPREFIX).
|
||||
|
||||
* New special variable: .SHELLFLAGS allows you to change the options passed
|
||||
to the shell when it invokes recipes. By default the value will be "-c"
|
||||
(or "-ec" if .POSIX is set).
|
||||
|
||||
* New special target: .ONESHELL instructs make to invoke a single instance
|
||||
of the shell and provide it with the entire recipe, regardless of how many
|
||||
lines it contains. As a special feature to allow more straightforward
|
||||
conversion of makefiles to use .ONESHELL, any recipe line control
|
||||
characters ('@', '+', or '-') will be removed from the second and
|
||||
subsequent recipe lines. This happens _only_ if the SHELL value is deemed
|
||||
to be a standard POSIX-style shell. If not, then no interior line control
|
||||
characters are removed (as they may be part of the scripting language used
|
||||
with the alternate SHELL).
|
||||
|
||||
* New variable modifier 'private': prefixing a variable assignment with the
|
||||
modifier 'private' suppresses inheritance of that variable by
|
||||
prerequisites. This is most useful for target- and pattern-specific
|
||||
variables.
|
||||
|
||||
* New make directive: 'undefine' allows you to undefine a variable so that
|
||||
it appears as if it was never set. Both $(flavor) and $(origin) functions
|
||||
will return 'undefined' for such a variable. To detect this feature search
|
||||
for 'undefine' in the .FEATURES special variable.
|
||||
|
||||
* The parser for variable assignments has been enhanced to allow multiple
|
||||
modifiers ('export', 'override', 'private') on the same line as variables,
|
||||
including define/endef variables, and in any order. Also, it is possible
|
||||
to create variables and targets named as these modifiers.
|
||||
|
||||
* The 'define' make directive now allows a variable assignment operator
|
||||
after the variable name, to allow for simple, conditional, or appending
|
||||
multi-line variable assignment.
|
||||
|
||||
|
||||
Version 3.81 (01 Apr 2006)
|
||||
|
||||
* GNU make is ported to OS/2.
|
||||
|
||||
* GNU make is ported to MinGW. The MinGW build is only supported by
|
||||
the build_w32.bat batch file; see the file README.W32 for more
|
||||
details.
|
||||
|
||||
* WARNING: Future backward-incompatibility!
|
||||
Up to and including this release, the '$?' variable does not contain
|
||||
any prerequisite that does not exist, even though that prerequisite
|
||||
might have caused the target to rebuild. Starting with the _next_
|
||||
release of GNU make, '$?' will contain all prerequisites that caused
|
||||
the target to be considered out of date.
|
||||
See http://savannah.gnu.org/bugs/?16051
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
GNU make now implements a generic "second expansion" feature on the
|
||||
prerequisites of both explicit and implicit (pattern) rules. In order
|
||||
to enable this feature, the special target '.SECONDEXPANSION' must be
|
||||
defined before the first target which takes advantage of it. If this
|
||||
feature is enabled then after all rules have been parsed the
|
||||
prerequisites are expanded again, this time with all the automatic
|
||||
variables in scope. This means that in addition to using standard
|
||||
SysV $$@ in prerequisites lists, you can also use complex functions
|
||||
such as $$(notdir $$@) etc. This behavior applies to implicit rules,
|
||||
as well, where the second expansion occurs when the rule is matched.
|
||||
However, this means that when '.SECONDEXPANSION' is enabled you must
|
||||
double-quote any "$" in your filenames; instead of "foo: boo$$bar" you
|
||||
now must write "foo: foo$$$$bar". Note that the SysV $$@ etc. feature,
|
||||
which used to be available by default, is now ONLY available when the
|
||||
.SECONDEXPANSION target is defined. If your makefiles take advantage
|
||||
of this SysV feature you will need to update them.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
In order to comply with POSIX, the way in which GNU make processes
|
||||
backslash-newline sequences in recipes has changed. If your makefiles
|
||||
use backslash-newline sequences inside of single-quoted strings in
|
||||
recipes you will be impacted by this change. See the GNU make manual
|
||||
subsection "Splitting Recipe Lines" (node "Splitting Lines"), in
|
||||
section "Recipe Syntax", chapter "Writing Recipe in Rules", for
|
||||
details.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
Some previous versions of GNU make had a bug where "#" in a function
|
||||
invocation such as $(shell ...) was treated as a make comment. A
|
||||
workaround was to escape these with backslashes. This bug has been
|
||||
fixed: if your makefile uses "\#" in a function invocation the
|
||||
backslash is now preserved, so you'll need to remove it.
|
||||
|
||||
* New command line option: -L (--check-symlink-times). On systems that
|
||||
support symbolic links, if this option is given then GNU make will
|
||||
use the most recent modification time of any symbolic links that are
|
||||
used to resolve target files. The default behavior remains as it
|
||||
always has: use the modification time of the actual target file only.
|
||||
|
||||
* The "else" conditional line can now be followed by any other valid
|
||||
conditional on the same line: this does not increase the depth of the
|
||||
conditional nesting, so only one "endif" is required to close the
|
||||
conditional.
|
||||
|
||||
* All pattern-specific variables that match a given target are now used
|
||||
(previously only the first match was used).
|
||||
|
||||
* Target-specific variables can be marked as exportable using the
|
||||
"export" keyword.
|
||||
|
||||
* In a recursive $(call ...) context, any extra arguments from the outer
|
||||
call are now masked in the context of the inner call.
|
||||
|
||||
* Implemented a solution for the "thundering herd" problem with "-j -l".
|
||||
This version of GNU make uses an algorithm suggested by Thomas Riedl
|
||||
<thomas.riedl@siemens.com> to track the number of jobs started in the
|
||||
last second and artificially adjust GNU make's view of the system's
|
||||
load average accordingly.
|
||||
|
||||
* New special variables available in this release:
|
||||
- .INCLUDE_DIRS: Expands to a list of directories that make searches
|
||||
for included makefiles.
|
||||
- .FEATURES: Contains a list of special features available in this
|
||||
version of GNU make.
|
||||
- .DEFAULT_GOAL: Set the name of the default goal make will
|
||||
use if no goals are provided on the command line.
|
||||
- MAKE_RESTARTS: If set, then this is the number of times this
|
||||
instance of make has been restarted (see "How Makefiles Are Remade"
|
||||
in the manual).
|
||||
- New automatic variable: $| (added in 3.80, actually): contains all
|
||||
the order-only prerequisites defined for the target.
|
||||
|
||||
* New functions available in this release:
|
||||
- $(lastword ...) returns the last word in the list. This gives
|
||||
identical results as $(word $(words ...) ...), but is much faster.
|
||||
- $(abspath ...) returns the absolute path (all "." and ".."
|
||||
directories resolved, and any duplicate "/" characters removed) for
|
||||
each path provided.
|
||||
- $(realpath ...) returns the canonical pathname for each path
|
||||
provided. The canonical pathname is the absolute pathname, with
|
||||
all symbolic links resolved as well.
|
||||
- $(info ...) prints its arguments to stdout. No makefile name or
|
||||
line number info, etc. is printed.
|
||||
- $(flavor ...) returns the flavor of a variable.
|
||||
- $(or ...) provides a short-circuiting OR conditional: each argument
|
||||
is expanded. The first true (non-empty) argument is returned; no
|
||||
further arguments are expanded. Expands to empty if there are no
|
||||
true arguments.
|
||||
- $(and ...) provides a short-circuiting AND conditional: each
|
||||
argument is expanded. The first false (empty) argument is
|
||||
returned; no further arguments are expanded. Expands to the last
|
||||
argument if all arguments are true.
|
||||
|
||||
* Changes made for POSIX compatibility:
|
||||
- Only touch targets (under -t) if they have a recipe.
|
||||
- Setting the SHELL make variable does NOT change the value of the
|
||||
SHELL environment variable given to programs invoked by make. As
|
||||
an enhancement to POSIX, if you export the make variable SHELL then
|
||||
it will be set in the environment, just as before.
|
||||
|
||||
* On MS Windows systems, explicitly setting SHELL to a pathname ending
|
||||
in "cmd" or "cmd.exe" (case-insensitive) will force GNU make to use
|
||||
the DOS command interpreter in batch mode even if a UNIX-like shell
|
||||
could be found on the system.
|
||||
|
||||
* On VMS there is now support for case-sensitive filesystems such as ODS5.
|
||||
See the README.VMS file for information.
|
||||
|
||||
* Parallel builds (-jN) no longer require a working Bourne shell on
|
||||
Windows platforms. They work even with the stock Windows shells, such
|
||||
as cmd.exe and command.com.
|
||||
|
||||
* Updated to autoconf 2.59, automake 1.9.5, and gettext 0.14.1. Users
|
||||
should not be impacted.
|
||||
|
||||
* New translations for Swedish, Chinese (simplified), Ukrainian,
|
||||
Belarusian, Finnish, Kinyarwandan, and Irish. Many updated
|
||||
translations.
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=103
|
||||
|
||||
|
||||
Version 3.80 (03 Oct 2002)
|
||||
|
||||
* A new feature exists: order-only prerequisites. These prerequisites
|
||||
affect the order in which targets are built, but they do not impact
|
||||
@@ -55,7 +422,7 @@ Version 3.80
|
||||
expanded it returns a complete list of variable names defined by all
|
||||
makefiles at that moment.
|
||||
|
||||
* A new command-line option is defined, -B or --always-make. If
|
||||
* A new command line option is defined, -B or --always-make. If
|
||||
specified GNU make will consider all targets out-of-date even if they
|
||||
would otherwise not be.
|
||||
|
||||
@@ -88,8 +455,13 @@ Version 3.80
|
||||
See ABOUT-NLS for more information.
|
||||
|
||||
* Updated to autoconf 2.54 and automake 1.7. Users should not be impacted.
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=102
|
||||
|
||||
|
||||
Version 3.79.1
|
||||
Version 3.79.1 (23 Jun 2000)
|
||||
|
||||
* .SECONDARY with no prerequisites now prevents any target from being
|
||||
removed because make thinks it's an intermediate file, not just those
|
||||
@@ -98,7 +470,7 @@ Version 3.79.1
|
||||
* New configure option --disable-nsec-timestamps, but this was
|
||||
superseded in later versions by the .LOW_RESOLUTION_TIME pseudo-target.
|
||||
|
||||
Version 3.79
|
||||
Version 3.79 (04 Apr 2000)
|
||||
|
||||
* GNU make optionally supports internationalization and locales via the
|
||||
GNU gettext (or local gettext if suitable) package. See the ABOUT-NLS
|
||||
@@ -139,9 +511,9 @@ Version 3.79
|
||||
returned.
|
||||
|
||||
* Hartmut Becker provided many updates for the VMS port of GNU make.
|
||||
See the readme.vms file for more details.
|
||||
See the README.VMS file for more details.
|
||||
|
||||
Version 3.78
|
||||
Version 3.78 (22 Sep 1999)
|
||||
|
||||
* Two new functions, $(error ...) and $(warning ...) are available. The
|
||||
former will cause make to fail and exit immediately upon expansion of
|
||||
@@ -197,7 +569,7 @@ Version 3.78
|
||||
by running "make check" in the distribution. Note that it requires
|
||||
Perl (either Perl 4 or Perl 5) to run.
|
||||
|
||||
Version 3.77
|
||||
Version 3.77 (28 Jul 1998)
|
||||
|
||||
* Implement BSD make's "?=" variable assignment operator. The variable
|
||||
is assigned the specified value only if that variable is not already
|
||||
@@ -243,11 +615,11 @@ Version 3.77
|
||||
* Updates to the Windows 95/NT port from Rob Tulloh (see README.W32),
|
||||
and to the DOS port from Eli Zaretski (see README.DOS).
|
||||
|
||||
Version 3.76.1
|
||||
Version 3.76.1 (19 Sep 1997)
|
||||
|
||||
* Small (but serious) bug fix. Quick rollout to get into the GNU source CD.
|
||||
|
||||
Version 3.76
|
||||
Version 3.76 (16 Sep 1997)
|
||||
|
||||
* GNU make now uses automake to control Makefile.in generation. This
|
||||
should make it more consistent with the GNU standards.
|
||||
@@ -292,7 +664,7 @@ Version 3.76
|
||||
|
||||
* John W. Eaton has updated the VMS port to support libraries and VPATH.
|
||||
|
||||
Version 3.75
|
||||
Version 3.75 (27 Aug 1996)
|
||||
|
||||
* The directory messages printed by `-w' and implicitly in sub-makes,
|
||||
are now omitted if Make runs no commands and has no other messages to print.
|
||||
@@ -313,7 +685,7 @@ Version 3.75
|
||||
See README.W32 for details, and direct all Windows-related questions to
|
||||
<rob_tulloh@tivoli.com>.
|
||||
|
||||
Version 3.73
|
||||
Version 3.73 (05 Apr 1995)
|
||||
|
||||
* Converted to use Autoconf version 2, so `configure' has some new options.
|
||||
See INSTALL for details.
|
||||
@@ -321,7 +693,7 @@ Version 3.73
|
||||
* You can now send a SIGUSR1 signal to Make to toggle printing of debugging
|
||||
output enabled by -d, at any time during the run.
|
||||
|
||||
Version 3.72
|
||||
Version 3.72 (04 Nov 1994)
|
||||
|
||||
* DJ Delorie has ported Make to MS-DOS using the GO32 extender.
|
||||
He is maintaining the DOS port, not the GNU Make maintainer;
|
||||
@@ -331,7 +703,7 @@ Version 3.72
|
||||
|
||||
* The `MAKEFLAGS' variable (in the environment or in a makefile) can now
|
||||
contain variable definitions itself; these are treated just like
|
||||
command-line variable definitions. Make will automatically insert any
|
||||
command line variable definitions. Make will automatically insert any
|
||||
variable definitions from the environment value of `MAKEFLAGS' or from
|
||||
the command line, into the `MAKEFLAGS' value exported to children. The
|
||||
`MAKEOVERRIDES' variable previously included in the value of `$(MAKE)'
|
||||
@@ -340,8 +712,8 @@ Version 3.72
|
||||
in the environment when its size is limited.
|
||||
|
||||
* If `.DELETE_ON_ERROR' appears as a target, Make will delete the target of
|
||||
a rule if it has changed when its commands exit with a nonzero status,
|
||||
just as when the commands get a signal.
|
||||
a rule if it has changed when its recipe exits with a nonzero status,
|
||||
just as when the recipe gets a signal.
|
||||
|
||||
* The automatic variable `$+' is new. It lists all the dependencies like
|
||||
`$^', but preserves duplicates listed in the makefile. This is useful
|
||||
@@ -351,11 +723,11 @@ Version 3.72
|
||||
* You can now specify the `.IGNORE' and `.SILENT' special targets with
|
||||
dependencies to limit their effects to those files. If a file appears as
|
||||
a dependency of `.IGNORE', then errors will be ignored while running the
|
||||
commands to update that file. Likewise if a file appears as a dependency
|
||||
of `.SILENT', then the commands to update that file will not be printed
|
||||
before they are run. (This change was made to conform to POSIX.2.)
|
||||
recipe to update that file. Likewise if a file appears as a dependency
|
||||
of `.SILENT', then the recipe to update that file will not be printed
|
||||
before it is run. (This change was made to conform to POSIX.2.)
|
||||
|
||||
Version 3.71
|
||||
Version 3.71 (21 May 1994)
|
||||
|
||||
* The automatic variables `$(@D)', `$(%D)', `$(*D)', `$(<D)', `$(?D)', and
|
||||
`$(^D)' now omit the trailing slash from the directory name. (This change
|
||||
@@ -377,7 +749,7 @@ Version 3.71
|
||||
The exit status is 1 only when using -q and some target is not up to date.
|
||||
(This change was made to comply with POSIX.2.)
|
||||
|
||||
Version 3.70
|
||||
Version 3.70 (03 Jan 1994)
|
||||
|
||||
* It is no longer a fatal error to have a NUL character in a makefile.
|
||||
You should never put a NUL in a makefile because it can have strange
|
||||
@@ -388,7 +760,7 @@ Version 3.70
|
||||
makefile name and line number where the `include' appeared, so Emacs's
|
||||
C-x ` command takes you there (in case it's a typo you need to fix).
|
||||
|
||||
Version 3.69
|
||||
Version 3.69 (07 Nov 1993)
|
||||
|
||||
* Implicit rule search for archive member references is now done in the
|
||||
opposite order from previous versions: the whole target name `LIB(MEM)'
|
||||
@@ -401,24 +773,24 @@ Version 3.69
|
||||
Make, and a string describing the remote job support compiled in (if any).
|
||||
Thus the value (in this release) is something like `3.69' or `3.69-Customs'.
|
||||
|
||||
* Commands in an invocation of the `shell' function are no longer run with
|
||||
a modified environment like target commands are. As in versions before
|
||||
* Commands in an invocation of the `shell' function are no longer run
|
||||
with a modified environment like recipes are. As in versions before
|
||||
3.68, they now run with the environment that `make' started with. We
|
||||
have reversed the change made in version 3.68 because it turned out to
|
||||
cause a paradoxical situation in cases like:
|
||||
|
||||
export variable = $(shell echo value)
|
||||
export variable = $(shell echo value)
|
||||
|
||||
When Make attempted to put this variable in the environment for a target
|
||||
command, it would try expand the value by running the shell command
|
||||
When Make attempted to put this variable in the environment for a
|
||||
recipe, it would try expand the value by running the shell command
|
||||
`echo value'. In version 3.68, because it constructed an environment
|
||||
for that shell command in the same way, Make would begin to go into an
|
||||
infinite loop and then get a fatal error when it detected the loop.
|
||||
|
||||
* The commands given for `.DEFAULT' are now used for phony targets with no
|
||||
commands.
|
||||
* The recipe given for `.DEFAULT' is now used for phony targets with no
|
||||
recipe.
|
||||
|
||||
Version 3.68
|
||||
Version 3.68 (28 Jul 1993)
|
||||
|
||||
* You can list several archive member names inside parenthesis:
|
||||
`lib(mem1 mem2 mem3)' is equivalent to `lib(mem1) lib(mem2) lib(mem3)'.
|
||||
@@ -430,8 +802,8 @@ Version 3.68
|
||||
foo.a(b.o) bar.a(c.o) bar.a(d.o)'.
|
||||
|
||||
* A suffix rule `.X.a' now produces two pattern rules:
|
||||
(%.o): %.X # Previous versions produced only this.
|
||||
%.a: %.X # Now produces this as well, just like other suffixes.
|
||||
(%.o): %.X # Previous versions produced only this.
|
||||
%.a: %.X # Now produces this as well, just like other suffixes.
|
||||
|
||||
* The new flag `--warn-undefined-variables' says to issue a warning message
|
||||
whenever Make expands a reference to an undefined variable.
|
||||
@@ -440,20 +812,20 @@ Version 3.68
|
||||
no error (not even a warning) for a nonexistent makefile.
|
||||
|
||||
* Commands in an invocation of the `shell' function are now run with a
|
||||
modified environment like target commands are, so you can use `export' et
|
||||
al to set up variables for them. They used to run with the environment
|
||||
modified environment like recipes are, so you can use `export' et al
|
||||
to set up variables for them. They used to run with the environment
|
||||
that `make' started with.
|
||||
|
||||
Version 3.66
|
||||
Version 3.66 (21 May 1993)
|
||||
|
||||
* `make --version' (or `make -v') now exits immediately after printing
|
||||
the version number.
|
||||
|
||||
Version 3.65
|
||||
Version 3.65 (09 May 1993)
|
||||
|
||||
* Make now supports long-named members in `ar' archive files.
|
||||
|
||||
Version 3.64
|
||||
Version 3.64 (21 Apr 1993)
|
||||
|
||||
* Make now supports the `+=' syntax for a variable definition which appends
|
||||
to the variable's previous value. See the section `Appending More Text
|
||||
@@ -467,7 +839,7 @@ Version 3.64
|
||||
* The built-in implicit rules now support the alternative extension
|
||||
`.txinfo' for Texinfo files, just like `.texinfo' and `.texi'.
|
||||
|
||||
Version 3.63
|
||||
Version 3.63 (22 Jan 1993)
|
||||
|
||||
* Make now uses a standard GNU `configure' script. See the new file
|
||||
INSTALL for the new (and much simpler) installation procedure.
|
||||
@@ -485,8 +857,8 @@ Version 3.63
|
||||
change directory, and recursive use of Make, now set `-w' automatically.
|
||||
|
||||
* Multiple double-colon rules for the same target will no longer have their
|
||||
commands run simultaneously under -j, as this could result in the two
|
||||
commands trying to change the file at the same time and interfering with
|
||||
recipes run simultaneously under -j, as this could result in the two
|
||||
recipes trying to change the file at the same time and interfering with
|
||||
one another.
|
||||
|
||||
* The `SHELL' variable is now never taken from the environment.
|
||||
@@ -498,23 +870,23 @@ Version 3.63
|
||||
that tells you what all the options are and what they do. Try `make --help'.
|
||||
|
||||
* There are two new directives: `export' and `unexport'. All variables are
|
||||
no longer automatically put into the environments of the commands that
|
||||
no longer automatically put into the environments of the recipe lines that
|
||||
Make runs. Instead, only variables specified on the command line or in
|
||||
the environment are exported by default. To export others, use:
|
||||
export VARIABLE
|
||||
export VARIABLE
|
||||
or you can define variables with:
|
||||
export VARIABLE = VALUE
|
||||
export VARIABLE = VALUE
|
||||
or:
|
||||
export VARIABLE := VALUE
|
||||
export VARIABLE := VALUE
|
||||
You can use just:
|
||||
export
|
||||
export
|
||||
or:
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
to get the old behavior. See the node `Variables/Recursion' in the manual
|
||||
for a full description.
|
||||
|
||||
* The commands from the `.DEFAULT' special target are only applied to
|
||||
targets which have no rules at all, not all targets with no commands.
|
||||
* The recipe from the `.DEFAULT' special target is only applied to
|
||||
targets which have no rules at all, not all targets with no recipe.
|
||||
This change was made for compatibility with Unix make.
|
||||
|
||||
* All fatal error messages now contain `***', so they are easy to find in
|
||||
@@ -529,9 +901,9 @@ Version 3.63
|
||||
|
||||
* A single `include' directive can now specify more than one makefile to
|
||||
include, like this:
|
||||
include file1 file2
|
||||
include file1 file2
|
||||
You can also use shell file name patterns in an `include' directive:
|
||||
include *.mk
|
||||
include *.mk
|
||||
|
||||
* The default directories to search for included makefiles, and for
|
||||
libraries specified with `-lNAME', are now set by configuration.
|
||||
@@ -566,8 +938,8 @@ Version 3.61
|
||||
* Built-in rules for C++ source files with the `.C' suffix.
|
||||
We still recommend that you use `.cc' instead.
|
||||
|
||||
* If commands are given too many times for a single target,
|
||||
the last set given is used, and a warning message is printed.
|
||||
* If a recipe is given too many times for a single target, the last one
|
||||
given is used, and a warning message is printed.
|
||||
|
||||
* Error messages about makefiles are in standard GNU error format,
|
||||
so C-x ` in Emacs works on them.
|
||||
@@ -584,7 +956,7 @@ Version 3.60
|
||||
|
||||
* Archives on AIX now supposedly work.
|
||||
|
||||
* When the commands specified for .DEFAULT are used to update a target,
|
||||
* When the recipes specified for .DEFAULT are used to update a target,
|
||||
the $< automatic variable is given the same value as $@ for that target.
|
||||
This is how Unix make behaves, and this behavior is mandated by POSIX.2.
|
||||
|
||||
@@ -609,18 +981,18 @@ Version 3.57
|
||||
|
||||
Version 3.55
|
||||
|
||||
* There is now a Unix man page for GNU Make. It is certainly not a replacement
|
||||
for the Texinfo manual, but it documents the basic functionality and the
|
||||
switches. For full documentation, you should still read the Texinfo manual.
|
||||
Thanks to Dennis Morse of Stanford University for contributing the initial
|
||||
version of this.
|
||||
* There is now a Unix man page for GNU Make. It is certainly not a
|
||||
replacement for the Texinfo manual, but it documents the basic
|
||||
functionality and the switches. For full documentation, you should
|
||||
still read the Texinfo manual. Thanks to Dennis Morse of Stanford
|
||||
University for contributing the initial version of this.
|
||||
|
||||
* Variables which are defined by default (e.g., `CC') will no longer be put
|
||||
into the environment for child processes. (If these variables are reset by the
|
||||
environment, makefiles, or the command line, they will still go into the
|
||||
environment.)
|
||||
* Variables which are defined by default (e.g., `CC') will no longer be
|
||||
put into the environment for child processes. (If these variables are
|
||||
reset by the environment, makefiles, or the command line, they will
|
||||
still go into the environment.)
|
||||
|
||||
* Makefiles which have commands but no dependencies (and thus are always
|
||||
* Makefiles which have recipes but no dependencies (and thus are always
|
||||
considered out of date and in need of remaking), will not be remade (if they
|
||||
were being remade only because they were makefiles). This means that GNU
|
||||
Make will no longer go into an infinite loop when fed the makefiles that
|
||||
@@ -632,45 +1004,45 @@ pathname (instead of a `%' pattern).
|
||||
Version 3.51
|
||||
|
||||
* When removing intermediate files, only one `rm' command line is printed,
|
||||
listing all file names.
|
||||
listing all file names.
|
||||
|
||||
* There are now automatic variables `$(^D)', `$(^F)', `$(?D)', and `$(?F)'.
|
||||
These are the directory-only and file-only versions of `$^' and `$?'.
|
||||
These are the directory-only and file-only versions of `$^' and `$?'.
|
||||
|
||||
* Library dependencies given as `-lNAME' will use "libNAME.a" in the current
|
||||
directory if it exists.
|
||||
directory if it exists.
|
||||
|
||||
* The automatic variable `$($/)' is no longer defined.
|
||||
|
||||
* Leading `+' characters on a command line make that line be executed even
|
||||
under -n, -t, or -q (as if the line contained `$(MAKE)').
|
||||
* Leading `+' characters on a recipe line make that line be executed even
|
||||
under -n, -t, or -q (as if the line contained `$(MAKE)').
|
||||
|
||||
* For command lines containing `$(MAKE)', `${MAKE}', or leading `+' characters,
|
||||
only those lines are executed, not their entire rules.
|
||||
(This is how Unix make behaves for lines containing `$(MAKE)' or `${MAKE}'.)
|
||||
* For recipe lines containing `$(MAKE)', `${MAKE}', or leading `+' characters,
|
||||
only those lines are executed, not the entire recipe.
|
||||
(This is how Unix make behaves for lines containing `$(MAKE)' or `${MAKE}'.)
|
||||
|
||||
Version 3.50
|
||||
|
||||
* Filenames in rules will now have ~ and ~USER expanded.
|
||||
|
||||
* The `-p' output has been changed so it can be used as a makefile.
|
||||
(All information that isn't specified by makefiles is prefaced with comment
|
||||
characters.)
|
||||
(All information that isn't specified by makefiles is prefaced with comment
|
||||
characters.)
|
||||
|
||||
Version 3.49
|
||||
|
||||
* The % character can be quoted with backslash in implicit pattern rules,
|
||||
static pattern rules, `vpath' directives, and `patsubst', `filter', and
|
||||
`filter-out' functions. A warning is issued if a `vpath' directive's
|
||||
pattern contains no %.
|
||||
static pattern rules, `vpath' directives, and `patsubst', `filter', and
|
||||
`filter-out' functions. A warning is issued if a `vpath' directive's
|
||||
pattern contains no %.
|
||||
|
||||
* The `wildcard' variable expansion function now expands ~ and ~USER.
|
||||
|
||||
* Messages indicating failed commands now contain the target name:
|
||||
make: *** [target] Error 1
|
||||
* Messages indicating failed recipe lines now contain the target name:
|
||||
make: *** [target] Error 1
|
||||
|
||||
* The `-p' output format has been changed somewhat to look more like
|
||||
makefile rules and to give all information that Make has about files.
|
||||
makefile rules and to give all information that Make has about files.
|
||||
|
||||
Version 3.48
|
||||
|
||||
@@ -679,49 +1051,49 @@ Version 3.47
|
||||
* The `-l' switch with no argument removes any previous load-average limit.
|
||||
|
||||
* When the `-w' switch is in effect, and Make has updated makefiles,
|
||||
it will write a `Leaving directory' messagfe before re-executing itself.
|
||||
This makes the `directory change tracking' changes to Emacs's compilation
|
||||
commands work properly.
|
||||
it will write a `Leaving directory' message before re-executing itself.
|
||||
This makes the `directory change tracking' changes to Emacs's compilation
|
||||
commands work properly.
|
||||
|
||||
Version 3.46
|
||||
|
||||
* The automatic variable `$*' is now defined for explicit rules,
|
||||
as it is in Unix make.
|
||||
as it is in Unix make.
|
||||
|
||||
Version 3.45
|
||||
|
||||
* The `-j' switch is now put in the MAKEFLAGS and MFLAGS variables when
|
||||
specified without an argument (indicating infinite jobs).
|
||||
The `-l' switch is not always put in the MAKEFLAGS and MFLAGS variables.
|
||||
specified without an argument (indicating infinite jobs).
|
||||
The `-l' switch is not always put in the MAKEFLAGS and MFLAGS variables.
|
||||
|
||||
* Make no longer checks hashed directories after running commands.
|
||||
The behavior implemented in 3.41 caused too much slowdown.
|
||||
* Make no longer checks hashed directories after running recipes.
|
||||
The behavior implemented in 3.41 caused too much slowdown.
|
||||
|
||||
Version 3.44
|
||||
|
||||
* A dependency is NOT considered newer than its dependent if
|
||||
they have the same modification time. The behavior implemented
|
||||
in 3.43 conflicts with RCS.
|
||||
they have the same modification time. The behavior implemented
|
||||
in 3.43 conflicts with RCS.
|
||||
|
||||
Version 3.43
|
||||
|
||||
* Dependency loops are no longer fatal errors.
|
||||
|
||||
* A dependency is considered newer than its dependent if
|
||||
they have the same modification time.
|
||||
they have the same modification time.
|
||||
|
||||
Version 3.42
|
||||
|
||||
* The variables F77 and F77FLAGS are now set by default to $(FC) and
|
||||
$(FFLAGS). Makefiles designed for System V make may use these variables in
|
||||
explicit rules and expect them to be set. Unfortunately, there is no way to
|
||||
make setting these affect the Fortran implicit rules unless FC and FFLAGS
|
||||
are not used (and these are used by BSD make).
|
||||
$(FFLAGS). Makefiles designed for System V make may use these variables in
|
||||
explicit rules and expect them to be set. Unfortunately, there is no way to
|
||||
make setting these affect the Fortran implicit rules unless FC and FFLAGS
|
||||
are not used (and these are used by BSD make).
|
||||
|
||||
Version 3.41
|
||||
|
||||
* Make now checks to see if its hashed directories are changed by commands.
|
||||
Other makes that hash directories (Sun, 4.3 BSD) don't do this.
|
||||
* Make now checks to see if its hashed directories are changed by recipes.
|
||||
Other makes that hash directories (Sun, 4.3 BSD) don't do this.
|
||||
|
||||
Version 3.39
|
||||
|
||||
@@ -730,7 +1102,7 @@ Version 3.39
|
||||
Version 3.32
|
||||
|
||||
* A file beginning with a dot can be the default target if it also contains
|
||||
a slash (e.g., `../bin/foo'). (Unix make allows this as well.)
|
||||
a slash (e.g., `../bin/foo'). (Unix make allows this as well.)
|
||||
|
||||
Version 3.31
|
||||
|
||||
@@ -739,8 +1111,8 @@ Version 3.31
|
||||
* Yet more USG stuff.
|
||||
|
||||
* Minimal support for Microport System V (a 16-bit machine and a
|
||||
brain-damaged compiler). This has even lower priority than other USG
|
||||
support, so if it gets beyond trivial, I will take it out completely.
|
||||
brain-damaged compiler). This has even lower priority than other USG
|
||||
support, so if it gets beyond trivial, I will take it out completely.
|
||||
|
||||
* Revamped default implicit rules (not much visible change).
|
||||
|
||||
@@ -751,13 +1123,13 @@ Version 3.30
|
||||
* Improved support for USG and HPUX (hopefully).
|
||||
|
||||
* A variable reference like `$(foo:a=b)', if `a' contains a `%', is
|
||||
equivalent to `$(patsubst a,b,$(foo))'.
|
||||
equivalent to `$(patsubst a,b,$(foo))'.
|
||||
|
||||
* Defining .DEFAULT with no deps or commands clears its commands.
|
||||
* Defining .DEFAULT with no deps or recipe clears its recipe.
|
||||
|
||||
* New default implicit rules for .S (cpp, then as), and .sh (copy and make
|
||||
executable). All default implicit rules that use cpp (even indirectly), use
|
||||
$(CPPFLAGS).
|
||||
* New default implicit rules for .S (cpp, then as), and .sh (copy and
|
||||
make executable). All default implicit rules that use cpp (even
|
||||
indirectly), use $(CPPFLAGS).
|
||||
|
||||
Version 3.29
|
||||
|
||||
@@ -766,21 +1138,21 @@ Version 3.29
|
||||
Version 3.28
|
||||
|
||||
* New option: "-l LOAD" says not to start any new jobs while others are
|
||||
running if the load average is not below LOAD (a floating-point number).
|
||||
running if the load average is not below LOAD (a floating-point number).
|
||||
|
||||
* There is support in place for implementations of remote command execution
|
||||
in Make. See the file remote.c.
|
||||
in Make. See the file remote.c.
|
||||
|
||||
Version 3.26
|
||||
|
||||
* No more than 10 directories will be kept open at once.
|
||||
(This number can be changed by redefining MAX_OPEN_DIRECTORIES in dir.c.)
|
||||
(This number can be changed by redefining MAX_OPEN_DIRECTORIES in dir.c.)
|
||||
|
||||
Version 3.25
|
||||
|
||||
* Archive files will have their modification times recorded before doing
|
||||
anything that might change their modification times by updating an archive
|
||||
member.
|
||||
anything that might change their modification times by updating an archive
|
||||
member.
|
||||
|
||||
Version 3.20
|
||||
|
||||
@@ -789,25 +1161,25 @@ Version 3.20
|
||||
Version 3.19
|
||||
|
||||
* The recursion level indications in error messages are much shorter than
|
||||
they were in version 3.14.
|
||||
they were in version 3.14.
|
||||
|
||||
Version 3.18
|
||||
|
||||
* Leading spaces before directives are ignored (as documented).
|
||||
|
||||
* Included makefiles can determine the default goal target.
|
||||
(System V Make does it this way, so we are being compatible).
|
||||
(System V Make does it this way, so we are being compatible).
|
||||
|
||||
Version 3.14.
|
||||
|
||||
* Variables that are defaults built into Make will not be put in the
|
||||
environment for children. This just saves some environment space and,
|
||||
except under -e, will be transparent to sub-makes.
|
||||
environment for children. This just saves some environment space and,
|
||||
except under -e, will be transparent to sub-makes.
|
||||
|
||||
* Error messages from sub-makes will indicate the level of recursion.
|
||||
|
||||
* Hopefully some speed-up for large directories due to a change in the
|
||||
directory hashing scheme.
|
||||
directory hashing scheme.
|
||||
|
||||
* One child will always get a standard input that is usable.
|
||||
|
||||
@@ -816,7 +1188,7 @@ directory hashing scheme.
|
||||
Version 3.13.
|
||||
|
||||
* Count parentheses inside expansion function calls so you can
|
||||
have nested calls: `$(sort $(foreach x,a b,$(x)))'.
|
||||
have nested calls: `$(sort $(foreach x,a b,$(x)))'.
|
||||
|
||||
Version 3.12.
|
||||
|
||||
@@ -832,28 +1204,32 @@ Version 3.12.
|
||||
|
||||
* Makefiles will be updated and re-read if necessary.
|
||||
|
||||
* Can now run several commands at once (parallelism), -j option.
|
||||
* Can now run several recipes at once (parallelism), -j option.
|
||||
|
||||
* Error messages will contain the level of Make recursion, if any.
|
||||
|
||||
* The `MAKEFLAGS' and `MFLAGS' variables will be scanned for options after
|
||||
makefiles are read.
|
||||
makefiles are read.
|
||||
|
||||
* A double-colon rule with no dependencies will always have its commands run.
|
||||
(This is how both the BSD and System V versions of Make do it.)
|
||||
* A double-colon rule with no dependencies will always have its recipe run.
|
||||
(This is how both the BSD and System V versions of Make do it.)
|
||||
|
||||
Version 3.05
|
||||
|
||||
(Changes from versions 1 through 3.05 were never recorded. Sorry.)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Copyright information:
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1988-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
Permission is granted to anyone to make or distribute verbatim copies
|
||||
of this document as received, in any medium, provided that the
|
||||
copyright notice and this permission notice are preserved, thus
|
||||
giving the recipient permission to redistribute in turn.
|
||||
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.
|
||||
|
||||
Permission is granted to distribute modified versions of this
|
||||
document, or of portions of it, under the above conditions, provided
|
||||
also that they carry prominent notices stating who last changed them.
|
||||
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,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-2014 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,28 @@ 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 \
|
||||
$(guile)
|
||||
|
||||
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
||||
$(LINK) @<<
|
||||
@@ -119,5 +123,7 @@ $(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 $?
|
||||
|
||||
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-2014 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
|
||||
@@ -55,20 +55,20 @@ To build from sources:
|
||||
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.
|
||||
@@ -84,14 +84,14 @@ To build from sources:
|
||||
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).
|
||||
|
||||
@@ -99,7 +99,7 @@ To build from sources:
|
||||
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
|
||||
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.
|
||||
@@ -107,21 +107,21 @@ To build from sources:
|
||||
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
|
||||
@@ -144,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
|
||||
@@ -166,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
|
||||
@@ -186,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
|
||||
@@ -197,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
|
||||
@@ -237,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.
|
||||
@@ -258,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,
|
||||
@@ -282,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
|
||||
@@ -296,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).
|
||||
|
||||
@@ -315,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-2014 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-2014 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,3 +1,88 @@
|
||||
This version of GNU make has been tested on
|
||||
OpenVMS V8.3 (Alpha) and V8.4 (Integrity).
|
||||
|
||||
Build instructions
|
||||
------------------
|
||||
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
|
||||
$ mc sys$disk:[]1st-make clean ! ignore any file not found messages
|
||||
$ mc sys$disk:[]1st-make
|
||||
Verify your 2nd version
|
||||
$ copy make.exe 2nd-make.exe
|
||||
$ mc sys$disk:[]2nd-make clean
|
||||
$ mc sys$disk:[]2nd-make
|
||||
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.
|
||||
|
||||
Changes since GNU make 3.82
|
||||
---------------------------
|
||||
|
||||
Fix build problems.
|
||||
|
||||
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 VMS does not support running multiple commands simultaneously.
|
||||
|
||||
Changes for GNU make 3.82
|
||||
|
||||
Michael Gehre (at VISTEC-SEMI dot COM) supplied a fix for a problem with
|
||||
timestamps of object modules in OLBs. The timestamps were not correctly
|
||||
adjusted to GMT based time, if the local VMS time was using a daylight saving
|
||||
algorithm and if daylight saving was switched off.
|
||||
|
||||
John Eisenbraun (at HP dot COM) supplied fixes and and an enhancement to append
|
||||
output redirection in action lines.
|
||||
|
||||
Rework of ctrl+c and ctrl+y handling.
|
||||
|
||||
Fix a problem with cached strings, which showed on case-insensitive file
|
||||
systems.
|
||||
|
||||
Build fixes for const-ified code in VMS specific sources.
|
||||
|
||||
A note on appending the redirected output. With this change, a simple mechanism
|
||||
is implemented to make ">>" work in action lines. In VMS there is no simple
|
||||
feature like ">>" to have DCL command or program output redirected and appended
|
||||
to a file. GNU make for VMS already implements the redirection of output. If
|
||||
such a redirection is detected, an ">" on the action line, GNU make creates a
|
||||
DCL command procedure to execute the action and to redirect its output. Based
|
||||
on that, now ">>" is also recognized and a similar but different command
|
||||
procedure is created to implement the append. The main idea here is to create a
|
||||
temporary file which collects the output and which is appended to the wanted
|
||||
output file. Then the temporary file is deleted. This is all done in the
|
||||
command procedure to keep changes in make small and simple. This obviously has
|
||||
some limitations but it seems good enough compared with the current ">"
|
||||
implementation. (And in my opinion, redirection is not really what GNU make has
|
||||
to do.) With this approach, it may happen that the temporary file is not yet
|
||||
appended and is left in SYS$SCRATCH. The temporary file names look 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 as well. Its name is
|
||||
CMDxxxxx.COM.
|
||||
|
||||
Change in the Ctrl+Y handling. 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.
|
||||
|
||||
Change in deleteing temporary command files. Temporary command files are now
|
||||
deleted in the vms child termination handler. That deletes them even if
|
||||
a Ctrl+C was pressed.
|
||||
|
||||
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.
|
||||
|
||||
Changes for GNU make 3.80
|
||||
|
||||
. In default.c define variable ARCH as IA64 for VMS on Itanium systems.
|
||||
|
||||
. In makefile.vms avoid name collision for glob and globfree.
|
||||
|
||||
This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
|
||||
|
||||
It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
|
||||
@@ -20,7 +105,7 @@ returns a modification time 1 hour ahead. This results in GNU make
|
||||
warning messages. For a just created source you will see:
|
||||
|
||||
$ gmake x.exe
|
||||
gmake.exe;1: *** Warning: File `x.c' has modification time in the future (940582863 > 940579269)
|
||||
gmake.exe;1: *** Warning: File 'x.c' has modification time in the future (940582863 > 940579269)
|
||||
cc /obj=x.obj x.c
|
||||
link x.obj /exe=x.exe
|
||||
gmake.exe;1: *** Warning: Clock skew detected. Your build may be incomplete.
|
||||
@@ -161,7 +246,7 @@ replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
|
||||
somewhere in the future. Be warned, the time resolution inside make is
|
||||
less than what vms provides. This might be a problem on the faster Alphas.
|
||||
|
||||
You can use a : in a filename only if you preceed it with a backslash ('\').
|
||||
You can use a : in a filename only if you precede it with a backslash ('\').
|
||||
E.g.- hobbes\:[bogas.files]
|
||||
|
||||
Make ignores success, informational, or warning errors (-S-, -I-, or
|
||||
@@ -181,3 +266,19 @@ Lots of default settings are adapted for VMS. See default.c.
|
||||
Long command lines are now converted to command files.
|
||||
|
||||
Comma (',') as a separator is now allowed. See makefile.vms for an example.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1996-2014 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,241 +1,309 @@
|
||||
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/2008.
|
||||
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).
|
||||
|
||||
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, and 2003 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 the Windows download page of the GTK+ project:
|
||||
|
||||
set Path=%Path%;c:/msdev/bin
|
||||
http://www.gtk.org/download/win32.php
|
||||
|
||||
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.
|
||||
|
||||
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 32-bit port of GNU make is maintained jointly by various
|
||||
people. It was originally made by Rob Tulloh.
|
||||
|
||||
|
||||
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
|
||||
1. At the Windows command prompt run:
|
||||
|
||||
There is a bat file (build_w32.bat) for folks who have fear of nmake.
|
||||
if not exist NMakefile copy NMakefile.template NMakefile
|
||||
if not exist config.h copy config.h.W32 config.h
|
||||
|
||||
Outputs:
|
||||
|
||||
WinDebug/make.exe
|
||||
WinRel/make.exe
|
||||
Then edit config.h 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').
|
||||
|
||||
|
||||
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 current directory.
|
||||
|
||||
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 WinDebug/gnumake.exe and WinRel/gnumake.exe)
|
||||
|
||||
... 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-2014 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-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
141
README.cvs
141
README.cvs
@@ -1,141 +0,0 @@
|
||||
-*-text-*-
|
||||
|
||||
Obtaining CVS Code
|
||||
------------------
|
||||
|
||||
This seems redundant, since if you're reading this you most likely have
|
||||
already performed this step; however, for completeness, you can obtain
|
||||
the GNU make source code via anonymous CVS from the FSF's Savannah
|
||||
project <http://savannah.gnu.org/projects/make/>:
|
||||
|
||||
$ cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/make co make
|
||||
|
||||
You might want to use the "-z3" option to get compression, and you most
|
||||
certainly will want the -P option to avoid unneeded directories
|
||||
cluttering up your source. Personally I add these (as well as -dP for
|
||||
update) to my ~/.cvsrc file.
|
||||
|
||||
|
||||
If you have an older version of CVS, you might have to login first.
|
||||
There is no password; just hit the ENTER key if you are asked for one.
|
||||
|
||||
|
||||
Building From CVS
|
||||
-----------------
|
||||
|
||||
To build GNU make from CVS, you will need Autoconf 2.53 (or better),
|
||||
Automake 1.6.3 (or better), and Gettext 0.11.5 (or better), and any
|
||||
tools that those utilities require (GNU m4, Perl, etc.). You will also
|
||||
need a copy of wget.
|
||||
|
||||
After checking out the code, you will need to perform these steps to get
|
||||
to the point where you can run "make".
|
||||
|
||||
|
||||
1) $ autopoint
|
||||
|
||||
This will instantiate various m4 macros files, etc. in the config
|
||||
and po directories.
|
||||
|
||||
|
||||
2) $ aclocal -I config
|
||||
|
||||
Generate the proper aclocal.m4 file.
|
||||
|
||||
|
||||
3) $ autoheader
|
||||
|
||||
Generate a "config.h.in" file from the contents of configure.in,
|
||||
etc.
|
||||
|
||||
|
||||
4) $ automake --add-missing
|
||||
|
||||
Add (symlink) missing files into the distribution, and generate
|
||||
Makefile.in's from Makefile.am's.
|
||||
|
||||
You will see these perhaps unexpected messages (among others which
|
||||
you should be expecting :)); just ignore them--I know what I'm doing
|
||||
:).
|
||||
|
||||
Makefile.am: required file `./README' not found
|
||||
configure.in:xxx: required file `./build.sh.in' not found
|
||||
Makefile.am:xxx: automatically discovered file `getloadavg.c' should not be explicitly mentioned
|
||||
|
||||
|
||||
5) $ autoconf
|
||||
|
||||
Generate a "configure" script from configure.in and acinclude.m4.
|
||||
|
||||
|
||||
6) $ ./configure
|
||||
|
||||
Generate a Makefile
|
||||
|
||||
|
||||
7) $ make update
|
||||
|
||||
Use wget to retrieve various other files that GNU make relies on,
|
||||
but does not keep in its own source tree.
|
||||
|
||||
|
||||
At this point you have successfully brought your CVS copy of the GNU
|
||||
make source directory up to the point where it can be treated
|
||||
more-or-less like the official package you would get from ftp.gnu.org.
|
||||
That is, you can just run:
|
||||
|
||||
$ make && make check && make install
|
||||
|
||||
to build and install GNU make.
|
||||
|
||||
|
||||
Creating a Package
|
||||
------------------
|
||||
|
||||
Once you have performed the above steps (including the configuration and
|
||||
build) you can create a GNU make package. This is very simple, just
|
||||
run:
|
||||
|
||||
$ make dist-gzip
|
||||
|
||||
and, if you like:
|
||||
|
||||
$ make dist-bzip2
|
||||
|
||||
Even better, you should run this:
|
||||
|
||||
$ make distcheck
|
||||
|
||||
Which will build both .gz and .bz2 package files, then unpack them into
|
||||
a temporary location, try to build them, and repack them, verifying that
|
||||
everything works, you get the same results, _and_ no extraneous files
|
||||
are left over after the "distclean" rule--whew!! Now, _that_ is why
|
||||
converting to Automake is worth the trouble! A big "huzzah!" to Tom
|
||||
T. and the AutoToolers!
|
||||
|
||||
|
||||
That's it, you're done!
|
||||
|
||||
|
||||
Appendix A - For The Brave
|
||||
--------------------------
|
||||
|
||||
For those of you who trust me implicitly, or are just brave (or
|
||||
foolhardy), here is a canned sequence of commands to build a GNU make
|
||||
distribution package from a virgin CVS source checkout (assuming all the
|
||||
prerequisites are available of course).
|
||||
|
||||
This list is eminently suitable for a quick swipe o' the mouse and a
|
||||
swift click o' mouse-2 into an xterm. Go for it!
|
||||
|
||||
|
||||
autopoint
|
||||
aclocal -I config
|
||||
autoheader
|
||||
automake --add-missing
|
||||
autoconf
|
||||
./configure
|
||||
make update
|
||||
make
|
||||
make check
|
||||
make distcheck
|
||||
289
README.git
Normal file
289
README.git
Normal file
@@ -0,0 +1,289 @@
|
||||
-*-text-*-
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2002-2014 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: Fixed in Git; will be available in the next version of Make.
|
||||
|
||||
Start the next release:
|
||||
|
||||
* Update configure.ac and add a ".90" to the release number.
|
||||
* Update the NEWS file with a new section for the release / date.
|
||||
* Update the Savannah URL for the bugs fixed in the NEWS section.
|
||||
|
||||
|
||||
Publishing a Package
|
||||
--------------------
|
||||
|
||||
In order to publish a package on the FSF FTP site, either the release
|
||||
site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
|
||||
first need to have my GPG private key and my passphrase to unlock it.
|
||||
And, you can't have them! So there! But, just so I remember here's
|
||||
what to do:
|
||||
|
||||
Make sure the "Steps to Release" are complete and committed and tagged.
|
||||
|
||||
git clone git://git.savannah.gnu.org/make.git make-release
|
||||
|
||||
cd make-release
|
||||
|
||||
<run the commands above to build the release>
|
||||
|
||||
make upload-alpha # for alpha.gnu.org (pre-releases)
|
||||
-OR-
|
||||
make upload-ftp # for ftp.gnu.org (official releases)
|
||||
|
||||
Depending on your distribution (whether GnuPG is integrated with your keyring
|
||||
etc.) it will either pop up a window asking for your GPG key passphrase one
|
||||
time, or else it will use the CLI to ask for the GPG passphrase _THREE_ times.
|
||||
Sigh.
|
||||
|
||||
|
||||
For both final releases and pre-releases, send an email with the URL of
|
||||
the package to the GNU translation robot to allow the translators to
|
||||
work on it:
|
||||
|
||||
<coordinator@translationproject.org>
|
||||
|
||||
|
||||
Where to Announce
|
||||
-----------------
|
||||
|
||||
Create the announcement in a text file, then sign it with GPG.
|
||||
|
||||
gpg --clearsign <announcement.txt>
|
||||
|
||||
Or, use your mail client's PGP/GPG signing capabilities.
|
||||
|
||||
Announce the release:
|
||||
|
||||
* For release candidate builds:
|
||||
To: bug-make@gnu.org
|
||||
CC: coordinator@translationproject.org
|
||||
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||
|
||||
* For release builds
|
||||
To: info-gnu@gnu.org, bug-make@gnu.org
|
||||
CC: coordinator@translationproject.org
|
||||
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||
|
||||
* Add a news item to the Savannah project site.
|
||||
* Add an update to freecode.com (nee freshmeat.net)
|
||||
|
||||
|
||||
Appendix A - For The Brave
|
||||
--------------------------
|
||||
|
||||
For those of you who trust me implicitly, or are just brave (or
|
||||
foolhardy), here is a canned sequence of commands to build a GNU make
|
||||
distribution package from a virgin Git source checkout (assuming all the
|
||||
prerequisites are available of course).
|
||||
|
||||
This list is eminently suitable for a quick swipe o' the mouse and a
|
||||
swift click o' mouse-2 into an xterm. Go for it!
|
||||
|
||||
autoreconf -i
|
||||
./configure
|
||||
make update
|
||||
make
|
||||
make check
|
||||
|
||||
Or, for a debugging version:
|
||||
|
||||
autoreconf -i && ./configure CFLAGS=-g && make update && make && make check
|
||||
|
||||
Or, all-in-one:
|
||||
|
||||
autoreconf -i && ./configure && make update && make && make check
|
||||
@@ -8,20 +8,22 @@ your operating system.
|
||||
|
||||
For general building and installation instructions, see the file INSTALL.
|
||||
|
||||
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
|
||||
-----------
|
||||
@@ -64,13 +66,13 @@ 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
|
||||
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_id=71
|
||||
http://savannah.gnu.org/bugs/?group=make
|
||||
|
||||
If you need help using GNU make, try these forums:
|
||||
|
||||
@@ -79,31 +81,20 @@ If you need help using GNU make, try these forums:
|
||||
news:gnu.utils.help
|
||||
news:gnu.utils.bug
|
||||
|
||||
http://savannah.gnu.org/support/?group_id=71
|
||||
|
||||
You may also find interesting patches to GNU Make available here:
|
||||
|
||||
http://savannah.gnu.org/patch/?group_id=71
|
||||
|
||||
Note these patches are provided by our users as a service and we make no
|
||||
statements regarding their correctness. Please contact the authors
|
||||
directly if you have a problem or suggestion for a patch available on
|
||||
this page.
|
||||
|
||||
|
||||
CVS Access
|
||||
Git Access
|
||||
----------
|
||||
|
||||
The GNU make source repository is available via anonymous CVS from the
|
||||
GNU Subversions CVS server; look here for details:
|
||||
The GNU make source repository is available via Git from the
|
||||
GNU Savannah Git server; look here for details:
|
||||
|
||||
http://savannah.gnu.org/cvs/?group_id=71
|
||||
http://savannah.gnu.org/git/?group=make
|
||||
|
||||
Please note: you won't be able to build GNU make from CVS without
|
||||
Please note: you won't be able to build GNU make from Git without
|
||||
installing appropriate maintainer's tools, such as GNU m4, automake,
|
||||
autoconf, Perl, GNU make, and GCC. See the README.cvs file for hints on
|
||||
autoconf, Perl, GNU make, and GCC. See the README.git file for hints on
|
||||
how to build GNU make once these tools are available. We make no
|
||||
guarantees about the contents or quality of the latest code in the CVS
|
||||
guarantees about the contents or quality of the latest code in the Git
|
||||
repository: it is not unheard of for code that is known to be broken to
|
||||
be checked in. Use at your own risk.
|
||||
|
||||
@@ -112,20 +103,26 @@ System-specific Notes
|
||||
---------------------
|
||||
|
||||
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
||||
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.
|
||||
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
|
||||
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.
|
||||
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
|
||||
@@ -145,7 +142,7 @@ Ports
|
||||
- See README.customs for details on integrating GNU make with the
|
||||
Customs distributed build environment from the Pmake distribution.
|
||||
|
||||
- See readme.vms for details about GNU Make on OpenVMS.
|
||||
- See README.VMS for details about GNU Make on OpenVMS.
|
||||
|
||||
- See README.Amiga for details about GNU Make on AmigaDOS.
|
||||
|
||||
@@ -162,3 +159,20 @@ Please note there are two _separate_ ports of GNU make for Microsoft
|
||||
systems: a native Windows tool built with (for example) MSVC or Cygwin,
|
||||
and a DOS-based tool built with DJGPP. Please be sure you are looking
|
||||
at the right README!
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1988-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
||||
# `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-2014 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
|
||||
|
||||
75
TODO.private
75
TODO.private
@@ -6,7 +6,7 @@ This list comes both from the authors and from users of GNU make.
|
||||
|
||||
They are listed in no particular order!
|
||||
|
||||
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).
|
||||
|
||||
@@ -41,17 +41,13 @@ 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 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
|
||||
@@ -60,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
|
||||
@@ -68,25 +64,19 @@ The Rest of the List
|
||||
best syntax or not... what if you say "a.foo + a.bar a.bam : a.baz";
|
||||
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.
|
||||
|
||||
@@ -95,18 +85,12 @@ 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
|
||||
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.
|
||||
|
||||
11) Improved debugging/logging/etc. capabilities. Part of this is done:
|
||||
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
|
||||
@@ -115,26 +99,19 @@ The Rest of the List
|
||||
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.
|
||||
|
||||
12) Integration of Guile as an embedded scripting language. This means:
|
||||
allowing Guile functions to be declared in makefiles somehow, then
|
||||
providing a syntax for invoking them. At least one formulation of
|
||||
that would have the function resolve to a string which would be
|
||||
substituted in the makefile, kind of like $(shell ...) does now, but
|
||||
using the embedded interpreter so there's no process forked of
|
||||
course. Obviously this is an optional add-on feature.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
It could be more advanced than that, even, who knows? Maybe make
|
||||
could provide Guile functions that allow Guile scripts more direct
|
||||
access to internal make structures, somehow. This kind of thing
|
||||
needs a lot of thought.
|
||||
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.
|
||||
|
||||
Also there's always the flip side: in some very fundamental ways
|
||||
make isn't the best choice right now for a complex build tool. It's
|
||||
great for simple-to-medium tasks, but there are already other tools
|
||||
available for the really tough situations. Ask yourself,
|
||||
realistically, how much work is worthwhile to add to make, given the
|
||||
fundamentals you can't really overcome without significantly
|
||||
affecting backward compatibility--and then why not use another tool
|
||||
in the first place?
|
||||
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.
|
||||
|
||||
Something to think about.
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
94
acinclude.m4
94
acinclude.m4
@@ -1,6 +1,21 @@
|
||||
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
||||
dnl
|
||||
dnl Automake will incorporate this into its generated aclocal.m4.
|
||||
dnl Copyright (C) 1998-2014 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
|
||||
@@ -87,78 +99,34 @@ changequote([,])dnl
|
||||
|
||||
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)
|
||||
|
||||
AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC,
|
||||
[AC_CACHE_CHECK([for nanoseconds field 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, [Define if 'struct stat' contains a nanoseconds field])
|
||||
AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec],
|
||||
[Define if struct stat contains a nanoseconds field])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl This will be in the next version of autoconf; take this out then!
|
||||
|
||||
# make_FUNC_SETVBUF_REVERSED
|
||||
# ------------------------
|
||||
AC_DEFUN([make_FUNC_SETVBUF_REVERSED],
|
||||
[AC_REQUIRE([AC_C_PROTOTYPES])dnl
|
||||
AC_CACHE_CHECK(whether setvbuf arguments are reversed,
|
||||
ac_cv_func_setvbuf_reversed,
|
||||
[ac_cv_func_setvbuf_reversed=no
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <stdio.h>
|
||||
# if PROTOTYPES
|
||||
int (setvbuf) (FILE *, int, char *, size_t);
|
||||
# endif]],
|
||||
[[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <stdio.h>
|
||||
# if PROTOTYPES
|
||||
int (setvbuf) (FILE *, int, char *, size_t);
|
||||
# endif]],
|
||||
[[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])],
|
||||
[# It compiles and links either way, so it must not be declared
|
||||
# with a prototype and most likely this is a K&R C compiler.
|
||||
# Try running it.
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <stdio.h>]],
|
||||
[[/* This call has the arguments reversed.
|
||||
A reversed system may check and see that the address of buf
|
||||
is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
|
||||
char buf;
|
||||
if (setvbuf (stdout, _IOLBF, &buf, 1) != 0)
|
||||
exit (1);
|
||||
putchar ('\r');
|
||||
exit (0); /* Non-reversed systems SEGV here. */]])],
|
||||
ac_cv_func_setvbuf_reversed=yes,
|
||||
rm -f core core.* *.core,
|
||||
[[: # Assume setvbuf is not reversed when cross-compiling.]])]
|
||||
ac_cv_func_setvbuf_reversed=yes)])])
|
||||
if test $ac_cv_func_setvbuf_reversed = yes; then
|
||||
AC_DEFINE(SETVBUF_REVERSED, 1,
|
||||
[Define to 1 if the `setvbuf' function takes the buffering type as
|
||||
its second argument and the buffer pointer as the third, as on
|
||||
System V before release 3.])
|
||||
fi
|
||||
])# make_FUNC_SETVBUF_REVERSED
|
||||
|
||||
7
alloca.c
7
alloca.c
@@ -114,9 +114,9 @@ static int stack_dir; /* 1 or -1 once known. */
|
||||
#define STACK_DIR stack_dir
|
||||
|
||||
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-2014 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-2014 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);
|
||||
|
||||
279
ar.c
279
ar.c
@@ -1,92 +1,90 @@
|
||||
/* Interface to `ar' archives for GNU Make.
|
||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1997,
|
||||
2002 Free Software Foundation, Inc.
|
||||
/* Interface to 'ar' archives for GNU Make.
|
||||
Copyright (C) 1988-2014 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, '(');
|
||||
char *end;
|
||||
const char *p = strchr (name, '(');
|
||||
const char *end;
|
||||
|
||||
if (p == 0 || p == name)
|
||||
return 0;
|
||||
|
||||
end = p + strlen (p) - 1;
|
||||
if (*end != ')')
|
||||
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, 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;
|
||||
|
||||
@@ -103,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, 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;
|
||||
@@ -245,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;
|
||||
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;
|
||||
@@ -281,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;
|
||||
|
||||
#ifdef VMS
|
||||
char *vms_member_pattern;
|
||||
#endif
|
||||
if (! 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;
|
||||
@@ -326,4 +325,4 @@ ar_glob (arname, member_pattern, size)
|
||||
return state.chain;
|
||||
}
|
||||
|
||||
#endif /* Not NO_ARCHIVES. */
|
||||
#endif /* Not NO_ARCHIVES. */
|
||||
|
||||
@@ -1,57 +1,58 @@
|
||||
#!/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-2014 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@'
|
||||
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=`eval echo @exec_prefix@`
|
||||
# Directory to find libraries in for `-lXXX'.
|
||||
# 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}:.
|
||||
aliaspath=${localedir}${PATH_SEPARATOR}.
|
||||
|
||||
defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||
defines="-DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||
|
||||
# Exit as soon as any command fails.
|
||||
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%"
|
||||
@@ -59,7 +60,7 @@ if [ x"$GLOBLIB" != x ]; then
|
||||
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} ${globinc} ${srcdir}/$file
|
||||
@@ -75,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}
|
||||
|
||||
306
build_w32.bat
306
build_w32.bat
@@ -1,138 +1,310 @@
|
||||
set make=gnumake
|
||||
+if not exist config.h copy config.h.W32 config.h
|
||||
@echo off
|
||||
rem Copyright (C) 1996-2014 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/>.
|
||||
|
||||
if "%1" == "-h" GoTo Usage
|
||||
if "%1" == "--help" GoTo Usage
|
||||
if not exist config.h.W32.template GoTo NotSCM
|
||||
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.ac > config.h.W32.sed
|
||||
echo s,%%PACKAGE%%,make,g >> config.h.W32.sed
|
||||
sed -f 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
|
||||
:NotSCM
|
||||
copy config.h.W32 config.h
|
||||
|
||||
rem Guile configuration
|
||||
set GUILECFLAGS=
|
||||
set GUILELIBS=
|
||||
set NOGUILE=
|
||||
set OPT=-O2
|
||||
set COMPILER=
|
||||
set PKGMSC=
|
||||
:ParseSW
|
||||
if "%1" == "--debug" GoTo SetOpt
|
||||
if "%1" == "--without-guile" GoTo NoGuile
|
||||
if "%1" == "gcc" GoTo SetCC
|
||||
if "%1" == "" GoTo ChkGuile
|
||||
:SetOpt
|
||||
set OPT=-O0
|
||||
shift
|
||||
GoTo ParseSW
|
||||
:NoGuile
|
||||
set NOGUILE=Y
|
||||
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
|
||||
:ChkGuile
|
||||
if "%NOGUILE%" == "Y" GoTo GuileDone
|
||||
if not "%OS%" == "Windows_NT" GoTo NoGuile
|
||||
pkg-config --help > 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" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < guile.tmp
|
||||
pkg-config --libs --static --short-errors %PKGMSC% "guile-2.0" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < guile.tmp
|
||||
if not "%GUILECFLAGS%" == "" GoTo GuileDone
|
||||
echo "Checking for Guile 1.8"
|
||||
pkg-config --cflags --short-errors "guile-1.8" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < guile.tmp
|
||||
pkg-config --libs --static --short-errors %PKGMSC% "guile-1.8" > guile.tmp
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < 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 not "%GUILECFLAGS%" == "" echo "Guile found, building with Guile"
|
||||
if not "%GUILECFLAGS%" == "" set GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE
|
||||
if "%COMPILER%" == "gcc" if "%OPT%" == "-O0" echo "Building without compiler optimizations"
|
||||
cd w32\subproc
|
||||
echo.
|
||||
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"
|
||||
|
||||
if exist link.dbg del link.dbg
|
||||
if exist link.rel del link.rel
|
||||
echo.
|
||||
echo "Creating GNU Make for Windows 9X/NT/2K/XP/Vista/7/8"
|
||||
if "%COMPILER%" == "gcc" GoTo GCCBuild
|
||||
set make=gnumake
|
||||
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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od %GUILECFLAGS% /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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 output.c
|
||||
echo WinDebug\output.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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 hash.c
|
||||
echo WinDebug\hash.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /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 strcache.c
|
||||
echo WinDebug\strcache.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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 loadapi.c
|
||||
echo WinDebug\loadapi.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /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 load.c
|
||||
echo WinDebug\load.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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\posixfcn.c
|
||||
echo WinDebug\posixfcn.obj >>link.dbg
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od %GUILECFLAGS% /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 guile.c
|
||||
echo WinDebug\guile.obj >>link.dbg
|
||||
:LinkDbg
|
||||
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
|
||||
rem link.exe %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 w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /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/output.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/hash.obj .\WinDebug/strcache.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 %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 w32\subproc\windebug\subproc.lib >>link.dbg
|
||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /OUT:.\WinDebug/%make%.exe @link.dbg
|
||||
if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
|
||||
if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"
|
||||
if not exist .\WinRel\nul mkdir .\WinRel
|
||||
echo on
|
||||
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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 %GUILECFLAGS% /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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 output.c
|
||||
echo WinRel\output.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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 hash.c
|
||||
echo WinRel\hash.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /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 strcache.c
|
||||
echo WinRel\strcache.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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 loadapi.c
|
||||
echo WinRel\loadapi.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /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 load.c
|
||||
echo WinRel\load.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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\posixfcn.c
|
||||
echo WinRel\posixfcn.obj >>link.rel
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /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
|
||||
cl.exe /nologo /MT /W4 /GX /YX /O2 %GUILECFLAGS% /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 guile.c
|
||||
echo WinRel\guile.obj >>link.rel
|
||||
:LinkRel
|
||||
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
|
||||
rem link.exe %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 w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /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/output.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/hash.obj .\WinRel/strcache.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 %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 w32\subproc\winrel\subproc.lib >>link.rel
|
||||
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /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!"
|
||||
set make=
|
||||
GoTo BuildEnd
|
||||
:GCCBuild
|
||||
echo on
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c variable.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c rule.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remote-stub.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c commands.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c file.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getloadavg.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c default.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c signame.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c expand.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c dir.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H %GUILECFLAGS% -c main.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt1.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c job.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c output.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c read.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c version.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c arscan.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remake.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c hash.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c strcache.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c misc.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ar.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c function.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c vpath.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c implicit.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c loadapi.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c load.c
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/glob.c -o glob.o
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/fnmatch.c -o fnmatch.o
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/compat/posixfcn.c -o posixfcn.o
|
||||
gcc -mthreads -Wall -gdwarf-2 -g3 %OPT% %GUILECFLAGS% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c guile.c
|
||||
:LinkGCC
|
||||
@echo off
|
||||
Rem The version NN of libgnumake-NN.dll.a should be bumped whenever
|
||||
Rem the API changes in binary-incompatible manner.
|
||||
@echo on
|
||||
gcc -mthreads -gdwarf-2 -g3 -o gnumake.exe variable.o rule.o remote-stub.o commands.o file.o getloadavg.o default.o signame.o expand.o dir.o main.o getopt1.o guile.o job.o output.o read.o version.o getopt.o arscan.o remake.o misc.o hash.o strcache.o ar.o function.o vpath.o implicit.o loadapi.o load.o glob.o fnmatch.o pathstuff.o posixfcn.o w32_misc.o sub_proc.o w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -Wl,--out-implib=libgnumake-1.dll.a
|
||||
@GoTo BuildEnd
|
||||
: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
|
||||
:BuildEnd
|
||||
@echo off
|
||||
set GUILELIBS=
|
||||
set GUILECFLAGS=
|
||||
set PKGMSC=
|
||||
set OPT=
|
||||
set COMPILER=
|
||||
set NOGUILE=
|
||||
echo on
|
||||
|
||||
552
commands.c
552
commands.c
@@ -1,28 +1,29 @@
|
||||
/* Command processing for GNU Make.
|
||||
Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2014 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
|
||||
|
||||
#if VMS
|
||||
# define FILE_LIST_SEPARATOR ','
|
||||
@@ -30,40 +31,66 @@ Boston, MA 02111-1307, USA. */
|
||||
# define FILE_LIST_SEPARATOR ' '
|
||||
#endif
|
||||
|
||||
extern int remote_kill PARAMS ((int id, int sig));
|
||||
int remote_kill (int id, int sig);
|
||||
|
||||
#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)
|
||||
{
|
||||
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;
|
||||
const char *cp;
|
||||
char *p;
|
||||
|
||||
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';
|
||||
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 = "";
|
||||
@@ -73,48 +100,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. */
|
||||
@@ -127,35 +160,53 @@ set_file_variables (file)
|
||||
/* Compute the values for $^, $+, $?, and $|. */
|
||||
|
||||
{
|
||||
static char *plus_value=0, *bar_value=0, *qmark_value=0;
|
||||
static unsigned int plus_max=0, bar_max=0, qmark_max=0;
|
||||
|
||||
unsigned int qmark_len, plus_len, bar_len;
|
||||
char *caret_value, *plus_value;
|
||||
char *cp;
|
||||
char *qmark_value;
|
||||
char *bar_value;
|
||||
char *caret_value;
|
||||
char *qp;
|
||||
char *bp;
|
||||
struct dep *d;
|
||||
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;
|
||||
bar_len = 0;
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (! d->ignore_mtime)
|
||||
plus_len += strlen (dep_name (d)) + 1;
|
||||
{
|
||||
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++;
|
||||
|
||||
cp = plus_value = (char *) alloca (plus_len);
|
||||
if (plus_len > plus_max)
|
||||
plus_value = xrealloc (plus_value, plus_max = plus_len);
|
||||
|
||||
qmark_len = plus_len + 1; /* Will be this or less. */
|
||||
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)
|
||||
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
||||
{
|
||||
char *c = dep_name (d);
|
||||
const char *c = dep_name (d);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
@@ -165,11 +216,11 @@ set_file_variables (file)
|
||||
#endif
|
||||
len = strlen (c);
|
||||
|
||||
bcopy (c, cp, len);
|
||||
memcpy (cp, c, len);
|
||||
cp += len;
|
||||
*cp++ = FILE_LIST_SEPARATOR;
|
||||
if (! d->changed)
|
||||
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
||||
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. */
|
||||
@@ -177,59 +228,85 @@ set_file_variables (file)
|
||||
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);
|
||||
|
||||
bar_len = 0;
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (d->ignore_mtime)
|
||||
bar_len += strlen (dep_name (d)) + 1;
|
||||
if (bar_len == 0)
|
||||
bar_len++;
|
||||
|
||||
/* Compute the values for $^, $?, and $|. */
|
||||
|
||||
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
|
||||
qp = qmark_value = (char *) alloca (qmark_len);
|
||||
bp = bar_value = (char *) alloca (bar_len);
|
||||
|
||||
if (qmark_len > qmark_max)
|
||||
qmark_value = xrealloc (qmark_value, qmark_max = qmark_len);
|
||||
qp = qmark_value;
|
||||
|
||||
if (bar_len > bar_max)
|
||||
bar_value = xrealloc (bar_value, bar_max = bar_len);
|
||||
bp = bar_value;
|
||||
|
||||
/* Make sure that no dependencies are repeated in $^, $?, and $|. It
|
||||
would be natural to combine the next two loops but we can't do it
|
||||
because of a situation where we have two dep entries, the first
|
||||
is order-only and the second is normal (see below). */
|
||||
|
||||
hash_init (&dep_hash, 500, dep_hash_1, dep_hash_2, dep_hash_cmp);
|
||||
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
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
|
||||
slot = hash_find_slot (&dep_hash, d);
|
||||
if (HASH_VACANT (*slot))
|
||||
hash_insert_at (&dep_hash, d, slot);
|
||||
else
|
||||
{
|
||||
/* Check if the two prerequisites have different ignore_mtime.
|
||||
If so then we need to "upgrade" one that is order-only. */
|
||||
|
||||
struct dep* hd = (struct dep*) *slot;
|
||||
|
||||
if (d->ignore_mtime != hd->ignore_mtime)
|
||||
d->ignore_mtime = hd->ignore_mtime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
const char *c;
|
||||
|
||||
if (d->need_2nd_expansion || hash_find_item (&dep_hash, d) != d)
|
||||
continue;
|
||||
|
||||
c = dep_name (d);
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
len = strlen (c) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
len = strlen (c);
|
||||
len = strlen (c);
|
||||
|
||||
if (d->ignore_mtime)
|
||||
{
|
||||
bcopy (c, bp, len);
|
||||
bp += len;
|
||||
*bp++ = FILE_LIST_SEPARATOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
bcopy (c, cp, len);
|
||||
memcpy (bp, c, len);
|
||||
bp += len;
|
||||
*bp++ = FILE_LIST_SEPARATOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy (cp, c, len);
|
||||
cp += len;
|
||||
*cp++ = FILE_LIST_SEPARATOR;
|
||||
if (d->changed)
|
||||
if (d->changed || always_make_flag)
|
||||
{
|
||||
bcopy (c, qp, len);
|
||||
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';
|
||||
@@ -242,17 +319,15 @@ set_file_variables (file)
|
||||
DEFINE_VARIABLE ("|", 1, bar_value);
|
||||
}
|
||||
|
||||
#undef DEFINE_VARIABLE
|
||||
#undef DEFINE_VARIABLE
|
||||
}
|
||||
|
||||
/* Chop CMDS up into individual command lines if necessary.
|
||||
Also set the `lines_flags' and `any_recurse' members. */
|
||||
Also set the 'lines_flags' and 'any_recurse' members. */
|
||||
|
||||
void
|
||||
chop_commands (cmds)
|
||||
register struct commands *cmds;
|
||||
chop_commands (struct commands *cmds)
|
||||
{
|
||||
register char *p;
|
||||
unsigned int nlines, idx;
|
||||
char **lines;
|
||||
|
||||
@@ -262,66 +337,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;
|
||||
const char *p = lines[idx];
|
||||
|
||||
for (p = lines[idx];
|
||||
isblank ((unsigned char)*p) || *p == '-' || *p == '@' || *p == '+';
|
||||
++p)
|
||||
switch (*p)
|
||||
while (isblank (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||
switch (*(p++))
|
||||
{
|
||||
case '+':
|
||||
flags |= COMMANDS_RECURSE;
|
||||
@@ -333,16 +427,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,10 +443,9 @@ 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. */
|
||||
@@ -366,7 +457,7 @@ execute_file_commands (file)
|
||||
{
|
||||
/* 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;
|
||||
}
|
||||
@@ -377,6 +468,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);
|
||||
}
|
||||
@@ -389,8 +485,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;
|
||||
@@ -411,6 +506,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.
|
||||
@@ -422,10 +538,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
|
||||
@@ -440,21 +556,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. */
|
||||
@@ -469,13 +585,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__ */
|
||||
}
|
||||
@@ -484,11 +608,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;
|
||||
@@ -497,32 +620,36 @@ delete_target (file, on_behalf_of)
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
|
||||
? (time_t) -1
|
||||
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
||||
? (time_t) -1
|
||||
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
||||
if (ar_member_date (file->name) != file_date)
|
||||
{
|
||||
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);
|
||||
}
|
||||
{
|
||||
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 (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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,8 +658,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;
|
||||
|
||||
@@ -540,9 +666,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);
|
||||
|
||||
@@ -552,33 +678,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');
|
||||
}
|
||||
}
|
||||
|
||||
55
commands.h
55
commands.h
@@ -1,42 +1,41 @@
|
||||
/* Definition of data structures describing shell commands for GNU Make.
|
||||
Copyright (C) 1988, 1989, 1991, 1993 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2014 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. */
|
||||
gmk_floc fileinfo; /* Where commands were defined. */
|
||||
char *commands; /* Commands text. */
|
||||
char **command_lines; /* Commands chopped up into lines. */
|
||||
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));
|
||||
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-2014 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,14 +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 `unsigned long' or `unsigned long long'
|
||||
/* 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 to 'int' if <sys/types.h> doesn't define. */
|
||||
#define gid_t int
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
@@ -39,25 +53,25 @@
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #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
|
||||
@@ -70,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. */
|
||||
@@ -79,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. */
|
||||
@@ -95,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. */
|
||||
@@ -116,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
|
||||
@@ -137,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. */
|
||||
@@ -165,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. */
|
||||
@@ -187,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. */
|
||||
@@ -229,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. */
|
||||
@@ -238,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
|
||||
|
||||
@@ -307,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
|
||||
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
/* 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-2014 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
|
||||
@@ -18,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. */
|
||||
@@ -27,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. */
|
||||
@@ -40,118 +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 `unsigned long' or `unsigned long long'
|
||||
/* 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 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 */
|
||||
@@ -159,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
|
||||
@@ -189,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. */
|
||||
@@ -211,140 +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,27 +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 make.h */
|
||||
#if defined(__VAX) && defined(__DECC)
|
||||
#define alloca(n) __ALLOCA(n)
|
||||
/* 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,388 +1,524 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
Copyright (C) 1996-2014 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. */
|
||||
/* #undef GETLOADAVG_PRIVILEGED */
|
||||
|
||||
/* Define to `unsigned long' or `unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#define uintmax_t unsigned long
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef gid_t
|
||||
#define gid_t int
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if your system has a working fnmatch function. */
|
||||
/* #undef HAVE_FNMATCH */
|
||||
|
||||
/* Define if your system has its own `getloadavg' function. */
|
||||
/* #undef HAVE_GETLOADAVG */
|
||||
|
||||
/* Define if you have the getmntent function. */
|
||||
/* #undef HAVE_GETMNTENT */
|
||||
|
||||
/* Define if the `long double' type works. */
|
||||
/* #undef HAVE_LONG_DOUBLE */
|
||||
|
||||
/* Define if you support file names longer than 14 characters. */
|
||||
#undef HAVE_LONG_FILE_NAMES
|
||||
#define HAVE_LONG_FILE_NAMES 1
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
/* #undef HAVE_ST_BLKSIZE */
|
||||
|
||||
/* Define if your struct stat has st_blocks. */
|
||||
/* #undef HAVE_ST_BLOCKS */
|
||||
|
||||
/* Define if you have the strcoll function and it is properly defined. */
|
||||
#undef HAVE_STRCOLL
|
||||
#define HAVE_STRCOLL 1
|
||||
|
||||
/* Define if your struct stat has st_rdev. */
|
||||
#undef HAVE_ST_RDEV
|
||||
#define HAVE_ST_RDEV 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#undef HAVE_STRFTIME
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define if your struct tm has tm_zone. */
|
||||
/* #undef HAVE_TM_ZONE */
|
||||
|
||||
/* Define if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
#undef HAVE_TZNAME
|
||||
#define HAVE_TZNAME 1
|
||||
|
||||
/* Define if you have <unistd.h>. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
#undef HAVE_UTIME_NULL
|
||||
#define HAVE_UTIME_NULL 1
|
||||
|
||||
/* Define if you have <vfork.h>. */
|
||||
/* #undef HAVE_VFORK_H */
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#undef HAVE_VPRINTF
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define if you have the wait3 system call. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define if your struct nlist has an n_un member. */
|
||||
/* #undef NLIST_NAME_UNION */
|
||||
|
||||
/* Define if you have <nlist.h>. */
|
||||
/* #undef NLIST_STRUCT */
|
||||
|
||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef pid_t
|
||||
#define pid_t int
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except
|
||||
with this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
#define _POSIX_SOURCE 1
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define if the setvbuf function takes the buffering type as its second
|
||||
argument and the buffer pointer as the third, as on System V
|
||||
before release 3. */
|
||||
/* #undef SETVBUF_REVERSED */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define on System V Release 4. */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
/* #undef SYS_SIGLIST_DECLARED */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef uid_t
|
||||
#define uid_t int
|
||||
|
||||
/* Define for Encore UMAX. */
|
||||
/* #undef UMAX */
|
||||
|
||||
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
|
||||
instead of <sys/cpustats.h>. */
|
||||
/* #undef UMAX4_3 */
|
||||
|
||||
/* Define vfork as fork if vfork does not work. */
|
||||
/* #undef vfork */
|
||||
|
||||
/* Name of this package (needed by automake) */
|
||||
#define PACKAGE "%PACKAGE%"
|
||||
|
||||
/* Version of this package (needed by automake) */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
/* Define to the name of the SCCS `get' command. */
|
||||
#undef SCCS_GET
|
||||
#define SCCS_GET "echo no sccs get"
|
||||
|
||||
/* Define to 1 if NLS is requested. */
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language 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. */
|
||||
#define LOCALEDIR ""
|
||||
|
||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
||||
/* #undef SCCS_GET_MINUS_G */
|
||||
|
||||
/* Define this to enable job server support in GNU make. */
|
||||
/* #undef MAKE_JOBSERVER */
|
||||
|
||||
/* Define to be the nanoseconds member of struct stat's st_mtim,
|
||||
if it exists. */
|
||||
/* #undef ST_MTIM_NSEC */
|
||||
|
||||
/* Define this if the C library defines the variable `sys_siglist'. */
|
||||
/* #undef HAVE_SYS_SIGLIST */
|
||||
|
||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
||||
/* #undef HAVE__SYS_SIGLIST */
|
||||
|
||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
||||
/* #undef HAVE_UNION_WAIT */
|
||||
|
||||
/* Define if you have the dup2 function. */
|
||||
#undef HAVE_DUP2
|
||||
#define HAVE_DUP2 1
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#undef HAVE_GETCWD
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the getgroups function. */
|
||||
/* #undef HAVE_GETGROUPS */
|
||||
|
||||
/* Define if you have the gethostbyname function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
/* #undef HAVE_GETHOSTNAME */
|
||||
|
||||
/* Define if you have the getloadavg function. */
|
||||
/* #undef HAVE_GETLOADAVG */
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#undef HAVE_MEMMOVE
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define if you have the mktemp function. */
|
||||
#undef HAVE_MKTEMP
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define if you have the psignal function. */
|
||||
/* #undef HAVE_PSIGNAL */
|
||||
|
||||
/* Define if you have the pstat_getdynamic function. */
|
||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||
|
||||
/* Define if you have the setegid function. */
|
||||
/* #undef HAVE_SETEGID */
|
||||
|
||||
/* Define if you have the seteuid function. */
|
||||
/* #undef HAVE_SETEUID */
|
||||
|
||||
/* Define if you have the setlinebuf function. */
|
||||
/* #undef HAVE_SETLINEBUF */
|
||||
|
||||
/* Define if you have the setregid function. */
|
||||
/* #undef HAVE_SETREGID */
|
||||
|
||||
/* Define if you have the setreuid function. */
|
||||
/* #undef HAVE_SETREUID */
|
||||
|
||||
/* Define if you have the sigsetmask function. */
|
||||
/* #undef HAVE_SIGSETMASK */
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
/* #undef HAVE_SOCKET */
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#undef HAVE_STRERROR
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strsignal function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define if you have the wait3 function. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define if you have the waitpid function. */
|
||||
/* #undef HAVE_WAITPID */
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
#undef HAVE_DIRENT_H
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <mach/mach.h> header file. */
|
||||
/* #undef HAVE_MACH_MACH_H */
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
|
||||
/* Define if you have the <sys/timeb.h> header file. */
|
||||
#undef HAVE_SYS_TIMEB_H
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
|
||||
/* Define if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
/* Define if you have the dgc library (-ldgc). */
|
||||
/* #undef HAVE_LIBDGC */
|
||||
|
||||
/* Define if you have the kstat library (-lkstat). */
|
||||
/* #undef HAVE_LIBKSTAT */
|
||||
|
||||
/* Define if you have the sun library (-lsun). */
|
||||
/* #undef HAVE_LIBSUN */
|
||||
|
||||
/* Use high resolution file timestamps if nonzero. */
|
||||
#define FILE_TIMESTAMP_HI_RES 0
|
||||
|
||||
/* Define to 1 if the 'getloadavg' function needs to be run setuid or setgid.
|
||||
*/
|
||||
/* #undef GETLOADAVG_PRIVILEGED */
|
||||
|
||||
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define to 1 if you have the 'atexit' function. */
|
||||
#define HAVE_ATEXIT 1
|
||||
|
||||
/* Use case insensitive file names */
|
||||
/* #undef HAVE_CASE_INSENSITIVE_FS */
|
||||
|
||||
/* Define to 1 if you have the clock_gettime function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Embed GNU Guile support. Windows build sets this on the
|
||||
compilation command line. */
|
||||
/* #undef HAVE_GUILE */
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
/* #undef HAVE_DCGETTEXT */
|
||||
|
||||
/* Define to 1 if you have the declaration of 'bsd_signal', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_BSD_SIGNAL 0
|
||||
|
||||
/* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_SYS_SIGLIST 0
|
||||
|
||||
/* Define to 1 if you have the declaration of '_sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL__SYS_SIGLIST 0
|
||||
|
||||
/* Define to 1 if you have the declaration of '__sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL___SYS_SIGLIST 0
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
|
||||
*/
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file, and it defines getcwd()
|
||||
and chdir().
|
||||
*/
|
||||
#if (defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(__INTERIX)
|
||||
# define HAVE_DIRECT_H 1
|
||||
#endif
|
||||
|
||||
/* Use platform specific coding */
|
||||
#define HAVE_DOS_PATHS 1
|
||||
|
||||
/* Define to 1 if you have the 'dup2' function. */
|
||||
#define HAVE_DUP2 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the 'fdopen' function. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_FDOPEN 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'fileno' function. */
|
||||
#define HAVE_FILENO 1
|
||||
|
||||
/* Define to 1 if you have the 'getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the 'getgroups' function. */
|
||||
/* #undef HAVE_GETGROUPS */
|
||||
|
||||
/* Define to 1 if you have the 'gethostbyname' function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define to 1 if you have the 'gethostname' function. */
|
||||
/* #undef HAVE_GETHOSTNAME */
|
||||
|
||||
/* Define to 1 if you have the 'getloadavg' function. */
|
||||
/* #undef HAVE_GETLOADAVG */
|
||||
|
||||
/* Define to 1 if you have the 'getrlimit' function. */
|
||||
/* #undef HAVE_GETRLIMIT */
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
/* #undef HAVE_GETTEXT */
|
||||
|
||||
/* Define to 1 if you have a standard gettimeofday function */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
/* #undef HAVE_ICONV */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'dgc' library (-ldgc). */
|
||||
/* #undef HAVE_LIBDGC */
|
||||
|
||||
/* Define to 1 if you have the 'kstat' library (-lkstat). */
|
||||
/* #undef HAVE_LIBKSTAT */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
/*#define HAVE_LOCALE_H 1*/
|
||||
|
||||
/* Define to 1 if you have the 'lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define to 1 if you have the <mach/mach.h> header file. */
|
||||
/* #undef HAVE_MACH_MACH_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the 'mkstemp' function. */
|
||||
/* #undef HAVE_MKSTEMP */
|
||||
|
||||
/* Define to 1 if you have the 'mktemp' function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines 'DIR'. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <nlist.h> header file. */
|
||||
/* #undef HAVE_NLIST_H */
|
||||
|
||||
/* Define to 1 if you have the 'pipe' function. */
|
||||
/* #undef HAVE_PIPE */
|
||||
|
||||
/* Define to 1 if you have the 'pstat_getdynamic' function. */
|
||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||
|
||||
/* Define to 1 if you have the 'readlink' function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define to 1 if you have the 'realpath' function. */
|
||||
/* #undef HAVE_REALPATH */
|
||||
|
||||
/* Define to 1 if <signal.h> defines the SA_RESTART constant. */
|
||||
/* #undef HAVE_SA_RESTART */
|
||||
|
||||
/* Define to 1 if you have the 'setegid' function. */
|
||||
/* #undef HAVE_SETEGID */
|
||||
|
||||
/* Define to 1 if you have the 'seteuid' function. */
|
||||
/* #undef HAVE_SETEUID */
|
||||
|
||||
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||
/* #undef HAVE_SETLINEBUF */
|
||||
|
||||
/* Define to 1 if you have the 'setlocale' function. */
|
||||
/*#define HAVE_SETLOCALE 1*/
|
||||
|
||||
/* Define to 1 if you have the 'setregid' function. */
|
||||
/* #undef HAVE_SETREGID */
|
||||
|
||||
/* Define to 1 if you have the 'setreuid' function. */
|
||||
/* #undef HAVE_SETREUID */
|
||||
|
||||
/* Define to 1 if you have the 'setrlimit' function. */
|
||||
/* #undef HAVE_SETRLIMIT */
|
||||
|
||||
/* Define to 1 if you have the 'setvbuf' function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
/* Define to 1 if you have the 'sigaction' function. */
|
||||
/* #undef HAVE_SIGACTION */
|
||||
|
||||
/* Define to 1 if you have the 'sigsetmask' function. */
|
||||
/* #undef HAVE_SIGSETMASK */
|
||||
|
||||
/* Define to 1 if you have the 'socket' function. */
|
||||
/* #undef HAVE_SOCKET */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the 'strcasecmp' function. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_STRCASECMP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'strcmpi' function. */
|
||||
#define HAVE_STRCMPI 1
|
||||
|
||||
/* Define to 1 if you have the 'strcoll' function and it is properly defined.
|
||||
*/
|
||||
#define HAVE_STRCOLL 1
|
||||
|
||||
/* Define to 1 if you have the 'strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the 'strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the 'stricmp' function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
/* #define HAVE_STRINGS_H 1 */
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the 'strncasecmp' function. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'strncmpi' function. */
|
||||
/* #undef HAVE_STRNCMPI */
|
||||
|
||||
/* Define to 1 if you have the 'strndup' function. */
|
||||
/* #undef HAVE_STRNDUP */
|
||||
|
||||
/* Define to 1 if you have the 'strnicmp' function. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_STRNICMP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'strsignal' function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define to 1 if you have the `isatty' function. */
|
||||
#define HAVE_ISATTY 1
|
||||
|
||||
/* Define to 1 if you have the `ttyname' function. */
|
||||
#define HAVE_TTYNAME 1
|
||||
char *ttyname (int);
|
||||
|
||||
/* Define to 1 if 'n_un.n_name' is a member of 'struct nlist'. */
|
||||
/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines 'DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines 'DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
/* #undef HAVE_SYS_RESOURCE_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to 1 if you have the \'union wait' type in <sys/wait.h>. */
|
||||
/* #undef HAVE_UNION_WAIT */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'wait3' function. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define to 1 if you have the 'waitpid' function. */
|
||||
/* #undef HAVE_WAITPID */
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "Windows32"
|
||||
|
||||
/* Grok DOS paths (drive specs and backslash path element separators) */
|
||||
#define HAVE_DOS_PATHS
|
||||
/* 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.
|
||||
@@ -394,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
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
*.m4
|
||||
config.*
|
||||
|
||||
Makefile Makefile.in
|
||||
12
config/.gitignore
vendored
Normal file
12
config/.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
ar-lib
|
||||
compile
|
||||
config.guess
|
||||
config.rpath
|
||||
config.sub
|
||||
depcomp
|
||||
install-sh
|
||||
mdate-sh
|
||||
missing
|
||||
texinfo.tex
|
||||
*.m4
|
||||
!dospaths.m4
|
||||
@@ -1,14 +0,0 @@
|
||||
2002-04-21 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* codeset.m4: New file, from gettext-0.11.1.
|
||||
* gettext.m4: New file, from gettext-0.11.1.
|
||||
* glibc21.m4: New file, from gettext-0.11.1.
|
||||
* iconv.m4: New file, from gettext-0.11.1.
|
||||
* isc-posix.m4: New file, from gettext-0.11.1.
|
||||
* lcmessage.m4: New file, from gettext-0.11.1.
|
||||
* lib-ld.m4: New file, from gettext-0.11.1.
|
||||
* lib-link.m4: New file, from gettext-0.11.1.
|
||||
* lib-prefix.m4: New file, from gettext-0.11.1.
|
||||
* progtest.m4: New file, from gettext-0.11.1.
|
||||
* Makefile.am: New file.
|
||||
|
||||
49
config/ChangeLog.1
Normal file
49
config/ChangeLog.1
Normal file
@@ -0,0 +1,49 @@
|
||||
2012-01-15 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* dospaths.m4: Use AC_LANG_PROGRAM to encapsulate the test code.
|
||||
Fixes Savannah bug #35256. Patch from Sebastian Pipping.
|
||||
|
||||
2006-03-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* dospaths.m4: Add MSYS to the list of targets allowing DOS-style
|
||||
pathnames. Reported by David Ergo <david.ergo@alterface.com>.
|
||||
|
||||
2005-07-01 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Added more M4 files to EXTRA_DIST, so
|
||||
users can re-run aclocal.
|
||||
|
||||
2003-04-30 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* dospaths.m4: New macro to test for DOS-style pathnames, based on
|
||||
coreutils 5.0 "dos.m4" by Jim Meyering.
|
||||
|
||||
2002-04-21 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* codeset.m4: New file, from gettext-0.11.1.
|
||||
* gettext.m4: New file, from gettext-0.11.1.
|
||||
* glibc21.m4: New file, from gettext-0.11.1.
|
||||
* iconv.m4: New file, from gettext-0.11.1.
|
||||
* isc-posix.m4: New file, from gettext-0.11.1.
|
||||
* lcmessage.m4: New file, from gettext-0.11.1.
|
||||
* lib-ld.m4: New file, from gettext-0.11.1.
|
||||
* lib-link.m4: New file, from gettext-0.11.1.
|
||||
* lib-prefix.m4: New file, from gettext-0.11.1.
|
||||
* progtest.m4: New file, from gettext-0.11.1.
|
||||
* Makefile.am: New file.
|
||||
|
||||
|
||||
Copyright (C) 2002-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -1,4 +1,18 @@
|
||||
EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 \
|
||||
intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \
|
||||
isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \
|
||||
progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 2002-2014 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-2014 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([pds_AC_DOS_PATHS], [
|
||||
AC_CACHE_CHECK([whether system uses MSDOS-style paths], [ac_cv_dos_paths], [
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__ && !defined __CYGWIN__
|
||||
neither MSDOS nor Windows nor OS2
|
||||
#endif
|
||||
]])],
|
||||
[ac_cv_dos_paths=yes],
|
||||
[ac_cv_dos_paths=no])])
|
||||
|
||||
AS_IF([test x"$ac_cv_dos_paths" = xyes],
|
||||
[ AC_DEFINE_UNQUOTED([HAVE_DOS_PATHS], 1,
|
||||
[Define if the system uses DOS-style pathnames.])])
|
||||
])
|
||||
@@ -1,14 +1,34 @@
|
||||
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
||||
|
||||
Copyright (C) 1994-2014 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 if `sys_siglist' is declared by <signal.h>. */
|
||||
/* Define to 1 if 'sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
||||
# define SYS_SIGLIST_DECLARED 1
|
||||
|
||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
||||
# define HAVE_SYS_SIGLIST 1
|
||||
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||
# define HAVE_DECL_SYS_SIGLIST 1
|
||||
|
||||
#else
|
||||
|
||||
@@ -20,45 +40,47 @@
|
||||
/* 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 to 1 if you have 'alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define if you have the fdopen function. */
|
||||
/* Define to 1 if you have the fdopen function. */
|
||||
#define HAVE_FDOPEN 1
|
||||
|
||||
/* Define to 1 if you have the `getgroups' function. */
|
||||
/* Define to 1 if you have the 'getgroups' function. */
|
||||
#define HAVE_GETGROUPS 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the mkstemp function. */
|
||||
/* Define to 1 if you have the mkstemp function. */
|
||||
#define HAVE_MKSTEMP 1
|
||||
|
||||
/* Define to 1 if you have the `mktemp' function. */
|
||||
/* Define to 1 if you have the 'mktemp' function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have the `setlinebuf' function. */
|
||||
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||
#define HAVE_SETLINEBUF 1
|
||||
|
||||
/* Define to 1 if you have the `setvbuf' function. */
|
||||
/* Define to 1 if you have the 'setvbuf' function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
#define SCCS_GET "get"
|
||||
|
||||
/* Define to `unsigned long' or `unsigned long long'
|
||||
/* Define to 'unsigned long' or 'unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#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 to 1 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
|
||||
/* 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%"
|
||||
@@ -78,11 +100,8 @@
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "%VERSION%"
|
||||
|
||||
/* Define to 1 if the C compiler supports function prototypes. */
|
||||
#define PROTOTYPES 1
|
||||
|
||||
/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
||||
#define SYS_SIGLIST_DECLARED 1
|
||||
/* Output sync sypport */
|
||||
#define NO_OUTPUT_SYNC
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "%VERSION%"
|
||||
|
||||
525
configure.ac
Normal file
525
configure.ac
Normal file
@@ -0,0 +1,525 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
# Copyright (C) 1993-2014 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_INIT([GNU make],[4.1],[bug-make@gnu.org])
|
||||
|
||||
AC_PREREQ([2.62])
|
||||
|
||||
# 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.11.1 silent-rules foreign -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.18.1])
|
||||
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])
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_UID_T
|
||||
AC_TYPE_PID_T
|
||||
|
||||
# Find some definition for uintmax_t
|
||||
|
||||
AC_CHECK_TYPE([uintmax_t],[],
|
||||
[ uintmax_t="unsigned long"
|
||||
AC_CHECK_TYPE([unsigned long long],[uintmax_t="unsigned long long"])
|
||||
AC_DEFINE_UNQUOTED([uintmax_t], [$uintmax_t],
|
||||
[Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])
|
||||
])
|
||||
|
||||
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
||||
|
||||
AC_STRUCT_ST_MTIM_NSEC
|
||||
AC_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])
|
||||
|
||||
# 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_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-2014 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,
|
||||
|
||||
390
configure.in
390
configure.in
@@ -1,390 +0,0 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(GNU make,3.80,bug-make@gnu.org)
|
||||
|
||||
AC_PREREQ(2.54)
|
||||
|
||||
AC_REVISION([[$Id$]])
|
||||
|
||||
# Autoconf setup
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_SRCDIR(vpath.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
# Automake setup
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CPP
|
||||
AC_CHECK_PROG(AR, ar, ar, ar)
|
||||
# Perl is needed for the test suite (only)
|
||||
AC_CHECK_PROG(PERL, perl, perl, perl)
|
||||
|
||||
# Specialized system macros
|
||||
AC_CANONICAL_HOST
|
||||
AC_AIX
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
|
||||
# Enable gettext, in "external" mode.
|
||||
|
||||
AM_GNU_GETTEXT_VERSION(0.11.5)
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
# This test must come as early as possible after the compiler configuration
|
||||
# tests, because the choice of the file model can (in principle) affect
|
||||
# whether functions and headers are available, whether they work, etc.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# Checks for libraries.
|
||||
AC_SEARCH_LIBS(getpwnam, [sun])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
||||
memory.h sys/param.h sys/time.h sys/timeb.h)
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_CC_STDC
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_UID_T
|
||||
AC_TYPE_PID_T
|
||||
|
||||
# Find some definition for uintmax_t
|
||||
|
||||
AC_CHECK_TYPE(uintmax_t,,[
|
||||
uintmax_t="unsigned long"
|
||||
AC_CHECK_TYPE(unsigned long long,[uintmax_t="unsigned long long"])
|
||||
AC_DEFINE_UNQUOTED(uintmax_t,$uintmax_t,[Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])])
|
||||
|
||||
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
||||
|
||||
AC_STRUCT_ST_MTIM_NSEC
|
||||
AC_MSG_CHECKING([whether to use high resolution file timestamps])
|
||||
AC_CACHE_VAL(make_cv_file_timestamp_hi_res, [
|
||||
make_cv_file_timestamp_hi_res=no
|
||||
if test "$ac_cv_struct_st_mtim_nsec" != no; then
|
||||
AC_TRY_COMPILE([
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
# endif],
|
||||
[char a[0x7fffffff < (uintmax_t) -1 >> 30 ? 1 : -1];],
|
||||
make_cv_file_timestamp_hi_res=yes)
|
||||
fi])
|
||||
AC_MSG_RESULT($make_cv_file_timestamp_hi_res)
|
||||
if test "$make_cv_file_timestamp_hi_res" = yes; then
|
||||
val=1
|
||||
else
|
||||
val=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(FILE_TIMESTAMP_HI_RES, $val,
|
||||
[Use high resolution file timestamps if nonzero.])
|
||||
|
||||
if test "$make_cv_file_timestamp_hi_res" = yes; then
|
||||
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||||
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
|
||||
if test "$ac_cv_search_clock_gettime" != no; then
|
||||
AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
|
||||
[Define if you have the clock_gettime function.])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# See if we have a standard version of gettimeofday(). Since actual
|
||||
# implementations can differ, just make sure we have the most common
|
||||
# one.
|
||||
AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func_gettimeofday,
|
||||
[ac_cv_func_gettimeofday=no
|
||||
AC_TRY_RUN([#include <sys/time.h>
|
||||
int main ()
|
||||
{
|
||||
struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
|
||||
exit (gettimeofday (&t, 0) != 0
|
||||
|| t.tv_sec < 0 || t.tv_usec < 0);
|
||||
}],
|
||||
ac_cv_func_gettimeofday=yes,
|
||||
ac_cv_func_gettimeofday=no,
|
||||
ac_cv_func_gettimeofday="no (cross-compiling)")])
|
||||
if test "$ac_cv_func_gettimeofday" = yes; then
|
||||
AC_DEFINE(HAVE_GETTIMEOFDAY, 1,
|
||||
[Define if you have a standard gettimeofday function])
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS( memcpy memmove strchr strdup mkstemp mktemp fdopen \
|
||||
bsd_signal dup2 getcwd sigsetmask sigaction getgroups \
|
||||
seteuid setegid setlinebuf setreuid setregid setvbuf pipe \
|
||||
strerror strsignal)
|
||||
|
||||
make_FUNC_SETVBUF_REVERSED
|
||||
|
||||
# strcoll() is used by the GNU glob library
|
||||
AC_FUNC_STRCOLL
|
||||
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_VFORK
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_CLOSEDIR_VOID
|
||||
|
||||
AC_FUNC_GETLOADAVG
|
||||
|
||||
# AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it
|
||||
# doesn't. So, we will.
|
||||
|
||||
if test "$ac_cv_header_nlist_h" = yes; then
|
||||
AC_TRY_COMPILE([#include <nlist.h>],
|
||||
[struct nlist nl;
|
||||
nl.n_name = "string";
|
||||
return 0;],
|
||||
make_cv_nlist_struct=yes,
|
||||
make_cv_nlist_struct=no)
|
||||
if test "$make_cv_nlist_struct" = yes; then
|
||||
AC_DEFINE(NLIST_STRUCT, 1,
|
||||
[Define if struct nlist.n_name is a pointer rather than an array.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DECL_SYS_SIGLIST
|
||||
|
||||
# Check out the wait reality.
|
||||
AC_CHECK_HEADERS(sys/wait.h)
|
||||
AC_CHECK_FUNCS(waitpid wait3)
|
||||
AC_MSG_CHECKING(for union wait)
|
||||
AC_CACHE_VAL(make_cv_union_wait, [dnl
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <sys/wait.h>],
|
||||
[union wait status; int pid; pid = wait (&status);
|
||||
#ifdef WEXITSTATUS
|
||||
/* Some POSIXoid systems have both the new-style macros and the old
|
||||
union wait type, and they do not work together. If union wait
|
||||
conflicts with WEXITSTATUS et al, we don't want to use it at all. */
|
||||
if (WEXITSTATUS (status) != 0) pid = -1;
|
||||
#ifdef WTERMSIG
|
||||
/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
|
||||
-- blow chunks here --
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_WAITPID
|
||||
/* Make sure union wait works with waitpid. */
|
||||
pid = waitpid (-1, &status, 0);
|
||||
#endif
|
||||
],
|
||||
[make_cv_union_wait=yes], [make_cv_union_wait=no])])
|
||||
if test "$make_cv_union_wait" = yes; then
|
||||
AC_DEFINE(HAVE_UNION_WAIT, 1, [Define this if you have the \`union wait' type in <sys/wait.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($make_cv_union_wait)
|
||||
|
||||
|
||||
# See if the user wants to use pmake's "customs" distributed build capability
|
||||
|
||||
use_customs=false
|
||||
AC_ARG_WITH(customs,
|
||||
AC_HELP_STRING([--with-customs=DIR],
|
||||
[enable remote jobs via Customs--see README.customs]),
|
||||
[case $withval in
|
||||
n|no) : ;;
|
||||
*) make_cppflags="$CPPFLAGS"
|
||||
case $withval in
|
||||
y|ye|yes) : ;;
|
||||
*) CPPFLAGS="$CPPFLAGS -I$with_customs/include/customs"
|
||||
make_ldflags="$LDFLAGS -L$with_customs/lib" ;;
|
||||
esac
|
||||
CF_NETLIBS
|
||||
AC_CHECK_HEADER(customs.h,
|
||||
[use_customs=true
|
||||
LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"],
|
||||
[with_customs=no
|
||||
CPPFLAGS="$make_cppflags" make_badcust=yes])
|
||||
;;
|
||||
esac])
|
||||
# Tell automake about this, so it can include the right .c files.
|
||||
AM_CONDITIONAL(USE_CUSTOMS, test "$use_customs" = true)
|
||||
|
||||
# See if we can handle the job server feature, and if the user wants it.
|
||||
|
||||
AC_ARG_ENABLE(job-server,
|
||||
AC_HELP_STRING([--disable-job-server],
|
||||
[disallow recursive make communication during -jN]),
|
||||
[make_cv_job_server="$enableval" user_job_server="$enableval"],
|
||||
[make_cv_job_server="yes"])
|
||||
|
||||
has_wait_nohang=yes
|
||||
case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
|
||||
no/no) has_wait_nohang=no ;;
|
||||
esac
|
||||
|
||||
AC_CACHE_CHECK(for SA_RESTART, make_cv_sa_restart, [
|
||||
AC_TRY_COMPILE([#include <signal.h>],
|
||||
[return SA_RESTART;],
|
||||
make_cv_sa_restart=yes,
|
||||
make_cv_sa_restart=no)])
|
||||
if test "$make_cv_sa_restart" != no; then
|
||||
AC_DEFINE(HAVE_SA_RESTART, 1,
|
||||
[Define if <signal.h> defines the SA_RESTART constant.])
|
||||
fi
|
||||
|
||||
case "$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/$make_cv_job_server" in
|
||||
yes/yes/yes/yes/yes)
|
||||
AC_DEFINE(MAKE_JOBSERVER, 1,
|
||||
[Define this to enable job server support in GNU make.]);;
|
||||
esac
|
||||
|
||||
# Find the SCCS commands, so we can include them in our default rules.
|
||||
|
||||
AC_CACHE_CHECK(for location of SCCS get command, make_cv_path_sccs_get, [
|
||||
if test -f /usr/sccs/get; then
|
||||
make_cv_path_sccs_get=/usr/sccs/get
|
||||
else
|
||||
make_cv_path_sccs_get=get
|
||||
fi])
|
||||
AC_DEFINE_UNQUOTED(SCCS_GET, ["$make_cv_path_sccs_get"], [Define to the name of the SCCS 'get' command.])
|
||||
|
||||
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
||||
if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
|
||||
test -f s.conftest; then
|
||||
# We successfully created an SCCS file.
|
||||
AC_CACHE_CHECK(if SCCS get command understands -G, make_cv_sys_get_minus_G, [
|
||||
if $make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
||||
test -f conftoast; then
|
||||
make_cv_sys_get_minus_G=yes
|
||||
else
|
||||
make_cv_sys_get_minus_G=no
|
||||
fi])
|
||||
case "$make_cv_sys_get_minus_G" in
|
||||
yes) AC_DEFINE(SCCS_GET_MINUS_G, 1,
|
||||
[Define this if the SCCS 'get' command understands the '-G<file>' option.]);;
|
||||
esac
|
||||
fi
|
||||
rm -f s.conftest conftoast
|
||||
|
||||
# Check the system to see if it provides GNU glob. If not, use our
|
||||
# local version.
|
||||
|
||||
AC_MSG_CHECKING(if system libc has GNU glob)
|
||||
AC_CACHE_VAL(make_cv_sys_gnu_glob, [
|
||||
AC_EGREP_CPP(gnu glob,[
|
||||
#include <features.h>
|
||||
#include <glob.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#define GLOB_INTERFACE_VERSION 1
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
||||
gnu glob
|
||||
# endif
|
||||
#endif
|
||||
], [AC_MSG_RESULT(yes)
|
||||
make_cv_sys_gnu_glob=yes], [AC_MSG_RESULT([no; using local copy])
|
||||
AC_SUBST(GLOBINC) GLOBINC='-I$(srcdir)/glob'
|
||||
AC_SUBST(GLOBLIB) GLOBLIB=glob/libglob.a
|
||||
make_cv_sys_gnu_glob=no])])
|
||||
# Tell automake about this, so it can build the right .c files.
|
||||
AM_CONDITIONAL(USE_LOCAL_GLOB, test "$make_cv_sys_gnu_glob" = no)
|
||||
|
||||
# PTX systems have a broken implementation of SA_RESTART. I know of
|
||||
# no way to test for this behavior, so I'll just test for PTX
|
||||
|
||||
case "$host" in
|
||||
i386-sequent-sysv4)
|
||||
AC_DEFINE(HAVE_BROKEN_RESTART, 1, [This system has SA_RESTART, but it doesn't work properly.])
|
||||
echo ""
|
||||
echo "WARNING: The SA_RESTART sigaction() flag does not work on PTX."
|
||||
echo " This causes 'make -j' to fail at random times."
|
||||
echo " I am installing a workaround, which is mostly but not 100%"
|
||||
echo " effective. If you see random failures during 'make -j'"
|
||||
echo " you should either contact the bug list, or not use -j."
|
||||
echo "" ;;
|
||||
esac
|
||||
|
||||
# Let the makefile know what our build host is
|
||||
|
||||
AC_DEFINE_UNQUOTED(MAKE_HOST,"$host",[Build host information.])
|
||||
MAKE_HOST="$host"
|
||||
AC_SUBST(MAKE_HOST)
|
||||
|
||||
# Include the Maintainer's Makefile section, if it's here.
|
||||
|
||||
MAINT_MAKEFILE=/dev/null
|
||||
if test -r "$srcdir/maintMakefile"; then
|
||||
MAINT_MAKEFILE="$srcdir/maintMakefile"
|
||||
fi
|
||||
AC_SUBST_FILE(MAINT_MAKEFILE)
|
||||
|
||||
# Allow building with dmalloc
|
||||
AM_WITH_DMALLOC
|
||||
|
||||
|
||||
# Sanity check and inform the user of what we found
|
||||
|
||||
case "$make_badcust" in
|
||||
yes) echo
|
||||
echo "WARNING: --with-customs specified but no customs.h could be found;"
|
||||
echo " disabling Customs support."
|
||||
echo ;;
|
||||
esac
|
||||
|
||||
case "$with_customs" in
|
||||
""|n|no|y|ye|yes) ;;
|
||||
*) if test -f "$with_customs/lib/libcustoms.a"; then
|
||||
:
|
||||
else
|
||||
echo
|
||||
echo "WARNING: '$with_customs/lib' does not appear to contain the"
|
||||
echo " Customs library. You must build and install Customs"
|
||||
echo " before compiling GNU make."
|
||||
echo
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
case "$has_wait_nohang" in
|
||||
no) echo
|
||||
echo "WARNING: Your system has neither waitpid() nor wait3()."
|
||||
echo " Without one of these, signal handling is unreliable."
|
||||
echo " You should be aware that running GNU make with -j"
|
||||
echo " could result in erratic behavior."
|
||||
echo ;;
|
||||
esac
|
||||
|
||||
case "$make_cv_job_server/$user_job_server" in
|
||||
no/yes) echo
|
||||
echo "WARNING: Make job server requires a POSIX-ish system that"
|
||||
echo " supports the pipe(), sigaction(), and either"
|
||||
echo " waitpid() or wait3() functions. Your system doesn't"
|
||||
echo " appear to provide one or more of those."
|
||||
echo " Disabling job server support."
|
||||
echo ;;
|
||||
esac
|
||||
|
||||
|
||||
# Specify what files are to be created.
|
||||
# We only generate the build.sh if we have a build.sh.in; we won't have
|
||||
# one before we've created a distribution.
|
||||
|
||||
AC_CONFIG_FILES(Makefile glob/Makefile po/Makefile.in config/Makefile doc/Makefile)
|
||||
|
||||
if test -f $srcdir/build.sh.in; then
|
||||
AC_CONFIG_FILES(build.sh)
|
||||
fi
|
||||
|
||||
|
||||
# OK, do it!
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
dnl Local Variables:
|
||||
dnl comment-start: "dnl "
|
||||
dnl comment-end: ""
|
||||
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
||||
dnl compile-command: "make configure config.h.in"
|
||||
dnl End:
|
||||
24
debug.h
24
debug.h
@@ -1,22 +1,18 @@
|
||||
/* Debugging macros and interface.
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2014 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)
|
||||
|
||||
272
default.c
272
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-2014 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,37 +96,39 @@ 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
|
||||
".obj.exe",
|
||||
@@ -145,6 +169,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 +179,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 $@",
|
||||
@@ -187,6 +223,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 +254,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 +284,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 +324,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 +340,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 +363,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",
|
||||
@@ -376,6 +430,7 @@ static char *default_variables[] =
|
||||
|
||||
"MV", "rename/new_version",
|
||||
"CP", "copy",
|
||||
".LIBPATTERNS", "%.olb lib%.a",
|
||||
|
||||
#else /* !VMS */
|
||||
|
||||
@@ -385,13 +440,15 @@ 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,
|
||||
@@ -401,17 +458,17 @@ static char *default_variables[] =
|
||||
"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 +478,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 +488,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,6 +516,8 @@ 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",
|
||||
"COMPILE.C", "$(COMPILE.cc)",
|
||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||
@@ -467,6 +526,8 @@ static char *default_variables[] =
|
||||
"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 +547,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 +627,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 +642,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);
|
||||
}
|
||||
|
||||
96
dep.h
96
dep.h
@@ -1,45 +1,47 @@
|
||||
/* Definitions of dependency data structures for GNU Make.
|
||||
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2014 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/>. */
|
||||
|
||||
/* 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'. */
|
||||
/* 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
|
||||
#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'.
|
||||
Each struct file's 'deps' points to a chain of these,
|
||||
chained through the 'next'. 'stem' is the stem for this
|
||||
dep line of static pattern rule or NULL.
|
||||
|
||||
Note that the first two words of this match a struct nameseq. */
|
||||
|
||||
struct dep
|
||||
{
|
||||
struct dep *next;
|
||||
char *name;
|
||||
const char *name;
|
||||
const char *stem;
|
||||
struct file *file;
|
||||
unsigned int changed : 8;
|
||||
unsigned int ignore_mtime : 1;
|
||||
unsigned int staticpattern : 1;
|
||||
unsigned int need_2nd_expansion : 1;
|
||||
unsigned int dontcare : 1;
|
||||
};
|
||||
|
||||
|
||||
@@ -48,31 +50,43 @@ struct dep
|
||||
struct nameseq
|
||||
{
|
||||
struct nameseq *next;
|
||||
char *name;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#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)
|
||||
#else
|
||||
/* Buggy compiler can't hack this. */
|
||||
extern char *dep_name ();
|
||||
#endif
|
||||
#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
|
||||
|
||||
extern struct dep *copy_dep_chain PARAMS ((struct dep *d));
|
||||
extern struct dep *read_all_makefiles PARAMS ((char **makefiles));
|
||||
extern int eval_buffer PARAMS ((char *buffer));
|
||||
extern int update_goal_chain PARAMS ((struct dep *goals, int makefiles));
|
||||
extern void uniquize_deps PARAMS ((struct dep *));
|
||||
#define alloc_dep() (xcalloc (sizeof (struct dep)))
|
||||
#define free_ns(_n) free (_n)
|
||||
#define free_dep(_d) free_ns (_d)
|
||||
|
||||
struct dep *copy_dep_chain (const struct dep *d);
|
||||
void free_dep_chain (struct dep *d);
|
||||
void free_ns_chain (struct nameseq *n);
|
||||
struct dep *read_all_makefiles (const char **makefiles);
|
||||
void eval_buffer (char *buffer, const gmk_floc *floc);
|
||||
enum update_status update_goal_chain (struct dep *goals);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Makefile Makefile.in
|
||||
fdl.texi make-stds.texi texinfo.tex
|
||||
make.info*
|
||||
make*.html
|
||||
make.aux make.cp make.cps make.fn make.fns make.ky
|
||||
make.pg make.toc make.tp make.vr make.log
|
||||
make.dvi make.ps make.pdf
|
||||
22
doc/.gitignore
vendored
Normal file
22
doc/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
manual/
|
||||
gendocs_template
|
||||
fdl.texi
|
||||
make-stds.texi
|
||||
stamp-vti
|
||||
version.texi
|
||||
make.info*
|
||||
make*.html
|
||||
make.aux
|
||||
make.cp
|
||||
make.cps
|
||||
make.dvi
|
||||
make.fn
|
||||
make.fns
|
||||
make.ky
|
||||
make.log
|
||||
make.pdf
|
||||
make.pg
|
||||
make.ps
|
||||
make.toc
|
||||
make.tp
|
||||
make.vr
|
||||
@@ -1,7 +1,19 @@
|
||||
## Process this file with automake to create Makefile.in.
|
||||
|
||||
## Makefile for GNU make documentation.
|
||||
## Copyright 2002 Free Software Foundation, Inc.
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 2000-2014 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
|
||||
@@ -10,14 +22,3 @@ info_TEXINFOS = make.texi
|
||||
make_TEXINFOS = fdl.texi make-stds.texi
|
||||
|
||||
CLEANFILES = make*.html
|
||||
|
||||
## ----------------------------- ##
|
||||
## Other documentation formats. ##
|
||||
## ----------------------------- ##
|
||||
|
||||
html: make_1.html
|
||||
|
||||
make_1.html: $(info_TEXINFOS) $(make_TEXINFOS)
|
||||
$(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/make.texi
|
||||
|
||||
.PHONY: html
|
||||
|
||||
5192
doc/make.texi
5192
doc/make.texi
File diff suppressed because it is too large
Load Diff
31
dosbuild.bat
31
dosbuild.bat
@@ -1,7 +1,26 @@
|
||||
@echo Building Make for MSDOS
|
||||
@rem Echo ON so they will see what is going on.
|
||||
@echo off
|
||||
rem Copyright (C) 1998-2014 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
|
||||
@@ -16,6 +35,8 @@ gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
|
||||
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g 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
|
||||
@@ -31,9 +52,11 @@ ar rv libglob.a glob.o fnmatch.o
|
||||
@echo off
|
||||
cd ..
|
||||
echo commands.o > respf.$$$
|
||||
for %%f in (job dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||
for %%f in (expand function vpath version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
||||
for %%f in (job output dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||
for %%f in (expand function vpath 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.$$$
|
||||
|
||||
572
expand.c
572
expand.c
@@ -1,23 +1,20 @@
|
||||
/* Variable expansion functions for GNU Make.
|
||||
Copyright (C) 1988, 89, 91, 92, 93, 95 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2014 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>
|
||||
|
||||
@@ -27,6 +24,10 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "variable.h"
|
||||
#include "rule.h"
|
||||
|
||||
/* Initially, any errors reported when expanding strings will be reported
|
||||
against the file where the error appears. */
|
||||
const gmk_floc **expanding_var = &reading_file;
|
||||
|
||||
/* The next two describe the variable output buffer.
|
||||
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.
|
||||
@@ -52,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);
|
||||
|
||||
@@ -62,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';
|
||||
}
|
||||
|
||||
@@ -92,23 +90,40 @@ initialize_variable_output ()
|
||||
|
||||
/* Recursively expand V. The returned string is malloc'd. */
|
||||
|
||||
static char *allocated_variable_append PARAMS ((const struct variable *v));
|
||||
static char *allocated_variable_append (const struct variable *v);
|
||||
|
||||
char *
|
||||
recursively_expand_for_file (v, file)
|
||||
struct variable *v;
|
||||
struct file *file;
|
||||
recursively_expand_for_file (struct variable *v, struct file *file)
|
||||
{
|
||||
char *value;
|
||||
const gmk_floc *this_var;
|
||||
const gmk_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)
|
||||
{
|
||||
if (!v->exp_count)
|
||||
/* Expanding V causes infinite recursion. Lose. */
|
||||
fatal (reading_file,
|
||||
_("Recursive variable `%s' references itself (eventually)"),
|
||||
v->name);
|
||||
OS (fatal, *expanding_var,
|
||||
_("Recursive variable '%s' references itself (eventually)"),
|
||||
v->name);
|
||||
--v->exp_count;
|
||||
}
|
||||
|
||||
@@ -125,9 +140,14 @@ recursively_expand_for_file (v, file)
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -137,12 +157,9 @@ recursively_expand_for_file (v, file)
|
||||
__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 *v;
|
||||
char *value;
|
||||
|
||||
v = lookup_variable (name, length);
|
||||
@@ -150,7 +167,8 @@ reference_variable (o, 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 (v) : v->value);
|
||||
@@ -167,304 +185,298 @@ 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 '$':
|
||||
/* $$ seen means output one $ to the variable output buffer. */
|
||||
o = variable_buffer_output (o, p, 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)
|
||||
{
|
||||
/* 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 ((unsigned char)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;
|
||||
}
|
||||
case '\0':
|
||||
break;
|
||||
|
||||
default:
|
||||
if (isblank ((unsigned char)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("");
|
||||
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 gmk_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;
|
||||
}
|
||||
@@ -474,13 +486,13 @@ variable_expand_for_file (line, file)
|
||||
any upper variable sets. Then expand the resulting value. */
|
||||
|
||||
static char *
|
||||
variable_append (name, length, set)
|
||||
const char *name;
|
||||
unsigned int length;
|
||||
const struct variable_set_list *set;
|
||||
variable_append (const char *name, unsigned int length,
|
||||
const struct variable_set_list *set, int local)
|
||||
{
|
||||
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)
|
||||
@@ -489,14 +501,14 @@ variable_append (name, length, set)
|
||||
/* Try to find the variable in this variable set. */
|
||||
v = lookup_variable_in_set (name, length, set->set);
|
||||
|
||||
/* If there isn't one, look to see if there's one in a set above us. */
|
||||
if (!v)
|
||||
return variable_append (name, length, set->next);
|
||||
/* 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);
|
||||
buf = variable_append (name, length, set->next, nextlocal);
|
||||
else
|
||||
buf = initialize_variable_output ();
|
||||
|
||||
@@ -505,15 +517,19 @@ variable_append (name, length, set)
|
||||
if (buf > variable_buffer)
|
||||
buf = variable_buffer_output (buf, " ", 1);
|
||||
|
||||
return variable_buffer_output (buf, v->value, strlen (v->value));
|
||||
/* 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 (v)
|
||||
const struct variable *v;
|
||||
allocated_variable_append (const struct variable *v)
|
||||
{
|
||||
char *val, *retval;
|
||||
char *val;
|
||||
|
||||
/* Construct the appended variable value. */
|
||||
|
||||
@@ -522,28 +538,22 @@ allocated_variable_append (v)
|
||||
|
||||
variable_buffer = 0;
|
||||
|
||||
val = variable_append (v->name, strlen (v->name), current_variable_set_list);
|
||||
val = variable_append (v->name, strlen (v->name),
|
||||
current_variable_set_list, 1);
|
||||
variable_buffer_output (val, "", 1);
|
||||
val = variable_buffer;
|
||||
|
||||
variable_buffer = obuf;
|
||||
variable_buffer_length = olen;
|
||||
|
||||
/* Now expand it and return that. */
|
||||
|
||||
retval = allocated_variable_expand (val);
|
||||
|
||||
free (val);
|
||||
return retval;
|
||||
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;
|
||||
|
||||
@@ -554,13 +564,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;
|
||||
}
|
||||
|
||||
174
filedef.h
174
filedef.h
@@ -1,50 +1,43 @@
|
||||
/* Definition of target file data structures for GNU Make.
|
||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997,
|
||||
2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2014 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
|
||||
{
|
||||
char *name;
|
||||
char *hname; /* Hashed filename */
|
||||
char *vpath; /* VPATH/vpath pathname */
|
||||
struct dep *deps; /* all dependencies, including duplicates */
|
||||
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. */
|
||||
@@ -62,60 +55,75 @@ 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 low_resolution_time:1; /* Nonzero if this file's time stamp
|
||||
has only one-second resolution. */
|
||||
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). */
|
||||
};
|
||||
|
||||
|
||||
extern struct file *default_goal_file, *suffix_file, *default_file;
|
||||
extern struct file *suffix_file, *default_file;
|
||||
|
||||
|
||||
extern struct file *lookup_file PARAMS ((char *name));
|
||||
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 set_command_state PARAMS ((struct file *file, int state));
|
||||
extern void notice_finished_file PARAMS ((struct file *file));
|
||||
extern void init_hash_files PARAMS ((void));
|
||||
extern char *build_target_list PARAMS ((char *old_list));
|
||||
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);
|
||||
char *build_target_list (char *old_list);
|
||||
void print_prereqs (const struct dep *deps);
|
||||
void print_file_data_base (void);
|
||||
|
||||
#if FILE_TIMESTAMP_HI_RES
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||
file_timestamp_cons (fname, (st).st_mtime, (st).st_mtim.ST_MTIM_NSEC)
|
||||
file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC)
|
||||
#else
|
||||
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||
file_timestamp_cons (fname, (st).st_mtime, 0)
|
||||
@@ -130,12 +138,12 @@ extern char *build_target_list PARAMS ((char *old_list));
|
||||
#define FILE_TIMESTAMP_LO_BITS (FILE_TIMESTAMP_HI_RES ? 30 : 0)
|
||||
|
||||
#define FILE_TIMESTAMP_S(ts) (((ts) - ORDINARY_MTIME_MIN) \
|
||||
>> FILE_TIMESTAMP_LO_BITS)
|
||||
>> FILE_TIMESTAMP_LO_BITS)
|
||||
#define FILE_TIMESTAMP_NS(ts) ((int) (((ts) - ORDINARY_MTIME_MIN) \
|
||||
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
||||
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
||||
|
||||
/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
|
||||
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;
|
||||
@@ -152,10 +160,9 @@ extern char *build_target_list PARAMS ((char *old_list));
|
||||
* 302 / 1000) \
|
||||
+ 1 + 1 + 4 + 25)
|
||||
|
||||
extern FILE_TIMESTAMP file_timestamp_cons PARAMS ((char const *,
|
||||
time_t, int));
|
||||
extern FILE_TIMESTAMP file_timestamp_now PARAMS ((int *));
|
||||
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 NONEXISTENT_MTIME if the file does not exist. */
|
||||
@@ -165,7 +172,7 @@ extern void file_timestamp_sprintf PARAMS ((char *p, FILE_TIMESTAMP ts));
|
||||
we don't find it.
|
||||
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 == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)
|
||||
|
||||
@@ -184,16 +191,19 @@ extern FILE_TIMESTAMP f_mtime PARAMS ((struct file *file, int search));
|
||||
/* 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)
|
||||
<< 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
|
||||
/* 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. */
|
||||
#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;
|
||||
|
||||
2171
function.c
2171
function.c
File diff suppressed because it is too large
Load Diff
44
getloadavg.c
44
getloadavg.c
@@ -1,21 +1,17 @@
|
||||
/* Get the system load averages.
|
||||
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1985-2014 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:
|
||||
|
||||
@@ -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>
|
||||
@@ -355,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
|
||||
|
||||
@@ -498,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. */
|
||||
|
||||
@@ -706,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;
|
||||
@@ -749,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);
|
||||
@@ -991,12 +985,10 @@ getloadavg (loadavg, nelem)
|
||||
#endif /* ! HAVE_GETLOADAVG */
|
||||
|
||||
#ifdef TEST
|
||||
#include "make.h"
|
||||
#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-2014 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-2014 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-2014 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 '?':
|
||||
|
||||
24
gettext.h
24
gettext.h
@@ -1,20 +1,18 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
This program 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, 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
|
||||
Library 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 Library 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 _LIBGETTEXT_H
|
||||
#define _LIBGETTEXT_H 1
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Makefile Makefile.in
|
||||
.deps
|
||||
@@ -1,3 +1,41 @@
|
||||
2013-10-20 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* glob.c (glob): Cherry-pick a471e96a5352a5f0bde6d32dd36d33524811a2b1
|
||||
from git://sourceware.org/git/glibc.git to fix SV 18123,
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=10278
|
||||
|
||||
2008-09-28 Juan Manuel Guerrero <juan.guerrero@gmx.de>
|
||||
|
||||
* glob.c (my_realloc) [__DJGPP__]: Don't define, and don't
|
||||
redefine realloc to call it, since the DJGPP's realloc handles
|
||||
NULL pointers correctly.
|
||||
|
||||
2007-12-22 Juan Manuel Guerrero <juan.guerrero@gmx.de> (tiny change)
|
||||
|
||||
* glob.c [__GNU_LIBRARY__ && __DJGPP__]: Add a realloc
|
||||
declaration that matches the one in the DJGPP libc.
|
||||
|
||||
2006-02-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* glob.c (my_malloc) [WINDOWS32]: Provide a full ISO C prototype,
|
||||
to avoid compiler warnings.
|
||||
|
||||
2005-06-25 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* fnmatch.h, glob.h [WINDOWS32]: Fix ifdefs in headers.
|
||||
Fixes Savannah bug #13477.
|
||||
|
||||
2005-03-11 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.c (glob_in_dir): Change FNM_CASEFOLD to be enabled if
|
||||
HAVE_CASE_INSENSITIVE_FS is defined.
|
||||
|
||||
2003-01-30 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* glob.h: Patch for FreeBSD by Mike Barcroft <mike@freebsd.org>
|
||||
Reported by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>. On
|
||||
FreeBSD, declare __size_t to simply size_t.
|
||||
|
||||
2002-04-22 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* Makefile.am: Use automake 1.6.
|
||||
@@ -132,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,6 +1,22 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.7 foreign
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
# Only build the library when the system doesn't already have GNU glob.
|
||||
if USE_LOCAL_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.
|
||||
# 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-2014 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-2014 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_ */
|
||||
159
guile.c
Normal file
159
guile.c
Normal file
@@ -0,0 +1,159 @@
|
||||
/* GNU Guile interface for GNU Make.
|
||||
Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
#include "gnumake.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "filedef.h"
|
||||
#include "dep.h"
|
||||
#include "variable.h"
|
||||
|
||||
#include <libguile.h>
|
||||
|
||||
/* Pre-2.0 versions of Guile don't have a typedef for gsubr function types. */
|
||||
#if SCM_MAJOR_VERSION < 2
|
||||
# define GSUBR_TYPE SCM (*) ()
|
||||
/* Guile 1.x doesn't really support i18n. */
|
||||
# define EVAL_STRING(_s) scm_c_eval_string (_s)
|
||||
#else
|
||||
# define GSUBR_TYPE scm_t_subr
|
||||
# define EVAL_STRING(_s) scm_eval_string (scm_from_utf8_string (_s))
|
||||
#endif
|
||||
|
||||
static SCM make_mod = SCM_EOL;
|
||||
static SCM obj_to_str = SCM_EOL;
|
||||
|
||||
/* Convert an SCM object into a string. */
|
||||
static char *
|
||||
cvt_scm_to_str (SCM obj)
|
||||
{
|
||||
return scm_to_locale_string (scm_call_1 (obj_to_str, obj));
|
||||
}
|
||||
|
||||
/* Perform the GNU make expansion function. */
|
||||
static SCM
|
||||
guile_expand_wrapper (SCM obj)
|
||||
{
|
||||
char *str = cvt_scm_to_str (obj);
|
||||
SCM ret;
|
||||
char *res;
|
||||
|
||||
DB (DB_BASIC, (_("guile: Expanding '%s'\n"), str));
|
||||
res = gmk_expand (str);
|
||||
ret = scm_from_locale_string (res);
|
||||
|
||||
free (str);
|
||||
free (res);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Perform the GNU make eval function. */
|
||||
static SCM
|
||||
guile_eval_wrapper (SCM obj)
|
||||
{
|
||||
char *str = cvt_scm_to_str (obj);
|
||||
|
||||
DB (DB_BASIC, (_("guile: Evaluating '%s'\n"), str));
|
||||
gmk_eval (str, 0);
|
||||
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
|
||||
/* Invoked by scm_c_define_module(), in the context of the GNU make module. */
|
||||
static void
|
||||
guile_define_module (void *data UNUSED)
|
||||
{
|
||||
/* Ingest the predefined Guile module for GNU make. */
|
||||
#include "gmk-default.h"
|
||||
|
||||
/* Register a subr for GNU make's eval capability. */
|
||||
scm_c_define_gsubr ("gmk-expand", 1, 0, 0, (GSUBR_TYPE) guile_expand_wrapper);
|
||||
|
||||
/* Register a subr for GNU make's eval capability. */
|
||||
scm_c_define_gsubr ("gmk-eval", 1, 0, 0, (GSUBR_TYPE) guile_eval_wrapper);
|
||||
|
||||
/* Define the rest of the module. */
|
||||
scm_c_eval_string (GUILE_module_defn);
|
||||
}
|
||||
|
||||
/* Initialize the GNU make Guile module. */
|
||||
static void *
|
||||
guile_init (void *arg UNUSED)
|
||||
{
|
||||
/* Define the module. */
|
||||
make_mod = scm_c_define_module ("gnu make", guile_define_module, NULL);
|
||||
|
||||
/* Get a reference to the object-to-string translator, for later. */
|
||||
obj_to_str = scm_variable_ref (scm_c_module_lookup (make_mod, "obj-to-str"));
|
||||
|
||||
/* Import the GNU make module exports into the generic space. */
|
||||
scm_c_eval_string ("(use-modules (gnu make))");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *
|
||||
internal_guile_eval (void *arg)
|
||||
{
|
||||
return cvt_scm_to_str (EVAL_STRING (arg));
|
||||
}
|
||||
|
||||
/* This is the function registered with make */
|
||||
static char *
|
||||
func_guile (const char *funcname UNUSED, unsigned int argc UNUSED, char **argv)
|
||||
{
|
||||
static int init = 0;
|
||||
|
||||
if (! init)
|
||||
{
|
||||
/* Initialize the Guile interpreter. */
|
||||
scm_with_guile (guile_init, NULL);
|
||||
init = 1;
|
||||
}
|
||||
|
||||
if (argv[0] && argv[0][0] != '\0')
|
||||
return scm_with_guile (internal_guile_eval, argv[0]);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ----- Public interface ----- */
|
||||
|
||||
/* We could send the flocp to define_new_function(), but since guile is
|
||||
"kind of" built-in, that didn't seem so useful. */
|
||||
int
|
||||
guile_gmake_setup (const gmk_floc *flocp UNUSED)
|
||||
{
|
||||
/* Create a make function "guile". */
|
||||
gmk_add_function ("guile", func_guile, 0, 1, GMK_FUNC_DEFAULT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
guile_gmake_setup (const gmk_floc *flocp UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
123
hash.c
123
hash.c
@@ -1,26 +1,23 @@
|
||||
/* hash.c -- hash table maintenance
|
||||
Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc.
|
||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.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/>. */
|
||||
|
||||
#include "make.h"
|
||||
#include "makeint.h"
|
||||
#include "hash.h"
|
||||
|
||||
#define CALLOC(t, n) ((t *) calloc (sizeof (t), (n)))
|
||||
#define CALLOC(t, n) ((t *) xcalloc (sizeof (t) * (n)))
|
||||
#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n)))
|
||||
#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n)))
|
||||
#define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n)))
|
||||
@@ -29,7 +26,7 @@ static void hash_rehash __P((struct hash_table* ht));
|
||||
static unsigned long round_up_2 __P((unsigned long rough));
|
||||
|
||||
/* Implement double hashing with open addressing. The table size is
|
||||
always a power of two. The secondary (`increment') hash function
|
||||
always a power of two. The secondary ('increment') hash function
|
||||
is forced to return an odd-value, in order to be relatively prime
|
||||
to the table size. This guarantees that the increment can
|
||||
potentially hit every slot in the table during collision
|
||||
@@ -41,21 +38,17 @@ void *hash_deleted_item = &hash_deleted_item;
|
||||
given size. */
|
||||
|
||||
void
|
||||
hash_init (ht, size, hash_1, hash_2, hash_cmp)
|
||||
struct hash_table* ht;
|
||||
unsigned long size;
|
||||
hash_func_t hash_1;
|
||||
hash_func_t hash_2;
|
||||
hash_cmp_func_t hash_cmp;
|
||||
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 %ld bytes for hash table: memory exhausted"),
|
||||
ht->ht_size * sizeof(struct token *));
|
||||
exit (1);
|
||||
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 */
|
||||
@@ -68,14 +61,11 @@ hash_init (ht, size, hash_1, hash_2, hash_cmp)
|
||||
ht->ht_compare = hash_cmp;
|
||||
}
|
||||
|
||||
/* Load an array of items into `ht'. */
|
||||
/* Load an array of items into 'ht'. */
|
||||
|
||||
void
|
||||
hash_load (ht, item_table, cardinality, size)
|
||||
struct hash_table* ht;
|
||||
void *item_table;
|
||||
unsigned long cardinality;
|
||||
unsigned long size;
|
||||
hash_load (struct hash_table *ht, void *item_table,
|
||||
unsigned long cardinality, unsigned long size)
|
||||
{
|
||||
char *items = (char *) item_table;
|
||||
while (cardinality--)
|
||||
@@ -85,15 +75,13 @@ hash_load (ht, item_table, cardinality, size)
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns the address of the table slot matching `key'. If `key' is
|
||||
/* Returns the address of the table slot matching 'key'. If 'key' is
|
||||
not found, return the address of an empty slot suitable for
|
||||
inserting `key'. The caller is responsible for incrementing
|
||||
inserting 'key'. The caller is responsible for incrementing
|
||||
ht_fill on insertion. */
|
||||
|
||||
void **
|
||||
hash_find_slot (ht, key)
|
||||
struct hash_table* ht;
|
||||
void const *key;
|
||||
hash_find_slot (struct hash_table *ht, const void *key)
|
||||
{
|
||||
void **slot;
|
||||
void **deleted_slot = 0;
|
||||
@@ -128,32 +116,25 @@ hash_find_slot (ht, key)
|
||||
}
|
||||
|
||||
void *
|
||||
hash_find_item (ht, key)
|
||||
struct hash_table* ht;
|
||||
void const *key;
|
||||
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 (ht, item)
|
||||
struct hash_table* ht;
|
||||
void *item;
|
||||
hash_insert (struct hash_table *ht, const void *item)
|
||||
{
|
||||
void **slot = hash_find_slot (ht, item);
|
||||
void *old_item = slot ? *slot : 0;
|
||||
const void *old_item = *slot;
|
||||
hash_insert_at (ht, item, slot);
|
||||
return ((HASH_VACANT (old_item)) ? 0 : old_item);
|
||||
return (void *)((HASH_VACANT (old_item)) ? 0 : old_item);
|
||||
}
|
||||
|
||||
void *
|
||||
hash_insert_at (ht, item, slot)
|
||||
struct hash_table* ht;
|
||||
void *item;
|
||||
void const *slot;
|
||||
hash_insert_at (struct hash_table *ht, const void *item, const void *slot)
|
||||
{
|
||||
void *old_item = *(void **) slot;
|
||||
const void *old_item = *(void **) slot;
|
||||
if (HASH_VACANT (old_item))
|
||||
{
|
||||
ht->ht_fill++;
|
||||
@@ -172,18 +153,14 @@ hash_insert_at (ht, item, slot)
|
||||
}
|
||||
|
||||
void *
|
||||
hash_delete (ht, item)
|
||||
struct hash_table* ht;
|
||||
void const *item;
|
||||
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 (ht, slot)
|
||||
struct hash_table* ht;
|
||||
void const *slot;
|
||||
hash_delete_at (struct hash_table *ht, const void *slot)
|
||||
{
|
||||
void *item = *(void **) slot;
|
||||
if (!HASH_VACANT (item))
|
||||
@@ -197,8 +174,7 @@ hash_delete_at (ht, slot)
|
||||
}
|
||||
|
||||
void
|
||||
hash_free_items (ht)
|
||||
struct hash_table* ht;
|
||||
hash_free_items (struct hash_table *ht)
|
||||
{
|
||||
void **vec = ht->ht_vec;
|
||||
void **end = &vec[ht->ht_size];
|
||||
@@ -214,8 +190,7 @@ hash_free_items (ht)
|
||||
}
|
||||
|
||||
void
|
||||
hash_delete_items (ht)
|
||||
struct hash_table* ht;
|
||||
hash_delete_items (struct hash_table *ht)
|
||||
{
|
||||
void **vec = ht->ht_vec;
|
||||
void **end = &vec[ht->ht_size];
|
||||
@@ -229,9 +204,7 @@ hash_delete_items (ht)
|
||||
}
|
||||
|
||||
void
|
||||
hash_free (ht, free_items)
|
||||
struct hash_table* ht;
|
||||
int free_items;
|
||||
hash_free (struct hash_table *ht, int free_items)
|
||||
{
|
||||
if (free_items)
|
||||
hash_free_items (ht);
|
||||
@@ -246,9 +219,7 @@ hash_free (ht, free_items)
|
||||
}
|
||||
|
||||
void
|
||||
hash_map (ht, map)
|
||||
struct hash_table *ht;
|
||||
hash_map_func_t map;
|
||||
hash_map (struct hash_table *ht, hash_map_func_t map)
|
||||
{
|
||||
void **slot;
|
||||
void **end = &ht->ht_vec[ht->ht_size];
|
||||
@@ -261,10 +232,7 @@ hash_map (ht, map)
|
||||
}
|
||||
|
||||
void
|
||||
hash_map_arg (ht, map, arg)
|
||||
struct hash_table *ht;
|
||||
hash_map_arg_func_t map;
|
||||
void *arg;
|
||||
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];
|
||||
@@ -279,8 +247,7 @@ hash_map_arg (ht, map, arg)
|
||||
/* Double the size of the hash table in the event of overflow... */
|
||||
|
||||
static void
|
||||
hash_rehash (ht)
|
||||
struct hash_table* ht;
|
||||
hash_rehash (struct hash_table *ht)
|
||||
{
|
||||
unsigned long old_ht_size = ht->ht_size;
|
||||
void **old_vec = ht->ht_vec;
|
||||
@@ -307,9 +274,7 @@ hash_rehash (ht)
|
||||
}
|
||||
|
||||
void
|
||||
hash_print_stats (ht, out_FILE)
|
||||
struct hash_table *ht;
|
||||
FILE *out_FILE;
|
||||
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,
|
||||
@@ -325,10 +290,7 @@ hash_print_stats (ht, out_FILE)
|
||||
user-supplied vector, or malloc one. */
|
||||
|
||||
void **
|
||||
hash_dump (ht, vector_0, compare)
|
||||
struct hash_table *ht;
|
||||
void **vector_0;
|
||||
qsort_cmp_t compare;
|
||||
hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
|
||||
{
|
||||
void **vector;
|
||||
void **slot;
|
||||
@@ -351,8 +313,7 @@ hash_dump (ht, vector_0, compare)
|
||||
/* Round a given number up to the nearest power of 2. */
|
||||
|
||||
static unsigned long
|
||||
round_up_2 (n)
|
||||
unsigned long n;
|
||||
round_up_2 (unsigned long n)
|
||||
{
|
||||
n |= (n >> 1);
|
||||
n |= (n >> 2);
|
||||
|
||||
55
hash.h
55
hash.h
@@ -1,20 +1,18 @@
|
||||
/* hash.h -- decls for hash table
|
||||
Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc.
|
||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.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 _hash_h_
|
||||
#define _hash_h_
|
||||
@@ -30,9 +28,9 @@
|
||||
#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. */
|
||||
/* 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));
|
||||
@@ -43,6 +41,9 @@ 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 */
|
||||
@@ -50,9 +51,6 @@ struct hash_table
|
||||
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 */
|
||||
hash_func_t ht_hash_1; /* primary hash function */
|
||||
hash_func_t ht_hash_2; /* secondary hash function */
|
||||
hash_cmp_func_t ht_compare; /* comparison function */
|
||||
};
|
||||
|
||||
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
||||
@@ -63,8 +61,8 @@ 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, void *item));
|
||||
void *hash_insert_at __P((struct hash_table *ht, void *item, void const *slot));
|
||||
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));
|
||||
@@ -81,6 +79,9 @@ extern void *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_) \
|
||||
@@ -104,10 +105,10 @@ extern void *hash_deleted_item;
|
||||
} while (0)
|
||||
|
||||
#define STRING_COMPARE(X, Y, RESULT) do { \
|
||||
RESULT = strcmp ((X), (Y)); \
|
||||
RESULT = (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||
} while (0)
|
||||
#define return_STRING_COMPARE(X, Y) do { \
|
||||
return strcmp ((X), (Y)); \
|
||||
return (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -140,10 +141,10 @@ extern void *hash_deleted_item;
|
||||
} while (0)
|
||||
|
||||
#define STRING_N_COMPARE(X, Y, N, RESULT) do { \
|
||||
RESULT = strncmp ((X), (Y), (N)); \
|
||||
RESULT = (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||
} while (0)
|
||||
#define return_STRING_N_COMPARE(X, Y, N) do { \
|
||||
return strncmp ((X), (Y), (N)); \
|
||||
return (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||
} while (0)
|
||||
|
||||
#ifdef HAVE_CASE_INSENSITIVE_FS
|
||||
@@ -173,10 +174,10 @@ extern void *hash_deleted_item;
|
||||
} while (0)
|
||||
|
||||
#define ISTRING_COMPARE(X, Y, RESULT) do { \
|
||||
RESULT = strcmpi ((X), (Y)); \
|
||||
RESULT = (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||
} while (0)
|
||||
#define return_ISTRING_COMPARE(X, Y) do { \
|
||||
return strcmpi ((X), (Y)); \
|
||||
return (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
1213
implicit.c
1213
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-2014 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
|
||||
# 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 */
|
||||
#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 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));
|
||||
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);
|
||||
|
||||
extern char **construct_command_argv PARAMS ((char *line, char **restp, struct file *file, char** batch_file));
|
||||
char **construct_command_argv (char *line, char **restp, struct file *file,
|
||||
int cmd_flags, char** batch_file);
|
||||
#ifdef VMS
|
||||
extern int child_execute_job PARAMS ((char *argv, struct child *child));
|
||||
int child_execute_job (char *argv, struct child *child);
|
||||
#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))
|
||||
# if defined(__EMX__)
|
||||
int child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd,
|
||||
char **argv, char **envp);
|
||||
# else
|
||||
void child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd,
|
||||
char **argv, char **envp) __attribute__ ((noreturn));
|
||||
# endif
|
||||
#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;
|
||||
|
||||
255
load.c
Normal file
255
load.c
Normal file
@@ -0,0 +1,255 @@
|
||||
/* Loading dynamic objects for GNU Make.
|
||||
Copyright (C) 2012-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#if MAKE_LOAD
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define SYMBOL_EXTENSION "_gmk_setup"
|
||||
|
||||
#include "debug.h"
|
||||
#include "filedef.h"
|
||||
#include "variable.h"
|
||||
|
||||
/* Tru64 V4.0 does not have this flag */
|
||||
#ifndef RTLD_GLOBAL
|
||||
# define RTLD_GLOBAL 0
|
||||
#endif
|
||||
|
||||
struct load_list
|
||||
{
|
||||
struct load_list *next;
|
||||
const char *name;
|
||||
void *dlp;
|
||||
};
|
||||
|
||||
static struct load_list *loaded_syms = NULL;
|
||||
|
||||
static load_func_t
|
||||
load_object (const gmk_floc *flocp, int noerror,
|
||||
const char *ldname, const char *symname)
|
||||
{
|
||||
static void *global_dl = NULL;
|
||||
load_func_t symp;
|
||||
|
||||
if (! global_dl)
|
||||
{
|
||||
global_dl = dlopen (NULL, RTLD_NOW|RTLD_GLOBAL);
|
||||
if (! global_dl)
|
||||
{
|
||||
const char *err = dlerror ();
|
||||
OS (fatal, flocp, _("Failed to open global symbol table: %s"), err);
|
||||
}
|
||||
}
|
||||
|
||||
symp = (load_func_t) dlsym (global_dl, symname);
|
||||
if (! symp)
|
||||
{
|
||||
struct load_list *new;
|
||||
void *dlp = NULL;
|
||||
|
||||
/* If the path has no "/", try the current directory first. */
|
||||
if (! strchr (ldname, '/')
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
&& ! strchr (ldname, '\\')
|
||||
#endif
|
||||
)
|
||||
dlp = dlopen (concat (2, "./", ldname), RTLD_LAZY|RTLD_GLOBAL);
|
||||
|
||||
/* If we haven't opened it yet, try the default search path. */
|
||||
if (! dlp)
|
||||
dlp = dlopen (ldname, RTLD_LAZY|RTLD_GLOBAL);
|
||||
|
||||
/* Still no? Then fail. */
|
||||
if (! dlp)
|
||||
{
|
||||
const char *err = dlerror ();
|
||||
if (noerror)
|
||||
DB (DB_BASIC, ("%s", err));
|
||||
else
|
||||
OS (error, flocp, "%s", err);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Assert that the GPL license symbol is defined. */
|
||||
symp = (load_func_t) dlsym (dlp, "plugin_is_GPL_compatible");
|
||||
if (! symp)
|
||||
OS (fatal, flocp,
|
||||
_("Loaded object %s is not declared to be GPL compatible"),
|
||||
ldname);
|
||||
|
||||
symp = (load_func_t) dlsym (dlp, symname);
|
||||
if (! symp)
|
||||
{
|
||||
const char *err = dlerror ();
|
||||
OSSS (fatal, flocp, _("Failed to load symbol %s from %s: %s"),
|
||||
symname, ldname, err);
|
||||
}
|
||||
|
||||
/* Add this symbol to a trivial lookup table. This is not efficient but
|
||||
it's highly unlikely we'll be loading lots of objects, and we only
|
||||
need it to look them up on unload, if we rebuild them. */
|
||||
new = xmalloc (sizeof (struct load_list));
|
||||
new->name = xstrdup (ldname);
|
||||
new->dlp = dlp;
|
||||
new->next = loaded_syms;
|
||||
loaded_syms = new;
|
||||
}
|
||||
|
||||
return symp;
|
||||
}
|
||||
|
||||
int
|
||||
load_file (const gmk_floc *flocp, const char **ldname, int noerror)
|
||||
{
|
||||
int nmlen = strlen (*ldname);
|
||||
char *new = alloca (nmlen + CSTRLEN (SYMBOL_EXTENSION) + 1);
|
||||
char *symname = NULL;
|
||||
char *loaded;
|
||||
const char *fp;
|
||||
int r;
|
||||
load_func_t symp;
|
||||
|
||||
/* Break the input into an object file name and a symbol name. If no symbol
|
||||
name was provided, compute one from the object file name. */
|
||||
fp = strchr (*ldname, '(');
|
||||
if (fp)
|
||||
{
|
||||
const char *ep;
|
||||
|
||||
/* There's an open paren, so see if there's a close paren: if so use
|
||||
that as the symbol name. We can't have whitespace: it would have
|
||||
been chopped up before this function is called. */
|
||||
ep = strchr (fp+1, ')');
|
||||
if (ep && ep[1] == '\0')
|
||||
{
|
||||
int l = fp - *ldname;;
|
||||
|
||||
++fp;
|
||||
if (fp == ep)
|
||||
OS (fatal, flocp, _("Empty symbol name for load: %s"), *ldname);
|
||||
|
||||
/* Make a copy of the ldname part. */
|
||||
memcpy (new, *ldname, l);
|
||||
new[l] = '\0';
|
||||
*ldname = new;
|
||||
nmlen = l;
|
||||
|
||||
/* Make a copy of the symbol name part. */
|
||||
symname = new + l + 1;
|
||||
memcpy (symname, fp, ep - fp);
|
||||
symname[ep - fp] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* Add this name to the string cache so it can be reused later. */
|
||||
*ldname = strcache_add (*ldname);
|
||||
|
||||
/* If this object has been loaded, we're done. */
|
||||
loaded = allocated_variable_expand ("$(.LOADED)");
|
||||
fp = strstr (loaded, *ldname);
|
||||
r = fp && (fp==loaded || fp[-1]==' ') && (fp[nmlen]=='\0' || fp[nmlen]==' ');
|
||||
free (loaded);
|
||||
if (r)
|
||||
return 1;
|
||||
|
||||
/* 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)
|
||||
do_variable_definition (flocp, ".LOADED", *ldname, o_default, f_append, 0);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void
|
||||
unload_file (const char *name)
|
||||
{
|
||||
struct load_list *d;
|
||||
|
||||
for (d = loaded_syms; d != NULL; d = d->next)
|
||||
if (streq (d->name, name) && d->dlp)
|
||||
{
|
||||
if (dlclose (d->dlp))
|
||||
perror_with_name ("dlclose", d->name);
|
||||
d->dlp = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
load_file (const gmk_floc *flocp, const char **ldname, int noerror)
|
||||
{
|
||||
if (! noerror)
|
||||
O (fatal, flocp,
|
||||
_("The 'load' operation is not supported on this platform."));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
unload_file (const char *name)
|
||||
{
|
||||
O (fatal, NILF, "INTERNAL: Cannot unload when load is not supported!");
|
||||
}
|
||||
|
||||
#endif /* MAKE_LOAD */
|
||||
70
loadapi.c
Normal file
70
loadapi.c
Normal file
@@ -0,0 +1,70 @@
|
||||
/* API for GNU Make dynamic objects.
|
||||
Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#include "filedef.h"
|
||||
#include "variable.h"
|
||||
#include "dep.h"
|
||||
|
||||
/* Allocate a buffer in our context, so we can free it. */
|
||||
char *
|
||||
gmk_alloc (unsigned int len)
|
||||
{
|
||||
return xmalloc (len);
|
||||
}
|
||||
|
||||
/* Free a buffer returned by gmk_expand(). */
|
||||
void
|
||||
gmk_free (char *s)
|
||||
{
|
||||
free (s);
|
||||
}
|
||||
|
||||
/* Evaluate a buffer as make syntax.
|
||||
Ideally eval_buffer() will take const char *, but not yet. */
|
||||
void
|
||||
gmk_eval (const char *buffer, const gmk_floc *floc)
|
||||
{
|
||||
/* Preserve existing variable buffer context. */
|
||||
char *pbuf;
|
||||
unsigned int plen;
|
||||
char *s;
|
||||
|
||||
install_variable_buffer (&pbuf, &plen);
|
||||
|
||||
s = xstrdup (buffer);
|
||||
eval_buffer (s, floc);
|
||||
free (s);
|
||||
|
||||
restore_variable_buffer (pbuf, plen);
|
||||
}
|
||||
|
||||
/* Expand a string and return an allocated buffer.
|
||||
Caller must call gmk_free() with this buffer. */
|
||||
char *
|
||||
gmk_expand (const char *ref)
|
||||
{
|
||||
return allocated_variable_expand (ref);
|
||||
}
|
||||
|
||||
/* Register a function to be called from makefiles. */
|
||||
void
|
||||
gmk_add_function (const char *name, gmk_func_ptr func,
|
||||
unsigned int min, unsigned int max, unsigned int flags)
|
||||
{
|
||||
define_new_function (reading_file, name, min, max, flags, func);
|
||||
}
|
||||
31
loadtest.c
31
loadtest.c
@@ -1,31 +0,0 @@
|
||||
extern volatile void exit (int);
|
||||
extern double load_average (void);
|
||||
|
||||
double max_load_average = -1;
|
||||
unsigned int job_slots_used = 0;
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
printf ("load_average () = %.2f\n", load_average ());
|
||||
exit (0);
|
||||
}
|
||||
|
||||
void
|
||||
error (char *fmt, ...)
|
||||
{
|
||||
exit (1);
|
||||
}
|
||||
|
||||
void
|
||||
perror_with_name (char *a, char *b)
|
||||
{
|
||||
exit (1);
|
||||
}
|
||||
|
||||
void
|
||||
wait_for_children (int i)
|
||||
{
|
||||
return;
|
||||
}
|
||||
358
maintMakefile
358
maintMakefile
@@ -1,23 +1,43 @@
|
||||
# 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
|
||||
|
||||
all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
|
||||
|
||||
# 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
|
||||
|
||||
# General rule for turning a .template into a regular file.
|
||||
#
|
||||
@@ -54,8 +74,8 @@ 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 $@
|
||||
|
||||
@@ -66,127 +86,128 @@ build.sh.in: build.template Makefile
|
||||
# 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)
|
||||
cat $(DEP_FILES) \
|
||||
| sed -e '/^[^:]*\.[ch] *:/d' \
|
||||
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' \
|
||||
-e '/^ *$$/d' \
|
||||
< $$f; \
|
||||
done) > $@
|
||||
|
||||
# Get rid of everything "else".
|
||||
#
|
||||
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
|
||||
# Cleaning
|
||||
|
||||
CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
|
||||
missing build.sh.in .dep_segment
|
||||
GIT := git
|
||||
|
||||
# This rule tries to clean the tree right down to how it looks when you do a
|
||||
# virgin CVS checkout.
|
||||
# git-clean: Clean all "ignored" files. Leave untracked files.
|
||||
# git-very-clean: Clean all files that aren't stored in source control.
|
||||
|
||||
.PHONY: cvs-clean
|
||||
cvs-clean: maintainer-clean
|
||||
-rm -f *~
|
||||
-rm -f config/*~ config/Makefile.in config/[a-z]*
|
||||
-rm -f po/*~ po/Makefile.in.in po/Rules-quot po/[a-z]*
|
||||
-rm -f doc/*~ doc/Makefile.in doc/fdl.texi doc/make-stds.texi \
|
||||
doc/texinfo.tex
|
||||
-rm -f glob/*~ glob/Makefile.in
|
||||
-rm -f ABOUT-NLS $(CVS-CLEAN-FILES)
|
||||
.PHONY: git-clean git-very-clean
|
||||
git-clean:
|
||||
-$(GIT) clean -fdX
|
||||
git-very-clean: git-clean
|
||||
-$(GIT) clean -fd
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# The sections below were stolen from the Makefile.maint used by fileutils,
|
||||
# sh-utils, textutils, CPPI, Bison, and Autoconf.
|
||||
|
||||
## ---------------------- ##
|
||||
## 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 --non-verbose
|
||||
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 $(target).t $(target); \
|
||||
mv -f $(target).t $(target); \
|
||||
fi
|
||||
|
||||
# ------------------- #
|
||||
# Updating PO files. #
|
||||
# ------------------- #
|
||||
|
||||
po_repo = http://www.iro.umontreal.ca/contrib/po/maint/$(PACKAGE)
|
||||
# PO archive mirrors --- Be careful; some might not be fully populated!
|
||||
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
|
||||
# http://translation.sf.net/maint/
|
||||
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
||||
|
||||
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
||||
po_repo = http://translationproject.org/latest/$(PACKAGE)
|
||||
.PHONY: do-po-update po-update
|
||||
do-po-update:
|
||||
tmppo=/tmp/$(PACKAGE)-$(VERSION)-po &&\
|
||||
rm -rf $$tmppo && \
|
||||
mkdir $$tmppo && \
|
||||
(cd $$tmppo && $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) &&\
|
||||
cp $$tmppo/*.po po
|
||||
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:
|
||||
if test -d "po"; then \
|
||||
$(MAKE) do-po-update; \
|
||||
fi
|
||||
[ -d "po" ] && $(MAKE) do-po-update
|
||||
|
||||
# -------------------------- #
|
||||
# Updating GNU build tools. #
|
||||
# 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.
|
||||
# $(srcdir)/src/ansi2knr.c
|
||||
|
||||
|
||||
wget_files ?= $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
|
||||
$(srcdir)/doc/texinfo.tex $(srcdir)/doc/make-stds.texi \
|
||||
$(srcdir)/doc/fdl.texi
|
||||
|
||||
wget-targets = $(patsubst %, get-%, $(wget_files))
|
||||
|
||||
config.guess-url_prefix = $(ftp-gnu)/config/
|
||||
config.sub-url_prefix = $(ftp-gnu)/config/
|
||||
|
||||
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
|
||||
|
||||
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
|
||||
|
||||
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||
fdl.texi-url_prefix = $(ftp-gnu)/GNUinfo/
|
||||
|
||||
cvs-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||
git-url = http://git.savannah.gnu.org/cgit
|
||||
target = $(patsubst get-%,%,$@)
|
||||
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
|
||||
|
||||
.PHONY: $(wget-targets)
|
||||
$(wget-targets):
|
||||
@echo $(WGET) $(url) -O $(target) \
|
||||
&& $(WGET) $(url) -O $(target).t \
|
||||
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)
|
||||
|
||||
.PHONY: wget-update
|
||||
wget-update: $(wget-targets)
|
||||
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)
|
||||
|
||||
# Updating tools via CVS.
|
||||
cvs_files ?= depcomp missing
|
||||
cvs-targets = $(patsubst %, get-%, $(cvs_files))
|
||||
|
||||
automake_repo = :pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake
|
||||
.PHONY: $(cvs-targets)
|
||||
$(cvs-targets):
|
||||
$(CVS) -d $(automake_repo) co -p automake/lib/$(notdir $(target)) \
|
||||
>$(target).t \
|
||||
&& $(move_if_change)
|
||||
|
||||
.PHONY: cvs-update
|
||||
cvs-update: $(cvs-targets)
|
||||
.PHONY: scm-update
|
||||
scm-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub get-doc/make-stds.texi get-doc/fdl.texi
|
||||
|
||||
|
||||
# --------------------- #
|
||||
@@ -194,23 +215,56 @@ cvs-update: $(cvs-targets)
|
||||
# --------------------- #
|
||||
|
||||
.PHONY: update
|
||||
update: wget-update po-update
|
||||
update: po-update scm-update
|
||||
|
||||
# cvs-update
|
||||
|
||||
# ---------------------------------- #
|
||||
# Alternative configuration checks. #
|
||||
# ---------------------------------- #
|
||||
|
||||
.PHONY: check-alt-config
|
||||
check-alt-config: \
|
||||
checkcfg.--disable-job-server \
|
||||
checkcfg.--disable-load \
|
||||
checkcfg.--without-guile \
|
||||
checkcfg.CPPFLAGS^-DNO_OUTPUT_SYNC \
|
||||
checkcfg.CPPFLAGS^-DNO_ARCHIVES
|
||||
|
||||
NR_MAKE = $(MAKE)
|
||||
|
||||
# Check builds both with build.sh and with make
|
||||
checkcfg.%: distdir
|
||||
@( 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 ) 2>&1 | tee checkcfg.$*.log
|
||||
|
||||
|
||||
## --------------- ##
|
||||
## Sanity checks. ##
|
||||
## --------------- ##
|
||||
|
||||
# Checks that don't require cvs. Run `changelog-check' last as
|
||||
# Before we build a distribution be sure we run our local checks
|
||||
#distdir: local-check
|
||||
|
||||
.PHONY: local-check po-check changelog-check
|
||||
|
||||
# Checks that don't require Git. Run 'changelog-check' last as
|
||||
# previous test may reveal problems requiring new ChangeLog entries.
|
||||
local-check: po-check changelog-check
|
||||
|
||||
# copyright-check writable-files
|
||||
|
||||
changelog-check:
|
||||
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||
if head $(top_srcdir)/ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||
@@ -218,10 +272,128 @@ changelog-check:
|
||||
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 -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
||||
grep -E -l '\b_\(' *.c | sort > $@-2; \
|
||||
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "makeint.h" || print "$$ARGV\n" and close ARGV }' *.c *.h | 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-%=%)" $^
|
||||
|
||||
|
||||
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
282
make.1
282
make.1
@@ -1,49 +1,35 @@
|
||||
.TH MAKE 1L "22 August 1989" "GNU" "LOCAL USER COMMANDS"
|
||||
.TH MAKE 1 "03 March 2012" "GNU" "User Commands"
|
||||
.SH NAME
|
||||
make \- GNU make utility to maintain groups of programs
|
||||
.SH SYNOPSIS
|
||||
.B "make "
|
||||
[
|
||||
.B \-f
|
||||
.I makefile
|
||||
] [ option ] ...
|
||||
target ...
|
||||
.SH WARNING
|
||||
This man page is an extract of the documentation of
|
||||
.I GNU make .
|
||||
It is updated only occasionally, because the GNU project does not use nroff.
|
||||
For complete, current documentation, refer to the Info file
|
||||
.B make.info
|
||||
which is made from the Texinfo source file
|
||||
.BR make.texinfo .
|
||||
.B make
|
||||
[\fIOPTION\fR]... [\fITARGET\fR]...
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The purpose of the
|
||||
The
|
||||
.I make
|
||||
utility is to determine automatically which
|
||||
pieces of a large program need to be recompiled, and issue the commands to
|
||||
recompile them.
|
||||
The manual describes the GNU implementation of
|
||||
.IR make ,
|
||||
which was written by Richard Stallman and Roland McGrath.
|
||||
Our examples show C programs, since they are most common, but you can use
|
||||
.I make
|
||||
with any programming language whose compiler can be run with a
|
||||
shell command.
|
||||
utility will determine automatically which pieces of a large program need to
|
||||
be recompiled, and issue the commands to recompile them. The manual describes
|
||||
the GNU implementation of
|
||||
.BR make ,
|
||||
which was written by Richard Stallman and Roland McGrath, and is currently
|
||||
maintained by Paul Smith. Our examples show C programs, since they are very
|
||||
common, but you can use
|
||||
.B make
|
||||
with any programming language whose compiler can be run with a shell command.
|
||||
In fact,
|
||||
.I make
|
||||
is not limited to programs.
|
||||
You can use it to describe any task where some files must be
|
||||
updated automatically from others whenever the others change.
|
||||
.B make
|
||||
is not limited to programs. You can use it to describe any task where some
|
||||
files must be updated automatically from others whenever the others change.
|
||||
.LP
|
||||
To prepare to use
|
||||
.IR make ,
|
||||
.BR make ,
|
||||
you must write a file called the
|
||||
.I makefile
|
||||
that describes the relationships among files in your program, and the
|
||||
states the commands for updating each file.
|
||||
In a program, typically the executable file is updated from object
|
||||
files, which are in turn made by compiling source files.
|
||||
that describes the relationships among files in your program, and the states
|
||||
the commands for updating each file. In a program, typically the executable
|
||||
file is updated from object files, which are in turn made by compiling source
|
||||
files.
|
||||
.LP
|
||||
Once a suitable makefile exists, each time you change some source files,
|
||||
this simple shell command:
|
||||
@@ -54,16 +40,15 @@ this simple shell command:
|
||||
.sp 1
|
||||
suffices to perform all necessary recompilations.
|
||||
The
|
||||
.I make
|
||||
program uses the makefile data base and the last-modification times
|
||||
of the files to decide which of the files need to be updated.
|
||||
For each of those files, it issues the commands recorded in the data base.
|
||||
.B make
|
||||
program uses the makefile description and the last-modification times of the
|
||||
files to decide which of the files need to be updated. For each of those
|
||||
files, it issues the commands recorded in the makefile.
|
||||
.LP
|
||||
.I make
|
||||
.B make
|
||||
executes commands in the
|
||||
.I makefile
|
||||
to update
|
||||
one or more target
|
||||
to update one or more target
|
||||
.IR names ,
|
||||
where
|
||||
.I name
|
||||
@@ -71,7 +56,7 @@ is typically a program.
|
||||
If no
|
||||
.B \-f
|
||||
option is present,
|
||||
.I make
|
||||
.B make
|
||||
will look for the makefiles
|
||||
.IR GNUmakefile ,
|
||||
.IR makefile ,
|
||||
@@ -90,29 +75,30 @@ listing, right near other important files such as
|
||||
.IR README .)
|
||||
The first name checked,
|
||||
.IR GNUmakefile ,
|
||||
is not recommended for most makefiles.
|
||||
You should use this name if you have a makefile that is specific to GNU
|
||||
.IR make ,
|
||||
is not recommended for most makefiles. You should use this name if you have a
|
||||
makefile that is specific to GNU
|
||||
.BR make ,
|
||||
and will not be understood by other versions of
|
||||
.IR make .
|
||||
.BR make .
|
||||
If
|
||||
.I makefile
|
||||
is `\-', the standard input is read.
|
||||
is '\-', the standard input is read.
|
||||
.LP
|
||||
.I make
|
||||
.B make
|
||||
updates a target if it depends on prerequisite files
|
||||
that have been modified since the target was last modified,
|
||||
or if the target does not exist.
|
||||
.SH OPTIONS
|
||||
.sp 1
|
||||
.TP 0.5i
|
||||
.B \-b
|
||||
.TP 0.5i
|
||||
.B \-m
|
||||
\fB\-b\fR, \fB\-m\fR
|
||||
These options are ignored for compatibility with other versions of
|
||||
.IR make .
|
||||
.BR make .
|
||||
.TP 0.5i
|
||||
.BI "\-C " dir
|
||||
\fB\-B\fR, \fB\-\-always\-make\fR
|
||||
Unconditionally make all targets.
|
||||
.TP 0.5i
|
||||
\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
|
||||
Change to directory
|
||||
.I dir
|
||||
before reading the makefiles or doing anything else.
|
||||
@@ -125,7 +111,7 @@ previous one:
|
||||
is equivalent to
|
||||
.BR "\-C " /etc.
|
||||
This is typically used with recursive invocations of
|
||||
.IR make .
|
||||
.BR make .
|
||||
.TP 0.5i
|
||||
.B \-d
|
||||
Print debugging information in addition to normal processing.
|
||||
@@ -133,22 +119,47 @@ The debugging information says which files are being considered for
|
||||
remaking, which file-times are being compared and with what results,
|
||||
which files actually need to be remade, which implicit rules are
|
||||
considered and which are applied---everything interesting about how
|
||||
.I make
|
||||
.B make
|
||||
decides what to do.
|
||||
.TP 0.5i
|
||||
.B \-e
|
||||
.BI \-\-debug "[=FLAGS]"
|
||||
Print debugging information in addition to normal processing.
|
||||
If the
|
||||
.I FLAGS
|
||||
are omitted, then the behavior is the same as if
|
||||
.B \-d
|
||||
was specified.
|
||||
.I FLAGS
|
||||
may be
|
||||
.I a
|
||||
for all debugging output (same as using
|
||||
.BR \-d ),
|
||||
.I b
|
||||
for basic debugging,
|
||||
.I v
|
||||
for more verbose basic debugging,
|
||||
.I i
|
||||
for showing implicit rules,
|
||||
.I j
|
||||
for details on invocation of commands, and
|
||||
.I m
|
||||
for debugging while remaking makefiles. Use
|
||||
.I n
|
||||
to disable all previous debugging flags.
|
||||
.TP 0.5i
|
||||
\fB\-e\fR, \fB\-\-environment\-overrides\fR
|
||||
Give variables taken from the environment precedence
|
||||
over variables from makefiles.
|
||||
.TP 0.5i
|
||||
.BI "\-f " file
|
||||
\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
|
||||
Use
|
||||
.I file
|
||||
as a makefile.
|
||||
.TP 0.5i
|
||||
.B \-i
|
||||
\fB\-i\fR, \fB\-\-ignore\-errors\fR
|
||||
Ignore all errors in commands executed to remake files.
|
||||
.TP 0.5i
|
||||
.BI "\-I " dir
|
||||
\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
|
||||
Specifies a directory
|
||||
.I dir
|
||||
to search for included makefiles.
|
||||
@@ -157,48 +168,53 @@ If several
|
||||
options are used to specify several directories, the directories are
|
||||
searched in the order specified.
|
||||
Unlike the arguments to other flags of
|
||||
.IR make ,
|
||||
.BR make ,
|
||||
directories given with
|
||||
.B \-I
|
||||
flags may come directly after the flag:
|
||||
.BI \-I dir
|
||||
is allowed, as well as
|
||||
.BI "\-I " dir.
|
||||
.B \-I
|
||||
.IR dir .
|
||||
This syntax is allowed for compatibility with the C
|
||||
preprocessor's
|
||||
.B \-I
|
||||
flag.
|
||||
.TP 0.5i
|
||||
.BI "\-j " jobs
|
||||
Specifies the number of jobs (commands) to run simultaneously.
|
||||
\fB\-j\fR [\fIjobs\fR], \fB\-\-jobs\fR[=\fIjobs\fR]
|
||||
Specifies the number of
|
||||
.I jobs
|
||||
(commands) to run simultaneously.
|
||||
If there is more than one
|
||||
.B \-j
|
||||
option, the last one is effective.
|
||||
If the
|
||||
.B \-j
|
||||
option is given without an argument,
|
||||
.IR make
|
||||
.BR make
|
||||
will not limit the number of jobs that can run simultaneously.
|
||||
.TP 0.5i
|
||||
.B \-k
|
||||
\fB\-k\fR, \fB\-\-keep\-going\fR
|
||||
Continue as much as possible after an error.
|
||||
While the target that failed, and those that depend on it, cannot
|
||||
be remade, the other dependencies of these targets can be processed
|
||||
all the same.
|
||||
.TP 0.5i
|
||||
.B \-l
|
||||
.TP 0.5i
|
||||
.BI "\-l " load
|
||||
\fB\-l\fR [\fIload\fR], \fB\-\-load\-average\fR[=\fIload\fR]
|
||||
Specifies that no new jobs (commands) should be started if there are
|
||||
others jobs running and the load average is at least
|
||||
.I load
|
||||
(a floating-point number).
|
||||
With no argument, removes a previous load limit.
|
||||
.TP 0.5i
|
||||
.B \-n
|
||||
Print the commands that would be executed, but do not execute them.
|
||||
\fB\-L\fR, \fB\-\-check\-symlink\-times\fR
|
||||
Use the latest mtime between symlinks and target.
|
||||
.TP 0.5i
|
||||
.BI "\-o " file
|
||||
\fB\-n\fR, \fB\-\-just\-print\fR, \fB\-\-dry\-run\fR, \fB\-\-recon\fR
|
||||
Print the commands that would be executed, but do not execute them (except in
|
||||
certain circumstances).
|
||||
.TP 0.5i
|
||||
\fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR
|
||||
Do not remake the file
|
||||
.I file
|
||||
even if it is older than its dependencies, and do not remake anything
|
||||
@@ -206,7 +222,29 @@ on account of changes in
|
||||
.IR file .
|
||||
Essentially the file is treated as very old and its rules are ignored.
|
||||
.TP 0.5i
|
||||
.B \-p
|
||||
\fB\-O\fR[\fItype\fR], \fB\-\-output\-sync\fR[=\fItype\fR]
|
||||
When running multiple jobs in parallel with \fB-j\fR, ensure the output of
|
||||
each job is collected together rather than interspersed with output from
|
||||
other jobs. If
|
||||
.I type
|
||||
is not specified or is
|
||||
.B target
|
||||
the output from the entire recipe for each target is grouped together. If
|
||||
.I type
|
||||
is
|
||||
.B line
|
||||
the output from each command line within a recipe is grouped together.
|
||||
If
|
||||
.I type
|
||||
is
|
||||
.B recurse
|
||||
output from an entire recursive make is grouped together. If
|
||||
.I type
|
||||
is
|
||||
.B none
|
||||
output synchronization is disabled.
|
||||
.TP 0.5i
|
||||
\fB\-p\fR, \fB\-\-print\-data\-base\fR
|
||||
Print the data base (rules and variable values) that results from
|
||||
reading the makefiles; then execute as usual or as otherwise
|
||||
specified.
|
||||
@@ -214,59 +252,69 @@ This also prints the version information given by the
|
||||
.B \-v
|
||||
switch (see below).
|
||||
To print the data base without trying to remake any files, use
|
||||
.B make
|
||||
.B \-p
|
||||
.BI \-f /dev/null.
|
||||
.IR "make \-p \-f/dev/null" .
|
||||
.TP 0.5i
|
||||
.B \-q
|
||||
\fB\-q\fR, \fB\-\-question\fR
|
||||
``Question mode''.
|
||||
Do not run any commands, or print anything; just return an exit status
|
||||
that is zero if the specified targets are already up to date, nonzero
|
||||
otherwise.
|
||||
.TP 0.5i
|
||||
.B \-r
|
||||
Eliminate use of the built-in implicit rules.
|
||||
\fB\-r\fR, \fB\-\-no\-builtin\-rules\fR
|
||||
Eliminate use of the built\-in implicit rules.
|
||||
Also clear out the default list of suffixes for suffix rules.
|
||||
.TP 0.5i
|
||||
.B \-s
|
||||
\fB\-R\fR, \fB\-\-no\-builtin\-variables\fR
|
||||
Don't define any built\-in variables.
|
||||
.TP 0.5i
|
||||
\fB\-s\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
|
||||
Silent operation; do not print the commands as they are executed.
|
||||
.TP 0.5i
|
||||
.B \-S
|
||||
\fB\-S\fR, \fB\-\-no\-keep\-going\fR, \fB\-\-stop\fR
|
||||
Cancel the effect of the
|
||||
.B \-k
|
||||
option.
|
||||
This is never necessary except in a recursive
|
||||
.I make
|
||||
.B make
|
||||
where
|
||||
.B \-k
|
||||
might be inherited from the top-level
|
||||
.I make
|
||||
.B make
|
||||
via MAKEFLAGS or if you set
|
||||
.B \-k
|
||||
in MAKEFLAGS in your environment.
|
||||
.TP 0.5i
|
||||
.B \-t
|
||||
\fB\-t\fR, \fB\-\-touch\fR
|
||||
Touch files (mark them up to date without really changing them)
|
||||
instead of running their commands.
|
||||
This is used to pretend that the commands were done, in order to fool
|
||||
future invocations of
|
||||
.IR make .
|
||||
.BR make .
|
||||
.TP 0.5i
|
||||
.B \-v
|
||||
.B \-\-trace
|
||||
Information about the disposition of each target is printed (why the target is
|
||||
being rebuilt and what commands are run to rebuild it).
|
||||
.TP 0.5i
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
Print the version of the
|
||||
.I make
|
||||
.B make
|
||||
program plus a copyright, a list of authors and a notice that there
|
||||
is no warranty.
|
||||
.TP 0.5i
|
||||
.B \-w
|
||||
\fB\-w\fR, \fB\-\-print\-directory\fR
|
||||
Print a message containing the working directory
|
||||
before and after other processing.
|
||||
This may be useful for tracking down errors from complicated nests of
|
||||
recursive
|
||||
.I make
|
||||
.B make
|
||||
commands.
|
||||
.TP 0.5i
|
||||
.BI "\-W " file
|
||||
.B \-\-no\-print\-directory
|
||||
Turn off
|
||||
.BR \-w ,
|
||||
even if it was turned on implicitly.
|
||||
.TP 0.5i
|
||||
\fB\-W\fR \fIfile\fR, \fB\-\-what\-if\fR=\fIfile\fR, \fB\-\-new\-file\fR=\fIfile\fR, \fB\-\-assume\-new\fR=\fIfile\fR
|
||||
Pretend that the target
|
||||
.I file
|
||||
has just been modified.
|
||||
@@ -278,14 +326,56 @@ Without
|
||||
it is almost the same as running a
|
||||
.I touch
|
||||
command on the given file before running
|
||||
.IR make ,
|
||||
.BR make ,
|
||||
except that the modification time is changed only in the imagination of
|
||||
.IR make .
|
||||
.BR make .
|
||||
.TP 0.5i
|
||||
.B \-\-warn\-undefined\-variables
|
||||
Warn when an undefined variable is referenced.
|
||||
.SH "EXIT STATUS"
|
||||
GNU
|
||||
.B make
|
||||
exits with a status of zero if all makefiles were successfully parsed
|
||||
and no targets that were built failed. A status of one will be returned
|
||||
if the
|
||||
.B \-q
|
||||
flag was used and
|
||||
.B make
|
||||
determines that a target needs to be rebuilt. A status of two will be
|
||||
returned if any errors were encountered.
|
||||
.SH "SEE ALSO"
|
||||
.I "The GNU Make Manual"
|
||||
The full documentation for
|
||||
.B make
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B make
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info make
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
.SH BUGS
|
||||
See the chapter `Problems and Bugs' in
|
||||
.I "The GNU Make Manual" .
|
||||
See the chapter ``Problems and Bugs'' in
|
||||
.IR "The GNU Make Manual" .
|
||||
.SH AUTHOR
|
||||
This manual page contributed by Dennis Morse of Stanford University.
|
||||
It has been reworked by Roland McGrath.
|
||||
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||
McGrath. Maintained by Paul Smith.
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 1992-1993, 1996-2014 Free Software Foundation, Inc.
|
||||
This file is part of
|
||||
.IR "GNU make" .
|
||||
.LP
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
.LP
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
.LP
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see
|
||||
.IR http://www.gnu.org/licenses/ .
|
||||
|
||||
562
make.h
562
make.h
@@ -1,562 +0,0 @@
|
||||
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
|
||||
2002 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Make; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* We use <config.h> instead of "config.h" so that a compilation
|
||||
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
||||
(which it would do because make.h was found in $srcdir). */
|
||||
#include <config.h>
|
||||
#undef HAVE_CONFIG_H
|
||||
#define HAVE_CONFIG_H 1
|
||||
|
||||
/* AIX requires this to be the first thing in the file. */
|
||||
#ifndef __GNUC__
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Use prototypes if available. */
|
||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
||||
# undef PARAMS
|
||||
# define PARAMS(protos) protos
|
||||
#else /* Not C++ or ANSI C. */
|
||||
# undef PARAMS
|
||||
# define PARAMS(protos) ()
|
||||
#endif /* C++ or ANSI C. */
|
||||
|
||||
/* Specify we want GNU source code. This must be defined before any
|
||||
system headers are included. */
|
||||
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
|
||||
#ifdef CRAY
|
||||
/* This must happen before #include <signal.h> so
|
||||
that the declaration therein is changed. */
|
||||
# define signal bsdsignal
|
||||
#endif
|
||||
|
||||
/* If we're compiling for the dmalloc debugger, turn off string inlining. */
|
||||
#if defined(HAVE_DMALLOC_H) && defined(__GNUC__)
|
||||
# define __NO_STRING_INLINES
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
/* SCO 3.2 "devsys 4.2" has a prototype for `ftime' in <time.h> that bombs
|
||||
unless <sys/timeb.h> has been included first. Does every system have a
|
||||
<sys/timeb.h>? If any does not, configure should check for it. */
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifndef isblank
|
||||
# define isblank(c) ((c) == ' ' || (c) == '\t')
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
||||
POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */
|
||||
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
||||
# define POSIX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some systems define _POSIX_VERSION but are not really POSIX.1. */
|
||||
#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
|
||||
# undef POSIX
|
||||
#endif
|
||||
|
||||
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
|
||||
# define POSIX 1
|
||||
#endif
|
||||
|
||||
#ifndef RETSIGTYPE
|
||||
# define RETSIGTYPE void
|
||||
#endif
|
||||
|
||||
#ifndef sigmask
|
||||
# define sigmask(sig) (1 << ((sig) - 1))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SA_RESTART
|
||||
# define SA_RESTART 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# ifndef POSIX
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# endif
|
||||
#endif
|
||||
#ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifdef PATH_MAX
|
||||
# define GET_PATH_MAX PATH_MAX
|
||||
# define PATH_VAR(var) char var[PATH_MAX]
|
||||
#else
|
||||
# define NEED_GET_PATH_MAX 1
|
||||
# define GET_PATH_MAX (get_path_max ())
|
||||
# define PATH_VAR(var) char *var = (char *) alloca (GET_PATH_MAX)
|
||||
extern unsigned int get_path_max PARAMS ((void));
|
||||
#endif
|
||||
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
|
||||
/* Nonzero if the integer type T is signed. */
|
||||
#define INTEGER_TYPE_SIGNED(t) ((t) -1 < 0)
|
||||
|
||||
/* The minimum and maximum values for the integer type T.
|
||||
Use ~ (t) 0, not -1, for portability to 1's complement hosts. */
|
||||
#define INTEGER_TYPE_MINIMUM(t) \
|
||||
(! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
|
||||
#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
|
||||
|
||||
#ifndef CHAR_MAX
|
||||
# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# ifdef S_ISREG
|
||||
# undef S_ISREG
|
||||
# endif
|
||||
# ifdef S_ISDIR
|
||||
# undef S_ISDIR
|
||||
# endif
|
||||
#endif /* STAT_MACROS_BROKEN. */
|
||||
|
||||
#ifndef S_ISREG
|
||||
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
#ifndef S_ISDIR
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# include <types.h>
|
||||
# include <unixlib.h>
|
||||
# include <unixio.h>
|
||||
# include <perror.h>
|
||||
/* Needed to use alloca on VMS. */
|
||||
# include <builtins.h>
|
||||
#endif
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(x)
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# define ANSI_STRING 1
|
||||
#else /* No standard headers. */
|
||||
# ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# define ANSI_STRING 1
|
||||
# else
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# else
|
||||
extern char *malloc PARAMS ((int));
|
||||
extern char *realloc PARAMS ((char *, int));
|
||||
extern void free PARAMS ((char *));
|
||||
|
||||
extern void abort PARAMS ((void)) __attribute__ ((noreturn));
|
||||
extern void exit PARAMS ((int)) __attribute__ ((noreturn));
|
||||
# endif /* HAVE_STDLIB_H. */
|
||||
|
||||
#endif /* Standard headers. */
|
||||
|
||||
/* These should be in stdlib.h. Make sure we have them. */
|
||||
#ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 0
|
||||
#endif
|
||||
|
||||
#ifdef ANSI_STRING
|
||||
|
||||
# ifndef bcmp
|
||||
# define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
|
||||
# endif
|
||||
# ifndef bzero
|
||||
# define bzero(s, n) memset ((s), 0, (n))
|
||||
# endif
|
||||
# if defined(HAVE_MEMMOVE) && !defined(bcopy)
|
||||
# define bcopy(s, d, n) memmove ((d), (s), (n))
|
||||
# endif
|
||||
|
||||
#else /* Not ANSI_STRING. */
|
||||
|
||||
# ifndef HAVE_STRCHR
|
||||
# define strchr(s, c) index((s), (c))
|
||||
# define strrchr(s, c) rindex((s), (c))
|
||||
# endif
|
||||
|
||||
# ifndef bcmp
|
||||
extern int bcmp PARAMS ((const char *, const char *, int));
|
||||
# endif
|
||||
# ifndef bzero
|
||||
extern void bzero PARAMS ((char *, int));
|
||||
#endif
|
||||
# ifndef bcopy
|
||||
extern void bcopy PARAMS ((const char *b1, char *b2, int));
|
||||
# endif
|
||||
|
||||
#endif /* ANSI_STRING. */
|
||||
#undef ANSI_STRING
|
||||
|
||||
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
||||
#undef strerror
|
||||
|
||||
#if !defined(ANSI_STRING) && !defined(__DECC)
|
||||
extern char *strerror PARAMS ((int errnum));
|
||||
#endif
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#define FILE_TIMESTAMP uintmax_t
|
||||
|
||||
#if !defined(HAVE_STRSIGNAL)
|
||||
extern char *strsignal PARAMS ((int signum));
|
||||
#endif
|
||||
|
||||
/* ISDIGIT offers the following features:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
NOTE! Make relies on this behavior, don't change it!
|
||||
- It's typically faster.
|
||||
POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit() unless
|
||||
it's important to use the locale's definition of `digit' even when the
|
||||
host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
#ifndef iAPX286
|
||||
# define streq(a, b) \
|
||||
((a) == (b) || \
|
||||
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
||||
# ifdef HAVE_CASE_INSENSITIVE_FS
|
||||
/* This is only used on Windows/DOS platforms, so we assume strcmpi(). */
|
||||
# define strieq(a, b) \
|
||||
((a) == (b) \
|
||||
|| (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
|
||||
&& (*(a) == '\0' || !strcmpi ((a) + 1, (b) + 1))))
|
||||
# else
|
||||
# define strieq(a, b) streq(a, b)
|
||||
# endif
|
||||
#else
|
||||
/* Buggy compiler can't handle this. */
|
||||
# define streq(a, b) (strcmp ((a), (b)) == 0)
|
||||
# define strieq(a, b) (strcmp ((a), (b)) == 0)
|
||||
#endif
|
||||
#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
|
||||
#ifdef VMS
|
||||
extern int strcmpi (const char *,const char *);
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
|
||||
# define ENUM_BITFIELD(bits) :bits
|
||||
#else
|
||||
# define ENUM_BITFIELD(bits)
|
||||
#endif
|
||||
|
||||
/* Handle gettext and locales. */
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#else
|
||||
# define setlocale(category, locale)
|
||||
#endif
|
||||
|
||||
#include <gettext.h>
|
||||
|
||||
#define _(msgid) gettext (msgid)
|
||||
#define N_(msgid) gettext_noop (msgid)
|
||||
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
|
||||
|
||||
/* Handle other OSs. */
|
||||
|
||||
#if defined(__MSDOS__) || defined(WINDOWS32)
|
||||
# define PATH_SEPARATOR_CHAR ';'
|
||||
#else
|
||||
# if defined(VMS)
|
||||
# define PATH_SEPARATOR_CHAR ','
|
||||
# else
|
||||
# define PATH_SEPARATOR_CHAR ':'
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
# include <fcntl.h>
|
||||
# include <malloc.h>
|
||||
# define pipe(p) _pipe(p, 512, O_BINARY)
|
||||
# define kill(pid,sig) w32_kill(pid,sig)
|
||||
|
||||
extern void sync_Path_environment(void);
|
||||
extern int kill(int pid, int sig);
|
||||
extern int safe_stat(char *file, struct stat *sb);
|
||||
extern char *end_of_token_w32(char *s, char stopchar);
|
||||
extern int find_and_set_default_shell(char *token);
|
||||
|
||||
/* indicates whether or not we have Bourne shell */
|
||||
extern int no_default_sh_exe;
|
||||
|
||||
/* is default_shell unixy? */
|
||||
extern int unixy_shell;
|
||||
#endif /* WINDOWS32 */
|
||||
|
||||
struct floc
|
||||
{
|
||||
char *filenm;
|
||||
unsigned long lineno;
|
||||
};
|
||||
#define NILF ((struct floc *)0)
|
||||
|
||||
#define STRING_SIZE_TUPLE(_s) (_s), (sizeof (_s)-1)
|
||||
|
||||
|
||||
/* Fancy processing for variadic functions in both ANSI and pre-ANSI
|
||||
compilers. */
|
||||
#if defined __STDC__ && __STDC__
|
||||
extern void message (int prefix, const char *fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
extern void error (const struct floc *flocp, const char *fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
extern void fatal (const struct floc *flocp, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
|
||||
#else
|
||||
extern void message ();
|
||||
extern void error ();
|
||||
extern void fatal ();
|
||||
#endif
|
||||
|
||||
extern void die PARAMS ((int)) __attribute__ ((noreturn));
|
||||
extern void log_working_directory PARAMS ((int));
|
||||
extern void pfatal_with_name PARAMS ((const char *)) __attribute__ ((noreturn));
|
||||
extern void perror_with_name PARAMS ((const char *, const char *));
|
||||
extern char *savestring PARAMS ((const char *, unsigned int));
|
||||
extern char *concat PARAMS ((const char *, const char *, const char *));
|
||||
extern char *xmalloc PARAMS ((unsigned int));
|
||||
extern char *xrealloc PARAMS ((char *, unsigned int));
|
||||
extern char *xstrdup PARAMS ((const char *));
|
||||
extern char *find_next_token PARAMS ((char **, unsigned int *));
|
||||
extern char *next_token PARAMS ((const char *));
|
||||
extern char *end_of_token PARAMS ((char *));
|
||||
extern void collapse_continuations PARAMS ((char *));
|
||||
extern void remove_comments PARAMS((char *));
|
||||
extern char *sindex PARAMS ((const char *, unsigned int, \
|
||||
const char *, unsigned int));
|
||||
extern char *lindex PARAMS ((const char *, const char *, int));
|
||||
extern int alpha_compare PARAMS ((const void *, const void *));
|
||||
extern void print_spaces PARAMS ((unsigned int));
|
||||
extern char *find_char_unquote PARAMS ((char *, int, int, int));
|
||||
extern char *find_percent PARAMS ((char *));
|
||||
extern FILE *open_tmpfile PARAMS ((char **, const char *));
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
extern int ar_name PARAMS ((char *));
|
||||
extern void ar_parse_name PARAMS ((char *, char **, char **));
|
||||
extern int ar_touch PARAMS ((char *));
|
||||
extern time_t ar_member_date PARAMS ((char *));
|
||||
#endif
|
||||
|
||||
extern int dir_file_exists_p PARAMS ((char *, char *));
|
||||
extern int file_exists_p PARAMS ((char *));
|
||||
extern int file_impossible_p PARAMS ((char *));
|
||||
extern void file_impossible PARAMS ((char *));
|
||||
extern char *dir_name PARAMS ((char *));
|
||||
extern void hash_init_directories PARAMS ((void));
|
||||
|
||||
extern void define_default_variables PARAMS ((void));
|
||||
extern void set_default_suffixes PARAMS ((void));
|
||||
extern void install_default_suffix_rules PARAMS ((void));
|
||||
extern void install_default_implicit_rules PARAMS ((void));
|
||||
|
||||
extern void build_vpath_lists PARAMS ((void));
|
||||
extern void construct_vpath_list PARAMS ((char *pattern, char *dirpath));
|
||||
extern int vpath_search PARAMS ((char **file, FILE_TIMESTAMP *mtime_ptr));
|
||||
extern int gpath_search PARAMS ((char *file, int len));
|
||||
|
||||
extern void construct_include_path PARAMS ((char **arg_dirs));
|
||||
|
||||
extern void user_access PARAMS ((void));
|
||||
extern void make_access PARAMS ((void));
|
||||
extern void child_access PARAMS ((void));
|
||||
|
||||
#ifdef HAVE_VFORK_H
|
||||
# include <vfork.h>
|
||||
#endif
|
||||
|
||||
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
||||
because such systems often declare them in header files anyway. */
|
||||
|
||||
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
|
||||
|
||||
extern long int atol ();
|
||||
# ifndef VMS
|
||||
extern long int lseek ();
|
||||
# endif
|
||||
|
||||
#endif /* Not GNU C library or POSIX. */
|
||||
|
||||
#ifdef HAVE_GETCWD
|
||||
# if !defined(VMS) && !defined(__DECC)
|
||||
extern char *getcwd ();
|
||||
#endif
|
||||
#else
|
||||
extern char *getwd ();
|
||||
# define getcwd(buf, len) getwd (buf)
|
||||
#endif
|
||||
|
||||
extern const struct floc *reading_file;
|
||||
|
||||
extern char **environ;
|
||||
|
||||
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
||||
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
||||
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||
extern int print_version_flag, print_directory_flag;
|
||||
extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
|
||||
extern int clock_skew_detected;
|
||||
|
||||
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
||||
extern int batch_mode_shell;
|
||||
|
||||
extern unsigned int job_slots;
|
||||
extern int job_fds[2];
|
||||
extern int job_rfd;
|
||||
#ifndef NO_FLOAT
|
||||
extern double max_load_average;
|
||||
#else
|
||||
extern int max_load_average;
|
||||
#endif
|
||||
|
||||
extern char *program;
|
||||
extern char *starting_directory;
|
||||
extern unsigned int makelevel;
|
||||
extern char *version_string, *remote_description;
|
||||
|
||||
extern unsigned int commands_started;
|
||||
|
||||
extern int handling_fatal_signal;
|
||||
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
|
||||
#endif
|
||||
#ifndef MAX
|
||||
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# define MAKE_SUCCESS 1
|
||||
# define MAKE_TROUBLE 2
|
||||
# define MAKE_FAILURE 3
|
||||
#else
|
||||
# define MAKE_SUCCESS 0
|
||||
# define MAKE_TROUBLE 1
|
||||
# define MAKE_FAILURE 2
|
||||
#endif
|
||||
|
||||
/* Set up heap debugging library dmalloc. */
|
||||
|
||||
#ifdef HAVE_DMALLOC_H
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* If we have broken SA_RESTART support, then wrap stat() and readdir() with
|
||||
versions that handle EINTR. Note that there are still plenty of system
|
||||
calls that can fail with EINTR but this, reportedly, gets the vast
|
||||
majority of failure cases. If you still experience failures you'll need
|
||||
to either get a system where SA_RESTART works, or you need to avoid -j. */
|
||||
|
||||
#ifdef HAVE_BROKEN_RESTART
|
||||
|
||||
/* Here we make an assumption that a system with a broken SA_RESTART has
|
||||
dirent.h. Right now the only system I know of in this category is PTX, and
|
||||
it does have dirent.h.
|
||||
*/
|
||||
#include <dirent.h>
|
||||
|
||||
#define stat(_f,_b) atomic_stat ((_f), (_b))
|
||||
#define readdir(_d) atomic_readdir (_d)
|
||||
|
||||
extern int atomic_stat PARAMS ((const char *file, struct stat *buf));
|
||||
extern struct dirent *atomic_readdir PARAMS ((DIR *dir));
|
||||
|
||||
#endif
|
||||
2
make.lnk
2
make.lnk
@@ -1,4 +1,4 @@
|
||||
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"
|
||||
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"+"hash.o"+"strcache.o"+"output.o"
|
||||
TO "make.new"
|
||||
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
|
||||
QUIET
|
||||
|
||||
21
make_msvc_net2003.sln
Normal file
21
make_msvc_net2003.sln
Normal file
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_msvc.net2003", "make_msvc_net2003.vcproj", "{E96B5060-3240-4723-91C9-E64F1C877A04}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.ActiveCfg = Debug|Win32
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.Build.0 = Debug|Win32
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.ActiveCfg = Release|Win32
|
||||
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
337
make_msvc_net2003.vcproj
Normal file
337
make_msvc_net2003.vcproj
Normal file
@@ -0,0 +1,337 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="make_msvc.net2003"
|
||||
ProjectGUID="{E96B5060-3240-4723-91C9-E64F1C877A04}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".;w32/include;glob"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/make_msvc.net2003.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/make_msvc.net2003.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Copying config.h.W32 to config.h"
|
||||
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".;w32/include;glob"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
|
||||
RuntimeLibrary="0"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/make_msvc.net2003.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
Description="Copying config.h.W32 to config.h"
|
||||
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\ar.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arscan.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\commands.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\default.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dir.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\expand.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\file.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\function.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getloadavg.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getopt.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getopt1.c">
|
||||
</File>
|
||||
|
||||
<File
|
||||
RelativePath=".\guile.c">
|
||||
</File>
|
||||
|
||||
<File
|
||||
RelativePath=".\hash.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strcache.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\implicit.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\job.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\load.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\output.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\misc.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\read.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\remake.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\remote-stub.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rule.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\signame.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\variable.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\version.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\vpath.c">
|
||||
</File>
|
||||
<Filter
|
||||
Name="w32"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\w32\compat\dirent.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\compat\posixfcn.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\misc.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\pathstuff.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\sub_proc.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\w32err.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="glob"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\glob\fnmatch.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\glob\glob.c">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="include"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\commands.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\config.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\debug.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dep.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\filedef.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getopt.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gettext.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\gmk-default.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hash.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\job.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\output.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\makeint.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rule.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\variable.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\vmsdir.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="w32"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\w32\include\dirent.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\include\pathstuff.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\subproc\proc.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\include\sub_proc.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\w32\include\w32err.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="glob"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\glob\fnmatch.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\glob\glob.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
71
makefile.com
71
makefile.com
@@ -1,8 +1,7 @@
|
||||
$!
|
||||
$! Makefile.com - builds GNU Make for VMS
|
||||
$!
|
||||
$! P1 is non-empty if you want to link with the VAXCRTL library instead
|
||||
$! of the shareable executable
|
||||
$! P1 = LIST will provide compiler listings.
|
||||
$! P2 = DEBUG will build an image with debug information
|
||||
$! P3 = WALL will enable all warning messages (some are suppressed since
|
||||
$! one macro intentionally causes an error condition)
|
||||
@@ -12,7 +11,7 @@ $! zinser@decus.de (preferred) or zinser@sysdev.deutsche-boerse.com
|
||||
$
|
||||
$! hb
|
||||
$! But don't ask Martin Zinser about the lines, I added/changed.
|
||||
$! In case of an error do some cleanup
|
||||
$! In case of an error do some cleanup
|
||||
$ on error then $ goto cleanup
|
||||
$! in case somebody set up her/his own symbol for cc
|
||||
$ set symbol/scope=(nolocal,noglobal)
|
||||
@@ -33,7 +32,7 @@ $ then
|
||||
$ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
|
||||
$ ccopt = ""
|
||||
$ else
|
||||
$ ccopt = "/decc/prefix=all"
|
||||
$ ccopt = "/decc/prefix=(all,except=(globfree,glob))"
|
||||
$ if f$trnlnm("SYS").eqs.""
|
||||
$ then
|
||||
$ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes.""
|
||||
@@ -50,6 +49,12 @@ $ endif
|
||||
$ endif
|
||||
$ endif
|
||||
$!
|
||||
$!
|
||||
$ if (p1 .eqs. "LIST")
|
||||
$ then
|
||||
$ ccopt = ccopt + "/list/show=(expan,inclu)"
|
||||
$ endif
|
||||
$!
|
||||
$! Should we build a debug image
|
||||
$!
|
||||
$ if (p2.eqs."DEBUG")
|
||||
@@ -67,9 +72,11 @@ $ then
|
||||
$ gosub check_cc_qual
|
||||
$ endif
|
||||
$ filelist = "alloca ar arscan commands default dir expand file function " + -
|
||||
"hash implicit job main misc read remake remote-stub rule " + -
|
||||
"signame variable version vmsfunctions vmsify vpath " + -
|
||||
"[.glob]glob [.glob]fnmatch getopt1 getopt"
|
||||
"guile hash implicit job load main misc read remake " + -
|
||||
"remote-stub rule output signame variable version " + -
|
||||
"vmsfunctions vmsify vpath " + -
|
||||
"[.glob]glob [.glob]fnmatch getopt1 getopt strcache"
|
||||
$!
|
||||
$ copy config.h-vms config.h
|
||||
$ n=0
|
||||
$ open/write optf make.opt
|
||||
@@ -77,41 +84,37 @@ $ loop:
|
||||
$ cfile = f$elem(n," ",filelist)
|
||||
$ if cfile .eqs. " " then goto linkit
|
||||
$ write sys$output "Compiling ''cfile'..."
|
||||
$ call compileit 'cfile' 'p1'
|
||||
$ call compileit 'cfile'
|
||||
$ n = n + 1
|
||||
$ goto loop
|
||||
$ linkit:
|
||||
$ close optf
|
||||
$ if p1 .nes. "" then goto link_using_library
|
||||
$ link/exe=make make.opt/opt'lopt
|
||||
$ goto cleanup
|
||||
$
|
||||
$ link_using_library:
|
||||
$ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib'lopt
|
||||
$
|
||||
$ cleanup:
|
||||
$ if f$trnlnm("SYS").nes."" then $ deassign sys
|
||||
$ if f$trnlnm("OPTF").nes."" then $ close optf
|
||||
$ if f$search("make.opt").nes."" then $ del make.opt;*
|
||||
$ exit
|
||||
$!
|
||||
$!------------------------------------------------------------------------------
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!
|
||||
$! Check if this is a define relating to the properties of the C/C++
|
||||
$! compiler
|
||||
$!
|
||||
$CHECK_CC_QUAL:
|
||||
$ open/write tmpc 'tc
|
||||
$ open/write tmpc 'tc
|
||||
$ ccqual = "/warn=(disable=questcompare)"
|
||||
$ write tmpc "#include <stdio.h>"
|
||||
$ write tmpc "unsigned int i = 1;"
|
||||
$ write tmpc "int main(){"
|
||||
$ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}"
|
||||
$ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}"
|
||||
$ close tmpc
|
||||
$ gosub cc_qual_check
|
||||
$ return
|
||||
$!
|
||||
$!------------------------------------------------------------------------------
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!
|
||||
$! Check for properties of C/C++ compiler
|
||||
$!
|
||||
@@ -122,17 +125,39 @@ $ cc 'ccqual' 'tmpnam'
|
||||
$ if $status then cc_qual = true
|
||||
$ set message/fac/ident/sever/text
|
||||
$ delete/nolog 'tmpnam'.*;*
|
||||
$ if cc_qual then ccopt = ccopt + ccqual
|
||||
$ if cc_qual then ccopt = ccopt + ccqual
|
||||
$ return
|
||||
$!------------------------------------------------------------------------------
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!
|
||||
$ compileit : subroutine
|
||||
$ ploc = f$locate("]",p1)
|
||||
$ filnam = p1
|
||||
$ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
|
||||
$ write optf "''filnam'"
|
||||
$ cc'ccopt'/include=([],[.glob]) -
|
||||
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
|
||||
$ if ploc .lt. f$length(p1)
|
||||
$ then
|
||||
$ objdir = f$extract(0, ploc+1, p1)
|
||||
$ write optf p1
|
||||
$ else
|
||||
$ objdir := []
|
||||
$ write optf objdir+p1
|
||||
$ endif
|
||||
$ cc'ccopt'/include=([],[.glob])/obj='objdir' -
|
||||
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
|
||||
'p1'
|
||||
$ exit
|
||||
$ endsubroutine : compileit
|
||||
$!
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!Copyright (C) 1996-2014 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/>.
|
||||
|
||||
136
makefile.vms
136
makefile.vms
@@ -1,25 +1,26 @@
|
||||
# Copyright (C) 1988, 1989, 1996, 1997 Free Software Foundation, Inc.
|
||||
# -*-Makefile-*- to build GNU make on VMS
|
||||
#
|
||||
# Copyright (C) 1996-2014 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/>.
|
||||
|
||||
# VMS extensions from GNU Make 3.60 imported by
|
||||
# Klaus Kämpf (kkaempf@rmi.de)
|
||||
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
|
||||
# Modified for version 3.80 by zinser@decus.de
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# GNU Make is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Make; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
# Modified for versions 3.81, 3.99.90 by Hartmut Becker
|
||||
|
||||
CC = cc
|
||||
CP = copy
|
||||
@@ -31,7 +32,7 @@ CP = copy
|
||||
#
|
||||
|
||||
ifeq ($(CC),cc)
|
||||
CFLAGS = $(defines) /include=([],[.glob])/prefix=all/standard=relaxed
|
||||
CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed/warn=(disable=questcompare)
|
||||
else
|
||||
CFLAGS = $(defines) /include=([],[.glob])
|
||||
endif
|
||||
@@ -80,22 +81,26 @@ extras = ,signame.obj,remote-stub.obj,vmsfunctions.obj,vmsify.obj
|
||||
# as an alternative:
|
||||
glob = ,[.glob]glob.obj,[.glob]fnmatch.obj
|
||||
getopt = ,getopt.obj,getopt1.obj
|
||||
# Directory to install `make' in.
|
||||
# Directory to install 'make' in.
|
||||
bindir = []
|
||||
# Directory to install the man page in.
|
||||
mandir = []
|
||||
# Number to put on the man page filename.
|
||||
manext = 1
|
||||
|
||||
objs = commands.obj,job.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
||||
main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
||||
default.obj,variable.obj,expand.obj,function.obj,\
|
||||
vpath.obj,version.obj$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob)
|
||||
srcs = commands.c job.c dir.c file.c misc.c hash.c\
|
||||
main.c read.c remake.c rule.c implicit.c \
|
||||
default.c variable.c expand.c function.c \
|
||||
guile = ,guile.obj
|
||||
|
||||
objs = commands.obj,job.obj,output.obj,dir.obj,file.obj,misc.obj,hash.obj,\
|
||||
load.obj,main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
|
||||
default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
|
||||
vpath.obj,version.obj$(guile)\
|
||||
$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob)
|
||||
|
||||
srcs = commands.c job.c output.c dir.c file.c misc.c guile.c hash.c \
|
||||
load.c main.c read.c remake.c rule.c implicit.c \
|
||||
default.c variable.c expand.c function.c strcache.c \
|
||||
vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \
|
||||
commands.h dep.h filedef.h job.h make.h rule.h variable.h
|
||||
commands.h dep.h filedef.h job.h output.h makeint.h rule.h variable.h
|
||||
|
||||
|
||||
.PHONY: all doc
|
||||
@@ -109,39 +114,60 @@ make.exe: $(objs)
|
||||
|
||||
.PHONY: clean realclean
|
||||
clean:
|
||||
$$ purge [...]
|
||||
-purge [...]
|
||||
-$(RM) make.exe;,*.obj;
|
||||
-$(RM) *.opt;
|
||||
-$(RM) [.glob]*.obj;
|
||||
|
||||
# Automatically generated dependencies.
|
||||
commands.obj: commands.c make.h dep.h commands.h filedef.h variable.h job.h
|
||||
job.obj: job.c make.h commands.h job.h filedef.h variable.h
|
||||
dir.obj: dir.c make.h
|
||||
file.obj: file.c make.h commands.h dep.h filedef.h variable.h
|
||||
misc.obj: misc.c make.h dep.h
|
||||
hash.obj: hash.c make.h hash.h
|
||||
main.obj: main.c make.h commands.h dep.h filedef.h variable.h job.h
|
||||
read.obj: read.c make.h commands.h dep.h filedef.h variable.h
|
||||
remake.obj: remake.c make.h commands.h job.h dep.h filedef.h
|
||||
rule.obj: rule.c make.h commands.h dep.h filedef.h variable.h rule.h
|
||||
implicit.obj: implicit.c make.h rule.h dep.h filedef.h
|
||||
default.obj: default.c make.h rule.h dep.h filedef.h commands.h variable.h
|
||||
variable.obj: variable.c make.h commands.h variable.h dep.h filedef.h
|
||||
expand.obj: expand.c make.h commands.h filedef.h variable.h
|
||||
function.obj: function.c make.h variable.h dep.h commands.h job.h
|
||||
vpath.obj: vpath.c make.h filedef.h variable.h
|
||||
ar.obj: ar.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h dep.h \
|
||||
[.glob]fnmatch.h
|
||||
arscan.obj: arscan.c makeint.h config.h gnumake.h gettext.h
|
||||
commands.obj: commands.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||
hash.h dep.h variable.h job.h output.h commands.h
|
||||
default.obj: default.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||
hash.h variable.h rule.h dep.h job.h output.h commands.h
|
||||
dir.obj: dir.c makeint.h config.h gnumake.h gettext.h hash.h filedef.h \
|
||||
dep.h [.glob]glob.h
|
||||
expand.obj: expand.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||
hash.h job.h output.h commands.h variable.h rule.h
|
||||
file.obj: file.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||
dep.h job.h output.h commands.h variable.h debug.h
|
||||
[.glob]fnmatch.obj: [.glob]fnmatch.c config.h [.glob]fnmatch.h
|
||||
function.obj: function.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||
hash.h variable.h dep.h job.h output.h commands.h debug.h
|
||||
getopt.obj: getopt.c config.h gettext.h getopt.h
|
||||
getopt1.obj: getopt1.c config.h getopt.h
|
||||
[.glob]glob.obj: [.glob]glob.c config.h [.glob]fnmatch.h [.glob]glob.h
|
||||
guile.obj: guile.c makeint.h config.h gnumake.h gettext.h
|
||||
hash.obj: hash.c makeint.h config.h gnumake.h gettext.h hash.h
|
||||
implicit.obj: implicit.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||
hash.h rule.h dep.h debug.h variable.h job.h output.h commands.h
|
||||
job.obj: job.c makeint.h config.h gnumake.h gettext.h job.h output.h debug.h \
|
||||
filedef.h hash.h commands.h variable.h debug.h vmsjobs.c
|
||||
load.obj: load.c makeint.h config.h gnumake.h gettext.h
|
||||
main.obj: main.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||
dep.h variable.h job.h output.h commands.h rule.h debug.h getopt.h
|
||||
misc.obj: misc.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||
dep.h debug.h
|
||||
output.obj: output.c makeint.h config.h gnumake.h gettext.h job.h output.h
|
||||
read.obj: read.c makeint.h config.h gnumake.h gettext.h [.glob]glob.h \
|
||||
filedef.h hash.h dep.h job.h output.h commands.h variable.h rule.h \
|
||||
debug.h
|
||||
remake.obj: remake.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||
hash.h job.h output.h commands.h dep.h variable.h debug.h
|
||||
remote-stub.obj: remote-stub.c makeint.h config.h gnumake.h gettext.h \
|
||||
filedef.h hash.h job.h output.h commands.h
|
||||
rule.obj: rule.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||
dep.h job.h output.h commands.h variable.h rule.h
|
||||
signame.obj: signame.c makeint.h config.h gnumake.h gettext.h
|
||||
strcache.obj: strcache.c makeint.h config.h gnumake.h gettext.h hash.h
|
||||
variable.obj: variable.c makeint.h config.h gnumake.h gettext.h filedef.h \
|
||||
hash.h dep.h job.h output.h commands.h variable.h rule.h
|
||||
version.obj: version.c config.h
|
||||
arscan.obj: arscan.c
|
||||
ar.obj: ar.c make.h filedef.h
|
||||
signame.obj: signame.c
|
||||
remote-stub.obj: remote-stub.c
|
||||
[.glob]glob.obj: [.glob]glob.c
|
||||
[.glob]fnmatch.obj: [.glob]fnmatch.c
|
||||
getopt.obj: getopt.c
|
||||
getopt1.obj: getopt1.c
|
||||
vmsfunctions.obj: vmsfunctions.c make.h vmsdir.h
|
||||
vmsify.obj: vmsify.c make.h
|
||||
vmsfunctions.obj: vmsfunctions.c makeint.h config.h gnumake.h gettext.h \
|
||||
debug.h job.h output.h vmsdir.h
|
||||
vmsify.obj: vmsify.c
|
||||
vpath.obj: vpath.c makeint.h config.h gnumake.h gettext.h filedef.h hash.h \
|
||||
variable.h
|
||||
|
||||
config.h: config.h-vms
|
||||
$(CP) $< $@
|
||||
|
||||
714
makeint.h
Normal file
714
makeint.h
Normal file
@@ -0,0 +1,714 @@
|
||||
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
||||
Copyright (C) 1988-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* We use <config.h> instead of "config.h" so that a compilation
|
||||
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
||||
(which it would do because makeint.h was found in $srcdir). */
|
||||
#include <config.h>
|
||||
#undef HAVE_CONFIG_H
|
||||
#define HAVE_CONFIG_H 1
|
||||
|
||||
/* Specify we want GNU source code. This must be defined before any
|
||||
system headers are included. */
|
||||
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
/* AIX requires this to be the first thing in the file. */
|
||||
#if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# if !defined(__GNUC__) && !defined(WINDOWS32)
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Disable assert() unless we're a maintainer.
|
||||
Some asserts are compute-intensive. */
|
||||
#ifndef MAKE_MAINTAINER_MODE
|
||||
# define NDEBUG 1
|
||||
#endif
|
||||
|
||||
/* Include the externally-visible content.
|
||||
Be sure to use the local one, and not one installed on the system.
|
||||
Define GMK_BUILDING_MAKE for proper selection of dllexport/dllimport
|
||||
declarations for MS-Windows. */
|
||||
#ifdef WINDOWS32
|
||||
# define GMK_BUILDING_MAKE
|
||||
#endif
|
||||
#include "gnumake.h"
|
||||
|
||||
#ifdef CRAY
|
||||
/* This must happen before #include <signal.h> so
|
||||
that the declaration therein is changed. */
|
||||
# define signal bsdsignal
|
||||
#endif
|
||||
|
||||
/* If we're compiling for the dmalloc debugger, turn off string inlining. */
|
||||
#if defined(HAVE_DMALLOC_H) && defined(__GNUC__)
|
||||
# define __NO_STRING_INLINES
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
|
||||
unless <sys/timeb.h> has been included first. */
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifndef isblank
|
||||
# define isblank(c) ((c) == ' ' || (c) == '\t')
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
||||
POSIX.1 behavior with 'cc -YPOSIX', which predefines POSIX itself! */
|
||||
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
||||
# define POSIX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some systems define _POSIX_VERSION but are not really POSIX.1. */
|
||||
#if (defined (butterfly) || defined (__arm) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
|
||||
# undef POSIX
|
||||
#endif
|
||||
|
||||
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
|
||||
# define POSIX 1
|
||||
#endif
|
||||
|
||||
#ifndef RETSIGTYPE
|
||||
# define RETSIGTYPE void
|
||||
#endif
|
||||
|
||||
#ifndef sigmask
|
||||
# define sigmask(sig) (1 << ((sig) - 1))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SA_RESTART
|
||||
# define SA_RESTART 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# ifndef POSIX
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# endif
|
||||
#endif
|
||||
#ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifdef PATH_MAX
|
||||
# define GET_PATH_MAX PATH_MAX
|
||||
# define PATH_VAR(var) char var[PATH_MAX]
|
||||
#else
|
||||
# define NEED_GET_PATH_MAX 1
|
||||
# define GET_PATH_MAX (get_path_max ())
|
||||
# define PATH_VAR(var) char *var = alloca (GET_PATH_MAX)
|
||||
unsigned int get_path_max (void);
|
||||
#endif
|
||||
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
|
||||
#ifndef USHRT_MAX
|
||||
# define USHRT_MAX 65535
|
||||
#endif
|
||||
|
||||
/* Nonzero if the integer type T is signed.
|
||||
Use <= to avoid GCC warnings about always-false expressions. */
|
||||
#define INTEGER_TYPE_SIGNED(t) ((t) -1 <= 0)
|
||||
|
||||
/* The minimum and maximum values for the integer type T.
|
||||
Use ~ (t) 0, not -1, for portability to 1's complement hosts. */
|
||||
#define INTEGER_TYPE_MINIMUM(t) \
|
||||
(! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
|
||||
#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
|
||||
|
||||
#ifndef CHAR_MAX
|
||||
# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# ifdef S_ISREG
|
||||
# undef S_ISREG
|
||||
# endif
|
||||
# ifdef S_ISDIR
|
||||
# undef S_ISDIR
|
||||
# endif
|
||||
#endif /* STAT_MACROS_BROKEN. */
|
||||
|
||||
#ifndef S_ISREG
|
||||
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
#ifndef S_ISDIR
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# include <fcntl.h>
|
||||
# include <types.h>
|
||||
# include <unixlib.h>
|
||||
# include <unixio.h>
|
||||
# include <perror.h>
|
||||
/* Needed to use alloca on VMS. */
|
||||
# include <builtins.h>
|
||||
#endif
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(x)
|
||||
# endif
|
||||
/* The __-protected variants of 'format' and 'printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
#define UNUSED __attribute__ ((unused))
|
||||
|
||||
#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# define ANSI_STRING 1
|
||||
#else /* No standard headers. */
|
||||
# ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# define ANSI_STRING 1
|
||||
# else
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# else
|
||||
void *malloc (int);
|
||||
void *realloc (void *, int);
|
||||
void free (void *);
|
||||
|
||||
void abort (void) __attribute__ ((noreturn));
|
||||
void exit (int) __attribute__ ((noreturn));
|
||||
# endif /* HAVE_STDLIB_H. */
|
||||
|
||||
#endif /* Standard headers. */
|
||||
|
||||
/* These should be in stdlib.h. Make sure we have them. */
|
||||
#ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
#ifndef ANSI_STRING
|
||||
|
||||
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
||||
#undef strerror
|
||||
#if !defined(__DECC)
|
||||
char *strerror (int errnum);
|
||||
#endif
|
||||
|
||||
#endif /* !ANSI_STRING. */
|
||||
#undef ANSI_STRING
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#define FILE_TIMESTAMP uintmax_t
|
||||
|
||||
#if !defined(HAVE_STRSIGNAL)
|
||||
char *strsignal (int signum);
|
||||
#endif
|
||||
|
||||
/* ISDIGIT offers the following features:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
NOTE! Make relies on this behavior, don't change it!
|
||||
- It's typically faster.
|
||||
POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit() unless
|
||||
it's important to use the locale's definition of 'digit' even when the
|
||||
host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
/* Test if two strings are equal. Is this worthwhile? Should be profiled. */
|
||||
#define streq(a, b) \
|
||||
((a) == (b) || \
|
||||
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
||||
|
||||
/* Test if two strings are equal, but match case-insensitively on systems
|
||||
which have case-insensitive filesystems. Should only be used for
|
||||
filenames! */
|
||||
#ifdef HAVE_CASE_INSENSITIVE_FS
|
||||
# define patheq(a, b) \
|
||||
((a) == (b) \
|
||||
|| (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
|
||||
&& (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1))))
|
||||
#else
|
||||
# define patheq(a, b) streq(a, b)
|
||||
#endif
|
||||
|
||||
#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
|
||||
|
||||
#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
|
||||
# define ENUM_BITFIELD(bits) :bits
|
||||
#else
|
||||
# define ENUM_BITFIELD(bits)
|
||||
#endif
|
||||
|
||||
/* Handle gettext and locales. */
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#else
|
||||
# define setlocale(category, locale)
|
||||
#endif
|
||||
|
||||
#include <gettext.h>
|
||||
|
||||
#define _(msgid) gettext (msgid)
|
||||
#define N_(msgid) gettext_noop (msgid)
|
||||
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
|
||||
|
||||
/* Handle other OSs.
|
||||
To overcome an issue parsing paths in a DOS/Windows environment when
|
||||
built in a unix based environment, override the PATH_SEPARATOR_CHAR
|
||||
definition unless being built for Cygwin. */
|
||||
#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__)
|
||||
# undef PATH_SEPARATOR_CHAR
|
||||
# define PATH_SEPARATOR_CHAR ';'
|
||||
#elif !defined(PATH_SEPARATOR_CHAR)
|
||||
# if defined (VMS)
|
||||
# define PATH_SEPARATOR_CHAR ','
|
||||
# else
|
||||
# define PATH_SEPARATOR_CHAR ':'
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* This is needed for getcwd() and chdir(), on some W32 systems. */
|
||||
#if defined(HAVE_DIRECT_H)
|
||||
# include <direct.h>
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
# include <fcntl.h>
|
||||
# include <malloc.h>
|
||||
# define pipe(_p) _pipe((_p), 512, O_BINARY)
|
||||
# define kill(_pid,_sig) w32_kill((_pid),(_sig))
|
||||
/* MSVC and Watcom C don't have ftruncate. */
|
||||
# if defined(_MSC_VER) || defined(__WATCOMC__)
|
||||
# define ftruncate(_fd,_len) _chsize(_fd,_len)
|
||||
# endif
|
||||
/* MinGW64 doesn't have _S_ISDIR. */
|
||||
# ifndef _S_ISDIR
|
||||
# define _S_ISDIR(m) S_ISDIR(m)
|
||||
# endif
|
||||
|
||||
void sync_Path_environment (void);
|
||||
int w32_kill (pid_t pid, int sig);
|
||||
int find_and_set_default_shell (const char *token);
|
||||
|
||||
/* indicates whether or not we have Bourne shell */
|
||||
extern int no_default_sh_exe;
|
||||
|
||||
/* is default_shell unixy? */
|
||||
extern int unixy_shell;
|
||||
|
||||
/* We don't have a preferred fixed value for LOCALEDIR. */
|
||||
# ifndef LOCALEDIR
|
||||
# define LOCALEDIR NULL
|
||||
# endif
|
||||
|
||||
/* Include only the minimal stuff from windows.h. */
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif /* WINDOWS32 */
|
||||
|
||||
#define ANY_SET(_v,_m) (((_v)&(_m)) != 0)
|
||||
#define NONE_SET(_v,_m) (! ANY_SET ((_v),(_m)))
|
||||
|
||||
#define MAP_NUL 0x0001
|
||||
#define MAP_BLANK 0x0002
|
||||
#define MAP_SPACE 0x0004
|
||||
#define MAP_COMMENT 0x0008
|
||||
#define MAP_SEMI 0x0010
|
||||
#define MAP_EQUALS 0x0020
|
||||
#define MAP_COLON 0x0040
|
||||
#define MAP_PERCENT 0x0080
|
||||
#define MAP_PIPE 0x0100
|
||||
#define MAP_DOT 0x0200
|
||||
#define MAP_COMMA 0x0400
|
||||
|
||||
/* These are the valid characters for a user-defined function. */
|
||||
#define MAP_USERFUNC 0x2000
|
||||
/* This means not only a '$', but skip the variable reference. */
|
||||
#define MAP_VARIABLE 0x4000
|
||||
/* The set of characters which are directory separators is OS-specific. */
|
||||
#define MAP_DIRSEP 0x8000
|
||||
|
||||
#ifdef VMS
|
||||
# define MAP_VMSCOMMA MAP_COMMA
|
||||
#else
|
||||
# define MAP_VMSCOMMA 0x0000
|
||||
#endif
|
||||
|
||||
#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(unsigned char)(_v)],(_m))
|
||||
|
||||
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
|
||||
# define SET_STACK_SIZE
|
||||
#endif
|
||||
#ifdef SET_STACK_SIZE
|
||||
# include <sys/resource.h>
|
||||
extern struct rlimit stack_limit;
|
||||
#endif
|
||||
|
||||
#define NILF ((gmk_floc *)0)
|
||||
|
||||
#define CSTRLEN(_s) (sizeof (_s)-1)
|
||||
#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
|
||||
|
||||
/* The number of bytes needed to represent the largest integer as a string. */
|
||||
#define INTSTR_LENGTH CSTRLEN ("18446744073709551616")
|
||||
|
||||
#ifdef HAVE_TTYNAME
|
||||
# define TTYNAME(_f) ttyname (_f)
|
||||
#else
|
||||
# define TTYNAME(_f) "true"
|
||||
#endif
|
||||
|
||||
|
||||
const char *concat (unsigned int, ...);
|
||||
void message (int prefix, size_t length, const char *fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
void error (const gmk_floc *flocp, size_t length, const char *fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
void fatal (const gmk_floc *flocp, size_t length, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, __format__ (__printf__, 3, 4)));
|
||||
|
||||
#define O(_t,_a,_f) _t((_a), 0, (_f))
|
||||
#define OS(_t,_a,_f,_s) _t((_a), strlen (_s), (_f), (_s))
|
||||
#define OSS(_t,_a,_f,_s1,_s2) _t((_a), strlen (_s1) + strlen (_s2), \
|
||||
(_f), (_s1), (_s2))
|
||||
#define OSSS(_t,_a,_f,_s1,_s2,_s3) _t((_a), strlen (_s1) + strlen (_s2) + strlen (_s3), \
|
||||
(_f), (_s1), (_s2), (_s3))
|
||||
#define ON(_t,_a,_f,_n) _t((_a), INTSTR_LENGTH, (_f), (_n))
|
||||
#define ONN(_t,_a,_f,_n1,_n2) _t((_a), INTSTR_LENGTH*2, (_f), (_n1), (_n2))
|
||||
|
||||
#define OSN(_t,_a,_f,_s,_n) _t((_a), strlen (_s) + INTSTR_LENGTH, \
|
||||
(_f), (_s), (_n))
|
||||
#define ONS(_t,_a,_f,_n,_s) _t((_a), INTSTR_LENGTH + strlen (_s), \
|
||||
(_f), (_n), (_s))
|
||||
|
||||
#define OUT_OF_MEM() O (fatal, NILF, _("virtual memory exhausted"))
|
||||
|
||||
void die (int) __attribute__ ((noreturn));
|
||||
void pfatal_with_name (const char *) __attribute__ ((noreturn));
|
||||
void perror_with_name (const char *, const char *);
|
||||
#define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s))
|
||||
void *xmalloc (unsigned int);
|
||||
void *xcalloc (unsigned int);
|
||||
void *xrealloc (void *, unsigned int);
|
||||
char *xstrdup (const char *);
|
||||
char *xstrndup (const char *, unsigned int);
|
||||
char *find_next_token (const char **, unsigned int *);
|
||||
char *next_token (const char *);
|
||||
char *end_of_token (const char *);
|
||||
void collapse_continuations (char *);
|
||||
char *lindex (const char *, const char *, int);
|
||||
int alpha_compare (const void *, const void *);
|
||||
void print_spaces (unsigned int);
|
||||
char *find_percent (char *);
|
||||
const char *find_percent_cached (const char **);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
int ar_name (const char *);
|
||||
void ar_parse_name (const char *, char **, char **);
|
||||
int ar_touch (const char *);
|
||||
time_t ar_member_date (const char *);
|
||||
|
||||
typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
|
||||
long int hdrpos, long int datapos,
|
||||
long int size, long int date, int uid,
|
||||
int gid, int mode, const void *arg);
|
||||
|
||||
long int ar_scan (const char *archive, ar_member_func_t function, const void *arg);
|
||||
int ar_name_equal (const char *name, const char *mem, int truncated);
|
||||
#ifndef VMS
|
||||
int ar_member_touch (const char *arname, const char *memname);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int dir_file_exists_p (const char *, const char *);
|
||||
int file_exists_p (const char *);
|
||||
int file_impossible_p (const char *);
|
||||
void file_impossible (const char *);
|
||||
const char *dir_name (const char *);
|
||||
void hash_init_directories (void);
|
||||
|
||||
void define_default_variables (void);
|
||||
void undefine_default_variables (void);
|
||||
void set_default_suffixes (void);
|
||||
void install_default_suffix_rules (void);
|
||||
void install_default_implicit_rules (void);
|
||||
|
||||
void build_vpath_lists (void);
|
||||
void construct_vpath_list (char *pattern, char *dirpath);
|
||||
const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr,
|
||||
unsigned int* vpath_index, unsigned int* path_index);
|
||||
int gpath_search (const char *file, unsigned int len);
|
||||
|
||||
void construct_include_path (const char **arg_dirs);
|
||||
|
||||
void user_access (void);
|
||||
void make_access (void);
|
||||
void child_access (void);
|
||||
|
||||
char *strip_whitespace (const char **begpp, const char **endpp);
|
||||
|
||||
/* String caching */
|
||||
void strcache_init (void);
|
||||
void strcache_print_stats (const char *prefix);
|
||||
int strcache_iscached (const char *str);
|
||||
const char *strcache_add (const char *str);
|
||||
const char *strcache_add_len (const char *str, unsigned int len);
|
||||
int strcache_setbufsize (unsigned int size);
|
||||
|
||||
/* Guile support */
|
||||
int guile_gmake_setup (const gmk_floc *flocp);
|
||||
|
||||
/* Loadable object support. Sets to the strcached name of the loaded file. */
|
||||
typedef int (*load_func_t)(const gmk_floc *flocp);
|
||||
int load_file (const gmk_floc *flocp, const char **filename, int noerror);
|
||||
void unload_file (const char *name);
|
||||
|
||||
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
||||
because such systems often declare them in header files anyway. */
|
||||
|
||||
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
|
||||
|
||||
long int atol ();
|
||||
# ifndef VMS
|
||||
long int lseek ();
|
||||
# endif
|
||||
|
||||
#endif /* Not GNU C library or POSIX. */
|
||||
|
||||
#ifdef HAVE_GETCWD
|
||||
# if !defined(VMS) && !defined(__DECC)
|
||||
char *getcwd ();
|
||||
# endif
|
||||
#else
|
||||
char *getwd ();
|
||||
# define getcwd(buf, len) getwd (buf)
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRCASECMP
|
||||
# if HAVE_STRICMP
|
||||
# define strcasecmp stricmp
|
||||
# elif HAVE_STRCMPI
|
||||
# define strcasecmp strcmpi
|
||||
# else
|
||||
/* Create our own, in misc.c */
|
||||
int strcasecmp (const char *s1, const char *s2);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRNCASECMP
|
||||
# if HAVE_STRNICMP
|
||||
# define strncasecmp strnicmp
|
||||
# elif HAVE_STRNCMPI
|
||||
# define strncasecmp strncmpi
|
||||
# else
|
||||
/* Create our own, in misc.c */
|
||||
int strncasecmp (const char *s1, const char *s2, int n);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define OUTPUT_SYNC_NONE 0
|
||||
#define OUTPUT_SYNC_LINE 1
|
||||
#define OUTPUT_SYNC_TARGET 2
|
||||
#define OUTPUT_SYNC_RECURSE 3
|
||||
|
||||
extern const gmk_floc *reading_file;
|
||||
extern const gmk_floc **expanding_var;
|
||||
|
||||
extern char **environ;
|
||||
|
||||
extern unsigned short stopchar_map[];
|
||||
|
||||
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
||||
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
||||
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
||||
extern int warn_undefined_variables_flag, trace_flag, posix_pedantic;
|
||||
extern int not_parallel, second_expansion, clock_skew_detected;
|
||||
extern int rebuilding_makefiles, one_shell, output_sync, verify_flag;
|
||||
|
||||
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
||||
extern int batch_mode_shell;
|
||||
|
||||
/* Resetting the command script introduction prefix character. */
|
||||
#define RECIPEPREFIX_NAME ".RECIPEPREFIX"
|
||||
#define RECIPEPREFIX_DEFAULT '\t'
|
||||
extern char cmd_prefix;
|
||||
|
||||
extern unsigned int job_slots;
|
||||
extern int job_fds[2];
|
||||
extern int job_rfd;
|
||||
#ifndef NO_FLOAT
|
||||
extern double max_load_average;
|
||||
#else
|
||||
extern int max_load_average;
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
extern char *program;
|
||||
#else
|
||||
extern const char *program;
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
const char *vms_command(const char *argv0);
|
||||
const char *vms_progname(const char *argv0);
|
||||
#endif
|
||||
|
||||
extern char *starting_directory;
|
||||
extern unsigned int makelevel;
|
||||
extern char *version_string, *remote_description, *make_host;
|
||||
|
||||
extern unsigned int commands_started;
|
||||
|
||||
extern int handling_fatal_signal;
|
||||
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
|
||||
#endif
|
||||
#ifndef MAX
|
||||
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VMS
|
||||
/* These are the VMS __posix_exit compliant exit codes, constructed out of
|
||||
STS$M_INHIB_MSG, C facility code, a POSIX condition code mask, MAKE_NNN<<3 and
|
||||
the coresponding VMS severity, here STS$K_SUCCESS and STS$K_ERROR. */
|
||||
# define MAKE_SUCCESS 0x1035a001
|
||||
# define MAKE_TROUBLE 0x1035a00a
|
||||
# define MAKE_FAILURE 0x1035a012
|
||||
#else
|
||||
# define MAKE_SUCCESS 0
|
||||
# define MAKE_TROUBLE 1
|
||||
# define MAKE_FAILURE 2
|
||||
#endif
|
||||
|
||||
/* Set up heap debugging library dmalloc. */
|
||||
|
||||
#ifdef HAVE_DMALLOC_H
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
#ifndef initialize_main
|
||||
# ifdef __EMX__
|
||||
# define initialize_main(pargc, pargv) \
|
||||
{ _wildcard(pargc, pargv); _response(pargc, pargv); }
|
||||
# else
|
||||
# define initialize_main(pargc, pargv)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __EMX__
|
||||
# if !defined chdir
|
||||
# define chdir _chdir2
|
||||
# endif
|
||||
# if !defined getcwd
|
||||
# define getcwd _getcwd2
|
||||
# endif
|
||||
|
||||
/* NO_CHDIR2 causes make not to use _chdir2() and _getcwd2() instead of
|
||||
chdir() and getcwd(). This avoids some error messages for the
|
||||
make testsuite but restricts the drive letter support. */
|
||||
# ifdef NO_CHDIR2
|
||||
# warning NO_CHDIR2: usage of drive letters restricted
|
||||
# undef chdir
|
||||
# undef getcwd
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef initialize_main
|
||||
# define initialize_main(pargc, pargv)
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems (like Solaris, PTX, etc.) do not support the SA_RESTART flag
|
||||
properly according to POSIX. So, we try to wrap common system calls with
|
||||
checks for EINTR. Note that there are still plenty of system calls that
|
||||
can fail with EINTR but this, reportedly, gets the vast majority of
|
||||
failure cases. If you still experience failures you'll need to either get
|
||||
a system where SA_RESTART works, or you need to avoid -j. */
|
||||
|
||||
#define EINTRLOOP(_v,_c) while (((_v)=_c)==-1 && errno==EINTR)
|
||||
|
||||
/* While system calls that return integers are pretty consistent about
|
||||
returning -1 on failure and setting errno in that case, functions that
|
||||
return pointers are not always so well behaved. Sometimes they return
|
||||
NULL for expected behavior: one good example is readdir() which returns
|
||||
NULL at the end of the directory--and _doesn't_ reset errno. So, we have
|
||||
to do it ourselves here. */
|
||||
|
||||
#define ENULLLOOP(_v,_c) do { errno = 0; (_v) = _c; } \
|
||||
while((_v)==0 && errno==EINTR)
|
||||
723
output.c
Normal file
723
output.c
Normal file
@@ -0,0 +1,723 @@
|
||||
/* Output to stdout / stderr for GNU make
|
||||
Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
#include "job.h"
|
||||
|
||||
/* GNU make no longer supports pre-ANSI89 environments. */
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#else
|
||||
# include <sys/file.h>
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
# include <windows.h>
|
||||
# include <io.h>
|
||||
# include "sub_proc.h"
|
||||
#endif /* WINDOWS32 */
|
||||
|
||||
struct output *output_context = NULL;
|
||||
unsigned int stdio_traced = 0;
|
||||
|
||||
#define OUTPUT_NONE (-1)
|
||||
|
||||
#define OUTPUT_ISSET(_out) ((_out)->out >= 0 || (_out)->err >= 0)
|
||||
|
||||
#ifdef HAVE_FCNTL
|
||||
# define STREAM_OK(_s) ((fcntl (fileno (_s), F_GETFD) != -1) || (errno != EBADF))
|
||||
#else
|
||||
# define STREAM_OK(_s) 1
|
||||
#endif
|
||||
|
||||
/* Write a string to the current STDOUT or STDERR. */
|
||||
static void
|
||||
_outputs (struct output *out, int is_err, const char *msg)
|
||||
{
|
||||
if (! out || ! out->syncout)
|
||||
{
|
||||
FILE *f = is_err ? stderr : stdout;
|
||||
fputs (msg, f);
|
||||
fflush (f);
|
||||
}
|
||||
else
|
||||
{
|
||||
int fd = is_err ? out->err : out->out;
|
||||
int len = strlen (msg);
|
||||
int r;
|
||||
|
||||
EINTRLOOP (r, lseek (fd, 0, SEEK_END));
|
||||
while (1)
|
||||
{
|
||||
EINTRLOOP (r, write (fd, msg, len));
|
||||
if (r == len || r <= 0)
|
||||
break;
|
||||
len -= r;
|
||||
msg += r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Write a message indicating that we've just entered or
|
||||
left (according to ENTERING) the current directory. */
|
||||
|
||||
static int
|
||||
log_working_directory (int entering)
|
||||
{
|
||||
static char *buf = NULL;
|
||||
static unsigned int len = 0;
|
||||
unsigned int need;
|
||||
const char *fmt;
|
||||
char *p;
|
||||
|
||||
/* Get enough space for the longest possible output. */
|
||||
need = strlen (program) + INTSTR_LENGTH + 2 + 1;
|
||||
if (starting_directory)
|
||||
need += strlen (starting_directory);
|
||||
|
||||
/* Use entire sentences to give the translators a fighting chance. */
|
||||
if (makelevel == 0)
|
||||
if (starting_directory == 0)
|
||||
if (entering)
|
||||
fmt = _("%s: Entering an unknown directory\n");
|
||||
else
|
||||
fmt = _("%s: Leaving an unknown directory\n");
|
||||
else
|
||||
if (entering)
|
||||
fmt = _("%s: Entering directory '%s'\n");
|
||||
else
|
||||
fmt = _("%s: Leaving directory '%s'\n");
|
||||
else
|
||||
if (starting_directory == 0)
|
||||
if (entering)
|
||||
fmt = _("%s[%u]: Entering an unknown directory\n");
|
||||
else
|
||||
fmt = _("%s[%u]: Leaving an unknown directory\n");
|
||||
else
|
||||
if (entering)
|
||||
fmt = _("%s[%u]: Entering directory '%s'\n");
|
||||
else
|
||||
fmt = _("%s[%u]: Leaving directory '%s'\n");
|
||||
|
||||
need += strlen (fmt);
|
||||
|
||||
if (need > len)
|
||||
{
|
||||
buf = xrealloc (buf, need);
|
||||
len = need;
|
||||
}
|
||||
|
||||
p = buf;
|
||||
if (print_data_base_flag)
|
||||
{
|
||||
*(p++) = '#';
|
||||
*(p++) = ' ';
|
||||
}
|
||||
|
||||
if (makelevel == 0)
|
||||
if (starting_directory == 0)
|
||||
sprintf (p, fmt , program);
|
||||
else
|
||||
sprintf (p, fmt, program, starting_directory);
|
||||
else if (starting_directory == 0)
|
||||
sprintf (p, fmt, program, makelevel);
|
||||
else
|
||||
sprintf (p, fmt, program, makelevel, starting_directory);
|
||||
|
||||
_outputs (NULL, 0, buf);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Set a file descriptor to be in O_APPEND mode.
|
||||
If it fails, just ignore it. */
|
||||
|
||||
static void
|
||||
set_append_mode (int fd)
|
||||
{
|
||||
#if defined(F_GETFL) && defined(F_SETFL) && defined(O_APPEND)
|
||||
int flags = fcntl (fd, F_GETFL, 0);
|
||||
if (flags >= 0)
|
||||
fcntl (fd, F_SETFL, flags | O_APPEND);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_OUTPUT_SYNC
|
||||
|
||||
/* Semaphore for use in -j mode with output_sync. */
|
||||
static sync_handle_t sync_handle = -1;
|
||||
|
||||
#define FD_NOT_EMPTY(_f) ((_f) != OUTPUT_NONE && lseek ((_f), 0, SEEK_END) > 0)
|
||||
|
||||
/* Set up the sync handle. Disables output_sync on error. */
|
||||
static int
|
||||
sync_init ()
|
||||
{
|
||||
int combined_output = 0;
|
||||
|
||||
#ifdef WINDOWS32
|
||||
if ((!STREAM_OK (stdout) && !STREAM_OK (stderr))
|
||||
|| (sync_handle = create_mutex ()) == -1)
|
||||
{
|
||||
perror_with_name ("output-sync suppressed: ", "stderr");
|
||||
output_sync = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
combined_output = same_stream (stdout, stderr);
|
||||
prepare_mutex_handle_string (sync_handle);
|
||||
}
|
||||
|
||||
#else
|
||||
if (STREAM_OK (stdout))
|
||||
{
|
||||
struct stat stbuf_o, stbuf_e;
|
||||
|
||||
sync_handle = fileno (stdout);
|
||||
combined_output = (fstat (fileno (stdout), &stbuf_o) == 0
|
||||
&& fstat (fileno (stderr), &stbuf_e) == 0
|
||||
&& stbuf_o.st_dev == stbuf_e.st_dev
|
||||
&& stbuf_o.st_ino == stbuf_e.st_ino);
|
||||
}
|
||||
else if (STREAM_OK (stderr))
|
||||
sync_handle = fileno (stderr);
|
||||
else
|
||||
{
|
||||
perror_with_name ("output-sync suppressed: ", "stderr");
|
||||
output_sync = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
return combined_output;
|
||||
}
|
||||
|
||||
/* Support routine for output_sync() */
|
||||
static void
|
||||
pump_from_tmp (int from, FILE *to)
|
||||
{
|
||||
static char buffer[8192];
|
||||
|
||||
#ifdef WINDOWS32
|
||||
int prev_mode;
|
||||
|
||||
/* "from" is opened by open_tmpfd, which does it in binary mode, so
|
||||
we need the mode of "to" to match that. */
|
||||
prev_mode = _setmode (fileno (to), _O_BINARY);
|
||||
#endif
|
||||
|
||||
if (lseek (from, 0, SEEK_SET) == -1)
|
||||
perror ("lseek()");
|
||||
|
||||
while (1)
|
||||
{
|
||||
int len;
|
||||
EINTRLOOP (len, read (from, buffer, sizeof (buffer)));
|
||||
if (len < 0)
|
||||
perror ("read()");
|
||||
if (len <= 0)
|
||||
break;
|
||||
if (fwrite (buffer, len, 1, to) < 1)
|
||||
{
|
||||
perror ("fwrite()");
|
||||
break;
|
||||
}
|
||||
fflush (to);
|
||||
}
|
||||
|
||||
#ifdef WINDOWS32
|
||||
/* Switch "to" back to its original mode, so that log messages by
|
||||
Make have the same EOL format as without --output-sync. */
|
||||
_setmode (fileno (to), prev_mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Obtain the lock for writing output. */
|
||||
static void *
|
||||
acquire_semaphore (void)
|
||||
{
|
||||
static struct flock fl;
|
||||
|
||||
fl.l_type = F_WRLCK;
|
||||
fl.l_whence = SEEK_SET;
|
||||
fl.l_start = 0;
|
||||
fl.l_len = 1;
|
||||
if (fcntl (sync_handle, F_SETLKW, &fl) != -1)
|
||||
return &fl;
|
||||
perror ("fcntl()");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Release the lock for writing output. */
|
||||
static void
|
||||
release_semaphore (void *sem)
|
||||
{
|
||||
struct flock *flp = (struct flock *)sem;
|
||||
flp->l_type = F_UNLCK;
|
||||
if (fcntl (sync_handle, F_SETLKW, flp) == -1)
|
||||
perror ("fcntl()");
|
||||
}
|
||||
|
||||
/* Returns a file descriptor to a temporary file. The file is automatically
|
||||
closed/deleted on exit. Don't use a FILE* stream. */
|
||||
int
|
||||
output_tmpfd ()
|
||||
{
|
||||
int fd = -1;
|
||||
FILE *tfile = tmpfile ();
|
||||
|
||||
if (! tfile)
|
||||
pfatal_with_name ("tmpfile");
|
||||
|
||||
/* Create a duplicate so we can close the stream. */
|
||||
fd = dup (fileno (tfile));
|
||||
if (fd < 0)
|
||||
pfatal_with_name ("dup");
|
||||
|
||||
fclose (tfile);
|
||||
|
||||
set_append_mode (fd);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
/* Adds file descriptors to the child structure to support output_sync; one
|
||||
for stdout and one for stderr as long as they are open. If stdout and
|
||||
stderr share a device they can share a temp file too.
|
||||
Will reset output_sync on error. */
|
||||
static void
|
||||
setup_tmpfile (struct output *out)
|
||||
{
|
||||
/* Is make's stdout going to the same place as stderr? */
|
||||
static int combined_output = -1;
|
||||
|
||||
if (combined_output < 0)
|
||||
combined_output = sync_init ();
|
||||
|
||||
if (STREAM_OK (stdout))
|
||||
{
|
||||
int fd = output_tmpfd ();
|
||||
if (fd < 0)
|
||||
goto error;
|
||||
CLOSE_ON_EXEC (fd);
|
||||
out->out = fd;
|
||||
}
|
||||
|
||||
if (STREAM_OK (stderr))
|
||||
{
|
||||
if (out->out != OUTPUT_NONE && combined_output)
|
||||
out->err = out->out;
|
||||
else
|
||||
{
|
||||
int fd = output_tmpfd ();
|
||||
if (fd < 0)
|
||||
goto error;
|
||||
CLOSE_ON_EXEC (fd);
|
||||
out->err = fd;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
/* If we failed to create a temp file, disable output sync going forward. */
|
||||
error:
|
||||
output_close (out);
|
||||
output_sync = 0;
|
||||
}
|
||||
|
||||
/* Synchronize the output of jobs in -j mode to keep the results of
|
||||
each job together. This is done by holding the results in temp files,
|
||||
one for stdout and potentially another for stderr, and only releasing
|
||||
them to "real" stdout/stderr when a semaphore can be obtained. */
|
||||
|
||||
void
|
||||
output_dump (struct output *out)
|
||||
{
|
||||
int outfd_not_empty = FD_NOT_EMPTY (out->out);
|
||||
int errfd_not_empty = FD_NOT_EMPTY (out->err);
|
||||
|
||||
if (outfd_not_empty || errfd_not_empty)
|
||||
{
|
||||
int traced = 0;
|
||||
|
||||
/* Try to acquire the semaphore. If it fails, dump the output
|
||||
unsynchronized; still better than silently discarding it.
|
||||
We want to keep this lock for as little time as possible. */
|
||||
void *sem = acquire_semaphore ();
|
||||
|
||||
/* Log the working directory for this dump. */
|
||||
if (print_directory_flag && output_sync != OUTPUT_SYNC_RECURSE)
|
||||
traced = log_working_directory (1);
|
||||
|
||||
if (outfd_not_empty)
|
||||
pump_from_tmp (out->out, stdout);
|
||||
if (errfd_not_empty && out->err != out->out)
|
||||
pump_from_tmp (out->err, stderr);
|
||||
|
||||
if (traced)
|
||||
log_working_directory (0);
|
||||
|
||||
/* Exit the critical section. */
|
||||
if (sem)
|
||||
release_semaphore (sem);
|
||||
|
||||
/* Truncate and reset the output, in case we use it again. */
|
||||
if (out->out != OUTPUT_NONE)
|
||||
{
|
||||
int e;
|
||||
lseek (out->out, 0, SEEK_SET);
|
||||
EINTRLOOP (e, ftruncate (out->out, 0));
|
||||
}
|
||||
if (out->err != OUTPUT_NONE && out->err != out->out)
|
||||
{
|
||||
int e;
|
||||
lseek (out->err, 0, SEEK_SET);
|
||||
EINTRLOOP (e, ftruncate (out->err, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* NO_OUTPUT_SYNC */
|
||||
|
||||
|
||||
/* Provide support for temporary files. */
|
||||
|
||||
#ifndef HAVE_STDLIB_H
|
||||
# ifdef HAVE_MKSTEMP
|
||||
int mkstemp (char *template);
|
||||
# else
|
||||
char *mktemp (char *template);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
FILE *
|
||||
output_tmpfile (char **name, const char *template)
|
||||
{
|
||||
#ifdef HAVE_FDOPEN
|
||||
int fd;
|
||||
#endif
|
||||
|
||||
#if defined HAVE_MKSTEMP || defined HAVE_MKTEMP
|
||||
# define TEMPLATE_LEN strlen (template)
|
||||
#else
|
||||
# define TEMPLATE_LEN L_tmpnam
|
||||
#endif
|
||||
*name = xmalloc (TEMPLATE_LEN + 1);
|
||||
strcpy (*name, template);
|
||||
|
||||
#if defined HAVE_MKSTEMP && defined HAVE_FDOPEN
|
||||
/* It's safest to use mkstemp(), if we can. */
|
||||
fd = mkstemp (*name);
|
||||
if (fd == -1)
|
||||
return 0;
|
||||
return fdopen (fd, "w");
|
||||
#else
|
||||
# ifdef HAVE_MKTEMP
|
||||
(void) mktemp (*name);
|
||||
# else
|
||||
(void) tmpnam (*name);
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_FDOPEN
|
||||
/* Can't use mkstemp(), but guard against a race condition. */
|
||||
fd = open (*name, O_CREAT|O_EXCL|O_WRONLY, 0600);
|
||||
if (fd == -1)
|
||||
return 0;
|
||||
return fdopen (fd, "w");
|
||||
# else
|
||||
/* Not secure, but what can we do? */
|
||||
return fopen (*name, "w");
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* This code is stolen from gnulib.
|
||||
If/when we abandon the requirement to work with K&R compilers, we can
|
||||
remove this (and perhaps other parts of GNU make!) and migrate to using
|
||||
gnulib directly.
|
||||
|
||||
This is called only through atexit(), which means die() has already been
|
||||
invoked. So, call exit() here directly. Apparently that works...?
|
||||
*/
|
||||
|
||||
/* Close standard output, exiting with status 'exit_failure' on failure.
|
||||
If a program writes *anything* to stdout, that program should close
|
||||
stdout and make sure that it succeeds before exiting. Otherwise,
|
||||
suppose that you go to the extreme of checking the return status
|
||||
of every function that does an explicit write to stdout. The last
|
||||
printf can succeed in writing to the internal stream buffer, and yet
|
||||
the fclose(stdout) could still fail (due e.g., to a disk full error)
|
||||
when it tries to write out that buffered data. Thus, you would be
|
||||
left with an incomplete output file and the offending program would
|
||||
exit successfully. Even calling fflush is not always sufficient,
|
||||
since some file systems (NFS and CODA) buffer written/flushed data
|
||||
until an actual close call.
|
||||
|
||||
Besides, it's wasteful to check the return value from every call
|
||||
that writes to stdout -- just let the internal stream state record
|
||||
the failure. That's what the ferror test is checking below.
|
||||
|
||||
It's important to detect such failures and exit nonzero because many
|
||||
tools (most notably 'make' and other build-management systems) depend
|
||||
on being able to detect failure in other tools via their exit status. */
|
||||
|
||||
static void
|
||||
close_stdout (void)
|
||||
{
|
||||
int prev_fail = ferror (stdout);
|
||||
int fclose_fail = fclose (stdout);
|
||||
|
||||
if (prev_fail || fclose_fail)
|
||||
{
|
||||
if (fclose_fail)
|
||||
perror_with_name (_("write error: stdout"), "");
|
||||
else
|
||||
O (error, NILF, _("write error: stdout"));
|
||||
exit (MAKE_TROUBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
output_init (struct output *out)
|
||||
{
|
||||
if (out)
|
||||
{
|
||||
out->out = out->err = OUTPUT_NONE;
|
||||
out->syncout = !!output_sync;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Configure this instance of make. Be sure stdout is line-buffered. */
|
||||
|
||||
#ifdef HAVE_SETVBUF
|
||||
# ifdef SETVBUF_REVERSED
|
||||
setvbuf (stdout, _IOLBF, xmalloc (BUFSIZ), BUFSIZ);
|
||||
# else /* setvbuf not reversed. */
|
||||
/* Some buggy systems lose if we pass 0 instead of allocating ourselves. */
|
||||
setvbuf (stdout, 0, _IOLBF, BUFSIZ);
|
||||
# endif /* setvbuf reversed. */
|
||||
#elif HAVE_SETLINEBUF
|
||||
setlinebuf (stdout);
|
||||
#endif /* setlinebuf missing. */
|
||||
|
||||
/* Force stdout/stderr into append mode. This ensures parallel jobs won't
|
||||
lose output due to overlapping writes. */
|
||||
set_append_mode (fileno (stdout));
|
||||
set_append_mode (fileno (stderr));
|
||||
|
||||
#ifdef HAVE_ATEXIT
|
||||
if (STREAM_OK (stdout))
|
||||
atexit (close_stdout);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
output_close (struct output *out)
|
||||
{
|
||||
if (! out)
|
||||
{
|
||||
if (stdio_traced)
|
||||
log_working_directory (0);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef NO_OUTPUT_SYNC
|
||||
output_dump (out);
|
||||
#endif
|
||||
|
||||
if (out->out >= 0)
|
||||
close (out->out);
|
||||
if (out->err >= 0 && out->err != out->out)
|
||||
close (out->err);
|
||||
|
||||
output_init (out);
|
||||
}
|
||||
|
||||
/* We're about to generate output: be sure it's set up. */
|
||||
void
|
||||
output_start ()
|
||||
{
|
||||
#ifndef NO_OUTPUT_SYNC
|
||||
/* If we're syncing output make sure the temporary file is set up. */
|
||||
if (output_context && output_context->syncout)
|
||||
if (! OUTPUT_ISSET(output_context))
|
||||
setup_tmpfile (output_context);
|
||||
#endif
|
||||
|
||||
/* If we're not syncing this output per-line or per-target, make sure we emit
|
||||
the "Entering..." message where appropriate. */
|
||||
if (output_sync == OUTPUT_SYNC_NONE || output_sync == OUTPUT_SYNC_RECURSE)
|
||||
if (! stdio_traced && print_directory_flag)
|
||||
stdio_traced = log_working_directory (1);
|
||||
}
|
||||
|
||||
void
|
||||
outputs (int is_err, const char *msg)
|
||||
{
|
||||
if (! msg || *msg == '\0')
|
||||
return;
|
||||
|
||||
output_start ();
|
||||
|
||||
_outputs (output_context, is_err, msg);
|
||||
}
|
||||
|
||||
|
||||
static struct fmtstring
|
||||
{
|
||||
char *buffer;
|
||||
size_t size;
|
||||
} fmtbuf = { NULL, 0 };
|
||||
|
||||
static char *
|
||||
get_buffer (size_t need)
|
||||
{
|
||||
/* Make sure we have room. NEED includes space for \0. */
|
||||
if (need > fmtbuf.size)
|
||||
{
|
||||
fmtbuf.size += need * 2;
|
||||
fmtbuf.buffer = xrealloc (fmtbuf.buffer, fmtbuf.size);
|
||||
}
|
||||
|
||||
fmtbuf.buffer[need-1] = '\0';
|
||||
|
||||
return fmtbuf.buffer;
|
||||
}
|
||||
|
||||
/* Print a message on stdout. */
|
||||
|
||||
void
|
||||
message (int prefix, size_t len, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char *p;
|
||||
|
||||
len += strlen (fmt) + strlen (program) + INTSTR_LENGTH + 4 + 1 + 1;
|
||||
p = get_buffer (len);
|
||||
|
||||
if (prefix)
|
||||
{
|
||||
if (makelevel == 0)
|
||||
sprintf (p, "%s: ", program);
|
||||
else
|
||||
sprintf (p, "%s[%u]: ", program, makelevel);
|
||||
p += strlen (p);
|
||||
}
|
||||
|
||||
va_start (args, fmt);
|
||||
vsprintf (p, fmt, args);
|
||||
va_end (args);
|
||||
|
||||
strcat (p, "\n");
|
||||
|
||||
assert (fmtbuf.buffer[len-1] == '\0');
|
||||
outputs (0, fmtbuf.buffer);
|
||||
}
|
||||
|
||||
/* Print an error message. */
|
||||
|
||||
void
|
||||
error (const gmk_floc *flocp, size_t len, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char *p;
|
||||
|
||||
len += (strlen (fmt) + strlen (program)
|
||||
+ (flocp && flocp->filenm ? strlen (flocp->filenm) : 0)
|
||||
+ INTSTR_LENGTH + 4 + 1 + 1);
|
||||
p = get_buffer (len);
|
||||
|
||||
if (flocp && flocp->filenm)
|
||||
sprintf (p, "%s:%lu: ", flocp->filenm, flocp->lineno);
|
||||
else if (makelevel == 0)
|
||||
sprintf (p, "%s: ", program);
|
||||
else
|
||||
sprintf (p, "%s[%u]: ", program, makelevel);
|
||||
p += strlen (p);
|
||||
|
||||
va_start (args, fmt);
|
||||
vsprintf (p, fmt, args);
|
||||
va_end (args);
|
||||
|
||||
strcat (p, "\n");
|
||||
|
||||
assert (fmtbuf.buffer[len-1] == '\0');
|
||||
outputs (1, fmtbuf.buffer);
|
||||
}
|
||||
|
||||
/* Print an error message and exit. */
|
||||
|
||||
void
|
||||
fatal (const gmk_floc *flocp, size_t len, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
const char *stop = _(". Stop.\n");
|
||||
char *p;
|
||||
|
||||
len += (strlen (fmt) + strlen (program)
|
||||
+ (flocp && flocp->filenm ? strlen (flocp->filenm) : 0)
|
||||
+ INTSTR_LENGTH + 8 + strlen (stop) + 1);
|
||||
p = get_buffer (len);
|
||||
|
||||
if (flocp && flocp->filenm)
|
||||
sprintf (p, "%s:%lu: *** ", flocp->filenm, flocp->lineno);
|
||||
else if (makelevel == 0)
|
||||
sprintf (p, "%s: *** ", program);
|
||||
else
|
||||
sprintf (p, "%s[%u]: *** ", program, makelevel);
|
||||
p += strlen (p);
|
||||
|
||||
va_start (args, fmt);
|
||||
vsprintf (p, fmt, args);
|
||||
va_end (args);
|
||||
|
||||
strcat (p, stop);
|
||||
|
||||
assert (fmtbuf.buffer[len-1] == '\0');
|
||||
outputs (1, fmtbuf.buffer);
|
||||
|
||||
die (MAKE_FAILURE);
|
||||
}
|
||||
|
||||
/* Print an error message from errno. */
|
||||
|
||||
void
|
||||
perror_with_name (const char *str, const char *name)
|
||||
{
|
||||
const char *err = strerror (errno);
|
||||
OSSS (error, NILF, _("%s%s: %s"), str, name, err);
|
||||
}
|
||||
|
||||
/* Print an error message from errno and exit. */
|
||||
|
||||
void
|
||||
pfatal_with_name (const char *name)
|
||||
{
|
||||
const char *err = strerror (errno);
|
||||
OSS (fatal, NILF, _("%s: %s"), name, err);
|
||||
|
||||
/* NOTREACHED */
|
||||
}
|
||||
51
output.h
Normal file
51
output.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Output to stdout / stderr for GNU make
|
||||
Copyright (C) 2013-2014 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/>. */
|
||||
|
||||
struct output
|
||||
{
|
||||
int out;
|
||||
int err;
|
||||
unsigned int syncout:1; /* True if we want to synchronize output. */
|
||||
};
|
||||
|
||||
extern struct output *output_context;
|
||||
extern unsigned int stdio_traced;
|
||||
|
||||
#define OUTPUT_SET(_new) do{ output_context = (_new)->syncout ? (_new) : NULL; }while(0)
|
||||
#define OUTPUT_UNSET() do{ output_context = NULL; }while(0)
|
||||
|
||||
#define OUTPUT_TRACED() do{ stdio_traced = 1; }while(0)
|
||||
#define OUTPUT_IS_TRACED() (!!stdio_traced)
|
||||
|
||||
FILE *output_tmpfile (char **, const char *);
|
||||
|
||||
/* Initialize and close a child output structure: if NULL do this program's
|
||||
output (this should only be done once). */
|
||||
void output_init (struct output *out);
|
||||
void output_close (struct output *out);
|
||||
|
||||
/* In situations where output may be about to be displayed but we're not
|
||||
sure if we've set it up yet, call this. */
|
||||
void output_start (void);
|
||||
|
||||
/* Show a message on stdout or stderr. Will start the output if needed. */
|
||||
void outputs (int is_err, const char *msg);
|
||||
|
||||
#ifndef NO_OUTPUT_SYNC
|
||||
int output_tmpfd (void);
|
||||
/* Dump any child output content to stdout, and reset it. */
|
||||
void output_dump (struct output *out);
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user