mirror of
https://github.com/mirror/make.git
synced 2026-09-02 04:38:12 +08:00
Compare commits
683 Commits
3.75
...
moved-to-g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85f9f6985d | ||
|
|
0d12b1a207 | ||
|
|
299f5faf93 | ||
|
|
0d5d963bcf | ||
|
|
715927552f | ||
|
|
7670c84f77 | ||
|
|
2efd6b47bf | ||
|
|
ca8885d5be | ||
|
|
3a285e342e | ||
|
|
f263ff4ce9 | ||
|
|
fbe5b2c9cd | ||
|
|
a94b0b0ea5 | ||
|
|
b9c4a38022 | ||
|
|
90ee335724 | ||
|
|
7d3743dfdc | ||
|
|
a839588fc9 | ||
|
|
8a0d46468a | ||
|
|
bc578b6c8e | ||
|
|
1820908804 | ||
|
|
145661a541 | ||
|
|
a95dc485fa | ||
|
|
30b2e4207d | ||
|
|
7f5309ebb4 | ||
|
|
6cb5be7813 | ||
|
|
adb50bd4c9 | ||
|
|
cf1c79c9a3 | ||
|
|
76827d7c10 | ||
|
|
eb632d7676 | ||
|
|
fdb5fcc28d | ||
|
|
23c2b99e9d | ||
|
|
405c89ba1e | ||
|
|
a77c5c0910 | ||
|
|
88f1bc8b55 | ||
|
|
6405534814 | ||
|
|
c0751bd3fc | ||
|
|
1befa76448 | ||
|
|
e3b394f3f0 | ||
|
|
ef6461611b | ||
|
|
fca11f6039 | ||
|
|
d6e1c6e6c5 | ||
|
|
aa07c06387 | ||
|
|
dc25e84754 | ||
|
|
666ad44568 | ||
|
|
dddd1be5ec | ||
|
|
eb4f966971 | ||
|
|
715a11735f | ||
|
|
89f7058b99 | ||
|
|
9fb4cdeedb | ||
|
|
0bdc191501 | ||
|
|
49cc211819 | ||
|
|
4e2e5eb199 | ||
|
|
3f6bb04e75 | ||
|
|
c992c4d80f | ||
|
|
3057357c0a | ||
|
|
cb0bedc3d0 | ||
|
|
dc2a6ceb81 | ||
|
|
4f47fbf953 | ||
|
|
9fcd90e36c | ||
|
|
83ce81fcaa | ||
|
|
63888b91f6 | ||
|
|
934f51d166 | ||
|
|
bfc3e1ca7c | ||
|
|
c7d07fd0b5 | ||
|
|
d472624f33 | ||
|
|
0369a93825 | ||
|
|
ef2b0425e7 | ||
|
|
a5c774a51b | ||
|
|
9a9f83e8b5 | ||
|
|
e4d5d43424 | ||
|
|
b06b8c64a2 | ||
|
|
f15efca811 | ||
|
|
b664d3a91d | ||
|
|
b5c065418f | ||
|
|
bd6f63e563 | ||
|
|
6979e7e43b | ||
|
|
dc90160079 | ||
|
|
a81ee5209b | ||
|
|
15a79d723d | ||
|
|
b34438bee8 | ||
|
|
1454a04f81 | ||
|
|
ae2ab76fac | ||
|
|
391456aad7 | ||
|
|
a86d1693ba | ||
|
|
3b1432d86a | ||
|
|
c3188c6f31 | ||
|
|
5acda13ace | ||
|
|
036760a9fd | ||
|
|
91be515567 | ||
|
|
b6b6875986 | ||
|
|
8f029808af | ||
|
|
95f1a32d27 | ||
|
|
59691939f9 | ||
|
|
e954532d48 | ||
|
|
f5d7411c49 | ||
|
|
fba20a776d | ||
|
|
df2fa7c5a5 | ||
|
|
9903cda2a7 | ||
|
|
ded9121846 | ||
|
|
02ff72c970 | ||
|
|
90b30b6e0e | ||
|
|
96c0761689 | ||
|
|
bbe7b86718 | ||
|
|
7ba7dbca47 | ||
|
|
b85b7e0a55 | ||
|
|
587588c1fa | ||
|
|
94bda718c4 | ||
|
|
4e4d8f246f | ||
|
|
8a0f9d7b42 | ||
|
|
c7b469f0f3 | ||
|
|
c78b7265bd | ||
|
|
fc644b4c45 | ||
|
|
97f106fa10 | ||
|
|
7746a1f74f | ||
|
|
c0239cdbfa | ||
|
|
866aa6267a | ||
|
|
b4cec7790f | ||
|
|
deace771d6 | ||
|
|
f4d9937274 | ||
|
|
b6f45ddc53 | ||
|
|
fe43fa9de3 | ||
|
|
5f188b39a4 | ||
|
|
76d2d2ca41 | ||
|
|
4e51b6d9a4 | ||
|
|
606cf9b169 | ||
|
|
131f115730 | ||
|
|
b1d34394a8 | ||
|
|
baee33eb0f | ||
|
|
bd2d124f27 | ||
|
|
4254e88cfa | ||
|
|
174e910a1d | ||
|
|
acbdc33e1c | ||
|
|
f87715a62c | ||
|
|
56653d8524 | ||
|
|
f907a4d90c | ||
|
|
f5891a26d8 | ||
|
|
f9c15cac35 | ||
|
|
bf1794767e | ||
|
|
5d19c91605 | ||
|
|
8688ef20cf | ||
|
|
44ac2cdb4d | ||
|
|
48045f99e5 | ||
|
|
5973926ce6 | ||
|
|
d65b267e4a | ||
|
|
0afbbf8595 | ||
|
|
3cc351decd | ||
|
|
8f30b68871 | ||
|
|
5abe477620 | ||
|
|
295a05fbd6 | ||
|
|
958ea92eb8 | ||
|
|
70c726c875 | ||
|
|
7deb42aafd | ||
|
|
e2f16fdf45 | ||
|
|
139c28ae69 | ||
|
|
e8fd23cc83 | ||
|
|
1471af2de2 | ||
|
|
56f70324e8 | ||
|
|
be6b22a283 | ||
|
|
dceb954f9c | ||
|
|
38b23bc3f0 | ||
|
|
bf9822658f | ||
|
|
c8840352ac | ||
|
|
d4ee001292 | ||
|
|
a72bff7cb3 | ||
|
|
0b30c8d9ce | ||
|
|
668af46980 | ||
|
|
b9f831b858 | ||
|
|
71385e1225 | ||
|
|
81f3e4babd | ||
|
|
5b4d419476 | ||
|
|
7b16a8e3ca | ||
|
|
14f3f501bc | ||
|
|
3fd62c76c2 | ||
|
|
27ef86f6b1 | ||
|
|
656b15a404 | ||
|
|
f8f3b9005b | ||
|
|
4c995f262a | ||
|
|
c7f2c384ee | ||
|
|
ed4a06e6de | ||
|
|
b50116c4ae | ||
|
|
b23b0c3552 | ||
|
|
bb7cb05da5 | ||
|
|
8d5b3d4298 | ||
|
|
2750526aa5 | ||
|
|
84e9bcd65e | ||
|
|
91b016c414 | ||
|
|
be883de241 | ||
|
|
c233a70323 | ||
|
|
8025f93312 | ||
|
|
43d81ff866 | ||
|
|
c1f71b0336 | ||
|
|
0b17d143ba | ||
|
|
2a23064da5 | ||
|
|
e54dfb4284 | ||
|
|
19b6504f8a | ||
|
|
bb4d040fad | ||
|
|
891ebd4d97 | ||
|
|
a940199072 | ||
|
|
eda0e24ccd | ||
|
|
52ebc531ce | ||
|
|
891409f212 | ||
|
|
6ccf33cdbd | ||
|
|
e4da308580 | ||
|
|
7595f38f62 | ||
|
|
c25294ad3b | ||
|
|
f222b19158 | ||
|
|
776d8b7bc2 | ||
|
|
a8f101d0bc | ||
|
|
367a49591e | ||
|
|
94aead216e | ||
|
|
24aac7f8f6 | ||
|
|
29e539bad0 | ||
|
|
22886f8a74 | ||
|
|
50eb3cf5e5 | ||
|
|
6d8d9b74d9 | ||
|
|
afc4906aca | ||
|
|
8af9389f87 | ||
|
|
08bfd86103 | ||
|
|
6e0527913c | ||
|
|
bde826b18a | ||
|
|
0806a403d6 | ||
|
|
86af3872a9 | ||
|
|
df267b31c5 | ||
|
|
a6bdc58385 | ||
|
|
24338ec929 | ||
|
|
586daef9bc | ||
|
|
5a7a42cfce | ||
|
|
d0c4e92f11 | ||
|
|
ce9c63b32b | ||
|
|
a4e3523fe4 | ||
|
|
7a8549f5dd | ||
|
|
4cd3539024 | ||
|
|
64e16d6c00 | ||
|
|
3d0d9e5d75 | ||
|
|
4bd6db9df1 | ||
|
|
3bcb608bda | ||
|
|
0e6c4f5b0e | ||
|
|
a34b85490d | ||
|
|
1fd3f9d79c | ||
|
|
3dd1faa5c8 | ||
|
|
82103b1a49 | ||
|
|
11095a90f1 | ||
|
|
66459baee2 | ||
|
|
5ee856d96d | ||
|
|
0ffd22cb44 | ||
|
|
f7598efb67 | ||
|
|
6636dc1d5c | ||
|
|
bf58e35105 | ||
|
|
e437226241 | ||
|
|
b237dff775 | ||
|
|
a53903e4c3 | ||
|
|
1e9dc3ce45 | ||
|
|
0e30f46a62 | ||
|
|
7dfa2461c3 | ||
|
|
261d7b44fa | ||
|
|
b581e1350f | ||
|
|
a36cfed31a | ||
|
|
da1b137e38 | ||
|
|
d6a7894d3a | ||
|
|
f388233b03 | ||
|
|
6cdaff0948 | ||
|
|
1dd9ed1c05 | ||
|
|
978819e1d6 | ||
|
|
467115baae | ||
|
|
974d14ac4f | ||
|
|
dd30b0552f | ||
|
|
af88a3550a | ||
|
|
e50e0fdf88 | ||
|
|
26d8d00cb7 | ||
|
|
e4c14a675c | ||
|
|
9d5b5bd2f5 | ||
|
|
49ee105c68 | ||
|
|
3daf8df6ee | ||
|
|
4923580e3a | ||
|
|
d584d0c1c6 | ||
|
|
18251c4633 | ||
|
|
2860d3b247 | ||
|
|
28078b517a | ||
|
|
cb2f200269 | ||
|
|
0759af440a | ||
|
|
a2232470c2 | ||
|
|
d2516343bc | ||
|
|
93bd1bd93c | ||
|
|
659fc6b55e | ||
|
|
9d153cc1b1 | ||
|
|
6d995b036e | ||
|
|
e8ca9b8eb1 | ||
|
|
c90f47e832 | ||
|
|
939167cfc1 | ||
|
|
1ce563a181 | ||
|
|
dff0be9e68 | ||
|
|
6c21790595 | ||
|
|
6c9e53d648 | ||
|
|
49ca261bd5 | ||
|
|
be6a8bc869 | ||
|
|
539f513773 | ||
|
|
d27cac1598 | ||
|
|
e8e4c19873 | ||
|
|
547abfa13e | ||
|
|
71fd6bfa1c | ||
|
|
b0d67e0e15 | ||
|
|
fb6410f435 | ||
|
|
341312cc57 | ||
|
|
29d78ddb28 | ||
|
|
73e7767ffc | ||
|
|
6e51d9c90a | ||
|
|
704c60cec0 | ||
|
|
9714e501fb | ||
|
|
0799ce730d | ||
|
|
08c8105c54 | ||
|
|
e334942e57 | ||
|
|
f305a52c02 | ||
|
|
213ccc2234 | ||
|
|
e3e3f15ebc | ||
|
|
59306b0223 | ||
|
|
be5b33e876 | ||
|
|
f29b86c314 | ||
|
|
be8c3dbc97 | ||
|
|
fafeb87027 | ||
|
|
1f16ee5c2d | ||
|
|
2b3ee46f4e | ||
|
|
a35db90275 | ||
|
|
ee3d37a591 | ||
|
|
76f034acaa | ||
|
|
74216b00a4 | ||
|
|
db401d8e0a | ||
|
|
e3986eea43 | ||
|
|
1a5beef51f | ||
|
|
652234e967 | ||
|
|
acb2e64966 | ||
|
|
276d0c7c64 | ||
|
|
955899ef77 | ||
|
|
4068c5e4a3 | ||
|
|
1fa3db1468 | ||
|
|
b7c728046e | ||
|
|
d33ff30145 | ||
|
|
d15a484098 | ||
|
|
dd70c67ea4 | ||
|
|
b04a205f3e | ||
|
|
d696707cb5 | ||
|
|
bd108cf45c | ||
|
|
6374309c6d | ||
|
|
8bbdbb02b3 | ||
|
|
47cd8d4624 | ||
|
|
d1d9c0274b | ||
|
|
ee9584dc8d | ||
|
|
9dc79463a9 | ||
|
|
1d3dfeb74b | ||
|
|
2de1b62112 | ||
|
|
ae003efd61 | ||
|
|
ebd05dbeb3 | ||
|
|
76652d5d02 | ||
|
|
dac7b49de4 | ||
|
|
d7ebcadadb | ||
|
|
4a11acf047 | ||
|
|
5df75e7265 | ||
|
|
bc91c0b23f | ||
|
|
5297a83b27 | ||
|
|
7ea029a07c | ||
|
|
9b41488ad1 | ||
|
|
988deb489b | ||
|
|
d2429d7508 | ||
|
|
299c72e6ed | ||
|
|
ee3a4f9dd6 | ||
|
|
f2ceb0d68a | ||
|
|
bccb277dda | ||
|
|
a56563badd | ||
|
|
21cf8c6444 | ||
|
|
4d72c4c11e | ||
|
|
6c9a393f95 | ||
|
|
724925be2b | ||
|
|
2f20fc1cc7 | ||
|
|
8572d6adf0 | ||
|
|
4a07398023 | ||
|
|
99e01f61fd | ||
|
|
9052b52dfc | ||
|
|
5dedf7be63 | ||
|
|
2276c37ae7 | ||
|
|
306462f0bd | ||
|
|
3a8a7a5d00 | ||
|
|
7ed1a08985 | ||
|
|
cae1db6ecd | ||
|
|
dad29566b3 | ||
|
|
d242ee9053 | ||
|
|
1d9d40a209 | ||
|
|
c0312423d9 | ||
|
|
9302338304 | ||
|
|
74f08c639d | ||
|
|
635a784ebf | ||
|
|
4c28600a50 | ||
|
|
ce2c6eadf1 | ||
|
|
5d582d4ba0 | ||
|
|
8f2b1e2c7c | ||
|
|
e5324a8c6a | ||
|
|
d5a04ee984 | ||
|
|
50ba270762 | ||
|
|
8ddf04c627 | ||
|
|
1a82956eae | ||
|
|
3c132f10f3 | ||
|
|
88187d9f4b | ||
|
|
775b644765 | ||
|
|
fcbfe98cbe | ||
|
|
cbe92a2241 | ||
|
|
d5f7eb2897 | ||
|
|
3e6f48b444 | ||
|
|
0d70d05458 | ||
|
|
f04e78f11b | ||
|
|
c392c19335 | ||
|
|
4972b017b6 | ||
|
|
4a5550c822 | ||
|
|
e5c40f6e5a | ||
|
|
5ed9fb46b2 | ||
|
|
f9c91ec34d | ||
|
|
f3a974bf32 | ||
|
|
c67266ceac | ||
|
|
4145bcbcda | ||
|
|
c637af71d9 | ||
|
|
a81013175c | ||
|
|
75f879f37f | ||
|
|
e68a27ec7b | ||
|
|
17f2dda0ac | ||
|
|
90f23f1ea6 | ||
|
|
9b0a3d91ea | ||
|
|
95a09e94f7 | ||
|
|
de2a8fc730 | ||
|
|
447c76f601 | ||
|
|
24aec1878b | ||
|
|
2fd5b943d1 | ||
|
|
74fca88bf3 | ||
|
|
5577cdc261 | ||
|
|
b7b83d6398 | ||
|
|
af44f16799 | ||
|
|
1a35bfb45b | ||
|
|
4d5c556f00 | ||
|
|
ce3413f883 | ||
|
|
217ca5d910 | ||
|
|
ebb733c0f9 | ||
|
|
3e26bde6db | ||
|
|
c71200d022 | ||
|
|
281951154b | ||
|
|
829f4fd04b | ||
|
|
f26e413b12 | ||
|
|
dbb8f3e30b | ||
|
|
c828aeaa98 | ||
|
|
3c83c469e4 | ||
|
|
a63f51340b | ||
|
|
45e04a5860 | ||
|
|
6ec7d1881c | ||
|
|
c800367385 | ||
|
|
0d366b6682 | ||
|
|
4121dea6a5 | ||
|
|
b88c1d3a3d | ||
|
|
373dbb43da | ||
|
|
5e9a3e34ac | ||
|
|
860a30ae1e | ||
|
|
e49b2f15c9 | ||
|
|
10fee1c03c | ||
|
|
82f0c5495a | ||
|
|
bf7cc546dd | ||
|
|
27255c5b51 | ||
|
|
b134da5505 | ||
|
|
d0b03e9355 | ||
|
|
5dc4b92b60 | ||
|
|
b3fa4b3c7e | ||
|
|
6fa76a7d15 | ||
|
|
4ff6c62456 | ||
|
|
cbb9e38d10 | ||
|
|
9e79637ec3 | ||
|
|
e34540f79b | ||
|
|
09f1e4cf83 | ||
|
|
28ef4c4dac | ||
|
|
3a945a665e | ||
|
|
6dbd348522 | ||
|
|
a9166bb7bc | ||
|
|
4e7ee4fc01 | ||
|
|
b05cb1d99e | ||
|
|
c8a60e7431 | ||
|
|
6d2984e0b2 | ||
|
|
ec50fe2a2b | ||
|
|
c69d4c95bf | ||
|
|
588da9812e | ||
|
|
73846549f6 | ||
|
|
169e6b8c3d | ||
|
|
826ab14b26 | ||
|
|
a3cf773e29 | ||
|
|
9d89ad56bf | ||
|
|
adb1632033 | ||
|
|
8df9d54020 | ||
|
|
9035aa27b7 | ||
|
|
e1d72ad3f1 | ||
|
|
012254e81e | ||
|
|
2858f7a8f1 | ||
|
|
187787286d | ||
|
|
fc0fe4103a | ||
|
|
7f3ffd4019 | ||
|
|
a2ea1bd27f | ||
|
|
3d1cdf4106 | ||
|
|
7052a57152 | ||
|
|
47922a5a65 | ||
|
|
e005a48b9f | ||
|
|
0798a61169 | ||
|
|
ecb3bca9f5 | ||
|
|
c4353af3f9 | ||
|
|
8363e0496d | ||
|
|
4025030d96 | ||
|
|
1e0513335f | ||
|
|
e3d0d562da | ||
|
|
db865774df | ||
|
|
a6a9ebb54f | ||
|
|
9e6ba6a148 | ||
|
|
ede263043c | ||
|
|
a8f7173799 | ||
|
|
a66668aabc | ||
|
|
84f38c9c6f | ||
|
|
5808507144 | ||
|
|
e3ef8e974c | ||
|
|
281cdd5d74 | ||
|
|
3634e15fe3 | ||
|
|
9c95acec4b | ||
|
|
8b55cda094 | ||
|
|
9d9111c450 | ||
|
|
0f686c1e6b | ||
|
|
6eeae809a8 | ||
|
|
5b16b3c015 | ||
|
|
c0ec561e37 | ||
|
|
71aacd9fe0 | ||
|
|
dc7cf1c4b2 | ||
|
|
7f83bfe911 | ||
|
|
45406fc744 | ||
|
|
76468fbaa1 | ||
|
|
2116c80dc7 | ||
|
|
28eecbb94f | ||
|
|
9ad3cb03b7 | ||
|
|
0be25c6986 | ||
|
|
4dfe38353e | ||
|
|
3948640154 | ||
|
|
2c64fb221a | ||
|
|
e90887e68a | ||
|
|
321b447568 | ||
|
|
b5722838c2 | ||
|
|
7a43e6cd30 | ||
|
|
84d159bb64 | ||
|
|
050f9d9f5d | ||
|
|
50b5c15b54 | ||
|
|
fc6cca1c7c | ||
|
|
5d1d6aa6de | ||
|
|
e2403327e9 | ||
|
|
65a7296e2c | ||
|
|
99454e6a1e | ||
|
|
411a01acce | ||
|
|
33654a7af4 | ||
|
|
fa1ec9e1f3 | ||
|
|
fefeb0f7bd | ||
|
|
6cca2382f0 | ||
|
|
44309109fe | ||
|
|
d153373039 | ||
|
|
ccac245bf5 | ||
|
|
f106953139 | ||
|
|
54727192c0 | ||
|
|
20258f42d4 | ||
|
|
4f79de612b | ||
|
|
ea9504a609 | ||
|
|
511cb55530 | ||
|
|
65d7b12aeb | ||
|
|
2968844002 | ||
|
|
a709205e81 | ||
|
|
9391fb8e4c | ||
|
|
4950159344 | ||
|
|
91da8b09df | ||
|
|
e3e88767f1 | ||
|
|
76ae1bc064 | ||
|
|
e24c9e161a | ||
|
|
f0a7421adc | ||
|
|
8204f56f2f | ||
|
|
e97f8e6f57 | ||
|
|
20b68e968a | ||
|
|
9d31f1e1f1 | ||
|
|
2fcce1d3b0 | ||
|
|
1290679bc3 | ||
|
|
dc70a3bc0b | ||
|
|
aa9ec7c2c7 | ||
|
|
04c488df1c | ||
|
|
8de0e41662 | ||
|
|
e94d73997a | ||
|
|
7585dedefc | ||
|
|
57ba55d08c | ||
|
|
886748c02d | ||
|
|
d378e4204d | ||
|
|
e7e9b799c4 | ||
|
|
a3a7581c1a | ||
|
|
3e12cad198 | ||
|
|
e2ffc653aa | ||
|
|
4e58a6ca4c | ||
|
|
41dcca8426 | ||
|
|
161a026602 | ||
|
|
e244062995 | ||
|
|
24fec5cb53 | ||
|
|
b903988475 | ||
|
|
6ea87be73b | ||
|
|
f6490d62cf | ||
|
|
480ad62713 | ||
|
|
acd666ce50 | ||
|
|
be3fb0ae6d | ||
|
|
dd0c939e78 | ||
|
|
fff468765c | ||
|
|
63dff1e0bc | ||
|
|
e746a9c951 | ||
|
|
74d4418f1c | ||
|
|
062e5f6aae | ||
|
|
c495345f7c | ||
|
|
f0239bb0af | ||
|
|
2d29a55137 | ||
|
|
806c7aa46c | ||
|
|
47daa6787e | ||
|
|
eb4d510a74 | ||
|
|
c86587fb9b | ||
|
|
fd688f6e9c | ||
|
|
f96ef9a409 | ||
|
|
09616e5837 | ||
|
|
cf9aa5b70b | ||
|
|
9033f1a656 | ||
|
|
ccfe89b829 | ||
|
|
35f1bbbe23 | ||
|
|
9f88582943 | ||
|
|
b38d9d2ae9 | ||
|
|
132e0eda6c | ||
|
|
c297b2fbd5 | ||
|
|
ec08feae97 | ||
|
|
8c7887ac02 | ||
|
|
08cf536bfb | ||
|
|
b48b02c7f4 | ||
|
|
e7a0e14a43 | ||
|
|
6413a1d08e | ||
|
|
8f34c48e3f | ||
|
|
818bb8940c | ||
|
|
cc4d91d751 | ||
|
|
36d804bd51 | ||
|
|
f95d071efc | ||
|
|
c0deecf9ee | ||
|
|
dd63648825 | ||
|
|
229ba33d0e | ||
|
|
ccbe33db90 | ||
|
|
32efbf8dc3 | ||
|
|
6e3b0629f1 | ||
|
|
51659ed000 | ||
|
|
7827f1bde8 | ||
|
|
922730c406 | ||
|
|
5e91041347 | ||
|
|
9f7ba4a505 | ||
|
|
2745ed943b | ||
|
|
0cb72b4a51 | ||
|
|
73fcfdbe24 | ||
|
|
0ada207e2d | ||
|
|
7bb7ba7849 | ||
|
|
2a294c52d1 | ||
|
|
71515366cd | ||
|
|
d78f2db327 | ||
|
|
30c9fcfec3 | ||
|
|
e2b79aacf7 | ||
|
|
e981c049f4 | ||
|
|
9012013552 | ||
|
|
cda4f25fd4 | ||
|
|
b32b9197ab | ||
|
|
b66145d8bc | ||
|
|
d2fe84cab3 | ||
|
|
c2ea8e2486 | ||
|
|
db2384b9ab | ||
|
|
9b0b3a6e70 | ||
|
|
a71d56b4cc | ||
|
|
10011ce289 | ||
|
|
84a9fd68b7 | ||
|
|
262ca66cb7 | ||
|
|
a1eb3e67cd | ||
|
|
78a4848b83 | ||
|
|
b16829dc46 | ||
|
|
c71e4ac269 | ||
|
|
82e6316607 | ||
|
|
a8de4b93e3 | ||
|
|
6e7fa14c65 | ||
|
|
5206d3f2bc | ||
|
|
e2da48ca55 | ||
|
|
bc26243d90 | ||
|
|
b4db97478e | ||
|
|
4e361d0f01 |
22
.cvsignore
22
.cvsignore
@@ -1,17 +1,37 @@
|
|||||||
*.gz *.Z *.tar *.tgz
|
*.gz *.Z *.tar *.tgz
|
||||||
=*
|
=*
|
||||||
TODO COPYING*
|
TODO COPYING* ABOUT-NLS
|
||||||
make-3* make-test*
|
make-3* make-test*
|
||||||
*.info *.info-*
|
*.info *.info-*
|
||||||
stamp-*
|
stamp-*
|
||||||
makebook*
|
makebook*
|
||||||
|
|
||||||
.*gdbinit
|
.*gdbinit
|
||||||
|
.gdb_history
|
||||||
|
|
||||||
*.dep *.dvi *.toc *.aux *.log
|
*.dep *.dvi *.toc *.aux *.log
|
||||||
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
|
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
|
||||||
|
|
||||||
|
README README.DOS README.W32 README.OS2
|
||||||
|
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
|
||||||
|
|
||||||
|
gmk-default.h
|
||||||
|
|
||||||
|
.deps .dep_segment ID TAGS
|
||||||
|
|
||||||
|
_*
|
||||||
sun4 i386 i386-netbsd hp300-netbsd hp300 rs6000 sun3 news800 amiga
|
sun4 i386 i386-netbsd hp300-netbsd hp300 rs6000 sun3 news800 amiga
|
||||||
hp700 hp834 mips sol2 i486-linux
|
hp700 hp834 mips sol2 i486-linux
|
||||||
|
|
||||||
customs
|
customs
|
||||||
|
|
||||||
|
install-sh mkinstalldirs
|
||||||
|
|
||||||
|
.directive.asc
|
||||||
|
|||||||
12
.purify
Normal file
12
.purify
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Solaris (2.5.1) has a couple if issues.
|
||||||
|
#
|
||||||
|
suppress plk malloc; setvbuf "libc*"; main "main.c"
|
||||||
|
suppress umr kstat_read; kstat_chain_update; kstat_open; getloadavg
|
||||||
|
suppress umr kstat_chain_update; kstat_open; getloadavg
|
||||||
|
|
||||||
|
# The command line options stuff leaks a little bit. No big deal.
|
||||||
|
#
|
||||||
|
suppress mlk malloc; xmalloc "misc.c"; decode_env_switches "main.c"
|
||||||
|
suppress plk malloc; xmalloc "misc.c"; decode_env_switches "main.c"
|
||||||
|
suppress mlk malloc; xmalloc "misc.c"; concat "misc.c"; decode_env_switches "main.c"
|
||||||
|
suppress plk malloc; xmalloc "misc.c"; concat "misc.c"; decode_env_switches "main.c"
|
||||||
85
AUTHORS
Normal file
85
AUTHORS
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
GNU make development up to version 3.75 by:
|
||||||
|
Roland McGrath <roland@gnu.org>
|
||||||
|
|
||||||
|
|
||||||
|
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:
|
||||||
|
Richard M. Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
Edited by:
|
||||||
|
Roland McGrath <roland@gnu.org>
|
||||||
|
Bob Chassell <bob@gnu.org>
|
||||||
|
Melissa Weisshaus <melissa@gnu.org>
|
||||||
|
Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
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>
|
||||||
|
|
||||||
|
Port to Amiga by:
|
||||||
|
Aaron Digulla <digulla@fh-konstanz.de>
|
||||||
|
|
||||||
|
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>
|
||||||
|
Jonathan Grant <jg@jguk.org>
|
||||||
|
Andreas Beuning <andreas.buening@nexgo.de>
|
||||||
|
Earnie Boyd <earnie@uses.sf.net>
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
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>
|
||||||
|
|
||||||
|
With suggestions/comments/bug reports from a cast of ... well ...
|
||||||
|
hundreds, anyway :)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1997-2012 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/>.
|
||||||
843
COPYING
843
COPYING
@@ -1,285 +1,626 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
675 Mass Ave, Cambridge, MA 02139, USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The GNU General Public License is a free, copyleft license for
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
software and other kinds of works.
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
The licenses for most software and other practical works are designed
|
||||||
General Public License applies to most of the Free Software
|
to take away your freedom to share and change the works. By contrast,
|
||||||
Foundation's software and to any other program whose authors commit to
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
share and change all versions of a program--to make sure it remains free
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
have the freedom to distribute copies of free software (and charge for
|
have the freedom to distribute copies of free software (and charge for
|
||||||
this service if you wish), that you receive source code or can get it
|
them if you wish), that you receive source code or can get it if you
|
||||||
if you want it, that you can change the software or use pieces of it
|
want it, that you can change the software or use pieces of it in new
|
||||||
in new free programs; and that you know you can do these things.
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
To protect your rights, we need to prevent others from denying you
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
These restrictions translate to certain responsibilities for you if you
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
distribute copies of the software, or if you modify it.
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
For example, if you distribute copies of such a program, whether
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
you have. You must make sure that they, too, receive or can get the
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
source code. And you must show them these terms so they know their
|
or can get the source code. And you must show them these terms so they
|
||||||
rights.
|
know their rights.
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
distribute and/or modify the software.
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
that everyone understands that there is no warranty for this free
|
that there is no warranty for this free software. For both users' and
|
||||||
software. If the software is modified by someone else and passed on, we
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
want its recipients to know that what they have is not the original, so
|
changed, so that their problems will not be attributed erroneously to
|
||||||
that any problems introduced by others will not reflect on the original
|
authors of previous versions.
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
Some devices are designed to deny users access to install or run
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
modified versions of the software inside them, although the manufacturer
|
||||||
program will individually obtain patent licenses, in effect making the
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
protecting users' freedom to change the software. The systematic
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
TERMS AND CONDITIONS
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
0. Definitions.
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
of it, thus forming a work based on the Program, and copy and
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
distribute such modifications or work under the terms of Section 1
|
"recipients" may be individuals or organizations.
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
stating that you changed the files and the date of any change.
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
A "covered work" means either the unmodified Program or a work based
|
||||||
whole or in part contains or is derived from the Program or any
|
on the Program.
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
To "propagate" a work means to do anything with it that, without
|
||||||
when run, you must cause it, when started running for such
|
permission, would make you directly or secondarily liable for
|
||||||
interactive use in the most ordinary way, to print or display an
|
infringement under applicable copyright law, except executing it on a
|
||||||
announcement including an appropriate copyright notice and a
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
notice that there is no warranty (or else, saying that you provide
|
distribution (with or without modification), making available to the
|
||||||
a warranty) and that users may redistribute the program under
|
public, and in some countries other activities as well.
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
To "convey" a work means any kind of propagation that enables other
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
exercise the right to control the distribution of derivative or
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
to the extent that it includes a convenient and prominently visible
|
||||||
a storage or distribution medium does not bring the other work under
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
the scope of this License.
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
1. Source Code.
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
The "source code" for a work means the preferred form of the work
|
||||||
source code, which must be distributed under the terms of Sections
|
for making modifications to it. "Object code" means any non-source
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
form of a work.
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
A "Standard Interface" means an interface that either is an official
|
||||||
years, to give any third party, for a charge no more than your
|
standard defined by a recognized standards body, or, in the case of
|
||||||
cost of physically performing source distribution, a complete
|
interfaces specified for a particular programming language, one that
|
||||||
machine-readable copy of the corresponding source code, to be
|
is widely used among developers working in that language.
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
The "System Libraries" of an executable work include anything, other
|
||||||
to distribute corresponding source code. (This alternative is
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
allowed only for noncommercial distribution and only if you
|
packaging a Major Component, but which is not part of that Major
|
||||||
received the program in object code or executable form with such
|
Component, and (b) serves only to enable use of the work with that
|
||||||
an offer, in accord with Subsection b above.)
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
The "Corresponding Source" for a work in object code form means all
|
||||||
making modifications to it. For an executable work, complete source
|
the source code needed to generate, install, and (for an executable
|
||||||
code means all the source code for all modules it contains, plus any
|
work) run the object code and to modify the work, including scripts to
|
||||||
associated interface definition files, plus the scripts used to
|
control those activities. However, it does not include the work's
|
||||||
control compilation and installation of the executable. However, as a
|
System Libraries, or general-purpose tools or generally available free
|
||||||
special exception, the source code distributed need not include
|
programs which are used unmodified in performing those activities but
|
||||||
anything that is normally distributed (in either source or binary
|
which are not part of the work. For example, Corresponding Source
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
includes interface definition files associated with source files for
|
||||||
operating system on which the executable runs, unless that component
|
the work, and the source code for shared libraries and dynamically
|
||||||
itself accompanies the executable.
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
The Corresponding Source need not include anything that users
|
||||||
access to copy from a designated place, then offering equivalent
|
can regenerate automatically from other parts of the Corresponding
|
||||||
access to copy the source code from the same place counts as
|
Source.
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
The Corresponding Source for a work in source code form is that
|
||||||
signed it. However, nothing else grants you permission to modify or
|
same work.
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
2. Basic Permissions.
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
All rights granted under this License are granted for the term of
|
||||||
these terms and conditions. You may not impose any further
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
You are not responsible for enforcing compliance by third parties to
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
infringement or for any other reason (not limited to patent issues),
|
patent license under the contributor's essential patent claims, to
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
excuse you from the conditions of this License. If you cannot
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
License and any other pertinent obligations, then as a consequence you
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
may not distribute the Program at all. For example, if a patent
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
license would not permit royalty-free redistribution of the Program by
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
all those who receive copies directly or indirectly through you, then
|
the Program, the only way you could satisfy both those terms and this
|
||||||
the only way you could satisfy both it and this License would be to
|
License would be to refrain entirely from conveying the Program.
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
13. Use with the GNU Affero General Public License.
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
Notwithstanding any other provision of this License, you have
|
||||||
patents or other property right claims or to contest validity of any
|
permission to link or combine any covered work with a work licensed
|
||||||
such claims; this section has the sole purpose of protecting the
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
integrity of the free software distribution system, which is
|
combined work, and to convey the resulting work. The terms of this
|
||||||
implemented by public license practices. Many people have made
|
License will continue to apply to the part which is the covered work,
|
||||||
generous contributions to the wide range of software distributed
|
but the special requirements of the GNU Affero General Public License,
|
||||||
through that system in reliance on consistent application of that
|
section 13, concerning interaction through a network will apply to the
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
combination as such.
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
14. Revised Versions of this License.
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
of the General Public License from time to time. Such new versions will
|
the GNU General Public License from time to time. Such new versions will
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
Each version is given a distinguishing version number. If the
|
||||||
specifies a version number of this License which applies to it and "any
|
Program specifies that a certain numbered version of the GNU General
|
||||||
later version", you have the option of following the terms and conditions
|
Public License "or any later version" applies to it, you have the
|
||||||
either of that version or of any later version published by the Free
|
option of following the terms and conditions either of that numbered
|
||||||
Software Foundation. If the Program does not specify a version number of
|
version or of any later version published by the Free Software
|
||||||
this License, you may choose any version ever published by the Free Software
|
Foundation. If the Program does not specify a version number of the
|
||||||
Foundation.
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
If the Program specifies that a proxy can decide which future
|
||||||
programs whose distribution conditions are different, write to the author
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
public statement of acceptance of a version permanently authorizes you
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
to choose that version for the Program.
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
15. Disclaimer of Warranty.
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
Appendix: How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
possible use to the public, the best way to achieve this is to make it
|
possible use to the public, the best way to achieve this is to make it
|
||||||
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
|
|||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
To do so, attach the following notices to the program. It is safest
|
||||||
to attach them to the start of each source file to most effectively
|
to attach them to the start of each source file to most effectively
|
||||||
convey the exclusion of warranty; and each file should have at least
|
state the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) 19yy <name of author>
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -304,36 +645,30 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
If the program does terminal interaction, make it output a short
|
||||||
when it starts in an interactive mode:
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
<program> Copyright (C) <year> <name of author>
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
parts of the General Public License. Of course, the commands you use may
|
parts of the General Public License. Of course, your program's commands
|
||||||
be called something other than `show w' and `show c'; they could even be
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
necessary. Here is a sample; alter the names:
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
The GNU General Public License does not permit incorporating your program
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
<signature of Ty Coon>, 1 April 1989
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Ty Coon, President of Vice
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Library General
|
|
||||||
Public License instead of this License.
|
|
||||||
|
|||||||
17
ChangeLog.1
17
ChangeLog.1
@@ -4978,3 +4978,20 @@ Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
|
|||||||
* Took Make out of RCS.
|
* Took Make out of RCS.
|
||||||
|
|
||||||
* Split the monolithic `make.c' into several smaller files.
|
* Split the monolithic `make.c' into several smaller files.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 1988-2009 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
6653
ChangeLog.2
Normal file
6653
ChangeLog.2
Normal file
File diff suppressed because it is too large
Load Diff
296
GNUmakefile
296
GNUmakefile
@@ -1,296 +0,0 @@
|
|||||||
# GNU Make-specific makefile for GNU Make.
|
|
||||||
|
|
||||||
# Copyright (C) 1990, 91, 92, 93, 94, 95, 96 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
.PHONY: default
|
|
||||||
default:
|
|
||||||
|
|
||||||
# Set `ARCH' to a string for the type of machine.
|
|
||||||
ifndef ARCH
|
|
||||||
ifdef machine
|
|
||||||
ARCH = $(machine)
|
|
||||||
endif # machine
|
|
||||||
endif # not ARCH
|
|
||||||
|
|
||||||
override srcdir := .
|
|
||||||
override CC := $(CC)
|
|
||||||
|
|
||||||
ifeq ($(ARCH),hp300)
|
|
||||||
#customs=yes
|
|
||||||
endif
|
|
||||||
ifdef customs
|
|
||||||
override REMOTE := cstms
|
|
||||||
else
|
|
||||||
override REMOTE := stub
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Get most of the information from the Unix-compatible makefile.
|
|
||||||
include compatMakefile
|
|
||||||
|
|
||||||
MAKE = $(MAKE_COMMAND) $(MAKEOVERRIDES)
|
|
||||||
|
|
||||||
# Remove autoconf magic.
|
|
||||||
prefix = /usr/local
|
|
||||||
exec_prefix = $(prefix)
|
|
||||||
extras := $(filter-out getloadavg.o @%@,$(extras)) getloadavg.o
|
|
||||||
LOADLIBES := $(filter-out @%@,$(LOADLIBES))
|
|
||||||
ALLOCA := $(filter-out @%@,$(ALLOCA))
|
|
||||||
CPPFLAGS := $(filter-out @%@,$(defines) $(CPPFLAGS)) -DHAVE_CONFIG_H
|
|
||||||
|
|
||||||
ifdef AC_MACRODIR
|
|
||||||
configure config.h.in: $(patsubst %,$(AC_MACRODIR)/%.m4,acspecific acgeneral)
|
|
||||||
config.h.in: $(AC_MACRODIR)/acconfig.h
|
|
||||||
endif
|
|
||||||
configure: configure.in aclocal.m4
|
|
||||||
autoconf $(ACFLAGS)
|
|
||||||
test -d CVS && cvs commit -m'autoconf $(ACFLAGS)' $@
|
|
||||||
config.h.in: configure.in aclocal.m4
|
|
||||||
autoheader $(ACFLAGS)
|
|
||||||
test -d CVS && cvs commit -m'autoheader $(ACFLAGS)' $@
|
|
||||||
|
|
||||||
ifdef customs
|
|
||||||
defines := $(defines) -Ipmake/customs -Ipmake/lib/include
|
|
||||||
LOADLIBES := $(addprefix pmake/customs/,customslib.o rpc.o xlog.o) \
|
|
||||||
pmake/lib/sprite/libsprite.a
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef ARCH
|
|
||||||
|
|
||||||
ifndef no_libc
|
|
||||||
libc_dir = /home/gd2/gnu/libc/$(ARCH)
|
|
||||||
ifneq ($(wildcard $(libc_dir)),)
|
|
||||||
ifneq ($(wildcard $(libc_dir)/works-for-make),)
|
|
||||||
#CPPFLAGS := -I$(libc_dir)/include
|
|
||||||
#LDFLAGS := -nostdlib $(libc_dir)/lib/start.o
|
|
||||||
#LOADLIBES := $(LOADLIBES) \
|
|
||||||
# $(libc_dir)/lib/mcheck-init.o \
|
|
||||||
# $(libc_dir)/lib/libc.a \
|
|
||||||
# -lgcc \
|
|
||||||
# $(libc_dir)/lib/libc.a
|
|
||||||
CC := $(CC) -b glibc
|
|
||||||
|
|
||||||
# getopt is in libc.
|
|
||||||
GETOPT =
|
|
||||||
#GETOPT_SRC = Don't clear this or dist will break.
|
|
||||||
|
|
||||||
# glob is in libc too.
|
|
||||||
GLOB =
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
endif # works-for-make
|
|
||||||
endif # $(libc_dir)
|
|
||||||
endif # !no_libc
|
|
||||||
|
|
||||||
# We know the type of machine, so put the binaries in subdirectories.
|
|
||||||
$(ARCH)/%.o: %.c
|
|
||||||
$(COMPILE.c) -Iglob $< $(OUTPUT_OPTION)
|
|
||||||
$(ARCH)/glob/libglob.a: FORCE
|
|
||||||
$(MAKE) -C $(@D) $(@F)
|
|
||||||
FORCE:
|
|
||||||
objs := $(addprefix $(ARCH)/,$(objs))
|
|
||||||
prog := $(ARCH)/make
|
|
||||||
|
|
||||||
archpfx = $(ARCH)/
|
|
||||||
|
|
||||||
$(archpfx)load.o: load.c
|
|
||||||
$(COMPILE.c) $(LOAD_AVG) $< -o $@
|
|
||||||
$(archpfx)load.dep: load.c
|
|
||||||
$(mkdep) $(LOAD_AVG) $< | sed 's,$*\.o,& $@,' > $@
|
|
||||||
|
|
||||||
CPPFLAGS := -I$(ARCH) -Iglob -DHAVE_CONFIG_H $(filter-out @%@,$(CPPFLAGS))
|
|
||||||
|
|
||||||
ifneq "$(wildcard $(ARCH)/makefile)" ""
|
|
||||||
include $(ARCH)/makefile
|
|
||||||
endif
|
|
||||||
objs := $(objs) $(addprefix $(ARCH)/,$(ALLOCA) $(extras))
|
|
||||||
|
|
||||||
else # Not ARCH
|
|
||||||
prog := make
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq "$(findstring gcc,$(CC))" ""
|
|
||||||
CFLAGS = -g -Wall -Wtraditional -Wid-clash-31 -Wpointer-arith \
|
|
||||||
-Wbad-function-cast -Wconversion
|
|
||||||
else
|
|
||||||
CFLAGS = -g
|
|
||||||
endif
|
|
||||||
LDFLAGS = -g
|
|
||||||
|
|
||||||
# Define the command to make dependencies.
|
|
||||||
mkdep-nolib = $(CC) -MM $(CPPFLAGS)
|
|
||||||
mkdep = $(CC) -M $(CPPFLAGS)
|
|
||||||
|
|
||||||
depfiles = $(patsubst %.o,%.dep,$(filter %.o,$(objs)))
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: default
|
|
||||||
default: $(prog)
|
|
||||||
|
|
||||||
$(prog): $(objs) $(globdep) #$(addprefix $(ARCH)/,gmalloc.o mcheck.o)
|
|
||||||
$(CC) $(LDFLAGS) $^ $(globlib) $(LOADLIBES) -o $@.new
|
|
||||||
mv -f $@.new $@
|
|
||||||
|
|
||||||
libc-srcdir = ../libc
|
|
||||||
globfiles = $(addprefix glob/,COPYING.LIB configure.in configure Makefile.in \
|
|
||||||
Makefile.ami SCOPTIONS SMakefile \
|
|
||||||
configure.bat glob.c fnmatch.c glob.h fnmatch.h)
|
|
||||||
$(globfiles): stamp-glob ;
|
|
||||||
stamp-glob: $(libc-srcdir)/posix/glob.tar
|
|
||||||
-rm -f stamp-glob glob/*
|
|
||||||
tar xvf $< glob
|
|
||||||
cvs commit -m'Updated from libc' glob
|
|
||||||
touch $@
|
|
||||||
$(libc-srcdir)/posix/glob.tar: force
|
|
||||||
$(MAKE) -C $(@D) $(@F) no_deps=t
|
|
||||||
.PHONY: force
|
|
||||||
force:
|
|
||||||
|
|
||||||
# Make the Unix-compatible Makefile to be distributed by appending
|
|
||||||
# the automatically-generated dependencies to compatMakefile.
|
|
||||||
ifeq ($(mkdep),$(mkdep-nolib))
|
|
||||||
nolib-deps = $(depfiles)
|
|
||||||
else
|
|
||||||
%.dep: %.c
|
|
||||||
$(mkdep-nolib) $< | sed -e 's,$*\.o,$(@:.dep=.o) $@,' > $(@:.dep=.dtm)
|
|
||||||
mv -f $(@:.dep=.dtm) $@
|
|
||||||
nolib-deps = $(patsubst $(archpfx)%,%,$(depfiles))
|
|
||||||
endif
|
|
||||||
# The distributed Makefile.in should contain deps for remote-stub only.
|
|
||||||
Makefile.in: compatMakefile $(nolib-deps:remote-%.dep=remote-stub.dep)
|
|
||||||
(sed 's/^MAKE[ ]*=.*$$/@SET_MAKE@/' $<; \
|
|
||||||
echo '# Automatically generated dependencies.'; \
|
|
||||||
sed -e 's/ [^ ]*\.dep//' -e 's=$(archpfx)==' $(filter-out $<,$^) \
|
|
||||||
) > $@
|
|
||||||
cvs commit -mRegenerated $@
|
|
||||||
|
|
||||||
.SUFFIXES: .dep
|
|
||||||
# Maintain the automatically-generated dependencies.
|
|
||||||
ifndef no_deps
|
|
||||||
-include $(depfiles)
|
|
||||||
endif
|
|
||||||
$(archpfx)%.dep: %.c
|
|
||||||
$(mkdep) $< | sed 's,$*\.o,$(@:.dep=.o) $@,' > $@
|
|
||||||
|
|
||||||
ETAGS = etags -T # for v19 etags
|
|
||||||
|
|
||||||
# Run the tests.
|
|
||||||
.PHONY: tests
|
|
||||||
testdir := $(shell ls -d1 make-test-?.? | sort -n +0.10 -0.11 +0.12 | tail -1l)
|
|
||||||
tests:# $(testdir)/run_make_tests.pl $(prog)
|
|
||||||
# cd $(<D); MAKELEVEL=0 perl $(<F)
|
|
||||||
|
|
||||||
build.sh.in: build.template compatMakefile
|
|
||||||
sed -e 's@%objs%@$(filter-out remote-% $(GLOB) $(ALLOCA) $(extras),\
|
|
||||||
$(patsubst $(archpfx)%,%,$(objs)))\
|
|
||||||
$(patsubst %.c,%.o,$(filter %.c,$(globfiles)))@' \
|
|
||||||
$< > $@.new
|
|
||||||
chmod a+x $@.new
|
|
||||||
mv -f $@.new $@
|
|
||||||
cvs commit -mRegenerated $@
|
|
||||||
|
|
||||||
# Make the distribution tar files.
|
|
||||||
|
|
||||||
.PHONY: dist
|
|
||||||
# Figure out the version number from the source of `version.c'.
|
|
||||||
version := \
|
|
||||||
$(strip $(shell sed -e '/=/!d' -e 's/^.*"\(.*\)";$$/\1/' < version.c))
|
|
||||||
tarfiles := make # make-doc
|
|
||||||
tarfiles := $(addsuffix -$(version).tar,$(tarfiles))
|
|
||||||
tarfiles := $(tarfiles:%=%.gz) # no more compress $(tarfiles:%=%.Z)
|
|
||||||
# Depend on default and doc so we don't ship anything that won't compile.
|
|
||||||
dist: cvs-mark default info dvi tests tarfiles
|
|
||||||
.PHONY: tarfiles
|
|
||||||
tarfiles: $(tarfiles)
|
|
||||||
|
|
||||||
vmsfiles = config.h-vms makefile.com makefile.vms readme.vms \
|
|
||||||
vmsdir.h vmsfunctions.c vmsify.c
|
|
||||||
amigafiles = README.Amiga config.ami Makefile.ami SCOPTIONS SMakefile \
|
|
||||||
amiga.c amiga.h make.lnk
|
|
||||||
win32files = README.WIN32 build_w32.bat config.h.WIN32 subproc.bat NMakefile \
|
|
||||||
$(addprefix w32/,pathstuff.c compat/dirent.c include/dirent.h \
|
|
||||||
include/pathstuff.h include/sub_proc.h \
|
|
||||||
include/w32err.h subproc/NMakefile \
|
|
||||||
subproc/build.bat subproc/misc.c \
|
|
||||||
subproc/proc.h subproc/sub_proc.c \
|
|
||||||
subproc/w32err.c)
|
|
||||||
distfiles=README INSTALL COPYING ChangeLog NEWS \
|
|
||||||
configure Makefile.in configure.in build.sh.in mkinstalldirs \
|
|
||||||
configh.dos configure.bat \
|
|
||||||
$(amigafiles) $(vmsfiles) $(win32files) \
|
|
||||||
aclocal.m4 acconfig.h $(srcs) remote-*.c $(globfiles) \
|
|
||||||
make.texinfo make-stds.texi \
|
|
||||||
make.?? make.??s make.toc make.aux make.man texinfo.tex TAGS tags \
|
|
||||||
install-sh \
|
|
||||||
make.info make.info*
|
|
||||||
|
|
||||||
ifndef dist-flavor
|
|
||||||
dist-flavor = alpha
|
|
||||||
endif
|
|
||||||
.PHONY: cvs-mark
|
|
||||||
cvs-mark: $(distfiles)
|
|
||||||
cvs tag -F make-$(subst .,-,$(version))
|
|
||||||
|
|
||||||
dist: local-inst
|
|
||||||
.PHONY: local-inst
|
|
||||||
local-inst: $(prog)
|
|
||||||
install -c -g kmem -o $(USER) -m 2755 $< /usr/local/gnubin/make
|
|
||||||
|
|
||||||
# Put the alpha distribution files in the anonymous FTP directory.
|
|
||||||
alpha-files = $(tarfiles) GNUmakefile compatMakefile $(testdir).tar.Z
|
|
||||||
dist: alpha
|
|
||||||
.PHONY: alpha
|
|
||||||
alpha-dir := ~ftp/gnu
|
|
||||||
alpha-files := $(addprefix $(alpha-dir)/,$(alpha-files))
|
|
||||||
alpha: $(alpha-dir) $(alpha-files)
|
|
||||||
$(alpha-dir)/%: %
|
|
||||||
@rm -f $@
|
|
||||||
cp $< $@
|
|
||||||
|
|
||||||
# Implicit rule to make README and README-doc.
|
|
||||||
%: %.template version.c
|
|
||||||
rm -f $@
|
|
||||||
sed 's/VERSION/$(version)/' < $< > $@
|
|
||||||
# Make sure I don't edit it by accident.
|
|
||||||
chmod a-w $@
|
|
||||||
cvs commit -m'Regenerated for $(version)' $@
|
|
||||||
|
|
||||||
define make-tar
|
|
||||||
@rm -fr make-$(version)
|
|
||||||
ln -s . make-$(version)
|
|
||||||
tar cvhof $@ $(addprefix make-$(version)/,$^)
|
|
||||||
rm -f make-$(version)
|
|
||||||
endef
|
|
||||||
|
|
||||||
%.Z: %; compress -c $< > $@
|
|
||||||
%.gz: %; gzip -9 -c -v $< > $@
|
|
||||||
|
|
||||||
make-$(version).tar: $(distfiles)
|
|
||||||
$(make-tar)
|
|
||||||
|
|
||||||
ifneq (,)
|
|
||||||
tests := $(filter-out %~,$(wildcard tests/*))
|
|
||||||
make-tests-$(version).tar.Z: $(tests)
|
|
||||||
@rm -fr make-tests-$(version)
|
|
||||||
ln -s tests make-tests-$(version)
|
|
||||||
tar cvhf $(@:.Z=) $(patsubst tests/%,make-tests-$(version)/%,$^)
|
|
||||||
rm -f make-tests-$(version)
|
|
||||||
compress -f $(@:.Z=)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(archpfx)loadtest: $(archpfx)load.o
|
|
||||||
154
INSTALL
154
INSTALL
@@ -1,3 +1,12 @@
|
|||||||
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is free documentation; the Free Software Foundation gives
|
||||||
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
@@ -8,20 +17,27 @@ various system-dependent variables used during compilation. It uses
|
|||||||
those values to create a `Makefile' in each directory of the package.
|
those values to create a `Makefile' in each directory of the package.
|
||||||
It may also create one or more `.h' files containing system-dependent
|
It may also create one or more `.h' files containing system-dependent
|
||||||
definitions. Finally, it creates a shell script `config.status' that
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
you can run in the future to recreate the current configuration, a file
|
you can run in the future to recreate the current configuration, and a
|
||||||
`config.cache' that saves the results of its tests to speed up
|
file `config.log' containing compiler output (useful mainly for
|
||||||
reconfiguring, and a file `config.log' containing compiler output
|
debugging `configure').
|
||||||
(useful mainly for debugging `configure').
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.)
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
If you need to do unusual things to compile the package, please try
|
||||||
to figure out how `configure' could check whether to do them, and mail
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
diffs or instructions to the address given in the `README' so they can
|
diffs or instructions to the address given in the `README' so they can
|
||||||
be considered for the next release. If at some point `config.cache'
|
be considered for the next release. If you are using the cache, and at
|
||||||
contains results you don't want to keep, you may remove or edit it.
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
The file `configure.in' is used to create `configure' by a program
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
called `autoconf'. You only need `configure.in' if you want to change
|
`configure' by a program called `autoconf'. You only need
|
||||||
it or regenerate `configure' using a newer version of `autoconf'.
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
@@ -54,15 +70,17 @@ The simplest way to compile this package is:
|
|||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that
|
Some systems require unusual options for compilation or linking that the
|
||||||
the `configure' script does not know about. You can give `configure'
|
`configure' script does not know about. Run `./configure --help' for
|
||||||
initial values for variables by setting them in the environment. Using
|
details on some of the pertinent environment variables.
|
||||||
a Bourne-compatible shell, you can do that on the command line like
|
|
||||||
this:
|
|
||||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
|
||||||
|
|
||||||
Or on systems that have the `env' program, you can do it like this:
|
You can give `configure' initial values for configuration parameters
|
||||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
Compiling For Multiple Architectures
|
Compiling For Multiple Architectures
|
||||||
====================================
|
====================================
|
||||||
@@ -75,11 +93,11 @@ directory where you want the object files and executables to go and run
|
|||||||
the `configure' script. `configure' automatically checks for the
|
the `configure' script. `configure' automatically checks for the
|
||||||
source code in the directory that `configure' is in and in `..'.
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
If you have to use a `make' that does not supports the `VPATH'
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
variable, you have to compile the package for one architecture at a time
|
variable, you have to compile the package for one architecture at a
|
||||||
in the source code directory. After you have installed the package for
|
time in the source code directory. After you have installed the
|
||||||
one architecture, use `make distclean' before reconfiguring for another
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
architecture.
|
for another architecture.
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
@@ -87,16 +105,16 @@ Installation Names
|
|||||||
By default, `make install' will install the package's files in
|
By default, `make install' will install the package's files in
|
||||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||||
installation prefix other than `/usr/local' by giving `configure' the
|
installation prefix other than `/usr/local' by giving `configure' the
|
||||||
option `--prefix=PATH'.
|
option `--prefix=PREFIX'.
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
You can specify separate installation prefixes for
|
||||||
architecture-specific files and architecture-independent files. If you
|
architecture-specific files and architecture-independent files. If you
|
||||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
give `configure' the option `--exec-prefix=PREFIX', the package will
|
||||||
PATH as the prefix for installing programs and libraries.
|
use PREFIX as the prefix for installing programs and libraries.
|
||||||
Documentation and other data files will still use the regular prefix.
|
Documentation and other data files will still use the regular prefix.
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
In addition, if you use an unusual directory layout you can give
|
||||||
options like `--bindir=PATH' to specify different values for particular
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
kinds of files. Run `configure --help' for a list of the directories
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
you can set and what kinds of files go in them.
|
you can set and what kinds of files go in them.
|
||||||
|
|
||||||
@@ -122,60 +140,92 @@ you can use the `configure' options `--x-includes=DIR' and
|
|||||||
Specifying the System Type
|
Specifying the System Type
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
There may be some features `configure' can not figure out
|
There may be some features `configure' cannot figure out automatically,
|
||||||
automatically, but needs to determine by the type of host the package
|
but needs to determine by the type of machine the package will run on.
|
||||||
will run on. Usually `configure' can figure that out, but if it prints
|
Usually, assuming the package is built to be run on the _same_
|
||||||
a message saying it can not guess the host type, give it the
|
architectures, `configure' can figure that out, but if it prints a
|
||||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
message saying it cannot guess the machine type, give it the
|
||||||
type, such as `sun4', or a canonical name with three fields:
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS KERNEL-OS
|
||||||
|
|
||||||
See the file `config.sub' for the possible values of each field. If
|
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
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
need to know the host type.
|
need to know the machine type.
|
||||||
|
|
||||||
If you are building compiler tools for cross-compiling, you can also
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
use the `--target=TYPE' option to select the type of system they will
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
produce code for and the `--build=TYPE' option to select the type of
|
produce code for.
|
||||||
system on which you are compiling the package.
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
Sharing Defaults
|
Sharing Defaults
|
||||||
================
|
================
|
||||||
|
|
||||||
If you want to set default values for `configure' scripts to share,
|
If you want to set default values for `configure' scripts to share, you
|
||||||
you can create a site shell script called `config.site' that gives
|
can create a site shell script called `config.site' that gives default
|
||||||
default values for variables like `CC', `cache_file', and `prefix'.
|
values for variables like `CC', `cache_file', and `prefix'.
|
||||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
A warning: not all `configure' scripts look for a site script.
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
Operation Controls
|
Defining Variables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it
|
Variables not defined in a site shell script can be set in the
|
||||||
operates.
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
`--cache-file=FILE'
|
./configure CC=/usr/local2/bin/gcc
|
||||||
Use and save the results of the tests in FILE instead of
|
|
||||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
will cause the specified gcc to be used as the C compiler (unless it is
|
||||||
debugging `configure'.
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it operates.
|
||||||
|
|
||||||
`--help'
|
`--help'
|
||||||
|
`-h'
|
||||||
Print a summary of the options to `configure', and exit.
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
`--quiet'
|
`--quiet'
|
||||||
`--silent'
|
`--silent'
|
||||||
`-q'
|
`-q'
|
||||||
Do not print messages saying which checks are being made.
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
`--srcdir=DIR'
|
`--srcdir=DIR'
|
||||||
Look for the package's source code in directory DIR. Usually
|
Look for the package's source code in directory DIR. Usually
|
||||||
`configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
`--version'
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
Print the version of Autoconf used to generate the `configure'
|
`configure --help' for more details.
|
||||||
script, and exit.
|
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options.
|
|
||||||
|
|
||||||
|
|||||||
587
Makefile.DOS.template
Normal file
587
Makefile.DOS.template
Normal file
@@ -0,0 +1,587 @@
|
|||||||
|
# -*-Makefile-*- template for DJGPP
|
||||||
|
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994-2012 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
|
||||||
|
|
||||||
|
srcdir = .
|
||||||
|
VPATH = $(srcdir)
|
||||||
|
# $DJDIR is defined automatically by DJGPP to point
|
||||||
|
# to the root of the DJGPP installation tree.
|
||||||
|
prefix = /dev/env/DJDIR
|
||||||
|
exec_prefix = ${prefix}
|
||||||
|
|
||||||
|
bindir = /bin
|
||||||
|
datadir = /share
|
||||||
|
libdir = /lib
|
||||||
|
infodir = /info
|
||||||
|
mandir = /man
|
||||||
|
includedir = /include
|
||||||
|
oldincludedir = c:/djgpp/include
|
||||||
|
|
||||||
|
DESTDIR = /dev/env/DJDIR
|
||||||
|
|
||||||
|
pkgdatadir = $(datadir)/make
|
||||||
|
pkglibdir = $(libdir)/make
|
||||||
|
pkgincludedir = $(includedir)/make
|
||||||
|
localedir = $(datadir)/locale
|
||||||
|
|
||||||
|
INSTALL = ${exec_prefix}/bin/ginstall -c
|
||||||
|
INSTALL_PROGRAM = ${exec_prefix}/bin/ginstall -c
|
||||||
|
INSTALL_DATA = ${exec_prefix}/bin/ginstall -c -m 644
|
||||||
|
INSTALL_SCRIPT = ${exec_prefix}/bin/ginstall -c
|
||||||
|
transform = s,x,x,
|
||||||
|
|
||||||
|
# This will fail even if they don't have a Unix-like shell (stock DOS
|
||||||
|
# shell doesn't know about `false'). The only difference is that they
|
||||||
|
# get "Error -1" instead of "Error 1".
|
||||||
|
EXIT_FAIL = false
|
||||||
|
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
EXEEXT = .exe
|
||||||
|
OBJEXT = o
|
||||||
|
|
||||||
|
AR = ar
|
||||||
|
AWK = gawk
|
||||||
|
CC = gcc
|
||||||
|
CPP = gcc -E
|
||||||
|
LIBOBJS =
|
||||||
|
MAKEINFO = ${exec_prefix}/bin/makeinfo
|
||||||
|
PACKAGE = make
|
||||||
|
PERL = perl
|
||||||
|
RANLIB = ranlib
|
||||||
|
REMOTE = stub
|
||||||
|
VERSION = %VERSION%
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = 1.2
|
||||||
|
|
||||||
|
bin_PROGRAMS = %PROGRAMS%$(EXEEXT)
|
||||||
|
|
||||||
|
make_SOURCES = %SOURCES%
|
||||||
|
# This should include the glob/ prefix
|
||||||
|
libglob_a_SOURCES = %GLOB_SOURCES%
|
||||||
|
make_LDADD = glob/libglob.a
|
||||||
|
|
||||||
|
man_MANS = make.1
|
||||||
|
|
||||||
|
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 gmk-default.scm gmk-default.h
|
||||||
|
|
||||||
|
SUBDIRS = glob doc
|
||||||
|
mkinstalldirs = ${exec_prefix}/bin/gmkdir -p
|
||||||
|
CONFIG_HEADER = config.h
|
||||||
|
CONFIG_CLEAN_FILES = build.sh
|
||||||
|
PROGRAMS = $(bin_PROGRAMS)
|
||||||
|
|
||||||
|
MAKE_HOST = i386-pc-msdosdjgpp
|
||||||
|
|
||||||
|
|
||||||
|
DEFS = -I. -I$(srcdir) -I.
|
||||||
|
CPPFLAGS = -DHAVE_CONFIG_H
|
||||||
|
LDFLAGS =
|
||||||
|
LIBS =
|
||||||
|
make_OBJECTS = %OBJECTS%
|
||||||
|
make_DEPENDENCIES = glob/libglob.a
|
||||||
|
make_LDFLAGS =
|
||||||
|
libglob_a_LIBADD =
|
||||||
|
libglob_a_OBJECTS = %GLOB_OBJECTS%
|
||||||
|
noinst_LIBRARIES = glob/libglob.a
|
||||||
|
CFLAGS = -O2 -g
|
||||||
|
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||||
|
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
|
TEXI2DVI = texi2dvi
|
||||||
|
TEXINFO_TEX = $(srcdir)/config/texinfo.tex
|
||||||
|
INFO_DEPS = doc/make.info
|
||||||
|
DVIS = doc/make.dvi
|
||||||
|
TEXINFOS = doc/make.texi
|
||||||
|
noinst_TEXINFOS = doc/fdl.texi doc/make-stds.texi
|
||||||
|
man1dir = $(mandir)/man1
|
||||||
|
MANS = $(man_MANS)
|
||||||
|
|
||||||
|
NROFF = nroff
|
||||||
|
DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 alloca.c build.sh-in config.h-in configure configure.in getloadavg.c
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
TAR = gtar
|
||||||
|
GZIP = --best
|
||||||
|
SOURCES = $(make_SOURCES)
|
||||||
|
OBJECTS = $(make_OBJECTS)
|
||||||
|
HEADERS = $(wildcard $(srcdir)/*.h)
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .c .dvi .info .o .obj .ps .texi .tex .html
|
||||||
|
|
||||||
|
mostlyclean-hdr:
|
||||||
|
|
||||||
|
clean-hdr:
|
||||||
|
|
||||||
|
distclean-hdr:
|
||||||
|
-rm -f config.h
|
||||||
|
|
||||||
|
maintainer-clean-hdr:
|
||||||
|
|
||||||
|
mostlyclean-binPROGRAMS:
|
||||||
|
|
||||||
|
clean-binPROGRAMS:
|
||||||
|
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||||
|
|
||||||
|
distclean-binPROGRAMS:
|
||||||
|
|
||||||
|
maintainer-clean-binPROGRAMS:
|
||||||
|
|
||||||
|
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||||
|
@list='$(bin_PROGRAMS)'; for p in $$list; do if test -f $$p; then echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`"; $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; else :; fi; done
|
||||||
|
|
||||||
|
uninstall-binPROGRAMS:
|
||||||
|
$(NORMAL_UNINSTALL)
|
||||||
|
list='$(bin_PROGRAMS)'; for p in $$list; do rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`.exe; done
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(COMPILE) -c $<
|
||||||
|
|
||||||
|
clean-noinstLIBRARIES:
|
||||||
|
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.$(OBJEXT) *$(EXEEXT) make.new core
|
||||||
|
|
||||||
|
clean-compile:
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c *_tab.c
|
||||||
|
|
||||||
|
maintainer-clean-compile:
|
||||||
|
|
||||||
|
make$(EXEEXT): $(make_OBJECTS) $(make_DEPENDENCIES)
|
||||||
|
@command.com /c if exist make del make
|
||||||
|
@command.com /c if exist make.exe del make.exe
|
||||||
|
$(LINK) $(make_LDFLAGS) $(make_OBJECTS) $(make_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
|
||||||
|
make.info: make.texi
|
||||||
|
make.dvi: make.texi
|
||||||
|
make.ps: make.dvi make.texi
|
||||||
|
make.html: make.texi
|
||||||
|
|
||||||
|
|
||||||
|
DVIPS = dvips
|
||||||
|
|
||||||
|
.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) --no-split $< -o ./$@
|
||||||
|
|
||||||
|
.texi:
|
||||||
|
@command.com /c if exist make.info* del make.info*
|
||||||
|
@command.com /c if exist make.i* del make.i*
|
||||||
|
$(MAKEINFO) -I$(srcdir) --no-split $< -o ./$@
|
||||||
|
|
||||||
|
.texi.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); 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 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); 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 $(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); do rm -f $$i*; done
|
||||||
|
|
||||||
|
install-man1:
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||||
|
@list='$(man1_MANS)'; \
|
||||||
|
l2='$(man_MANS)'; for i in $$l2; do \
|
||||||
|
case "$$i" in \
|
||||||
|
*.1*) list="$$list $$i" ;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||||
|
else file=$$i; fi; \
|
||||||
|
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||||
|
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||||
|
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||||
|
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
|
||||||
|
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-man1:
|
||||||
|
@list='$(man1_MANS)'; \
|
||||||
|
l2='$(man_MANS)'; for i in $$l2; do \
|
||||||
|
case "$$i" in \
|
||||||
|
*.1*) list="$$list $$i" ;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
for i in $$list; do \
|
||||||
|
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||||
|
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||||
|
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||||
|
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
|
||||||
|
rm -f $(DESTDIR)$(man1dir)/$$inst; \
|
||||||
|
done
|
||||||
|
install-man: $(MANS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
$(MAKE) install-man1
|
||||||
|
uninstall-man:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
$(MAKE) uninstall-man1
|
||||||
|
|
||||||
|
# Assume that the only thing to do in glob is to build libglob.a,
|
||||||
|
# but do a sanity check: if $SUBDIRS will ever have more than
|
||||||
|
# a single directory, yell bloody murder.
|
||||||
|
all-recursive:
|
||||||
|
ifeq ($(findstring glob, $(SUBDIRS)), glob)
|
||||||
|
@command.com /c if not exist glob\\nul md glob
|
||||||
|
@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):
|
||||||
|
command.com /c md $@
|
||||||
|
|
||||||
|
libglob.a: $(libglob_a_OBJECTS)
|
||||||
|
command.com /c if exist libglob.a del libglob.a
|
||||||
|
$(AR) cru libglob.a $(libglob_a_OBJECTS) $(libglob_a_LIBADD)
|
||||||
|
$(RANLIB) libglob.a
|
||||||
|
|
||||||
|
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||||
|
maintainer-clean-recursive check-recursive:
|
||||||
|
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 two directory in "($(SUBDIRS))"
|
||||||
|
@$(EXIT_FAIL)
|
||||||
|
endif
|
||||||
|
|
||||||
|
tags-in-glob: $(libglob_a_SOURCES)
|
||||||
|
etags $(addprefix $(srcdir)/,$^) -o ./glob/TAGS
|
||||||
|
|
||||||
|
tags-recursive:
|
||||||
|
ifeq ($(words $(SUBDIRS)), 2)
|
||||||
|
$(MAKE) tags-in-glob
|
||||||
|
else
|
||||||
|
@echo FATAL: There is more than two directory in "($(SUBDIRS))"
|
||||||
|
@$(EXIT_FAIL)
|
||||||
|
endif
|
||||||
|
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES)
|
||||||
|
mkid $(srcdir)/$(SOURCES) $(srcdir)/$(libglob_a_SOURCES) ./config.h $(HEADERS)
|
||||||
|
|
||||||
|
TAGS: tags-recursive $(HEADERS) $(srcdir)/$(SOURCES) config.h $(TAGS_DEPENDENCIES)
|
||||||
|
etags -i ./glob/TAGS $(ETAGS_ARGS) $(srcdir)/$(SOURCES) ./config.h $(HEADERS)
|
||||||
|
|
||||||
|
mostlyclean-tags:
|
||||||
|
|
||||||
|
clean-tags:
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID
|
||||||
|
|
||||||
|
maintainer-clean-tags:
|
||||||
|
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
|
||||||
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
|
# it guarantees that the distribution is self-contained by making another
|
||||||
|
# tarfile.
|
||||||
|
distcheck: dist
|
||||||
|
rm -rf $(distdir)
|
||||||
|
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||||
|
mkdir $(distdir)/=build
|
||||||
|
mkdir $(distdir)/=inst
|
||||||
|
dc_install_base=`cd $(distdir)/=inst && pwd`; cd $(distdir)/=build && ../configure --srcdir=.. --prefix=$$dc_install_base && $(MAKE) && $(MAKE) dvi && $(MAKE) check && $(MAKE) install && $(MAKE) installcheck && $(MAKE) dist
|
||||||
|
rm -rf $(distdir)
|
||||||
|
@echo "========================"; echo "$(distdir).tar.gz is ready for distribution"; echo "========================"
|
||||||
|
dist: distdir
|
||||||
|
-chmod -R a+r $(distdir)
|
||||||
|
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||||
|
rm -rf $(distdir)
|
||||||
|
dist-all: distdir
|
||||||
|
-chmod -R a+r $(distdir)
|
||||||
|
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||||
|
rm -rf $(distdir)
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
rm -rf $(distdir)
|
||||||
|
mkdir $(distdir)
|
||||||
|
-chmod 777 $(distdir)
|
||||||
|
@for file in $(DISTFILES); do d=$(srcdir); test -f $(distdir)/$$file || ln $$d/$$file $(distdir)/$$file 2> /dev/null || cp -p $$d/$$file $(distdir)/$$file; done; for subdir in $(SUBDIRS); do test -d $(distdir)/$$subdir || mkdir $(distdir)/$$subdir || exit 1; chmod 777 $(distdir)/$$subdir; (cd $$subdir && $(MAKE) top_distdir=../$(top_distdir)/$$subdir distdir=../$(distdir)/$$subdir distdir) || exit 1; done
|
||||||
|
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||||
|
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
|
||||||
|
|
||||||
|
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 $(PROGRAMS) config.h info
|
||||||
|
|
||||||
|
install-exec-am: install-binPROGRAMS
|
||||||
|
|
||||||
|
install-data-am: install-info-am
|
||||||
|
|
||||||
|
uninstall-am: uninstall-binPROGRAMS uninstall-info
|
||||||
|
|
||||||
|
install-exec: install-exec-recursive install-exec-am
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
|
||||||
|
install-data: install-data-recursive install-data-am
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
|
||||||
|
install-recursive uninstall-recursive:
|
||||||
|
@:
|
||||||
|
|
||||||
|
install: install-recursive install-exec-am install-data-am
|
||||||
|
@:
|
||||||
|
|
||||||
|
uninstall: uninstall-recursive uninstall-am
|
||||||
|
|
||||||
|
all: all-recursive-am all-am
|
||||||
|
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
$(mkinstalldirs) $(bindir) $(infodir)
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-rm -f Makefile $(DISTCLEANFILES)
|
||||||
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||||
|
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||||
|
mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS mostlyclean-compile mostlyclean-aminfo mostlyclean-tags mostlyclean-generic
|
||||||
|
|
||||||
|
clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-aminfo clean-tags clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile distclean-aminfo distclean-tags distclean-generic clean-am
|
||||||
|
|
||||||
|
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS maintainer-clean-compile maintainer-clean-aminfo maintainer-clean-tags maintainer-clean-generic distclean-am
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive mostlyclean-am
|
||||||
|
|
||||||
|
clean: clean-noinstLIBRARIES clean-recursive clean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive distclean-am
|
||||||
|
rm -f config.status
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||||
|
@echo "This command is intended for maintainers to use;"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
rm -f config.status
|
||||||
|
|
||||||
|
.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
|
||||||
|
maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \
|
||||||
|
clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
|
||||||
|
install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \
|
||||||
|
maintainer-clean-compile install-info-am uninstall-info \
|
||||||
|
mostlyclean-aminfo distclean-aminfo clean-aminfo \
|
||||||
|
maintainer-clean-aminfo install-data-recursive uninstall-data-recursive \
|
||||||
|
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
|
||||||
|
uninstalldirs-recursive all-recursive check-recursive check-am \
|
||||||
|
installcheck-recursive info-recursive dvi-recursive \
|
||||||
|
mostlyclean-recursive distclean-recursive clean-recursive \
|
||||||
|
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||||
|
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||||
|
mostlyclean-depend distclean-depend clean-depend \
|
||||||
|
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 \
|
||||||
|
html
|
||||||
|
|
||||||
|
|
||||||
|
# --------------- Local DIST Section
|
||||||
|
|
||||||
|
# Install the w32 subdirectory
|
||||||
|
#
|
||||||
|
dist-hook:
|
||||||
|
(cd $(srcdir); \
|
||||||
|
w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \
|
||||||
|
tar chf - $$w32) \
|
||||||
|
| (cd $(distdir); tar xfBp -)
|
||||||
|
|
||||||
|
# --------------- Local CHECK Section
|
||||||
|
|
||||||
|
# Note: check-loadavg is NOT a prerequisite of check-local, since
|
||||||
|
# there's no uptime utility, and the test it does doesn't make sense
|
||||||
|
# on MSDOS anyway.
|
||||||
|
check-local: check-shell check-regression
|
||||||
|
@banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
|
||||||
|
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||||
|
echo; \
|
||||||
|
echo "$$dashes"; \
|
||||||
|
echo "$$banner"; \
|
||||||
|
echo "$$dashes"; \
|
||||||
|
echo
|
||||||
|
|
||||||
|
.PHONY: check-loadavg check-shell check-regression
|
||||||
|
|
||||||
|
# > check-shell
|
||||||
|
#
|
||||||
|
# check-shell is designed to fail if they don't have a Unixy shell
|
||||||
|
# installed. The test suite requires such a shell.
|
||||||
|
check-shell:
|
||||||
|
@echo If Make says Error -1, you do not have Unix-style shell installed
|
||||||
|
@foo=bar.exe :
|
||||||
|
|
||||||
|
# > check-loadavg
|
||||||
|
#
|
||||||
|
loadavg: loadavg.c config.h
|
||||||
|
@rm -f loadavg
|
||||||
|
$(LINK) -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
|
||||||
|
# We copy getloadavg.c into a different file rather than compiling it
|
||||||
|
# directly because some compilers clobber getloadavg.o in the process.
|
||||||
|
loadavg.c: getloadavg.c
|
||||||
|
ln $(srcdir)/getloadavg.c loadavg.c || \
|
||||||
|
cp $(srcdir)/getloadavg.c loadavg.c
|
||||||
|
check-loadavg: loadavg
|
||||||
|
@echo The system uptime program believes the load average to be:
|
||||||
|
-uptime
|
||||||
|
@echo The GNU load average checking code believes:
|
||||||
|
-./loadavg
|
||||||
|
|
||||||
|
# > check-regression
|
||||||
|
#
|
||||||
|
# Look for the make test suite, and run it if found. Look in MAKE_TEST if
|
||||||
|
# specified, or else in the srcdir or the distdir, their parents, and _their_
|
||||||
|
# parents.
|
||||||
|
#
|
||||||
|
check-regression:
|
||||||
|
@if test -f "$(srcdir)/tests/run_make_tests"; then \
|
||||||
|
if $(PERL) -v >/dev/null 2>&1; then \
|
||||||
|
case `cd $(srcdir); pwd` in `pwd`) : ;; \
|
||||||
|
*) test -d tests || mkdir tests; \
|
||||||
|
for f in run_make_tests run_make_tests.pl test_driver.pl scripts; do \
|
||||||
|
rm -rf tests/$$f; cp -pr $(srcdir)/tests/$$f tests; \
|
||||||
|
done ;; \
|
||||||
|
esac; \
|
||||||
|
echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS)"; \
|
||||||
|
cd tests && $(PERL) ./run_make_tests.pl -make ../make.exe $(MAKETESTFLAGS); \
|
||||||
|
else \
|
||||||
|
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --------------- Maintainer's Section
|
||||||
|
|
||||||
|
# Note this requires GNU make. Not to worry, since it will only be included
|
||||||
|
# in the Makefile if we're in the maintainer's environment.
|
||||||
|
#include $(srcdir)/maintMakefile
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
|
|
||||||
|
# --------------- DEPENDENCIES
|
||||||
214
Makefile.am
Normal file
214
Makefile.am
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
# This is a -*-Makefile-*-, or close enough
|
||||||
|
#
|
||||||
|
# Copyright (C) 1997-2012 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.8 dist-bzip2 check-news
|
||||||
|
ACLOCAL_AMFLAGS = -I config
|
||||||
|
|
||||||
|
MAKE_HOST = @MAKE_HOST@
|
||||||
|
|
||||||
|
# Only process if target is MS-Windows
|
||||||
|
if WINDOWSENV
|
||||||
|
MAYBE_W32 = w32
|
||||||
|
W32INC = -I $(top_srcdir)/w32/include
|
||||||
|
W32LIB = -Lw32 -lw32
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS = glob config po doc $(MAYBE_W32)
|
||||||
|
|
||||||
|
bin_PROGRAMS = make
|
||||||
|
|
||||||
|
if USE_CUSTOMS
|
||||||
|
remote = remote-cstms.c
|
||||||
|
else
|
||||||
|
remote = remote-stub.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
|
||||||
|
function.c getopt.c getopt1.c implicit.c job.c load.c main.c \
|
||||||
|
misc.c read.c remake.c rule.c signame.c \
|
||||||
|
strcache.c variable.c version.c vpath.c hash.c \
|
||||||
|
$(remote)
|
||||||
|
|
||||||
|
if HAVE_GUILE
|
||||||
|
make_SOURCES += guile.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
|
||||||
|
$(GUILE_LIBS)
|
||||||
|
# Only process if target is MS-Windows
|
||||||
|
if WINDOWSENV
|
||||||
|
make_LDADD += $(W32LIB)
|
||||||
|
endif
|
||||||
|
|
||||||
|
man_MANS = make.1
|
||||||
|
|
||||||
|
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
|
||||||
|
|
||||||
|
AM_CPPFLAGS = $(GLOBINC)
|
||||||
|
AM_CFLAGS = $(GUILE_CFLAGS)
|
||||||
|
# Only process if target is MS-Windows
|
||||||
|
if WINDOWSENV
|
||||||
|
AM_CPPFLAGS += $(W32INC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# Extra stuff to include in the distribution.
|
||||||
|
|
||||||
|
EXTRA_DIST = README build.sh.in $(man_MANS) \
|
||||||
|
README.customs README.OS2 \
|
||||||
|
SCOPTIONS SMakefile \
|
||||||
|
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
|
||||||
|
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
|
||||||
|
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
|
||||||
|
make_msvc_net2003.sln make_msvc_net2003.vcproj \
|
||||||
|
readme.vms makefile.vms makefile.com config.h-vms \
|
||||||
|
vmsdir.h vmsfunctions.c vmsify.c \
|
||||||
|
gmk-default.scm gmk-default.h
|
||||||
|
|
||||||
|
# This is built during configure, but behind configure's back
|
||||||
|
|
||||||
|
DISTCLEANFILES = build.sh
|
||||||
|
|
||||||
|
# Forward targets
|
||||||
|
|
||||||
|
html:
|
||||||
|
cd doc && $(MAKE) $(AM_MAKEFLAGS) $@
|
||||||
|
|
||||||
|
.PHONY: html
|
||||||
|
|
||||||
|
# --------------- Internationalization Section
|
||||||
|
|
||||||
|
localedir = $(datadir)/locale
|
||||||
|
|
||||||
|
# --------------- Local INSTALL Section
|
||||||
|
|
||||||
|
# If necessary, change the gid of the app and turn on the setgid flag.
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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'
|
||||||
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
|
#
|
||||||
|
inst_setgid = @NEED_SETGID@
|
||||||
|
|
||||||
|
# Install make setgid to this group so it can get the load average.
|
||||||
|
#
|
||||||
|
inst_group = @KMEM_GROUP@
|
||||||
|
|
||||||
|
install-exec-local:
|
||||||
|
@if $(inst_setgid); then \
|
||||||
|
app=$(DESTDIR)$(bindir)/`echo $(bin_PROGRAMS)|sed '$(transform)'`; \
|
||||||
|
if chgrp $(inst_group) $$app && chmod g+s $$app; then \
|
||||||
|
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 "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 -o -name .deps -o -name work -o -name .cvsignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name Makefile \) -prune -o -type f -print`; \
|
||||||
|
tar chf - $$sub) \
|
||||||
|
| (cd $(distdir); tar xfBp -)
|
||||||
|
|
||||||
|
|
||||||
|
# --------------- Local CHECK Section
|
||||||
|
|
||||||
|
check-local: check-regression check-loadavg
|
||||||
|
@banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
|
||||||
|
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||||
|
echo; \
|
||||||
|
echo "$$dashes"; \
|
||||||
|
echo "$$banner"; \
|
||||||
|
echo "$$dashes"; \
|
||||||
|
echo
|
||||||
|
|
||||||
|
.PHONY: check-loadavg check-regression
|
||||||
|
|
||||||
|
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$(EXEEXT)
|
||||||
|
|
||||||
|
# The loadavg function is invoked during "make check" to test getloadavg.
|
||||||
|
check_PROGRAMS = loadavg
|
||||||
|
nodist_loadavg_SOURCES = getloadavg.c
|
||||||
|
loadavg_CPPFLAGS = -DTEST
|
||||||
|
loadavg_LDADD = @GETLOADAVG_LIBS@
|
||||||
|
|
||||||
|
# > check-regression
|
||||||
|
#
|
||||||
|
# Look for the make test suite, and run it if found and we can find perl.
|
||||||
|
# If we're building outside the tree, we use symlinks to make a local copy of
|
||||||
|
# the test suite. Unfortunately the test suite itself isn't localizable yet.
|
||||||
|
#
|
||||||
|
MAKETESTFLAGS =
|
||||||
|
|
||||||
|
check-regression:
|
||||||
|
@if test -f "$(srcdir)/tests/run_make_tests"; then \
|
||||||
|
if $(PERL) -v >/dev/null 2>&1; then \
|
||||||
|
case `cd $(srcdir); pwd` in `pwd`) : ;; \
|
||||||
|
*) test -d tests || mkdir tests; \
|
||||||
|
rm -f srctests; \
|
||||||
|
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$(EXEEXT) $(MAKETESTFLAGS)"; \
|
||||||
|
cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS); \
|
||||||
|
else \
|
||||||
|
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
echo "Can't find the GNU Make test suite ($(srcdir)/tests)."; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# --------------- Maintainer's Section
|
||||||
|
|
||||||
|
# Tell automake that I haven't forgotten about this file and it will be
|
||||||
|
# created before we build a distribution (see maintMakefile in the CVS
|
||||||
|
# distribution).
|
||||||
|
|
||||||
|
README:
|
||||||
|
|
||||||
|
@MAINT_MAKEFILE@
|
||||||
85
Makefile.ami
85
Makefile.ami
@@ -1,32 +1,28 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
# -*-Makefile-*- for GNU make on Amiga
|
||||||
# `build.sh' instead.
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
# NOTE: If you have no 'make' program at all to process this makefile, run
|
||||||
|
# 'build.sh' instead.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile for GNU Make
|
# Makefile for GNU Make
|
||||||
#
|
#
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
|
||||||
VPATH = /make-3.74/
|
|
||||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
|
||||||
srcdir = /make-3.74/
|
|
||||||
|
|
||||||
CC = sc
|
CC = sc
|
||||||
RM = delete
|
RM = delete
|
||||||
|
|
||||||
@@ -35,18 +31,18 @@ CPPFLAGS =
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Define these for your system as follows:
|
# Define these for your system as follows:
|
||||||
# -DNO_ARCHIVES To disable `ar' archive support.
|
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||||
# Some compilers apparently accept this
|
# Some compilers apparently accept this
|
||||||
# without complaint but produce losing code,
|
# without complaint but produce losing code,
|
||||||
# so beware.
|
# so beware.
|
||||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||||
# See also `config.h'.
|
# See also 'config.h'.
|
||||||
defines =
|
defines =
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
# Which flavor of remote job execution support to use.
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
# The code is found in 'remote-$(REMOTE).c'.
|
||||||
REMOTE = stub
|
REMOTE = stub
|
||||||
|
|
||||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||||
@@ -80,9 +76,9 @@ prefix =
|
|||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix =
|
exec_prefix =
|
||||||
|
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = sc:c
|
bindir = sc:c
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir = lib:
|
libdir = lib:
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir = include:
|
includedir = include:
|
||||||
@@ -92,20 +88,20 @@ infodir = doc:
|
|||||||
mandir = t:
|
mandir = t:
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
# Prefix to put on installed `make' binary file name.
|
# Prefix to put on installed 'make' binary file name.
|
||||||
binprefix =
|
binprefix =
|
||||||
# Prefix to put on installed `make' man page file name.
|
# Prefix to put on installed 'make' man page file name.
|
||||||
manprefix = $(binprefix)
|
manprefix = $(binprefix)
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
install_setgid = false
|
install_setgid = false
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
# Install make setgid to this group so it can read /dev/kmem.
|
||||||
group = sys
|
group = sys
|
||||||
|
|
||||||
# Program to install `make'.
|
# Program to install 'make'.
|
||||||
INSTALL_PROGRAM = copy
|
INSTALL_PROGRAM = copy
|
||||||
# Program to install the man page.
|
# Program to install the man page.
|
||||||
INSTALL_DATA = copy
|
INSTALL_DATA = copy
|
||||||
@@ -121,18 +117,21 @@ TEXI2DVI = texi2dvi
|
|||||||
ETAGS = etags -w
|
ETAGS = etags -w
|
||||||
CTAGS = ctags -w
|
CTAGS = ctags -w
|
||||||
|
|
||||||
|
#guile = guile.o
|
||||||
|
|
||||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||||
$(GETOPT) $(ALLOCA) $(extras)
|
remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras) $(guile)
|
||||||
|
|
||||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||||
$(srcdir)vpath.c $(srcdir)version.c \
|
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||||
$(srcdir)remote-$(REMOTE).c \
|
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||||
$(srcdir)ar.c $(srcdir)arscan.c \
|
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
|
||||||
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
||||||
@@ -145,7 +144,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
|||||||
all: make
|
all: make
|
||||||
info: make.info
|
info: make.info
|
||||||
dvi: make.dvi
|
dvi: make.dvi
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||||
.PHONY: all check info dvi
|
.PHONY: all check info dvi
|
||||||
|
|
||||||
make.info: make.texinfo
|
make.info: make.texinfo
|
||||||
@@ -182,8 +181,6 @@ glob/libglob.a: FORCE config.h
|
|||||||
cd glob; $(MAKE) libglob.a
|
cd glob; $(MAKE) libglob.a
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
tagsrcs = $(srcs) $(srcdir)remote-*.c
|
|
||||||
|
|
||||||
.PHONY: install installdirs
|
.PHONY: install installdirs
|
||||||
install: installdirs \
|
install: installdirs \
|
||||||
$(bindir)$(binprefix)make $(infodir)make.info \
|
$(bindir)$(binprefix)make $(infodir)make.info \
|
||||||
@@ -199,7 +196,7 @@ $(bindir)$(binprefix)make: make
|
|||||||
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
|
||||||
else \
|
else \
|
||||||
echo "$@ needs to be owned by group $(group) and setgid;"; \
|
echo "$@ needs to be owned by group $(group) and setgid;"; \
|
||||||
echo "otherwise the \`-l' option will probably not work."; \
|
echo "otherwise the '-l' option will probably not work."; \
|
||||||
echo "You may need special privileges to install $@."; \
|
echo "You may need special privileges to install $@."; \
|
||||||
fi; \
|
fi; \
|
||||||
else true; fi
|
else true; fi
|
||||||
@@ -216,9 +213,9 @@ $(infodir)make.info: make.info
|
|||||||
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
||||||
done
|
done
|
||||||
# Run install-info only if it exists.
|
# Run install-info only if it exists.
|
||||||
# Use `if' instead of just prepending `-' to the
|
# Use 'if' instead of just prepending '-' to the
|
||||||
# line so we notice real errors from install-info.
|
# line so we notice real errors from install-info.
|
||||||
# We use `$(SHELL) -c' because some shells do not
|
# We use '$(SHELL) -c' because some shells do not
|
||||||
# fail gracefully when there is an unknown command.
|
# fail gracefully when there is an unknown command.
|
||||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
||||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
||||||
@@ -250,7 +247,7 @@ clean: glob-clean
|
|||||||
-$(RM) make loadavg "#?.o" core make.dvi
|
-$(RM) make loadavg "#?.o" core make.dvi
|
||||||
|
|
||||||
distclean: clean glob-realclean
|
distclean: clean glob-realclean
|
||||||
-$(RM) Makefile config.h config.status build.sh stamp-config
|
-$(RM) Makefile config.h config.status build.sh
|
||||||
-$(RM) config.log config.cache
|
-$(RM) config.log config.cache
|
||||||
-$(RM) TAGS tags
|
-$(RM) TAGS tags
|
||||||
-$(RM) make.?? make.??s make.log make.toc make.*aux
|
-$(RM) make.?? make.??s make.log make.toc make.*aux
|
||||||
@@ -269,8 +266,8 @@ glob-clean glob-realclean:
|
|||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
||||||
# The automatically generated dependencies below may omit config.h
|
# The automatically generated dependencies below may omit config.h
|
||||||
# because it is included with ``#include <config.h>'' rather than
|
# because it is included with '#include <config.h>' rather than
|
||||||
# ``#include "config.h"''. So we add the explicit dependency to make sure.
|
# '#include "config.h"'. So we add the explicit dependency to make sure.
|
||||||
$(objs): config.h
|
$(objs): config.h
|
||||||
|
|
||||||
# Automatically generated dependencies will be put at the end of the file.
|
# Automatically generated dependencies will be put at the end of the file.
|
||||||
@@ -284,6 +281,7 @@ file.o: file.c make.h dep.h filedef.h job.h commands.h variable.h
|
|||||||
misc.o: misc.c make.h dep.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 \
|
main.o: main.c make.h dep.h filedef.h variable.h job.h commands.h \
|
||||||
getopt.h
|
getopt.h
|
||||||
|
guile.o: guile.c make.h dep.h debug.h variable.h gmk-default.h
|
||||||
read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \
|
read.o: read.c make.h dep.h filedef.h job.h commands.h variable.h \
|
||||||
glob/glob.h
|
glob/glob.h
|
||||||
remake.o: remake.c make.h filedef.h job.h commands.h dep.h
|
remake.o: remake.c make.h filedef.h job.h commands.h dep.h
|
||||||
@@ -298,6 +296,7 @@ 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 \
|
function.o: function.c make.h filedef.h variable.h dep.h job.h \
|
||||||
commands.h amiga.h
|
commands.h amiga.h
|
||||||
vpath.o: vpath.c make.h filedef.h variable.h
|
vpath.o: vpath.c make.h filedef.h variable.h
|
||||||
|
strcache.o: strcache.c make.h hash.h
|
||||||
version.o: version.c
|
version.o: version.c
|
||||||
ar.o: ar.c make.h filedef.h dep.h
|
ar.o: ar.c make.h filedef.h dep.h
|
||||||
arscan.o: arscan.c make.h
|
arscan.o: arscan.c make.h
|
||||||
|
|||||||
303
Makefile.in
303
Makefile.in
@@ -1,303 +0,0 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
|
||||||
# `build.sh' instead.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1988,89,91,92,93,94,95,96 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Makefile for GNU Make
|
|
||||||
#
|
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
|
||||||
VPATH = @srcdir@
|
|
||||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
|
||||||
srcdir = @srcdir@
|
|
||||||
|
|
||||||
CC = @CC@
|
|
||||||
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
|
|
||||||
# Define these for your system as follows:
|
|
||||||
# -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'.
|
|
||||||
defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
|
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
|
||||||
REMOTE = @REMOTE@
|
|
||||||
|
|
||||||
# If your system doesn't have alloca, or the one provided is bad, define this.
|
|
||||||
ALLOCA = @ALLOCA@
|
|
||||||
ALLOCA_SRC = $(srcdir)/alloca.c
|
|
||||||
|
|
||||||
# If your system needs extra libraries loaded in, define them here.
|
|
||||||
# System V probably need -lPW for alloca. HP-UX 7.0's alloca in
|
|
||||||
# libPW.a is broken on HP9000s300 and HP9000s400 machines. Use
|
|
||||||
# alloca.c instead on those machines.
|
|
||||||
LOADLIBES = @LIBS@
|
|
||||||
|
|
||||||
# Any extra object files your system needs.
|
|
||||||
extras = @LIBOBJS@
|
|
||||||
|
|
||||||
# Common prefix for machine-independent installed files.
|
|
||||||
prefix = @prefix@
|
|
||||||
# Common prefix for machine-dependent installed files.
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
|
|
||||||
# Directory to install `make' in.
|
|
||||||
bindir = $(exec_prefix)/bin
|
|
||||||
# Directory to find libraries in for `-lXXX'.
|
|
||||||
libdir = $(exec_prefix)/lib
|
|
||||||
# Directory to search by default for included makefiles.
|
|
||||||
includedir = $(prefix)/include
|
|
||||||
# Directory to install the Info files in.
|
|
||||||
infodir = $(prefix)/info
|
|
||||||
# Directory to install the man page in.
|
|
||||||
mandir = $(prefix)/man/man$(manext)
|
|
||||||
# Number to put on the man page filename.
|
|
||||||
manext = 1
|
|
||||||
# Prefix to put on installed `make' binary file name.
|
|
||||||
binprefix =
|
|
||||||
# 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'
|
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
|
||||||
install_setgid = @NEED_SETGID@
|
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
|
||||||
group = @KMEM_GROUP@
|
|
||||||
|
|
||||||
# Program to install `make'.
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
# Program to install the man page.
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
# Generic install program.
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
|
|
||||||
# Program to format Texinfo source into Info files.
|
|
||||||
MAKEINFO = makeinfo
|
|
||||||
# Program to format Texinfo source into DVI files.
|
|
||||||
TEXI2DVI = texi2dvi
|
|
||||||
|
|
||||||
# Programs to make tags files.
|
|
||||||
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.o getopt1.o glob/libglob.a \
|
|
||||||
$(ALLOCA) $(extras)
|
|
||||||
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 \
|
|
||||||
$(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h \
|
|
||||||
$(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/filedef.h \
|
|
||||||
$(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h \
|
|
||||||
$(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
|
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo
|
|
||||||
|
|
||||||
all: make
|
|
||||||
info: make.info
|
|
||||||
dvi: make.dvi
|
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
|
||||||
.PHONY: all check info dvi
|
|
||||||
|
|
||||||
make.info: make.texinfo
|
|
||||||
$(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info
|
|
||||||
|
|
||||||
make.dvi: make.texinfo
|
|
||||||
$(TEXI2DVI) $(srcdir)/make.texinfo
|
|
||||||
|
|
||||||
make.ps: make.dvi
|
|
||||||
dvi2ps make.dvi > make.ps
|
|
||||||
|
|
||||||
make: $(objs)
|
|
||||||
$(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
|
|
||||||
mv -f make.new make
|
|
||||||
|
|
||||||
# -I. is needed to find config.h in the build directory.
|
|
||||||
.c.o:
|
|
||||||
$(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
|
|
||||||
$(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
|
|
||||||
|
|
||||||
# For some losing Unix makes.
|
|
||||||
SHELL = /bin/sh
|
|
||||||
@SET_MAKE@
|
|
||||||
|
|
||||||
glob/libglob.a: FORCE config.h
|
|
||||||
cd glob; $(MAKE) libglob.a
|
|
||||||
FORCE:
|
|
||||||
|
|
||||||
tagsrcs = $(srcs) $(srcdir)/remote-*.c
|
|
||||||
TAGS: $(tagsrcs)
|
|
||||||
$(ETAGS) $(tagsrcs)
|
|
||||||
tags: $(tagsrcs)
|
|
||||||
$(CTAGS) $(tagsrcs)
|
|
||||||
|
|
||||||
.PHONY: install installdirs
|
|
||||||
install: installdirs \
|
|
||||||
$(bindir)/$(binprefix)make $(infodir)/make.info \
|
|
||||||
$(mandir)/$(manprefix)make.$(manext)
|
|
||||||
|
|
||||||
installdirs:
|
|
||||||
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
|
|
||||||
|
|
||||||
$(bindir)/$(binprefix)make: make
|
|
||||||
$(INSTALL_PROGRAM) make $@.new
|
|
||||||
@if $(install_setgid); then \
|
|
||||||
if chgrp $(group) $@.new && chmod g+s $@.new; then \
|
|
||||||
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 "You may need special privileges to install $@."; \
|
|
||||||
fi; \
|
|
||||||
else true; fi
|
|
||||||
# Some systems can't deal with renaming onto a running binary.
|
|
||||||
-rm -f $@.old
|
|
||||||
-mv $@ $@.old
|
|
||||||
mv $@.new $@
|
|
||||||
|
|
||||||
$(infodir)/make.info: make.info
|
|
||||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
|
||||||
for file in $${dir}/make.info*; do \
|
|
||||||
name="`basename $$file`"; \
|
|
||||||
$(INSTALL_DATA) $$file \
|
|
||||||
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
|
||||||
done
|
|
||||||
# Run install-info only if it exists.
|
|
||||||
# Use `if' instead of just prepending `-' to the
|
|
||||||
# line so we notice real errors from install-info.
|
|
||||||
# We use `$(SHELL) -c' because some shells do not
|
|
||||||
# fail gracefully when there is an unknown command.
|
|
||||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
|
||||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
|
||||||
install-info --infodir=$(infodir) $$dir/make.info; \
|
|
||||||
else true; fi
|
|
||||||
|
|
||||||
$(mandir)/$(manprefix)make.$(manext): make.man
|
|
||||||
$(INSTALL_DATA) $(srcdir)/make.man $@
|
|
||||||
|
|
||||||
|
|
||||||
loadavg: loadavg.c config.h
|
|
||||||
$(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
|
|
||||||
loadavg.c $(LOADLIBES) -o $@
|
|
||||||
# We copy getloadavg.c into a different file rather than compiling it
|
|
||||||
# directly because some compilers clobber getloadavg.o in the process.
|
|
||||||
loadavg.c: getloadavg.c
|
|
||||||
ln $(srcdir)/getloadavg.c loadavg.c || \
|
|
||||||
cp $(srcdir)/getloadavg.c loadavg.c
|
|
||||||
check-loadavg: loadavg
|
|
||||||
@echo The system uptime program believes the load average to be:
|
|
||||||
-uptime
|
|
||||||
@echo The GNU load average checking code believes:
|
|
||||||
./loadavg
|
|
||||||
check: check-loadavg
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean realclean distclean mostlyclean
|
|
||||||
clean: glob-clean
|
|
||||||
-rm -f make loadavg *.o core make.dvi
|
|
||||||
distclean: clean glob-realclean
|
|
||||||
-rm -f Makefile config.h config.status build.sh stamp-config
|
|
||||||
-rm -f config.log config.cache
|
|
||||||
-rm -f TAGS tags
|
|
||||||
-rm -f make.?? make.??s make.log make.toc make.*aux
|
|
||||||
-rm -f loadavg.c
|
|
||||||
realclean: distclean
|
|
||||||
-rm -f make.info*
|
|
||||||
mostlyclean: clean
|
|
||||||
|
|
||||||
.PHONY: glob-clean glob-realclean
|
|
||||||
glob-clean glob-realclean:
|
|
||||||
cd glob; $(MAKE) $@
|
|
||||||
|
|
||||||
Makefile: config.status $(srcdir)/Makefile.in
|
|
||||||
$(SHELL) config.status
|
|
||||||
glob/Makefile: config.status $(srcdir)/glob/Makefile.in
|
|
||||||
$(SHELL) config.status
|
|
||||||
config.h: stamp-config ;
|
|
||||||
stamp-config: config.status $(srcdir)/config.h.in
|
|
||||||
$(SHELL) config.status
|
|
||||||
touch stamp-config
|
|
||||||
|
|
||||||
#configure: configure.in aclocal.m4
|
|
||||||
# cd $(srcdir) && autoconf $(ACFLAGS)
|
|
||||||
#config.h.in: configure.in aclocal.m4
|
|
||||||
# cd $(srcdir) && autoheader $(ACFLAGS)
|
|
||||||
|
|
||||||
# This tells versions [3.59,3.63) of GNU make not to export all variables.
|
|
||||||
.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.
|
|
||||||
$(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.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 \
|
|
||||||
getopt.h
|
|
||||||
read.o: read.c make.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 \
|
|
||||||
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 \
|
|
||||||
variable.h
|
|
||||||
variable.o: variable.c make.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 \
|
|
||||||
commands.h
|
|
||||||
vpath.o: vpath.c make.h filedef.h variable.h
|
|
||||||
version.o: version.c
|
|
||||||
ar.o: ar.c make.h filedef.h dep.h
|
|
||||||
arscan.o: arscan.c make.h
|
|
||||||
signame.o: signame.c signame.h
|
|
||||||
remote-stub.o: remote-stub.c make.h filedef.h job.h commands.h
|
|
||||||
getopt.o: getopt.c
|
|
||||||
getopt1.o: getopt1.c getopt.h
|
|
||||||
getloadavg.o: getloadavg.c
|
|
||||||
728
NEWS
728
NEWS
@@ -1,9 +1,610 @@
|
|||||||
GNU make NEWS -- history of user-visible changes. 9 May 1996
|
GNU make NEWS -*-indented-text-*-
|
||||||
|
History of user-visible changes.
|
||||||
|
05 March 2012
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
See the end of this file for copyrights and conditions.
|
||||||
See the end for copying conditions.
|
|
||||||
|
|
||||||
Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu.
|
All changes mentioned here are more fully described in the GNU make
|
||||||
|
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.99.90
|
||||||
|
|
||||||
|
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 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 feature: The "job server" capability is now supported on Windows.
|
||||||
|
Implementation contributed by Troy Runkel <Troy.Runkel@mathworks.com>
|
||||||
|
|
||||||
|
* New feature: "!=" shell assignment operator as an alternative to the
|
||||||
|
$(shell ...) function. Implemented for compatibility with BSD makefiles.
|
||||||
|
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: 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.
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
* On failure, the makefile name and linenumber of the recipe that failed 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.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.82
|
||||||
|
|
||||||
|
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!
|
||||||
|
In previous versions of make it was acceptable to list one or more explicit
|
||||||
|
targets followed by one or more pattern targets in the same rule and it
|
||||||
|
worked "as expected". However, this was not documented as acceptable and if
|
||||||
|
you listed any explicit targets AFTER the pattern targets, the entire rule
|
||||||
|
would be mis-parsed. This release removes this ability completely: make
|
||||||
|
will generate an error message if you mix explicit and pattern targets in
|
||||||
|
the same rule.
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
|
* 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 this Savannah bug:
|
||||||
|
http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=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
|
||||||
|
|
||||||
|
* A new feature exists: order-only prerequisites. These prerequisites
|
||||||
|
affect the order in which targets are built, but they do not impact
|
||||||
|
the rebuild/no-rebuild decision of their dependents. That is to say,
|
||||||
|
they allow you to require target B be built before target A, without
|
||||||
|
requiring that target A will always be rebuilt if target B is updated.
|
||||||
|
Patch for this feature provided by Greg McGary <greg@mcgary.org>.
|
||||||
|
|
||||||
|
* For compatibility with SysV make, GNU make now supports the peculiar
|
||||||
|
syntax $$@, $$(@D), and $$(@F) in the prerequisites list of a rule.
|
||||||
|
This syntax is only valid within explicit and static pattern rules: it
|
||||||
|
cannot be used in implicit (suffix or pattern) rules. Edouard G. Parmelan
|
||||||
|
<egp@free.fr> provided a patch implementing this feature; however, I
|
||||||
|
decided to implement it in a different way.
|
||||||
|
|
||||||
|
* The argument to the "ifdef" conditional is now expanded before it's
|
||||||
|
tested, so it can be a constructed variable name.
|
||||||
|
|
||||||
|
Similarly, the arguments to "export" (when not used in a variable
|
||||||
|
definition context) and "unexport" are also now expanded.
|
||||||
|
|
||||||
|
* A new function is defined: $(value ...). The argument to this
|
||||||
|
function is the _name_ of a variable. The result of the function is
|
||||||
|
the value of the variable, without having been expanded.
|
||||||
|
|
||||||
|
* A new function is defined: $(eval ...). The arguments to this
|
||||||
|
function should expand to makefile commands, which will then be
|
||||||
|
evaluated as if they had appeared in the makefile. In combination
|
||||||
|
with define/endef multiline variable definitions this is an extremely
|
||||||
|
powerful capability. The $(value ...) function is also sometimes
|
||||||
|
useful here.
|
||||||
|
|
||||||
|
* A new built-in variable is defined, $(MAKEFILE_LIST). It contains a
|
||||||
|
list of each makefile GNU make has read, or started to read, in the
|
||||||
|
order in which they were encountered. So, the last filename in the
|
||||||
|
list when a makefile is just being read (before any includes) is the
|
||||||
|
name of the current makefile.
|
||||||
|
|
||||||
|
* A new built-in variable is defined: $(.VARIABLES). When it is
|
||||||
|
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
|
||||||
|
specified GNU make will consider all targets out-of-date even if they
|
||||||
|
would otherwise not be.
|
||||||
|
|
||||||
|
* The arguments to $(call ...) functions were being stored in $1, $2,
|
||||||
|
etc. as recursive variables, even though they are fully expanded
|
||||||
|
before assignment. This means that escaped dollar signs ($$ etc.)
|
||||||
|
were not behaving properly. Now the arguments are stored as simple
|
||||||
|
variables. This may mean that if you added extra escaping to your
|
||||||
|
$(call ...) function arguments you will need to undo it now.
|
||||||
|
|
||||||
|
* The variable invoked by $(call ...) can now be recursive: unlike other
|
||||||
|
variables it can reference itself and this will not produce an error
|
||||||
|
when it is used as the first argument to $(call ...) (but only then).
|
||||||
|
|
||||||
|
* New pseudo-target .LOW_RESOLUTION_TIME, superseding the configure
|
||||||
|
option --disable-nsec-timestamps. You might need this if your build
|
||||||
|
process depends on tools like "cp -p" preserving time stamps, since
|
||||||
|
"cp -p" (right now) doesn't preserve the subsecond portion of a time
|
||||||
|
stamp.
|
||||||
|
|
||||||
|
* Updated translations for French, Galician, German, Japanese, Korean,
|
||||||
|
and Russian. New translations for Croatian, Danish, Hebrew, and
|
||||||
|
Turkish.
|
||||||
|
|
||||||
|
* Updated internationalization support to Gettext 0.11.5.
|
||||||
|
GNU make now uses Gettext's "external" feature, and does not include
|
||||||
|
any internationalization code itself. Configure will search your
|
||||||
|
system for an existing implementation of GNU Gettext (only GNU Gettext
|
||||||
|
is acceptable) and use it if it exists. If not, NLS will be disabled.
|
||||||
|
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
|
||||||
|
|
||||||
|
* .SECONDARY with no prerequisites now prevents any target from being
|
||||||
|
removed because make thinks it's an intermediate file, not just those
|
||||||
|
listed in the makefile.
|
||||||
|
|
||||||
|
* New configure option --disable-nsec-timestamps, but this was
|
||||||
|
superseded in later versions by the .LOW_RESOLUTION_TIME pseudo-target.
|
||||||
|
|
||||||
|
Version 3.79
|
||||||
|
|
||||||
|
* GNU make optionally supports internationalization and locales via the
|
||||||
|
GNU gettext (or local gettext if suitable) package. See the ABOUT-NLS
|
||||||
|
file for more information on configuring GNU make for NLS.
|
||||||
|
|
||||||
|
* Previously, GNU make quoted variables such as MAKEFLAGS and
|
||||||
|
MAKEOVERRIDES for proper parsing by the shell. This allowed them to
|
||||||
|
be used within make build scripts. However, using them there is not
|
||||||
|
proper behavior: they are meant to be passed to subshells via the
|
||||||
|
environment. Unfortunately the values were not quoted properly to be
|
||||||
|
passed through the environment. This meant that make didn't properly
|
||||||
|
pass some types of command line values to submakes.
|
||||||
|
|
||||||
|
With this version we change that behavior: now these variables are
|
||||||
|
quoted properly for passing through the environment, which is the
|
||||||
|
correct way to do it. If you previously used these variables
|
||||||
|
explicitly within a make rule you may need to re-examine your use for
|
||||||
|
correctness given this change.
|
||||||
|
|
||||||
|
* A new pseudo-target .NOTPARALLEL is available. If defined, the
|
||||||
|
current makefile is run serially regardless of the value of -j.
|
||||||
|
However, submakes are still eligible for parallel execution.
|
||||||
|
|
||||||
|
* The --debug option has changed: it now allows optional flags
|
||||||
|
controlling the amount and type of debugging output. By default only
|
||||||
|
a minimal amount information is generated, displaying the names of
|
||||||
|
"normal" targets (not makefiles) that were deemed out of date and in
|
||||||
|
need of being rebuilt.
|
||||||
|
|
||||||
|
Note that the -d option behaves as before: it takes no arguments and
|
||||||
|
all debugging information is generated.
|
||||||
|
|
||||||
|
* The `-p' (print database) output now includes filename and linenumber
|
||||||
|
information for variable definitions, to aid debugging.
|
||||||
|
|
||||||
|
* The wordlist function no longer reverses its arguments if the "start"
|
||||||
|
value is greater than the "end" value. If that's true, nothing is
|
||||||
|
returned.
|
||||||
|
|
||||||
|
* Hartmut Becker provided many updates for the VMS port of GNU make.
|
||||||
|
See the readme.vms file for more details.
|
||||||
|
|
||||||
|
Version 3.78
|
||||||
|
|
||||||
|
* Two new functions, $(error ...) and $(warning ...) are available. The
|
||||||
|
former will cause make to fail and exit immediately upon expansion of
|
||||||
|
the function, with the text provided as the error message. The latter
|
||||||
|
causes the text provided to be printed as a warning message, but make
|
||||||
|
proceeds normally.
|
||||||
|
|
||||||
|
* A new function $(call ...) is available. This allows users to create
|
||||||
|
their own parameterized macros and invoke them later. Original
|
||||||
|
implementation of this function was provided by Han-Wen Nienhuys
|
||||||
|
<hanwen@cs.uu.nl>.
|
||||||
|
|
||||||
|
* A new function $(if ...) is available. It provides if-then-else
|
||||||
|
capabilities in a builtin function. Original implementation of this
|
||||||
|
function was provided by Han-Wen Nienhuys <hanwen@cs.uu.nl>.
|
||||||
|
|
||||||
|
* Make defines a new variable, .LIBPATTERNS. This variable controls how
|
||||||
|
library dependency expansion (dependencies like ``-lfoo'') is performed.
|
||||||
|
|
||||||
|
* Make accepts CRLF sequences as well as traditional LF, for
|
||||||
|
compatibility with makefiles created on other operating systems.
|
||||||
|
|
||||||
|
* Make accepts a new option: -R, or --no-builtin-variables. This option
|
||||||
|
disables the definition of the rule-specific builtin variables (CC,
|
||||||
|
LD, AR, etc.). Specifying this option forces -r (--no-builtin-rules)
|
||||||
|
as well.
|
||||||
|
|
||||||
|
* A "job server" feature, suggested by Howard Chu <hyc@highlandsun.com>.
|
||||||
|
|
||||||
|
On systems that support POSIX pipe(2) semantics, GNU make can now pass
|
||||||
|
-jN options to submakes rather than forcing them all to use -j1. The
|
||||||
|
top make and all its sub-make processes use a pipe to communicate with
|
||||||
|
each other to ensure that no more than N jobs are started across all
|
||||||
|
makes. To get the old behavior of -j back, you can configure make
|
||||||
|
with the --disable-job-server option.
|
||||||
|
|
||||||
|
* The confusing term "dependency" has been replaced by the more accurate
|
||||||
|
and standard term "prerequisite", both in the manual and in all GNU make
|
||||||
|
output.
|
||||||
|
|
||||||
|
* GNU make supports the "big archive" library format introduced in AIX 4.3.
|
||||||
|
|
||||||
|
* GNU make supports large files on AIX, HP-UX, and IRIX. These changes
|
||||||
|
were provided by Paul Eggert <eggert@twinsun.com>. (Large file
|
||||||
|
support for Solaris and Linux was introduced in 3.77, but the
|
||||||
|
configuration had issues: these have also been resolved).
|
||||||
|
|
||||||
|
* The Windows 95/98/NT (W32) version of GNU make now has native support
|
||||||
|
for the Cygnus Cygwin release B20.1 shell (bash).
|
||||||
|
|
||||||
|
* The GNU make regression test suite, long available separately "under
|
||||||
|
the table", has been integrated into the release. You can invoke it
|
||||||
|
by running "make check" in the distribution. Note that it requires
|
||||||
|
Perl (either Perl 4 or Perl 5) to run.
|
||||||
|
|
||||||
|
Version 3.77
|
||||||
|
|
||||||
|
* Implement BSD make's "?=" variable assignment operator. The variable
|
||||||
|
is assigned the specified value only if that variable is not already
|
||||||
|
defined.
|
||||||
|
|
||||||
|
* Make defines a new variable, "CURDIR", to contain the current working
|
||||||
|
directory (after the -C option, if any, has been processed).
|
||||||
|
Modifying this variable has no effect on the operation of make.
|
||||||
|
|
||||||
|
* Make defines a new default RCS rule, for new-style master file
|
||||||
|
storage: ``% :: RCS/%'' (note no ``,v'' suffix).
|
||||||
|
|
||||||
|
Make defines new default rules for DOS-style C++ file naming
|
||||||
|
conventions, with ``.cpp'' suffixes. All the same rules as for
|
||||||
|
``.cc'' and ``.C'' suffixes are provided, along with LINK.cpp and
|
||||||
|
COMPILE.cpp macros (which default to the same value as LINK.cc and
|
||||||
|
COMPILE.cc). Note CPPFLAGS is still C preprocessor flags! You should
|
||||||
|
use CXXFLAGS to change C++ compiler flags.
|
||||||
|
|
||||||
|
* A new feature, "target-specific variable values", has been added.
|
||||||
|
This is a large change so please see the appropriate sections of the
|
||||||
|
manual for full details. Briefly, syntax like this:
|
||||||
|
|
||||||
|
TARGET: VARIABLE = VALUE
|
||||||
|
|
||||||
|
defines VARIABLE as VALUE within the context of TARGET. This is
|
||||||
|
similar to SunOS make's "TARGET := VARIABLE = VALUE" feature. Note
|
||||||
|
that the assignment may be of any type, not just recursive, and that
|
||||||
|
the override keyword is available.
|
||||||
|
|
||||||
|
COMPATIBILITY: This new syntax means that if you have any rules where
|
||||||
|
the first or second dependency has an equal sign (=) in its name,
|
||||||
|
you'll have to escape them with a backslash: "foo : bar\=baz".
|
||||||
|
Further, if you have any dependencies which already contain "\=",
|
||||||
|
you'll have to escape both of them: "foo : bar\\\=baz".
|
||||||
|
|
||||||
|
* A new appendix listing the most common error and warning messages
|
||||||
|
generated by GNU make, with some explanation, has been added to the
|
||||||
|
GNU make User's Manual.
|
||||||
|
|
||||||
|
* Updates to the GNU make Customs library support (see README.customs).
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
|
* Small (but serious) bug fix. Quick rollout to get into the GNU source CD.
|
||||||
|
|
||||||
|
Version 3.76
|
||||||
|
|
||||||
|
* GNU make now uses automake to control Makefile.in generation. This
|
||||||
|
should make it more consistent with the GNU standards.
|
||||||
|
|
||||||
|
* VPATH functionality has been changed to incorporate the VPATH+ patch,
|
||||||
|
previously maintained by Paul Smith <psmith@baynetworks.com>. See the
|
||||||
|
manual.
|
||||||
|
|
||||||
|
* Make defines a new variable, `MAKECMDGOALS', to contain the goals that
|
||||||
|
were specified on the command line, if any. Modifying this variable
|
||||||
|
has no effect on the operation of make.
|
||||||
|
|
||||||
|
* A new function, `$(wordlist S,E,TEXT)', is available: it returns a
|
||||||
|
list of words from number S to number E (inclusive) of TEXT.
|
||||||
|
|
||||||
|
* Instead of an error, detection of future modification times gives a
|
||||||
|
warning and continues. The warning is repeated just before GNU make
|
||||||
|
exits, so it is less likely to be lost.
|
||||||
|
|
||||||
|
* Fix the $(basename) and $(suffix) functions so they only operate on
|
||||||
|
the last filename, not the entire string:
|
||||||
|
|
||||||
|
Command Old Result New Result
|
||||||
|
------- ---------- ----------
|
||||||
|
$(basename a.b) a a
|
||||||
|
$(basename a.b/c) a a.b/c
|
||||||
|
$(suffix a.b) b b
|
||||||
|
$(suffix a.b/c) b/c <empty>
|
||||||
|
|
||||||
|
* The $(strip) function now removes newlines as well as TABs and spaces.
|
||||||
|
|
||||||
|
* The $(shell) function now changes CRLF (\r\n) pairs to a space as well
|
||||||
|
as newlines (\n).
|
||||||
|
|
||||||
|
* Updates to the Windows 95/NT port from Rob Tulloh (see README.W32).
|
||||||
|
|
||||||
|
* Eli Zaretskii has updated the port to 32-bit protected mode on MSDOS
|
||||||
|
and MS-Windows, building with the DJGPP v2 port of GNU C/C++ compiler
|
||||||
|
and utilities. See README.DOS for details, and direct all questions
|
||||||
|
concerning this port to Eli Zaretskii <eliz@is.elta.co.il> or DJ
|
||||||
|
Delorie <dj@delorie.com>.
|
||||||
|
|
||||||
|
* John W. Eaton has updated the VMS port to support libraries and VPATH.
|
||||||
|
|
||||||
Version 3.75
|
Version 3.75
|
||||||
|
|
||||||
@@ -23,7 +624,7 @@ Version 3.75
|
|||||||
details, and direct all Amiga-related questions to <digulla@fh-konstanz.de>.
|
details, and direct all Amiga-related questions to <digulla@fh-konstanz.de>.
|
||||||
|
|
||||||
* Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95.
|
* Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95.
|
||||||
See README.WIN32 for details, and direct all Windows-related questions to
|
See README.W32 for details, and direct all Windows-related questions to
|
||||||
<rob_tulloh@tivoli.com>.
|
<rob_tulloh@tivoli.com>.
|
||||||
|
|
||||||
Version 3.73
|
Version 3.73
|
||||||
@@ -44,7 +645,7 @@ Version 3.72
|
|||||||
|
|
||||||
* The `MAKEFLAGS' variable (in the environment or in a makefile) can now
|
* The `MAKEFLAGS' variable (in the environment or in a makefile) can now
|
||||||
contain variable definitions itself; these are treated just like
|
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
|
variable definitions from the environment value of `MAKEFLAGS' or from
|
||||||
the command line, into the `MAKEFLAGS' value exported to children. The
|
the command line, into the `MAKEFLAGS' value exported to children. The
|
||||||
`MAKEOVERRIDES' variable previously included in the value of `$(MAKE)'
|
`MAKEOVERRIDES' variable previously included in the value of `$(MAKE)'
|
||||||
@@ -53,8 +654,8 @@ Version 3.72
|
|||||||
in the environment when its size is limited.
|
in the environment when its size is limited.
|
||||||
|
|
||||||
* If `.DELETE_ON_ERROR' appears as a target, Make will delete the target of
|
* 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,
|
a rule if it has changed when its recipe exits with a nonzero status,
|
||||||
just as when the commands get a signal.
|
just as when the recipe gets a signal.
|
||||||
|
|
||||||
* The automatic variable `$+' is new. It lists all the dependencies like
|
* The automatic variable `$+' is new. It lists all the dependencies like
|
||||||
`$^', but preserves duplicates listed in the makefile. This is useful
|
`$^', but preserves duplicates listed in the makefile. This is useful
|
||||||
@@ -64,9 +665,9 @@ Version 3.72
|
|||||||
* You can now specify the `.IGNORE' and `.SILENT' special targets with
|
* You can now specify the `.IGNORE' and `.SILENT' special targets with
|
||||||
dependencies to limit their effects to those files. If a file appears as
|
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
|
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
|
recipe 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
|
of `.SILENT', then the recipe to update that file will not be printed
|
||||||
before they are run. (This change was made to conform to POSIX.2.)
|
before it is run. (This change was made to conform to POSIX.2.)
|
||||||
|
|
||||||
Version 3.71
|
Version 3.71
|
||||||
|
|
||||||
@@ -114,22 +715,22 @@ Version 3.69
|
|||||||
Make, and a string describing the remote job support compiled in (if any).
|
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'.
|
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
|
* Commands in an invocation of the `shell' function are no longer run
|
||||||
a modified environment like target commands are. As in versions before
|
with a modified environment like recipes are. As in versions before
|
||||||
3.68, they now run with the environment that `make' started with. We
|
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
|
have reversed the change made in version 3.68 because it turned out to
|
||||||
cause a paradoxical situation in cases like:
|
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
|
When Make attempted to put this variable in the environment for a
|
||||||
command, it would try expand the value by running the shell command
|
recipe, it would try expand the value by running the shell command
|
||||||
`echo value'. In version 3.68, because it constructed an environment
|
`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
|
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.
|
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
|
* The recipe given for `.DEFAULT' is now used for phony targets with no
|
||||||
commands.
|
recipe.
|
||||||
|
|
||||||
Version 3.68
|
Version 3.68
|
||||||
|
|
||||||
@@ -153,8 +754,8 @@ Version 3.68
|
|||||||
no error (not even a warning) for a nonexistent makefile.
|
no error (not even a warning) for a nonexistent makefile.
|
||||||
|
|
||||||
* Commands in an invocation of the `shell' function are now run with a
|
* 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
|
modified environment like recipes are, so you can use `export' et al
|
||||||
al to set up variables for them. They used to run with the environment
|
to set up variables for them. They used to run with the environment
|
||||||
that `make' started with.
|
that `make' started with.
|
||||||
|
|
||||||
Version 3.66
|
Version 3.66
|
||||||
@@ -198,8 +799,8 @@ Version 3.63
|
|||||||
change directory, and recursive use of Make, now set `-w' automatically.
|
change directory, and recursive use of Make, now set `-w' automatically.
|
||||||
|
|
||||||
* Multiple double-colon rules for the same target will no longer have their
|
* 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
|
recipes 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 trying to change the file at the same time and interfering with
|
||||||
one another.
|
one another.
|
||||||
|
|
||||||
* The `SHELL' variable is now never taken from the environment.
|
* The `SHELL' variable is now never taken from the environment.
|
||||||
@@ -211,7 +812,7 @@ Version 3.63
|
|||||||
that tells you what all the options are and what they do. Try `make --help'.
|
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
|
* 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
|
Make runs. Instead, only variables specified on the command line or in
|
||||||
the environment are exported by default. To export others, use:
|
the environment are exported by default. To export others, use:
|
||||||
export VARIABLE
|
export VARIABLE
|
||||||
@@ -226,8 +827,8 @@ Version 3.63
|
|||||||
to get the old behavior. See the node `Variables/Recursion' in the manual
|
to get the old behavior. See the node `Variables/Recursion' in the manual
|
||||||
for a full description.
|
for a full description.
|
||||||
|
|
||||||
* The commands from the `.DEFAULT' special target are only applied to
|
* The recipe from the `.DEFAULT' special target is only applied to
|
||||||
targets which have no rules at all, not all targets with no commands.
|
targets which have no rules at all, not all targets with no recipe.
|
||||||
This change was made for compatibility with Unix make.
|
This change was made for compatibility with Unix make.
|
||||||
|
|
||||||
* All fatal error messages now contain `***', so they are easy to find in
|
* All fatal error messages now contain `***', so they are easy to find in
|
||||||
@@ -279,8 +880,8 @@ Version 3.61
|
|||||||
* Built-in rules for C++ source files with the `.C' suffix.
|
* Built-in rules for C++ source files with the `.C' suffix.
|
||||||
We still recommend that you use `.cc' instead.
|
We still recommend that you use `.cc' instead.
|
||||||
|
|
||||||
* If commands are given too many times for a single target,
|
* If a recipe is given too many times for a single target, the last one
|
||||||
the last set given is used, and a warning message is printed.
|
given is used, and a warning message is printed.
|
||||||
|
|
||||||
* Error messages about makefiles are in standard GNU error format,
|
* Error messages about makefiles are in standard GNU error format,
|
||||||
so C-x ` in Emacs works on them.
|
so C-x ` in Emacs works on them.
|
||||||
@@ -297,7 +898,7 @@ Version 3.60
|
|||||||
|
|
||||||
* Archives on AIX now supposedly work.
|
* 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.
|
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.
|
This is how Unix make behaves, and this behavior is mandated by POSIX.2.
|
||||||
|
|
||||||
@@ -322,18 +923,18 @@ Version 3.57
|
|||||||
|
|
||||||
Version 3.55
|
Version 3.55
|
||||||
|
|
||||||
* There is now a Unix man page for GNU Make. It is certainly not a replacement
|
* There is now a Unix man page for GNU Make. It is certainly not a
|
||||||
for the Texinfo manual, but it documents the basic functionality and the
|
replacement for the Texinfo manual, but it documents the basic
|
||||||
switches. For full documentation, you should still read the Texinfo manual.
|
functionality and the switches. For full documentation, you should
|
||||||
Thanks to Dennis Morse of Stanford University for contributing the initial
|
still read the Texinfo manual. Thanks to Dennis Morse of Stanford
|
||||||
version of this.
|
University for contributing the initial version of this.
|
||||||
|
|
||||||
* Variables which are defined by default (e.g., `CC') will no longer be put
|
* Variables which are defined by default (e.g., `CC') will no longer be
|
||||||
into the environment for child processes. (If these variables are reset by the
|
put into the environment for child processes. (If these variables are
|
||||||
environment, makefiles, or the command line, they will still go into the
|
reset by the environment, makefiles, or the command line, they will
|
||||||
environment.)
|
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
|
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
|
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
|
Make will no longer go into an infinite loop when fed the makefiles that
|
||||||
@@ -355,11 +956,11 @@ directory if it exists.
|
|||||||
|
|
||||||
* The automatic variable `$($/)' is no longer defined.
|
* The automatic variable `$($/)' is no longer defined.
|
||||||
|
|
||||||
* Leading `+' characters on a command line make that line be executed even
|
* Leading `+' characters on a recipe line make that line be executed even
|
||||||
under -n, -t, or -q (as if the line contained `$(MAKE)').
|
under -n, -t, or -q (as if the line contained `$(MAKE)').
|
||||||
|
|
||||||
* For command lines containing `$(MAKE)', `${MAKE}', or leading `+' characters,
|
* For recipe lines containing `$(MAKE)', `${MAKE}', or leading `+' characters,
|
||||||
only those lines are executed, not their entire rules.
|
only those lines are executed, not the entire recipe.
|
||||||
(This is how Unix make behaves for lines containing `$(MAKE)' or `${MAKE}'.)
|
(This is how Unix make behaves for lines containing `$(MAKE)' or `${MAKE}'.)
|
||||||
|
|
||||||
Version 3.50
|
Version 3.50
|
||||||
@@ -379,7 +980,7 @@ pattern contains no %.
|
|||||||
|
|
||||||
* The `wildcard' variable expansion function now expands ~ and ~USER.
|
* The `wildcard' variable expansion function now expands ~ and ~USER.
|
||||||
|
|
||||||
* Messages indicating failed commands now contain the target name:
|
* Messages indicating failed recipe lines now contain the target name:
|
||||||
make: *** [target] Error 1
|
make: *** [target] Error 1
|
||||||
|
|
||||||
* The `-p' output format has been changed somewhat to look more like
|
* The `-p' output format has been changed somewhat to look more like
|
||||||
@@ -392,7 +993,7 @@ Version 3.47
|
|||||||
* The `-l' switch with no argument removes any previous load-average limit.
|
* The `-l' switch with no argument removes any previous load-average limit.
|
||||||
|
|
||||||
* When the `-w' switch is in effect, and Make has updated makefiles,
|
* When the `-w' switch is in effect, and Make has updated makefiles,
|
||||||
it will write a `Leaving directory' messagfe before re-executing itself.
|
it will write a `Leaving directory' message before re-executing itself.
|
||||||
This makes the `directory change tracking' changes to Emacs's compilation
|
This makes the `directory change tracking' changes to Emacs's compilation
|
||||||
commands work properly.
|
commands work properly.
|
||||||
|
|
||||||
@@ -407,7 +1008,7 @@ Version 3.45
|
|||||||
specified without an argument (indicating infinite jobs).
|
specified without an argument (indicating infinite jobs).
|
||||||
The `-l' switch is not always put in the MAKEFLAGS and MFLAGS variables.
|
The `-l' switch is not always put in the MAKEFLAGS and MFLAGS variables.
|
||||||
|
|
||||||
* Make no longer checks hashed directories after running commands.
|
* Make no longer checks hashed directories after running recipes.
|
||||||
The behavior implemented in 3.41 caused too much slowdown.
|
The behavior implemented in 3.41 caused too much slowdown.
|
||||||
|
|
||||||
Version 3.44
|
Version 3.44
|
||||||
@@ -433,7 +1034,7 @@ are not used (and these are used by BSD make).
|
|||||||
|
|
||||||
Version 3.41
|
Version 3.41
|
||||||
|
|
||||||
* Make now checks to see if its hashed directories are changed by commands.
|
* 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.
|
Other makes that hash directories (Sun, 4.3 BSD) don't do this.
|
||||||
|
|
||||||
Version 3.39
|
Version 3.39
|
||||||
@@ -466,11 +1067,11 @@ Version 3.30
|
|||||||
* A variable reference like `$(foo:a=b)', if `a' contains a `%', is
|
* 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
|
* New default implicit rules for .S (cpp, then as), and .sh (copy and
|
||||||
executable). All default implicit rules that use cpp (even indirectly), use
|
make executable). All default implicit rules that use cpp (even
|
||||||
$(CPPFLAGS).
|
indirectly), use $(CPPFLAGS).
|
||||||
|
|
||||||
Version 3.29
|
Version 3.29
|
||||||
|
|
||||||
@@ -545,35 +1146,32 @@ Version 3.12.
|
|||||||
|
|
||||||
* Makefiles will be updated and re-read if necessary.
|
* 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.
|
* Error messages will contain the level of Make recursion, if any.
|
||||||
|
|
||||||
* The `MAKEFLAGS' and `MFLAGS' variables will be scanned for options after
|
* 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.
|
* 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.)
|
(This is how both the BSD and System V versions of Make do it.)
|
||||||
|
|
||||||
Version 3.05
|
Version 3.05
|
||||||
|
|
||||||
(Changes from versions 1 through 3.05 were never recorded. Sorry.)
|
(Changes from versions 1 through 3.05 were never recorded. Sorry.)
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright information:
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
Permission is granted to anyone to make or distribute verbatim copies
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
of this document as received, in any medium, provided that the
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
copyright notice and this permission notice are preserved,
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
thus giving the recipient permission to redistribute in turn.
|
|
||||||
|
|
||||||
Permission is granted to distribute modified versions
|
You should have received a copy of the GNU General Public License along with
|
||||||
of this document, or of portions of it,
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
under the above conditions, provided also that they
|
|
||||||
carry prominent notices stating who last changed them.
|
|
||||||
|
|
||||||
Local variables:
|
|
||||||
version-control: never
|
|
||||||
end:
|
|
||||||
|
|||||||
@@ -1,43 +1,40 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
# -*-Makefile-*- to build GNU make with nmake
|
||||||
# `build_w32.bat' instead.
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 1996 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-2012 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
|
||||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
#
|
|
||||||
# NMakefile for GNU Make
|
|
||||||
#
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
LINK = link
|
LINK = link
|
||||||
CC = cl
|
CC = cl
|
||||||
|
MAKE = nmake
|
||||||
|
|
||||||
OUTDIR=.
|
OUTDIR=.
|
||||||
MAKEFILE=NMakefile
|
MAKEFILE=NMakefile
|
||||||
SUBPROC_MAKEFILE=NMakefile
|
SUBPROC_MAKEFILE=NMakefile
|
||||||
|
|
||||||
CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES
|
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 /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
|
CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
|
||||||
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||||
|
|
||||||
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
|
/INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
|
||||||
/OUT:WinDebug/make.exe /DEBUG
|
|
||||||
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /MACHINE:I386 /OUT:WinRel/make.exe
|
/INCREMENTAL:no /OUT:WinRel/make.exe
|
||||||
|
|
||||||
all: config.h subproc Release Debug
|
all: config.h subproc Release Debug
|
||||||
|
|
||||||
@@ -49,25 +46,34 @@ all: config.h subproc Release Debug
|
|||||||
#
|
#
|
||||||
subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
|
subproc: w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib
|
||||||
|
|
||||||
w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib:
|
w32/subproc/WinDebug/subproc.lib w32/subproc/WinRel/subproc.lib: w32/subproc/misc.c w32/subproc/sub_proc.c w32/subproc/w32err.c
|
||||||
subproc.bat $(SUBPROC_MAKEFILE)
|
subproc.bat $(SUBPROC_MAKEFILE) $(MAKE)
|
||||||
|
if exist WinDebug\make.exe erase WinDebug\make.exe
|
||||||
|
if exist WinRel\make.exe erase WinRel\make.exe
|
||||||
|
|
||||||
config.h: config.h.WIN32
|
config.h: config.h.W32
|
||||||
copy $? $@
|
copy $? $@
|
||||||
|
|
||||||
Release:
|
Release:
|
||||||
nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
|
$(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_release)" CFLAGS="$(CFLAGS_release)" OUTDIR=WinRel WinRel/make.exe
|
||||||
Debug:
|
Debug:
|
||||||
nmake /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
|
$(MAKE) /f $(MAKEFILE) LDFLAGS="$(LDFLAGS_debug)" CFLAGS="$(CFLAGS_debug)" OUTDIR=WinDebug WinDebug/make.exe
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rmdir /s /q WinDebug WinRel
|
if exist WinDebug\nul rmdir /s /q WinDebug
|
||||||
|
if exist WinRel\nul rmdir /s /q WinRel
|
||||||
|
if exist w32\subproc\WinDebug\nul rmdir /s /q w32\subproc\WinDebug
|
||||||
|
if exist w32\subproc\WinRel\nul rmdir /s /q w32\subproc\WinRel
|
||||||
|
if exist config.h erase config.h
|
||||||
|
erase *.pdb
|
||||||
|
|
||||||
$(OUTDIR):
|
$(OUTDIR):
|
||||||
if not exist .\$@\nul mkdir .\$@
|
if not exist .\$@\nul mkdir .\$@
|
||||||
|
|
||||||
LIBS = kernel32.lib user32.lib advapi32.lib
|
LIBS = kernel32.lib user32.lib advapi32.lib
|
||||||
|
|
||||||
|
#guile = $(OUTDIR)/guile.obj
|
||||||
|
|
||||||
OBJS = \
|
OBJS = \
|
||||||
$(OUTDIR)/ar.obj \
|
$(OUTDIR)/ar.obj \
|
||||||
$(OUTDIR)/arscan.obj \
|
$(OUTDIR)/arscan.obj \
|
||||||
@@ -80,6 +86,7 @@ OBJS = \
|
|||||||
$(OUTDIR)/getloadavg.obj \
|
$(OUTDIR)/getloadavg.obj \
|
||||||
$(OUTDIR)/getopt.obj \
|
$(OUTDIR)/getopt.obj \
|
||||||
$(OUTDIR)/getopt1.obj \
|
$(OUTDIR)/getopt1.obj \
|
||||||
|
$(OUTDIR)/hash.obj \
|
||||||
$(OUTDIR)/implicit.obj \
|
$(OUTDIR)/implicit.obj \
|
||||||
$(OUTDIR)/job.obj \
|
$(OUTDIR)/job.obj \
|
||||||
$(OUTDIR)/main.obj \
|
$(OUTDIR)/main.obj \
|
||||||
@@ -89,13 +96,15 @@ OBJS = \
|
|||||||
$(OUTDIR)/remote-stub.obj \
|
$(OUTDIR)/remote-stub.obj \
|
||||||
$(OUTDIR)/rule.obj \
|
$(OUTDIR)/rule.obj \
|
||||||
$(OUTDIR)/signame.obj \
|
$(OUTDIR)/signame.obj \
|
||||||
|
$(OUTDIR)/strcache.obj \
|
||||||
$(OUTDIR)/variable.obj \
|
$(OUTDIR)/variable.obj \
|
||||||
$(OUTDIR)/version.obj \
|
$(OUTDIR)/version.obj \
|
||||||
$(OUTDIR)/vpath.obj \
|
$(OUTDIR)/vpath.obj \
|
||||||
$(OUTDIR)/glob.obj \
|
$(OUTDIR)/glob.obj \
|
||||||
$(OUTDIR)/fnmatch.obj \
|
$(OUTDIR)/fnmatch.obj \
|
||||||
$(OUTDIR)/dirent.obj \
|
$(OUTDIR)/dirent.obj \
|
||||||
$(OUTDIR)/pathstuff.obj
|
$(OUTDIR)/pathstuff.obj \
|
||||||
|
$(guile)
|
||||||
|
|
||||||
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
$(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
||||||
$(LINK) @<<
|
$(LINK) @<<
|
||||||
@@ -105,29 +114,6 @@ $(OUTDIR)/make.exe: $(OUTDIR) $(OBJS)
|
|||||||
.c{$(OUTDIR)}.obj:
|
.c{$(OUTDIR)}.obj:
|
||||||
$(CC) $(CFLAGS) /c $<
|
$(CC) $(CFLAGS) /c $<
|
||||||
|
|
||||||
$(OUTDIR)/ar.obj : ar.c make.h filedef.h dep.h
|
|
||||||
$(OUTDIR)/arscan.obj : arscan.c make.h
|
|
||||||
$(OUTDIR)/commands.obj : commands.c
|
|
||||||
$(OUTDIR)/default.obj : default.c make.h rule.h dep.h filedef.h job.h commands.h variable.h
|
|
||||||
$(OUTDIR)/dir.obj : dir.c make.h
|
|
||||||
$(OUTDIR)/expand.obj : expand.c make.h filedef.h job.h commands.h variable.h
|
|
||||||
$(OUTDIR)/file.obj : file.c make.h dep.h filedef.h job.h commands.h variable.h
|
|
||||||
$(OUTDIR)/function.obj : function.c make.h filedef.h variable.h dep.h job.h commands.h
|
|
||||||
$(OUTDIR)/getloadavg.obj : getloadavg.c
|
|
||||||
$(OUTDIR)/getopt.obj : getopt.c
|
|
||||||
$(OUTDIR)/getopt1.obj : getopt1.c getopt.h
|
|
||||||
$(OUTDIR)/implicit.obj : implicit.c make.h rule.h dep.h filedef.h
|
|
||||||
$(OUTDIR)/job.obj : job.c make.h job.h filedef.h commands.h variable.h
|
|
||||||
$(OUTDIR)/main.obj : main.c make.h dep.h filedef.h variable.h job.h commands.h getopt.h
|
|
||||||
$(OUTDIR)/misc.obj : misc.c make.h dep.h
|
|
||||||
$(OUTDIR)/read.obj : read.c make.h dep.h filedef.h job.h commands.h variable.h glob/glob.h
|
|
||||||
$(OUTDIR)/remake.obj : remake.c make.h filedef.h job.h commands.h dep.h
|
|
||||||
$(OUTDIR)/remote-stub.obj : remote-stub.c make.h filedef.h job.h commands.h
|
|
||||||
$(OUTDIR)/rule.obj : rule.c make.h dep.h filedef.h job.h commands.h variable.h rule.h
|
|
||||||
$(OUTDIR)/signame.obj : signame.c signame.h
|
|
||||||
$(OUTDIR)/variable.obj : variable.c make.h dep.h filedef.h job.h commands.h variable.h
|
|
||||||
$(OUTDIR)/version.obj : version.c
|
|
||||||
$(OUTDIR)/vpath.obj : vpath.c make.h filedef.h variable.h
|
|
||||||
$(OUTDIR)/glob.obj : glob/glob.c
|
$(OUTDIR)/glob.obj : glob/glob.c
|
||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
$(OUTDIR)/fnmatch.obj : glob/fnmatch.c
|
$(OUTDIR)/fnmatch.obj : glob/fnmatch.c
|
||||||
@@ -136,4 +122,3 @@ $(OUTDIR)/dirent.obj : w32/compat/dirent.c
|
|||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
$(OUTDIR)/pathstuff.obj : w32/pathstuff.c
|
||||||
$(CC) $(CFLAGS) /c $?
|
$(CC) $(CFLAGS) /c $?
|
||||||
|
|
||||||
|
|||||||
37
README
37
README
@@ -1,37 +0,0 @@
|
|||||||
This directory contains the 3.75 test release of GNU Make.
|
|
||||||
All bugs reported for previous test releases have been fixed.
|
|
||||||
Some bugs surely remain.
|
|
||||||
|
|
||||||
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
|
|
||||||
in the current directory. Then you will have a Make program that you can
|
|
||||||
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.
|
|
||||||
|
|
||||||
See README.WIN32 for details about GNU Make on Windows NT or 95.
|
|
||||||
See README.Amiga for details about GNU Make on AmigaDOS.
|
|
||||||
The MSDOS port of GNU Make is available as part of DJGPP; see the
|
|
||||||
WWW page http://www.delorie.com/djgpp/ for more information.
|
|
||||||
|
|
||||||
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
|
||||||
that if you compile make with `cc -O' on AIX 3.2, it will not work correctly.
|
|
||||||
It is said that using `cc' without `-O' does work.
|
|
||||||
|
|
||||||
One area that is often a problem in configuration and porting is the code
|
|
||||||
to check the system's current load average. To make it easier to test and
|
|
||||||
debug this code, you can do `make check-loadavg' to see if it works
|
|
||||||
properly on your system. (You must run `configure' beforehand, but you
|
|
||||||
need not build Make itself to run this test.)
|
|
||||||
|
|
||||||
See the file NEWS for what has changed since previous releases.
|
|
||||||
|
|
||||||
GNU Make is fully documented in make.texinfo. See the section entitled
|
|
||||||
`Problems and Bugs' for information on submitting bug reports.
|
|
||||||
|
|
||||||
GNU Make is free software. See the file COPYING for copying conditions.
|
|
||||||
18
README.Amiga
18
README.Amiga
@@ -3,7 +3,7 @@ Author: GNU, Amiga port by Aaron "Optimizer" Digulla
|
|||||||
Uploader: Aaron "Optimizer" Digulla (digulla@fh-konstanz.de)
|
Uploader: Aaron "Optimizer" Digulla (digulla@fh-konstanz.de)
|
||||||
Type: dev/c
|
Type: dev/c
|
||||||
|
|
||||||
This is a pure Amiga port of GNU make 3.74. It needs no extra libraries or
|
This is a pure Amiga port of GNU make. It needs no extra libraries or
|
||||||
anything. It has the following features (in addition to any features of
|
anything. It has the following features (in addition to any features of
|
||||||
GNU make):
|
GNU make):
|
||||||
|
|
||||||
@@ -59,3 +59,19 @@ If you plan to use recursive makes, install make resident:
|
|||||||
|
|
||||||
Resident make Add
|
Resident make Add
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1995-2012 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/>.
|
||||||
|
|||||||
340
README.DOS.template
Normal file
340
README.DOS.template
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
Port of GNU Make to 32-bit protected mode on MSDOS and MS-Windows.
|
||||||
|
|
||||||
|
Builds with DJGPP v2 port of GNU C/C++ compiler and utilities.
|
||||||
|
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
3. Supports DOS drive letters in dependencies and pattern rules.
|
||||||
|
|
||||||
|
4. Better support for DOS-style backslashes in pathnames (but see
|
||||||
|
'Notes' below).
|
||||||
|
|
||||||
|
5. The $(shell) built-in can run arbitrary complex commands,
|
||||||
|
including pipes and redirection, even when COMMAND.COM is your
|
||||||
|
shell.
|
||||||
|
|
||||||
|
6. Can be built without floating-point code (see below).
|
||||||
|
|
||||||
|
7. Supports signals in child programs and restores the original
|
||||||
|
directory if the child was interrupted.
|
||||||
|
|
||||||
|
8. Can be built without (a previous version of) Make.
|
||||||
|
|
||||||
|
9. The build process requires only standard tools. (Optional
|
||||||
|
targets like "install:" and "clean:" still need additional
|
||||||
|
programs, though, see below.)
|
||||||
|
|
||||||
|
10. Beginning with v3.78, the test suite works in the DJGPP
|
||||||
|
environment (requires Perl and auxiliary tools; see below).
|
||||||
|
|
||||||
|
|
||||||
|
To install a binary distribution:
|
||||||
|
|
||||||
|
Simply unzip the makNNNb.zip file (where NNN is the version number)
|
||||||
|
preserving the directory structure (-d switch if you use PKUNZIP).
|
||||||
|
If you are installing Make on Windows 9X or Windows 2000, use an
|
||||||
|
unzip program that supports long filenames in zip files. After
|
||||||
|
unzipping, make sure the directory with make.exe is on your PATH,
|
||||||
|
and that's all you need to use Make.
|
||||||
|
|
||||||
|
|
||||||
|
To build from sources:
|
||||||
|
|
||||||
|
1. Unzip the archive, preserving the directory structure (-d switch
|
||||||
|
if you use PKUNZIP). If you build Make on Windows 9X or Windows
|
||||||
|
2000, use an unzip program that supports long filenames in zip
|
||||||
|
files.
|
||||||
|
|
||||||
|
If you are unpacking an official GNU source distribution, use
|
||||||
|
either DJTAR (which is part of the DJGPP development
|
||||||
|
environment), or the DJGPP port of GNU Tar.
|
||||||
|
|
||||||
|
2. Invoke the 'configure.bat' batch file.
|
||||||
|
|
||||||
|
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%
|
||||||
|
|
||||||
|
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
|
||||||
|
suggests or install another Make program (a pre-compiled binary
|
||||||
|
should be available from the usual DJGPP sites) and rerun
|
||||||
|
configure.bat.
|
||||||
|
|
||||||
|
4. If you will need to run Make on machines without an FPU, you
|
||||||
|
might consider building a version of Make which doesn't issue
|
||||||
|
floating-point instructions (they don't help much on MSDOS
|
||||||
|
anyway). To this end, edit the Makefile created by
|
||||||
|
configure.bat and add -DNO_FLOAT to the value of CPPFLAGS.
|
||||||
|
|
||||||
|
5. Invoke Make.
|
||||||
|
|
||||||
|
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%
|
||||||
|
|
||||||
|
(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
|
||||||
|
will also need GNU Fileutils and GNU Sed for this (they should
|
||||||
|
be available from the DJGPP sites).
|
||||||
|
|
||||||
|
By default, GNU make will install into your DJGPP installation
|
||||||
|
area. If you wish to use a different directory, override the
|
||||||
|
DESTDIR variable when invoking "make install", like this:
|
||||||
|
|
||||||
|
make install DESTDIR=c:/other/dir
|
||||||
|
|
||||||
|
This causes the make executable to be placed in c:/other/dir/bin,
|
||||||
|
the man pages in c:/other/dir/man, etc.
|
||||||
|
|
||||||
|
Without a Unix-style shell, you will have to install programs
|
||||||
|
and the docs manually. Copy make.exe to a directory on your
|
||||||
|
PATH, make.i* info files to your Info directory, and update the
|
||||||
|
file 'dir' in your Info directory by adding the following item
|
||||||
|
to the main menu:
|
||||||
|
|
||||||
|
* Make: (make.info). The GNU make utility.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
(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).
|
||||||
|
|
||||||
|
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
|
||||||
|
and Sh-utils.
|
||||||
|
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
-----
|
||||||
|
|
||||||
|
1. The shell issue.
|
||||||
|
|
||||||
|
This is probably the most significant improvement, first
|
||||||
|
introduced in the port of GNU Make 3.75.
|
||||||
|
|
||||||
|
The original behavior of GNU Make is to invoke commands
|
||||||
|
directly, as long as they don't include characters special to
|
||||||
|
the shell or internal shell commands, because that is faster.
|
||||||
|
When shell features like redirection or filename wildcards are
|
||||||
|
involved, Make calls the shell.
|
||||||
|
|
||||||
|
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
|
||||||
|
Daisuke Aoyama <jack@st.rim.or.jp>).
|
||||||
|
|
||||||
|
When the $SHELL variable points to a Unix-style shell, Make
|
||||||
|
works just like you'd expect on Unix, calling the shell for any
|
||||||
|
command that involves characters special to the shell or
|
||||||
|
internal shell commands. The only difference is that, since
|
||||||
|
there is no standard way to pass command lines longer than the
|
||||||
|
infamous DOS 126-character limit, this port of Make writes the
|
||||||
|
command line to a temporary disk file and then invokes the shell
|
||||||
|
on that file.
|
||||||
|
|
||||||
|
If $SHELL points to a DOS-style shell, however, Make will not
|
||||||
|
call it automatically, as it does with Unix shells. Stock
|
||||||
|
COMMAND.COM is too dumb and would unnecessarily limit the
|
||||||
|
functionality of Make. For example, you would not be able to
|
||||||
|
use long command lines in commands that use redirection or
|
||||||
|
pipes. Therefore, when presented with a DOS shell, this port of
|
||||||
|
Make will emulate most of the shell functionality, like
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
name is mentioned on the first line of the script is installed
|
||||||
|
anywhere along the $PATH. It is impossible to tell here
|
||||||
|
everything about these functions; refer to the DJGPP library
|
||||||
|
reference for more details.
|
||||||
|
|
||||||
|
The $(shell) built-in is implemented in this port by calling
|
||||||
|
'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
|
||||||
|
the Unix-style command substitution (`command`) feature.
|
||||||
|
|
||||||
|
|
||||||
|
2. "SHELL=/bin/sh" -- or is it?
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
above example) can indeed be found in the directory that is
|
||||||
|
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
|
||||||
|
an executable file (.exe, .com, .bat, .btm, .sh, and even .sed
|
||||||
|
and .pl). If any such file is found, then $SHELL will be
|
||||||
|
defined to the exact pathname of that file, and that shell will
|
||||||
|
hence be used for the rest of processing. But if the named
|
||||||
|
shell is *not* found, the line which sets it will be effectively
|
||||||
|
ignored, leaving the value of $SHELL as it was before. Since a
|
||||||
|
lot of decisions that this port makes depend on the gender of
|
||||||
|
the shell, I feel it doesn't make any sense to tailor Make's
|
||||||
|
behavior to a shell which is nowhere to be found.
|
||||||
|
|
||||||
|
Note that the above special handling of "SHELL=" only happens
|
||||||
|
for Makefiles; if you set $SHELL in the environment or on the
|
||||||
|
Make command line, you are expected to give the complete
|
||||||
|
pathname of the shell, including the filename extension.
|
||||||
|
|
||||||
|
The default value of $SHELL is computed as on Unix (see the Make
|
||||||
|
manual for details), except that if $SHELL is not defined in the
|
||||||
|
environment, $COMSPEC is used. Also, if an environment variable
|
||||||
|
named $MAKESHELL is defined, it takes precedence over both
|
||||||
|
$COMSPEC and $SHELL. Note that, unlike Unix, $SHELL in the
|
||||||
|
environment *is* used to set the shell (since on MSDOS, it's
|
||||||
|
unlikely that the interactive shell will not be suitable for
|
||||||
|
Makefile processing).
|
||||||
|
|
||||||
|
The bottom line is that you can now write Makefiles where some
|
||||||
|
of the targets require a real (i.e. Unix-like) shell, which will
|
||||||
|
nevertheless work when such shell is not available (provided, of
|
||||||
|
course, that the commands which should always work, don't
|
||||||
|
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).
|
||||||
|
|
||||||
|
|
||||||
|
3. Default directories.
|
||||||
|
|
||||||
|
GNU Make knows about standard directories where it searches for
|
||||||
|
library and include files mentioned in the Makefile. Since
|
||||||
|
MSDOS machines don't have standard places for these, this port
|
||||||
|
will search ${DJDIR}/lib and ${DJDIR}/include respectively.
|
||||||
|
$DJDIR is defined automatically by the DJGPP startup code as the
|
||||||
|
root of the DJGPP installation tree (unless you've tampered with
|
||||||
|
the DJGPP.ENV file). This should provide reasonable default
|
||||||
|
values, unless you moved parts of DJGPP to other directories.
|
||||||
|
|
||||||
|
|
||||||
|
4. Letter-case in filenames.
|
||||||
|
|
||||||
|
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
|
||||||
|
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'
|
||||||
|
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,
|
||||||
|
will be automatically down-cased.) User reports that I have
|
||||||
|
indicate that this default behavior is generally what you'd
|
||||||
|
expect; however, your input is most welcome.
|
||||||
|
|
||||||
|
In any case, if you hit a situation where you must force Make to
|
||||||
|
get the 8+3 DOS filenames in upper case, set FNCASE=y in the
|
||||||
|
environment or in the Makefile.
|
||||||
|
|
||||||
|
|
||||||
|
5. DOS-style pathnames.
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
support is not complete; I feel that pursuing this support too
|
||||||
|
far might break some more important features, particularly if
|
||||||
|
you use a Unix-style shell (where a backslash is a quote
|
||||||
|
character). I only consider support of backslashes desirable
|
||||||
|
because some Makefiles invoke non-DJGPP programs which don't
|
||||||
|
understand forward slashes. A notable example of such programs
|
||||||
|
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
|
||||||
|
(backslash is special in filename wildcards, and I didn't want
|
||||||
|
to break that).
|
||||||
|
|
||||||
|
One feature which *does* work with backslashes is the filename-
|
||||||
|
related built-in functions such as $(dir), $(notdir), etc.
|
||||||
|
Drive letters in pathnames are also fully supported.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Bug reports:
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Bugs that are clearly related to the MSDOS/DJGPP port should be
|
||||||
|
reported first on the comp.os.msdos.djgpp news group (if you cannot
|
||||||
|
post to Usenet groups, write to the DJGPP mailing list,
|
||||||
|
<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
|
||||||
|
browser/editor.
|
||||||
|
|
||||||
|
|
||||||
|
Enjoy,
|
||||||
|
Eli Zaretskii <eliz@is.elta.co.il>
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1996-2012 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-2012 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/>.
|
||||||
114
README.W32
114
README.W32
@@ -1,114 +0,0 @@
|
|||||||
Port of GNU make to Windows NT and Windows 95
|
|
||||||
Builds natively with MSVC 2.x or MSVC 4.x compilers.
|
|
||||||
|
|
||||||
To build with nmake on Windows NT or Windows 95:
|
|
||||||
|
|
||||||
1. Make sure cl.exe is in your %Path%. Example:
|
|
||||||
|
|
||||||
set Path=%Path%;c:/msdev/bin
|
|
||||||
|
|
||||||
2. Make sure %include% is set to msvc include directory. Example:
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
There is a bat file (build_w32.bat) for folks who have fear of nmake.
|
|
||||||
|
|
||||||
Outputs:
|
|
||||||
|
|
||||||
WinDebug/make.exe
|
|
||||||
WinRel/make.exe
|
|
||||||
|
|
||||||
|
|
||||||
-- Notes/Caveats --
|
|
||||||
|
|
||||||
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, port falls back to
|
|
||||||
MSDOS mode for launching programs (via a batch file).
|
|
||||||
The MSDOS mode style execution has not been tested too
|
|
||||||
carefully though (I use 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 gnu-win32
|
|
||||||
porting effort. Other possibilites are to get the MKS version
|
|
||||||
of sh.exe or to build your own with a package like
|
|
||||||
NutCracker (DataFocus) or Portage (Consensys).
|
|
||||||
|
|
||||||
Tivoli uses a homegrown port of GNU bash which is not (yet)
|
|
||||||
freely available. It may be available someday, but I am not in control
|
|
||||||
of this decision nor do I influence it. Sorry!
|
|
||||||
|
|
||||||
GNU make test suite:
|
|
||||||
|
|
||||||
I verified all functionality with a slightly modified version
|
|
||||||
of make-test-0.4.5 (modifications to get test suite to run
|
|
||||||
on Windows NT). All tests pass in an environment that includes
|
|
||||||
sh.exe. Tested on both Windows NT and Windows 95.
|
|
||||||
|
|
||||||
Building GNU make on Windows NT and Windows 95 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 build_w32.bat).
|
|
||||||
|
|
||||||
Program has not been built under non-Intel architectures (yet).
|
|
||||||
|
|
||||||
I have not tried to build with any other compilers than MSVC.
|
|
||||||
|
|
||||||
Pathnames and white space:
|
|
||||||
|
|
||||||
Unlike Unix, WIN32 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:
|
|
||||||
|
|
||||||
1. Use 8.3 notation
|
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Bug reports:
|
|
||||||
|
|
||||||
Please submit bugs via the normal bug reporting mechanism
|
|
||||||
which is described in one of the texinfo files. If you don't
|
|
||||||
have texinfo for Windows NT or Windows 95, these files are simple
|
|
||||||
text files and can be read with a text editor.
|
|
||||||
|
|
||||||
309
README.W32.template
Normal file
309
README.W32.template
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
|
It builds with the MinGW port of GCC (tested with GCC 3.4.2).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
As of version 3.83, 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:
|
||||||
|
|
||||||
|
http://www.gtk.org/download/win32.php
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
The Windows 32-bit port of GNU make is maintained jointly by various
|
||||||
|
people. It was originally made by Rob Tulloh.
|
||||||
|
|
||||||
|
|
||||||
|
Do this first, regardless of the build method you choose:
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
1. At the Windows command prompt run:
|
||||||
|
|
||||||
|
if not exist NMakefile copy NMakefile.template NMakefile
|
||||||
|
if not exist config.h copy config.h.W32 config.h
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
GNU make and 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://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). Also MinGW includes sh (http://mingw.org/).
|
||||||
|
|
||||||
|
GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
|
||||||
|
|
||||||
|
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. 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%). 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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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:/).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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 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. 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.
|
||||||
|
|
||||||
|
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").
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
subdir/Target:
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Bug reports:
|
||||||
|
|
||||||
|
Please submit bugs via the normal bug reporting mechanism which
|
||||||
|
is described in the GNU make manual and the base README.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1996-2012 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/>.
|
||||||
114
README.WIN32
114
README.WIN32
@@ -1,114 +0,0 @@
|
|||||||
Port of GNU make to Windows NT and Windows 95
|
|
||||||
Builds natively with MSVC 2.x or MSVC 4.x compilers.
|
|
||||||
|
|
||||||
To build with nmake on Windows NT or Windows 95:
|
|
||||||
|
|
||||||
1. Make sure cl.exe is in your %Path%. Example:
|
|
||||||
|
|
||||||
set Path=%Path%;c:/msdev/bin
|
|
||||||
|
|
||||||
2. Make sure %include% is set to msvc include directory. Example:
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
There is a bat file (build_w32.bat) for folks who have fear of nmake.
|
|
||||||
|
|
||||||
Outputs:
|
|
||||||
|
|
||||||
WinDebug/make.exe
|
|
||||||
WinRel/make.exe
|
|
||||||
|
|
||||||
|
|
||||||
-- Notes/Caveats --
|
|
||||||
|
|
||||||
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, port falls back to
|
|
||||||
MSDOS mode for launching programs (via a batch file).
|
|
||||||
The MSDOS mode style execution has not been tested too
|
|
||||||
carefully though (I use 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 gnu-win32
|
|
||||||
porting effort. Other possibilites are to get the MKS version
|
|
||||||
of sh.exe or to build your own with a package like
|
|
||||||
NutCracker (DataFocus) or Portage (Consensys).
|
|
||||||
|
|
||||||
Tivoli uses a homegrown port of GNU bash which is not (yet)
|
|
||||||
freely available. It may be available someday, but I am not in control
|
|
||||||
of this decision nor do I influence it. Sorry!
|
|
||||||
|
|
||||||
GNU make test suite:
|
|
||||||
|
|
||||||
I verified all functionality with a slightly modified version
|
|
||||||
of make-test-0.4.5 (modifications to get test suite to run
|
|
||||||
on Windows NT). All tests pass in an environment that includes
|
|
||||||
sh.exe. Tested on both Windows NT and Windows 95.
|
|
||||||
|
|
||||||
Building GNU make on Windows NT and Windows 95 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 build_w32.bat).
|
|
||||||
|
|
||||||
Program has not been built under non-Intel architectures (yet).
|
|
||||||
|
|
||||||
I have not tried to build with any other compilers than MSVC.
|
|
||||||
|
|
||||||
Pathnames and white space:
|
|
||||||
|
|
||||||
Unlike Unix, WIN32 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:
|
|
||||||
|
|
||||||
1. Use 8.3 notation
|
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Bug reports:
|
|
||||||
|
|
||||||
Please submit bugs via the normal bug reporting mechanism
|
|
||||||
which is described in one of the texinfo files. If you don't
|
|
||||||
have texinfo for Windows NT or Windows 95, these files are simple
|
|
||||||
text files and can be read with a text editor.
|
|
||||||
|
|
||||||
112
README.customs
Normal file
112
README.customs
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
-*-indented-text-*-
|
||||||
|
|
||||||
|
GNU make can utilize the Customs library, distributed with Pmake, to
|
||||||
|
provide builds distributed across multiple hosts.
|
||||||
|
|
||||||
|
In order to utilize this capability, you must first download and build
|
||||||
|
the Customs library. It is contained in the Pmake distribution, which
|
||||||
|
can be obtained at:
|
||||||
|
|
||||||
|
ftp://ftp.icsi.berkeley.edu/pub/ai/stolcke/software/
|
||||||
|
|
||||||
|
This integration was tested (superficially) with Pmake 2.1.33.
|
||||||
|
|
||||||
|
|
||||||
|
BUILDING CUSTOMS
|
||||||
|
----------------
|
||||||
|
|
||||||
|
First, build pmake and Customs. You need to build pmake first, because
|
||||||
|
Customs require pmake to build. Unfortunately, this is not trivial;
|
||||||
|
please see the pmake and Customs documentation for details. The best
|
||||||
|
place to look for instructions is in the pmake-2.1.33/INSTALL file.
|
||||||
|
|
||||||
|
Note that the 2.1.33 Pmake distribution comes with a set of patches to
|
||||||
|
GNU make, distributed in the pmake-2.1.33/etc/gnumake/ directory. These
|
||||||
|
patches are based on GNU make 3.75 (there are patches for earlier
|
||||||
|
versions of GNU make, also). The parts of this patchfile which relate
|
||||||
|
directly to Customs support have already been incorporated into this
|
||||||
|
version of GNU make, so you should _NOT_ apply the patch file.
|
||||||
|
|
||||||
|
However, there are a few non-Customs specific (as far as I could tell)
|
||||||
|
changes here which are not incorporated (for example, the modification
|
||||||
|
to try expanding -lfoo to libfoo.so). If you rely on these changes
|
||||||
|
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).
|
||||||
|
|
||||||
|
|
||||||
|
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'
|
||||||
|
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.
|
||||||
|
|
||||||
|
Run make (or use build.sh) normally to build GNU make as described in
|
||||||
|
the INSTALL file.
|
||||||
|
|
||||||
|
See the documentation for Customs for information on starting and
|
||||||
|
configuring Customs.
|
||||||
|
|
||||||
|
|
||||||
|
INVOKING CUSTOMS-IZED GNU MAKE
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
One thing you should be aware of is that the default build environment
|
||||||
|
for Customs requires root permissions. Practically, this means that GNU
|
||||||
|
make must be installed setuid root to use Customs.
|
||||||
|
|
||||||
|
If you don't want to do this, you can build Customs such that root
|
||||||
|
permissions are not necessary. Andreas Stolcke <stolcke@speech.sri.com>
|
||||||
|
writes:
|
||||||
|
|
||||||
|
> pmake, gnumake or any other customs client program is not required to
|
||||||
|
> be suid root if customs was compiled WITHOUT the USE_RESERVED_PORTS
|
||||||
|
> option in customs/config.h. Make sure the "customs" service in
|
||||||
|
> /etc/services is defined accordingly (port 8231 instead of 1001).
|
||||||
|
|
||||||
|
> Not using USE_RESERVED_PORTS means that a user with programming
|
||||||
|
> skills could impersonate another user by writing a fake customs
|
||||||
|
> client that pretends to be someone other than himself. See the
|
||||||
|
> discussion in etc/SECURITY.
|
||||||
|
|
||||||
|
|
||||||
|
PROBLEMS
|
||||||
|
--------
|
||||||
|
|
||||||
|
SunOS 4.1.x:
|
||||||
|
The customs/sprite.h header file #includes the <malloc.h> header
|
||||||
|
files; this conflicts with GNU make's configuration so you'll get a
|
||||||
|
compile error if you use GCC (or any other ANSI-capable C compiler).
|
||||||
|
|
||||||
|
I commented out the #include in sprite.h:107:
|
||||||
|
|
||||||
|
#if defined(sun) || defined(ultrix) || defined(hpux) || defined(sgi)
|
||||||
|
/* #include <malloc.h> */
|
||||||
|
#else
|
||||||
|
|
||||||
|
YMMV.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1998-2012 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/>.
|
||||||
219
README.cvs
Normal file
219
README.cvs
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
-*-text-*-
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2002-2012 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 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@cvs.savannah.gnu.org:/sources/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, Automake, and
|
||||||
|
Gettext, and any tools that those utilities require (GNU m4, Perl,
|
||||||
|
etc.). See the configure.in file to find the minimum versions of each
|
||||||
|
of these tools. You will also need a copy of wget.
|
||||||
|
|
||||||
|
When building from CVS 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 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.
|
||||||
|
|
||||||
|
|
||||||
|
Windows builds from CVS
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
* Update the configure.in file with the new release number.
|
||||||
|
* Update the NEWS file with the release number and date.
|
||||||
|
* Create the new release in the Savannah "Bugs" Administration for
|
||||||
|
both the "Component Version" and "Fixed Release" fields.
|
||||||
|
* Create the new release in the Savannah "Patches" Administration for
|
||||||
|
the "Fixed Release" field.
|
||||||
|
* Update the Savannah bug list URL in the NEWS file to use the correct
|
||||||
|
"Fixed Release" ID number.
|
||||||
|
* Run "make distcheck" to be sure it all works.
|
||||||
|
* Commit everything.
|
||||||
|
* cvs tag <RTAG> where RTAG is constructed by replacing each "." in
|
||||||
|
the version with "-" and prefixing it with "make-".
|
||||||
|
|
||||||
|
|
||||||
|
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 you do:
|
||||||
|
|
||||||
|
Make sure the "Steps to Release" are complete and committed and tagged.
|
||||||
|
|
||||||
|
cvs -d :pserver:anonymous@cvs.savannah.gnu.org:/sources/make \
|
||||||
|
export -r<RTAG> -d make-release make
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
It will 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:
|
||||||
|
|
||||||
|
<translation@iro.umontreal.ca>
|
||||||
|
|
||||||
|
|
||||||
|
Where to Announce
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Create the announcement in a text file, then sign it with GPG.
|
||||||
|
|
||||||
|
gpg --clearsign <announcement.txt>
|
||||||
|
|
||||||
|
Upload to gnu.org, then login and send from my account there.
|
||||||
|
|
||||||
|
Email to: make-alpha@gnu.org, bug-make@gnu.org, help-make@gnu.org, make-w32@gnu.org.
|
||||||
|
Email to: info-gnu@gnu.org
|
||||||
|
|
||||||
|
Add a news item to the Savannah project site.
|
||||||
|
|
||||||
|
Add an update to 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 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!
|
||||||
|
|
||||||
|
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
|
||||||
183
README.template
183
README.template
@@ -1,37 +1,178 @@
|
|||||||
This directory contains the VERSION test release of GNU Make.
|
This directory contains the %VERSION% release of GNU Make.
|
||||||
All bugs reported for previous test releases have been fixed.
|
|
||||||
Some bugs surely remain.
|
See the file NEWS for the user-visible changes from previous releases.
|
||||||
|
In addition, there have been bugs fixed.
|
||||||
|
|
||||||
|
Please check the system-specific notes below for any caveats related to
|
||||||
|
your operating system.
|
||||||
|
|
||||||
For general building and installation instructions, see the file INSTALL.
|
For general building and installation instructions, see the file INSTALL.
|
||||||
If you need to build GNU Make and have no other `make' program to use,
|
|
||||||
you can use the shell script `build.sh' instead. To do this, first run
|
If you need to build GNU Make and have no other 'make' program to use,
|
||||||
`configure' as described in INSTALL. Then, instead of typing `make' to
|
you can use the shell script 'build.sh' instead. To do this, first run
|
||||||
build the program, type `sh build.sh'. This should compile the program
|
'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
|
in the current directory. Then you will have a Make program that you can
|
||||||
use for `make install', or whatever else.
|
use for './make install', or whatever else.
|
||||||
|
|
||||||
Some systems' Make programs are broken and cannot process the Makefile for
|
Some systems' Make programs are broken and cannot process the Makefile for
|
||||||
GNU Make. If you get errors from your system's Make when building GNU
|
GNU Make. If you get errors from your system's Make when building GNU
|
||||||
Make, try using `build.sh' instead.
|
Make, try using 'build.sh' instead.
|
||||||
|
|
||||||
See README.WIN32 for details about GNU Make on Windows NT or 95.
|
|
||||||
See README.Amiga for details about GNU Make on AmigaDOS.
|
GNU Make is free software. See the file COPYING for copying conditions.
|
||||||
The MSDOS port of GNU Make is available as part of DJGPP; see the
|
GNU Make is copyright by the Free Software Foundation. Copyright notices
|
||||||
WWW page http://www.delorie.com/djgpp/ for more information.
|
condense sequential years into a range; e.g. "1987-1994" means all years
|
||||||
|
from 1987 to 1994 inclusive.
|
||||||
|
|
||||||
|
Downloading
|
||||||
|
-----------
|
||||||
|
|
||||||
|
GNU Make can be obtained in many different ways. See a description here:
|
||||||
|
|
||||||
|
http://www.gnu.org/software/software.html
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
GNU make is fully documented in the GNU Make manual, which is contained
|
||||||
|
in this distribution as the file make.texinfo. You can also find
|
||||||
|
on-line and preformatted (PostScript and DVI) versions at the FSF's web
|
||||||
|
site. There is information there about ordering hardcopy documentation.
|
||||||
|
|
||||||
|
http://www.gnu.org/
|
||||||
|
http://www.gnu.org/doc/doc.html
|
||||||
|
http://www.gnu.org/manual/manual.html
|
||||||
|
|
||||||
|
|
||||||
|
Development
|
||||||
|
-----------
|
||||||
|
|
||||||
|
GNU Make development is hosted by Savannah, the FSF's online development
|
||||||
|
management tool. Savannah is here:
|
||||||
|
|
||||||
|
http://savannah.gnu.org
|
||||||
|
|
||||||
|
And the GNU Make development page is here:
|
||||||
|
|
||||||
|
http://savannah.gnu.org/projects/make/
|
||||||
|
|
||||||
|
You can find most information concerning the development of GNU Make at
|
||||||
|
this site.
|
||||||
|
|
||||||
|
|
||||||
|
Bug Reporting
|
||||||
|
-------------
|
||||||
|
|
||||||
|
You can send GNU make bug reports to <bug-make@gnu.org>. Please see the
|
||||||
|
section of the GNU make manual entitled 'Problems and Bugs' for
|
||||||
|
information on submitting useful and complete bug reports.
|
||||||
|
|
||||||
|
You can also use the online bug tracking system in the Savannah GNU Make
|
||||||
|
project to submit new problem reports or search for existing ones:
|
||||||
|
|
||||||
|
http://savannah.gnu.org/bugs/?group=make
|
||||||
|
|
||||||
|
If you need help using GNU make, try these forums:
|
||||||
|
|
||||||
|
help-make@gnu.org
|
||||||
|
help-utils@gnu.org
|
||||||
|
news:gnu.utils.help
|
||||||
|
news:gnu.utils.bug
|
||||||
|
|
||||||
|
|
||||||
|
CVS Access
|
||||||
|
----------
|
||||||
|
|
||||||
|
The GNU make source repository is available via anonymous CVS from the
|
||||||
|
GNU Subversions CVS server; look here for details:
|
||||||
|
|
||||||
|
http://savannah.gnu.org/cvs/?group=make
|
||||||
|
|
||||||
|
Please note: you won't be able to build GNU make from CVS 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
|
||||||
|
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
|
||||||
|
repository: it is not unheard of for code that is known to be broken to
|
||||||
|
be checked in. Use at your own risk.
|
||||||
|
|
||||||
|
|
||||||
|
System-specific Notes
|
||||||
|
---------------------
|
||||||
|
|
||||||
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
||||||
that if you compile make with `cc -O' on AIX 3.2, it will not work correctly.
|
that if you compile make with 'cc -O' on AIX 3.2, it will not work
|
||||||
It is said that using `cc' without `-O' does work.
|
correctly. It is said that using 'cc' without '-O' does work.
|
||||||
|
|
||||||
|
The standard /bin/sh on SunOS 4.1.3_U1 and 4.1.4 is broken and cannot be
|
||||||
|
used to configure GNU make. Please install a different shell such as
|
||||||
|
bash or pdksh in order to run "configure". See this message for more
|
||||||
|
information:
|
||||||
|
http://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00190.html
|
||||||
|
|
||||||
One area that is often a problem in configuration and porting is the code
|
One area that is often a problem in configuration and porting is the code
|
||||||
to check the system's current load average. To make it easier to test and
|
to check the system's current load average. To make it easier to test and
|
||||||
debug this code, you can do `make check-loadavg' to see if it works
|
debug this code, you can do 'make check-loadavg' to see if it works
|
||||||
properly on your system. (You must run `configure' beforehand, but you
|
properly on your system. (You must run 'configure' beforehand, but you
|
||||||
need not build Make itself to run this test.)
|
need not build Make itself to run this test.)
|
||||||
|
|
||||||
See the file NEWS for what has changed since previous releases.
|
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.
|
||||||
|
|
||||||
GNU Make is fully documented in make.texinfo. See the section entitled
|
On systems that support micro- and nano-second timestamp values and
|
||||||
`Problems and Bugs' for information on submitting bug reports.
|
where stat(2) provides this information, GNU make will use it when
|
||||||
|
comparing timestamps to get the most accurate possible result. However,
|
||||||
|
note that many current implementations of tools that *set* timestamps do
|
||||||
|
not preserve micro- or nano-second granularity. This means that "cp -p"
|
||||||
|
and other similar tools (tar, etc.) may not exactly duplicate timestamps
|
||||||
|
with micro- and nano-second granularity on some systems. If your build
|
||||||
|
system contains rules that depend on proper behavior of tools like "cp
|
||||||
|
-p", you should consider using the .LOW_RESOLUTION_TIME pseudo-target to
|
||||||
|
force make to treat them properly. See the manual for details.
|
||||||
|
|
||||||
GNU Make is free software. See the file COPYING for copying conditions.
|
|
||||||
|
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.Amiga for details about GNU Make on AmigaDOS.
|
||||||
|
|
||||||
|
- See README.W32 for details about GNU Make on Windows NT, 95, or 98.
|
||||||
|
|
||||||
|
- See README.DOS for compilation instructions on MS-DOS and MS-Windows
|
||||||
|
using DJGPP tools.
|
||||||
|
|
||||||
|
A precompiled binary of the MSDOS port of GNU Make is available as part
|
||||||
|
of DJGPP; see the WWW page http://www.delorie.com/djgpp/ for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
Please note there are two _separate_ ports of GNU make for Microsoft
|
||||||
|
systems: a native Windows tool built with (for example) MSVC or Cygwin,
|
||||||
|
and a DOS-based tool built with DJGPP. Please be sure you are looking
|
||||||
|
at the right README!
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1988-2012 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,31 +1,32 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
# -*-Makefile-*- for building GNU make with smake
|
||||||
# `build.sh' instead.
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
# NOTE: If you have no 'make' program at all to process this makefile,
|
||||||
|
# run 'build.sh' instead.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile for GNU Make
|
# Makefile for GNU Make
|
||||||
#
|
#
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||||
VPATH = /make-3.74/
|
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-3.74/
|
srcdir = /make-%VERSION%/
|
||||||
|
|
||||||
CC = sc
|
CC = sc
|
||||||
RM = delete
|
RM = delete
|
||||||
@@ -36,18 +37,18 @@ CPPFLAGS =
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# Define these for your system as follows:
|
# Define these for your system as follows:
|
||||||
# -DNO_ARCHIVES To disable `ar' archive support.
|
# -DNO_ARCHIVES To disable 'ar' archive support.
|
||||||
# -DNO_FLOAT To avoid using floating-point numbers.
|
# -DNO_FLOAT To avoid using floating-point numbers.
|
||||||
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
# -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2.
|
||||||
# Some compilers apparently accept this
|
# Some compilers apparently accept this
|
||||||
# without complaint but produce losing code,
|
# without complaint but produce losing code,
|
||||||
# so beware.
|
# so beware.
|
||||||
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
|
||||||
# See also `config.h'.
|
# See also 'config.h'.
|
||||||
defines =
|
defines =
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
# Which flavor of remote job execution support to use.
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
# The code is found in 'remote-$(REMOTE).c'.
|
||||||
REMOTE = stub
|
REMOTE = stub
|
||||||
|
|
||||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||||
@@ -81,9 +82,9 @@ prefix =
|
|||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix =
|
exec_prefix =
|
||||||
|
|
||||||
# Directory to install `make' in.
|
# Directory to install 'make' in.
|
||||||
bindir = sc:c
|
bindir = sc:c
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir = lib:
|
libdir = lib:
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir = include:
|
includedir = include:
|
||||||
@@ -93,20 +94,20 @@ infodir = doc:
|
|||||||
mandir = t:
|
mandir = t:
|
||||||
# Number to put on the man page filename.
|
# Number to put on the man page filename.
|
||||||
manext = 1
|
manext = 1
|
||||||
# Prefix to put on installed `make' binary file name.
|
# Prefix to put on installed 'make' binary file name.
|
||||||
binprefix =
|
binprefix =
|
||||||
# Prefix to put on installed `make' man page file name.
|
# Prefix to put on installed 'make' man page file name.
|
||||||
manprefix = $(binprefix)
|
manprefix = $(binprefix)
|
||||||
|
|
||||||
# Whether or not make needs to be installed setgid.
|
# Whether or not make needs to be installed setgid.
|
||||||
# The value should be either `true' or `false'.
|
# The value should be either 'true' or 'false'.
|
||||||
# On many systems, the getloadavg function (used to implement the `-l'
|
# On many systems, the getloadavg function (used to implement the '-l'
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
# switch) will not work unless make is installed setgid kmem.
|
||||||
install_setgid = false
|
install_setgid = false
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
# Install make setgid to this group so it can read /dev/kmem.
|
||||||
group = sys
|
group = sys
|
||||||
|
|
||||||
# Program to install `make'.
|
# Program to install 'make'.
|
||||||
INSTALL_PROGRAM = copy
|
INSTALL_PROGRAM = copy
|
||||||
# Program to install the man page.
|
# Program to install the man page.
|
||||||
INSTALL_DATA = copy
|
INSTALL_DATA = copy
|
||||||
@@ -122,18 +123,21 @@ TEXI2DVI = texi2dvi
|
|||||||
ETAGS = etags -w
|
ETAGS = etags -w
|
||||||
CTAGS = ctags -w
|
CTAGS = ctags -w
|
||||||
|
|
||||||
|
#guile = guile.o
|
||||||
|
|
||||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
|
||||||
$(GLOB) $(GETOPT) $(ALLOCA) $(extras)
|
remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) $(extras) $(guile)
|
||||||
|
|
||||||
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
||||||
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
|
||||||
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
|
||||||
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
|
||||||
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
|
||||||
$(srcdir)vpath.c $(srcdir)version.c \
|
$(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
|
||||||
$(srcdir)remote-$(REMOTE).c \
|
$(srcdir)guile.c $(srcdir)remote-$(REMOTE).c \
|
||||||
$(srcdir)ar.c $(srcdir)arscan.c \
|
$(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
|
||||||
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
|
||||||
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
|
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
|
||||||
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
|
||||||
@@ -146,7 +150,7 @@ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
|
|||||||
all: make
|
all: make
|
||||||
info: make.info
|
info: make.info
|
||||||
dvi: make.dvi
|
dvi: make.dvi
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
# Some makes apparently use .PHONY as the default goal if it is before 'all'.
|
||||||
.PHONY: all check info dvi
|
.PHONY: all check info dvi
|
||||||
|
|
||||||
make.info: make.texinfo
|
make.info: make.texinfo
|
||||||
@@ -192,7 +196,7 @@ clean: glob-clean
|
|||||||
-$(RM) -f make loadavg *.o core make.dvi
|
-$(RM) -f make loadavg *.o core make.dvi
|
||||||
|
|
||||||
distclean: clean glob-realclean
|
distclean: clean glob-realclean
|
||||||
-$(RM) -f Makefile config.h config.status build.sh stamp-config
|
-$(RM) -f Makefile config.h config.status build.sh
|
||||||
-$(RM) -f config.log config.cache
|
-$(RM) -f config.log config.cache
|
||||||
-$(RM) -f TAGS tags
|
-$(RM) -f TAGS tags
|
||||||
-$(RM) -f make.?? make.??s make.log make.toc make.*aux
|
-$(RM) -f make.?? make.??s make.log make.toc make.*aux
|
||||||
@@ -210,67 +214,3 @@ glob-clean glob-realclean:
|
|||||||
cd glob
|
cd glob
|
||||||
smake $@
|
smake $@
|
||||||
<
|
<
|
||||||
|
|
||||||
# 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.
|
|
||||||
$(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.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 \
|
|
||||||
getopt.h
|
|
||||||
|
|
||||||
read.o: read.c make.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 \
|
|
||||||
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 \
|
|
||||||
variable.h
|
|
||||||
|
|
||||||
variable.o: variable.c make.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 \
|
|
||||||
commands.h amiga.h
|
|
||||||
|
|
||||||
vpath.o: vpath.c make.h filedef.h variable.h
|
|
||||||
|
|
||||||
version.o: version.c
|
|
||||||
|
|
||||||
ar.o: ar.c make.h filedef.h dep.h
|
|
||||||
|
|
||||||
arscan.o: arscan.c make.h
|
|
||||||
|
|
||||||
signame.o: signame.c signame.h
|
|
||||||
|
|
||||||
remote-stub.o: remote-stub.c make.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
|
|
||||||
|
|
||||||
|
|||||||
141
TODO.private
Normal file
141
TODO.private
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
-*-Indented-Text-*-
|
||||||
|
GNU Make TODO List
|
||||||
|
------------------
|
||||||
|
|
||||||
|
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
|
||||||
|
ideas" and implemented. These are just the ones that, at first blush,
|
||||||
|
seem to have some merit (and that I can remember).
|
||||||
|
|
||||||
|
However, if you see something here you really, really want, speak up.
|
||||||
|
All other things being equal, I will tend to implement things that seem
|
||||||
|
to maximize user satisfaction.
|
||||||
|
|
||||||
|
If you want to implement some of them yourself, barring the ones I've
|
||||||
|
marked below, have at it! Please contact me first to let me know you're
|
||||||
|
working on it, and give me some info about the design--and, critically,
|
||||||
|
information about any user-visible syntax change, etc.
|
||||||
|
|
||||||
|
|
||||||
|
The Top Item
|
||||||
|
------------
|
||||||
|
|
||||||
|
If you know perl (or want to learn DejaGNU or similar), the number one
|
||||||
|
priority on my list of things I don't have time to do right now is
|
||||||
|
fixing up the GNU make test suite. Most importantly it needs to be made
|
||||||
|
"parallelizable", so more than one regression can run at the same time
|
||||||
|
(essentially, make the "work" directory local). Also, the CWD during
|
||||||
|
the test should be in the work directory or, better, a test-specific
|
||||||
|
temporary directory so each test gets a new directory; right now
|
||||||
|
sometimes tests leak files into the main directory which causes
|
||||||
|
subsequent tests to fail (some tests may need to be tweaked). Beyond
|
||||||
|
that, any cleanup done to make writing, reading, or handling tests
|
||||||
|
simpler would be great! Please feel free to make whatever changes you
|
||||||
|
like to the current tests, given some high-level goals, and that you'll
|
||||||
|
port the current tests to whatever you do :).
|
||||||
|
|
||||||
|
|
||||||
|
The Rest of the List
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
1) 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.
|
||||||
|
|
||||||
|
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
|
||||||
|
that's OK. I have paperwork for their work so if you want to do
|
||||||
|
this one talk to me to get what they've already done.
|
||||||
|
|
||||||
|
[K R Praveen <praveen@cair.res.in>]
|
||||||
|
|
||||||
|
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
|
||||||
|
"+" means one invocation builds both). Don't know if this is the
|
||||||
|
best syntax or not... what if you say "a.foo + a.bar a.bam : a.baz";
|
||||||
|
what does that mean?
|
||||||
|
|
||||||
|
3) Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o,
|
||||||
|
etc., or something like that). Maybe using regex?
|
||||||
|
|
||||||
|
4) Provide a .TARGETS variable, containing the names of the targets
|
||||||
|
defined in the makefile.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Or, perhaps related/instead of, some sort of meta-quoting syntax so
|
||||||
|
make can deal with filenames containing spaces, colons, etc. I
|
||||||
|
dunno, maybe something like $[...]? This may well not be worth
|
||||||
|
doing until #1 is done.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
7) Improved debugging/logging/etc. capabilities. Part of this is done:
|
||||||
|
I introduced a number of debugging enhancements. Tim Magill is (I
|
||||||
|
think) looking into options to control output more selectively.
|
||||||
|
One thing I want to do in debugging is add a flag to allow debugging
|
||||||
|
of variables as they're expanded (!). This would be incredibly
|
||||||
|
verbose, but could be invaluable when nothing else seems to work and
|
||||||
|
you just can't figure it out. The way variables are expanded now
|
||||||
|
means this isn't 100% trivial, but it probably won't be hard.
|
||||||
|
|
||||||
|
8) 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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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?
|
||||||
|
|
||||||
|
Something to think about.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 1997-2012 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/>.
|
||||||
14
acconfig.h
14
acconfig.h
@@ -1,14 +0,0 @@
|
|||||||
/* Define to the name of the SCCS `get' command. */
|
|
||||||
#undef SCCS_GET
|
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
|
||||||
#undef SCCS_GET_MINUS_G
|
|
||||||
|
|
||||||
/* Define this 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
|
|
||||||
132
acinclude.m4
Normal file
132
acinclude.m4
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
||||||
|
dnl
|
||||||
|
dnl Automake will incorporate this into its generated aclocal.m4.
|
||||||
|
dnl Copyright (C) 1998-2012 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.
|
||||||
|
dnl by T.E.Dickey <dickey@clark.net>
|
||||||
|
dnl and Jim Spath <jspath@mail.bcpl.lib.md.us>
|
||||||
|
dnl and Philippe De Muyter <phdm@macqel.be>
|
||||||
|
dnl
|
||||||
|
dnl Created: 1997/1/28
|
||||||
|
dnl Updated: 1997/12/23
|
||||||
|
dnl ---------------------------------------------------------------------------
|
||||||
|
dnl After checking for functions in the default $LIBS, make a further check
|
||||||
|
dnl for the functions that are netlib-related (these aren't always in the
|
||||||
|
dnl libc, etc., and have to be handled specially because there are conflicting
|
||||||
|
dnl and broken implementations.
|
||||||
|
dnl Common library requirements (in order):
|
||||||
|
dnl -lresolv -lsocket -lnsl
|
||||||
|
dnl -lnsl -lsocket
|
||||||
|
dnl -lsocket
|
||||||
|
dnl -lbsd
|
||||||
|
AC_DEFUN([CF_NETLIBS],[
|
||||||
|
cf_test_netlibs=no
|
||||||
|
AC_MSG_CHECKING(for network libraries)
|
||||||
|
AC_CACHE_VAL(cf_cv_netlibs,[
|
||||||
|
AC_MSG_RESULT(working...)
|
||||||
|
cf_cv_netlibs=""
|
||||||
|
cf_test_netlibs=yes
|
||||||
|
AC_CHECK_FUNCS(gethostname,,[
|
||||||
|
CF_RECHECK_FUNC(gethostname,nsl,cf_cv_netlibs,[
|
||||||
|
CF_RECHECK_FUNC(gethostname,socket,cf_cv_netlibs)])])
|
||||||
|
#
|
||||||
|
# FIXME: sequent needs this library (i.e., -lsocket -linet -lnsl), but
|
||||||
|
# I don't know the entrypoints - 97/7/22 TD
|
||||||
|
AC_CHECK_LIB(inet,main,cf_cv_netlibs="-linet $cf_cv_netlibs")
|
||||||
|
#
|
||||||
|
if test "$ac_cv_func_lsocket" != no ; then
|
||||||
|
AC_CHECK_FUNCS(socket,,[
|
||||||
|
CF_RECHECK_FUNC(socket,socket,cf_cv_netlibs,[
|
||||||
|
CF_RECHECK_FUNC(socket,bsd,cf_cv_netlibs)])])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
AC_CHECK_FUNCS(gethostbyname,,[
|
||||||
|
CF_RECHECK_FUNC(gethostbyname,nsl,cf_cv_netlibs)])
|
||||||
|
])
|
||||||
|
LIBS="$LIBS $cf_cv_netlibs"
|
||||||
|
test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&AC_FD_MSG
|
||||||
|
])dnl
|
||||||
|
dnl ---------------------------------------------------------------------------
|
||||||
|
dnl Re-check on a function to see if we can pick it up by adding a library.
|
||||||
|
dnl $1 = function to check
|
||||||
|
dnl $2 = library to check in
|
||||||
|
dnl $3 = environment to update (e.g., $LIBS)
|
||||||
|
dnl $4 = what to do if this fails
|
||||||
|
dnl
|
||||||
|
dnl This uses 'unset' if the shell happens to support it, but leaves the
|
||||||
|
dnl configuration variable set to 'unknown' if not. This is a little better
|
||||||
|
dnl than the normal autoconf test, which gives misleading results if a test
|
||||||
|
dnl for the function is made (e.g., with AC_CHECK_FUNC) after this macro is
|
||||||
|
dnl used (autoconf does not distinguish between a null token and one that is
|
||||||
|
dnl set to 'no').
|
||||||
|
AC_DEFUN([CF_RECHECK_FUNC],[
|
||||||
|
AC_CHECK_LIB($2,$1,[
|
||||||
|
CF_UPPER(cf_tr_func,$1)
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_$cf_tr_func,1,[Define if you have function $1])
|
||||||
|
ac_cv_func_$1=yes
|
||||||
|
$3="-l$2 [$]$3"],[
|
||||||
|
ac_cv_func_$1=unknown
|
||||||
|
unset ac_cv_func_$1 2>/dev/null
|
||||||
|
$4],
|
||||||
|
[[$]$3])
|
||||||
|
])dnl
|
||||||
|
dnl ---------------------------------------------------------------------------
|
||||||
|
dnl Make an uppercase version of a variable
|
||||||
|
dnl $1=uppercase($2)
|
||||||
|
AC_DEFUN([CF_UPPER],
|
||||||
|
[
|
||||||
|
changequote(,)dnl
|
||||||
|
$1=`echo $2 | tr '[a-z]' '[A-Z]'`
|
||||||
|
changequote([,])dnl
|
||||||
|
])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],
|
||||||
|
ac_cv_struct_st_mtim_nsec,
|
||||||
|
[ac_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
ac_cv_struct_st_mtim_nsec=no
|
||||||
|
# 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_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_NSEC;],
|
||||||
|
[ac_cv_struct_st_mtim_nsec=$ac_val; break])
|
||||||
|
done
|
||||||
|
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])
|
||||||
|
fi
|
||||||
|
]
|
||||||
|
)
|
||||||
19
aclocal.m4
vendored
19
aclocal.m4
vendored
@@ -1,19 +0,0 @@
|
|||||||
dnl
|
|
||||||
dnl Check for a symbol
|
|
||||||
dnl
|
|
||||||
AC_DEFUN(AC_CHECK_SYMBOL, [dnl
|
|
||||||
AC_MSG_CHECKING(for $1)
|
|
||||||
AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
|
|
||||||
AC_TRY_LINK(,
|
|
||||||
changequote(,)dnl
|
|
||||||
extern char *$1[]; puts(*$1);,
|
|
||||||
changequote([,])dnl
|
|
||||||
ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
|
|
||||||
if test "$ac_cv_check_symbol_$1" = yes; then
|
|
||||||
changequote(,)dnl
|
|
||||||
ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
|
|
||||||
changequote([,])dnl
|
|
||||||
AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
|
|
||||||
dnl
|
|
||||||
7
alloca.c
7
alloca.c
@@ -114,9 +114,9 @@ static int stack_dir; /* 1 or -1 once known. */
|
|||||||
#define STACK_DIR stack_dir
|
#define STACK_DIR stack_dir
|
||||||
|
|
||||||
static void
|
static void
|
||||||
find_stack_direction ()
|
find_stack_direction (void)
|
||||||
{
|
{
|
||||||
static char *addr = NULL; /* Address of first `dummy', once known. */
|
static char *addr = NULL; /* Address of first 'dummy', once known. */
|
||||||
auto char dummy; /* To get stack address. */
|
auto char dummy; /* To get stack address. */
|
||||||
|
|
||||||
if (addr == NULL)
|
if (addr == NULL)
|
||||||
@@ -168,8 +168,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
|
|||||||
implementations of C, for example under Gould's UTX/32. */
|
implementations of C, for example under Gould's UTX/32. */
|
||||||
|
|
||||||
pointer
|
pointer
|
||||||
alloca (size)
|
alloca (unsigned size)
|
||||||
unsigned size;
|
|
||||||
{
|
{
|
||||||
auto char probe; /* Probes stack depth: */
|
auto char probe; /* Probes stack depth: */
|
||||||
register char *depth = ADDRESS_FUNCTION (probe);
|
register char *depth = ADDRESS_FUNCTION (probe);
|
||||||
|
|||||||
31
amiga.c
31
amiga.c
@@ -1,20 +1,18 @@
|
|||||||
/* Running commands on Amiga
|
/* Running commands on Amiga
|
||||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "make.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
@@ -29,8 +27,7 @@ static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n"
|
|||||||
"Amiga Port by A. Digulla (digulla@home.lake.de)";
|
"Amiga Port by A. Digulla (digulla@home.lake.de)";
|
||||||
|
|
||||||
int
|
int
|
||||||
MyExecute (argv)
|
MyExecute (char **argv)
|
||||||
char ** argv;
|
|
||||||
{
|
{
|
||||||
char * buffer, * ptr;
|
char * buffer, * ptr;
|
||||||
char ** aptr;
|
char ** aptr;
|
||||||
@@ -45,7 +42,7 @@ char ** argv;
|
|||||||
buffer = AllocMem (len, MEMF_ANY);
|
buffer = AllocMem (len, MEMF_ANY);
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
fatal ("MyExecute: Cannot allocate space for calling a command");
|
fatal (NILF, "MyExecute: Cannot allocate space for calling a command");
|
||||||
|
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
|
|
||||||
@@ -91,8 +88,7 @@ char ** argv;
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
wildcard_expansion (wc, o)
|
wildcard_expansion (char *wc, char *o)
|
||||||
char * wc, * o;
|
|
||||||
{
|
{
|
||||||
# define PATH_SIZE 1024
|
# define PATH_SIZE 1024
|
||||||
struct AnchorPath * apath;
|
struct AnchorPath * apath;
|
||||||
@@ -119,4 +115,3 @@ char * wc, * o;
|
|||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
27
amiga.h
27
amiga.h
@@ -1,21 +1,18 @@
|
|||||||
/* Definitions for amiga specific things
|
/* Definitions for amiga specific things
|
||||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
extern int MyExecute PARAMS ((char ** argv));
|
|
||||||
extern char * wildcard_expansion PARAMS ((char * wc, char * o));
|
|
||||||
|
|
||||||
|
int MyExecute (char ** argv);
|
||||||
|
char * wildcard_expansion (char * wc, char * o);
|
||||||
|
|||||||
322
ar.c
322
ar.c
@@ -1,20 +1,19 @@
|
|||||||
/* Interface to `ar' archives for GNU Make.
|
/* Interface to 'ar' archives for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "make.h"
|
||||||
|
|
||||||
@@ -24,165 +23,68 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
|
|
||||||
/* Defined in arscan.c. */
|
/* Return nonzero if NAME is an archive-member reference, zero if not. An
|
||||||
extern long int ar_scan PARAMS ((char *archive, long int (*function) (), long int arg));
|
archive-member reference is a name like 'lib(member)' where member is a
|
||||||
extern int ar_member_touch PARAMS ((char *arname, char *memname));
|
non-empty string.
|
||||||
extern int ar_name_equal PARAMS ((char *name, char *mem, int truncated));
|
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)'.
|
|
||||||
If a name like `lib((entry))' is used, a fatal error is signaled at
|
|
||||||
the attempt to use this unsupported feature. */
|
the attempt to use this unsupported feature. */
|
||||||
|
|
||||||
int
|
int
|
||||||
ar_name (name)
|
ar_name (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
char *p = index (name, '('), *end = name + strlen (name) - 1;
|
const char *p = strchr (name, '(');
|
||||||
|
const char *end;
|
||||||
|
|
||||||
if (p == 0 || p == name || *end != ')')
|
if (p == 0 || p == name)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
end = p + strlen (p) - 1;
|
||||||
|
if (*end != ')' || end == p + 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (p[1] == '(' && end[-1] == ')')
|
if (p[1] == '(' && end[-1] == ')')
|
||||||
fatal ("attempt to use unsupported feature: `%s'", name);
|
fatal (NILF, _("attempt to use unsupported feature: '%s'"), name);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Parse the archive-member reference NAME into the archive and member names.
|
/* Parse the archive-member reference NAME into the archive and member names.
|
||||||
Put the malloc'd archive name in *ARNAME_P if ARNAME_P is non-nil;
|
Creates one allocated string containing both names, pointed to by ARNAME_P.
|
||||||
put the malloc'd member name in *MEMNAME_P if MEMNAME_P is non-nil. */
|
MEMNAME_P points to the member. */
|
||||||
|
|
||||||
void
|
void
|
||||||
ar_parse_name (name, arname_p, memname_p)
|
ar_parse_name (const char *name, char **arname_p, char **memname_p)
|
||||||
char *name, **arname_p, **memname_p;
|
|
||||||
{
|
{
|
||||||
char *p = index (name, '('), *end = name + strlen (name) - 1;
|
char *p;
|
||||||
|
|
||||||
if (arname_p != 0)
|
*arname_p = xstrdup (name);
|
||||||
*arname_p = savestring (name, p - name);
|
p = strchr (*arname_p, '(');
|
||||||
|
*(p++) = '\0';
|
||||||
if (memname_p != 0)
|
p[strlen(p) - 1] = '\0';
|
||||||
*memname_p = savestring (p + 1, end - (p + 1));
|
*memname_p = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VMS
|
|
||||||
#include <lbrdef.h>
|
|
||||||
#include <mhddef.h>
|
|
||||||
#include <credef.h>
|
|
||||||
#include <descrip.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#if __DECC
|
|
||||||
#include <lbr$routines.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define uppercasify(str) {char *str1; for (str1 = str; *str1; str1++) *str1 = _toupper(*str1);}
|
|
||||||
|
|
||||||
#define LBR$_KEYNOTFND 2527330 /* This isn't in any .h file anywhere so I got it from a MACRO library */
|
|
||||||
|
|
||||||
time_t
|
|
||||||
ar_member_date (name)
|
|
||||||
char *name;
|
|
||||||
{
|
|
||||||
static char *arname;
|
|
||||||
static char *memname;
|
|
||||||
char *p,*q;
|
|
||||||
long int val;
|
|
||||||
static struct {
|
|
||||||
struct mhddef mhd;
|
|
||||||
struct credef cre;
|
|
||||||
char garbage[256];
|
|
||||||
} buf;
|
|
||||||
int func=LBR$C_READ,
|
|
||||||
type=LBR$C_TYP_OBJ,
|
|
||||||
rfa[2],
|
|
||||||
lidx,
|
|
||||||
status;
|
|
||||||
$DESCRIPTOR(bufdesc,(char *)&buf);
|
|
||||||
$DESCRIPTOR(libdesc,arname);
|
|
||||||
$DESCRIPTOR(moddesc,memname);
|
|
||||||
|
|
||||||
/* This "file" is an archive member. */
|
|
||||||
p = index (name, '(');
|
|
||||||
arname = savestring (name, p - name);
|
|
||||||
val = strlen (p) - 2;
|
|
||||||
/*
|
|
||||||
if (val > 15)
|
|
||||||
val = 15;
|
|
||||||
*/
|
|
||||||
memname = savestring (p + 1, val);
|
|
||||||
#ifdef OLDWAY
|
|
||||||
p = rindex (memname, ')');
|
|
||||||
if (p != 0) {
|
|
||||||
q = rindex(p,'.');
|
|
||||||
if (q)
|
|
||||||
*q = '\0'; /* to get rid of extension */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
q = rindex(memname,'.');
|
|
||||||
if (q)
|
|
||||||
*q = '\0'; /* to get rid of extension */
|
|
||||||
|
|
||||||
uppercasify(memname);
|
|
||||||
|
|
||||||
/* Make sure we know the modtime of the archive itself because
|
|
||||||
we are likely to be called just before commands to remake a
|
|
||||||
member are run, and they will change the archive itself. */
|
|
||||||
(void) f_mtime (enter_file (arname));
|
|
||||||
|
|
||||||
libdesc.dsc$a_pointer = arname;
|
|
||||||
libdesc.dsc$w_length = strlen(arname);
|
|
||||||
moddesc.dsc$a_pointer = memname;
|
|
||||||
moddesc.dsc$w_length = strlen(memname);
|
|
||||||
|
|
||||||
if (!((status = lbr$ini_control(&lidx,&func,&type,0)) & 1)) {
|
|
||||||
printf("Error in lbr$ini_control, %d\n",status);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((status = lbr$open(&lidx,&libdesc,0,0,0,0,0)) & 1)) {
|
|
||||||
printf("Error opening library %s to lookup member %s, %d\n",arname, memname ,status);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((status = lbr$lookup_key(&lidx,&moddesc,rfa)) & 1)) {
|
|
||||||
if (status != LBR$_KEYNOTFND)
|
|
||||||
printf("Error looking up module %s in library %s, %d\n",memname, arname ,status);
|
|
||||||
lbr$close(&lidx);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((status = lbr$set_module(&lidx,rfa,&bufdesc,&bufdesc,0)) & 1)) {
|
|
||||||
printf("Error getting module info, %d\n",status);
|
|
||||||
lbr$close(&lidx);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
lbr$close(&lidx);
|
|
||||||
|
|
||||||
val = SHELL$FIX_TIME(&buf.mhd.mhd$l_datim);
|
|
||||||
|
|
||||||
free (arname);
|
|
||||||
free (memname);
|
|
||||||
return (val <= 0 ? (time_t) -1 : (time_t) val);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static long int ar_member_date_1 PARAMS ((int desc, char *mem, int truncated, long int hdrpos,
|
|
||||||
long int datapos, long int size, long int date, int uid, int gid, int mode, char *name));
|
/* This function is called by 'ar_scan' to find which member to look at. */
|
||||||
|
|
||||||
|
/* ARGSUSED */
|
||||||
|
static long int
|
||||||
|
ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
|
||||||
|
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||||
|
long int size UNUSED, long int date,
|
||||||
|
int uid UNUSED, int gid UNUSED, int mode UNUSED,
|
||||||
|
const void *name)
|
||||||
|
{
|
||||||
|
return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Return the modtime of NAME. */
|
/* Return the modtime of NAME. */
|
||||||
|
|
||||||
time_t
|
time_t
|
||||||
ar_member_date (name)
|
ar_member_date (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
char *arname;
|
char *arname;
|
||||||
int arname_used = 0;
|
|
||||||
char *memname;
|
char *memname;
|
||||||
long int val;
|
long int val;
|
||||||
|
|
||||||
@@ -199,136 +101,102 @@ ar_member_date (name)
|
|||||||
struct file *arfile;
|
struct file *arfile;
|
||||||
arfile = lookup_file (arname);
|
arfile = lookup_file (arname);
|
||||||
if (arfile == 0 && file_exists_p (arname))
|
if (arfile == 0 && file_exists_p (arname))
|
||||||
{
|
arfile = enter_file (strcache_add (arname));
|
||||||
arfile = enter_file (arname);
|
|
||||||
arname_used = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (arfile != 0)
|
if (arfile != 0)
|
||||||
(void) f_mtime (arfile, 0);
|
(void) f_mtime (arfile, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
val = ar_scan (arname, ar_member_date_1, (long int) memname);
|
val = ar_scan (arname, ar_member_date_1, memname);
|
||||||
|
|
||||||
if (!arname_used)
|
|
||||||
free (arname);
|
free (arname);
|
||||||
free (memname);
|
|
||||||
|
|
||||||
return (val <= 0 ? (time_t) -1 : (time_t) val);
|
return (val <= 0 ? (time_t) -1 : (time_t) val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is called by `ar_scan' to find which member to look at. */
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
static long int
|
|
||||||
ar_member_date_1 (desc, mem, truncated,
|
|
||||||
hdrpos, datapos, size, date, uid, gid, mode, name)
|
|
||||||
int desc;
|
|
||||||
char *mem;
|
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
char *name;
|
|
||||||
{
|
|
||||||
return ar_name_equal (name, mem, truncated) ? date : 0;
|
|
||||||
}
|
|
||||||
#endif /* !VMS */
|
|
||||||
|
|
||||||
/* Set the archive-member NAME's modtime to now. */
|
/* Set the archive-member NAME's modtime to now. */
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
int
|
int
|
||||||
ar_touch (name)
|
ar_touch (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
error ("touch archive member is not available on VMS");
|
error (NILF, _("touch archive member is not available on VMS"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int
|
int
|
||||||
ar_touch (name)
|
ar_touch (const char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
char *arname, *memname;
|
char *arname, *memname;
|
||||||
int arname_used = 0;
|
int val;
|
||||||
register int val;
|
|
||||||
|
|
||||||
ar_parse_name (name, &arname, &memname);
|
ar_parse_name (name, &arname, &memname);
|
||||||
|
|
||||||
/* Make sure we know the modtime of the archive itself before we
|
/* Make sure we know the modtime of the archive itself before we
|
||||||
touch the member, since this will change the archive itself. */
|
touch the member, since this will change the archive modtime. */
|
||||||
{
|
{
|
||||||
struct file *arfile;
|
struct file *arfile;
|
||||||
arfile = lookup_file (arname);
|
arfile = enter_file (strcache_add (arname));
|
||||||
if (arfile == 0)
|
f_mtime (arfile, 0);
|
||||||
{
|
|
||||||
arfile = enter_file (arname);
|
|
||||||
arname_used = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
(void) f_mtime (arfile, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val = 1;
|
val = 1;
|
||||||
switch (ar_member_touch (arname, memname))
|
switch (ar_member_touch (arname, memname))
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
error ("touch: Archive `%s' does not exist", arname);
|
error (NILF, _("touch: Archive '%s' does not exist"), arname);
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
error ("touch: `%s' is not a valid archive", arname);
|
error (NILF, _("touch: '%s' is not a valid archive"), arname);
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
perror_with_name ("touch: ", arname);
|
perror_with_name ("touch: ", arname);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
error ("touch: Member `%s' does not exist in `%s'", memname, arname);
|
error (NILF,
|
||||||
|
_("touch: Member '%s' does not exist in '%s'"), memname, arname);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
val = 0;
|
val = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error ("touch: Bad return code from ar_member_touch on `%s'", name);
|
error (NILF,
|
||||||
|
_("touch: Bad return code from ar_member_touch on '%s'"), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!arname_used)
|
|
||||||
free (arname);
|
free (arname);
|
||||||
free (memname);
|
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
|
|
||||||
/* State of an `ar_glob' run, passed to `ar_glob_match'. */
|
/* State of an 'ar_glob' run, passed to 'ar_glob_match'. */
|
||||||
|
|
||||||
struct ar_glob_state
|
struct ar_glob_state
|
||||||
{
|
{
|
||||||
char *arname;
|
const char *arname;
|
||||||
char *pattern;
|
const char *pattern;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
struct nameseq *chain;
|
struct nameseq *chain;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This function is called by `ar_scan' to match one archive
|
/* This function is called by 'ar_scan' to match one archive
|
||||||
element against the pattern in STATE. */
|
element against the pattern in STATE. */
|
||||||
|
|
||||||
static long int
|
static long int
|
||||||
ar_glob_match (desc, mem, truncated,
|
ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||||
hdrpos, datapos, size, date, uid, gid, mode,
|
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||||
state)
|
long int size UNUSED, long int date UNUSED, int uid UNUSED,
|
||||||
int desc;
|
int gid UNUSED, int mode UNUSED, const void *arg)
|
||||||
char *mem;
|
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
struct ar_glob_state *state;
|
|
||||||
{
|
{
|
||||||
|
struct ar_glob_state *state = (struct ar_glob_state *)arg;
|
||||||
|
|
||||||
if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0)
|
if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0)
|
||||||
{
|
{
|
||||||
/* We have a match. Add it to the chain. */
|
/* We have a match. Add it to the chain. */
|
||||||
struct nameseq *new = (struct nameseq *) xmalloc (state->size);
|
struct nameseq *new = xcalloc (state->size);
|
||||||
new->name = concat (state->arname, mem, ")");
|
new->name = strcache_add (concat (4, state->arname, "(", mem, ")"));
|
||||||
new->next = state->chain;
|
new->next = state->chain;
|
||||||
state->chain = new;
|
state->chain = new;
|
||||||
++state->n;
|
++state->n;
|
||||||
@@ -337,24 +205,13 @@ ar_glob_match (desc, mem, truncated,
|
|||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Alphabetic sorting function for `qsort'. */
|
|
||||||
|
|
||||||
static int
|
|
||||||
ar_glob_alphacompare (a, b)
|
|
||||||
char **a, **b;
|
|
||||||
{
|
|
||||||
return strcmp (*a, *b);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return nonzero if PATTERN contains any metacharacters.
|
/* Return nonzero if PATTERN contains any metacharacters.
|
||||||
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
||||||
static int
|
static int
|
||||||
glob_pattern_p (pattern, quote)
|
glob_pattern_p (const char *pattern, int quote)
|
||||||
const char *pattern;
|
|
||||||
const int quote;
|
|
||||||
{
|
{
|
||||||
register const char *p;
|
const char *p;
|
||||||
int open = 0;
|
int opened = 0;
|
||||||
|
|
||||||
for (p = pattern; *p != '\0'; ++p)
|
for (p = pattern; *p != '\0'; ++p)
|
||||||
switch (*p)
|
switch (*p)
|
||||||
@@ -369,11 +226,11 @@ glob_pattern_p (pattern, quote)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '[':
|
case '[':
|
||||||
open = 1;
|
opened = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ']':
|
case ']':
|
||||||
if (open)
|
if (opened)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -385,13 +242,11 @@ glob_pattern_p (pattern, quote)
|
|||||||
Return a malloc'd chain of matching elements (or nil if none). */
|
Return a malloc'd chain of matching elements (or nil if none). */
|
||||||
|
|
||||||
struct nameseq *
|
struct nameseq *
|
||||||
ar_glob (arname, member_pattern, size)
|
ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
||||||
char *arname, *member_pattern;
|
|
||||||
unsigned int size;
|
|
||||||
{
|
{
|
||||||
struct ar_glob_state state;
|
struct ar_glob_state state;
|
||||||
char **names;
|
|
||||||
struct nameseq *n;
|
struct nameseq *n;
|
||||||
|
const char **names;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (! glob_pattern_p (member_pattern, 1))
|
if (! glob_pattern_p (member_pattern, 1))
|
||||||
@@ -399,28 +254,25 @@ ar_glob (arname, member_pattern, size)
|
|||||||
|
|
||||||
/* Scan the archive for matches.
|
/* Scan the archive for matches.
|
||||||
ar_glob_match will accumulate them in STATE.chain. */
|
ar_glob_match will accumulate them in STATE.chain. */
|
||||||
i = strlen (arname);
|
state.arname = arname;
|
||||||
state.arname = (char *) alloca (i + 2);
|
|
||||||
bcopy (arname, state.arname, i);
|
|
||||||
state.arname[i] = '(';
|
|
||||||
state.arname[i + 1] = '\0';
|
|
||||||
state.pattern = member_pattern;
|
state.pattern = member_pattern;
|
||||||
state.size = size;
|
state.size = size;
|
||||||
state.chain = 0;
|
state.chain = 0;
|
||||||
state.n = 0;
|
state.n = 0;
|
||||||
(void) ar_scan (arname, ar_glob_match, (long int) &state);
|
ar_scan (arname, ar_glob_match, &state);
|
||||||
|
|
||||||
if (state.chain == 0)
|
if (state.chain == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Now put the names into a vector for sorting. */
|
/* Now put the names into a vector for sorting. */
|
||||||
names = (char **) alloca (state.n * sizeof (char *));
|
names = alloca (state.n * sizeof (const char *));
|
||||||
i = 0;
|
i = 0;
|
||||||
for (n = state.chain; n != 0; n = n->next)
|
for (n = state.chain; n != 0; n = n->next)
|
||||||
names[i++] = n->name;
|
names[i++] = n->name;
|
||||||
|
|
||||||
/* Sort them alphabetically. */
|
/* Sort them alphabetically. */
|
||||||
qsort ((char *) names, i, sizeof (*names), ar_glob_alphacompare);
|
/* MSVC erroneously warns without a cast here. */
|
||||||
|
qsort ((void *)names, i, sizeof (*names), alpha_compare);
|
||||||
|
|
||||||
/* Put them back into the chain in the sorted order. */
|
/* Put them back into the chain in the sorted order. */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|||||||
541
arscan.c
541
arscan.c
@@ -1,19 +1,18 @@
|
|||||||
/* Library function for scanning an archive file.
|
/* Library function for scanning an archive file.
|
||||||
Copyright (C) 1987, 89, 91, 92, 93, 94, 95 Free Software Foundation, Inc.
|
Copyright (C) 1987-2012 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "make.h"
|
||||||
|
|
||||||
@@ -24,7 +23,194 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
#include <lbrdef.h>
|
||||||
|
#include <mhddef.h>
|
||||||
|
#include <credef.h>
|
||||||
|
#include <descrip.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#if __DECC
|
||||||
|
#include <unixlib.h>
|
||||||
|
#include <lbr$routines.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void *VMS_lib_idx;
|
||||||
|
|
||||||
|
static char *VMS_saved_memname;
|
||||||
|
|
||||||
|
static time_t VMS_member_date;
|
||||||
|
|
||||||
|
static long int (*VMS_function) ();
|
||||||
|
|
||||||
|
static int
|
||||||
|
VMS_get_member_info (struct dsc$descriptor_s *module, unsigned long *rfa)
|
||||||
|
{
|
||||||
|
int status, i;
|
||||||
|
long int fnval;
|
||||||
|
|
||||||
|
time_t val;
|
||||||
|
|
||||||
|
static struct dsc$descriptor_s bufdesc =
|
||||||
|
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
||||||
|
|
||||||
|
struct mhddef *mhd;
|
||||||
|
char filename[128];
|
||||||
|
|
||||||
|
bufdesc.dsc$a_pointer = filename;
|
||||||
|
bufdesc.dsc$w_length = sizeof (filename);
|
||||||
|
|
||||||
|
status = lbr$set_module (&VMS_lib_idx, rfa, &bufdesc,
|
||||||
|
&bufdesc.dsc$w_length, 0);
|
||||||
|
if (! (status & 1))
|
||||||
|
{
|
||||||
|
error (NILF, _("lbr$set_module() failed to extract module info, status = %d"),
|
||||||
|
status);
|
||||||
|
|
||||||
|
lbr$close (&VMS_lib_idx);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
mhd = (struct mhddef *) filename;
|
||||||
|
|
||||||
|
#ifdef __DECC
|
||||||
|
/* John Fowler <jfowler@nyx.net> writes this is needed in his environment,
|
||||||
|
* but that decc$fix_time() isn't documented to work this way. Let me
|
||||||
|
* know if this causes problems in other VMS environments.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
/* Modified by M. Gehre at 11-JAN-2008 because old formula is wrong:
|
||||||
|
* val = decc$fix_time (&mhd->mhd$l_datim) + timezone - daylight*3600;
|
||||||
|
* a) daylight specifies, if the timezone has daylight saving enabled, not
|
||||||
|
* if it is active
|
||||||
|
* b) what we need is the information, if daylight saving was active, if
|
||||||
|
* the library module was replaced. This information we get using the
|
||||||
|
* localtime function
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct tm *tmp;
|
||||||
|
|
||||||
|
/* Conversion from VMS time to C time */
|
||||||
|
val = decc$fix_time (&mhd->mhd$l_datim);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Conversion from local time (stored in library) to GMT (needed for gmake)
|
||||||
|
* Note: The tm_gmtoff element is a VMS extension to the ANSI standard.
|
||||||
|
*/
|
||||||
|
tmp = localtime (&val);
|
||||||
|
val -= tmp->tm_gmtoff;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (i = 0; i < module->dsc$w_length; i++)
|
||||||
|
filename[i] = _tolower ((unsigned char)module->dsc$a_pointer[i]);
|
||||||
|
|
||||||
|
filename[i] = '\0';
|
||||||
|
|
||||||
|
VMS_member_date = (time_t) -1;
|
||||||
|
|
||||||
|
fnval =
|
||||||
|
(*VMS_function) (-1, filename, 0, 0, 0, 0, val, 0, 0, 0,
|
||||||
|
VMS_saved_memname);
|
||||||
|
|
||||||
|
if (fnval)
|
||||||
|
{
|
||||||
|
VMS_member_date = fnval;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Takes three arguments ARCHIVE, FUNCTION and ARG.
|
||||||
|
|
||||||
|
Open the archive named ARCHIVE, find its members one by one,
|
||||||
|
and for each one call FUNCTION with the following arguments:
|
||||||
|
archive file descriptor for reading the data,
|
||||||
|
member name,
|
||||||
|
member name might be truncated flag,
|
||||||
|
member header position in file,
|
||||||
|
member data position in file,
|
||||||
|
member data size,
|
||||||
|
member date,
|
||||||
|
member uid,
|
||||||
|
member gid,
|
||||||
|
member protection mode,
|
||||||
|
ARG.
|
||||||
|
|
||||||
|
NOTE: on VMS systems, only name, date, and arg are meaningful!
|
||||||
|
|
||||||
|
The descriptor is poised to read the data of the member
|
||||||
|
when FUNCTION is called. It does not matter how much
|
||||||
|
data FUNCTION reads.
|
||||||
|
|
||||||
|
If FUNCTION returns nonzero, we immediately return
|
||||||
|
what FUNCTION returned.
|
||||||
|
|
||||||
|
Returns -1 if archive does not exist,
|
||||||
|
Returns -2 if archive has invalid format.
|
||||||
|
Returns 0 if have scanned successfully. */
|
||||||
|
|
||||||
|
long int
|
||||||
|
ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
static struct dsc$descriptor_s libdesc =
|
||||||
|
{ 0, DSC$K_DTYPE_T, DSC$K_CLASS_S, NULL };
|
||||||
|
|
||||||
|
unsigned long func = LBR$C_READ;
|
||||||
|
unsigned long type = LBR$C_TYP_UNK;
|
||||||
|
unsigned long index = 1;
|
||||||
|
|
||||||
|
int status;
|
||||||
|
|
||||||
|
status = lbr$ini_control (&VMS_lib_idx, &func, &type, 0);
|
||||||
|
|
||||||
|
if (! (status & 1))
|
||||||
|
{
|
||||||
|
error (NILF, _("lbr$ini_control() failed with status = %d"), status);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* there is no such descriptor with "const char *dsc$a_pointer" */
|
||||||
|
libdesc.dsc$a_pointer = (char *)archive;
|
||||||
|
libdesc.dsc$w_length = strlen (archive);
|
||||||
|
|
||||||
|
status = lbr$open (&VMS_lib_idx, &libdesc, 0, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
if (! (status & 1))
|
||||||
|
{
|
||||||
|
error (NILF, _("unable to open library '%s' to lookup member '%s'"),
|
||||||
|
archive, (char *)arg);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
VMS_saved_memname = (char *)arg;
|
||||||
|
|
||||||
|
/* For comparison, delete .obj from arg name. */
|
||||||
|
|
||||||
|
p = strrchr (VMS_saved_memname, '.');
|
||||||
|
if (p)
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
|
VMS_function = function;
|
||||||
|
|
||||||
|
VMS_member_date = (time_t) -1;
|
||||||
|
lbr$get_index (&VMS_lib_idx, &index, VMS_get_member_info, 0);
|
||||||
|
|
||||||
|
/* Undo the damage. */
|
||||||
|
if (p)
|
||||||
|
*p = '.';
|
||||||
|
|
||||||
|
lbr$close (&VMS_lib_idx);
|
||||||
|
|
||||||
|
return VMS_member_date > 0 ? VMS_member_date : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else /* !VMS */
|
||||||
|
|
||||||
/* SCO Unix's compiler defines both of these. */
|
/* SCO Unix's compiler defines both of these. */
|
||||||
#ifdef M_UNIX
|
#ifdef M_UNIX
|
||||||
#undef M_XENIX
|
#undef M_XENIX
|
||||||
@@ -47,7 +233,63 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* On AIX, define these symbols to be sure to get both archive formats.
|
||||||
|
AIX 4.3 introduced the "big" archive format to support 64-bit object
|
||||||
|
files, so on AIX 4.3 systems we need to support both the "normal" and
|
||||||
|
"big" archive formats. An archive's format is indicated in the
|
||||||
|
"fl_magic" field of the "FL_HDR" structure. For a normal archive,
|
||||||
|
this field will be the string defined by the AIAMAG symbol. For a
|
||||||
|
"big" archive, it will be the string defined by the AIAMAGBIG symbol
|
||||||
|
(at least on AIX it works this way).
|
||||||
|
|
||||||
|
Note: we'll define these symbols regardless of which AIX version
|
||||||
|
we're compiling on, but this is okay since we'll use the new symbols
|
||||||
|
only if they're present. */
|
||||||
|
#ifdef _AIX
|
||||||
|
# define __AR_SMALL__
|
||||||
|
# define __AR_BIG__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WINDOWS32
|
||||||
|
# ifndef __BEOS__
|
||||||
# include <ar.h>
|
# include <ar.h>
|
||||||
|
# else
|
||||||
|
/* BeOS 5 doesn't have <ar.h> but has archives in the same format
|
||||||
|
* as many other Unices. This was taken from GNU binutils for BeOS.
|
||||||
|
*/
|
||||||
|
# define ARMAG "!<arch>\n" /* String that begins an archive file. */
|
||||||
|
# define SARMAG 8 /* Size of that string. */
|
||||||
|
# define ARFMAG "`\n" /* String in ar_fmag at end of each header. */
|
||||||
|
struct ar_hdr
|
||||||
|
{
|
||||||
|
char ar_name[16]; /* Member file name, sometimes / terminated. */
|
||||||
|
char ar_date[12]; /* File date, decimal seconds since Epoch. */
|
||||||
|
char ar_uid[6], ar_gid[6]; /* User and group IDs, in ASCII decimal. */
|
||||||
|
char ar_mode[8]; /* File mode, in ASCII octal. */
|
||||||
|
char ar_size[10]; /* File size, in ASCII decimal. */
|
||||||
|
char ar_fmag[2]; /* Always contains ARFMAG. */
|
||||||
|
};
|
||||||
|
# endif
|
||||||
|
# define TOCHAR(_m) (_m)
|
||||||
|
#else
|
||||||
|
/* These should allow us to read Windows (VC++) libraries (according to Frank
|
||||||
|
* Libbrecht <frankl@abzx.belgium.hp.com>)
|
||||||
|
*/
|
||||||
|
# include <windows.h>
|
||||||
|
# include <windef.h>
|
||||||
|
# include <io.h>
|
||||||
|
# define ARMAG IMAGE_ARCHIVE_START
|
||||||
|
# define SARMAG IMAGE_ARCHIVE_START_SIZE
|
||||||
|
# define ar_hdr _IMAGE_ARCHIVE_MEMBER_HEADER
|
||||||
|
# define ar_name Name
|
||||||
|
# define ar_mode Mode
|
||||||
|
# define ar_size Size
|
||||||
|
# define ar_date Date
|
||||||
|
# define ar_uid UserID
|
||||||
|
# define ar_gid GroupID
|
||||||
|
/* In Windows the member names have type BYTE so we must cast them. */
|
||||||
|
# define TOCHAR(_m) ((char *)(_m))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Cray's <ar.h> apparently defines this. */
|
/* Cray's <ar.h> apparently defines this. */
|
||||||
#ifndef AR_HDR_SIZE
|
#ifndef AR_HDR_SIZE
|
||||||
@@ -82,25 +324,26 @@
|
|||||||
Returns 0 if have scanned successfully. */
|
Returns 0 if have scanned successfully. */
|
||||||
|
|
||||||
long int
|
long int
|
||||||
ar_scan (archive, function, arg)
|
ar_scan (const char *archive, ar_member_func_t function, const void *arg)
|
||||||
char *archive;
|
|
||||||
long int (*function) ();
|
|
||||||
long int arg;
|
|
||||||
{
|
{
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
FL_HDR fl_header;
|
FL_HDR fl_header;
|
||||||
|
#ifdef AIAMAGBIG
|
||||||
|
int big_archive = 0;
|
||||||
|
FL_HDR_BIG fl_header_big;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
int long_name = 0;
|
int long_name = 0;
|
||||||
#endif
|
#endif
|
||||||
char *namemap = 0;
|
char *namemap = 0;
|
||||||
register int desc = open (archive, O_RDONLY, 0);
|
int desc = open (archive, O_RDONLY, 0);
|
||||||
if (desc < 0)
|
if (desc < 0)
|
||||||
return -1;
|
return -1;
|
||||||
#ifdef SARMAG
|
#ifdef SARMAG
|
||||||
{
|
{
|
||||||
char buf[SARMAG];
|
char buf[SARMAG];
|
||||||
register int nread = read (desc, buf, SARMAG);
|
register int nread = read (desc, buf, SARMAG);
|
||||||
if (nread != SARMAG || bcmp (buf, ARMAG, SARMAG))
|
if (nread != SARMAG || memcmp (buf, ARMAG, SARMAG))
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
return -2;
|
return -2;
|
||||||
@@ -109,8 +352,39 @@ ar_scan (archive, function, arg)
|
|||||||
#else
|
#else
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
{
|
{
|
||||||
register int nread = read (desc, (char *) &fl_header, FL_HSZ);
|
register int nread = read (desc, &fl_header, FL_HSZ);
|
||||||
if (nread != FL_HSZ || bcmp (fl_header.fl_magic, AIAMAG, SAIAMAG))
|
|
||||||
|
if (nread != FL_HSZ)
|
||||||
|
{
|
||||||
|
(void) close (desc);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
#ifdef AIAMAGBIG
|
||||||
|
/* If this is a "big" archive, then set the flag and
|
||||||
|
re-read the header into the "big" structure. */
|
||||||
|
if (!memcmp (fl_header.fl_magic, AIAMAGBIG, SAIAMAG))
|
||||||
|
{
|
||||||
|
big_archive = 1;
|
||||||
|
|
||||||
|
/* seek back to beginning of archive */
|
||||||
|
if (lseek (desc, 0, 0) < 0)
|
||||||
|
{
|
||||||
|
(void) close (desc);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* re-read the header into the "big" structure */
|
||||||
|
nread = read (desc, &fl_header_big, FL_HSZ_BIG);
|
||||||
|
if (nread != FL_HSZ_BIG)
|
||||||
|
{
|
||||||
|
(void) close (desc);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
/* Check to make sure this is a "normal" archive. */
|
||||||
|
if (memcmp (fl_header.fl_magic, AIAMAG, SAIAMAG))
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
return -2;
|
return -2;
|
||||||
@@ -142,8 +416,18 @@ ar_scan (archive, function, arg)
|
|||||||
long int member_offset;
|
long int member_offset;
|
||||||
long int last_member_offset;
|
long int last_member_offset;
|
||||||
|
|
||||||
|
#ifdef AIAMAGBIG
|
||||||
|
if ( big_archive )
|
||||||
|
{
|
||||||
|
sscanf (fl_header_big.fl_fstmoff, "%20ld", &member_offset);
|
||||||
|
sscanf (fl_header_big.fl_lstmoff, "%20ld", &last_member_offset);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
sscanf (fl_header.fl_fstmoff, "%12ld", &member_offset);
|
sscanf (fl_header.fl_fstmoff, "%12ld", &member_offset);
|
||||||
sscanf (fl_header.fl_lstmoff, "%12ld", &last_member_offset);
|
sscanf (fl_header.fl_lstmoff, "%12ld", &last_member_offset);
|
||||||
|
}
|
||||||
|
|
||||||
if (member_offset == 0)
|
if (member_offset == 0)
|
||||||
{
|
{
|
||||||
@@ -164,6 +448,9 @@ ar_scan (archive, function, arg)
|
|||||||
{
|
{
|
||||||
register int nread;
|
register int nread;
|
||||||
struct ar_hdr member_header;
|
struct ar_hdr member_header;
|
||||||
|
#ifdef AIAMAGBIG
|
||||||
|
struct ar_hdr_big member_header_big;
|
||||||
|
#endif
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
char name[256];
|
char name[256];
|
||||||
int name_len;
|
int name_len;
|
||||||
@@ -186,10 +473,47 @@ ar_scan (archive, function, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
#define AR_MEMHDR (AR_HDR_SIZE - sizeof (member_header._ar_name))
|
#define AR_MEMHDR_SZ(x) (sizeof(x) - sizeof (x._ar_name))
|
||||||
nread = read (desc, (char *) &member_header, AR_MEMHDR);
|
|
||||||
|
|
||||||
if (nread != AR_MEMHDR)
|
#ifdef AIAMAGBIG
|
||||||
|
if (big_archive)
|
||||||
|
{
|
||||||
|
nread = read (desc, &member_header_big,
|
||||||
|
AR_MEMHDR_SZ(member_header_big) );
|
||||||
|
|
||||||
|
if (nread != AR_MEMHDR_SZ(member_header_big))
|
||||||
|
{
|
||||||
|
(void) close (desc);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
sscanf (member_header_big.ar_namlen, "%4d", &name_len);
|
||||||
|
nread = read (desc, name, name_len);
|
||||||
|
|
||||||
|
if (nread != name_len)
|
||||||
|
{
|
||||||
|
(void) close (desc);
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
name[name_len] = 0;
|
||||||
|
|
||||||
|
sscanf (member_header_big.ar_date, "%12ld", &dateval);
|
||||||
|
sscanf (member_header_big.ar_uid, "%12d", &uidval);
|
||||||
|
sscanf (member_header_big.ar_gid, "%12d", &gidval);
|
||||||
|
sscanf (member_header_big.ar_mode, "%12o", &eltmode);
|
||||||
|
sscanf (member_header_big.ar_size, "%20ld", &eltsize);
|
||||||
|
|
||||||
|
data_offset = (member_offset + AR_MEMHDR_SZ(member_header_big)
|
||||||
|
+ name_len + 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
nread = read (desc, &member_header,
|
||||||
|
AR_MEMHDR_SZ(member_header) );
|
||||||
|
|
||||||
|
if (nread != AR_MEMHDR_SZ(member_header))
|
||||||
{
|
{
|
||||||
(void) close (desc);
|
(void) close (desc);
|
||||||
return -2;
|
return -2;
|
||||||
@@ -212,8 +536,10 @@ ar_scan (archive, function, arg)
|
|||||||
sscanf (member_header.ar_mode, "%12o", &eltmode);
|
sscanf (member_header.ar_mode, "%12o", &eltmode);
|
||||||
sscanf (member_header.ar_size, "%12ld", &eltsize);
|
sscanf (member_header.ar_size, "%12ld", &eltsize);
|
||||||
|
|
||||||
if ((data_offset = member_offset + AR_MEMHDR + name_len + 2) % 2)
|
data_offset = (member_offset + AR_MEMHDR_SZ(member_header)
|
||||||
++data_offset;
|
+ name_len + 2);
|
||||||
|
}
|
||||||
|
data_offset += data_offset % 2;
|
||||||
|
|
||||||
fnval =
|
fnval =
|
||||||
(*function) (desc, name, 0,
|
(*function) (desc, name, 0,
|
||||||
@@ -222,14 +548,26 @@ ar_scan (archive, function, arg)
|
|||||||
eltmode, arg);
|
eltmode, arg);
|
||||||
|
|
||||||
#else /* Not AIAMAG. */
|
#else /* Not AIAMAG. */
|
||||||
nread = read (desc, (char *) &member_header, AR_HDR_SIZE);
|
nread = read (desc, &member_header, AR_HDR_SIZE);
|
||||||
if (nread == 0)
|
if (nread == 0)
|
||||||
/* No data left means end of file; that is OK. */
|
/* No data left means end of file; that is OK. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (nread != AR_HDR_SIZE
|
if (nread != AR_HDR_SIZE
|
||||||
|
#if defined(ARFMAG) || defined(ARFZMAG)
|
||||||
|
|| (
|
||||||
# ifdef ARFMAG
|
# ifdef ARFMAG
|
||||||
|| bcmp (member_header.ar_fmag, ARFMAG, 2)
|
memcmp (member_header.ar_fmag, ARFMAG, 2)
|
||||||
|
# else
|
||||||
|
1
|
||||||
|
# endif
|
||||||
|
&&
|
||||||
|
# ifdef ARFZMAG
|
||||||
|
memcmp (member_header.ar_fmag, ARFZMAG, 2)
|
||||||
|
# else
|
||||||
|
1
|
||||||
|
# endif
|
||||||
|
)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -238,7 +576,7 @@ ar_scan (archive, function, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
name = namebuf;
|
name = namebuf;
|
||||||
bcopy (member_header.ar_name, name, sizeof member_header.ar_name);
|
memcpy (name, member_header.ar_name, sizeof member_header.ar_name);
|
||||||
{
|
{
|
||||||
register char *p = name + sizeof member_header.ar_name;
|
register char *p = name + sizeof member_header.ar_name;
|
||||||
do
|
do
|
||||||
@@ -278,7 +616,7 @@ ar_scan (archive, function, arg)
|
|||||||
{
|
{
|
||||||
int namesize = atoi (name + 3);
|
int namesize = atoi (name + 3);
|
||||||
|
|
||||||
name = (char *) alloca (namesize + 1);
|
name = alloca (namesize + 1);
|
||||||
nread = read (desc, name, namesize);
|
nread = read (desc, name, namesize);
|
||||||
if (nread != namesize)
|
if (nread != namesize)
|
||||||
{
|
{
|
||||||
@@ -293,8 +631,8 @@ ar_scan (archive, function, arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef M_XENIX
|
#ifndef M_XENIX
|
||||||
sscanf (member_header.ar_mode, "%o", &eltmode);
|
sscanf (TOCHAR (member_header.ar_mode), "%o", &eltmode);
|
||||||
eltsize = atol (member_header.ar_size);
|
eltsize = atol (TOCHAR (member_header.ar_size));
|
||||||
#else /* Xenix. */
|
#else /* Xenix. */
|
||||||
eltmode = (unsigned short int) member_header.ar_mode;
|
eltmode = (unsigned short int) member_header.ar_mode;
|
||||||
eltsize = member_header.ar_size;
|
eltsize = member_header.ar_size;
|
||||||
@@ -304,9 +642,9 @@ ar_scan (archive, function, arg)
|
|||||||
(*function) (desc, name, ! long_name, member_offset,
|
(*function) (desc, name, ! long_name, member_offset,
|
||||||
member_offset + AR_HDR_SIZE, eltsize,
|
member_offset + AR_HDR_SIZE, eltsize,
|
||||||
#ifndef M_XENIX
|
#ifndef M_XENIX
|
||||||
atol (member_header.ar_date),
|
atol (TOCHAR (member_header.ar_date)),
|
||||||
atoi (member_header.ar_uid),
|
atoi (TOCHAR (member_header.ar_uid)),
|
||||||
atoi (member_header.ar_gid),
|
atoi (TOCHAR (member_header.ar_gid)),
|
||||||
#else /* Xenix. */
|
#else /* Xenix. */
|
||||||
member_header.ar_date,
|
member_header.ar_date,
|
||||||
member_header.ar_uid,
|
member_header.ar_uid,
|
||||||
@@ -327,6 +665,11 @@ ar_scan (archive, function, arg)
|
|||||||
/* End of the chain. */
|
/* End of the chain. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef AIAMAGBIG
|
||||||
|
if (big_archive)
|
||||||
|
sscanf (member_header_big.ar_nxtmem, "%20ld", &member_offset);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
sscanf (member_header.ar_nxtmem, "%12ld", &member_offset);
|
sscanf (member_header.ar_nxtmem, "%12ld", &member_offset);
|
||||||
|
|
||||||
if (lseek (desc, member_offset, 0) != member_offset)
|
if (lseek (desc, member_offset, 0) != member_offset)
|
||||||
@@ -344,7 +687,7 @@ ar_scan (archive, function, arg)
|
|||||||
char *clear;
|
char *clear;
|
||||||
char *limit;
|
char *limit;
|
||||||
|
|
||||||
namemap = (char *) alloca (eltsize);
|
namemap = alloca (eltsize);
|
||||||
nread = read (desc, namemap, eltsize);
|
nread = read (desc, namemap, eltsize);
|
||||||
if (nread != eltsize)
|
if (nread != eltsize)
|
||||||
{
|
{
|
||||||
@@ -379,54 +722,22 @@ ar_scan (archive, function, arg)
|
|||||||
close (desc);
|
close (desc);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* !VMS */
|
||||||
|
|
||||||
/* Return nonzero iff NAME matches MEM.
|
/* Return nonzero iff NAME matches MEM.
|
||||||
If TRUNCATED is nonzero, MEM may be truncated to
|
If TRUNCATED is nonzero, MEM may be truncated to
|
||||||
sizeof (struct ar_hdr.ar_name) - 1. */
|
sizeof (struct ar_hdr.ar_name) - 1. */
|
||||||
|
|
||||||
int
|
int
|
||||||
ar_name_equal (name, mem, truncated)
|
ar_name_equal (const char *name, const char *mem, int truncated)
|
||||||
char *name, *mem;
|
|
||||||
int truncated;
|
|
||||||
{
|
{
|
||||||
char *p;
|
const char *p;
|
||||||
|
|
||||||
p = rindex (name, '/');
|
p = strrchr (name, '/');
|
||||||
if (p != 0)
|
if (p != 0)
|
||||||
name = p + 1;
|
name = p + 1;
|
||||||
|
|
||||||
/* We no longer use this kludge, since we
|
#ifndef VMS
|
||||||
now support long archive member names. */
|
|
||||||
|
|
||||||
#if 0 && !defined (AIAMAG) && !defined (APOLLO)
|
|
||||||
|
|
||||||
{
|
|
||||||
/* `reallylongname.o' matches `reallylongnam.o'.
|
|
||||||
If member names have a trailing slash, that's `reallylongna.o'. */
|
|
||||||
|
|
||||||
struct ar_hdr h;
|
|
||||||
unsigned int max = sizeof (h.ar_name);
|
|
||||||
unsigned int namelen, memlen;
|
|
||||||
|
|
||||||
if (strncmp (name, mem, max - 3))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
namelen = strlen (name);
|
|
||||||
memlen = strlen (mem);
|
|
||||||
|
|
||||||
if (namelen > memlen && memlen >= max - 1
|
|
||||||
&& name[namelen - 2] == '.' && name[namelen - 1] == 'o'
|
|
||||||
&& mem[memlen - 2] == '.' && mem[memlen - 1] == 'o')
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (namelen != memlen)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return (namelen < max - 3 || !strcmp (name + max - 3, mem + max - 3));
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* AIX or APOLLO. */
|
|
||||||
|
|
||||||
if (truncated)
|
if (truncated)
|
||||||
{
|
{
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
@@ -434,32 +745,25 @@ ar_name_equal (name, mem, truncated)
|
|||||||
abort ();
|
abort ();
|
||||||
#else
|
#else
|
||||||
struct ar_hdr hdr;
|
struct ar_hdr hdr;
|
||||||
return !strncmp (name, mem,
|
|
||||||
sizeof (hdr.ar_name) -
|
|
||||||
#if !defined (__hpux) && !defined (cray)
|
#if !defined (__hpux) && !defined (cray)
|
||||||
1
|
return strneq (name, mem, sizeof(hdr.ar_name) - 1);
|
||||||
#else
|
#else
|
||||||
2
|
return strneq (name, mem, sizeof(hdr.ar_name) - 2);
|
||||||
#endif /* !__hpux && !cray */
|
#endif /* !__hpux && !cray */
|
||||||
);
|
#endif /* !AIAMAG */
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* !VMS */
|
||||||
|
|
||||||
return !strcmp (name, mem);
|
return !strcmp (name, mem);
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef VMS
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static long int
|
static long int
|
||||||
ar_member_pos (desc, mem, truncated,
|
ar_member_pos (int desc UNUSED, const char *mem, int truncated,
|
||||||
hdrpos, datapos, size, date, uid, gid, mode, name)
|
long int hdrpos, long int datapos UNUSED, long int size UNUSED,
|
||||||
int desc;
|
long int date UNUSED, int uid UNUSED, int gid UNUSED,
|
||||||
char *mem;
|
int mode UNUSED, const void *name)
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
if (!ar_name_equal (name, mem, truncated))
|
if (!ar_name_equal (name, mem, truncated))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -474,13 +778,13 @@ ar_member_pos (desc, mem, truncated,
|
|||||||
1 if valid but member MEMNAME does not exist. */
|
1 if valid but member MEMNAME does not exist. */
|
||||||
|
|
||||||
int
|
int
|
||||||
ar_member_touch (arname, memname)
|
ar_member_touch (const char *arname, const char *memname)
|
||||||
char *arname, *memname;
|
|
||||||
{
|
{
|
||||||
register long int pos = ar_scan (arname, ar_member_pos, (long int) memname);
|
long int pos = ar_scan (arname, ar_member_pos, memname);
|
||||||
register int fd;
|
int fd;
|
||||||
struct ar_hdr ar_hdr;
|
struct ar_hdr ar_hdr;
|
||||||
register int i;
|
int i;
|
||||||
|
unsigned int ui;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
@@ -494,24 +798,22 @@ ar_member_touch (arname, memname)
|
|||||||
/* Read in this member's header */
|
/* Read in this member's header */
|
||||||
if (lseek (fd, pos, 0) < 0)
|
if (lseek (fd, pos, 0) < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
if (AR_HDR_SIZE != read (fd, (char *) &ar_hdr, AR_HDR_SIZE))
|
if (AR_HDR_SIZE != read (fd, &ar_hdr, AR_HDR_SIZE))
|
||||||
goto lose;
|
goto lose;
|
||||||
/* Write back the header, thus touching the archive file. */
|
/* Write back the header, thus touching the archive file. */
|
||||||
if (lseek (fd, pos, 0) < 0)
|
if (lseek (fd, pos, 0) < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE))
|
if (AR_HDR_SIZE != write (fd, &ar_hdr, AR_HDR_SIZE))
|
||||||
goto lose;
|
goto lose;
|
||||||
/* The file's mtime is the time we we want. */
|
/* The file's mtime is the time we we want. */
|
||||||
#ifdef EINTR
|
EINTRLOOP (i, fstat (fd, &statbuf));
|
||||||
while (fstat (fd, &statbuf) < 0 && errno == EINTR);
|
if (i < 0)
|
||||||
#else
|
goto lose;
|
||||||
fstat (fd, &statbuf);
|
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
|
||||||
#endif
|
|
||||||
#if defined(ARFMAG) || defined(AIAMAG)
|
|
||||||
/* Advance member's time to that time */
|
/* Advance member's time to that time */
|
||||||
for (i = 0; i < sizeof ar_hdr.ar_date; i++)
|
for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
|
||||||
ar_hdr.ar_date[i] = ' ';
|
ar_hdr.ar_date[ui] = ' ';
|
||||||
sprintf (ar_hdr.ar_date, "%ld", (long int) statbuf.st_mtime);
|
sprintf (TOCHAR (ar_hdr.ar_date), "%ld", (long int) statbuf.st_mtime);
|
||||||
#ifdef AIAMAG
|
#ifdef AIAMAG
|
||||||
ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' ';
|
ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' ';
|
||||||
#endif
|
#endif
|
||||||
@@ -521,7 +823,7 @@ ar_member_touch (arname, memname)
|
|||||||
/* Write back this member's header */
|
/* Write back this member's header */
|
||||||
if (lseek (fd, pos, 0) < 0)
|
if (lseek (fd, pos, 0) < 0)
|
||||||
goto lose;
|
goto lose;
|
||||||
if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE))
|
if (AR_HDR_SIZE != write (fd, &ar_hdr, AR_HDR_SIZE))
|
||||||
goto lose;
|
goto lose;
|
||||||
close (fd);
|
close (fd);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -532,37 +834,32 @@ ar_member_touch (arname, memname)
|
|||||||
errno = i;
|
errno = i;
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
|
|
||||||
long int
|
long int
|
||||||
describe_member (desc, name, truncated,
|
describe_member (int desc, const char *name, int truncated,
|
||||||
hdrpos, datapos, size, date, uid, gid, mode)
|
long int hdrpos, long int datapos, long int size,
|
||||||
int desc;
|
long int date, int uid, int gid, int mode, const void *arg)
|
||||||
char *name;
|
|
||||||
int truncated;
|
|
||||||
long int hdrpos, datapos, size, date;
|
|
||||||
int uid, gid, mode;
|
|
||||||
{
|
{
|
||||||
extern char *ctime ();
|
extern char *ctime ();
|
||||||
|
|
||||||
printf ("Member `%s'%s: %ld bytes at %ld (%ld).\n",
|
printf (_("Member '%s'%s: %ld bytes at %ld (%ld).\n"),
|
||||||
name, truncated ? " (name might be truncated)" : "",
|
name, truncated ? _(" (name might be truncated)") : "",
|
||||||
size, hdrpos, datapos);
|
size, hdrpos, datapos);
|
||||||
printf (" Date %s", ctime (&date));
|
printf (_(" Date %s"), ctime (&date));
|
||||||
printf (" uid = %d, gid = %d, mode = 0%o.\n", uid, gid, mode);
|
printf (_(" uid = %d, gid = %d, mode = 0%o.\n"), uid, gid, mode);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
main (argc, argv)
|
int
|
||||||
int argc;
|
main (int argc, char **argv)
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
ar_scan (argv[1], describe_member);
|
ar_scan (argv[1], describe_member, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* TEST. */
|
#endif /* TEST. */
|
||||||
|
|
||||||
#endif /* NO_ARCHIVES. */
|
#endif /* NO_ARCHIVES. */
|
||||||
|
|||||||
69
build.sh.in
69
build.sh.in
@@ -1,69 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Shell script to build GNU Make in the absence of any `make' program.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1993, 1994 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# See Makefile.in for comments describing these variables.
|
|
||||||
|
|
||||||
srcdir='@srcdir@'
|
|
||||||
CC='@CC@'
|
|
||||||
CFLAGS='@CFLAGS@'
|
|
||||||
CPPFLAGS='@CPPFLAGS@'
|
|
||||||
LDFLAGS='@LDFLAGS@'
|
|
||||||
defines='@DEFS@ -DLIBDIR="${libdir}" -DINCLUDEDIR="${includedir}"'
|
|
||||||
ALLOCA='@ALLOCA@'
|
|
||||||
LOADLIBES='@LIBS@'
|
|
||||||
extras='@LIBOBJS@'
|
|
||||||
REMOTE='@REMOTE@'
|
|
||||||
|
|
||||||
# Common prefix for machine-independent installed files.
|
|
||||||
prefix='@prefix@'
|
|
||||||
# Common prefix for machine-dependent installed files.
|
|
||||||
exec_prefix='@exec_prefix@'
|
|
||||||
# Directory to find libraries in for `-lXXX'.
|
|
||||||
libdir=${exec_prefix}/lib
|
|
||||||
# Directory to search by default for included makefiles.
|
|
||||||
includedir=${prefix}/include
|
|
||||||
|
|
||||||
# Exit as soon as any command fails.
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# These are all the objects we need to link together.
|
|
||||||
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 getopt.o getopt1.o glob/libglob.a glob/glob.o glob/fnmatch.o remote-${REMOTE}.o ${extras} ${ALLOCA}"
|
|
||||||
|
|
||||||
# Compile the source files into those objects.
|
|
||||||
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
|
|
||||||
echo compiling ${file}...
|
|
||||||
$CC $defines $CPPFLAGS $CFLAGS \
|
|
||||||
-c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
|
|
||||||
done
|
|
||||||
|
|
||||||
# The object files were actually all put in the current directory.
|
|
||||||
# Remove the source directory names from the list.
|
|
||||||
srcobjs="$objs"
|
|
||||||
objs=
|
|
||||||
for obj in $srcobjs; do
|
|
||||||
objs="$objs `basename $obj`"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Link all the objects together.
|
|
||||||
echo linking make...
|
|
||||||
$CC $LDFLAGS $objs $LOADLIBES -o make.new
|
|
||||||
echo done
|
|
||||||
mv -f make.new make
|
|
||||||
@@ -1,23 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Shell script to build GNU Make in the absence of any `make' program.
|
# Shell script to build GNU Make in the absence of any 'make' program.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
# Copyright (C) 1993-2012 Free Software Foundation, Inc.
|
||||||
# This file is part of GNU Make.
|
# This file is part of GNU Make.
|
||||||
#
|
#
|
||||||
# GNU Make is free software; you can redistribute it and/or modify
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# it under the terms of the GNU General Public License as published by
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# any later version.
|
# version.
|
||||||
#
|
#
|
||||||
# GNU Make is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# GNU General Public License for more details.
|
# details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# along with GNU Make; see the file COPYING. If not, write to
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# See Makefile.in for comments describing these variables.
|
# See Makefile.in for comments describing these variables.
|
||||||
|
|
||||||
@@ -26,32 +25,45 @@ CC='@CC@'
|
|||||||
CFLAGS='@CFLAGS@'
|
CFLAGS='@CFLAGS@'
|
||||||
CPPFLAGS='@CPPFLAGS@'
|
CPPFLAGS='@CPPFLAGS@'
|
||||||
LDFLAGS='@LDFLAGS@'
|
LDFLAGS='@LDFLAGS@'
|
||||||
defines='@DEFS@ -DLIBDIR="${libdir}" -DINCLUDEDIR="${includedir}"'
|
|
||||||
ALLOCA='@ALLOCA@'
|
ALLOCA='@ALLOCA@'
|
||||||
LOADLIBES='@LIBS@'
|
LOADLIBES='@LIBS@ @LIBINTL@'
|
||||||
extras='@LIBOBJS@'
|
eval extras=\'@LIBOBJS@\'
|
||||||
REMOTE='@REMOTE@'
|
REMOTE='@REMOTE@'
|
||||||
|
GLOBLIB='@GLOBLIB@'
|
||||||
|
PATH_SEPARATOR='@PATH_SEPARATOR@'
|
||||||
|
OBJEXT='@OBJEXT@'
|
||||||
|
EXEEXT='@EXEEXT@'
|
||||||
|
|
||||||
# Common prefix for machine-independent installed files.
|
# Common prefix for machine-independent installed files.
|
||||||
prefix='@prefix@'
|
prefix='@prefix@'
|
||||||
# Common prefix for machine-dependent installed files.
|
# Common prefix for machine-dependent installed files.
|
||||||
exec_prefix='@exec_prefix@'
|
exec_prefix=`eval echo @exec_prefix@`
|
||||||
# Directory to find libraries in for `-lXXX'.
|
# Directory to find libraries in for '-lXXX'.
|
||||||
libdir=${exec_prefix}/lib
|
libdir=${exec_prefix}/lib
|
||||||
# Directory to search by default for included makefiles.
|
# Directory to search by default for included makefiles.
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
localedir=${prefix}/share/locale
|
||||||
|
aliaspath=${localedir}${PATH_SEPARATOR}.
|
||||||
|
|
||||||
|
defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
|
||||||
|
|
||||||
# Exit as soon as any command fails.
|
# Exit as soon as any command fails.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# These are all the objects we need to link together.
|
# These are all the objects we need to link together.
|
||||||
objs="%objs% remote-${REMOTE}.o ${extras} ${ALLOCA}"
|
objs="%objs% remote-${REMOTE}.${OBJEXT} ${extras} ${ALLOCA}"
|
||||||
|
|
||||||
|
if [ x"$GLOBLIB" != x ]; then
|
||||||
|
objs="$objs %globobjs%"
|
||||||
|
globinc=-I${srcdir}/glob
|
||||||
|
fi
|
||||||
|
|
||||||
# Compile the source files into those objects.
|
# Compile the source files into those objects.
|
||||||
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
|
for file in `echo ${objs} | sed 's/\.'${OBJEXT}'/.c/g'`; do
|
||||||
echo compiling ${file}...
|
echo compiling ${file}...
|
||||||
$CC $defines $CPPFLAGS $CFLAGS \
|
$CC $defines $CPPFLAGS $CFLAGS \
|
||||||
-c -I. -I${srcdir} -I${srcdir}/glob ${srcdir}/$file
|
-c -I. -I${srcdir} ${globinc} ${srcdir}/$file
|
||||||
done
|
done
|
||||||
|
|
||||||
# The object files were actually all put in the current directory.
|
# The object files were actually all put in the current directory.
|
||||||
@@ -64,6 +76,6 @@ done
|
|||||||
|
|
||||||
# Link all the objects together.
|
# Link all the objects together.
|
||||||
echo linking make...
|
echo linking make...
|
||||||
$CC $LDFLAGS $objs $LOADLIBES -o make.new
|
$CC $CFLAGS $LDFLAGS $objs $LOADLIBES -o makenew${EXEEXT}
|
||||||
echo done
|
echo done
|
||||||
mv -f make.new make
|
mv -f makenew${EXEEXT} make${EXEEXT}
|
||||||
|
|||||||
267
build_w32.bat
267
build_w32.bat
@@ -1,136 +1,259 @@
|
|||||||
|
@echo off
|
||||||
|
rem Copyright (C) 1996-2012 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 exist config.h.W32 GoTo NotCVS
|
||||||
|
sed -n "s/^AC_INIT(\[GNU make\],\[\([^]]\+\)\].*/s,%%VERSION%%,\1,g/p" configure.in > 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
|
||||||
|
:NotCVS
|
||||||
|
if not exist config.h copy config.h.W32 config.h
|
||||||
|
|
||||||
|
rem Guile configuration
|
||||||
|
set GUILECFLAGS=
|
||||||
|
set GUILELIBS=
|
||||||
|
set GUILESRC=
|
||||||
|
set PKGMSC=
|
||||||
|
if "%1" == "--without-guile" GoTo NoGuile
|
||||||
|
if "%2" == "--without-guile" GoTo NoGuile
|
||||||
|
rem Build with Guile is supported only on NT and later versions
|
||||||
|
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 "%1" == "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 NoGuile
|
||||||
|
:NoPkgCfg
|
||||||
|
echo "pkg-config not found, building without Guile"
|
||||||
|
:NoGuile
|
||||||
|
:GuileDone
|
||||||
|
if not "%GUILECFLAGS%" == "" echo "Guile found, building with Guile"
|
||||||
|
if not "%GUILECFLAGS%" == "" set GUILESRC=guile.c
|
||||||
|
if not "%GUILECFLAGS%" == "" set GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE
|
||||||
|
if "%1" == "--without-guile" shift
|
||||||
cd w32\subproc
|
cd w32\subproc
|
||||||
echo "Creating the subproc library"
|
echo "Creating the subproc library"
|
||||||
%ComSpec% /c build.bat
|
%ComSpec% /c build.bat %1
|
||||||
cd ..\..
|
cd ..\..
|
||||||
del link.dbg link.rel
|
|
||||||
del config.h
|
if exist link.dbg del link.dbg
|
||||||
copy config.h.WIN32 config.h
|
if exist link.rel del link.rel
|
||||||
echo off
|
echo "Creating GNU Make for Windows 9X/NT/2K/XP"
|
||||||
echo "Creating GNU make 3.74 for Windows NT"
|
if "%1" == "gcc" GoTo GCCBuild
|
||||||
|
set make=gnumake
|
||||||
echo on
|
echo on
|
||||||
if not exist .\WinDebug\nul mkdir .\WinDebug
|
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 WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\variable.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\rule.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
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 WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\commands.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\file.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\getloadavg.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\default.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\signame.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\expand.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\dir.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\main.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\getopt1.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\job.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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 read.c
|
||||||
echo WinDebug\read.obj >>link.dbg
|
echo WinDebug\read.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\version.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\getopt.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\arscan.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\remake.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\misc.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\ar.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\function.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\vpath.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\implicit.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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 .\w32\compat\dirent.c
|
||||||
echo WinDebug\dirent.obj >>link.dbg
|
echo WinDebug\dirent.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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 .\glob\glob.c
|
||||||
echo WinDebug\glob.obj >>link.dbg
|
echo WinDebug\glob.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\fnmatch.obj >>link.dbg
|
||||||
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinDebug/ /Fp.\WinDebug/make374.pch /Fo.\WinDebug/ /Fd.\WinDebug/make374.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
|
echo WinDebug\pathstuff.obj >>link.dbg
|
||||||
|
if "%GUILESRC%" == "" GoTo LinkDbg
|
||||||
|
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 off
|
||||||
echo "Linking WinDebug/make374.exe"
|
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/make374.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/make374.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
|
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/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 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
|
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/make374.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/make374.exe @link.dbg
|
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /OUT:.\WinDebug/%make%.exe @link.dbg
|
||||||
if not exist .\WinDebug/make374.exe echo "WinDebug build failed"
|
if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
|
||||||
if exist .\WinDebug/make374.exe echo "WinDebug build succeeded!"
|
if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"
|
||||||
if not exist .\WinRel\nul mkdir .\WinRel
|
if not exist .\WinRel\nul mkdir .\WinRel
|
||||||
echo on
|
echo on
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\variable.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\rule.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\remote-stub.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\commands.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\file.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\getloadavg.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\default.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\signame.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\expand.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\dir.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\main.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\getopt1.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\job.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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 read.c
|
||||||
echo WinRel\read.obj >>link.rel
|
echo WinRel\read.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\version.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\getopt.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\arscan.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\remake.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\misc.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\ar.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\function.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\vpath.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\implicit.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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 .\w32\compat\dirent.c
|
||||||
echo WinRel\dirent.obj >>link.rel
|
echo WinRel\dirent.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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 .\glob\glob.c
|
||||||
echo WinRel\glob.obj >>link.rel
|
echo WinRel\glob.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\fnmatch.obj >>link.rel
|
||||||
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D NO_ARCHIVES /FR.\WinRel/ /Fp.\WinRel/make374.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
|
echo WinRel\pathstuff.obj >>link.rel
|
||||||
|
if "%GUILESRC%" == "" GoTo LinkRel
|
||||||
|
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 guile.c
|
||||||
|
echo WinRel\guile.obj >>link.rel
|
||||||
|
:LinkRel
|
||||||
echo off
|
echo off
|
||||||
echo "Linking WinRel/make374.exe"
|
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/make374.pdb /MACHINE:I386 /OUT:.\WinRel/make374.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
|
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/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 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
|
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/make374.pdb /MACHINE:I386 /OUT:.\WinRel/make374.exe @link.rel
|
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /OUT:.\WinRel/%make%.exe @link.rel
|
||||||
if not exist .\WinRel/make374.exe echo "WinRel build failed"
|
if not exist .\WinRel/%make%.exe echo "WinRel build failed"
|
||||||
if exist .\WinRel/make374.exe echo "WinRel build succeeded!"
|
if exist .\WinRel/%make%.exe echo "WinRel build succeeded!"
|
||||||
|
set make=
|
||||||
|
GoTo BuildEnd
|
||||||
|
:GCCBuild
|
||||||
|
echo on
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c variable.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c rule.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remote-stub.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c commands.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c file.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getloadavg.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c default.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c signame.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c expand.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c dir.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H %GUILECFLAGS% -c main.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt1.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c job.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c read.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c version.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c arscan.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remake.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c hash.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c strcache.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c misc.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ar.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c function.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c vpath.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c implicit.c
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/glob.c -o glob.o
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/fnmatch.c -o fnmatch.o
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o
|
||||||
|
@echo off
|
||||||
|
set GUILEOBJ=
|
||||||
|
if "%GUILESRC%" == "" GoTo LinkGCC
|
||||||
|
set GUILEOBJ=guile.o
|
||||||
|
echo on
|
||||||
|
gcc -mthreads -Wall -gdwarf-2 -g3 -O2 %GUILECFLAGS% -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c guile.c
|
||||||
|
:LinkGCC
|
||||||
|
@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 %GUILEOBJ% job.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 glob.o fnmatch.o pathstuff.o w32_misc.o sub_proc.o w32err.o %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
|
||||||
|
:BuildEnd
|
||||||
|
@echo off
|
||||||
|
set GUILEOBJ=
|
||||||
|
set GUILESRC=
|
||||||
|
set GUILELIBS=
|
||||||
|
set GUILECFLAGS=
|
||||||
|
set PKGMSC=
|
||||||
echo on
|
echo on
|
||||||
|
|||||||
484
commands.c
484
commands.c
@@ -1,20 +1,18 @@
|
|||||||
/* Command processing for GNU Make.
|
/* Command processing for GNU Make.
|
||||||
Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "make.h"
|
||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
@@ -22,37 +20,74 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
#include <windows.h>
|
||||||
|
#include "w32err.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int remote_kill PARAMS ((int id, int sig));
|
#if VMS
|
||||||
|
# define FILE_LIST_SEPARATOR ','
|
||||||
|
#else
|
||||||
|
# define FILE_LIST_SEPARATOR ' '
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int remote_kill (int id, int sig);
|
||||||
|
|
||||||
#ifndef HAVE_UNISTD_H
|
#ifndef HAVE_UNISTD_H
|
||||||
extern int getpid ();
|
int getpid ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static unsigned long
|
||||||
|
dep_hash_1 (const void *key)
|
||||||
|
{
|
||||||
|
const struct dep *d = key;
|
||||||
|
return_STRING_HASH_1 (dep_name (d));
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned long
|
||||||
|
dep_hash_2 (const void *key)
|
||||||
|
{
|
||||||
|
const struct dep *d = key;
|
||||||
|
return_STRING_HASH_2 (dep_name (d));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
dep_hash_cmp (const void *x, const void *y)
|
||||||
|
{
|
||||||
|
const struct dep *dx = x;
|
||||||
|
const struct dep *dy = y;
|
||||||
|
return strcmp (dep_name (dx), dep_name (dy));
|
||||||
|
}
|
||||||
|
|
||||||
/* Set FILE's automatic variables up. */
|
/* Set FILE's automatic variables up. */
|
||||||
|
|
||||||
static void
|
void
|
||||||
set_file_variables (file)
|
set_file_variables (struct file *file)
|
||||||
register struct file *file;
|
|
||||||
{
|
{
|
||||||
register char *p;
|
struct dep *d;
|
||||||
char *at, *percent, *star, *less;
|
const char *at, *percent, *star, *less;
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
/* If the target is an archive member `lib(member)',
|
/* If the target is an archive member 'lib(member)',
|
||||||
then $@ is `lib' and $% is `member'. */
|
then $@ is 'lib' and $% is 'member'. */
|
||||||
|
|
||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
p = index (file->name, '(');
|
const char *cp;
|
||||||
at = (char *) alloca (p - file->name + 1);
|
char *p;
|
||||||
bcopy (file->name, at, p - file->name);
|
|
||||||
at[p - file->name] = '\0';
|
cp = strchr (file->name, '(');
|
||||||
len = strlen (p + 1);
|
p = alloca (cp - file->name + 1);
|
||||||
percent = (char *) alloca (len);
|
memcpy (p, file->name, cp - file->name);
|
||||||
bcopy (p + 1, percent, len - 1);
|
p[cp - file->name] = '\0';
|
||||||
percent[len - 1] = '\0';
|
at = p;
|
||||||
|
len = strlen (cp + 1);
|
||||||
|
p = alloca (len);
|
||||||
|
memcpy (p, cp + 1, len - 1);
|
||||||
|
p[len - 1] = '\0';
|
||||||
|
percent = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* NO_ARCHIVES. */
|
#endif /* NO_ARCHIVES. */
|
||||||
@@ -66,15 +101,14 @@ set_file_variables (file)
|
|||||||
{
|
{
|
||||||
/* In Unix make, $* is set to the target name with
|
/* In Unix make, $* is set to the target name with
|
||||||
any suffix in the .SUFFIXES list stripped off for
|
any suffix in the .SUFFIXES list stripped off for
|
||||||
explicit rules. We store this in the `stem' member. */
|
explicit rules. We store this in the 'stem' member. */
|
||||||
register struct dep *d;
|
const char *name;
|
||||||
char *name;
|
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
name = index (file->name, '(') + 1;
|
name = strchr (file->name, '(') + 1;
|
||||||
len = strlen (name) - 1;
|
len = strlen (name) - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -84,12 +118,12 @@ set_file_variables (file)
|
|||||||
len = strlen (name);
|
len = strlen (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (d = enter_file (".SUFFIXES")->deps; d != 0; d = d->next)
|
for (d = enter_file (strcache_add (".SUFFIXES"))->deps; d ; d = d->next)
|
||||||
{
|
{
|
||||||
unsigned int slen = strlen (dep_name (d));
|
unsigned int slen = strlen (dep_name (d));
|
||||||
if (len > slen && !strncmp (dep_name (d), name + (len - slen), slen))
|
if (len > slen && strneq (dep_name (d), name + (len - slen), slen))
|
||||||
{
|
{
|
||||||
file->stem = savestring (name, len - slen);
|
file->stem = strcache_add_len (name, len - slen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,8 +132,15 @@ set_file_variables (file)
|
|||||||
}
|
}
|
||||||
star = file->stem;
|
star = file->stem;
|
||||||
|
|
||||||
/* $< is the first dependency. */
|
/* $< is the first not order-only dependency. */
|
||||||
less = file->deps != 0 ? dep_name (file->deps) : "";
|
less = "";
|
||||||
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
|
if (!d->ignore_mtime)
|
||||||
|
{
|
||||||
|
if (!d->need_2nd_expansion)
|
||||||
|
less = dep_name (d);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (file->cmds == default_file->cmds)
|
if (file->cmds == default_file->cmds)
|
||||||
/* This file got its commands from .DEFAULT.
|
/* This file got its commands from .DEFAULT.
|
||||||
@@ -116,50 +157,69 @@ set_file_variables (file)
|
|||||||
DEFINE_VARIABLE ("@", 1, at);
|
DEFINE_VARIABLE ("@", 1, at);
|
||||||
DEFINE_VARIABLE ("%", 1, percent);
|
DEFINE_VARIABLE ("%", 1, percent);
|
||||||
|
|
||||||
/* Compute the values for $^, $+, and $?. */
|
/* Compute the values for $^, $+, $?, and $|. */
|
||||||
|
|
||||||
{
|
{
|
||||||
register unsigned int qmark_len, plus_len;
|
static char *plus_value=0, *bar_value=0, *qmark_value=0;
|
||||||
char *caret_value, *plus_value;
|
static unsigned int plus_max=0, bar_max=0, qmark_max=0;
|
||||||
register char *cp;
|
|
||||||
char *qmark_value;
|
unsigned int qmark_len, plus_len, bar_len;
|
||||||
register char *qp;
|
char *cp;
|
||||||
register struct dep *d;
|
char *caret_value;
|
||||||
|
char *qp;
|
||||||
|
char *bp;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
|
struct hash_table dep_hash;
|
||||||
|
void **slot;
|
||||||
|
|
||||||
/* Compute first the value for $+, which is supposed to contain
|
/* Compute first the value for $+, which is supposed to contain
|
||||||
duplicate dependencies as they were listed in the makefile. */
|
duplicate dependencies as they were listed in the makefile. */
|
||||||
|
|
||||||
plus_len = 0;
|
plus_len = 0;
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
bar_len = 0;
|
||||||
plus_len += strlen (dep_name (d)) + 1;
|
|
||||||
|
|
||||||
len = plus_len == 0 ? 1 : plus_len;
|
|
||||||
cp = plus_value = (char *) alloca (len);
|
|
||||||
|
|
||||||
qmark_len = plus_len; /* Will be this or less. */
|
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
{
|
{
|
||||||
char *c = dep_name (d);
|
if (!d->need_2nd_expansion)
|
||||||
|
{
|
||||||
|
if (d->ignore_mtime)
|
||||||
|
bar_len += strlen (dep_name (d)) + 1;
|
||||||
|
else
|
||||||
|
plus_len += strlen (dep_name (d)) + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bar_len == 0)
|
||||||
|
bar_len++;
|
||||||
|
|
||||||
|
if (plus_len == 0)
|
||||||
|
plus_len++;
|
||||||
|
|
||||||
|
if (plus_len > plus_max)
|
||||||
|
plus_value = xrealloc (plus_value, plus_max = plus_len);
|
||||||
|
|
||||||
|
cp = plus_value;
|
||||||
|
|
||||||
|
qmark_len = plus_len + 1; /* Will be this or less. */
|
||||||
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
|
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
||||||
|
{
|
||||||
|
const char *c = dep_name (d);
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (c))
|
if (ar_name (c))
|
||||||
{
|
{
|
||||||
c = index (c, '(') + 1;
|
c = strchr (c, '(') + 1;
|
||||||
len = strlen (c) - 1;
|
len = strlen (c) - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
len = strlen (c);
|
len = strlen (c);
|
||||||
|
|
||||||
bcopy (c, cp, len);
|
memcpy (cp, c, len);
|
||||||
cp += len;
|
cp += len;
|
||||||
#if VMS
|
*cp++ = FILE_LIST_SEPARATOR;
|
||||||
*cp++ = ',';
|
if (! (d->changed || always_make_flag))
|
||||||
#else
|
|
||||||
*cp++ = ' ';
|
|
||||||
#endif
|
|
||||||
if (! d->changed)
|
|
||||||
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,50 +228,84 @@ set_file_variables (file)
|
|||||||
cp[cp > plus_value ? -1 : 0] = '\0';
|
cp[cp > plus_value ? -1 : 0] = '\0';
|
||||||
DEFINE_VARIABLE ("+", 1, plus_value);
|
DEFINE_VARIABLE ("+", 1, plus_value);
|
||||||
|
|
||||||
/* Make sure that no dependencies are repeated. This does not
|
/* Compute the values for $^, $?, and $|. */
|
||||||
really matter for the purpose of updating targets, but it
|
|
||||||
might make some names be listed twice for $^ and $?. */
|
|
||||||
|
|
||||||
uniquize_deps (file->deps);
|
|
||||||
|
|
||||||
/* Compute the values for $^ and $?. */
|
|
||||||
|
|
||||||
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
|
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
|
||||||
len = qmark_len == 0 ? 1 : qmark_len;
|
|
||||||
qp = qmark_value = (char *) alloca (len);
|
if (qmark_len > qmark_max)
|
||||||
|
qmark_value = xrealloc (qmark_value, qmark_max = qmark_len);
|
||||||
|
qp = qmark_value;
|
||||||
|
|
||||||
|
if (bar_len > bar_max)
|
||||||
|
bar_value = xrealloc (bar_value, bar_max = bar_len);
|
||||||
|
bp = bar_value;
|
||||||
|
|
||||||
|
/* Make sure that no dependencies are repeated in $^, $?, and $|. It
|
||||||
|
would be natural to combine the next two loops but we can't do it
|
||||||
|
because of a situation where we have two dep entries, the first
|
||||||
|
is order-only and the second is normal (see below). */
|
||||||
|
|
||||||
|
hash_init (&dep_hash, 500, dep_hash_1, dep_hash_2, dep_hash_cmp);
|
||||||
|
|
||||||
for (d = file->deps; d != 0; d = d->next)
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
{
|
{
|
||||||
char *c = dep_name (d);
|
if (d->need_2nd_expansion)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
slot = hash_find_slot (&dep_hash, d);
|
||||||
|
if (HASH_VACANT (*slot))
|
||||||
|
hash_insert_at (&dep_hash, d, slot);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Check if the two prerequisites have different ignore_mtime.
|
||||||
|
If so then we need to "upgrade" one that is order-only. */
|
||||||
|
|
||||||
|
struct dep* hd = (struct dep*) *slot;
|
||||||
|
|
||||||
|
if (d->ignore_mtime != hd->ignore_mtime)
|
||||||
|
d->ignore_mtime = hd->ignore_mtime = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (d = file->deps; d != 0; d = d->next)
|
||||||
|
{
|
||||||
|
const char *c;
|
||||||
|
|
||||||
|
if (d->need_2nd_expansion || hash_find_item (&dep_hash, d) != d)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
c = dep_name (d);
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (c))
|
if (ar_name (c))
|
||||||
{
|
{
|
||||||
c = index (c, '(') + 1;
|
c = strchr (c, '(') + 1;
|
||||||
len = strlen (c) - 1;
|
len = strlen (c) - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
len = strlen (c);
|
len = strlen (c);
|
||||||
|
|
||||||
bcopy (c, cp, len);
|
if (d->ignore_mtime)
|
||||||
cp += len;
|
|
||||||
#if VMS
|
|
||||||
*cp++ = ',';
|
|
||||||
#else
|
|
||||||
*cp++ = ' ';
|
|
||||||
#endif
|
|
||||||
if (d->changed)
|
|
||||||
{
|
{
|
||||||
bcopy (c, qp, 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 || always_make_flag)
|
||||||
|
{
|
||||||
|
memcpy (qp, c, len);
|
||||||
qp += len;
|
qp += len;
|
||||||
#if VMS
|
*qp++ = FILE_LIST_SEPARATOR;
|
||||||
*qp++ = ',';
|
|
||||||
#else
|
|
||||||
*qp++ = ' ';
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hash_free (&dep_hash, 0);
|
||||||
|
|
||||||
/* Kill the last spaces and define the variables. */
|
/* Kill the last spaces and define the variables. */
|
||||||
|
|
||||||
@@ -220,42 +314,62 @@ set_file_variables (file)
|
|||||||
|
|
||||||
qp[qp > qmark_value ? -1 : 0] = '\0';
|
qp[qp > qmark_value ? -1 : 0] = '\0';
|
||||||
DEFINE_VARIABLE ("?", 1, qmark_value);
|
DEFINE_VARIABLE ("?", 1, qmark_value);
|
||||||
|
|
||||||
|
bp[bp > bar_value ? -1 : 0] = '\0';
|
||||||
|
DEFINE_VARIABLE ("|", 1, bar_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef DEFINE_VARIABLE
|
#undef DEFINE_VARIABLE
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chop CMDS up into individual command lines if necessary.
|
/* Chop CMDS up into individual command lines if necessary.
|
||||||
Also set the `lines_flag' and `any_recurse' members. */
|
Also set the 'lines_flags' and 'any_recurse' members. */
|
||||||
|
|
||||||
void
|
void
|
||||||
chop_commands (cmds)
|
chop_commands (struct commands *cmds)
|
||||||
register struct commands *cmds;
|
|
||||||
{
|
{
|
||||||
if (cmds != 0 && cmds->command_lines == 0)
|
|
||||||
{
|
|
||||||
/* Chop CMDS->commands up into lines in CMDS->command_lines.
|
|
||||||
Also set the corresponding CMDS->lines_flags elements,
|
|
||||||
and the CMDS->any_recurse flag. */
|
|
||||||
register char *p;
|
|
||||||
unsigned int nlines, idx;
|
unsigned int nlines, idx;
|
||||||
char **lines;
|
char **lines;
|
||||||
|
|
||||||
|
/* If we don't have any commands,
|
||||||
|
or we already parsed them, never mind. */
|
||||||
|
|
||||||
|
if (!cmds || cmds->command_lines != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Chop CMDS->commands up into lines in CMDS->command_lines. */
|
||||||
|
|
||||||
|
if (one_shell)
|
||||||
|
{
|
||||||
|
int l = strlen (cmds->commands);
|
||||||
|
|
||||||
|
nlines = 1;
|
||||||
|
lines = xmalloc (nlines * sizeof (char *));
|
||||||
|
lines[0] = xstrdup (cmds->commands);
|
||||||
|
|
||||||
|
/* Strip the trailing newline. */
|
||||||
|
if (l > 0 && lines[0][l-1] == '\n')
|
||||||
|
lines[0][l-1] = '\0';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const char *p;
|
||||||
|
|
||||||
nlines = 5;
|
nlines = 5;
|
||||||
lines = (char **) xmalloc (5 * sizeof (char *));
|
lines = xmalloc (nlines * sizeof (char *));
|
||||||
idx = 0;
|
idx = 0;
|
||||||
p = cmds->commands;
|
p = cmds->commands;
|
||||||
while (*p != '\0')
|
while (*p != '\0')
|
||||||
{
|
{
|
||||||
char *end = p;
|
const char *end = p;
|
||||||
find_end:;
|
find_end:;
|
||||||
end = index (end, '\n');
|
end = strchr (end, '\n');
|
||||||
if (end == 0)
|
if (end == 0)
|
||||||
end = p + strlen (p);
|
end = p + strlen (p);
|
||||||
else if (end > p && end[-1] == '\\')
|
else if (end > p && end[-1] == '\\')
|
||||||
{
|
{
|
||||||
int backslash = 1;
|
int backslash = 1;
|
||||||
register char *b;
|
const char *b;
|
||||||
for (b = end - 2; b >= p && *b == '\\'; --b)
|
for (b = end - 2; b >= p && *b == '\\'; --b)
|
||||||
backslash = !backslash;
|
backslash = !backslash;
|
||||||
if (backslash)
|
if (backslash)
|
||||||
@@ -268,10 +382,9 @@ chop_commands (cmds)
|
|||||||
if (idx == nlines)
|
if (idx == nlines)
|
||||||
{
|
{
|
||||||
nlines += 2;
|
nlines += 2;
|
||||||
lines = (char **) xrealloc ((char *) lines,
|
lines = xrealloc (lines, nlines * sizeof (char *));
|
||||||
nlines * sizeof (char *));
|
|
||||||
}
|
}
|
||||||
lines[idx++] = savestring (p, end - p);
|
lines[idx++] = xstrndup (p, end - p);
|
||||||
p = end;
|
p = end;
|
||||||
if (*p != '\0')
|
if (*p != '\0')
|
||||||
++p;
|
++p;
|
||||||
@@ -280,23 +393,29 @@ chop_commands (cmds)
|
|||||||
if (idx != nlines)
|
if (idx != nlines)
|
||||||
{
|
{
|
||||||
nlines = idx;
|
nlines = idx;
|
||||||
lines = (char **) xrealloc ((char *) lines,
|
lines = xrealloc (lines, nlines * sizeof (char *));
|
||||||
nlines * sizeof (char *));
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Finally, set the corresponding CMDS->lines_flags elements and the
|
||||||
|
CMDS->any_recurse flag. */
|
||||||
|
|
||||||
|
if (nlines > USHRT_MAX)
|
||||||
|
fatal (&cmds->fileinfo, _("Recipe has too many lines (%ud)"), nlines);
|
||||||
|
|
||||||
cmds->ncommand_lines = nlines;
|
cmds->ncommand_lines = nlines;
|
||||||
cmds->command_lines = lines;
|
cmds->command_lines = lines;
|
||||||
|
|
||||||
cmds->any_recurse = 0;
|
cmds->any_recurse = 0;
|
||||||
cmds->lines_flags = (char *) xmalloc (nlines);
|
cmds->lines_flags = xmalloc (nlines);
|
||||||
|
|
||||||
for (idx = 0; idx < nlines; ++idx)
|
for (idx = 0; idx < nlines; ++idx)
|
||||||
{
|
{
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
const char *p = lines[idx];
|
||||||
|
|
||||||
for (p = lines[idx];
|
while (isblank (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||||
isblank (*p) || *p == '-' || *p == '@' || *p == '+';
|
switch (*(p++))
|
||||||
++p)
|
|
||||||
switch (*p)
|
|
||||||
{
|
{
|
||||||
case '+':
|
case '+':
|
||||||
flags |= COMMANDS_RECURSE;
|
flags |= COMMANDS_RECURSE;
|
||||||
@@ -308,17 +427,14 @@ chop_commands (cmds)
|
|||||||
flags |= COMMANDS_NOERROR;
|
flags |= COMMANDS_NOERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!(flags & COMMANDS_RECURSE))
|
|
||||||
{
|
/* If no explicit '+' was given, look for MAKE variable references. */
|
||||||
unsigned int len = strlen (p);
|
if (!(flags & COMMANDS_RECURSE)
|
||||||
if (sindex (p, len, "$(MAKE)", 7) != 0
|
&& (strstr (p, "$(MAKE)") != 0 || strstr (p, "${MAKE}") != 0))
|
||||||
|| sindex (p, len, "${MAKE}", 7) != 0)
|
|
||||||
flags |= COMMANDS_RECURSE;
|
flags |= COMMANDS_RECURSE;
|
||||||
}
|
|
||||||
|
|
||||||
cmds->lines_flags[idx] = flags;
|
cmds->lines_flags[idx] = flags;
|
||||||
cmds->any_recurse |= flags & COMMANDS_RECURSE;
|
cmds->any_recurse |= flags & COMMANDS_RECURSE ? 1 : 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,22 +443,20 @@ chop_commands (cmds)
|
|||||||
fork off a child process to run the first command line in the sequence. */
|
fork off a child process to run the first command line in the sequence. */
|
||||||
|
|
||||||
void
|
void
|
||||||
execute_file_commands (file)
|
execute_file_commands (struct file *file)
|
||||||
struct file *file;
|
|
||||||
{
|
{
|
||||||
register char *p;
|
const char *p;
|
||||||
|
|
||||||
/* Don't go through all the preparations if
|
/* Don't go through all the preparations if
|
||||||
the commands are nothing but whitespace. */
|
the commands are nothing but whitespace. */
|
||||||
|
|
||||||
for (p = file->cmds->commands; *p != '\0'; ++p)
|
for (p = file->cmds->commands; *p != '\0'; ++p)
|
||||||
if (!isspace (*p) && *p != '-' && *p != '@')
|
if (!isspace ((unsigned char)*p) && *p != '-' && *p != '@')
|
||||||
break;
|
break;
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
{
|
{
|
||||||
/* We are all out of commands.
|
/* If there are no commands, assume everything worked. */
|
||||||
If we have gotten this far, all the previous commands
|
set_command_state (file, cs_running);
|
||||||
have run successfully, so we have winning update status. */
|
|
||||||
file->update_status = 0;
|
file->update_status = 0;
|
||||||
notice_finished_file (file);
|
notice_finished_file (file);
|
||||||
return;
|
return;
|
||||||
@@ -350,7 +464,7 @@ execute_file_commands (file)
|
|||||||
|
|
||||||
/* First set the automatic variables according to this file. */
|
/* First set the automatic variables according to this file. */
|
||||||
|
|
||||||
initialize_file_variables (file);
|
initialize_file_variables (file, 0);
|
||||||
|
|
||||||
set_file_variables (file);
|
set_file_variables (file);
|
||||||
|
|
||||||
@@ -366,20 +480,48 @@ int handling_fatal_signal = 0;
|
|||||||
/* Handle fatal signals. */
|
/* Handle fatal signals. */
|
||||||
|
|
||||||
RETSIGTYPE
|
RETSIGTYPE
|
||||||
fatal_error_signal (sig)
|
fatal_error_signal (int sig)
|
||||||
int sig;
|
|
||||||
{
|
{
|
||||||
#if defined(__MSDOS__) || defined(_AMIGA)
|
#ifdef __MSDOS__
|
||||||
|
extern int dos_status, dos_command_running;
|
||||||
|
|
||||||
|
if (dos_command_running)
|
||||||
|
{
|
||||||
|
/* That was the child who got the signal, not us. */
|
||||||
|
dos_status |= (sig << 8);
|
||||||
|
return;
|
||||||
|
}
|
||||||
remove_intermediates (1);
|
remove_intermediates (1);
|
||||||
|
exit (EXIT_FAILURE);
|
||||||
|
#else /* not __MSDOS__ */
|
||||||
#ifdef _AMIGA
|
#ifdef _AMIGA
|
||||||
|
remove_intermediates (1);
|
||||||
if (sig == SIGINT)
|
if (sig == SIGINT)
|
||||||
fputs ("*** Break.\n", stderr);
|
fputs (_("*** Break.\n"), stderr);
|
||||||
|
|
||||||
exit (10);
|
exit (10);
|
||||||
#else
|
#else /* not Amiga */
|
||||||
exit (1);
|
#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
|
#endif
|
||||||
#else /* Not MSDOS. */
|
|
||||||
handling_fatal_signal = 1;
|
handling_fatal_signal = 1;
|
||||||
|
|
||||||
/* Set the handling for this signal to the default.
|
/* Set the handling for this signal to the default.
|
||||||
@@ -391,7 +533,7 @@ fatal_error_signal (sig)
|
|||||||
|
|
||||||
if (sig == SIGTERM)
|
if (sig == SIGTERM)
|
||||||
{
|
{
|
||||||
register struct child *c;
|
struct child *c;
|
||||||
for (c = children; c != 0; c = c->next)
|
for (c = children; c != 0; c = c->next)
|
||||||
if (!c->remote)
|
if (!c->remote)
|
||||||
(void) kill (c->pid, SIGTERM);
|
(void) kill (c->pid, SIGTERM);
|
||||||
@@ -409,7 +551,7 @@ fatal_error_signal (sig)
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register struct child *c;
|
struct child *c;
|
||||||
|
|
||||||
/* Remote children won't automatically get signals sent
|
/* Remote children won't automatically get signals sent
|
||||||
to the process group, so we must send them. */
|
to the process group, so we must send them. */
|
||||||
@@ -441,22 +583,30 @@ fatal_error_signal (sig)
|
|||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINDOWS32
|
||||||
|
if (main_thread)
|
||||||
|
CloseHandle (main_thread);
|
||||||
|
/* Cannot call W32_kill with a pid (it needs a handle). The exit
|
||||||
|
status of 130 emulates what happens in Bash. */
|
||||||
|
exit (130);
|
||||||
|
#else
|
||||||
/* Signal the same code; this time it will really be fatal. The signal
|
/* Signal the same code; this time it will really be fatal. The signal
|
||||||
will be unblocked when we return and arrive then to kill us. */
|
will be unblocked when we return and arrive then to kill us. */
|
||||||
if (kill (getpid (), sig) < 0)
|
if (kill (getpid (), sig) < 0)
|
||||||
pfatal_with_name ("kill");
|
pfatal_with_name ("kill");
|
||||||
#endif /* MSDOS. */
|
#endif /* not WINDOWS32 */
|
||||||
|
#endif /* not Amiga */
|
||||||
|
#endif /* not __MSDOS__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete FILE unless it's precious or not actually a file (phony),
|
/* Delete FILE unless it's precious or not actually a file (phony),
|
||||||
and it has changed on disk since we last stat'd it. */
|
and it has changed on disk since we last stat'd it. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
delete_target (file, on_behalf_of)
|
delete_target (struct file *file, const char *on_behalf_of)
|
||||||
struct file *file;
|
|
||||||
char *on_behalf_of;
|
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
int e;
|
||||||
|
|
||||||
if (file->precious || file->phony)
|
if (file->precious || file->phony)
|
||||||
return;
|
return;
|
||||||
@@ -464,27 +614,31 @@ delete_target (file, on_behalf_of)
|
|||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
if (ar_name (file->name))
|
if (ar_name (file->name))
|
||||||
{
|
{
|
||||||
if (ar_member_date (file->name) != file->last_mtime)
|
time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
|
||||||
|
? (time_t) -1
|
||||||
|
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
||||||
|
if (ar_member_date (file->name) != file_date)
|
||||||
{
|
{
|
||||||
if (on_behalf_of)
|
if (on_behalf_of)
|
||||||
error ("*** [%s] Archive member `%s' may be bogus; not deleted",
|
error (NILF, _("*** [%s] Archive member '%s' may be bogus; not deleted"),
|
||||||
on_behalf_of, file->name);
|
on_behalf_of, file->name);
|
||||||
else
|
else
|
||||||
error ("*** Archive member `%s' may be bogus; not deleted",
|
error (NILF, _("*** Archive member '%s' may be bogus; not deleted"),
|
||||||
file->name);
|
file->name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (stat (file->name, &st) == 0
|
EINTRLOOP (e, stat (file->name, &st));
|
||||||
|
if (e == 0
|
||||||
&& S_ISREG (st.st_mode)
|
&& S_ISREG (st.st_mode)
|
||||||
&& (time_t) st.st_mtime != file->last_mtime)
|
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
||||||
{
|
{
|
||||||
if (on_behalf_of)
|
if (on_behalf_of)
|
||||||
error ("*** [%s] Deleting file `%s'", on_behalf_of, file->name);
|
error (NILF, _("*** [%s] Deleting file '%s'"), on_behalf_of, file->name);
|
||||||
else
|
else
|
||||||
error ("*** Deleting file `%s'", file->name);
|
error (NILF, _("*** Deleting file '%s'"), file->name);
|
||||||
if (unlink (file->name) < 0
|
if (unlink (file->name) < 0
|
||||||
&& errno != ENOENT) /* It disappeared; so what. */
|
&& errno != ENOENT) /* It disappeared; so what. */
|
||||||
perror_with_name ("unlink: ", file->name);
|
perror_with_name ("unlink: ", file->name);
|
||||||
@@ -496,8 +650,7 @@ delete_target (file, on_behalf_of)
|
|||||||
Set the flag in CHILD to say they've been deleted. */
|
Set the flag in CHILD to say they've been deleted. */
|
||||||
|
|
||||||
void
|
void
|
||||||
delete_child_targets (child)
|
delete_child_targets (struct child *child)
|
||||||
struct child *child;
|
|
||||||
{
|
{
|
||||||
struct dep *d;
|
struct dep *d;
|
||||||
|
|
||||||
@@ -505,9 +658,9 @@ delete_child_targets (child)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Delete the target file if it changed. */
|
/* Delete the target file if it changed. */
|
||||||
delete_target (child->file, (char *) 0);
|
delete_target (child->file, NULL);
|
||||||
|
|
||||||
/* Also remove any non-precious targets listed in the `also_make' member. */
|
/* Also remove any non-precious targets listed in the 'also_make' member. */
|
||||||
for (d = child->file->also_make; d != 0; d = d->next)
|
for (d = child->file->also_make; d != 0; d = d->next)
|
||||||
delete_target (d->file, child->file->name);
|
delete_target (d->file, child->file->name);
|
||||||
|
|
||||||
@@ -517,32 +670,35 @@ delete_child_targets (child)
|
|||||||
/* Print out the commands in CMDS. */
|
/* Print out the commands in CMDS. */
|
||||||
|
|
||||||
void
|
void
|
||||||
print_commands (cmds)
|
print_commands (const struct commands *cmds)
|
||||||
register struct commands *cmds;
|
|
||||||
{
|
{
|
||||||
register char *s;
|
const char *s;
|
||||||
|
|
||||||
fputs ("# commands to execute", stdout);
|
fputs (_("# recipe to execute"), stdout);
|
||||||
|
|
||||||
if (cmds->filename == 0)
|
if (cmds->fileinfo.filenm == 0)
|
||||||
puts (" (built-in):");
|
puts (_(" (built-in):"));
|
||||||
else
|
else
|
||||||
printf (" (from `%s', line %u):\n", cmds->filename, cmds->lineno);
|
printf (_(" (from '%s', line %lu):\n"),
|
||||||
|
cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
||||||
|
|
||||||
s = cmds->commands;
|
s = cmds->commands;
|
||||||
while (*s != '\0')
|
while (*s != '\0')
|
||||||
{
|
{
|
||||||
char *end;
|
const char *end;
|
||||||
|
int bs;
|
||||||
|
|
||||||
while (isspace (*s))
|
/* Print one full logical recipe line: find a non-escaped newline. */
|
||||||
++s;
|
for (end = s, bs = 0; *end != '\0'; ++end)
|
||||||
|
{
|
||||||
|
if (*end == '\n' && !bs)
|
||||||
|
break;
|
||||||
|
|
||||||
end = index (s, '\n');
|
bs = *end == '\\' ? !bs : 0;
|
||||||
if (end == 0)
|
}
|
||||||
end = s + strlen (s);
|
|
||||||
|
|
||||||
printf ("\t%.*s\n", (int) (end - s), s);
|
printf ("%c%.*s\n", cmd_prefix, (int) (end - s), s);
|
||||||
|
|
||||||
s = end;
|
s = end + (end[0] == '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
41
commands.h
41
commands.h
@@ -1,42 +1,41 @@
|
|||||||
/* Definition of data structures describing shell commands for GNU Make.
|
/* Definition of data structures describing shell commands for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1991, 1993 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
/* Structure that gives the commands to make a file
|
/* Structure that gives the commands to make a file
|
||||||
and information about where these commands came from. */
|
and information about where these commands came from. */
|
||||||
|
|
||||||
struct commands
|
struct commands
|
||||||
{
|
{
|
||||||
char *filename; /* File that contains commands. */
|
struct floc fileinfo; /* Where commands were defined. */
|
||||||
unsigned int lineno; /* Line number in file. */
|
|
||||||
char *commands; /* Commands text. */
|
char *commands; /* Commands text. */
|
||||||
unsigned int ncommand_lines;/* Number of command lines. */
|
|
||||||
char **command_lines; /* Commands chopped up into lines. */
|
char **command_lines; /* Commands chopped up into lines. */
|
||||||
char *lines_flags; /* One set of flag bits for each line. */
|
char *lines_flags; /* One set of flag bits for each line. */
|
||||||
int any_recurse; /* Nonzero if any `lines_recurse' elt has */
|
unsigned short ncommand_lines;/* Number of command lines. */
|
||||||
|
char recipe_prefix; /* Recipe prefix for this command set. */
|
||||||
|
unsigned int any_recurse:1; /* Nonzero if any 'lines_flags' elt has */
|
||||||
/* the COMMANDS_RECURSE bit set. */
|
/* the COMMANDS_RECURSE bit set. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Bits in `lines_flags'. */
|
/* Bits in 'lines_flags'. */
|
||||||
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
||||||
#define COMMANDS_SILENT 2 /* Silent: @. */
|
#define COMMANDS_SILENT 2 /* Silent: @. */
|
||||||
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
||||||
|
|
||||||
extern void execute_file_commands PARAMS ((struct file *file));
|
void execute_file_commands (struct file *file);
|
||||||
extern void print_commands PARAMS ((struct commands *cmds));
|
void print_commands (const struct commands *cmds);
|
||||||
extern void delete_child_targets PARAMS ((struct child *child));
|
void delete_child_targets (struct child *child);
|
||||||
extern void chop_commands PARAMS ((struct commands *cmds));
|
void chop_commands (struct commands *cmds);
|
||||||
|
void set_file_variables (struct file *file);
|
||||||
|
|||||||
272
compatMakefile
272
compatMakefile
@@ -1,272 +0,0 @@
|
|||||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
|
||||||
# `build.sh' instead.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1988,89,91,92,93,94,95,96 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, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Makefile for GNU Make
|
|
||||||
#
|
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
|
||||||
VPATH = @srcdir@
|
|
||||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
|
||||||
srcdir = @srcdir@
|
|
||||||
|
|
||||||
CC = @CC@
|
|
||||||
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
|
|
||||||
# Define these for your system as follows:
|
|
||||||
# -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'.
|
|
||||||
defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
|
|
||||||
|
|
||||||
# Which flavor of remote job execution support to use.
|
|
||||||
# The code is found in `remote-$(REMOTE).c'.
|
|
||||||
REMOTE = @REMOTE@
|
|
||||||
|
|
||||||
# If your system doesn't have alloca, or the one provided is bad, define this.
|
|
||||||
ALLOCA = @ALLOCA@
|
|
||||||
ALLOCA_SRC = $(srcdir)/alloca.c
|
|
||||||
|
|
||||||
# If your system needs extra libraries loaded in, define them here.
|
|
||||||
# System V probably need -lPW for alloca. HP-UX 7.0's alloca in
|
|
||||||
# libPW.a is broken on HP9000s300 and HP9000s400 machines. Use
|
|
||||||
# alloca.c instead on those machines.
|
|
||||||
LOADLIBES = @LIBS@
|
|
||||||
|
|
||||||
# Any extra object files your system needs.
|
|
||||||
extras = @LIBOBJS@
|
|
||||||
|
|
||||||
# Common prefix for machine-independent installed files.
|
|
||||||
prefix = @prefix@
|
|
||||||
# Common prefix for machine-dependent installed files.
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
|
|
||||||
# Directory to install `make' in.
|
|
||||||
bindir = $(exec_prefix)/bin
|
|
||||||
# Directory to find libraries in for `-lXXX'.
|
|
||||||
libdir = $(exec_prefix)/lib
|
|
||||||
# Directory to search by default for included makefiles.
|
|
||||||
includedir = $(prefix)/include
|
|
||||||
# Directory to install the Info files in.
|
|
||||||
infodir = $(prefix)/info
|
|
||||||
# Directory to install the man page in.
|
|
||||||
mandir = $(prefix)/man/man$(manext)
|
|
||||||
# Number to put on the man page filename.
|
|
||||||
manext = 1
|
|
||||||
# Prefix to put on installed `make' binary file name.
|
|
||||||
binprefix =
|
|
||||||
# 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'
|
|
||||||
# switch) will not work unless make is installed setgid kmem.
|
|
||||||
install_setgid = @NEED_SETGID@
|
|
||||||
# Install make setgid to this group so it can read /dev/kmem.
|
|
||||||
group = @KMEM_GROUP@
|
|
||||||
|
|
||||||
# Program to install `make'.
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
# Program to install the man page.
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
# Generic install program.
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
|
|
||||||
# Program to format Texinfo source into Info files.
|
|
||||||
MAKEINFO = makeinfo
|
|
||||||
# Program to format Texinfo source into DVI files.
|
|
||||||
TEXI2DVI = texi2dvi
|
|
||||||
|
|
||||||
# Programs to make tags files.
|
|
||||||
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.o getopt1.o glob/libglob.a \
|
|
||||||
$(ALLOCA) $(extras)
|
|
||||||
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 \
|
|
||||||
$(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h \
|
|
||||||
$(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/filedef.h \
|
|
||||||
$(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h \
|
|
||||||
$(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
|
|
||||||
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo
|
|
||||||
|
|
||||||
all: make
|
|
||||||
info: make.info
|
|
||||||
dvi: make.dvi
|
|
||||||
# Some makes apparently use .PHONY as the default goal if it is before `all'.
|
|
||||||
.PHONY: all check info dvi
|
|
||||||
|
|
||||||
make.info: make.texinfo
|
|
||||||
$(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info
|
|
||||||
|
|
||||||
make.dvi: make.texinfo
|
|
||||||
$(TEXI2DVI) $(srcdir)/make.texinfo
|
|
||||||
|
|
||||||
make.ps: make.dvi
|
|
||||||
dvi2ps make.dvi > make.ps
|
|
||||||
|
|
||||||
make: $(objs)
|
|
||||||
$(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
|
|
||||||
mv -f make.new make
|
|
||||||
|
|
||||||
# -I. is needed to find config.h in the build directory.
|
|
||||||
.c.o:
|
|
||||||
$(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
|
|
||||||
$(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
|
|
||||||
|
|
||||||
# For some losing Unix makes.
|
|
||||||
SHELL = /bin/sh
|
|
||||||
MAKE = make
|
|
||||||
|
|
||||||
glob/libglob.a: FORCE config.h
|
|
||||||
cd glob; $(MAKE) libglob.a
|
|
||||||
FORCE:
|
|
||||||
|
|
||||||
tagsrcs = $(srcs) $(srcdir)/remote-*.c
|
|
||||||
TAGS: $(tagsrcs)
|
|
||||||
$(ETAGS) $(tagsrcs)
|
|
||||||
tags: $(tagsrcs)
|
|
||||||
$(CTAGS) $(tagsrcs)
|
|
||||||
|
|
||||||
.PHONY: install installdirs
|
|
||||||
install: installdirs \
|
|
||||||
$(bindir)/$(binprefix)make $(infodir)/make.info \
|
|
||||||
$(mandir)/$(manprefix)make.$(manext)
|
|
||||||
|
|
||||||
installdirs:
|
|
||||||
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
|
|
||||||
|
|
||||||
$(bindir)/$(binprefix)make: make
|
|
||||||
$(INSTALL_PROGRAM) make $@.new
|
|
||||||
@if $(install_setgid); then \
|
|
||||||
if chgrp $(group) $@.new && chmod g+s $@.new; then \
|
|
||||||
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 "You may need special privileges to install $@."; \
|
|
||||||
fi; \
|
|
||||||
else true; fi
|
|
||||||
# Some systems can't deal with renaming onto a running binary.
|
|
||||||
-rm -f $@.old
|
|
||||||
-mv $@ $@.old
|
|
||||||
mv $@.new $@
|
|
||||||
|
|
||||||
$(infodir)/make.info: make.info
|
|
||||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
|
||||||
for file in $${dir}/make.info*; do \
|
|
||||||
name="`basename $$file`"; \
|
|
||||||
$(INSTALL_DATA) $$file \
|
|
||||||
`echo $@ | sed "s,make.info\$$,$$name,"`; \
|
|
||||||
done
|
|
||||||
# Run install-info only if it exists.
|
|
||||||
# Use `if' instead of just prepending `-' to the
|
|
||||||
# line so we notice real errors from install-info.
|
|
||||||
# We use `$(SHELL) -c' because some shells do not
|
|
||||||
# fail gracefully when there is an unknown command.
|
|
||||||
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
|
||||||
if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
|
|
||||||
install-info --infodir=$(infodir) $$dir/make.info; \
|
|
||||||
else true; fi
|
|
||||||
|
|
||||||
$(mandir)/$(manprefix)make.$(manext): make.man
|
|
||||||
$(INSTALL_DATA) $(srcdir)/make.man $@
|
|
||||||
|
|
||||||
|
|
||||||
loadavg: loadavg.c config.h
|
|
||||||
$(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
|
|
||||||
loadavg.c $(LOADLIBES) -o $@
|
|
||||||
# We copy getloadavg.c into a different file rather than compiling it
|
|
||||||
# directly because some compilers clobber getloadavg.o in the process.
|
|
||||||
loadavg.c: getloadavg.c
|
|
||||||
ln $(srcdir)/getloadavg.c loadavg.c || \
|
|
||||||
cp $(srcdir)/getloadavg.c loadavg.c
|
|
||||||
check-loadavg: loadavg
|
|
||||||
@echo The system uptime program believes the load average to be:
|
|
||||||
-uptime
|
|
||||||
@echo The GNU load average checking code believes:
|
|
||||||
./loadavg
|
|
||||||
check: check-loadavg
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean realclean distclean mostlyclean
|
|
||||||
clean: glob-clean
|
|
||||||
-rm -f make loadavg *.o core make.dvi
|
|
||||||
distclean: clean glob-realclean
|
|
||||||
-rm -f Makefile config.h config.status build.sh stamp-config
|
|
||||||
-rm -f config.log config.cache
|
|
||||||
-rm -f TAGS tags
|
|
||||||
-rm -f make.?? make.??s make.log make.toc make.*aux
|
|
||||||
-rm -f loadavg.c
|
|
||||||
realclean: distclean
|
|
||||||
-rm -f make.info*
|
|
||||||
mostlyclean: clean
|
|
||||||
|
|
||||||
.PHONY: glob-clean glob-realclean
|
|
||||||
glob-clean glob-realclean:
|
|
||||||
cd glob; $(MAKE) $@
|
|
||||||
|
|
||||||
Makefile: config.status $(srcdir)/Makefile.in
|
|
||||||
$(SHELL) config.status
|
|
||||||
glob/Makefile: config.status $(srcdir)/glob/Makefile.in
|
|
||||||
$(SHELL) config.status
|
|
||||||
config.h: stamp-config ;
|
|
||||||
stamp-config: config.status $(srcdir)/config.h.in
|
|
||||||
$(SHELL) config.status
|
|
||||||
touch stamp-config
|
|
||||||
|
|
||||||
#configure: configure.in aclocal.m4
|
|
||||||
# cd $(srcdir) && autoconf $(ACFLAGS)
|
|
||||||
#config.h.in: configure.in aclocal.m4
|
|
||||||
# cd $(srcdir) && autoheader $(ACFLAGS)
|
|
||||||
|
|
||||||
# This tells versions [3.59,3.63) of GNU make not to export all variables.
|
|
||||||
.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.
|
|
||||||
$(objs): config.h
|
|
||||||
|
|
||||||
# Automatically generated dependencies will be put at the end of the file.
|
|
||||||
|
|
||||||
@@ -1,121 +1,147 @@
|
|||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
/* config.h -- hand-massaged for Amiga -*-C-*-
|
||||||
|
Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* Define if on AIX 3.
|
/* Define if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
We just want to avoid a redefinition error message. */
|
We just want to avoid a redefinition error message. */
|
||||||
#ifndef _ALL_SOURCE
|
#ifndef _ALL_SOURCE
|
||||||
#undef _ALL_SOURCE
|
/* #undef _ALL_SOURCE */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
/* Define if using alloca.c. */
|
||||||
#define C_ALLOCA
|
#define C_ALLOCA
|
||||||
|
|
||||||
|
/* Define if the closedir function returns void instead of int. */
|
||||||
|
/* #undef CLOSEDIR_VOID */
|
||||||
|
|
||||||
/* Define to empty if the keyword does not work. */
|
/* Define to empty if the keyword does not work. */
|
||||||
#undef const
|
/* #undef const */
|
||||||
|
|
||||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP 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. */
|
This function is required for alloca.c support on those systems. */
|
||||||
#undef CRAY_STACKSEG_END
|
/* #undef CRAY_STACKSEG_END */
|
||||||
|
|
||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||||
#undef DGUX
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define if the 'getloadavg' function needs to be run setuid or setgid. */
|
||||||
#undef GETLOADAVG_PRIVILEGED
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
|
if <inttypes.h> doesn't define. */
|
||||||
|
#define uintmax_t unsigned long
|
||||||
|
|
||||||
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define gid_t int
|
#define gid_t int
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
/* Define if you have alloca, as a function or macro. */
|
||||||
#undef HAVE_ALLOCA
|
/* #undef HAVE_ALLOCA */
|
||||||
|
|
||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||||
#undef HAVE_ALLOCA_H
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define if you don't have vprintf but do have _doprnt. */
|
/* Define if you don't have vprintf but do have _doprnt. */
|
||||||
#undef HAVE_DOPRNT
|
/* #undef HAVE_DOPRNT */
|
||||||
|
|
||||||
/* Define if your system has its own `getloadavg' function. */
|
/* Define if your system has a working fnmatch function. */
|
||||||
#undef HAVE_GETLOADAVG
|
/* #undef HAVE_FNMATCH */
|
||||||
|
|
||||||
|
/* Define if your system has its own 'getloadavg' function. */
|
||||||
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
/* Define if you have the getmntent function. */
|
/* Define if you have the getmntent function. */
|
||||||
#undef HAVE_GETMNTENT
|
/* #undef HAVE_GETMNTENT */
|
||||||
|
|
||||||
/* Define if the `long double' type works. */
|
/* Embed GNU Guile support */
|
||||||
#undef HAVE_LONG_DOUBLE
|
/* #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
|
#define HAVE_LONG_FILE_NAMES 1
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
/* Define if you have a working 'mmap' system call. */
|
||||||
#undef HAVE_MMAP
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
/* Define if system calls automatically restart after interruption
|
/* Define if system calls automatically restart after interruption
|
||||||
by a signal. */
|
by a signal. */
|
||||||
#undef HAVE_RESTARTABLE_SYSCALLS
|
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blksize. */
|
/* Define if your struct stat has st_blksize. */
|
||||||
#undef HAVE_ST_BLKSIZE
|
/* #undef HAVE_ST_BLKSIZE */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blocks. */
|
/* Define if your struct stat has st_blocks. */
|
||||||
#undef HAVE_ST_BLOCKS
|
/* #undef HAVE_ST_BLOCKS */
|
||||||
|
|
||||||
/* Define if you have the strcoll function and it is properly defined. */
|
/* Define if you have the strcoll function and it is properly defined. */
|
||||||
#define HAVE_STRCOLL
|
#define HAVE_STRCOLL 1
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
/* Define if your struct stat has st_rdev. */
|
||||||
#define HAVE_ST_RDEV
|
#define HAVE_ST_RDEV 1
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
/* Define if you have the strftime function. */
|
||||||
#define HAVE_STRFTIME
|
#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
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if your struct tm has tm_zone. */
|
/* Define if your struct tm has tm_zone. */
|
||||||
#undef HAVE_TM_ZONE
|
/* #undef HAVE_TM_ZONE */
|
||||||
|
|
||||||
/* Define if you don't have tm_zone but do have the external array
|
/* Define if you don't have tm_zone but do have the external array
|
||||||
tzname. */
|
tzname. */
|
||||||
#define HAVE_TZNAME
|
#define HAVE_TZNAME 1
|
||||||
/* #define tzname __tzname */
|
|
||||||
|
|
||||||
/* Define if you have <unistd.h>. */
|
/* Define if you have <unistd.h>. */
|
||||||
#define HAVE_UNISTD_H
|
#define HAVE_UNISTD_H 1
|
||||||
|
|
||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||||
#undef HAVE_UTIME_NULL
|
/* #undef HAVE_UTIME_NULL */
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
/* Define if you have <vfork.h>. */
|
||||||
#undef HAVE_VFORK_H
|
/* #undef HAVE_VFORK_H */
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
/* Define if you have the vprintf function. */
|
||||||
#define HAVE_VPRINTF
|
#define HAVE_VPRINTF 1
|
||||||
|
|
||||||
/* Define if you have the wait3 system call. */
|
/* Define if you have the wait3 system call. */
|
||||||
#undef HAVE_WAIT3
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define if on MINIX. */
|
/* Define if on MINIX. */
|
||||||
#undef _MINIX
|
/* #undef _MINIX */
|
||||||
|
|
||||||
/* Define if your struct nlist has an n_un member. */
|
/* Define if your struct nlist has an n_un member. */
|
||||||
#undef NLIST_NAME_UNION
|
/* #undef NLIST_NAME_UNION */
|
||||||
|
|
||||||
/* Define if you have <nlist.h>. */
|
/* Define if you have <nlist.h>. */
|
||||||
#undef NLIST_STRUCT
|
/* #undef NLIST_STRUCT */
|
||||||
|
|
||||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
/* Define if your C compiler doesn't accept -c and -o together. */
|
||||||
#undef NO_MINUS_C_MINUS_O
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define pid_t int
|
#define pid_t int
|
||||||
|
|
||||||
/* Define if the system does not provide POSIX.1 features except
|
/* Define if the system does not provide POSIX.1 features except
|
||||||
with this defined. */
|
with this defined. */
|
||||||
#undef _POSIX_1_SOURCE
|
/* #undef _POSIX_1_SOURCE */
|
||||||
|
|
||||||
/* Define if you need to in order for stat and other things to work. */
|
/* Define if you need to in order for stat and other things to work. */
|
||||||
#undef _POSIX_SOURCE
|
/* #undef _POSIX_SOURCE */
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
/* Define as the return type of signal handlers (int or void). */
|
||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
@@ -123,7 +149,7 @@
|
|||||||
/* Define if the setvbuf function takes the buffering type as its second
|
/* Define if the setvbuf function takes the buffering type as its second
|
||||||
argument and the buffer pointer as the third, as on System V
|
argument and the buffer pointer as the third, as on System V
|
||||||
before release 3. */
|
before release 3. */
|
||||||
#undef SETVBUF_REVERSED
|
/* #undef SETVBUF_REVERSED */
|
||||||
|
|
||||||
/* If using the C implementation of alloca, define if you know the
|
/* If using the C implementation of alloca, define if you know the
|
||||||
direction of stack growth for your system; otherwise it will be
|
direction of stack growth for your system; otherwise it will be
|
||||||
@@ -134,138 +160,187 @@
|
|||||||
*/
|
*/
|
||||||
#define STACK_DIRECTION -1
|
#define STACK_DIRECTION -1
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
#undef STAT_MACROS_BROKEN
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
|
/* Define if your compiler conforms to the ANSI C standard. */
|
||||||
|
#define HAVE_ANSI_COMPILER 1
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Define if you have the ANSI C header files. */
|
||||||
#define STDC_HEADERS
|
#define STDC_HEADERS
|
||||||
|
|
||||||
/* Define on System V Release 4. */
|
/* Define on System V Release 4. */
|
||||||
#undef SVR4
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Define if 'sys_siglist' is declared by <signal.h>. */
|
||||||
#undef SYS_SIGLIST_DECLARED
|
/* #undef SYS_SIGLIST_DECLARED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
#define uid_t int
|
#define uid_t int
|
||||||
|
|
||||||
/* Define for Encore UMAX. */
|
/* Define for Encore UMAX. */
|
||||||
#undef UMAX
|
/* #undef UMAX */
|
||||||
|
|
||||||
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
|
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
|
||||||
instead of <sys/cpustats.h>. */
|
instead of <sys/cpustats.h>. */
|
||||||
#undef UMAX4_3
|
/* #undef UMAX4_3 */
|
||||||
|
|
||||||
/* Define vfork as fork if vfork does not work. */
|
/* Define vfork as fork if vfork does not work. */
|
||||||
#undef vfork
|
/* #undef vfork */
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
/* 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 SCCS_GET "get"
|
#define SCCS_GET "get"
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||||
#undef SCCS_GET_MINUS_G
|
/* #undef SCCS_GET_MINUS_G */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `sys_siglist'. */
|
/* Define this to enable job server support in GNU make. */
|
||||||
#undef HAVE_SYS_SIGLIST
|
/* #undef MAKE_JOBSERVER */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
/* Define to be the nanoseconds member of struct stat's st_mtim,
|
||||||
#undef HAVE__SYS_SIGLIST
|
if it exists. */
|
||||||
|
/* #undef ST_MTIM_NSEC */
|
||||||
|
|
||||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
/* Define this if the C library defines the variable 'sys_siglist'. */
|
||||||
#undef HAVE_UNION_WAIT
|
/* #undef HAVE_SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */
|
/* Define this if the C library defines the variable '_sys_siglist'. */
|
||||||
#undef HAVE_SYSCONF_OPEN_MAX
|
/* #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. */
|
/* Define if you have the dup2 function. */
|
||||||
#undef HAVE_DUP2
|
/* #undef HAVE_DUP2 */
|
||||||
|
|
||||||
/* Define if you have the getcwd function. */
|
/* Define if you have the getcwd function. */
|
||||||
#define HAVE_GETCWD
|
#define HAVE_GETCWD 1
|
||||||
|
|
||||||
/* Define if you have the getdtablesize function. */
|
|
||||||
#undef HAVE_GETDTABLESIZE
|
|
||||||
|
|
||||||
/* Define if you have the getgroups function. */
|
/* Define if you have the getgroups function. */
|
||||||
#undef HAVE_GETGROUPS
|
/* #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 memmove function. */
|
||||||
|
#define HAVE_MEMMOVE 1
|
||||||
|
|
||||||
/* Define if you have the mktemp function. */
|
/* Define if you have the mktemp function. */
|
||||||
#define HAVE_MKTEMP
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
/* Define if you have the psignal function. */
|
/* Define if you have the psignal function. */
|
||||||
#undef HAVE_PSIGNAL
|
/* #undef HAVE_PSIGNAL */
|
||||||
|
|
||||||
|
/* Define if you have the pstat_getdynamic function. */
|
||||||
|
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||||
|
|
||||||
/* Define if you have the setegid function. */
|
/* Define if you have the setegid function. */
|
||||||
#undef HAVE_SETEGID
|
/* #undef HAVE_SETEGID */
|
||||||
|
|
||||||
/* Define if you have the seteuid function. */
|
/* Define if you have the seteuid function. */
|
||||||
#undef HAVE_SETEUID
|
/* #undef HAVE_SETEUID */
|
||||||
|
|
||||||
/* Define if you have the setlinebuf function. */
|
/* Define if you have the setlinebuf function. */
|
||||||
#undef HAVE_SETLINEBUF
|
/* #undef HAVE_SETLINEBUF */
|
||||||
|
|
||||||
/* Define if you have the setregid function. */
|
/* Define if you have the setregid function. */
|
||||||
#undef HAVE_SETREGID
|
/* #undef HAVE_SETREGID */
|
||||||
|
|
||||||
/* Define if you have the setreuid function. */
|
/* Define if you have the setreuid function. */
|
||||||
#undef HAVE_SETREUID
|
/* #undef HAVE_SETREUID */
|
||||||
|
|
||||||
/* Define if you have the sigsetmask function. */
|
/* Define if you have the sigsetmask function. */
|
||||||
#undef HAVE_SIGSETMASK
|
/* #undef HAVE_SIGSETMASK */
|
||||||
|
|
||||||
|
/* Define if you have the socket function. */
|
||||||
|
/* #undef HAVE_SOCKET */
|
||||||
|
|
||||||
|
/* 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 if you have the strerror function. */
|
||||||
#define HAVE_STRERROR
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
/* Define if you have the strsignal function. */
|
/* Define if you have the strsignal function. */
|
||||||
#undef HAVE_STRSIGNAL
|
/* #undef HAVE_STRSIGNAL */
|
||||||
|
|
||||||
/* Define if you have the wait3 function. */
|
/* Define if you have the wait3 function. */
|
||||||
#undef HAVE_WAIT3
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define if you have the waitpid function. */
|
/* Define if you have the waitpid function. */
|
||||||
#undef HAVE_WAITPID
|
/* #undef HAVE_WAITPID */
|
||||||
|
|
||||||
/* Define if you have the <dirent.h> header file. */
|
/* Define if you have the <dirent.h> header file. */
|
||||||
#define HAVE_DIRENT_H
|
#define HAVE_DIRENT_H 1
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
/* Define if you have the <fcntl.h> header file. */
|
||||||
#define HAVE_FCNTL_H
|
#define HAVE_FCNTL_H 1
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
/* Define if you have the <limits.h> header file. */
|
||||||
#define HAVE_LIMITS_H
|
#define HAVE_LIMITS_H 1
|
||||||
|
|
||||||
/* Define if you have the <mach/mach.h> header file. */
|
/* Define if you have the <mach/mach.h> header file. */
|
||||||
#undef HAVE_MACH_MACH_H
|
/* #undef HAVE_MACH_MACH_H */
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
/* Define if you have the <memory.h> header file. */
|
||||||
#undef HAVE_MEMORY_H
|
/* #undef HAVE_MEMORY_H */
|
||||||
|
|
||||||
/* Define if you have the <ndir.h> header file. */
|
/* Define if you have the <ndir.h> header file. */
|
||||||
#undef HAVE_NDIR_H
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||||
|
#define HAVE_STDARG_H 1
|
||||||
|
|
||||||
|
/* Define if you have the <stdlib.h> header file. */
|
||||||
|
/* #undef HAVE_STDLIB_H */
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
/* Define if you have the <string.h> header file. */
|
||||||
#define HAVE_STRING_H
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define if you have the <sys/dir.h> header file. */
|
/* Define if you have the <sys/dir.h> header file. */
|
||||||
#define HAVE_SYS_DIR_H
|
#define HAVE_SYS_DIR_H 1
|
||||||
|
|
||||||
/* Define if you have the <sys/ndir.h> header file. */
|
/* Define if you have the <sys/ndir.h> header file. */
|
||||||
#undef HAVE_SYS_NDIR_H
|
/* #undef HAVE_SYS_NDIR_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
/* Define if you have the <sys/param.h> header file. */
|
||||||
#undef HAVE_SYS_PARAM_H
|
/* #undef HAVE_SYS_PARAM_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/timeb.h> header file. */
|
/* Define if you have the <sys/timeb.h> header file. */
|
||||||
#undef HAVE_SYS_TIMEB_H
|
/* #undef HAVE_SYS_TIMEB_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/wait.h> header file. */
|
/* Define if you have the <sys/wait.h> header file. */
|
||||||
#undef HAVE_SYS_WAIT_H
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
#define HAVE_UNISTD_H
|
#define HAVE_UNISTD_H 1
|
||||||
|
|
||||||
/* Define if you have the dgc library (-ldgc). */
|
/* Define if you have the dgc library (-ldgc). */
|
||||||
#undef HAVE_LIBDGC
|
/* #undef HAVE_LIBDGC */
|
||||||
|
|
||||||
|
/* Define if you have the kstat library (-lkstat). */
|
||||||
|
/* #undef HAVE_LIBKSTAT */
|
||||||
|
|
||||||
/* Define if you have the sun library (-lsun). */
|
/* Define if you have the sun library (-lsun). */
|
||||||
#undef HAVE_LIBSUN
|
/* #undef HAVE_LIBSUN */
|
||||||
|
|
||||||
|
/* Define for Case Insensitve behavior */
|
||||||
|
#define HAVE_CASE_INSENSITIVE_FS
|
||||||
|
|
||||||
|
/* Build host information. */
|
||||||
|
#define MAKE_HOST "Amiga"
|
||||||
|
|||||||
@@ -1,16 +1,53 @@
|
|||||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@progis.de> */
|
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
||||||
|
|
||||||
|
Copyright (C) 1996-2012 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. Generated automatically by configure. */
|
||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||||
|
|
||||||
/* Define if on AIX 3.
|
/* Define to 1 if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
We just want to avoid a redefinition error message. */
|
We just want to avoid a redefinition error message. */
|
||||||
#ifndef _ALL_SOURCE
|
#ifndef _ALL_SOURCE
|
||||||
/* #undef _ALL_SOURCE */
|
/* #undef _ALL_SOURCE */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
/* Define to 1 if NLS is requested. */
|
||||||
/* #undef C_ALLOCA */
|
/* #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 */
|
||||||
|
|
||||||
|
/* 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. */
|
||||||
|
#define LOCALEDIR ""
|
||||||
|
|
||||||
|
/* Define as 1 if you have the stpcpy function. */
|
||||||
|
/* #undef HAVE_STPCPY */
|
||||||
|
|
||||||
|
/* Define to 1 if the closedir function returns void instead of int. */
|
||||||
|
/* #undef CLOSEDIR_VOID */
|
||||||
|
|
||||||
/* Define to empty if the keyword does not work. */
|
/* Define to empty if the keyword does not work. */
|
||||||
/* #undef const */
|
/* #undef const */
|
||||||
@@ -22,111 +59,129 @@
|
|||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||||
/* #undef DGUX */
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define to 1 if the 'getloadavg' function needs to be run setuid or setgid. */
|
||||||
/* #undef GETLOADAVG_PRIVILEGED 1 */
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
|
if <inttypes.h> doesn't define. */
|
||||||
|
#define uintmax_t unsigned long
|
||||||
|
|
||||||
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
/* #undef gid_t */
|
/* #undef gid_t */
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
/* Define to 1 if you have alloca, as a function or macro. */
|
||||||
#define HAVE_ALLOCA 1
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||||
/* #undef HAVE_ALLOCA_H 1 */
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define if you don't have vprintf but do have _doprnt. */
|
/* Define to 1 if you don't have vprintf but do have _doprnt. */
|
||||||
/* #undef HAVE_DOPRNT */
|
/* #undef HAVE_DOPRNT */
|
||||||
|
|
||||||
/* Define if your system has its own `getloadavg' function. */
|
/* Define to 1 if you have the fdopen function. */
|
||||||
|
#define HAVE_FDOPEN 1
|
||||||
|
|
||||||
|
/* Define to 1 if your system has a working fnmatch function. */
|
||||||
|
/* #undef HAVE_FNMATCH */
|
||||||
|
|
||||||
|
/* Define to 1 if your system has its own 'getloadavg' function. */
|
||||||
/* #undef HAVE_GETLOADAVG */
|
/* #undef HAVE_GETLOADAVG */
|
||||||
|
|
||||||
/* Define if you have the getmntent function. */
|
/* Define to 1 if you have the getmntent function. */
|
||||||
/* #undef HAVE_GETMNTENT */
|
/* #undef HAVE_GETMNTENT */
|
||||||
|
|
||||||
/* Define if the `long double' type works. */
|
/* Define to 1 if the 'long double' type works. */
|
||||||
/* #undef HAVE_LONG_DOUBLE */
|
/* #undef HAVE_LONG_DOUBLE */
|
||||||
|
|
||||||
/* Define if you support file names longer than 14 characters. */
|
/* Define to 1 if you support file names longer than 14 characters. */
|
||||||
#define HAVE_LONG_FILE_NAMES 1
|
#define HAVE_LONG_FILE_NAMES 1
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
/* Define to 1 if you have a working 'mmap' system call. */
|
||||||
/* #undef HAVE_MMAP */
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
/* Define if system calls automatically restart after interruption
|
/* Define to 1 if system calls automatically restart after interruption
|
||||||
by a signal. */
|
by a signal. */
|
||||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blksize. */
|
/* Define to 1 if your struct stat has st_blksize. */
|
||||||
/* #undef HAVE_ST_BLKSIZE */
|
/* #undef HAVE_ST_BLKSIZE */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blocks. */
|
/* Define to 1 if your struct stat has st_blocks. */
|
||||||
/* #undef HAVE_ST_BLOCKS */
|
/* #undef HAVE_ST_BLOCKS */
|
||||||
|
|
||||||
/* Define if you have the strcoll function and it is properly defined. */
|
/* Define to 1 if you have the strcoll function and it is properly defined. */
|
||||||
/* #undef HAVE_STRCOLL 1 */
|
/* #undef HAVE_STRCOLL */
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
/* Define to 1 if you have the strncasecmp' function. */
|
||||||
|
#if __CRTL_VER >= 70000000
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if your struct stat has st_rdev. */
|
||||||
/* #undef HAVE_ST_RDEV */
|
/* #undef HAVE_ST_RDEV */
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
/* Define to 1 if you have the strftime function. */
|
||||||
/* #undef HAVE_STRFTIME */
|
/* #undef HAVE_STRFTIME */
|
||||||
|
|
||||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
/* #undef HAVE_SYS_WAIT_H 1 */
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if your struct tm has tm_zone. */
|
/* Define to 1 if your struct tm has tm_zone. */
|
||||||
/* #undef HAVE_TM_ZONE */
|
/* #undef HAVE_TM_ZONE */
|
||||||
|
|
||||||
/* Define if you don't have tm_zone but do have the external array
|
/* Define to 1 if you don't have tm_zone but do have the external array
|
||||||
tzname. */
|
tzname. */
|
||||||
/* #undef HAVE_TZNAME */
|
/* #undef HAVE_TZNAME */
|
||||||
|
|
||||||
/* Define if you have <unistd.h>. */
|
/* Define to 1 if you have <unistd.h>. */
|
||||||
#ifdef __DECC
|
#ifdef __DECC
|
||||||
#define HAVE_UNISTD_H 1
|
#define HAVE_UNISTD_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
/* Define to 1 if utime(file, NULL) sets file's timestamp to the present. */
|
||||||
/* #undef HAVE_UTIME_NULL */
|
/* #undef HAVE_UTIME_NULL */
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
/* Define to 1 if you have <vfork.h>. */
|
||||||
/* #undef HAVE_VFORK_H 1 */
|
/* #undef HAVE_VFORK_H */
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
/* Define to 1 if you have the vprintf function. */
|
||||||
#define HAVE_VPRINTF 1
|
#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 1 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define if on MINIX. */
|
/* Define to 1 if on MINIX. */
|
||||||
/* #undef _MINIX */
|
/* #undef _MINIX */
|
||||||
|
|
||||||
/* Define if your struct nlist has an n_un member. */
|
/* Define to 1 if your struct nlist has an n_un member. */
|
||||||
/* #undef NLIST_NAME_UNION */
|
/* #undef NLIST_NAME_UNION */
|
||||||
|
|
||||||
/* Define if you have <nlist.h>. */
|
/* Define to 1 if you have <nlist.h>. */
|
||||||
/* #undef NLIST_STRUCT 1 */
|
/* #undef NLIST_STRUCT */
|
||||||
|
|
||||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
/* #undef NO_MINUS_C_MINUS_O */
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
|
/* I assume types.h is available for all 5.0 cc/cxx compilers */
|
||||||
|
#if __DECC_VER < 50090000
|
||||||
#define pid_t int
|
#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. */
|
with this defined. */
|
||||||
/* #undef _POSIX_1_SOURCE */
|
/* #undef _POSIX_1_SOURCE */
|
||||||
|
|
||||||
/* Define if you need to in order for stat and other things to work. */
|
/* Define to 1 if you need to in order for stat and other things to work. */
|
||||||
/* #undef _POSIX_SOURCE */
|
/* #undef _POSIX_SOURCE */
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
/* Define as the return type of signal handlers (int or void). */
|
||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
/* Define if the setvbuf function takes the buffering type as its second
|
/* Define to 1 if the setvbuf function takes the buffering type as its second
|
||||||
argument and the buffer pointer as the third, as on System V
|
argument and the buffer pointer as the third, as on System V
|
||||||
before release 3. */
|
before release 3. */
|
||||||
/* #undef SETVBUF_REVERSED 1 */
|
/* #undef SETVBUF_REVERSED */
|
||||||
|
|
||||||
/* If using the C implementation of alloca, define if you know the
|
/* If using the C implementation of alloca, define if you know the
|
||||||
direction of stack growth for your system; otherwise it will be
|
direction of stack growth for your system; otherwise it will be
|
||||||
@@ -137,20 +192,22 @@
|
|||||||
*/
|
*/
|
||||||
/* #undef STACK_DIRECTION */
|
/* #undef STACK_DIRECTION */
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
/* #undef STAT_MACROS_BROKEN */
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
/* #undef STDC_HEADERS */
|
/* #undef STDC_HEADERS */
|
||||||
|
|
||||||
/* Define on System V Release 4. */
|
/* Define on System V Release 4. */
|
||||||
/* #undef SVR4 */
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Define to 1 if 'sys_siglist' is declared by <signal.h>. */
|
||||||
/* #undef SYS_SIGLIST_DECLARED */
|
/* #undef SYS_SIGLIST_DECLARED */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||||
|
#if __DECC_VER < 50090000
|
||||||
#define uid_t int
|
#define uid_t int
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define for Encore UMAX. */
|
/* Define for Encore UMAX. */
|
||||||
/* #undef UMAX */
|
/* #undef UMAX */
|
||||||
@@ -162,131 +219,215 @@
|
|||||||
/* Define vfork as fork if vfork does not work. */
|
/* Define vfork as fork if vfork does not work. */
|
||||||
/* #undef vfork */
|
/* #undef vfork */
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
/* Name of this package (needed by automake) */
|
||||||
/* #undef SCCS_GET "/usr/sccs/get" */
|
#define PACKAGE "%PACKAGE%"
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
/* Version of this package (needed by automake) */
|
||||||
/* #undef SCCS_GET_MINUS_G 1 */
|
#define VERSION "%VERSION%"
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `sys_siglist'. */
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
/* #undefine HAVE_SYS_SIGLIST 1 */
|
/* #undef SCCS_GET */
|
||||||
|
|
||||||
/* Define this if the C library defines the variable `_sys_siglist'. */
|
/* 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 to 1 if the C library defines the variable 'sys_siglist'. */
|
||||||
|
/* #undefine HAVE_SYS_SIGLIST */
|
||||||
|
|
||||||
|
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||||
/* #undef HAVE__SYS_SIGLIST */
|
/* #undef HAVE__SYS_SIGLIST */
|
||||||
|
|
||||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
/* Define to 1 if you have the 'union wait' type in <sys/wait.h>. */
|
||||||
/* #undef HAVE_UNION_WAIT */
|
/* #undef HAVE_UNION_WAIT */
|
||||||
|
|
||||||
/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */
|
/* Define to 1 if you have the dup2 function. */
|
||||||
/* #undef HAVE_SYSCONF_OPEN_MAX */
|
|
||||||
|
|
||||||
/* Define if you have the dup2 function. */
|
|
||||||
#define HAVE_DUP2 1
|
#define HAVE_DUP2 1
|
||||||
|
|
||||||
/* Define if you have the getcwd function. */
|
/* Define to 1 if you have the getcwd function. */
|
||||||
#define HAVE_GETCWD 1
|
#define HAVE_GETCWD 1
|
||||||
|
|
||||||
/* Define if you have the getdtablesize function. */
|
/* Define to 1 if you have the getgroups function. */
|
||||||
/* #undef HAVE_GETDTABLESIZE 1 */
|
/* #undef HAVE_GETGROUPS */
|
||||||
|
|
||||||
/* Define if you have the getgroups function. */
|
/* Define to 1 if you have the gethostbyname function. */
|
||||||
/* #undef HAVE_GETGROUPS 1 */
|
/* #undef HAVE_GETHOSTBYNAME */
|
||||||
|
|
||||||
/* Define if you have the mktemp function. */
|
/* Define to 1 if you have the gethostname function. */
|
||||||
|
/* #undef HAVE_GETHOSTNAME */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the memmove function. */
|
||||||
|
#define HAVE_MEMMOVE 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the mktemp function. */
|
||||||
#define HAVE_MKTEMP 1
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
/* Define if you have the psignal function. */
|
/* Define to 1 if you have the psignal function. */
|
||||||
/* #undef HAVE_PSIGNAL 1 */
|
/* #undef HAVE_PSIGNAL */
|
||||||
|
|
||||||
/* Define if you have the setegid function. */
|
/* Define to 1 if you have the pstat_getdynamic function. */
|
||||||
/* #undef HAVE_SETEGID 1 */
|
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||||
|
|
||||||
/* Define if you have the seteuid function. */
|
/* Define to 1 if you have the setegid function. */
|
||||||
/* #undef HAVE_SETEUID 1 */
|
/* #undef HAVE_SETEGID */
|
||||||
|
|
||||||
/* Define if you have the setlinebuf function. */
|
/* Define to 1 if you have the seteuid function. */
|
||||||
/* #undef HAVE_SETLINEBUF 1 */
|
/* #undef HAVE_SETEUID */
|
||||||
|
|
||||||
/* Define if you have the setregid function. */
|
/* Define to 1 if you have the setlinebuf function. */
|
||||||
/* #undefine HAVE_SETREGID 1 */
|
/* #undef HAVE_SETLINEBUF */
|
||||||
|
|
||||||
/* Define if you have the setreuid function. */
|
/* Define to 1 if you have the setregid function. */
|
||||||
/* #define HAVE_SETREUID 1 */
|
/* #undefine HAVE_SETREGID */
|
||||||
|
|
||||||
/* Define if you have the sigsetmask function. */
|
/* Define to 1 if you have the setreuid function. */
|
||||||
|
/* #define HAVE_SETREUID */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the sigsetmask function. */
|
||||||
#define HAVE_SIGSETMASK 1
|
#define HAVE_SIGSETMASK 1
|
||||||
|
|
||||||
/* Define if you have the strerror function. */
|
/* Define to 1 if you have the socket function. */
|
||||||
|
/* #undef HAVE_SOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcasecmp function. */
|
||||||
|
#define HAVE_STRCASECMP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcmpi function. */
|
||||||
|
/* #undef HAVE_STRCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the stricmp function. */
|
||||||
|
/* #undef HAVE_STRICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strerror function. */
|
||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
/* Define if you have the strsignal function. */
|
/* Define to 1 if you have the strsignal function. */
|
||||||
/* #undef HAVE_STRSIGNAL */
|
/* #undef HAVE_STRSIGNAL */
|
||||||
|
|
||||||
/* Define if you have the wait3 function. */
|
/* Define to 1 if you have the wait3 function. */
|
||||||
/* #define HAVE_WAIT3 1 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
/* Define if you have the waitpid function. */
|
/* Define to 1 if you have the waitpid function. */
|
||||||
/* #undef HAVE_WAITPID 1 */
|
/* #undef HAVE_WAITPID */
|
||||||
|
|
||||||
/* Define if you have the <dirent.h> header file. */
|
/* Define to 1 if you have the <dirent.h> header file. */
|
||||||
/* #unddef HAVE_DIRENT_H 1 */
|
#define HAVE_DIRENT_H 1
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
#ifdef __DECC
|
#ifdef __DECC
|
||||||
#define HAVE_FCNTL_H 1
|
#define HAVE_FCNTL_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
#define HAVE_LIMITS_H 1
|
#define HAVE_LIMITS_H 1
|
||||||
|
|
||||||
/* Define if you have the <mach/mach.h> header file. */
|
/* Define to 1 if you have the <mach/mach.h> header file. */
|
||||||
/* #undef HAVE_MACH_MACH_H */
|
/* #undef HAVE_MACH_MACH_H */
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
/* #undef HAVE_MEMORY_H 1 */
|
/* #undef HAVE_MEMORY_H */
|
||||||
|
|
||||||
/* Define if you have the <ndir.h> header file. */
|
/* Define to 1 if you have the <ndir.h> header file. */
|
||||||
/* #undef HAVE_NDIR_H */
|
/* #undef HAVE_NDIR_H */
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
/* Define to 1 if your compiler conforms to the ANSI C standard. */
|
||||||
|
#define HAVE_ANSI_COMPILER 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||||
|
#define HAVE_STDARG_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
/* Define if you have the <pwd.h> header file. */
|
/* Define to 1 if you have the <sys/dir.h> header file. */
|
||||||
/* #undef HAVE_PWD_H */
|
|
||||||
|
|
||||||
/* Define if you have the <sys/dir.h> header file. */
|
|
||||||
/* #undef HAVE_SYS_DIR_H */
|
/* #undef HAVE_SYS_DIR_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/ndir.h> header file. */
|
/* Define to 1 if you have the <sys/ndir.h> header file. */
|
||||||
/* #undef HAVE_SYS_NDIR_H */
|
/* #undef HAVE_SYS_NDIR_H */
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
/* #undef HAVE_SYS_PARAM_H 1 */
|
/* #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
|
#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 1 */
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define if you have the dgc library (-ldgc). */
|
/* Define to 1 if you have the dgc library (-ldgc). */
|
||||||
/* #undef HAVE_LIBDGC */
|
/* #undef HAVE_LIBDGC */
|
||||||
|
|
||||||
/* Define if you have the sun library (-lsun). */
|
/* Define to 1 if you have the kstat library (-lkstat). */
|
||||||
|
/* #undef HAVE_LIBKSTAT *
|
||||||
|
|
||||||
|
/* Define to 1 if you have the sun library (-lsun). */
|
||||||
/* #undef HAVE_LIBSUN */
|
/* #undef HAVE_LIBSUN */
|
||||||
|
|
||||||
/* VMS specific */
|
/* 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 sensitive targets */
|
||||||
|
/* #undef WANT_CASE_SENSITIVE_TARGETS */
|
||||||
|
|
||||||
|
/* VMS specific, V7.0 has opendir() and friends, so it's undefined */
|
||||||
|
/* If you want to use non-VMS code for opendir() etc. on V7.0 and greater
|
||||||
|
define the first or both macros AND change the compile command to get the
|
||||||
|
non-VMS versions linked: (prefix=(all,except=(opendir,... */
|
||||||
|
/* #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
|
# define HAVE_VMSDIR_H 1
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# if __VMS_VER < 70000000
|
||||||
|
# define HAVE_VMSDIR_H 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
||||||
|
#undef HAVE_DIRENT_H
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
||||||
#define INCLUDEDIR "sys$sysroot:[syslib]"
|
#define INCLUDEDIR "sys$sysroot:[syslib]"
|
||||||
#define LIBDIR "sys$sysroot:[syslib]"
|
#define LIBDIR "sys$sysroot:[syslib]"
|
||||||
|
|
||||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
/* Don't use RTL functions of OpenVMS */
|
||||||
#undef PARAMS
|
#ifdef __DECC
|
||||||
#define PARAMS(protos) protos
|
#include <stdio.h>
|
||||||
#else /* Not C++ or ANSI C. */
|
#include <unistd.h>
|
||||||
#undef PARAMS
|
#define getopt gnu_getopt
|
||||||
#define PARAMS(protos) ()
|
#define optarg gnu_optarg
|
||||||
#endif /* C++ or ANSI C. */
|
#define optopt gnu_optopt
|
||||||
|
#define optind gnu_optind
|
||||||
|
#define opterr gnu_opterr
|
||||||
|
#define globfree gnu_globfree
|
||||||
|
#define glob gnu_glob
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define if using alloca.c. */
|
||||||
|
/* #undef C_ALLOCA */
|
||||||
|
/* maybe this should be placed into make.h */
|
||||||
|
#if defined(__VAX) && defined(__DECC)
|
||||||
|
#define alloca(n) __ALLOCA(n)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Build host information. */
|
||||||
|
#define MAKE_HOST "VMS"
|
||||||
|
|||||||
@@ -1,289 +1,556 @@
|
|||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
||||||
|
|
||||||
/* Define if on AIX 3.
|
Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||||
System headers sometimes define this.
|
This file is part of GNU Make.
|
||||||
We just want to avoid a redefinition error message. */
|
|
||||||
#ifndef _ALL_SOURCE
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
#undef _ALL_SOURCE
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* Suppress some Visual C++ warnings.
|
||||||
|
Maybe after the code cleanup for ISO C we can remove some/all of these. */
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
# pragma warning(disable:4100) /* unreferenced formal parameter */
|
||||||
|
# pragma warning(disable:4102) /* unreferenced label */
|
||||||
|
# pragma warning(disable:4127) /* conditional expression is constant */
|
||||||
|
# pragma warning(disable:4131) /* uses old-style declarator */
|
||||||
|
# pragma warning(disable:4702) /* unreachable code */
|
||||||
|
# define _CRT_SECURE_NO_WARNINGS /* function or variable may be unsafe */
|
||||||
|
# define _CRT_NONSTDC_NO_WARNINGS /* functions w/o a leading underscore */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
/* Define to 1 if the 'closedir' function returns void instead of 'int'. */
|
||||||
#undef C_ALLOCA
|
/* #undef CLOSEDIR_VOID */
|
||||||
|
|
||||||
/* Define to empty if the keyword does not work. */
|
/* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP
|
||||||
#undef const
|
systems. This function is required for 'alloca.c' support on those systems.
|
||||||
|
*/
|
||||||
|
/* #undef CRAY_STACKSEG_END */
|
||||||
|
|
||||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
/* Define to 1 if using 'alloca.c'. */
|
||||||
This function is required for alloca.c support on those systems. */
|
/* #undef C_ALLOCA */
|
||||||
#undef CRAY_STACKSEG_END
|
|
||||||
|
|
||||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
/* Define to 1 if using 'getloadavg.c'. */
|
||||||
#undef DGUX
|
#define C_GETLOADAVG 1
|
||||||
|
|
||||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
|
||||||
#undef GETLOADAVG_PRIVILEGED
|
/* #undef DGUX */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 1 if translation of program messages to the user's native
|
||||||
#undef gid_t
|
language is requested. */
|
||||||
#define gid_t int
|
/* #undef ENABLE_NLS */
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#undef HAVE_ALLOCA
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
#define HAVE_ALLOCA
|
|
||||||
|
|
||||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
/* Define to 1 if the 'getloadavg' function needs to be run setuid or setgid.
|
||||||
#undef HAVE_ALLOCA_H
|
*/
|
||||||
|
/* #undef GETLOADAVG_PRIVILEGED */
|
||||||
|
|
||||||
/* Define if you don't have vprintf but do have _doprnt. */
|
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||||
#undef HAVE_DOPRNT
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define if your system has its own `getloadavg' function. */
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
#undef HAVE_GETLOADAVG
|
*/
|
||||||
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
/* Define if you have the getmntent function. */
|
/* Define to 1 if your compiler conforms to the ANSI C standard. */
|
||||||
#undef HAVE_GETMNTENT
|
#define HAVE_ANSI_COMPILER 1
|
||||||
|
|
||||||
/* Define if the `long double' type works. */
|
/* Define to 1 if you have the 'atexit' function. */
|
||||||
#undef HAVE_LONG_DOUBLE
|
#define HAVE_ATEXIT 1
|
||||||
|
|
||||||
/* Define if you support file names longer than 14 characters. */
|
/* Use case insensitive file names */
|
||||||
#undef HAVE_LONG_FILE_NAMES
|
/* #undef HAVE_CASE_INSENSITIVE_FS */
|
||||||
#define HAVE_LONG_FILE_NAMES
|
|
||||||
|
|
||||||
/* Define if you have a working `mmap' system call. */
|
/* Define to 1 if you have the clock_gettime function. */
|
||||||
#undef HAVE_MMAP
|
/* #undef HAVE_CLOCK_GETTIME */
|
||||||
|
|
||||||
/* Define if system calls automatically restart after interruption
|
/* Embed GNU Guile support. Windows build sets this on the
|
||||||
by a signal. */
|
compilation command line. */
|
||||||
#undef HAVE_RESTARTABLE_SYSCALLS
|
/* #undef HAVE_GUILE */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blksize. */
|
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||||
#undef HAVE_ST_BLKSIZE
|
*/
|
||||||
|
/* #undef HAVE_DCGETTEXT */
|
||||||
|
|
||||||
/* Define if your struct stat has st_blocks. */
|
/* Define to 1 if you have the declaration of 'bsd_signal', and to 0 if you
|
||||||
#undef HAVE_ST_BLOCKS
|
don't. */
|
||||||
|
#define HAVE_DECL_BSD_SIGNAL 0
|
||||||
|
|
||||||
/* Define if you have the strcoll function and it is properly defined. */
|
/* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you
|
||||||
#undef HAVE_STRCOLL
|
don't. */
|
||||||
#define HAVE_STRCOLL
|
#define HAVE_DECL_SYS_SIGLIST 0
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
/* Define to 1 if you have the declaration of '_sys_siglist', and to 0 if you
|
||||||
#undef HAVE_ST_RDEV
|
don't. */
|
||||||
#define HAVE_ST_RDEV
|
#define HAVE_DECL__SYS_SIGLIST 0
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
/* Define to 1 if you have the declaration of '__sys_siglist', and to 0 if you
|
||||||
#undef HAVE_STRFTIME
|
don't. */
|
||||||
#define HAVE_STRFTIME
|
#define HAVE_DECL___SYS_SIGLIST 0
|
||||||
|
|
||||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
|
||||||
#undef HAVE_SYS_WAIT_H
|
*/
|
||||||
|
#define HAVE_DIRENT_H 1
|
||||||
|
|
||||||
/* Define if your struct tm has tm_zone. */
|
/* Define to 1 if you have the <direct.h> header file, and it defines getcwd()
|
||||||
#undef HAVE_TM_ZONE
|
and chdir().
|
||||||
|
*/
|
||||||
|
#if (defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(__INTERIX)
|
||||||
|
# define HAVE_DIRECT_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you don't have tm_zone but do have the external array
|
/* Define to 1 if you don't have 'vprintf' but do have '_doprnt.' */
|
||||||
tzname. */
|
/* #undef HAVE_DOPRNT */
|
||||||
#undef HAVE_TZNAME
|
|
||||||
#define HAVE_TZNAME
|
|
||||||
|
|
||||||
/* Define if you have <unistd.h>. */
|
/* Use platform specific coding */
|
||||||
#undef HAVE_UNISTD_H
|
#define HAVE_DOS_PATHS 1
|
||||||
|
|
||||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
/* Define to 1 if you have the 'dup2' function. */
|
||||||
#undef HAVE_UTIME_NULL
|
#define HAVE_DUP2 1
|
||||||
#define HAVE_UTIME_NULL
|
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
#undef HAVE_VFORK_H
|
#define HAVE_FCNTL_H 1
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
/* Define to 1 if you have the 'fdopen' function. */
|
||||||
#undef HAVE_VPRINTF
|
#ifdef __MINGW32__
|
||||||
#define HAVE_VPRINTF
|
#define HAVE_FDOPEN 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the wait3 system call. */
|
/* Define to 1 if you have the 'fileno' function. */
|
||||||
#undef HAVE_WAIT3
|
#define HAVE_FILENO 1
|
||||||
|
|
||||||
/* Define if on MINIX. */
|
/* Define to 1 if you have the 'fork' function. */
|
||||||
#undef _MINIX
|
/* #undef HAVE_FORK */
|
||||||
|
|
||||||
/* Define if your struct nlist has an n_un member. */
|
/* Define to 1 if you have the 'getcwd' function. */
|
||||||
#undef NLIST_NAME_UNION
|
#define HAVE_GETCWD 1
|
||||||
|
|
||||||
/* Define if you have <nlist.h>. */
|
/* Define to 1 if you have the 'getgroups' function. */
|
||||||
#undef NLIST_STRUCT
|
/* #undef HAVE_GETGROUPS */
|
||||||
|
|
||||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
/* Define to 1 if you have the 'gethostbyname' function. */
|
||||||
#undef NO_MINUS_C_MINUS_O
|
/* #undef HAVE_GETHOSTBYNAME */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 1 if you have the 'gethostname' function. */
|
||||||
#undef pid_t
|
/* #undef HAVE_GETHOSTNAME */
|
||||||
#define pid_t int
|
|
||||||
|
|
||||||
/* Define if the system does not provide POSIX.1 features except
|
/* Define to 1 if you have the 'getloadavg' function. */
|
||||||
with this defined. */
|
/* #undef HAVE_GETLOADAVG */
|
||||||
#undef _POSIX_1_SOURCE
|
|
||||||
|
|
||||||
/* Define if you need to in order for stat and other things to work. */
|
/* Define to 1 if you have the 'getrlimit' function. */
|
||||||
#undef _POSIX_SOURCE
|
/* #undef HAVE_GETRLIMIT */
|
||||||
#define _POSIX_SOURCE
|
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||||
#undef RETSIGTYPE
|
/* #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 <stdarg.h> header file. */
|
||||||
|
#define HAVE_STDARG_H 1
|
||||||
|
|
||||||
|
/* 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 '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 <varargs.h> header file. */
|
||||||
|
/* #undef HAVE_VARARGS_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'vfork' function. */
|
||||||
|
/* #undef HAVE_VFORK */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <vfork.h> header file. */
|
||||||
|
/* #undef HAVE_VFORK_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'vprintf' function. */
|
||||||
|
#define HAVE_VPRINTF 1
|
||||||
|
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'wait3' function. */
|
||||||
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'waitpid' function. */
|
||||||
|
/* #undef HAVE_WAITPID */
|
||||||
|
|
||||||
|
/* Define to 1 if 'fork' works. */
|
||||||
|
/* #undef HAVE_WORKING_FORK */
|
||||||
|
|
||||||
|
/* Define to 1 if 'vfork' works. */
|
||||||
|
/* #undef HAVE_WORKING_VFORK */
|
||||||
|
|
||||||
|
/* Build host information. */
|
||||||
|
#define MAKE_HOST "Windows32"
|
||||||
|
|
||||||
|
/* Define to 1 to enable job server support in GNU make. */
|
||||||
|
#define MAKE_JOBSERVER 1
|
||||||
|
|
||||||
|
/* Define to 1 to enable 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 RETSIGTYPE void
|
||||||
|
|
||||||
/* Define if the setvbuf function takes the buffering type as its second
|
/* Define to the name of the SCCS 'get' command. */
|
||||||
argument and the buffer pointer as the third, as on System V
|
#define SCCS_GET "echo no sccs get"
|
||||||
before release 3. */
|
|
||||||
#undef SETVBUF_REVERSED
|
/* 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
|
/* If using the C implementation of alloca, define if you know the
|
||||||
direction of stack growth for your system; otherwise it will be
|
direction of stack growth for your system; otherwise it will be
|
||||||
automatically deduced at run-time.
|
automatically deduced at run time.
|
||||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||||
STACK_DIRECTION = 0 => direction of growth unknown
|
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||||
*/
|
/* #undef STACK_DIRECTION */
|
||||||
#undef STACK_DIRECTION
|
|
||||||
|
|
||||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||||
#undef STAT_MACROS_BROKEN
|
/* #undef STAT_MACROS_BROKEN */
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#define STDC_HEADERS 1
|
||||||
#define STDC_HEADERS
|
|
||||||
|
|
||||||
/* Define on System V Release 4. */
|
/* Define if struct stat contains a nanoseconds field */
|
||||||
#undef SVR4
|
/* #undef ST_MTIM_NSEC */
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Define to 1 on System V Release 4. */
|
||||||
#undef SYS_SIGLIST_DECLARED
|
/* #undef SVR4 */
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
#undef uid_t
|
#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 uid_t int
|
||||||
|
|
||||||
/* Define for Encore UMAX. */
|
/* Define uintmax_t if not defined in <stdint.h> or <inttypes.h>. */
|
||||||
#undef UMAX
|
#if !HAVE_STDINT_H && !HAVE_INTTYPES_H
|
||||||
|
#define uintmax_t unsigned long
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
|
/* Define as 'fork' if 'vfork' does not work. */
|
||||||
instead of <sys/cpustats.h>. */
|
/*#define vfork fork*/
|
||||||
#undef UMAX4_3
|
|
||||||
|
|
||||||
/* Define vfork as fork if vfork does not work. */
|
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
#undef vfork
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
/* Define to the installation directory for locales. */
|
||||||
#undef SCCS_GET
|
#define LOCALEDIR ""
|
||||||
#define SCCS_GET "echo no sccs get"
|
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
/*
|
||||||
#undef SCCS_GET_MINUS_G
|
* Refer to README.W32 for info on the following settings
|
||||||
|
*/
|
||||||
|
|
||||||
/* 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
|
* 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.
|
||||||
|
*/
|
||||||
|
/*#define BATCH_MODE_ONLY_SHELL 1 */
|
||||||
|
|
||||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
/*
|
||||||
#undef HAVE_UNION_WAIT
|
* Define if you have the Cygnus "Cygwin" GNU Windows32 tool set.
|
||||||
|
* Do NOT define BATCH_MODE_ONLY_SHELL if you define HAVE_CYGWIN_SHELL
|
||||||
|
*/
|
||||||
|
/*#define HAVE_CYGWIN_SHELL 1 */
|
||||||
|
|
||||||
/* Define if you have the dup2 function. */
|
/*
|
||||||
#undef HAVE_DUP2
|
* Define if you have the MKS tool set or shell. Do NOT define
|
||||||
#define HAVE_DUP2
|
* BATCH_MODE_ONLY_SHELL if you define HAVE_MKS_SHELL
|
||||||
|
*/
|
||||||
|
/*#define HAVE_MKS_SHELL 1 */
|
||||||
|
|
||||||
/* Define if you have the getcwd function. */
|
/*
|
||||||
#undef HAVE_GETCWD
|
* Enforce the mutual exclusivity restriction.
|
||||||
#define HAVE_GETCWD
|
*/
|
||||||
|
#ifdef HAVE_MKS_SHELL
|
||||||
|
#undef BATCH_MODE_ONLY_SHELL
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the getgroups function. */
|
#ifdef HAVE_CYGWIN_SHELL
|
||||||
#undef HAVE_GETGROUPS
|
#undef BATCH_MODE_ONLY_SHELL
|
||||||
|
#endif
|
||||||
/* Define if you have the mktemp function. */
|
|
||||||
#undef HAVE_MKTEMP
|
|
||||||
#define HAVE_MKTEMP
|
|
||||||
|
|
||||||
/* Define if you have the psignal function. */
|
|
||||||
#undef HAVE_PSIGNAL
|
|
||||||
|
|
||||||
/* 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 strerror function. */
|
|
||||||
#undef HAVE_STRERROR
|
|
||||||
#define HAVE_STRERROR
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#undef HAVE_FCNTL_H
|
|
||||||
#define HAVE_FCNTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#undef HAVE_LIMITS_H
|
|
||||||
#define HAVE_LIMITS_H
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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 sun library (-lsun). */
|
|
||||||
#undef HAVE_LIBSUN
|
|
||||||
|
|||||||
289
config.h.WIN32
289
config.h.WIN32
@@ -1,289 +0,0 @@
|
|||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
|
||||||
#undef C_ALLOCA
|
|
||||||
|
|
||||||
/* 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. */
|
|
||||||
#undef CRAY_STACKSEG_END
|
|
||||||
|
|
||||||
/* Define 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 `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
|
|
||||||
|
|
||||||
/* 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 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* Define if your struct stat has st_rdev. */
|
|
||||||
#undef HAVE_ST_RDEV
|
|
||||||
#define HAVE_ST_RDEV
|
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
|
||||||
#undef HAVE_STRFTIME
|
|
||||||
#define HAVE_STRFTIME
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* Define if you have <vfork.h>. */
|
|
||||||
#undef HAVE_VFORK_H
|
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
|
||||||
#undef HAVE_VPRINTF
|
|
||||||
#define HAVE_VPRINTF
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
|
||||||
#undef SCCS_GET
|
|
||||||
#define SCCS_GET "echo no sccs get"
|
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
|
||||||
#undef SCCS_GET_MINUS_G
|
|
||||||
|
|
||||||
/* Define this 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
|
|
||||||
|
|
||||||
/* Define if you have the getcwd function. */
|
|
||||||
#undef HAVE_GETCWD
|
|
||||||
#define HAVE_GETCWD
|
|
||||||
|
|
||||||
/* Define if you have the getgroups function. */
|
|
||||||
#undef HAVE_GETGROUPS
|
|
||||||
|
|
||||||
/* Define if you have the mktemp function. */
|
|
||||||
#undef HAVE_MKTEMP
|
|
||||||
#define HAVE_MKTEMP
|
|
||||||
|
|
||||||
/* Define if you have the psignal function. */
|
|
||||||
#undef HAVE_PSIGNAL
|
|
||||||
|
|
||||||
/* 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 strerror function. */
|
|
||||||
#undef HAVE_STRERROR
|
|
||||||
#define HAVE_STRERROR
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#undef HAVE_FCNTL_H
|
|
||||||
#define HAVE_FCNTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#undef HAVE_LIMITS_H
|
|
||||||
#define HAVE_LIMITS_H
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
/* 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 sun library (-lsun). */
|
|
||||||
#undef HAVE_LIBSUN
|
|
||||||
264
config.h.in
264
config.h.in
@@ -1,264 +0,0 @@
|
|||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define if using alloca.c. */
|
|
||||||
#undef C_ALLOCA
|
|
||||||
|
|
||||||
/* 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. */
|
|
||||||
#undef CRAY_STACKSEG_END
|
|
||||||
|
|
||||||
/* Define 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 `int' if <sys/types.h> doesn't define. */
|
|
||||||
#undef gid_t
|
|
||||||
|
|
||||||
/* Define if you have alloca, as a function or macro. */
|
|
||||||
#undef HAVE_ALLOCA
|
|
||||||
|
|
||||||
/* 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 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 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 if your struct stat has st_rdev. */
|
|
||||||
#undef HAVE_ST_RDEV
|
|
||||||
|
|
||||||
/* Define if you have the strftime function. */
|
|
||||||
#undef HAVE_STRFTIME
|
|
||||||
|
|
||||||
/* 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 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 if you have <vfork.h>. */
|
|
||||||
#undef HAVE_VFORK_H
|
|
||||||
|
|
||||||
/* Define if you have the vprintf function. */
|
|
||||||
#undef HAVE_VPRINTF
|
|
||||||
|
|
||||||
/* 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 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 as the return type of signal handlers (int or void). */
|
|
||||||
#undef RETSIGTYPE
|
|
||||||
|
|
||||||
/* 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 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 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
|
|
||||||
|
|
||||||
/* Define to the name of the SCCS `get' command. */
|
|
||||||
#undef SCCS_GET
|
|
||||||
|
|
||||||
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
|
|
||||||
#undef SCCS_GET_MINUS_G
|
|
||||||
|
|
||||||
/* Define this 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 if you have the getcwd function. */
|
|
||||||
#undef HAVE_GETCWD
|
|
||||||
|
|
||||||
/* Define if you have the getgroups function. */
|
|
||||||
#undef HAVE_GETGROUPS
|
|
||||||
|
|
||||||
/* Define if you have the mktemp function. */
|
|
||||||
#undef HAVE_MKTEMP
|
|
||||||
|
|
||||||
/* Define if you have the psignal function. */
|
|
||||||
#undef HAVE_PSIGNAL
|
|
||||||
|
|
||||||
/* 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 strerror function. */
|
|
||||||
#undef HAVE_STRERROR
|
|
||||||
|
|
||||||
/* 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 if you have the <fcntl.h> header file. */
|
|
||||||
#undef HAVE_FCNTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#undef HAVE_LIMITS_H
|
|
||||||
|
|
||||||
/* 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 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 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 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 sun library (-lsun). */
|
|
||||||
#undef HAVE_LIBSUN
|
|
||||||
11
config/.cvsignore
Normal file
11
config/.cvsignore
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
*.m4
|
||||||
|
config.*
|
||||||
|
mkinstalldirs
|
||||||
|
texinfo.tex
|
||||||
|
mdate-sh
|
||||||
|
compile
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
missing
|
||||||
|
|
||||||
|
Makefile Makefile.in
|
||||||
49
config/ChangeLog
Normal file
49
config/ChangeLog
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-2012 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/>.
|
||||||
48
config/Makefile.am
Normal file
48
config/Makefile.am
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# -*-Makefile-*-, or close enough
|
||||||
|
# Copyright (C) 2002-2012 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/>.
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
codeset.m4 \
|
||||||
|
dospaths.m4 \
|
||||||
|
gettext.m4 \
|
||||||
|
glibc21.m4 \
|
||||||
|
iconv.m4 \
|
||||||
|
intdiv0.m4 \
|
||||||
|
intmax.m4 \
|
||||||
|
inttypes-pri.m4 \
|
||||||
|
inttypes.m4 \
|
||||||
|
inttypes_h.m4 \
|
||||||
|
isc-posix.m4 \
|
||||||
|
isc-posix.m4 \
|
||||||
|
lcmessage.m4 \
|
||||||
|
lib-ld.m4 \
|
||||||
|
lib-link.m4 \
|
||||||
|
lib-prefix.m4 \
|
||||||
|
longdouble.m4 \
|
||||||
|
longlong.m4 \
|
||||||
|
nls.m4 \
|
||||||
|
po.m4 \
|
||||||
|
printf-posix.m4 \
|
||||||
|
progtest.m4 \
|
||||||
|
signed.m4 \
|
||||||
|
size_max.m4 \
|
||||||
|
stdint_h.m4 \
|
||||||
|
uintmax_t.m4 \
|
||||||
|
ulonglong.m4 \
|
||||||
|
wchar_t.m4 \
|
||||||
|
wint_t.m4 \
|
||||||
|
xsize.m4
|
||||||
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-2012 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,68 +1,123 @@
|
|||||||
/* Generated automatically from configure.in by autoheader. DO NOT EDIT! */
|
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
||||||
|
|
||||||
#define INCLUDEDIR "c:/djgpp/include"
|
Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||||
#define LIBDIR "c:/djgpp/lib"
|
This file is part of GNU Make.
|
||||||
|
|
||||||
/* Define if you have dirent.h. */
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
#define HAVE_DIRENT_H
|
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.
|
||||||
|
|
||||||
/* Define if you have the strcoll function and it is properly defined. */
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
#define HAVE_STRCOLL
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
/* Define if you have unistd.h. */
|
You should have received a copy of the GNU General Public License along with
|
||||||
#define HAVE_UNISTD_H
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (int or void). */
|
/* Include this header to make __DJGPP_MINOR__ available because DJGPP ports
|
||||||
#define RETSIGTYPE void
|
of GCC 4.3.0 and later no longer do it automatically. */
|
||||||
|
#include <sys/version.h>
|
||||||
|
|
||||||
|
/* Many things are defined already by a system header. */
|
||||||
|
#include <sys/config.h>
|
||||||
|
|
||||||
|
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
||||||
|
|
||||||
|
/* Define to 1 if 'sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
||||||
|
# define SYS_SIGLIST_DECLARED 1
|
||||||
|
|
||||||
|
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||||
|
# define HAVE_DECL_SYS_SIGLIST 1
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* Define NSIG. */
|
||||||
|
# define NSIG SIGMAX
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */
|
|
||||||
#ifndef STDC_HEADERS
|
|
||||||
#define STDC_HEADERS
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
/* Use high resolution file timestamps if nonzero. */
|
||||||
#define SYS_SIGLIST_DECLARED
|
#define FILE_TIMESTAMP_HI_RES 0
|
||||||
|
|
||||||
/* Define if you have getdtablesize. */
|
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||||
#define HAVE_GETDTABLESIZE
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define if you have dup2. */
|
/* Define to 1 if you have the fdopen function. */
|
||||||
#define HAVE_DUP2
|
#define HAVE_FDOPEN 1
|
||||||
|
|
||||||
/* Define if you have sys_siglist. */
|
/* Define to 1 if you have the 'getgroups' function. */
|
||||||
#undef HAVE_SYS_SIGLIST
|
#define HAVE_GETGROUPS 1
|
||||||
|
|
||||||
/* Define if you have _sys_siglist. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
#undef HAVE__SYS_SIGLIST
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
/* Define if you have psignal. */
|
/* Define to 1 if you have the mkstemp function. */
|
||||||
#define HAVE_PSIGNAL
|
#define HAVE_MKSTEMP 1
|
||||||
|
|
||||||
/* Define if you have getcwd. */
|
/* Define to 1 if you have the 'mktemp' function. */
|
||||||
#define HAVE_GETCWD
|
#define HAVE_MKTEMP 1
|
||||||
|
|
||||||
/* Define if you have sigsetmask. */
|
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||||
#define HAVE_SIGSETMASK
|
#define HAVE_SETLINEBUF 1
|
||||||
|
|
||||||
/* Define if you have setlinebuf. */
|
/* Define to 1 if you have the 'setvbuf' function. */
|
||||||
#define HAVE_SETLINEBUF
|
#define HAVE_SETVBUF 1
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
|
||||||
#define HAVE_LIMITS_H
|
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
|
||||||
#undef HAVE_SYS_PARAM_H
|
|
||||||
|
|
||||||
/* Define if you have the <fcntl.h> header file. */
|
|
||||||
#define HAVE_FCNTL_H
|
|
||||||
|
|
||||||
/* Define if you have the <string.h> header file. */
|
|
||||||
#define HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define if you have the <memory.h> header file. */
|
|
||||||
#define HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define if you have the `strerror' function. */
|
|
||||||
#define HAVE_STRERROR
|
|
||||||
|
|
||||||
#define SCCS_GET "get"
|
#define SCCS_GET "get"
|
||||||
|
|
||||||
|
/* Define to 'unsigned long' or 'unsigned long long'
|
||||||
|
if <inttypes.h> doesn't define. */
|
||||||
|
#define uintmax_t unsigned long long
|
||||||
|
|
||||||
|
/* Define the type of the first arg to select(). */
|
||||||
|
#define fd_set_size_t int
|
||||||
|
|
||||||
|
/* Define to 1 if you have the select function. */
|
||||||
|
#define HAVE_SELECT 1
|
||||||
|
|
||||||
|
/* Define to 1 if your compiler conforms to the ANSI C standard. */
|
||||||
|
#define HAVE_ANSI_COMPILER 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||||
|
#define HAVE_STDARG_H 1
|
||||||
|
|
||||||
|
/* Define to 1 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%"
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#define PACKAGE_BUGREPORT "bug-%PACKAGE%@gnu.org"
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#define PACKAGE_NAME "GNU %PACKAGE%"
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#define PACKAGE_STRING "GNU %PACKAGE% %VERSION%"
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#define PACKAGE_TARNAME "%PACKAGE%"
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#define PACKAGE_VERSION "%VERSION%"
|
||||||
|
|
||||||
|
/* Define to 1 if the C compiler supports function prototypes. */
|
||||||
|
#define PROTOTYPES 1
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#define VERSION "%VERSION%"
|
||||||
|
|
||||||
|
/* Build host information. */
|
||||||
|
#define MAKE_HOST "i386-pc-msdosdjgpp"
|
||||||
|
|
||||||
|
/* Grok DOS paths (drive specs and backslash path element separators) */
|
||||||
|
#define HAVE_DOS_PATHS
|
||||||
|
|||||||
@@ -1,44 +1,60 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo Configuring MAKE for go32
|
rem Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||||
rem This batch file assumes a unix-type "sed" program
|
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/>.
|
||||||
|
|
||||||
update configh.dos config.h
|
echo Configuring MAKE for DJGPP
|
||||||
|
|
||||||
echo # Makefile generated by "configure.bat"> Makefile
|
rem The SmallEnv trick protects against too small environment block,
|
||||||
|
rem in which case the values will be truncated and the whole thing
|
||||||
|
rem goes awry. COMMAND.COM will say "Out of environment space", but
|
||||||
|
rem many people don't care, so we force them to care by refusing to go.
|
||||||
|
|
||||||
if exist config.sed del config.sed
|
rem Where is the srcdir?
|
||||||
|
set XSRC=.
|
||||||
|
if not "%XSRC%"=="." goto SmallEnv
|
||||||
|
if "%1%"=="" goto SrcDone
|
||||||
|
set XSRC=%1
|
||||||
|
if not "%XSRC%"=="%1" goto SmallEnv
|
||||||
|
|
||||||
echo ": try_sl ">> config.sed
|
:SrcDone
|
||||||
echo "/\\$/ { ">> config.sed
|
|
||||||
echo " N ">> config.sed
|
|
||||||
echo " s/[ ]*\\\n[ ]*/ / ">> config.sed
|
|
||||||
echo " b try_sl ">> config.sed
|
|
||||||
echo "} ">> config.sed
|
|
||||||
|
|
||||||
echo "s/@srcdir@/./ ">> config.sed
|
update %XSRC%/configh.dos ./config.h
|
||||||
echo "s/@CC@/gcc/ ">> config.sed
|
|
||||||
echo "s/@CFLAGS@/-O2 -g/ ">> config.sed
|
|
||||||
echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H/ ">> config.sed
|
|
||||||
echo "s/@LDFLAGS@// ">> config.sed
|
|
||||||
echo "s/@RANLIB@/ranlib/ ">> config.sed
|
|
||||||
echo "s/@DEFS@// ">> config.sed
|
|
||||||
echo "s/@REMOTE@/stub/ ">> config.sed
|
|
||||||
echo "s/@ALLOCA@// ">> config.sed
|
|
||||||
echo "s/@LIBS@// ">> config.sed
|
|
||||||
echo "s/@LIBOBJS@// ">> config.sed
|
|
||||||
echo "s/@SET_MAKE@// ">> config.sed
|
|
||||||
echo "s/^Makefile *:/_Makefile:/ ">> config.sed
|
|
||||||
echo "s/^config.h *:/_config.h:/ ">> config.sed
|
|
||||||
echo "s/^defines *=.*$/defines =/ ">> config.sed
|
|
||||||
echo "/mv -f make.new make/d ">> config.sed
|
|
||||||
|
|
||||||
echo "s/cd glob; $(MAKE)/$(MAKE) -C glob/ ">> config.sed
|
rem Do they have Make?
|
||||||
|
redir -o junk.$$$ -eo make -n -f NUL
|
||||||
|
rem REDIR will return 1 if it cannot run Make.
|
||||||
|
rem If it can run Make, it will usually return 2,
|
||||||
|
rem but 0 is also OK with us.
|
||||||
|
if errorlevel 2 goto MakeOk
|
||||||
|
if not errorlevel 1 goto MakeOk
|
||||||
|
if exist junk.$$$ del junk.$$$
|
||||||
|
echo No Make program found--use DOSBUILD.BAT to build Make.
|
||||||
|
goto End
|
||||||
|
|
||||||
sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
|
rem They do have Make. Generate the Makefile.
|
||||||
sed -f config2.sed Makefile.in >> Makefile
|
|
||||||
del config.sed
|
|
||||||
del config2.sed
|
|
||||||
|
|
||||||
cd glob
|
:MakeOk
|
||||||
call configure
|
del junk.$$$
|
||||||
cd ..
|
update %XSRC%/Makefile.DOS ./Makefile
|
||||||
|
echo Done.
|
||||||
|
if not "%XSRC%"=="." echo Invoke Make thus: "make srcdir=%XSRC%"
|
||||||
|
goto End
|
||||||
|
|
||||||
|
:SmallEnv
|
||||||
|
echo Your environment is too small. Please enlarge it and run me again.
|
||||||
|
|
||||||
|
:End
|
||||||
|
set XRSC=
|
||||||
|
|||||||
563
configure.in
563
configure.in
@@ -1,60 +1,227 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
AC_REVISION([$Id$])
|
#
|
||||||
AC_PREREQ(2.10)dnl dnl Minimum Autoconf version required.
|
# Copyright (C) 1993-2012 Free Software Foundation, Inc.
|
||||||
AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir.
|
# This file is part of GNU Make.
|
||||||
AC_CONFIG_HEADER(config.h)
|
#
|
||||||
AC_CONFIG_SUBDIRS(glob) dnl Run configure in glob subdirectory.
|
# 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_PROG_MAKE_SET
|
AC_INIT([GNU make],[3.82.90],[bug-make@gnu.org])
|
||||||
|
|
||||||
|
AC_PREREQ([2.59])
|
||||||
|
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([1.9])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_CPP dnl Later checks need this.
|
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_AIX
|
||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
AC_MINIX
|
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_STDC
|
||||||
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
||||||
AC_TYPE_UID_T dnl Also does gid_t.
|
|
||||||
AC_TYPE_PID_T
|
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
|
|
||||||
sys/timeb.h)
|
|
||||||
AC_PROG_CC_C_O
|
|
||||||
AC_C_CONST dnl getopt needs this.
|
|
||||||
AC_HEADER_STAT
|
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])
|
||||||
|
|
||||||
AC_SUBST(LIBOBJS)
|
# Set a flag if we have an ANSI C compiler
|
||||||
|
AS_IF([test "$ac_cv_prog_cc_stdc" != no],
|
||||||
|
[ AC_DEFINE([HAVE_ANSI_COMPILER], [1],
|
||||||
|
[Define to 1 if your compiler conforms to the ANSI C standard.])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN(AC_CHECK_SYMBOL, [dnl
|
|
||||||
AC_MSG_CHECKING(for $1)
|
|
||||||
AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
|
|
||||||
AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);],
|
|
||||||
ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
|
|
||||||
if test "$ac_cv_check_symbol_$1" = yes; then
|
|
||||||
changequote(,)dnl
|
|
||||||
ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
|
|
||||||
changequote([,])dnl
|
|
||||||
AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS(psignal mktemp \
|
# Determine what kind of variadic function calls we support
|
||||||
dup2 getcwd sigsetmask getgroups setlinebuf \
|
AC_CHECK_HEADERS([stdarg.h varargs.h], [break])
|
||||||
seteuid setegid setreuid setregid strerror strsignal)
|
|
||||||
AC_CHECK_SYMBOL(sys_siglist)
|
AM_PROG_CC_C_O
|
||||||
AC_FUNC_ALLOCA
|
AC_C_CONST
|
||||||
AC_FUNC_VFORK
|
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 \
|
||||||
|
dup2 getcwd realpath sigsetmask sigaction \
|
||||||
|
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||||
|
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
||||||
|
lstat readlink atexit])
|
||||||
|
|
||||||
|
# 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
|
AC_FUNC_SETVBUF_REVERSED
|
||||||
AC_FUNC_GETLOADAVG
|
|
||||||
|
# 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_STRCOLL
|
||||||
|
|
||||||
|
AC_FUNC_ALLOCA
|
||||||
|
AC_FUNC_FORK([])
|
||||||
|
AC_FUNC_VPRINTF
|
||||||
|
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.
|
# Check out the wait reality.
|
||||||
AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3)
|
AC_CHECK_HEADERS([sys/wait.h],[],[],[[#include <sys/types.h>]])
|
||||||
AC_MSG_CHECKING(for union wait)
|
AC_CHECK_FUNCS([waitpid wait3])
|
||||||
AC_CACHE_VAL(make_cv_union_wait, [dnl
|
AC_CACHE_CHECK([for union wait], [make_cv_union_wait],
|
||||||
AC_TRY_LINK([#include <sys/types.h>
|
[ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
#include <sys/wait.h>],
|
#include <sys/wait.h>]],
|
||||||
[union wait status; int pid; pid = wait (&status);
|
[[union wait status; int pid; pid = wait (&status);
|
||||||
#ifdef WEXITSTATUS
|
#ifdef WEXITSTATUS
|
||||||
/* Some POSIXoid systems have both the new-style macros and the old
|
/* Some POSIXoid systems have both the new-style macros and the old
|
||||||
union wait type, and they do not work together. If union wait
|
union wait type, and they do not work together. If union wait
|
||||||
@@ -69,47 +236,293 @@ if (WEXITSTATUS (status) != 0) pid = -1;
|
|||||||
/* Make sure union wait works with waitpid. */
|
/* Make sure union wait works with waitpid. */
|
||||||
pid = waitpid (-1, &status, 0);
|
pid = waitpid (-1, &status, 0);
|
||||||
#endif
|
#endif
|
||||||
],
|
]])],
|
||||||
[make_cv_union_wait=yes], [make_cv_union_wait=no])])
|
[make_cv_union_wait=yes],
|
||||||
if test "$make_cv_union_wait" = yes; then
|
[make_cv_union_wait=no])
|
||||||
AC_DEFINE(HAVE_UNION_WAIT)
|
])
|
||||||
fi
|
AS_IF([test "$make_cv_union_wait" = yes],
|
||||||
AC_MSG_RESULT($make_cv_union_wait)
|
[ AC_DEFINE([HAVE_UNION_WAIT], [1],
|
||||||
|
[Define to 1 if you have the 'union wait' type in <sys/wait.h>.])
|
||||||
|
])
|
||||||
|
|
||||||
AC_DECL_SYS_SIGLIST
|
|
||||||
|
|
||||||
# The presence of the following is not meant to imply
|
# If we're building on Windows/DOS/OS/2, add some support for DOS drive specs.
|
||||||
# that make necessarily works on those systems.
|
AS_IF([test "$PATH_SEPARATOR" = ';'],
|
||||||
AC_CHECK_LIB(sun, getpwnam)
|
[ AC_DEFINE([HAVE_DOS_PATHS], [1],
|
||||||
|
[Define to 1 if your system requires backslashes or drive specs in pathnames.])
|
||||||
|
])
|
||||||
|
|
||||||
AC_SUBST(REMOTE) REMOTE=stub
|
# See if the user wants to use pmake's "customs" distributed build capability
|
||||||
AC_ARG_WITH(customs, [export jobs with the Customs daemon (NOT SUPPORTED)],
|
AC_SUBST([REMOTE]) REMOTE=stub
|
||||||
[REMOTE=cstms LIBS="$LIBS libcustoms.a"])
|
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_func_dlopen/$ac_cv_func_dlsym/$ac_cv_func_dlerror/],
|
||||||
|
[*/no/*], [make_cv_load=no])
|
||||||
|
|
||||||
|
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.])
|
||||||
|
])
|
||||||
|
|
||||||
|
# We might need -ldl
|
||||||
|
AS_IF([test "$make_cv_load" = yes], [
|
||||||
|
AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
|
||||||
|
])
|
||||||
|
|
||||||
|
# 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([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([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.])
|
||||||
|
|
||||||
echo checking for location of SCCS get command
|
|
||||||
if test -f /usr/sccs/get; then
|
|
||||||
SCCS_GET=/usr/sccs/get
|
|
||||||
AC_DEFINE(SCCS_GET, "/usr/sccs/get")
|
|
||||||
else
|
|
||||||
SCCS_GET=get
|
|
||||||
AC_DEFINE(SCCS_GET, "get")
|
|
||||||
fi
|
|
||||||
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
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 &&
|
AS_IF([(/usr/sccs/admin -n s.conftest || admin -n s.conftest) >/dev/null 2>&1 &&
|
||||||
test -f s.conftest; then
|
test -f s.conftest],
|
||||||
# We successfully created an SCCS file.
|
[ # We successfully created an SCCS file.
|
||||||
echo checking if SCCS get command understands -G
|
AC_CACHE_CHECK([if SCCS get command understands -G], [make_cv_sys_get_minus_G],
|
||||||
if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
|
[AS_IF([$make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
||||||
test -f conftoast; then
|
test -f conftoast],
|
||||||
AC_DEFINE(SCCS_GET_MINUS_G)
|
[make_cv_sys_get_minus_G=yes],
|
||||||
fi
|
[make_cv_sys_get_minus_G=no])
|
||||||
fi
|
])
|
||||||
|
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
|
rm -f s.conftest conftoast
|
||||||
|
|
||||||
AC_OUTPUT(Makefile build.sh, [
|
# Check the system to see if it provides GNU glob. If not, use our
|
||||||
# Makefile uses this timestamp file to know when to remake Makefile,
|
# local version.
|
||||||
# build.sh, and glob/Makefile.
|
AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
|
||||||
touch stamp-config])
|
[ 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])
|
||||||
|
|
||||||
|
# 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 Local Variables:
|
||||||
dnl comment-start: "dnl "
|
dnl comment-start: "dnl "
|
||||||
|
|||||||
37
debug.h
Normal file
37
debug.h
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/* Debugging macros and interface.
|
||||||
|
Copyright (C) 1999-2012 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 DB_NONE (0x000)
|
||||||
|
#define DB_BASIC (0x001)
|
||||||
|
#define DB_VERBOSE (0x002)
|
||||||
|
#define DB_JOBS (0x004)
|
||||||
|
#define DB_IMPLICIT (0x008)
|
||||||
|
#define DB_MAKEFILES (0x100)
|
||||||
|
|
||||||
|
#define DB_ALL (0xfff)
|
||||||
|
|
||||||
|
extern int db_level;
|
||||||
|
|
||||||
|
#define ISDB(_l) ((_l)&db_level)
|
||||||
|
|
||||||
|
#define DBS(_l,_x) do{ if(ISDB(_l)) {print_spaces (depth); \
|
||||||
|
printf _x; fflush (stdout);} }while(0)
|
||||||
|
|
||||||
|
#define DBF(_l,_x) do{ if(ISDB(_l)) {print_spaces (depth); \
|
||||||
|
printf (_x, file->name); \
|
||||||
|
fflush (stdout);} }while(0)
|
||||||
|
|
||||||
|
#define DB(_l,_x) do{ if(ISDB(_l)) {printf _x; fflush (stdout);} }while(0)
|
||||||
243
default.c
243
default.c
@@ -1,47 +1,49 @@
|
|||||||
/* Data base of default implicit rules for GNU Make.
|
/* Data base of default implicit rules for GNU Make.
|
||||||
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "make.h"
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "variable.h"
|
||||||
#include "rule.h"
|
#include "rule.h"
|
||||||
#include "dep.h"
|
#include "dep.h"
|
||||||
#include "filedef.h"
|
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "variable.h"
|
|
||||||
|
|
||||||
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
||||||
your system (gcc/bison/flex vs cc/yacc/lex). */
|
your system (gcc/bison/flex vs cc/yacc/lex). */
|
||||||
#ifdef __MSDOS__
|
#if defined(__MSDOS__) || defined(__EMX__)
|
||||||
# define GCC_IS_NATIVE
|
# define GCC_IS_NATIVE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* This is the default list of suffixes for suffix rules.
|
/* This is the default list of suffixes for suffix rules.
|
||||||
`.s' must come last, so that a `.o' file will be made from
|
'.s' must come last, so that a '.o' file will be made from
|
||||||
a `.c' or `.p' or ... file rather than from a .s file. */
|
a '.c' or '.p' or ... file rather than from a .s file. */
|
||||||
|
|
||||||
static char default_suffixes[]
|
static char default_suffixes[]
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
= ".exe .olb .ln .obj .c .cc .pas .p .for .f .r .y .l .mar \
|
= ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \
|
||||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||||
.w .ch .cweb .web .com .sh .elc .el";
|
.w .ch .cweb .web .com .sh .elc .el";
|
||||||
|
#elif defined(__EMX__)
|
||||||
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||||
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||||
|
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
|
||||||
#else
|
#else
|
||||||
= ".out .a .ln .o .c .cc .C .p .f .F .r .y .l .s .S \
|
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||||
.w .ch .web .sh .elc .el";
|
.w .ch .web .sh .elc .el";
|
||||||
#endif
|
#endif
|
||||||
@@ -52,8 +54,8 @@ static struct pspec default_pattern_rules[] =
|
|||||||
"$(AR) $(ARFLAGS) $@ $<" },
|
"$(AR) $(ARFLAGS) $@ $<" },
|
||||||
|
|
||||||
/* The X.out rules are only in BSD's default set because
|
/* The X.out rules are only in BSD's default set because
|
||||||
BSD Make has no null-suffix rules, so `foo.out' and
|
BSD Make has no null-suffix rules, so 'foo.out' and
|
||||||
`foo' are the same thing. */
|
'foo' are the same thing. */
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
{ "%.exe", "%",
|
{ "%.exe", "%",
|
||||||
"copy $< $@" },
|
"copy $< $@" },
|
||||||
@@ -91,6 +93,8 @@ static struct pspec default_terminal_rules[] =
|
|||||||
"$(CHECKOUT,v)" },
|
"$(CHECKOUT,v)" },
|
||||||
{ "%", "RCS/%,v",
|
{ "%", "RCS/%,v",
|
||||||
"$(CHECKOUT,v)" },
|
"$(CHECKOUT,v)" },
|
||||||
|
{ "%", "RCS/%",
|
||||||
|
"$(CHECKOUT,v)" },
|
||||||
|
|
||||||
/* SCCS. */
|
/* SCCS. */
|
||||||
{ "%", "s.%",
|
{ "%", "s.%",
|
||||||
@@ -105,13 +109,21 @@ static char *default_suffix_rules[] =
|
|||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
".obj.exe",
|
".obj.exe",
|
||||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) /exe=$@",
|
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
".mar.exe",
|
".mar.exe",
|
||||||
"$(LINK.mar) $^ $(LOADLIBES) $(LDLIBS) /exe=$@",
|
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
|
".s.exe",
|
||||||
|
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
".c.exe",
|
".c.exe",
|
||||||
"$(COMPILE.c) $^ \n $(LINK.obj) $(subst .c,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
"$(COMPILE.c) $^ \n $(LINK.obj) $(subst .c,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||||
".cc.exe",
|
".cc.exe",
|
||||||
"$(COMPILE.cc) $^ \n $(LINK.obj) $(subst .cc,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
#ifdef GCC_IS_NATIVE
|
||||||
|
"$(COMPILE.cc) $^ \n $(LINK.obj) $(CXXSTARTUP),sys$$disk:[]$(subst .cc,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
|
||||||
|
#else
|
||||||
|
"$(COMPILE.cc) $^ \n $(CXXLINK.obj) $(subst .cc,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
|
||||||
|
".cxx.exe",
|
||||||
|
"$(COMPILE.cxx) $^ \n $(CXXLINK.obj) $(subst .cxx,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
|
||||||
|
#endif
|
||||||
".for.exe",
|
".for.exe",
|
||||||
"$(COMPILE.for) $^ \n $(LINK.obj) $(subst .for,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
"$(COMPILE.for) $^ \n $(LINK.obj) $(subst .for,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
||||||
".pas.exe",
|
".pas.exe",
|
||||||
@@ -122,10 +134,28 @@ static char *default_suffix_rules[] =
|
|||||||
|
|
||||||
".mar.obj",
|
".mar.obj",
|
||||||
"$(COMPILE.mar) /obj=$@ $<",
|
"$(COMPILE.mar) /obj=$@ $<",
|
||||||
|
".s.obj",
|
||||||
|
"$(COMPILE.s) /obj=$@ $<",
|
||||||
|
".ss.obj",
|
||||||
|
"$(COMPILE.s) /obj=$@ $<",
|
||||||
|
".c.i",
|
||||||
|
"$(COMPILE.c)/prep /list=$@ $<",
|
||||||
|
".c.s",
|
||||||
|
"$(COMPILE.c)/noobj/machine /list=$@ $<",
|
||||||
|
".i.s",
|
||||||
|
"$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
|
||||||
".c.obj",
|
".c.obj",
|
||||||
"$(COMPILE.c) /obj=$@ $<",
|
"$(COMPILE.c) /obj=$@ $<",
|
||||||
|
".cc.ii",
|
||||||
|
"$(COMPILE.cc)/prep /list=$@ $<",
|
||||||
|
".cc.ss",
|
||||||
|
"$(COMPILE.cc)/noobj/machine /list=$@ $<",
|
||||||
|
".ii.ss",
|
||||||
|
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
|
||||||
".cc.obj",
|
".cc.obj",
|
||||||
"$(COMPILE.cc) /obj=$@ $<",
|
"$(COMPILE.cc) /obj=$@ $<",
|
||||||
|
".cxx.obj",
|
||||||
|
"$(COMPILE.cxx) /obj=$@ $<",
|
||||||
".for.obj",
|
".for.obj",
|
||||||
"$(COMPILE.for) /obj=$@ $<",
|
"$(COMPILE.for) /obj=$@ $<",
|
||||||
".pas.obj",
|
".pas.obj",
|
||||||
@@ -156,8 +186,12 @@ static char *default_suffix_rules[] =
|
|||||||
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
".C",
|
".C",
|
||||||
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".cpp",
|
||||||
|
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
".f",
|
".f",
|
||||||
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
|
".m",
|
||||||
|
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
".p",
|
".p",
|
||||||
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||||
".F",
|
".F",
|
||||||
@@ -178,19 +212,23 @@ static char *default_suffix_rules[] =
|
|||||||
".S.o",
|
".S.o",
|
||||||
"$(COMPILE.S) -o $@ $<",
|
"$(COMPILE.S) -o $@ $<",
|
||||||
".c.o",
|
".c.o",
|
||||||
"$(COMPILE.c) $< $(OUTPUT_OPTION)",
|
"$(COMPILE.c) $(OUTPUT_OPTION) $<",
|
||||||
".cc.o",
|
".cc.o",
|
||||||
"$(COMPILE.cc) $< $(OUTPUT_OPTION)",
|
"$(COMPILE.cc) $(OUTPUT_OPTION) $<",
|
||||||
".C.o",
|
".C.o",
|
||||||
"$(COMPILE.C) $< $(OUTPUT_OPTION)",
|
"$(COMPILE.C) $(OUTPUT_OPTION) $<",
|
||||||
|
".cpp.o",
|
||||||
|
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||||
".f.o",
|
".f.o",
|
||||||
"$(COMPILE.f) $< $(OUTPUT_OPTION)",
|
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||||
|
".m.o",
|
||||||
|
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||||
".p.o",
|
".p.o",
|
||||||
"$(COMPILE.p) $< $(OUTPUT_OPTION)",
|
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||||
".F.o",
|
".F.o",
|
||||||
"$(COMPILE.F) $< $(OUTPUT_OPTION)",
|
"$(COMPILE.F) $(OUTPUT_OPTION) $<",
|
||||||
".r.o",
|
".r.o",
|
||||||
"$(COMPILE.r) $< $(OUTPUT_OPTION)",
|
"$(COMPILE.r) $(OUTPUT_OPTION) $<",
|
||||||
".mod.o",
|
".mod.o",
|
||||||
"$(COMPILE.mod) -o $@ $<",
|
"$(COMPILE.mod) -o $@ $<",
|
||||||
|
|
||||||
@@ -213,15 +251,18 @@ static char *default_suffix_rules[] =
|
|||||||
#endif
|
#endif
|
||||||
".l.c",
|
".l.c",
|
||||||
"@$(RM) $@ \n $(LEX.l) $< > $@",
|
"@$(RM) $@ \n $(LEX.l) $< > $@",
|
||||||
|
".ym.m",
|
||||||
|
"$(YACC.m) $< \n mv -f y.tab.c $@",
|
||||||
|
".lm.m",
|
||||||
|
"@$(RM) $@ \n $(LEX.m) $< > $@",
|
||||||
|
|
||||||
".F.f",
|
".F.f",
|
||||||
"$(PREPROCESS.F) $< $(OUTPUT_OPTION)",
|
"$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
|
||||||
".r.f",
|
".r.f",
|
||||||
"$(PREPROCESS.r) $< $(OUTPUT_OPTION)",
|
"$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
|
||||||
|
|
||||||
/* This might actually make lex.yy.c if there's no %R%
|
/* This might actually make lex.yy.c if there's no %R% directive in $*.l,
|
||||||
directive in $*.l, but in that case why were you
|
but in that case why were you trying to make $*.r anyway? */
|
||||||
trying to make $*.r anyway? */
|
|
||||||
".l.r",
|
".l.r",
|
||||||
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
|
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
|
||||||
|
|
||||||
@@ -250,13 +291,13 @@ static char *default_suffix_rules[] =
|
|||||||
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
||||||
|
|
||||||
".w.c",
|
".w.c",
|
||||||
"$(CTANGLE) $< - $@", /* The `-' says there is no `.ch' file. */
|
"$(CTANGLE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||||
|
|
||||||
".web.p",
|
".web.p",
|
||||||
"$(TANGLE) $<",
|
"$(TANGLE) $<",
|
||||||
|
|
||||||
".w.tex",
|
".w.tex",
|
||||||
"$(CWEAVE) $< - $@", /* The `-' says there is no `.ch' file. */
|
"$(CWEAVE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||||
|
|
||||||
".web.tex",
|
".web.tex",
|
||||||
"$(WEAVE) $<",
|
"$(WEAVE) $<",
|
||||||
@@ -266,15 +307,38 @@ static char *default_suffix_rules[] =
|
|||||||
0, 0,
|
0, 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *default_variables[] =
|
static const char *default_variables[] =
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
#ifdef __ALPHA
|
||||||
|
"ARCH", "ALPHA",
|
||||||
|
#endif
|
||||||
|
#ifdef __ia64
|
||||||
|
"ARCH", "IA64",
|
||||||
|
#endif
|
||||||
|
#ifdef __VAX
|
||||||
|
"ARCH", "VAX",
|
||||||
|
#endif
|
||||||
"AR", "library/obj",
|
"AR", "library/obj",
|
||||||
"ARFLAGS", "/replace",
|
"ARFLAGS", "/replace",
|
||||||
"AS", "macro",
|
"AS", "macro",
|
||||||
|
"MACRO", "macro",
|
||||||
|
#ifdef GCC_IS_NATIVE
|
||||||
|
"CC", "gcc",
|
||||||
|
#else
|
||||||
"CC", "cc",
|
"CC", "cc",
|
||||||
|
#endif
|
||||||
|
"CD", "builtin_cd",
|
||||||
|
"MAKE", "make",
|
||||||
|
"ECHO", "write sys$$output \"",
|
||||||
|
#ifdef GCC_IS_NATIVE
|
||||||
"C++", "gcc/plus",
|
"C++", "gcc/plus",
|
||||||
"CXX", "gcc/plus",
|
"CXX", "gcc/plus",
|
||||||
|
#else
|
||||||
|
"C++", "cxx",
|
||||||
|
"CXX", "cxx",
|
||||||
|
"CXXLD", "cxxlink",
|
||||||
|
#endif
|
||||||
"CO", "co",
|
"CO", "co",
|
||||||
"CPP", "$(CC) /preprocess_only",
|
"CPP", "$(CC) /preprocess_only",
|
||||||
"FC", "fortran",
|
"FC", "fortran",
|
||||||
@@ -285,21 +349,43 @@ static char *default_variables[] =
|
|||||||
"LD", "link",
|
"LD", "link",
|
||||||
"LEX", "lex",
|
"LEX", "lex",
|
||||||
"PC", "pascal",
|
"PC", "pascal",
|
||||||
"YACC", "yacc", /* Or "bison -y" */
|
"YACC", "bison/yacc",
|
||||||
|
"YFLAGS", "/Define/Verbose",
|
||||||
|
"BISON", "bison",
|
||||||
"MAKEINFO", "makeinfo",
|
"MAKEINFO", "makeinfo",
|
||||||
"TEX", "tex",
|
"TEX", "tex",
|
||||||
"TEXINDEX", "texindex",
|
"TEXINDEX", "texindex",
|
||||||
|
|
||||||
"RM", "delete/nolog",
|
"RM", "delete/nolog",
|
||||||
|
|
||||||
|
"CSTARTUP", "",
|
||||||
|
#ifdef GCC_IS_NATIVE
|
||||||
|
"CRT0", ",sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj",
|
||||||
|
"CXXSTARTUP", "gnu_cc_library:crtbegin.obj",
|
||||||
|
"CXXRT0", ",sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crtend.obj,gnu_cc_library:gxx_main.obj",
|
||||||
|
"LXLIBS", ",gnu_cc_library:libstdcxx.olb/lib,gnu_cc_library:libgccplus.olb/lib",
|
||||||
|
"LDLIBS", ",gnu_cc_library:libgcc.olb/lib",
|
||||||
|
#else
|
||||||
|
"CRT0", "",
|
||||||
|
"CXXSTARTUP", "",
|
||||||
|
"CXXRT0", "",
|
||||||
|
"LXLIBS", "",
|
||||||
|
"LDLIBS", "",
|
||||||
|
#endif
|
||||||
|
|
||||||
"LINK.obj", "$(LD) $(LDFLAGS)",
|
"LINK.obj", "$(LD) $(LDFLAGS)",
|
||||||
|
#ifndef GCC_IS_NATIVE
|
||||||
|
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
||||||
|
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
#endif
|
||||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.cc", "$(C++) $(C++FLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||||
"LEX.l", "$(LEX) $(LFLAGS)",
|
"LEX.l", "$(LEX) $(LFLAGS)",
|
||||||
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.mar", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
||||||
|
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
||||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||||
|
|
||||||
"MV", "rename/new_version",
|
"MV", "rename/new_version",
|
||||||
@@ -312,19 +398,24 @@ static char *default_variables[] =
|
|||||||
"AS", "as",
|
"AS", "as",
|
||||||
#ifdef GCC_IS_NATIVE
|
#ifdef GCC_IS_NATIVE
|
||||||
"CC", "gcc",
|
"CC", "gcc",
|
||||||
|
# ifdef __MSDOS__
|
||||||
|
"CXX", "gpp", /* g++ is an invalid name on MSDOS */
|
||||||
|
# else
|
||||||
"CXX", "gcc",
|
"CXX", "gcc",
|
||||||
|
# endif /* __MSDOS__ */
|
||||||
|
"OBJC", "gcc",
|
||||||
#else
|
#else
|
||||||
"CC", "cc",
|
"CC", "cc",
|
||||||
"CXX", "g++",
|
"CXX", "g++",
|
||||||
|
"OBJC", "cc",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
||||||
and to the empty string if $@ does exist. */
|
and to the empty string if $@ does exist. */
|
||||||
"CHECKOUT,v",
|
"CHECKOUT,v", "+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
|
||||||
"+$(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@,\
|
|
||||||
$(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))",
|
|
||||||
|
|
||||||
"CO", "co",
|
"CO", "co",
|
||||||
|
"COFLAGS", "",
|
||||||
|
|
||||||
"CPP", "$(CC) -E",
|
"CPP", "$(CC) -E",
|
||||||
#ifdef CRAY
|
#ifdef CRAY
|
||||||
"CF77PPFLAGS", "-P",
|
"CF77PPFLAGS", "-P",
|
||||||
@@ -384,12 +475,18 @@ static char *default_variables[] =
|
|||||||
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
|
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
|
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
"COMPILE.C", "$(COMPILE.cc)",
|
"COMPILE.C", "$(COMPILE.cc)",
|
||||||
|
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||||
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"LINK.C", "$(LINK.cc)",
|
"LINK.C", "$(LINK.cc)",
|
||||||
|
"LINK.cpp", "$(LINK.cc)",
|
||||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||||
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
||||||
|
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||||
|
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||||
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||||
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||||
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||||
@@ -417,6 +514,16 @@ static char *default_variables[] =
|
|||||||
"SCCS_OUTPUT_OPTION", "-G$@",
|
"SCCS_OUTPUT_OPTION", "-G$@",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_AMIGA)
|
||||||
|
".LIBPATTERNS", "%.lib",
|
||||||
|
#elif defined(__MSDOS__)
|
||||||
|
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
".LIBPATTERNS", "lib%.dylib lib%.a",
|
||||||
|
#else
|
||||||
|
".LIBPATTERNS", "lib%.so lib%.a",
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !VMS */
|
#endif /* !VMS */
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
@@ -424,45 +531,46 @@ static char *default_variables[] =
|
|||||||
/* Set up the default .SUFFIXES list. */
|
/* Set up the default .SUFFIXES list. */
|
||||||
|
|
||||||
void
|
void
|
||||||
set_default_suffixes ()
|
set_default_suffixes (void)
|
||||||
{
|
{
|
||||||
suffix_file = enter_file (".SUFFIXES");
|
suffix_file = enter_file (strcache_add (".SUFFIXES"));
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
(void) define_variable ("SUFFIXES", 8, "", o_default, 0);
|
define_variable_cname ("SUFFIXES", "", o_default, 0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *p = default_suffixes;
|
char *p = default_suffixes;
|
||||||
suffix_file->deps = (struct dep *)
|
suffix_file->deps = enter_prereqs(PARSE_FILE_SEQ (&p, struct dep, '\0',
|
||||||
multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1),
|
NULL, 0),
|
||||||
sizeof (struct dep));
|
NULL);
|
||||||
(void) define_variable ("SUFFIXES", 8, default_suffixes, o_default, 0);
|
define_variable_cname ("SUFFIXES", default_suffixes, o_default, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enter the default suffix rules as file rules. This used to be done in
|
/* Enter the default suffix rules as file rules. This used to be done in
|
||||||
install_default_implicit_rules, but that loses because we want the
|
install_default_implicit_rules, but that loses because we want the
|
||||||
suffix rules installed before reading makefiles, and thee pattern rules
|
suffix rules installed before reading makefiles, and the pattern rules
|
||||||
installed after. */
|
installed after. */
|
||||||
|
|
||||||
void
|
void
|
||||||
install_default_suffix_rules ()
|
install_default_suffix_rules (void)
|
||||||
{
|
{
|
||||||
register char **s;
|
char **s;
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (s = default_suffix_rules; *s != 0; s += 2)
|
for (s = default_suffix_rules; *s != 0; s += 2)
|
||||||
{
|
{
|
||||||
register struct file *f = enter_file (s[0]);
|
struct file *f = enter_file (strcache_add (s[0]));
|
||||||
/* Don't clobber cmds given in a makefile if there were any. */
|
/* Don't clobber cmds given in a makefile if there were any. */
|
||||||
if (f->cmds == 0)
|
if (f->cmds == 0)
|
||||||
{
|
{
|
||||||
f->cmds = (struct commands *) xmalloc (sizeof (struct commands));
|
f->cmds = xmalloc (sizeof (struct commands));
|
||||||
f->cmds->filename = 0;
|
f->cmds->fileinfo.filenm = 0;
|
||||||
f->cmds->commands = s[1];
|
f->cmds->commands = s[1];
|
||||||
f->cmds->command_lines = 0;
|
f->cmds->command_lines = 0;
|
||||||
|
f->cmds->recipe_prefix = RECIPEPREFIX_DEFAULT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -471,9 +579,9 @@ install_default_suffix_rules ()
|
|||||||
/* Install the default pattern rules. */
|
/* Install the default pattern rules. */
|
||||||
|
|
||||||
void
|
void
|
||||||
install_default_implicit_rules ()
|
install_default_implicit_rules (void)
|
||||||
{
|
{
|
||||||
register struct pspec *p;
|
struct pspec *p;
|
||||||
|
|
||||||
if (no_builtin_rules_flag)
|
if (no_builtin_rules_flag)
|
||||||
return;
|
return;
|
||||||
@@ -486,10 +594,13 @@ install_default_implicit_rules ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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)
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
92
dep.h
92
dep.h
@@ -1,33 +1,47 @@
|
|||||||
/* Definitions of dependency data structures for GNU Make.
|
/* Definitions of dependency data structures for GNU Make.
|
||||||
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
/* Flag bits for the second argument to 'read_makefile'.
|
||||||
|
These flags are saved in the 'changed' field of each
|
||||||
|
'struct dep' in the chain returned by 'read_all_makefiles'. */
|
||||||
|
|
||||||
|
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
||||||
|
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||||
|
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
||||||
|
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
||||||
|
#define RM_NOFLAG 0
|
||||||
|
|
||||||
/* Structure representing one dependency of a file.
|
/* Structure representing one dependency of a file.
|
||||||
Each struct file's `deps' points to a chain of these,
|
Each struct file's 'deps' points to a chain of these,
|
||||||
chained through the `next'.
|
chained through the 'next'. 'stem' is the stem for this
|
||||||
|
dep line of static pattern rule or NULL.
|
||||||
|
|
||||||
Note that the first two words of this match a struct nameseq. */
|
Note that the first two words of this match a struct nameseq. */
|
||||||
|
|
||||||
struct dep
|
struct dep
|
||||||
{
|
{
|
||||||
struct dep *next;
|
struct dep *next;
|
||||||
char *name;
|
const char *name;
|
||||||
|
const char *stem;
|
||||||
struct file *file;
|
struct file *file;
|
||||||
int changed;
|
unsigned int changed : 8;
|
||||||
|
unsigned int ignore_mtime : 1;
|
||||||
|
unsigned int staticpattern : 1;
|
||||||
|
unsigned int need_2nd_expansion : 1;
|
||||||
|
unsigned int dontcare : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -36,36 +50,42 @@ struct dep
|
|||||||
struct nameseq
|
struct nameseq
|
||||||
{
|
{
|
||||||
struct nameseq *next;
|
struct nameseq *next;
|
||||||
char *name;
|
const char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern struct nameseq *multi_glob PARAMS ((struct nameseq *chain, unsigned int size));
|
#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))
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
extern struct nameseq *parse_file_seq ();
|
void *parse_file_seq ();
|
||||||
#else
|
#else
|
||||||
extern struct nameseq *parse_file_seq PARAMS ((char **stringp, int stopchar, unsigned int size, int strip));
|
void *parse_file_seq (char **stringp, unsigned int size,
|
||||||
|
int stopchar, const char *prefix, int flags);
|
||||||
#endif
|
#endif
|
||||||
extern char *tilde_expand PARAMS ((char *name));
|
|
||||||
|
char *tilde_expand (const char *name);
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
extern struct nameseq *ar_glob PARAMS ((char *arname, char *member_pattern, unsigned int size));
|
struct nameseq *ar_glob (const char *arname, const char *member_pattern, unsigned int size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef iAPX286
|
|
||||||
#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
|
#define dep_name(d) ((d)->name == 0 ? (d)->file->name : (d)->name)
|
||||||
#else
|
|
||||||
/* Buggy compiler can't hack this. */
|
|
||||||
extern char *dep_name ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern struct dep *read_all_makefiles PARAMS ((char **makefiles));
|
#define alloc_dep() (xcalloc (sizeof (struct dep)))
|
||||||
|
#define free_ns(_n) free (_n)
|
||||||
|
#define free_dep(_d) free_ns (_d)
|
||||||
|
|
||||||
/* Flag bits for the second argument to `read_makefile'.
|
struct dep *copy_dep_chain (const struct dep *d);
|
||||||
These flags are saved in the `changed' field of each
|
void free_dep_chain (struct dep *d);
|
||||||
`struct dep' in the chain returned by `read_all_makefiles'. */
|
void free_ns_chain (struct nameseq *n);
|
||||||
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
struct dep *read_all_makefiles (const char **makefiles);
|
||||||
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
void eval_buffer (char *buffer);
|
||||||
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
int update_goal_chain (struct dep *goals);
|
||||||
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
|
||||||
#define RM_NOFLAG 0
|
|
||||||
|
|||||||
8
doc/.cvsignore
Normal file
8
doc/.cvsignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Makefile Makefile.in
|
||||||
|
version.texi 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
|
||||||
|
stamp-vti
|
||||||
35
doc/Makefile.am
Normal file
35
doc/Makefile.am
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# -*-Makefile-*-, or close enough
|
||||||
|
# Copyright (C) 2000-2012 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
TEXI2HTML = texi2html
|
||||||
|
TEXI2HTML_FLAGS = -split_chapter
|
||||||
|
|
||||||
|
info_TEXINFOS = make.texi
|
||||||
|
make_TEXINFOS = fdl.texi make-stds.texi
|
||||||
|
|
||||||
|
CLEANFILES = make*.html
|
||||||
|
|
||||||
|
## ----------------------------- ##
|
||||||
|
## Other documentation formats. ##
|
||||||
|
## ----------------------------- ##
|
||||||
|
|
||||||
|
html: make_1.html
|
||||||
|
|
||||||
|
make_1.html: $(info_TEXINFOS) $(make_TEXINFOS)
|
||||||
|
$(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/make.texi
|
||||||
|
|
||||||
|
.PHONY: html
|
||||||
File diff suppressed because it is too large
Load Diff
64
dosbuild.bat
Normal file
64
dosbuild.bat
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
@echo off
|
||||||
|
rem Copyright (C) 1998-2012 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 job.c -o job.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g dir.c -o dir.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g file.c -o file.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g misc.c -o misc.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g main.c -o main.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DINCLUDEDIR=\"c:/djgpp/include\" -O2 -g read.c -o read.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -DLIBDIR=\"c:/djgpp/lib\" -O2 -g remake.c -o remake.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g rule.c -o rule.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g implicit.c -o implicit.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g default.c -o default.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g hash.c -o hash.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g strcache.c -o strcache.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g signame.c -o signame.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g remote-stub.c -o remote-stub.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt.c -o getopt.o
|
||||||
|
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g getopt1.c -o getopt1.o
|
||||||
|
@cd glob
|
||||||
|
@if exist libglob.a del libglob.a
|
||||||
|
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g glob.c -o glob.o
|
||||||
|
gcc -I. -c -DHAVE_CONFIG_H -I.. -O2 -g fnmatch.c -o fnmatch.o
|
||||||
|
ar rv libglob.a glob.o fnmatch.o
|
||||||
|
@echo off
|
||||||
|
cd ..
|
||||||
|
echo commands.o > respf.$$$
|
||||||
|
for %%f in (job dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
|
||||||
|
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
|
||||||
|
echo glob/libglob.a >> respf.$$$
|
||||||
|
rem gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g guile.c -o guile.o
|
||||||
|
rem echo guile.o >> respf.$$$
|
||||||
|
@echo Linking...
|
||||||
|
@echo on
|
||||||
|
gcc -o make.new @respf.$$$
|
||||||
|
@if exist make.exe echo Make.exe is now built!
|
||||||
|
@if not exist make.exe echo Make.exe build failed...
|
||||||
|
@if exist make.exe del respf.$$$
|
||||||
499
expand.c
499
expand.c
@@ -1,35 +1,49 @@
|
|||||||
/* Variable expansion functions for GNU Make.
|
/* Variable expansion functions for GNU Make.
|
||||||
Copyright (C) 1988, 89, 91, 92, 93, 95 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
#include "make.h"
|
#include "make.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "filedef.h"
|
#include "filedef.h"
|
||||||
#include "job.h"
|
#include "job.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
|
#include "rule.h"
|
||||||
|
|
||||||
|
/* Initially, any errors reported when expanding strings will be reported
|
||||||
|
against the file where the error appears. */
|
||||||
|
const struct floc **expanding_var = &reading_file;
|
||||||
|
|
||||||
/* The next two describe the variable output buffer.
|
/* The next two describe the variable output buffer.
|
||||||
This buffer is used to hold the variable-expansion of a line of the
|
This buffer is used to hold the variable-expansion of a line of the
|
||||||
makefile. It is made bigger with realloc whenever it is too small.
|
makefile. It is made bigger with realloc whenever it is too small.
|
||||||
variable_buffer_length is the size currently allocated.
|
variable_buffer_length is the size currently allocated.
|
||||||
variable_buffer is the address of the buffer. */
|
variable_buffer is the address of the buffer.
|
||||||
|
|
||||||
|
For efficiency, it's guaranteed that the buffer will always have
|
||||||
|
VARIABLE_BUFFER_ZONE extra bytes allocated. This allows you to add a few
|
||||||
|
extra chars without having to call a function. Note you should never use
|
||||||
|
these bytes unless you're _sure_ you have room (you know when the buffer
|
||||||
|
length was last checked. */
|
||||||
|
|
||||||
|
#define VARIABLE_BUFFER_ZONE 5
|
||||||
|
|
||||||
static unsigned int variable_buffer_length;
|
static unsigned int variable_buffer_length;
|
||||||
static char *variable_buffer;
|
char *variable_buffer;
|
||||||
|
|
||||||
/* Subroutine of variable_expand and friends:
|
/* Subroutine of variable_expand and friends:
|
||||||
The text to add is LENGTH chars starting at STRING to the variable_buffer.
|
The text to add is LENGTH chars starting at STRING to the variable_buffer.
|
||||||
@@ -39,38 +53,35 @@ static char *variable_buffer;
|
|||||||
the following call. */
|
the following call. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
variable_buffer_output (ptr, string, length)
|
variable_buffer_output (char *ptr, const char *string, unsigned int length)
|
||||||
char *ptr, *string;
|
|
||||||
unsigned int length;
|
|
||||||
{
|
{
|
||||||
register unsigned int newlen = length + (ptr - variable_buffer);
|
register unsigned int newlen = length + (ptr - variable_buffer);
|
||||||
|
|
||||||
if (newlen > variable_buffer_length)
|
if ((newlen + VARIABLE_BUFFER_ZONE) > variable_buffer_length)
|
||||||
{
|
{
|
||||||
unsigned int offset = ptr - variable_buffer;
|
unsigned int offset = ptr - variable_buffer;
|
||||||
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
||||||
? newlen + 100
|
? newlen + 100
|
||||||
: 2 * variable_buffer_length);
|
: 2 * variable_buffer_length);
|
||||||
variable_buffer = (char *) xrealloc (variable_buffer,
|
variable_buffer = xrealloc (variable_buffer, variable_buffer_length);
|
||||||
variable_buffer_length);
|
|
||||||
ptr = variable_buffer + offset;
|
ptr = variable_buffer + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
bcopy (string, ptr, length);
|
memcpy (ptr, string, length);
|
||||||
return ptr + length;
|
return ptr + length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a pointer to the beginning of the variable buffer. */
|
/* Return a pointer to the beginning of the variable buffer. */
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
initialize_variable_output ()
|
initialize_variable_output (void)
|
||||||
{
|
{
|
||||||
/* If we don't have a variable output buffer yet, get one. */
|
/* If we don't have a variable output buffer yet, get one. */
|
||||||
|
|
||||||
if (variable_buffer == 0)
|
if (variable_buffer == 0)
|
||||||
{
|
{
|
||||||
variable_buffer_length = 200;
|
variable_buffer_length = 200;
|
||||||
variable_buffer = (char *) xmalloc (variable_buffer_length);
|
variable_buffer = xmalloc (variable_buffer_length);
|
||||||
variable_buffer[0] = '\0';
|
variable_buffer[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,94 +90,131 @@ initialize_variable_output ()
|
|||||||
|
|
||||||
/* Recursively expand V. The returned string is malloc'd. */
|
/* Recursively expand V. The returned string is malloc'd. */
|
||||||
|
|
||||||
|
static char *allocated_variable_append (const struct variable *v);
|
||||||
|
|
||||||
char *
|
char *
|
||||||
recursively_expand (v)
|
recursively_expand_for_file (struct variable *v, struct file *file)
|
||||||
register struct variable *v;
|
|
||||||
{
|
{
|
||||||
char *value;
|
char *value;
|
||||||
|
const struct floc *this_var;
|
||||||
|
const struct 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->expanding)
|
||||||
{
|
{
|
||||||
|
if (!v->exp_count)
|
||||||
/* Expanding V causes infinite recursion. Lose. */
|
/* Expanding V causes infinite recursion. Lose. */
|
||||||
if (reading_filename == 0)
|
fatal (*expanding_var,
|
||||||
fatal ("Recursive variable `%s' references itself (eventually)",
|
_("Recursive variable '%s' references itself (eventually)"),
|
||||||
v->name);
|
|
||||||
else
|
|
||||||
makefile_fatal
|
|
||||||
(reading_filename, *reading_lineno_ptr,
|
|
||||||
"Recursive variable `%s' references itself (eventually)",
|
|
||||||
v->name);
|
v->name);
|
||||||
|
--v->exp_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
save = current_variable_set_list;
|
||||||
|
current_variable_set_list = file->variables;
|
||||||
}
|
}
|
||||||
|
|
||||||
v->expanding = 1;
|
v->expanding = 1;
|
||||||
|
if (v->append)
|
||||||
|
value = allocated_variable_append (v);
|
||||||
|
else
|
||||||
value = allocated_variable_expand (v->value);
|
value = allocated_variable_expand (v->value);
|
||||||
v->expanding = 0;
|
v->expanding = 0;
|
||||||
|
|
||||||
|
if (set_reading)
|
||||||
|
reading_file = 0;
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
current_variable_set_list = save;
|
||||||
|
|
||||||
|
expanding_var = saved_varp;
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Warn that NAME is an undefined variable. */
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__inline
|
|
||||||
#endif
|
|
||||||
static void
|
|
||||||
warn_undefined (name, length)
|
|
||||||
char *name;
|
|
||||||
unsigned int length;
|
|
||||||
{
|
|
||||||
if (warn_undefined_variables_flag)
|
|
||||||
{
|
|
||||||
static const char warnmsg[] = "warning: undefined variable `%.*s'";
|
|
||||||
if (reading_filename != 0)
|
|
||||||
makefile_error (reading_filename, *reading_lineno_ptr,
|
|
||||||
warnmsg, length, name);
|
|
||||||
else
|
|
||||||
error (warnmsg, length, name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Expand a simple reference to variable NAME, which is LENGTH chars long. */
|
/* Expand a simple reference to variable NAME, which is LENGTH chars long. */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__inline
|
__inline
|
||||||
#endif
|
#endif
|
||||||
static char *
|
static char *
|
||||||
reference_variable (o, name, length)
|
reference_variable (char *o, const char *name, unsigned int length)
|
||||||
char *o;
|
|
||||||
char *name;
|
|
||||||
unsigned int length;
|
|
||||||
{
|
{
|
||||||
register struct variable *v = lookup_variable (name, length);
|
struct variable *v;
|
||||||
|
char *value;
|
||||||
|
|
||||||
|
v = lookup_variable (name, length);
|
||||||
|
|
||||||
if (v == 0)
|
if (v == 0)
|
||||||
warn_undefined (name, length);
|
warn_undefined (name, length);
|
||||||
|
|
||||||
if (v != 0 && *v->value != '\0')
|
/* If there's no variable by that name or it has no value, stop now. */
|
||||||
{
|
if (v == 0 || (*v->value == '\0' && !v->append))
|
||||||
char *value = (v->recursive ? recursively_expand (v) : v->value);
|
return o;
|
||||||
|
|
||||||
|
value = (v->recursive ? recursively_expand (v) : v->value);
|
||||||
|
|
||||||
o = variable_buffer_output (o, value, strlen (value));
|
o = variable_buffer_output (o, value, strlen (value));
|
||||||
|
|
||||||
if (v->recursive)
|
if (v->recursive)
|
||||||
free (value);
|
free (value);
|
||||||
}
|
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan LINE for variable references and expansion-function calls.
|
/* Scan STRING for variable references and expansion-function calls. Only
|
||||||
Build in `variable_buffer' the result of expanding the references and calls.
|
LENGTH bytes of STRING are actually scanned. If LENGTH is -1, scan until
|
||||||
Return the address of the resulting string, which is null-terminated
|
a null byte is found.
|
||||||
and is valid only until the next time this function is called. */
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
char *
|
char *
|
||||||
variable_expand (line)
|
variable_expand_string (char *line, const char *string, long length)
|
||||||
register char *line;
|
|
||||||
{
|
{
|
||||||
register struct variable *v;
|
struct variable *v;
|
||||||
register char *p, *o, *p1;
|
const char *p, *p1;
|
||||||
|
char *save;
|
||||||
|
char *o;
|
||||||
|
unsigned int line_offset;
|
||||||
|
|
||||||
p = line;
|
if (!line)
|
||||||
o = initialize_variable_output ();
|
line = initialize_variable_output();
|
||||||
|
o = line;
|
||||||
|
line_offset = line - variable_buffer;
|
||||||
|
|
||||||
|
if (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)
|
while (1)
|
||||||
{
|
{
|
||||||
@@ -174,9 +222,9 @@ variable_expand (line)
|
|||||||
variable output buffer, and skip them. Uninteresting chars end
|
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 = index (p, '$');
|
p1 = strchr (p, '$');
|
||||||
|
|
||||||
o = variable_buffer_output (o, p, p1 != 0 ? p1 - p : strlen (p) + 1);
|
o = variable_buffer_output (o, p, p1 != 0 ? (unsigned int)(p1 - p) : strlen (p) + 1);
|
||||||
|
|
||||||
if (p1 == 0)
|
if (p1 == 0)
|
||||||
break;
|
break;
|
||||||
@@ -197,10 +245,11 @@ variable_expand (line)
|
|||||||
{
|
{
|
||||||
char openparen = *p;
|
char openparen = *p;
|
||||||
char closeparen = (openparen == '(') ? ')' : '}';
|
char closeparen = (openparen == '(') ? ')' : '}';
|
||||||
register char *beg = p + 1;
|
const char *begp;
|
||||||
int free_beg = 0;
|
const char *beg = p + 1;
|
||||||
char *op, *begp;
|
char *op;
|
||||||
char *end, *colon;
|
char *abeg = NULL;
|
||||||
|
const char *end, *colon;
|
||||||
|
|
||||||
op = o;
|
op = o;
|
||||||
begp = p;
|
begp = p;
|
||||||
@@ -214,16 +263,10 @@ variable_expand (line)
|
|||||||
/* Is there a variable reference inside the parens or braces?
|
/* Is there a variable reference inside the parens or braces?
|
||||||
If so, expand it before expanding the entire reference. */
|
If so, expand it before expanding the entire reference. */
|
||||||
|
|
||||||
end = index (beg, closeparen);
|
end = strchr (beg, closeparen);
|
||||||
if (end == 0)
|
if (end == 0)
|
||||||
{
|
|
||||||
/* Unterminated variable reference. */
|
/* Unterminated variable reference. */
|
||||||
if (reading_filename != 0)
|
fatal (*expanding_var, _("unterminated variable reference"));
|
||||||
makefile_fatal (reading_filename, *reading_lineno_ptr,
|
|
||||||
"unterminated variable reference");
|
|
||||||
else
|
|
||||||
fatal ("unterminated variable reference");
|
|
||||||
}
|
|
||||||
p1 = lindex (beg, end, '$');
|
p1 = lindex (beg, end, '$');
|
||||||
if (p1 != 0)
|
if (p1 != 0)
|
||||||
{
|
{
|
||||||
@@ -239,12 +282,12 @@ variable_expand (line)
|
|||||||
}
|
}
|
||||||
/* If COUNT is >= 0, there were unmatched opening parens
|
/* If COUNT is >= 0, there were unmatched opening parens
|
||||||
or braces, so we go to the simple case of a variable name
|
or braces, so we go to the simple case of a variable name
|
||||||
such as `$($(a)'. */
|
such as '$($(a)'. */
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
{
|
{
|
||||||
beg = expand_argument (beg, p); /* Expand the name. */
|
abeg = expand_argument (beg, p); /* Expand the name. */
|
||||||
free_beg = 1; /* Remember to free BEG when finished. */
|
beg = abeg;
|
||||||
end = index (beg, '\0');
|
end = strchr (beg, '\0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -258,13 +301,13 @@ variable_expand (line)
|
|||||||
Is the resultant text a substitution reference? */
|
Is the resultant text a substitution reference? */
|
||||||
|
|
||||||
colon = lindex (beg, end, ':');
|
colon = lindex (beg, end, ':');
|
||||||
if (colon != 0)
|
if (colon)
|
||||||
{
|
{
|
||||||
/* This looks like a substitution reference: $(FOO:A=B). */
|
/* This looks like a substitution reference: $(FOO:A=B). */
|
||||||
char *subst_beg, *subst_end, *replace_beg, *replace_end;
|
const char *subst_beg, *subst_end, *replace_beg, *replace_end;
|
||||||
|
|
||||||
subst_beg = colon + 1;
|
subst_beg = colon + 1;
|
||||||
subst_end = index (subst_beg, '=');
|
subst_end = lindex (subst_beg, end, '=');
|
||||||
if (subst_end == 0)
|
if (subst_end == 0)
|
||||||
/* There is no = in sight. Punt on the substitution
|
/* There is no = in sight. Punt on the substitution
|
||||||
reference and treat this as a variable name containing
|
reference and treat this as a variable name containing
|
||||||
@@ -281,51 +324,50 @@ variable_expand (line)
|
|||||||
if (v == 0)
|
if (v == 0)
|
||||||
warn_undefined (beg, colon - beg);
|
warn_undefined (beg, colon - beg);
|
||||||
|
|
||||||
|
/* If the variable is not empty, perform the
|
||||||
|
substitution. */
|
||||||
if (v != 0 && *v->value != '\0')
|
if (v != 0 && *v->value != '\0')
|
||||||
{
|
{
|
||||||
char *value = (v->recursive ? recursively_expand (v)
|
char *pattern, *replace, *ppercent, *rpercent;
|
||||||
|
char *value = (v->recursive
|
||||||
|
? recursively_expand (v)
|
||||||
: v->value);
|
: v->value);
|
||||||
char *pattern, *percent;
|
|
||||||
if (free_beg)
|
/* Copy the pattern and the replacement. Add in an
|
||||||
{
|
extra % at the beginning to use in case there
|
||||||
*subst_end = '\0';
|
isn't one in the pattern. */
|
||||||
pattern = subst_beg;
|
pattern = alloca (subst_end - subst_beg + 2);
|
||||||
}
|
*(pattern++) = '%';
|
||||||
else
|
memcpy (pattern, subst_beg, subst_end - subst_beg);
|
||||||
{
|
|
||||||
pattern = (char *) alloca (subst_end - subst_beg
|
|
||||||
+ 1);
|
|
||||||
bcopy (subst_beg, pattern, subst_end - subst_beg);
|
|
||||||
pattern[subst_end - subst_beg] = '\0';
|
pattern[subst_end - subst_beg] = '\0';
|
||||||
}
|
|
||||||
percent = find_percent (pattern);
|
replace = alloca (replace_end - replace_beg + 2);
|
||||||
if (percent != 0)
|
*(replace++) = '%';
|
||||||
{
|
memcpy (replace, replace_beg,
|
||||||
char *replace;
|
|
||||||
if (free_beg)
|
|
||||||
{
|
|
||||||
*replace_end = '\0';
|
|
||||||
replace = replace_beg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
replace = (char *) alloca (replace_end
|
|
||||||
- replace_beg
|
|
||||||
+ 1);
|
|
||||||
bcopy (replace_beg, replace,
|
|
||||||
replace_end - replace_beg);
|
replace_end - replace_beg);
|
||||||
replace[replace_end - replace_beg] = '\0';
|
replace[replace_end - replace_beg] = '\0';
|
||||||
}
|
|
||||||
|
|
||||||
o = patsubst_expand (o, value, pattern, replace,
|
/* Look for %. Set the percent pointers properly
|
||||||
percent, (char *) 0);
|
based on whether we find one or not. */
|
||||||
|
ppercent = find_percent (pattern);
|
||||||
|
if (ppercent)
|
||||||
|
{
|
||||||
|
++ppercent;
|
||||||
|
rpercent = find_percent (replace);
|
||||||
|
if (rpercent)
|
||||||
|
++rpercent;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
o = subst_expand (o, value,
|
{
|
||||||
pattern, replace_beg,
|
ppercent = pattern;
|
||||||
strlen (pattern),
|
rpercent = replace;
|
||||||
end - replace_beg,
|
--pattern;
|
||||||
0, 1);
|
--replace;
|
||||||
|
}
|
||||||
|
|
||||||
|
o = patsubst_expand_pat (o, value, pattern, replace,
|
||||||
|
ppercent, rpercent);
|
||||||
|
|
||||||
if (v->recursive)
|
if (v->recursive)
|
||||||
free (value);
|
free (value);
|
||||||
}
|
}
|
||||||
@@ -337,8 +379,8 @@ variable_expand (line)
|
|||||||
Look up the value of the variable. */
|
Look up the value of the variable. */
|
||||||
o = reference_variable (o, beg, end - beg);
|
o = reference_variable (o, beg, end - beg);
|
||||||
|
|
||||||
if (free_beg)
|
if (abeg)
|
||||||
free (beg);
|
free (abeg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -346,95 +388,176 @@ variable_expand (line)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (isblank (p[-1]))
|
if (isblank ((unsigned char)p[-1]))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* A $ followed by a random char is a variable reference:
|
/* A $ followed by a random char is a variable reference:
|
||||||
$a is equivalent to $(a). */
|
$a is equivalent to $(a). */
|
||||||
{
|
o = reference_variable (o, p, 1);
|
||||||
/* We could do the expanding here, but this way
|
|
||||||
avoids code repetition at a small performance cost. */
|
|
||||||
char name[5];
|
|
||||||
name[0] = '$';
|
|
||||||
name[1] = '(';
|
|
||||||
name[2] = *p;
|
|
||||||
name[3] = ')';
|
|
||||||
name[4] = '\0';
|
|
||||||
p1 = allocated_variable_expand (name);
|
|
||||||
o = variable_buffer_output (o, p1, strlen (p1));
|
|
||||||
free (p1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
break;
|
break;
|
||||||
else
|
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) variable_buffer_output (o, "", 1);
|
free (save);
|
||||||
return initialize_variable_output ();
|
|
||||||
|
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.
|
||||||
|
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 (const char *line)
|
||||||
|
{
|
||||||
|
return variable_expand_string(NULL, line, (long)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand an argument for an expansion function.
|
/* Expand an argument for an expansion function.
|
||||||
The text starting at STR and ending at END is variable-expanded
|
The text starting at STR and ending at END is variable-expanded
|
||||||
into a null-terminated string that is returned as the value.
|
into a null-terminated string that is returned as the value.
|
||||||
This is done without clobbering `variable_buffer' or the current
|
This is done without clobbering 'variable_buffer' or the current
|
||||||
variable-expansion that is in progress. */
|
variable-expansion that is in progress. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
expand_argument (str, end)
|
expand_argument (const char *str, const char *end)
|
||||||
char *str, *end;
|
|
||||||
{
|
{
|
||||||
char *tmp;
|
char *tmp, *alloc = NULL;
|
||||||
|
char *r;
|
||||||
|
|
||||||
if (*end == '\0')
|
if (str == end)
|
||||||
tmp = str;
|
return xstrdup("");
|
||||||
|
|
||||||
|
if (!end || *end == '\0')
|
||||||
|
return allocated_variable_expand (str);
|
||||||
|
|
||||||
|
if (end - str + 1 > 1000)
|
||||||
|
tmp = alloc = xmalloc (end - str + 1);
|
||||||
else
|
else
|
||||||
{
|
tmp = alloca (end - str + 1);
|
||||||
tmp = (char *) alloca (end - str + 1);
|
|
||||||
bcopy (str, tmp, end - str);
|
|
||||||
tmp[end - str] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
return allocated_variable_expand (tmp);
|
memcpy (tmp, str, end - str);
|
||||||
|
tmp[end - str] = '\0';
|
||||||
|
|
||||||
|
r = allocated_variable_expand (tmp);
|
||||||
|
|
||||||
|
if (alloc)
|
||||||
|
free (alloc);
|
||||||
|
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand LINE for FILE. Error messages refer to the file and line where
|
/* Expand LINE for FILE. Error messages refer to the file and line where
|
||||||
FILE's commands were found. Expansion uses FILE's variable set list. */
|
FILE's commands were found. Expansion uses FILE's variable set list. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
variable_expand_for_file (line, file)
|
variable_expand_for_file (const char *line, struct file *file)
|
||||||
char *line;
|
|
||||||
register struct file *file;
|
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
struct variable_set_list *save;
|
struct variable_set_list *savev;
|
||||||
|
const struct floc *savef;
|
||||||
|
|
||||||
if (file == 0)
|
if (file == 0)
|
||||||
return variable_expand (line);
|
return variable_expand (line);
|
||||||
|
|
||||||
save = current_variable_set_list;
|
savev = current_variable_set_list;
|
||||||
current_variable_set_list = file->variables;
|
current_variable_set_list = file->variables;
|
||||||
reading_filename = file->cmds->filename;
|
|
||||||
reading_lineno_ptr = &file->cmds->lineno;
|
savef = reading_file;
|
||||||
|
if (file->cmds && file->cmds->fileinfo.filenm)
|
||||||
|
reading_file = &file->cmds->fileinfo;
|
||||||
|
else
|
||||||
|
reading_file = 0;
|
||||||
|
|
||||||
result = variable_expand (line);
|
result = variable_expand (line);
|
||||||
current_variable_set_list = save;
|
|
||||||
reading_filename = 0;
|
current_variable_set_list = savev;
|
||||||
reading_lineno_ptr = 0;
|
reading_file = savef;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Like allocated_variable_expand, but for += target-specific variables.
|
||||||
|
First recursively construct the variable value from its appended parts in
|
||||||
|
any upper variable sets. Then expand the resulting value. */
|
||||||
|
|
||||||
|
static char *
|
||||||
|
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)
|
||||||
|
return initialize_variable_output ();
|
||||||
|
|
||||||
|
/* Try to find the variable in this variable set. */
|
||||||
|
v = lookup_variable_in_set (name, length, set->set);
|
||||||
|
|
||||||
|
/* If there isn't one, or this one is private, try the set above us. */
|
||||||
|
if (!v || (!local && v->private_var))
|
||||||
|
return variable_append (name, length, set->next, nextlocal);
|
||||||
|
|
||||||
|
/* If this variable type is append, first get any upper values.
|
||||||
|
If not, initialize the buffer. */
|
||||||
|
if (v->append)
|
||||||
|
buf = variable_append (name, length, set->next, nextlocal);
|
||||||
|
else
|
||||||
|
buf = initialize_variable_output ();
|
||||||
|
|
||||||
|
/* Append this value to the buffer, and return it.
|
||||||
|
If we already have a value, first add a space. */
|
||||||
|
if (buf > variable_buffer)
|
||||||
|
buf = variable_buffer_output (buf, " ", 1);
|
||||||
|
|
||||||
|
/* Either expand it or copy it, depending. */
|
||||||
|
if (! v->recursive)
|
||||||
|
return variable_buffer_output (buf, v->value, strlen (v->value));
|
||||||
|
|
||||||
|
buf = variable_expand_string (buf, v->value, strlen (v->value));
|
||||||
|
return (buf + strlen (buf));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static char *
|
||||||
|
allocated_variable_append (const struct variable *v)
|
||||||
|
{
|
||||||
|
char *val;
|
||||||
|
|
||||||
|
/* Construct the appended variable value. */
|
||||||
|
|
||||||
|
char *obuf = variable_buffer;
|
||||||
|
unsigned int olen = variable_buffer_length;
|
||||||
|
|
||||||
|
variable_buffer = 0;
|
||||||
|
|
||||||
|
val = variable_append (v->name, strlen (v->name),
|
||||||
|
current_variable_set_list, 1);
|
||||||
|
variable_buffer_output (val, "", 1);
|
||||||
|
val = variable_buffer;
|
||||||
|
|
||||||
|
variable_buffer = obuf;
|
||||||
|
variable_buffer_length = olen;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
/* Like variable_expand_for_file, but the returned string is malloc'd.
|
/* Like variable_expand_for_file, but the returned string is malloc'd.
|
||||||
This function is called a lot. It wants to be efficient. */
|
This function is called a lot. It wants to be efficient. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
allocated_variable_expand_for_file (line, file)
|
allocated_variable_expand_for_file (const char *line, struct file *file)
|
||||||
char *line;
|
|
||||||
struct file *file;
|
|
||||||
{
|
{
|
||||||
char *value;
|
char *value;
|
||||||
|
|
||||||
@@ -445,13 +568,33 @@ allocated_variable_expand_for_file (line, file)
|
|||||||
|
|
||||||
value = variable_expand_for_file (line, file);
|
value = variable_expand_for_file (line, file);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Waste a little memory and save time. */
|
|
||||||
value = xrealloc (value, strlen (value))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
variable_buffer = obuf;
|
variable_buffer = obuf;
|
||||||
variable_buffer_length = olen;
|
variable_buffer_length = olen;
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Install a new variable_buffer context, returning the current one for
|
||||||
|
safe-keeping. */
|
||||||
|
|
||||||
|
void
|
||||||
|
install_variable_buffer (char **bufp, unsigned int *lenp)
|
||||||
|
{
|
||||||
|
*bufp = variable_buffer;
|
||||||
|
*lenp = variable_buffer_length;
|
||||||
|
|
||||||
|
variable_buffer = 0;
|
||||||
|
initialize_variable_output ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Restore a previously-saved variable_buffer setting (free the current one).
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
restore_variable_buffer (char *buf, unsigned int len)
|
||||||
|
{
|
||||||
|
free (variable_buffer);
|
||||||
|
|
||||||
|
variable_buffer = buf;
|
||||||
|
variable_buffer_length = len;
|
||||||
|
}
|
||||||
|
|||||||
174
filedef.h
174
filedef.h
@@ -1,47 +1,56 @@
|
|||||||
/* Definition of target file data structures for GNU Make.
|
/* Definition of target file data structures for GNU Make.
|
||||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
/* Structure that represents the info on one file
|
/* Structure that represents the info on one file
|
||||||
that the makefile says how to make.
|
that the makefile says how to make.
|
||||||
All of these are chained together through `next'. */
|
All of these are chained together through 'next'. */
|
||||||
|
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
struct file
|
struct file
|
||||||
{
|
{
|
||||||
struct file *next;
|
const char *name;
|
||||||
char *name;
|
const char *hname; /* Hashed filename */
|
||||||
struct dep *deps;
|
const char *vpath; /* VPATH/vpath pathname */
|
||||||
|
struct dep *deps; /* all dependencies, including duplicates */
|
||||||
struct commands *cmds; /* Commands to execute for this target. */
|
struct commands *cmds; /* Commands to execute for this target. */
|
||||||
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
||||||
char *stem; /* Implicit stem, if an implicit
|
const char *stem; /* Implicit stem, if an implicit
|
||||||
rule has been used */
|
rule has been used */
|
||||||
struct dep *also_make; /* Targets that are made by making this. */
|
struct dep *also_make; /* Targets that are made by making this. */
|
||||||
time_t last_mtime; /* File's modtime, if already known. */
|
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
||||||
|
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
||||||
|
has been performed. */
|
||||||
struct file *prev; /* Previous entry for same file name;
|
struct file *prev; /* Previous entry for same file name;
|
||||||
used when there are multiple double-colon
|
used when there are multiple double-colon
|
||||||
entries for the same file. */
|
entries for the same file. */
|
||||||
|
struct file *last; /* Last entry for the same file name. */
|
||||||
|
|
||||||
/* File that this file was renamed to. After any time that a
|
/* File that this file was renamed to. After any time that a
|
||||||
file could be renamed, call `check_renamed' (below). */
|
file could be renamed, call 'check_renamed' (below). */
|
||||||
struct file *renamed;
|
struct file *renamed;
|
||||||
|
|
||||||
/* List of variable sets used for this file. */
|
/* List of variable sets used for this file. */
|
||||||
struct variable_set_list *variables;
|
struct variable_set_list *variables;
|
||||||
|
|
||||||
|
/* Pattern-specific variable reference for this target, or null if there
|
||||||
|
isn't one. Also see the pat_searched flag, below. */
|
||||||
|
struct variable_set_list *pat_variables;
|
||||||
|
|
||||||
/* Immediate dependent that caused this target to be remade,
|
/* Immediate dependent that caused this target to be remade,
|
||||||
or nil if there isn't one. */
|
or nil if there isn't one. */
|
||||||
struct file *parent;
|
struct file *parent;
|
||||||
@@ -52,8 +61,7 @@ struct file
|
|||||||
|
|
||||||
short int update_status; /* Status of the last attempt to update,
|
short int update_status; /* Status of the last attempt to update,
|
||||||
or -1 if none has been made. */
|
or -1 if none has been made. */
|
||||||
|
enum cmd_state /* State of the commands. */
|
||||||
enum /* State of the commands. */
|
|
||||||
{ /* Note: It is important that cs_not_started be zero. */
|
{ /* Note: It is important that cs_not_started be zero. */
|
||||||
cs_not_started, /* Not yet started. */
|
cs_not_started, /* Not yet started. */
|
||||||
cs_deps_running, /* Dep commands running. */
|
cs_deps_running, /* Dep commands running. */
|
||||||
@@ -62,6 +70,8 @@ struct file
|
|||||||
} command_state ENUM_BITFIELD (2);
|
} command_state ENUM_BITFIELD (2);
|
||||||
|
|
||||||
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
||||||
|
unsigned int 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
|
unsigned int tried_implicit:1; /* Nonzero if have searched
|
||||||
for implicit rule for making
|
for implicit rule for making
|
||||||
this file; don't search again. */
|
this file; don't search again. */
|
||||||
@@ -70,51 +80,123 @@ struct file
|
|||||||
unsigned int is_target:1; /* Nonzero if file is described as target. */
|
unsigned int is_target:1; /* Nonzero if file is described as target. */
|
||||||
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
|
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
|
||||||
unsigned int phony:1; /* Nonzero if this is a phony file
|
unsigned int phony:1; /* Nonzero if this is a phony file
|
||||||
i.e., a dependency of .PHONY. */
|
i.e., a prerequisite of .PHONY. */
|
||||||
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
||||||
/* Nonzero, for an intermediate file,
|
unsigned int secondary:1; /* Nonzero means remove_intermediates should
|
||||||
means remove_intermediates should not delete it. */
|
not delete it. */
|
||||||
unsigned int secondary:1;
|
|
||||||
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
||||||
this target cannot be remade. */
|
this target cannot be remade. */
|
||||||
|
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
||||||
|
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
||||||
|
pattern-specific variables. */
|
||||||
|
unsigned int considered:1; /* equal to 'considered' if file has been
|
||||||
|
considered on current scan of goal chain */
|
||||||
|
unsigned int no_diag:1; /* True if the file failed to update and no
|
||||||
|
diagnostics has been issued (dontcare). */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Number of intermediate files entered. */
|
|
||||||
|
|
||||||
extern unsigned int num_intermediates;
|
extern struct file *suffix_file, *default_file;
|
||||||
|
|
||||||
extern struct file *default_goal_file, *suffix_file, *default_file;
|
|
||||||
|
|
||||||
|
|
||||||
extern struct file *lookup_file (), *enter_file ();
|
struct file *lookup_file (const char *name);
|
||||||
extern void remove_intermediates (), snap_deps ();
|
struct file *enter_file (const char *name);
|
||||||
extern void rename_file (), file_hash_enter ();
|
struct dep *split_prereqs (char *prereqstr);
|
||||||
extern void set_command_state ();
|
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_NSEC)
|
||||||
|
#else
|
||||||
|
# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
|
||||||
|
file_timestamp_cons (fname, (st).st_mtime, 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If FILE_TIMESTAMP is 64 bits (or more), use nanosecond resolution.
|
||||||
|
(Multiply by 2**30 instead of by 10**9 to save time at the cost of
|
||||||
|
slightly decreasing the number of available timestamps.) With
|
||||||
|
64-bit FILE_TIMESTAMP, this stops working on 2514-05-30 01:53:04
|
||||||
|
UTC, but by then uintmax_t should be larger than 64 bits. */
|
||||||
|
#define FILE_TIMESTAMPS_PER_S (FILE_TIMESTAMP_HI_RES ? 1000000000 : 1)
|
||||||
|
#define FILE_TIMESTAMP_LO_BITS (FILE_TIMESTAMP_HI_RES ? 30 : 0)
|
||||||
|
|
||||||
|
#define FILE_TIMESTAMP_S(ts) (((ts) - ORDINARY_MTIME_MIN) \
|
||||||
|
>> FILE_TIMESTAMP_LO_BITS)
|
||||||
|
#define FILE_TIMESTAMP_NS(ts) ((int) (((ts) - ORDINARY_MTIME_MIN) \
|
||||||
|
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
|
||||||
|
|
||||||
|
/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
|
||||||
|
representing a file timestamp. The upper bound is not necessarily 19,
|
||||||
|
since the year might be less than -999 or greater than 9999.
|
||||||
|
|
||||||
|
Subtract one for the sign bit if in case file timestamps can be negative;
|
||||||
|
subtract FLOOR_LOG2_SECONDS_PER_YEAR to yield an upper bound on how many
|
||||||
|
file timestamp bits might affect the year;
|
||||||
|
302 / 1000 is log10 (2) rounded up;
|
||||||
|
add one for integer division truncation;
|
||||||
|
add one more for a minus sign if file timestamps can be negative;
|
||||||
|
add 4 to allow for any 4-digit epoch year (e.g. 1970);
|
||||||
|
add 25 to allow for "-MM-DD HH:MM:SS.NNNNNNNNN". */
|
||||||
|
#define FLOOR_LOG2_SECONDS_PER_YEAR 24
|
||||||
|
#define FILE_TIMESTAMP_PRINT_LEN_BOUND \
|
||||||
|
(((sizeof (FILE_TIMESTAMP) * CHAR_BIT - 1 - FLOOR_LOG2_SECONDS_PER_YEAR) \
|
||||||
|
* 302 / 1000) \
|
||||||
|
+ 1 + 1 + 4 + 25)
|
||||||
|
|
||||||
|
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.
|
/* Return the mtime of file F (a struct file *), caching it.
|
||||||
The value is -1 if the file does not exist. */
|
The value is NONEXISTENT_MTIME if the file does not exist. */
|
||||||
#define file_mtime(f) file_mtime_1 ((f), 1)
|
#define file_mtime(f) file_mtime_1 ((f), 1)
|
||||||
/* Return the mtime of file F (a struct file *), caching it.
|
/* Return the mtime of file F (a struct file *), caching it.
|
||||||
Don't search using vpath for the file--if it doesn't actually exist,
|
Don't search using vpath for the file--if it doesn't actually exist,
|
||||||
we don't find it.
|
we don't find it.
|
||||||
The value is -1 if the file does not exist. */
|
The value is NONEXISTENT_MTIME if the file does not exist. */
|
||||||
#define file_mtime_no_search(f) file_mtime_1 ((f), 0)
|
#define file_mtime_no_search(f) file_mtime_1 ((f), 0)
|
||||||
extern time_t f_mtime ();
|
FILE_TIMESTAMP f_mtime (struct file *file, int search);
|
||||||
#define file_mtime_1(f, v) \
|
#define file_mtime_1(f, v) \
|
||||||
((f)->last_mtime != (time_t) 0 ? (f)->last_mtime : f_mtime ((f), v))
|
((f)->last_mtime == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)
|
||||||
|
|
||||||
/* Modtime value to use for `infinitely new'. We used to get the current time
|
/* Special timestamp values. */
|
||||||
from the system and use that whenever we wanted `new'. But that causes
|
|
||||||
|
/* The file's timestamp is not yet known. */
|
||||||
|
#define UNKNOWN_MTIME 0
|
||||||
|
|
||||||
|
/* The file does not exist. */
|
||||||
|
#define NONEXISTENT_MTIME 1
|
||||||
|
|
||||||
|
/* The file does not exist, and we assume that it is older than any
|
||||||
|
actual file. */
|
||||||
|
#define OLD_MTIME 2
|
||||||
|
|
||||||
|
/* The smallest and largest ordinary timestamps. */
|
||||||
|
#define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
|
||||||
|
#define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
|
||||||
|
<< FILE_TIMESTAMP_LO_BITS) \
|
||||||
|
+ ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
|
||||||
|
|
||||||
|
/* Modtime value to use for 'infinitely new'. We used to get the current time
|
||||||
|
from the system and use that whenever we wanted 'new'. But that causes
|
||||||
trouble when the machine running make and the machine holding a file have
|
trouble when the machine running make and the machine holding a file have
|
||||||
different ideas about what time it is; and can also lose for `force'
|
different ideas about what time it is; and can also lose for 'force'
|
||||||
targets, which need to be considered newer than anything that depends on
|
targets, which need to be considered newer than anything that depends on
|
||||||
them, even if said dependents' modtimes are in the future.
|
them, even if said dependents' modtimes are in the future. */
|
||||||
|
#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
|
||||||
NOTE: This assumes 32-bit `time_t's, but I cannot think of a portable way
|
|
||||||
to produce the largest representable integer of a given signed type. */
|
|
||||||
#define NEW_MTIME ((time_t) 0x7fffffff)
|
|
||||||
|
|
||||||
|
|
||||||
#define check_renamed(file) \
|
#define check_renamed(file) \
|
||||||
while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
|
while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
|
||||||
|
|
||||||
|
/* Have we snapped deps yet? */
|
||||||
|
extern int snapped_deps;
|
||||||
|
|||||||
3349
function.c
3349
function.c
File diff suppressed because it is too large
Load Diff
267
getloadavg.c
267
getloadavg.c
@@ -1,24 +1,28 @@
|
|||||||
/* Get the system load averages.
|
/* Get the system load averages.
|
||||||
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995
|
Copyright (C) 1985-2012 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with this program; if not, write to the Free Software
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
||||||
USA. */
|
|
||||||
|
|
||||||
/* Compile-time symbols that this file uses:
|
/* Compile-time symbols that this file uses:
|
||||||
|
|
||||||
|
HAVE_PSTAT_GETDYNAMIC Define this if your system has the
|
||||||
|
pstat_getdynamic function. I think it
|
||||||
|
is unique to HPUX9. The best way to get the
|
||||||
|
definition is through the AC_FUNC_GETLOADAVG
|
||||||
|
macro that comes with autoconf 2.13 or newer.
|
||||||
|
If that isn't an option, then just put
|
||||||
|
AC_CHECK_FUNCS(pstat_getdynamic) in your
|
||||||
|
configure.in file.
|
||||||
FIXUP_KERNEL_SYMBOL_ADDR() Adjust address in returned struct nlist.
|
FIXUP_KERNEL_SYMBOL_ADDR() Adjust address in returned struct nlist.
|
||||||
KERNEL_FILE Pathname of the kernel to nlist.
|
KERNEL_FILE Pathname of the kernel to nlist.
|
||||||
LDAV_CVT() Scale the load average from the kernel.
|
LDAV_CVT() Scale the load average from the kernel.
|
||||||
@@ -27,11 +31,12 @@
|
|||||||
LOAD_AVE_TYPE Type of the load average array in the kernel.
|
LOAD_AVE_TYPE Type of the load average array in the kernel.
|
||||||
Must be defined unless one of
|
Must be defined unless one of
|
||||||
apollo, DGUX, NeXT, or UMAX is defined;
|
apollo, DGUX, NeXT, or UMAX is defined;
|
||||||
|
or we have libkstat;
|
||||||
otherwise, no load average is available.
|
otherwise, no load average is available.
|
||||||
NLIST_STRUCT Include nlist.h, not a.out.h, and
|
NLIST_STRUCT Include nlist.h, not a.out.h, and
|
||||||
the nlist n_name element is a pointer,
|
the nlist n_name element is a pointer,
|
||||||
not an array.
|
not an array.
|
||||||
NLIST_NAME_UNION struct nlist has an n_un member, not n_name.
|
HAVE_STRUCT_NLIST_N_UN_N_NAME struct nlist has an n_un member, not n_name.
|
||||||
LINUX_LDAV_FILE [__linux__]: File containing load averages.
|
LINUX_LDAV_FILE [__linux__]: File containing load averages.
|
||||||
|
|
||||||
Specific system predefines this file uses, aside from setting
|
Specific system predefines this file uses, aside from setting
|
||||||
@@ -43,7 +48,7 @@
|
|||||||
DGUX
|
DGUX
|
||||||
eunice UNIX emulator under VMS.
|
eunice UNIX emulator under VMS.
|
||||||
hpux
|
hpux
|
||||||
MSDOS No-op for MSDOS.
|
__MSDOS__ No-op for MSDOS.
|
||||||
NeXT
|
NeXT
|
||||||
sgi
|
sgi
|
||||||
sequent Sequent Dynix 3.x.x (BSD)
|
sequent Sequent Dynix 3.x.x (BSD)
|
||||||
@@ -52,7 +57,7 @@
|
|||||||
UMAX
|
UMAX
|
||||||
UMAX4_3
|
UMAX4_3
|
||||||
VMS
|
VMS
|
||||||
WIN32 No-op for Windows95/NT.
|
WINDOWS32 No-op for Windows95/NT.
|
||||||
__linux__ Linux: assumes /proc filesystem mounted.
|
__linux__ Linux: assumes /proc filesystem mounted.
|
||||||
Support from Michael K. Johnson.
|
Support from Michael K. Johnson.
|
||||||
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
|
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
|
||||||
@@ -73,15 +78,15 @@
|
|||||||
/* Both the Emacs and non-Emacs sections want this. Some
|
/* Both the Emacs and non-Emacs sections want this. Some
|
||||||
configuration files' definitions for the LOAD_AVE_CVT macro (like
|
configuration files' definitions for the LOAD_AVE_CVT macro (like
|
||||||
sparc.h's) use macros like FSCALE, defined here. */
|
sparc.h's) use macros like FSCALE, defined here. */
|
||||||
#ifdef unix
|
#if defined (unix) || defined (__unix)
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Exclude all the code except the test program at the end
|
/* Exclude all the code except the test program at the end
|
||||||
if the system has its own `getloadavg' function.
|
if the system has its own 'getloadavg' function.
|
||||||
|
|
||||||
The declaration of `errno' is needed by the test program
|
The declaration of 'errno' is needed by the test program
|
||||||
as well as the function itself, so it comes first. */
|
as well as the function itself, so it comes first. */
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -90,6 +95,13 @@
|
|||||||
extern int errno;
|
extern int errno;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LOCALE_H
|
||||||
|
# include <locale.h>
|
||||||
|
#endif
|
||||||
|
#if !HAVE_SETLOCALE
|
||||||
|
# define setlocale(Category, Locale) /* empty */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETLOADAVG
|
#ifndef HAVE_GETLOADAVG
|
||||||
|
|
||||||
|
|
||||||
@@ -123,6 +135,12 @@ extern int errno;
|
|||||||
# undef FSCALE
|
# undef FSCALE
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
/* Same issues as for NeXT apply to the HURD-based GNU system. */
|
||||||
|
# ifdef __GNU__
|
||||||
|
# undef BSD
|
||||||
|
# undef FSCALE
|
||||||
|
# endif /* __GNU__ */
|
||||||
|
|
||||||
/* Set values that are different from the defaults, which are
|
/* Set values that are different from the defaults, which are
|
||||||
set a little farther down with #ifndef. */
|
set a little farther down with #ifndef. */
|
||||||
|
|
||||||
@@ -133,6 +151,14 @@ extern int errno;
|
|||||||
# define hpux
|
# define hpux
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if defined (__hpux) && !defined (hpux)
|
||||||
|
# define hpux
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined (__sun) && !defined (sun)
|
||||||
|
# define sun
|
||||||
|
# endif
|
||||||
|
|
||||||
# if defined(hp300) && !defined(hpux)
|
# if defined(hp300) && !defined(hpux)
|
||||||
# define MORE_BSD
|
# define MORE_BSD
|
||||||
# endif
|
# endif
|
||||||
@@ -141,12 +167,19 @@ extern int errno;
|
|||||||
# define decstation
|
# define decstation
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if defined (__SVR4) && !defined (SVR4)
|
||||||
|
# define SVR4
|
||||||
|
# endif
|
||||||
|
|
||||||
# if (defined(sun) && defined(SVR4)) || defined (SOLARIS2)
|
# if (defined(sun) && defined(SVR4)) || defined (SOLARIS2)
|
||||||
# define SUNOS_5
|
# define SUNOS_5
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined (__osf__) && (defined (__alpha) || defined (__alpha__))
|
# if defined (__osf__) && (defined (__alpha) || defined (__alpha__))
|
||||||
# define OSF_ALPHA
|
# define OSF_ALPHA
|
||||||
|
# include <sys/mbuf.h>
|
||||||
|
# include <sys/socket.h>
|
||||||
|
# include <net/route.h>
|
||||||
# include <sys/table.h>
|
# include <sys/table.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -162,6 +195,10 @@ extern int errno;
|
|||||||
# define tek4300 /* Define by emacs, but not by other users. */
|
# define tek4300 /* Define by emacs, but not by other users. */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
/* AC_FUNC_GETLOADAVG thinks QNX is SVR4, but it isn't. */
|
||||||
|
# if defined(__QNX__)
|
||||||
|
# undef SVR4
|
||||||
|
# endif
|
||||||
|
|
||||||
/* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */
|
/* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */
|
||||||
# ifndef LOAD_AVE_TYPE
|
# ifndef LOAD_AVE_TYPE
|
||||||
@@ -279,67 +316,6 @@ extern int errno;
|
|||||||
# define LDAV_CVT(n) (((double) (n)) / FSCALE)
|
# define LDAV_CVT(n) (((double) (n)) / FSCALE)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* VAX C can't handle multi-line #ifs, or lines longer that 256 characters. */
|
|
||||||
#ifndef NLIST_STRUCT
|
|
||||||
|
|
||||||
#ifdef MORE_BSD
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef sun
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef decstation
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef hpux
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (_SEQUENT_) || defined (sequent)
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef sgi
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SVR4
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef sony_news
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef OSF_ALPHA
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (ardent) && defined (titan)
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef tek4300
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef butterfly
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(alliant) && defined(i860) /* Alliant FX/2800 */
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _AIX
|
|
||||||
#define NLIST_STRUCT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* defined (NLIST_STRUCT) */
|
|
||||||
|
|
||||||
|
|
||||||
# if defined(sgi) || (defined(mips) && !defined(BSD))
|
# if defined(sgi) || (defined(mips) && !defined(BSD))
|
||||||
# define FIXUP_KERNEL_SYMBOL_ADDR(nl) ((nl)[0].n_value &= ~(1 << 31))
|
# define FIXUP_KERNEL_SYMBOL_ADDR(nl) ((nl)[0].n_value &= ~(1 << 31))
|
||||||
@@ -354,7 +330,7 @@ extern int errno;
|
|||||||
# define KERNEL_FILE "/hp-ux"
|
# define KERNEL_FILE "/hp-ux"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || defined(SVR4) || (defined (ardent) && defined (titan)))
|
# if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || (defined (ardent) && defined (titan)))
|
||||||
# define KERNEL_FILE "/unix"
|
# define KERNEL_FILE "/unix"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -375,22 +351,28 @@ extern int errno;
|
|||||||
|
|
||||||
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
||||||
nlist method. */
|
nlist method. */
|
||||||
#if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL))
|
# if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) && !defined(__riscos__)
|
||||||
# define LOAD_AVE_TYPE double
|
# define LOAD_AVE_TYPE double
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef LOAD_AVE_TYPE
|
# ifdef LOAD_AVE_TYPE
|
||||||
|
|
||||||
# ifndef VMS
|
# ifndef VMS
|
||||||
#ifndef NLIST_STRUCT
|
# ifndef __linux__
|
||||||
#include <a.out.h>
|
# ifdef HAVE_NLIST_H
|
||||||
#else /* NLIST_STRUCT */
|
|
||||||
# include <nlist.h>
|
# include <nlist.h>
|
||||||
#endif /* NLIST_STRUCT */
|
# else
|
||||||
|
# include <a.out.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef SUNOS_5
|
# ifdef SUNOS_5
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <kvm.h>
|
# include <kvm.h>
|
||||||
|
# include <kstat.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC)
|
||||||
|
# include <sys/pstat.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef KERNEL_FILE
|
# ifndef KERNEL_FILE
|
||||||
@@ -400,6 +382,7 @@ extern int errno;
|
|||||||
# ifndef LDAV_SYMBOL
|
# ifndef LDAV_SYMBOL
|
||||||
# define LDAV_SYMBOL "_avenrun"
|
# define LDAV_SYMBOL "_avenrun"
|
||||||
# endif /* LDAV_SYMBOL */
|
# endif /* LDAV_SYMBOL */
|
||||||
|
# endif /* __linux__ */
|
||||||
|
|
||||||
# else /* VMS */
|
# else /* VMS */
|
||||||
|
|
||||||
@@ -417,6 +400,14 @@ extern int errno;
|
|||||||
|
|
||||||
# endif /* LOAD_AVE_TYPE */
|
# endif /* LOAD_AVE_TYPE */
|
||||||
|
|
||||||
|
# if defined(__GNU__) && !defined (NeXT)
|
||||||
|
/* Note that NeXT Openstep defines __GNU__ even though it should not. */
|
||||||
|
/* GNU system acts much like NeXT, for load average purposes,
|
||||||
|
but not exactly. */
|
||||||
|
# define NeXT
|
||||||
|
# define host_self mach_host_self
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef NeXT
|
# ifdef NeXT
|
||||||
# ifdef HAVE_MACH_MACH_H
|
# ifdef HAVE_MACH_MACH_H
|
||||||
# include <mach/mach.h>
|
# include <mach/mach.h>
|
||||||
@@ -462,6 +453,7 @@ extern int errno;
|
|||||||
# include <sys/file.h>
|
# include <sys/file.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
/* Avoid static vars inside a function since in HPUX they dump as pure. */
|
/* Avoid static vars inside a function since in HPUX they dump as pure. */
|
||||||
|
|
||||||
# ifdef NeXT
|
# ifdef NeXT
|
||||||
@@ -478,7 +470,7 @@ static unsigned int samples;
|
|||||||
static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */
|
static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */
|
||||||
# endif /* DGUX */
|
# endif /* DGUX */
|
||||||
|
|
||||||
#ifdef LOAD_AVE_TYPE
|
#if !defined(HAVE_LIBKSTAT) && defined(LOAD_AVE_TYPE)
|
||||||
/* File descriptor open to /dev/kmem or VMS load ave driver. */
|
/* File descriptor open to /dev/kmem or VMS load ave driver. */
|
||||||
static int channel;
|
static int channel;
|
||||||
/* Nonzero iff channel is valid. */
|
/* Nonzero iff channel is valid. */
|
||||||
@@ -486,7 +478,7 @@ static int getloadavg_initialized;
|
|||||||
/* Offset in kmem to seek to read load average, or 0 means invalid. */
|
/* Offset in kmem to seek to read load average, or 0 means invalid. */
|
||||||
static long offset;
|
static long offset;
|
||||||
|
|
||||||
#if !defined(VMS) && !defined(sgi)
|
#if !defined(VMS) && !defined(sgi) && !defined(__linux__)
|
||||||
static struct nlist nl[2];
|
static struct nlist nl[2];
|
||||||
#endif /* Not VMS or sgi */
|
#endif /* Not VMS or sgi */
|
||||||
|
|
||||||
@@ -494,7 +486,7 @@ static struct nlist nl[2];
|
|||||||
static kvm_t *kd;
|
static kvm_t *kd;
|
||||||
#endif /* SUNOS_5 */
|
#endif /* SUNOS_5 */
|
||||||
|
|
||||||
#endif /* LOAD_AVE_TYPE */
|
#endif /* LOAD_AVE_TYPE && !HAVE_LIBKSTAT */
|
||||||
|
|
||||||
/* Put the 1 minute, 5 minute and 15 minute load averages
|
/* Put the 1 minute, 5 minute and 15 minute load averages
|
||||||
into the first NELEM elements of LOADAVG.
|
into the first NELEM elements of LOADAVG.
|
||||||
@@ -502,9 +494,7 @@ static kvm_t *kd;
|
|||||||
or -1 if an error occurred. */
|
or -1 if an error occurred. */
|
||||||
|
|
||||||
int
|
int
|
||||||
getloadavg (loadavg, nelem)
|
getloadavg (double loadavg[], int nelem)
|
||||||
double loadavg[];
|
|
||||||
int nelem;
|
|
||||||
{
|
{
|
||||||
int elem = 0; /* Return value. */
|
int elem = 0; /* Return value. */
|
||||||
|
|
||||||
@@ -516,6 +506,70 @@ getloadavg (loadavg, nelem)
|
|||||||
elem = -1;
|
elem = -1;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT)
|
||||||
|
/* Use libkstat because we don't have to be root. */
|
||||||
|
# define LDAV_DONE
|
||||||
|
kstat_ctl_t *kc;
|
||||||
|
kstat_t *ksp;
|
||||||
|
kstat_named_t *kn;
|
||||||
|
|
||||||
|
kc = kstat_open ();
|
||||||
|
if (kc == 0)
|
||||||
|
return -1;
|
||||||
|
ksp = kstat_lookup (kc, "unix", 0, "system_misc");
|
||||||
|
if (ksp == 0 )
|
||||||
|
return -1;
|
||||||
|
if (kstat_read (kc, ksp, 0) == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
|
kn = kstat_data_lookup (ksp, "avenrun_1min");
|
||||||
|
if (kn == 0)
|
||||||
|
{
|
||||||
|
/* Return -1 if no load average information is available. */
|
||||||
|
nelem = 0;
|
||||||
|
elem = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nelem >= 1)
|
||||||
|
loadavg[elem++] = (double) kn->value.ul/FSCALE;
|
||||||
|
|
||||||
|
if (nelem >= 2)
|
||||||
|
{
|
||||||
|
kn = kstat_data_lookup (ksp, "avenrun_5min");
|
||||||
|
if (kn != 0)
|
||||||
|
{
|
||||||
|
loadavg[elem++] = (double) kn->value.ul/FSCALE;
|
||||||
|
|
||||||
|
if (nelem >= 3)
|
||||||
|
{
|
||||||
|
kn = kstat_data_lookup (ksp, "avenrun_15min");
|
||||||
|
if (kn != 0)
|
||||||
|
loadavg[elem++] = (double) kn->value.ul/FSCALE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
kstat_close (kc);
|
||||||
|
# endif /* HAVE_LIBKSTAT */
|
||||||
|
|
||||||
|
# if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC)
|
||||||
|
/* Use pstat_getdynamic() because we don't have to be root. */
|
||||||
|
# define LDAV_DONE
|
||||||
|
# undef LOAD_AVE_TYPE
|
||||||
|
|
||||||
|
struct pst_dynamic dyn_info;
|
||||||
|
if (pstat_getdynamic (&dyn_info, sizeof (dyn_info), 0, 0) < 0)
|
||||||
|
return -1;
|
||||||
|
if (nelem > 0)
|
||||||
|
loadavg[elem++] = dyn_info.psd_avg_1_min;
|
||||||
|
if (nelem > 1)
|
||||||
|
loadavg[elem++] = dyn_info.psd_avg_5_min;
|
||||||
|
if (nelem > 2)
|
||||||
|
loadavg[elem++] = dyn_info.psd_avg_15_min;
|
||||||
|
|
||||||
|
# endif /* hpux && HAVE_PSTAT_GETDYNAMIC */
|
||||||
|
|
||||||
# if !defined (LDAV_DONE) && defined (__linux__)
|
# if !defined (LDAV_DONE) && defined (__linux__)
|
||||||
# define LDAV_DONE
|
# define LDAV_DONE
|
||||||
# undef LOAD_AVE_TYPE
|
# undef LOAD_AVE_TYPE
|
||||||
@@ -536,8 +590,11 @@ getloadavg (loadavg, nelem)
|
|||||||
if (count <= 0)
|
if (count <= 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* The following sscanf must use the C locale. */
|
||||||
|
setlocale (LC_NUMERIC, "C");
|
||||||
count = sscanf (ldavgbuf, "%lf %lf %lf",
|
count = sscanf (ldavgbuf, "%lf %lf %lf",
|
||||||
&load_ave[0], &load_ave[1], &load_ave[2]);
|
&load_ave[0], &load_ave[1], &load_ave[2]);
|
||||||
|
setlocale (LC_NUMERIC, "");
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -643,7 +700,7 @@ getloadavg (loadavg, nelem)
|
|||||||
for (i = 0; i < conf.config_maxclass; ++i)
|
for (i = 0; i < conf.config_maxclass; ++i)
|
||||||
{
|
{
|
||||||
struct class_stats stats;
|
struct class_stats stats;
|
||||||
bzero ((char *) &stats, sizeof stats);
|
memset (&stats, '\0', sizeof stats);
|
||||||
|
|
||||||
desc.sd_type = CPUTYPE_CLASS;
|
desc.sd_type = CPUTYPE_CLASS;
|
||||||
desc.sd_objid = i;
|
desc.sd_objid = i;
|
||||||
@@ -686,7 +743,7 @@ getloadavg (loadavg, nelem)
|
|||||||
# define LDAV_DONE
|
# define LDAV_DONE
|
||||||
/* This call can return -1 for an error, but with good args
|
/* This call can return -1 for an error, but with good args
|
||||||
it's not supposed to fail. The first argument is for no
|
it's not supposed to fail. The first argument is for no
|
||||||
apparent reason of type `long int *'. */
|
apparent reason of type 'long int *'. */
|
||||||
dg_sys_info ((long int *) &load_info,
|
dg_sys_info ((long int *) &load_info,
|
||||||
DG_SYS_INFO_LOAD_INFO_TYPE,
|
DG_SYS_INFO_LOAD_INFO_TYPE,
|
||||||
DG_SYS_INFO_LOAD_VERSION_0);
|
DG_SYS_INFO_LOAD_VERSION_0);
|
||||||
@@ -735,7 +792,7 @@ getloadavg (loadavg, nelem)
|
|||||||
: (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
|
: (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
|
||||||
# endif /* OSF_MIPS */
|
# endif /* OSF_MIPS */
|
||||||
|
|
||||||
#if !defined (LDAV_DONE) && (defined (MSDOS) || defined (WIN32))
|
# if !defined (LDAV_DONE) && (defined (__MSDOS__) || defined (WINDOWS32))
|
||||||
# define LDAV_DONE
|
# define LDAV_DONE
|
||||||
|
|
||||||
/* A faithful emulation is going to have to be saved for a rainy day. */
|
/* A faithful emulation is going to have to be saved for a rainy day. */
|
||||||
@@ -743,7 +800,7 @@ getloadavg (loadavg, nelem)
|
|||||||
{
|
{
|
||||||
loadavg[elem] = 0.0;
|
loadavg[elem] = 0.0;
|
||||||
}
|
}
|
||||||
#endif /* MSDOS */
|
# endif /* __MSDOS__ || WINDOWS32 */
|
||||||
|
|
||||||
# if !defined (LDAV_DONE) && defined (OSF_ALPHA)
|
# if !defined (LDAV_DONE) && defined (OSF_ALPHA)
|
||||||
# define LDAV_DONE
|
# define LDAV_DONE
|
||||||
@@ -813,13 +870,13 @@ getloadavg (loadavg, nelem)
|
|||||||
strcpy (nl[0].n_name, LDAV_SYMBOL);
|
strcpy (nl[0].n_name, LDAV_SYMBOL);
|
||||||
strcpy (nl[1].n_name, "");
|
strcpy (nl[1].n_name, "");
|
||||||
# else /* NLIST_STRUCT */
|
# else /* NLIST_STRUCT */
|
||||||
#ifdef NLIST_NAME_UNION
|
# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
|
||||||
nl[0].n_un.n_name = LDAV_SYMBOL;
|
nl[0].n_un.n_name = LDAV_SYMBOL;
|
||||||
nl[1].n_un.n_name = 0;
|
nl[1].n_un.n_name = 0;
|
||||||
#else /* not NLIST_NAME_UNION */
|
# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||||
nl[0].n_name = LDAV_SYMBOL;
|
nl[0].n_name = LDAV_SYMBOL;
|
||||||
nl[1].n_name = 0;
|
nl[1].n_name = 0;
|
||||||
#endif /* not NLIST_NAME_UNION */
|
# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||||
# endif /* NLIST_STRUCT */
|
# endif /* NLIST_STRUCT */
|
||||||
|
|
||||||
# ifndef SUNOS_5
|
# ifndef SUNOS_5
|
||||||
@@ -856,7 +913,7 @@ getloadavg (loadavg, nelem)
|
|||||||
{
|
{
|
||||||
/* Set the channel to close on exec, so it does not
|
/* Set the channel to close on exec, so it does not
|
||||||
litter any child's descriptor table. */
|
litter any child's descriptor table. */
|
||||||
#ifdef FD_SETFD
|
# ifdef F_SETFD
|
||||||
# ifndef FD_CLOEXEC
|
# ifndef FD_CLOEXEC
|
||||||
# define FD_CLOEXEC 1
|
# define FD_CLOEXEC 1
|
||||||
# endif
|
# endif
|
||||||
@@ -928,10 +985,10 @@ getloadavg (loadavg, nelem)
|
|||||||
#endif /* ! HAVE_GETLOADAVG */
|
#endif /* ! HAVE_GETLOADAVG */
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
void
|
#include "make.h"
|
||||||
main (argc, argv)
|
|
||||||
int argc;
|
int
|
||||||
char **argv;
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int naptime = 0;
|
int naptime = 0;
|
||||||
|
|
||||||
|
|||||||
130
getopt.h
Normal file
130
getopt.h
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
/* Declarations for getopt.
|
||||||
|
Copyright (C) 1989-2012 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.
|
||||||
|
|
||||||
|
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 _GETOPT_H
|
||||||
|
#define _GETOPT_H 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For communication from `getopt' to the caller.
|
||||||
|
When `getopt' finds an option that takes an argument,
|
||||||
|
the argument value is returned here.
|
||||||
|
Also, when `ordering' is RETURN_IN_ORDER,
|
||||||
|
each non-option ARGV-element is returned here. */
|
||||||
|
|
||||||
|
extern char *optarg;
|
||||||
|
|
||||||
|
/* Index in ARGV of the next element to be scanned.
|
||||||
|
This is used for communication to and from the caller
|
||||||
|
and for communication between successive calls to `getopt'.
|
||||||
|
|
||||||
|
On entry to `getopt', zero means this is the first call; initialize.
|
||||||
|
|
||||||
|
When `getopt' returns -1, this is the index of the first of the
|
||||||
|
non-option elements that the caller should itself scan.
|
||||||
|
|
||||||
|
Otherwise, `optind' communicates from one call to the next
|
||||||
|
how much of ARGV has been scanned so far. */
|
||||||
|
|
||||||
|
extern int optind;
|
||||||
|
|
||||||
|
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||||
|
for unrecognized options. */
|
||||||
|
|
||||||
|
extern int opterr;
|
||||||
|
|
||||||
|
/* Set to an option character which was unrecognized. */
|
||||||
|
|
||||||
|
extern int optopt;
|
||||||
|
|
||||||
|
/* Describe the long-named options requested by the application.
|
||||||
|
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||||
|
of `struct option' terminated by an element containing a name which is
|
||||||
|
zero.
|
||||||
|
|
||||||
|
The field `has_arg' is:
|
||||||
|
no_argument (or 0) if the option does not take an argument,
|
||||||
|
required_argument (or 1) if the option requires an argument,
|
||||||
|
optional_argument (or 2) if the option takes an optional argument.
|
||||||
|
|
||||||
|
If the field `flag' is not NULL, it points to a variable that is set
|
||||||
|
to the value given in the field `val' when the option is found, but
|
||||||
|
left unchanged if the option is not found.
|
||||||
|
|
||||||
|
To have a long-named option do something other than set an `int' to
|
||||||
|
a compiled-in constant, such as set a value from `optarg', set the
|
||||||
|
option's `flag' field to zero and its `val' field to a nonzero
|
||||||
|
value (the equivalent single-letter option character, if there is
|
||||||
|
one). For long options that have a zero `flag' field, `getopt'
|
||||||
|
returns the contents of the `val' field. */
|
||||||
|
|
||||||
|
struct option
|
||||||
|
{
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
const char *name;
|
||||||
|
#else
|
||||||
|
char *name;
|
||||||
|
#endif
|
||||||
|
/* has_arg can't be an enum because some compilers complain about
|
||||||
|
type mismatches in all the code that assumes it is an int. */
|
||||||
|
int has_arg;
|
||||||
|
int *flag;
|
||||||
|
int val;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||||
|
|
||||||
|
#define no_argument 0
|
||||||
|
#define required_argument 1
|
||||||
|
#define optional_argument 2
|
||||||
|
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
#ifdef __GNU_LIBRARY__
|
||||||
|
/* Many other libraries have conflicting prototypes for getopt, with
|
||||||
|
differences in the consts, in stdlib.h. To avoid compilation
|
||||||
|
errors, only prototype getopt for the GNU C library. */
|
||||||
|
extern int getopt (int argc, char *const *argv, const char *shortopts);
|
||||||
|
#else /* not __GNU_LIBRARY__ */
|
||||||
|
extern int getopt ();
|
||||||
|
#endif /* __GNU_LIBRARY__ */
|
||||||
|
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||||
|
const struct option *longopts, int *longind);
|
||||||
|
extern int getopt_long_only (int argc, char *const *argv,
|
||||||
|
const char *shortopts,
|
||||||
|
const struct option *longopts, int *longind);
|
||||||
|
|
||||||
|
/* Internal only. Users should not call this directly. */
|
||||||
|
extern int _getopt_internal (int argc, char *const *argv,
|
||||||
|
const char *shortopts,
|
||||||
|
const struct option *longopts, int *longind,
|
||||||
|
int long_only);
|
||||||
|
#else /* not __STDC__ */
|
||||||
|
extern int getopt ();
|
||||||
|
extern int getopt_long ();
|
||||||
|
extern int getopt_long_only ();
|
||||||
|
|
||||||
|
extern int _getopt_internal ();
|
||||||
|
#endif /* __STDC__ */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* getopt.h */
|
||||||
176
getopt1.c
Normal file
176
getopt1.c
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||||
|
Copyright (C) 1987-1994, 1996-2012 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.
|
||||||
|
|
||||||
|
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/>. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "getopt.h"
|
||||||
|
|
||||||
|
#if !defined __STDC__ || !__STDC__
|
||||||
|
/* This is a separate conditional since some stdc systems
|
||||||
|
reject `defined (const)'. */
|
||||||
|
#ifndef const
|
||||||
|
#define const
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||||
|
actually compiling the library itself. This code is part of the GNU C
|
||||||
|
Library, but also included in many other GNU distributions. Compiling
|
||||||
|
and linking in this code is a waste when using the GNU C library
|
||||||
|
(especially if it is a shared library). Rather than having every GNU
|
||||||
|
program understand `configure --with-gnu-libc' and omit the object files,
|
||||||
|
it is simpler to just do this in the source for each such file. */
|
||||||
|
|
||||||
|
#define GETOPT_INTERFACE_VERSION 2
|
||||||
|
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
|
||||||
|
#include <gnu-versions.h>
|
||||||
|
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
|
||||||
|
#define ELIDE_CODE
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ELIDE_CODE
|
||||||
|
|
||||||
|
|
||||||
|
/* This needs to come after some library #include
|
||||||
|
to get __GNU_LIBRARY__ defined. */
|
||||||
|
#ifdef __GNU_LIBRARY__
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||||
|
If an option that starts with '-' (not '--') doesn't match a long option,
|
||||||
|
but does match a short option, it is parsed as a short option
|
||||||
|
instead. */
|
||||||
|
|
||||||
|
int
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* Not ELIDE_CODE. */
|
||||||
|
|
||||||
|
#ifdef TEST
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
int c;
|
||||||
|
int digit_optind = 0;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
int this_option_optind = optind ? optind : 1;
|
||||||
|
int option_index = 0;
|
||||||
|
static struct option long_options[] =
|
||||||
|
{
|
||||||
|
{"add", 1, 0, 0},
|
||||||
|
{"append", 0, 0, 0},
|
||||||
|
{"delete", 1, 0, 0},
|
||||||
|
{"verbose", 0, 0, 0},
|
||||||
|
{"create", 0, 0, 0},
|
||||||
|
{"file", 1, 0, 0},
|
||||||
|
{0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
|
c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||||
|
long_options, &option_index);
|
||||||
|
if (c == -1)
|
||||||
|
break;
|
||||||
|
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
printf ("option %s", long_options[option_index].name);
|
||||||
|
if (optarg)
|
||||||
|
printf (" with arg %s", optarg);
|
||||||
|
printf ("\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '0':
|
||||||
|
case '1':
|
||||||
|
case '2':
|
||||||
|
case '3':
|
||||||
|
case '4':
|
||||||
|
case '5':
|
||||||
|
case '6':
|
||||||
|
case '7':
|
||||||
|
case '8':
|
||||||
|
case '9':
|
||||||
|
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||||
|
printf ("digits occur in two different argv-elements.\n");
|
||||||
|
digit_optind = this_option_optind;
|
||||||
|
printf ("option %c\n", c);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'a':
|
||||||
|
printf ("option a\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'b':
|
||||||
|
printf ("option b\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
printf ("option c with value '%s'\n", optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'd':
|
||||||
|
printf ("option d with value '%s'\n", optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '?':
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
printf ("?? getopt returned character code 0%o ??\n", c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (optind < argc)
|
||||||
|
{
|
||||||
|
printf ("non-option ARGV-elements: ");
|
||||||
|
while (optind < argc)
|
||||||
|
printf ("%s ", argv[optind++]);
|
||||||
|
printf ("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
exit (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* TEST */
|
||||||
57
gettext.h
Normal file
57
gettext.h
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||||
|
Copyright (C) 1995-2012 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 _LIBGETTEXT_H
|
||||||
|
#define _LIBGETTEXT_H 1
|
||||||
|
|
||||||
|
/* NLS can be disabled through the configure --disable-nls option. */
|
||||||
|
#if ENABLE_NLS
|
||||||
|
|
||||||
|
/* Get declarations of GNU message catalog functions. */
|
||||||
|
# include <libintl.h>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* Disabled NLS.
|
||||||
|
The casts to 'const char *' serve the purpose of producing warnings
|
||||||
|
for invalid uses of the value returned from these functions.
|
||||||
|
On pre-ANSI systems without 'const', the config.h file is supposed to
|
||||||
|
contain "#define const". */
|
||||||
|
# define gettext(Msgid) ((const char *) (Msgid))
|
||||||
|
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
|
||||||
|
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
|
||||||
|
# define ngettext(Msgid1, Msgid2, N) \
|
||||||
|
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||||
|
# define dngettext(Domainname, Msgid1, Msgid2, N) \
|
||||||
|
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||||
|
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
|
||||||
|
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
|
||||||
|
# define textdomain(Domainname) ((const char *) (Domainname))
|
||||||
|
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
|
||||||
|
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* A pseudo function call that serves as a marker for the automated
|
||||||
|
extraction of messages, but does not call gettext(). The run-time
|
||||||
|
translation is done at a different place in the code.
|
||||||
|
The argument, String, should be a literal string. Concatenated strings
|
||||||
|
and other string expressions won't work.
|
||||||
|
The macro's expansion is not parenthesized, so that it is suitable as
|
||||||
|
initializer for static 'char[]' or 'const char[]' variables. */
|
||||||
|
#define gettext_noop(String) String
|
||||||
|
|
||||||
|
#endif /* _LIBGETTEXT_H */
|
||||||
2
glob/.cvsignore
Normal file
2
glob/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile Makefile.in
|
||||||
|
.deps
|
||||||
@@ -1,481 +0,0 @@
|
|||||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
|
||||||
675 Mass Ave, Cambridge, MA 02139, USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the library GPL. It is
|
|
||||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Library General Public License, applies to some
|
|
||||||
specially designated Free Software Foundation software, and to any
|
|
||||||
other libraries whose authors decide to use it. You can use it for
|
|
||||||
your libraries, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if
|
|
||||||
you distribute copies of the library, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link a program with the library, you must provide
|
|
||||||
complete object files to the recipients so that they can relink them
|
|
||||||
with the library, after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
Our method of protecting your rights has two steps: (1) copyright
|
|
||||||
the library, and (2) offer you this license which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
Also, for each distributor's protection, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
library. If the library is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original
|
|
||||||
version, so that any problems introduced by others will not reflect on
|
|
||||||
the original authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that companies distributing free
|
|
||||||
software will individually obtain patent licenses, thus in effect
|
|
||||||
transforming the program into proprietary software. To prevent this,
|
|
||||||
we have made it clear that any patent must be licensed for everyone's
|
|
||||||
free use or not licensed at all.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the ordinary
|
|
||||||
GNU General Public License, which was designed for utility programs. This
|
|
||||||
license, the GNU Library General Public License, applies to certain
|
|
||||||
designated libraries. This license is quite different from the ordinary
|
|
||||||
one; be sure to read it in full, and don't assume that anything in it is
|
|
||||||
the same as in the ordinary license.
|
|
||||||
|
|
||||||
The reason we have a separate public license for some libraries is that
|
|
||||||
they blur the distinction we usually make between modifying or adding to a
|
|
||||||
program and simply using it. Linking a program with a library, without
|
|
||||||
changing the library, is in some sense simply using the library, and is
|
|
||||||
analogous to running a utility program or application program. However, in
|
|
||||||
a textual and legal sense, the linked executable is a combined work, a
|
|
||||||
derivative of the original library, and the ordinary General Public License
|
|
||||||
treats it as such.
|
|
||||||
|
|
||||||
Because of this blurred distinction, using the ordinary General
|
|
||||||
Public License for libraries did not effectively promote software
|
|
||||||
sharing, because most developers did not use the libraries. We
|
|
||||||
concluded that weaker conditions might promote sharing better.
|
|
||||||
|
|
||||||
However, unrestricted linking of non-free programs would deprive the
|
|
||||||
users of those programs of all benefit from the free status of the
|
|
||||||
libraries themselves. This Library General Public License is intended to
|
|
||||||
permit developers of non-free programs to use free libraries, while
|
|
||||||
preserving your freedom as a user of such programs to change the free
|
|
||||||
libraries that are incorporated in them. (We have not seen how to achieve
|
|
||||||
this as regards changes in header files, but we have achieved it as regards
|
|
||||||
changes in the actual functions of the Library.) The hope is that this
|
|
||||||
will lead to faster development of free libraries.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, while the latter only
|
|
||||||
works together with the library.
|
|
||||||
|
|
||||||
Note that it is possible for a library to be covered by the ordinary
|
|
||||||
General Public License rather than by this special one.
|
|
||||||
|
|
||||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library which
|
|
||||||
contains a notice placed by the copyright holder or other authorized
|
|
||||||
party saying it may be distributed under the terms of this Library
|
|
||||||
General Public License (also called "this License"). Each licensee is
|
|
||||||
addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, 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 library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete 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 distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
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 Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you 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.
|
|
||||||
|
|
||||||
If distribution of 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 satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also compile or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
c) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
d) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. 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.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library 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.
|
|
||||||
|
|
||||||
9. 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 Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library 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 Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library 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.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Library 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 Library
|
|
||||||
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 Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
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.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. 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 LIBRARY 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
|
|
||||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
Appendix: How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
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; if not, write to the Free
|
|
||||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
162
glob/ChangeLog
162
glob/ChangeLog
@@ -1,3 +1,148 @@
|
|||||||
|
2008-09-28 Juan Manuel Guerrero <juan.guerrero@gmx.de>
|
||||||
|
|
||||||
|
* glob.c (my_realloc) [__DJGPP__]: Don't define, and don't
|
||||||
|
redefine realloc to call it, since the DJGPP's realloc handles
|
||||||
|
NULL pointers correctly.
|
||||||
|
|
||||||
|
2007-12-22 Juan Manuel Guerrero <juan.guerrero@gmx.de> (tiny change)
|
||||||
|
|
||||||
|
* glob.c [__GNU_LIBRARY__ && __DJGPP__]: Add a realloc
|
||||||
|
declaration that matches the one in the DJGPP libc.
|
||||||
|
|
||||||
|
2006-02-24 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* glob.c (my_malloc) [WINDOWS32]: Provide a full ISO C prototype,
|
||||||
|
to avoid compiler warnings.
|
||||||
|
|
||||||
|
2005-06-25 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* fnmatch.h, glob.h [WINDOWS32]: Fix ifdefs in headers.
|
||||||
|
Fixes Savannah bug #13477.
|
||||||
|
|
||||||
|
2005-03-11 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c (glob_in_dir): Change FNM_CASEFOLD to be enabled if
|
||||||
|
HAVE_CASE_INSENSITIVE_FS is defined.
|
||||||
|
|
||||||
|
2003-01-30 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.h: Patch for FreeBSD by Mike Barcroft <mike@freebsd.org>
|
||||||
|
Reported by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>. On
|
||||||
|
FreeBSD, declare __size_t to simply size_t.
|
||||||
|
|
||||||
|
2002-04-22 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* Makefile.am: Use automake 1.6.
|
||||||
|
Use new automake condition USE_LOCAL_GLOB to decide whether or not
|
||||||
|
to build the local GNU glob library or use the system one.
|
||||||
|
|
||||||
|
1999-09-12 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* fnmatch.c: Last GLIBC version wouldn't compile outside of GLIBC
|
||||||
|
(undefined reference to internal_function). Update to the latest
|
||||||
|
version
|
||||||
|
|
||||||
|
1999-09-11 Paul Eggert <eggert@twinsun.com>
|
||||||
|
|
||||||
|
* glob.h (glob): If #defining to glob64, do this before
|
||||||
|
declaring it, so that all declarations and uses match, and
|
||||||
|
do not declare glob64, to avoid a declaration clash.
|
||||||
|
(globfree): Likewise with globfree64.
|
||||||
|
|
||||||
|
1999-09-08 Eli Zaretskii <eliz@is.elta.co.il>
|
||||||
|
|
||||||
|
* glob.c (prefix_array) [__MSDOS__,WINDOWS32]: Keep the trailing
|
||||||
|
slash unless DIRNAME is just "x:/".
|
||||||
|
|
||||||
|
1999-09-06 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* fnmatch.c: Update to latest version from GLIBC.
|
||||||
|
|
||||||
|
1999-07-21 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c, glob.h, fnmatch.c, fnmatch.h: Update to latest version
|
||||||
|
from GLIBC.
|
||||||
|
|
||||||
|
* fnmatch.c (internal_fnmatch): Use K&R definition syntax, not ANSI.
|
||||||
|
(__strchrnul): This won't exist outside GLIBC, so create one.
|
||||||
|
|
||||||
|
* glob.c: Move getlogin{,_r} prototypes below glob.h to get __P()
|
||||||
|
macro.
|
||||||
|
|
||||||
|
1998-08-05 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* configure.in: Remove; configuration for glob is handled by the
|
||||||
|
make configure.in.
|
||||||
|
|
||||||
|
1998-07-29 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c, fnmatch.c: New versions from the GLIBC folks (Ulrich
|
||||||
|
Drepper). Fixes a bug reported by Eli Zaretski. Integrates
|
||||||
|
DOS/Windows32 support.
|
||||||
|
|
||||||
|
1998-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* glob.c (glob): Cast away const on assignment of pattern to dirname.
|
||||||
|
Cast the return type of __alloca() for traditional C compilers.
|
||||||
|
|
||||||
|
1998-07-23 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c, fnmatch.c: New versions of these files from the GLIBC
|
||||||
|
folks (Ulrich Drepper). Had to re-integrate some DOS/Windows
|
||||||
|
code.
|
||||||
|
|
||||||
|
1998-07-10 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* glob.c (glob_in_dir): If no meta chars exist in PATTERN and
|
||||||
|
GLOB_NOCHECK is present, don't look for the file--whether it's
|
||||||
|
found or not, we'll always return it, so why bother searching?
|
||||||
|
|
||||||
|
Also, if we are searching and there are no meta chars, don't
|
||||||
|
bother trying fnmatch() if the strcmp() fails.
|
||||||
|
|
||||||
|
1998-05-30 Eli Zaretskii <eliz@is.elta.co.il>
|
||||||
|
|
||||||
|
* glob.c (glob) [__MSDOS__, WINDOWS32]: Compute the directory and
|
||||||
|
filename parts of the pattern correctly when it includes a drive
|
||||||
|
spec. Disallow wildcards in the drive spec. Prevent recursion
|
||||||
|
when dirname is of the form "d:/" or "d:".
|
||||||
|
(prefix_array) [__MSDOS__, WINDOWS32]: Don't append a slash to
|
||||||
|
"d:/" and "d:".
|
||||||
|
|
||||||
|
1998-05-13 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* SMakefile, Makefile.ami, glob.c, glob.h, fnmatch.c: Updated from
|
||||||
|
the latest glibc version.
|
||||||
|
|
||||||
|
1998-04-17 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* configure.in: Create a config.h file instead of setting things
|
||||||
|
on the compile line. This is because when build.sh runs it merely
|
||||||
|
passes -DHAVE_CONFIG_H to the glob files, just as it does to the
|
||||||
|
make files.
|
||||||
|
* config.h.in: Created by autoheader.
|
||||||
|
|
||||||
|
Tue Aug 12 10:52:34 1997 Paul D. Smith <psmith@baynetworks.com>
|
||||||
|
|
||||||
|
* configure.in: Require autoconf 2.12.
|
||||||
|
|
||||||
|
* glob: Updates from latest GNU libc glob code.
|
||||||
|
|
||||||
|
* glob.c,glob.h,fnmatch.h: Change all WIN32 references to WINDOWS32.
|
||||||
|
|
||||||
|
* glob.h: OSF4 defines macros in such a way that GLOB_ALTDIRFUNC
|
||||||
|
is not defined. Added a test to the #if which defines it if
|
||||||
|
_GNU_SOURCE is defined; that's set by both glob.c and GNU make.
|
||||||
|
|
||||||
|
* glob.c: SunOS4 w/ cc needs #include <stdio.h>, since assert.h
|
||||||
|
requires stderr but doesn't include stdio.h :-/.
|
||||||
|
(next_brace_sub): De-protoize function definition.
|
||||||
|
(glob): Cast __alloca(); on SunOS4 it uses the default return type
|
||||||
|
of int.
|
||||||
|
(glob): Irix defines getlogin_r() to return a char*; move the
|
||||||
|
extern for that into the _LIBC area since it isn't used except in
|
||||||
|
LIBC anyway. Likewise, move extern getlogin() into the "else".
|
||||||
|
|
||||||
Sat Jul 20 21:55:31 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
Sat Jul 20 21:55:31 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||||
|
|
||||||
Win32 hacks from <Rob_Tulloh@tivoli.com>.
|
Win32 hacks from <Rob_Tulloh@tivoli.com>.
|
||||||
@@ -20,4 +165,21 @@ Fri Jun 21 00:27:51 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
|||||||
|
|
||||||
* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
|
* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
|
||||||
only for ?s, not for *s. Fix from Chet Ramey.
|
only for ?s, not for *s. Fix from Chet Ramey.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
|
||||||
|
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
This file is part of GNU Make.
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|||||||
30
glob/Makefile.am
Normal file
30
glob/Makefile.am
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# -*-Makefile-*-, or close enough
|
||||||
|
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
|
# details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along with
|
||||||
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
# Only build the library when the system doesn't already have GNU glob.
|
||||||
|
if USE_LOCAL_GLOB
|
||||||
|
noinst_LIBRARIES = libglob.a
|
||||||
|
endif
|
||||||
|
|
||||||
|
libglob_a_SOURCES = glob.c glob.h fnmatch.c fnmatch.h
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_DIST = COPYING.LIB Makefile.ami SCOPTIONS SMakefile \
|
||||||
|
configure.bat
|
||||||
@@ -1,22 +1,20 @@
|
|||||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
# Makefile for standalone libglob.a (fnmatch, glob). -*-Makefile-*-
|
||||||
|
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# Copyright (C) 1991, 92, 93, 94, 95 Free Software Foundation, Inc.
|
# 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# modify it under the terms of the GNU Library General Public License
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# as published by the Free Software Foundation; either version 2 of
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# the License, or (at your option) any later version.
|
# version.
|
||||||
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# Library General Public License for more details.
|
# details.
|
||||||
|
#
|
||||||
# You should have received a copy of the GNU Library General Public
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# License along with this library; see the file COPYING.LIB. If
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
|
||||||
# Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||||
VPATH = /glob/
|
VPATH = /glob/
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
|
||||||
|
|
||||||
# Copyright (C) 1991, 92, 93, 94, 95 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., 675 Mass Ave,
|
|
||||||
# Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
|
||||||
VPATH = @srcdir@
|
|
||||||
# This must repeat the value, because configure will remove `VPATH = .'.
|
|
||||||
srcdir = @srcdir@
|
|
||||||
|
|
||||||
CC = @CC@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
|
|
||||||
# Information determined by configure.
|
|
||||||
DEFS = @DEFS@
|
|
||||||
|
|
||||||
# How to invoke ar.
|
|
||||||
AR = @AR@
|
|
||||||
ARFLAGS = rv
|
|
||||||
|
|
||||||
# How to invoke ranlib.
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: libglob.a
|
|
||||||
|
|
||||||
libglob.a: glob.o fnmatch.o
|
|
||||||
$(AR) $(ARFLAGS) $@ glob.o fnmatch.o
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
# For some reason, Unix make wants the dependencies on the source files.
|
|
||||||
# Otherwise it refuses to use an implicit rule!
|
|
||||||
# And, get this: it doesn't work to use $(srcdir)/foo.c!!
|
|
||||||
glob.o: $(srcdir)/glob.h $(srcdir)/fnmatch.h glob.c
|
|
||||||
fnmatch.o: $(srcdir)/fnmatch.h fnmatch.c
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
$(CC) -I. -I$(srcdir) -c \
|
|
||||||
$(DEFS) $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
|
|
||||||
|
|
||||||
.PHONY: clean realclean glob-clean glob-realclean distclean
|
|
||||||
clean glob-clean:
|
|
||||||
-rm -f libglob.a *.o core
|
|
||||||
distclean glob-realclean: clean
|
|
||||||
-rm -f TAGS tags Makefile config.status config.h config.log
|
|
||||||
realcean: distclean
|
|
||||||
|
|
||||||
# For inside the C library.
|
|
||||||
glob.tar glob.tar.Z:
|
|
||||||
$(MAKE) -C .. $@
|
|
||||||
@@ -1,22 +1,20 @@
|
|||||||
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
# Makefile for standalone distribution of libglob.a (fnmatch, glob).
|
||||||
|
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# Copyright (C) 1991, 92, 93, 94, 95 Free Software Foundation, Inc.
|
# 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of GNU Make.
|
||||||
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# GNU Make is free software; you can redistribute it and/or modify it under
|
||||||
# modify it under the terms of the GNU Library General Public License
|
# the terms of the GNU General Public License as published by the Free Software
|
||||||
# as published by the Free Software Foundation; either version 2 of
|
# Foundation; either version 3 of the License, or (at your option) any later
|
||||||
# the License, or (at your option) any later version.
|
# version.
|
||||||
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||||
# Library General Public License for more details.
|
# details.
|
||||||
|
#
|
||||||
# You should have received a copy of the GNU Library General Public
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# License along with this library; see the file COPYING.LIB. If
|
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
|
||||||
# Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
# Ultrix 2.2 make doesn't expand the value of VPATH.
|
||||||
VPATH = /glob/
|
VPATH = /glob/
|
||||||
|
|||||||
1664
glob/configure
vendored
1664
glob/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,22 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo Configuring glob for GO32
|
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
|
rem This batch file assumes a unix-type "sed" program
|
||||||
|
|
||||||
echo # Makefile generated by "configure.bat"> Makefile
|
echo # Makefile generated by "configure.bat"> Makefile
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
|
||||||
AC_INIT(fnmatch.c) dnl A distinctive file to look for in srcdir.
|
|
||||||
AC_PREREQ(2.1) dnl Minimum Autoconf version required.
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_CHECK_PROG(AR, ar, ar, ar)
|
|
||||||
AC_PROG_RANLIB
|
|
||||||
AC_PROG_CPP dnl Later checks need this.
|
|
||||||
dnl These two want to come early.
|
|
||||||
AC_AIX
|
|
||||||
AC_MINIX
|
|
||||||
AC_ISC_POSIX
|
|
||||||
AC_CONST
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_CHECK_HEADERS(memory.h unistd.h string.h)
|
|
||||||
AC_HEADER_DIRENT
|
|
||||||
AC_FUNC_CLOSEDIR_VOID
|
|
||||||
AC_FUNC_ALLOCA
|
|
||||||
AC_FUNC_STRCOLL
|
|
||||||
AC_OUTPUT(Makefile)
|
|
||||||
351
glob/fnmatch.c
351
glob/fnmatch.c
@@ -1,4 +1,6 @@
|
|||||||
/* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
|
/* 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
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@@ -10,12 +12,12 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public License
|
||||||
License along with this library; see the file COPYING.LIB. If
|
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||||
Cambridge, MA 02139, USA. */
|
USA. */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -28,6 +30,23 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#if HAVE_STRING_H || defined _LIBC
|
||||||
|
# include <string.h>
|
||||||
|
#else
|
||||||
|
# include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined STDC_HEADERS || defined _LIBC
|
||||||
|
# include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For platform which support the ISO C amendement 1 functionality we
|
||||||
|
support user defined character classes. */
|
||||||
|
#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
||||||
|
# include <wchar.h>
|
||||||
|
# include <wctype.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||||
actually compiling the library itself. This code is part of the GNU C
|
actually compiling the library itself. This code is part of the GNU C
|
||||||
@@ -37,26 +56,121 @@ Cambridge, MA 02139, USA. */
|
|||||||
program understand `configure --with-gnu-libc' and omit the object files,
|
program understand `configure --with-gnu-libc' and omit the object files,
|
||||||
it is simpler to just do this in the source for each such file. */
|
it is simpler to just do this in the source for each such file. */
|
||||||
|
|
||||||
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
|
#if defined _LIBC || !defined __GNU_LIBRARY__
|
||||||
|
|
||||||
|
|
||||||
|
# if defined STDC_HEADERS || !defined isascii
|
||||||
|
# define ISASCII(c) 1
|
||||||
|
# else
|
||||||
|
# define ISASCII(c) isascii(c)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef isblank
|
||||||
|
# define ISBLANK(c) (ISASCII (c) && isblank (c))
|
||||||
|
# else
|
||||||
|
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
|
||||||
|
# endif
|
||||||
|
# ifdef isgraph
|
||||||
|
# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
|
||||||
|
# else
|
||||||
|
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# define ISPRINT(c) (ISASCII (c) && isprint (c))
|
||||||
|
# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
|
||||||
|
# define ISALNUM(c) (ISASCII (c) && isalnum (c))
|
||||||
|
# define ISALPHA(c) (ISASCII (c) && isalpha (c))
|
||||||
|
# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
|
||||||
|
# define ISLOWER(c) (ISASCII (c) && islower (c))
|
||||||
|
# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
|
||||||
|
# define ISSPACE(c) (ISASCII (c) && isspace (c))
|
||||||
|
# define ISUPPER(c) (ISASCII (c) && isupper (c))
|
||||||
|
# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
|
||||||
|
|
||||||
|
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||||
|
|
||||||
|
# if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
/* The GNU C library provides support for user-defined character classes
|
||||||
|
and the functions from ISO C amendement 1. */
|
||||||
|
# ifdef CHARCLASS_NAME_MAX
|
||||||
|
# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
|
||||||
|
# else
|
||||||
|
/* This shouldn't happen but some implementation might still have this
|
||||||
|
problem. Use a reasonable default value. */
|
||||||
|
# define CHAR_CLASS_MAX_LENGTH 256
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef _LIBC
|
||||||
|
# define IS_CHAR_CLASS(string) __wctype (string)
|
||||||
|
# else
|
||||||
|
# define IS_CHAR_CLASS(string) wctype (string)
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
|
||||||
|
|
||||||
|
# define IS_CHAR_CLASS(string) \
|
||||||
|
(STREQ (string, "alpha") || STREQ (string, "upper") \
|
||||||
|
|| STREQ (string, "lower") || STREQ (string, "digit") \
|
||||||
|
|| STREQ (string, "alnum") || STREQ (string, "xdigit") \
|
||||||
|
|| STREQ (string, "space") || STREQ (string, "print") \
|
||||||
|
|| STREQ (string, "punct") || STREQ (string, "graph") \
|
||||||
|
|| STREQ (string, "cntrl") || STREQ (string, "blank"))
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Avoid depending on library functions or files
|
||||||
|
whose names are inconsistent. */
|
||||||
|
|
||||||
|
# if !defined _LIBC && !defined getenv
|
||||||
|
extern char *getenv ();
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifndef errno
|
# ifndef errno
|
||||||
extern int errno;
|
extern int errno;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
/* This function doesn't exist on most systems. */
|
||||||
|
|
||||||
|
# if !defined HAVE___STRCHRNUL && !defined _LIBC
|
||||||
|
static char *
|
||||||
|
__strchrnul (s, c)
|
||||||
|
const char *s;
|
||||||
|
int c;
|
||||||
|
{
|
||||||
|
char *result = strchr (s, c);
|
||||||
|
if (result == NULL)
|
||||||
|
result = strchr (s, '\0');
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifndef internal_function
|
||||||
|
/* Inside GNU libc we mark some function in a special way. In other
|
||||||
|
environments simply ignore the marking. */
|
||||||
|
# define internal_function
|
||||||
|
# endif
|
||||||
|
|
||||||
/* Match STRING against the filename pattern PATTERN, returning zero if
|
/* Match STRING against the filename pattern PATTERN, returning zero if
|
||||||
it matches, nonzero if not. */
|
it matches, nonzero if not. */
|
||||||
int
|
static int internal_fnmatch __P ((const char *pattern, const char *string,
|
||||||
fnmatch (pattern, string, flags)
|
int no_leading_period, int flags))
|
||||||
|
internal_function;
|
||||||
|
static int
|
||||||
|
internal_function
|
||||||
|
internal_fnmatch (pattern, string, no_leading_period, flags)
|
||||||
const char *pattern;
|
const char *pattern;
|
||||||
const char *string;
|
const char *string;
|
||||||
|
int no_leading_period;
|
||||||
int flags;
|
int flags;
|
||||||
{
|
{
|
||||||
register const char *p = pattern, *n = string;
|
register const char *p = pattern, *n = string;
|
||||||
register char c;
|
register unsigned char c;
|
||||||
|
|
||||||
/* Note that this evalutes C many times. */
|
/* Note that this evaluates C many times. */
|
||||||
#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c))
|
# ifdef _LIBC
|
||||||
|
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
|
||||||
|
# else
|
||||||
|
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
|
||||||
|
# endif
|
||||||
|
|
||||||
while ((c = *p++) != '\0')
|
while ((c = *p++) != '\0')
|
||||||
{
|
{
|
||||||
@@ -67,10 +181,11 @@ fnmatch (pattern, string, flags)
|
|||||||
case '?':
|
case '?':
|
||||||
if (*n == '\0')
|
if (*n == '\0')
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
else if ((flags & FNM_FILE_NAME) && *n == '/')
|
else if (*n == '/' && (flags & FNM_FILE_NAME))
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
else if ((flags & FNM_PERIOD) && *n == '.' &&
|
else if (*n == '.' && no_leading_period
|
||||||
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
&& (n == string
|
||||||
|
|| (n[-1] == '/' && (flags & FNM_FILE_NAME))))
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -83,18 +198,19 @@ fnmatch (pattern, string, flags)
|
|||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
c = FOLD (c);
|
c = FOLD (c);
|
||||||
}
|
}
|
||||||
if (FOLD (*n) != c)
|
if (FOLD ((unsigned char) *n) != c)
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '*':
|
case '*':
|
||||||
if ((flags & FNM_PERIOD) && *n == '.' &&
|
if (*n == '.' && no_leading_period
|
||||||
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
&& (n == string
|
||||||
|
|| (n[-1] == '/' && (flags & FNM_FILE_NAME))))
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
for (c = *p++; c == '?' || c == '*'; c = *p++)
|
for (c = *p++; c == '?' || c == '*'; c = *p++)
|
||||||
{
|
{
|
||||||
if ((flags & FNM_FILE_NAME) && *n == '/')
|
if (*n == '/' && (flags & FNM_FILE_NAME))
|
||||||
/* A slash does not match a wildcard under FNM_FILE_NAME. */
|
/* A slash does not match a wildcard under FNM_FILE_NAME. */
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
else if (c == '?')
|
else if (c == '?')
|
||||||
@@ -112,82 +228,204 @@ fnmatch (pattern, string, flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (c == '\0')
|
if (c == '\0')
|
||||||
return 0;
|
/* The wildcard(s) is/are the last element of the pattern.
|
||||||
|
If the name is a file name and contains another slash
|
||||||
|
this does mean it cannot match. */
|
||||||
|
return ((flags & FNM_FILE_NAME) && strchr (n, '/') != NULL
|
||||||
|
? FNM_NOMATCH : 0);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
|
const char *endp;
|
||||||
c1 = FOLD (c1);
|
|
||||||
for (--p; *n != '\0'; ++n)
|
endp = __strchrnul (n, (flags & FNM_FILE_NAME) ? '/' : '\0');
|
||||||
if ((c == '[' || FOLD (*n) == c1) &&
|
|
||||||
fnmatch (p, n, flags & ~FNM_PERIOD) == 0)
|
if (c == '[')
|
||||||
|
{
|
||||||
|
int flags2 = ((flags & FNM_FILE_NAME)
|
||||||
|
? flags : (flags & ~FNM_PERIOD));
|
||||||
|
|
||||||
|
for (--p; n < endp; ++n)
|
||||||
|
if (internal_fnmatch (p, n,
|
||||||
|
(no_leading_period
|
||||||
|
&& (n == string
|
||||||
|
|| (n[-1] == '/'
|
||||||
|
&& (flags
|
||||||
|
& FNM_FILE_NAME)))),
|
||||||
|
flags2)
|
||||||
|
== 0)
|
||||||
return 0;
|
return 0;
|
||||||
return FNM_NOMATCH;
|
|
||||||
}
|
}
|
||||||
|
else if (c == '/' && (flags & FNM_FILE_NAME))
|
||||||
|
{
|
||||||
|
while (*n != '\0' && *n != '/')
|
||||||
|
++n;
|
||||||
|
if (*n == '/'
|
||||||
|
&& (internal_fnmatch (p, n + 1, flags & FNM_PERIOD,
|
||||||
|
flags) == 0))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int flags2 = ((flags & FNM_FILE_NAME)
|
||||||
|
? flags : (flags & ~FNM_PERIOD));
|
||||||
|
|
||||||
|
if (c == '\\' && !(flags & FNM_NOESCAPE))
|
||||||
|
c = *p;
|
||||||
|
c = FOLD (c);
|
||||||
|
for (--p; n < endp; ++n)
|
||||||
|
if (FOLD ((unsigned char) *n) == c
|
||||||
|
&& (internal_fnmatch (p, n,
|
||||||
|
(no_leading_period
|
||||||
|
&& (n == string
|
||||||
|
|| (n[-1] == '/'
|
||||||
|
&& (flags
|
||||||
|
& FNM_FILE_NAME)))),
|
||||||
|
flags2) == 0))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we come here no match is possible with the wildcard. */
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
case '[':
|
case '[':
|
||||||
{
|
{
|
||||||
/* Nonzero if the sense of the character class is inverted. */
|
/* Nonzero if the sense of the character class is inverted. */
|
||||||
|
static int posixly_correct;
|
||||||
register int not;
|
register int not;
|
||||||
|
char cold;
|
||||||
|
|
||||||
|
if (posixly_correct == 0)
|
||||||
|
posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
|
||||||
|
|
||||||
if (*n == '\0')
|
if (*n == '\0')
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
if ((flags & FNM_PERIOD) && *n == '.' &&
|
if (*n == '.' && no_leading_period && (n == string
|
||||||
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/')))
|
|| (n[-1] == '/'
|
||||||
|
&& (flags
|
||||||
|
& FNM_FILE_NAME))))
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
not = (*p == '!' || *p == '^');
|
if (*n == '/' && (flags & FNM_FILE_NAME))
|
||||||
|
/* `/' cannot be matched. */
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
|
not = (*p == '!' || (posixly_correct < 0 && *p == '^'));
|
||||||
if (not)
|
if (not)
|
||||||
++p;
|
++p;
|
||||||
|
|
||||||
c = *p++;
|
c = *p++;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
register char cstart = c, cend = c;
|
unsigned char fn = FOLD ((unsigned char) *n);
|
||||||
|
|
||||||
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
||||||
{
|
{
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
cstart = cend = *p++;
|
c = FOLD ((unsigned char) *p);
|
||||||
|
++p;
|
||||||
|
|
||||||
|
if (c == fn)
|
||||||
|
goto matched;
|
||||||
}
|
}
|
||||||
|
else if (c == '[' && *p == ':')
|
||||||
|
{
|
||||||
|
/* Leave room for the null. */
|
||||||
|
char str[CHAR_CLASS_MAX_LENGTH + 1];
|
||||||
|
size_t c1 = 0;
|
||||||
|
# if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
wctype_t wt;
|
||||||
|
# endif
|
||||||
|
const char *startp = p;
|
||||||
|
|
||||||
cstart = cend = FOLD (cstart);
|
for (;;)
|
||||||
|
{
|
||||||
|
if (c1 == CHAR_CLASS_MAX_LENGTH)
|
||||||
|
/* The name is too long and therefore the pattern
|
||||||
|
is ill-formed. */
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
if (c == '\0')
|
c = *++p;
|
||||||
|
if (c == ':' && p[1] == ']')
|
||||||
|
{
|
||||||
|
p += 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (c < 'a' || c >= 'z')
|
||||||
|
{
|
||||||
|
/* This cannot possibly be a character class name.
|
||||||
|
Match it as a normal range. */
|
||||||
|
p = startp;
|
||||||
|
c = '[';
|
||||||
|
goto normal_bracket;
|
||||||
|
}
|
||||||
|
str[c1++] = c;
|
||||||
|
}
|
||||||
|
str[c1] = '\0';
|
||||||
|
|
||||||
|
# if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
|
||||||
|
wt = IS_CHAR_CLASS (str);
|
||||||
|
if (wt == 0)
|
||||||
|
/* Invalid character class name. */
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
|
if (__iswctype (__btowc ((unsigned char) *n), wt))
|
||||||
|
goto matched;
|
||||||
|
# else
|
||||||
|
if ((STREQ (str, "alnum") && ISALNUM ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "alpha") && ISALPHA ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "blank") && ISBLANK ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "cntrl") && ISCNTRL ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "digit") && ISDIGIT ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "graph") && ISGRAPH ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "lower") && ISLOWER ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "print") && ISPRINT ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "punct") && ISPUNCT ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "space") && ISSPACE ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "upper") && ISUPPER ((unsigned char) *n))
|
||||||
|
|| (STREQ (str, "xdigit") && ISXDIGIT ((unsigned char) *n)))
|
||||||
|
goto matched;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
else if (c == '\0')
|
||||||
/* [ (unterminated) loses. */
|
/* [ (unterminated) loses. */
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
normal_bracket:
|
||||||
|
if (FOLD (c) == fn)
|
||||||
|
goto matched;
|
||||||
|
|
||||||
|
cold = c;
|
||||||
c = *p++;
|
c = *p++;
|
||||||
c = FOLD (c);
|
|
||||||
|
|
||||||
if ((flags & FNM_FILE_NAME) && c == '/')
|
|
||||||
/* [/] can never match. */
|
|
||||||
return FNM_NOMATCH;
|
|
||||||
|
|
||||||
if (c == '-' && *p != ']')
|
if (c == '-' && *p != ']')
|
||||||
{
|
{
|
||||||
cend = *p++;
|
/* It is a range. */
|
||||||
|
unsigned char cend = *p++;
|
||||||
if (!(flags & FNM_NOESCAPE) && cend == '\\')
|
if (!(flags & FNM_NOESCAPE) && cend == '\\')
|
||||||
cend = *p++;
|
cend = *p++;
|
||||||
if (cend == '\0')
|
if (cend == '\0')
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
cend = FOLD (cend);
|
|
||||||
|
if (cold <= fn && fn <= FOLD (cend))
|
||||||
|
goto matched;
|
||||||
|
|
||||||
c = *p++;
|
c = *p++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (FOLD (*n) >= cstart && FOLD (*n) <= cend)
|
|
||||||
goto matched;
|
|
||||||
|
|
||||||
if (c == ']')
|
if (c == ']')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!not)
|
if (!not)
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
matched:;
|
matched:
|
||||||
/* Skip the rest of the [...] that already matched. */
|
/* Skip the rest of the [...] that already matched. */
|
||||||
while (c != ']')
|
while (c != ']')
|
||||||
{
|
{
|
||||||
@@ -203,6 +441,15 @@ fnmatch (pattern, string, flags)
|
|||||||
/* XXX 1003.2d11 is unclear if this is right. */
|
/* XXX 1003.2d11 is unclear if this is right. */
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
|
else if (c == '[' && *p == ':')
|
||||||
|
{
|
||||||
|
do
|
||||||
|
if (*++p == '\0')
|
||||||
|
return FNM_NOMATCH;
|
||||||
|
while (*p != ':' || p[1] == ']');
|
||||||
|
p += 2;
|
||||||
|
c = *p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (not)
|
if (not)
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
@@ -210,7 +457,7 @@ fnmatch (pattern, string, flags)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (c != FOLD (*n))
|
if (c != FOLD ((unsigned char) *n))
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,6 +472,18 @@ fnmatch (pattern, string, flags)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
|
|
||||||
|
# undef FOLD
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
fnmatch (pattern, string, flags)
|
||||||
|
const char *pattern;
|
||||||
|
const char *string;
|
||||||
|
int flags;
|
||||||
|
{
|
||||||
|
return internal_fnmatch (pattern, string, flags & FNM_PERIOD, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
||||||
|
|||||||
@@ -1,32 +1,34 @@
|
|||||||
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
/* 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
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
published by the Free Software Foundation; either version 2 of the
|
published by the Free Software Foundation; either version 2 of the
|
||||||
License, or (at your option) any later version.
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public License
|
||||||
License along with this library; see the file COPYING.LIB. If
|
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||||
Cambridge, MA 02139, USA. */
|
USA. */
|
||||||
|
|
||||||
#ifndef _FNMATCH_H
|
#ifndef _FNMATCH_H
|
||||||
|
|
||||||
#define _FNMATCH_H 1
|
#define _FNMATCH_H 1
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
|
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||||
|| defined (WIN32))
|
# if !defined __GLIBC__
|
||||||
# undef __P
|
# undef __P
|
||||||
# define __P(protos) protos
|
# define __P(protos) protos
|
||||||
|
# endif
|
||||||
#else /* Not C++ or ANSI C. */
|
#else /* Not C++ or ANSI C. */
|
||||||
# undef __P
|
# undef __P
|
||||||
# define __P(protos) ()
|
# define __P(protos) ()
|
||||||
@@ -35,6 +37,13 @@ extern "C" {
|
|||||||
non-ANSI C where `const' is problematical. */
|
non-ANSI C where `const' is problematical. */
|
||||||
#endif /* C++ or ANSI C. */
|
#endif /* C++ or ANSI C. */
|
||||||
|
|
||||||
|
#ifndef const
|
||||||
|
# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined WINDOWS32
|
||||||
|
# define __const const
|
||||||
|
# else
|
||||||
|
# define __const
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We #undef these before defining them because some losing systems
|
/* We #undef these before defining them because some losing systems
|
||||||
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||||
@@ -47,7 +56,7 @@ extern "C" {
|
|||||||
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||||
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||||
|
|
||||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
|
#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
|
||||||
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||||
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||||
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||||
@@ -56,9 +65,17 @@ extern "C" {
|
|||||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||||
#define FNM_NOMATCH 1
|
#define FNM_NOMATCH 1
|
||||||
|
|
||||||
/* Match STRING against the filename pattern PATTERN,
|
/* This value is returned if the implementation does not support
|
||||||
|
`fnmatch'. Since this is not the case here it will never be
|
||||||
|
returned but the conformance test suites still require the symbol
|
||||||
|
to be defined. */
|
||||||
|
#ifdef _XOPEN_SOURCE
|
||||||
|
# define FNM_NOSYS (-1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Match NAME against the filename pattern PATTERN,
|
||||||
returning zero if it matches, FNM_NOMATCH if not. */
|
returning zero if it matches, FNM_NOMATCH if not. */
|
||||||
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
extern int fnmatch __P ((__const char *__pattern, __const char *__name,
|
||||||
int __flags));
|
int __flags));
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
945
glob/glob.c
945
glob/glob.c
File diff suppressed because it is too large
Load Diff
162
glob/glob.h
162
glob/glob.h
@@ -1,43 +1,78 @@
|
|||||||
/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
published by the Free Software Foundation; either version 2 of the
|
published by the Free Software Foundation; either version 2 of the
|
||||||
License, or (at your option) any later version.
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
The GNU C Library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public License
|
||||||
License along with this library; see the file COPYING.LIB. If
|
along with this library; see the file COPYING.LIB. If not, write to the Free
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||||
Cambridge, MA 02139, USA. */
|
USA. */
|
||||||
|
|
||||||
#ifndef _GLOB_H
|
#ifndef _GLOB_H
|
||||||
|
|
||||||
#define _GLOB_H 1
|
#define _GLOB_H 1
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C" {
|
||||||
{
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef __ptr_t
|
#undef __ptr_t
|
||||||
#if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
|
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||||
|| defined (WIN32))
|
# if !defined __GLIBC__
|
||||||
# undef __P
|
# undef __P
|
||||||
|
# undef __PMT
|
||||||
# define __P(protos) protos
|
# define __P(protos) protos
|
||||||
|
# define __PMT(protos) protos
|
||||||
|
# if !defined __GNUC__ || __GNUC__ < 2
|
||||||
|
# undef __const
|
||||||
|
# define __const const
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
# define __ptr_t void *
|
# define __ptr_t void *
|
||||||
#else /* Not C++ or ANSI C. */
|
#else /* Not C++ or ANSI C. */
|
||||||
# undef __P
|
# undef __P
|
||||||
|
# undef __PMT
|
||||||
# define __P(protos) ()
|
# define __P(protos) ()
|
||||||
#undef const
|
# define __PMT(protos) ()
|
||||||
#define const
|
# undef __const
|
||||||
|
# define __const
|
||||||
# define __ptr_t char *
|
# define __ptr_t char *
|
||||||
#endif /* C++ or ANSI C. */
|
#endif /* C++ or ANSI C. */
|
||||||
|
|
||||||
|
/* We need `size_t' for the following definitions. */
|
||||||
|
#ifndef __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.
|
||||||
|
* 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)
|
||||||
|
typedef unsigned long int __size_t;
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
/* The GNU CC stddef.h version defines __size_t as empty. We need a real
|
||||||
|
definition. */
|
||||||
|
# undef __size_t
|
||||||
|
# define __size_t size_t
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Bits set in the FLAGS argument to `glob'. */
|
/* Bits set in the FLAGS argument to `glob'. */
|
||||||
#define GLOB_ERR (1 << 0)/* Return on read errors. */
|
#define GLOB_ERR (1 << 0)/* Return on read errors. */
|
||||||
#define GLOB_MARK (1 << 1)/* Append a slash to each name. */
|
#define GLOB_MARK (1 << 1)/* Append a slash to each name. */
|
||||||
@@ -47,44 +82,94 @@ extern "C"
|
|||||||
#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */
|
#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */
|
||||||
#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */
|
#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */
|
||||||
#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */
|
#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */
|
||||||
#define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
|
|
||||||
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
|
|
||||||
GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
|
|
||||||
GLOB_NOMAGIC|GLOB_TILDE)
|
|
||||||
|
|
||||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE)
|
#if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE \
|
||||||
|
|| defined _GNU_SOURCE)
|
||||||
# define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */
|
# define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */
|
||||||
# define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */
|
# define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */
|
||||||
# define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */
|
# define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */
|
||||||
# define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */
|
# define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */
|
||||||
# define GLOB_TILDE (1 << 12)/* Expand ~user and ~ to home directories. */
|
# define GLOB_TILDE (1 << 12)/* Expand ~user and ~ to home directories. */
|
||||||
|
# define GLOB_ONLYDIR (1 << 13)/* Match only directories. */
|
||||||
|
# define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error
|
||||||
|
if the user name is not available. */
|
||||||
|
# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
|
||||||
|
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
|
||||||
|
GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
|
||||||
|
GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
|
||||||
|
#else
|
||||||
|
# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
|
||||||
|
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
|
||||||
|
GLOB_PERIOD)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Error returns from `glob'. */
|
/* Error returns from `glob'. */
|
||||||
#define GLOB_NOSPACE 1 /* Ran out of memory. */
|
#define GLOB_NOSPACE 1 /* Ran out of memory. */
|
||||||
#define GLOB_ABEND 2 /* Read error. */
|
#define GLOB_ABORTED 2 /* Read error. */
|
||||||
#define GLOB_NOMATCH 3 /* No matches found. */
|
#define GLOB_NOMATCH 3 /* No matches found. */
|
||||||
|
#define GLOB_NOSYS 4 /* Not implemented. */
|
||||||
|
#ifdef _GNU_SOURCE
|
||||||
|
/* Previous versions of this file defined GLOB_ABEND instead of
|
||||||
|
GLOB_ABORTED. Provide a compatibility definition here. */
|
||||||
|
# define GLOB_ABEND GLOB_ABORTED
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Structure describing a globbing run. */
|
/* Structure describing a globbing run. */
|
||||||
#if !defined (_AMIGA) && !defined (VMS) /* Buggy compiler. */
|
#if !defined _AMIGA && !defined VMS /* Buggy compiler. */
|
||||||
struct stat;
|
struct stat;
|
||||||
#endif
|
#endif
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int gl_pathc; /* Count of paths matched by the pattern. */
|
__size_t gl_pathc; /* Count of paths matched by the pattern. */
|
||||||
char **gl_pathv; /* List of matched pathnames. */
|
char **gl_pathv; /* List of matched pathnames. */
|
||||||
int gl_offs; /* Slots to reserve in `gl_pathv'. */
|
__size_t gl_offs; /* Slots to reserve in `gl_pathv'. */
|
||||||
int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */
|
int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */
|
||||||
|
|
||||||
/* If the GLOB_ALTDIRFUNC flag is set, the following functions
|
/* If the GLOB_ALTDIRFUNC flag is set, the following functions
|
||||||
are used instead of the normal file access functions. */
|
are used instead of the normal file access functions. */
|
||||||
void (*gl_closedir) __P ((void *));
|
void (*gl_closedir) __PMT ((void *));
|
||||||
struct dirent *(*gl_readdir) __P ((void *));
|
struct dirent *(*gl_readdir) __PMT ((void *));
|
||||||
__ptr_t (*gl_opendir) __P ((const char *));
|
__ptr_t (*gl_opendir) __PMT ((__const char *));
|
||||||
int (*gl_lstat) __P ((const char *, struct stat *));
|
int (*gl_lstat) __PMT ((__const char *, struct stat *));
|
||||||
int (*gl_stat) __P ((const char *, struct stat *));
|
#if defined(VMS) && defined(__DECC) && !defined(_POSIX_C_SOURCE)
|
||||||
|
int (*gl_stat) __PMT ((__const char *, struct stat *, ...));
|
||||||
|
#else
|
||||||
|
int (*gl_stat) __PMT ((__const char *, struct stat *));
|
||||||
|
#endif
|
||||||
} glob_t;
|
} glob_t;
|
||||||
|
|
||||||
|
#ifdef _LARGEFILE64_SOURCE
|
||||||
|
struct stat64;
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
__size_t gl_pathc;
|
||||||
|
char **gl_pathv;
|
||||||
|
__size_t gl_offs;
|
||||||
|
int gl_flags;
|
||||||
|
|
||||||
|
/* If the GLOB_ALTDIRFUNC flag is set, the following functions
|
||||||
|
are used instead of the normal file access functions. */
|
||||||
|
void (*gl_closedir) __PMT ((void *));
|
||||||
|
struct dirent64 *(*gl_readdir) __PMT ((void *));
|
||||||
|
__ptr_t (*gl_opendir) __PMT ((__const char *));
|
||||||
|
int (*gl_lstat) __PMT ((__const char *, struct stat64 *));
|
||||||
|
int (*gl_stat) __PMT ((__const char *, struct stat64 *));
|
||||||
|
} glob64_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if _FILE_OFFSET_BITS == 64 && __GNUC__ < 2
|
||||||
|
# define glob glob64
|
||||||
|
# define globfree globfree64
|
||||||
|
#else
|
||||||
|
# ifdef _LARGEFILE64_SOURCE
|
||||||
|
extern int glob64 __P ((__const char *__pattern, int __flags,
|
||||||
|
int (*__errfunc) (__const char *, int),
|
||||||
|
glob64_t *__pglob));
|
||||||
|
|
||||||
|
extern void globfree64 __P ((glob64_t *__pglob));
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Do glob searching for PATTERN, placing results in PGLOB.
|
/* Do glob searching for PATTERN, placing results in PGLOB.
|
||||||
The bits defined above may be set in FLAGS.
|
The bits defined above may be set in FLAGS.
|
||||||
If a directory cannot be opened or read and ERRFUNC is not nil,
|
If a directory cannot be opened or read and ERRFUNC is not nil,
|
||||||
@@ -93,13 +178,30 @@ typedef struct
|
|||||||
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
|
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
|
||||||
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
|
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
|
||||||
Otherwise, `glob' returns zero. */
|
Otherwise, `glob' returns zero. */
|
||||||
extern int glob __P ((const char *__pattern, int __flags,
|
#if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2
|
||||||
int (*__errfunc) __P ((const char *, int)),
|
extern int glob __P ((__const char *__pattern, int __flags,
|
||||||
|
int (*__errfunc) (__const char *, int),
|
||||||
glob_t *__pglob));
|
glob_t *__pglob));
|
||||||
|
|
||||||
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
||||||
extern void globfree __P ((glob_t *__pglob));
|
extern void globfree __P ((glob_t *__pglob));
|
||||||
|
#else
|
||||||
|
extern int glob __P ((__const char *__pattern, int __flags,
|
||||||
|
int (*__errfunc) (__const char *, int),
|
||||||
|
glob_t *__pglob)) __asm__ ("glob64");
|
||||||
|
|
||||||
|
extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _GNU_SOURCE
|
||||||
|
/* Return nonzero if PATTERN contains any metacharacters.
|
||||||
|
Metacharacters can be quoted with backslashes if QUOTE is nonzero.
|
||||||
|
|
||||||
|
This function is not part of the interface specified by POSIX.2
|
||||||
|
but several programs want to use it. */
|
||||||
|
extern int glob_pattern_p __P ((__const char *__pattern, int __quote));
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
57
gmk-default.scm
Normal file
57
gmk-default.scm
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
;; Contents of the (gnu make) Guile module
|
||||||
|
;; Copyright (C) 2011-2012 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))))
|
||||||
|
|
||||||
|
;; eval (GNU make eval) the input string S
|
||||||
|
(define (gmk-eval s)
|
||||||
|
(gmk-expand (format #f "$(eval ~a)" (obj-to-str s))))
|
||||||
|
|
||||||
|
;; 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)
|
||||||
396
gpl.texinfo
396
gpl.texinfo
@@ -1,396 +0,0 @@
|
|||||||
@setfilename gpl.info
|
|
||||||
|
|
||||||
@unnumbered GNU GENERAL PUBLIC LICENSE
|
|
||||||
@center Version 2, June 1991
|
|
||||||
|
|
||||||
@display
|
|
||||||
Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
|
|
||||||
59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
@end display
|
|
||||||
|
|
||||||
@unnumberedsec Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software---to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must show them these terms so they know their
|
|
||||||
rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
|
||||||
program will individually obtain patent licenses, in effect making the
|
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
@iftex
|
|
||||||
@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
@end iftex
|
|
||||||
@ifinfo
|
|
||||||
@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
@end ifinfo
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
@item
|
|
||||||
This License applies to any program or other work which contains
|
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The ``Program'', below,
|
|
||||||
refers to any such program or work, and a ``work based on the Program''
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term ``modification''.) Each licensee is addressed as ``you''.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
@item
|
|
||||||
You may copy and distribute verbatim copies of the Program's
|
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
|
||||||
|
|
||||||
@item
|
|
||||||
You may modify your copy or copies of the Program or any portion
|
|
||||||
of it, thus forming a work based on the Program, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
@enumerate a
|
|
||||||
@item
|
|
||||||
You must cause the modified files to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
@item
|
|
||||||
You must cause any work that you distribute or publish, that in
|
|
||||||
whole or in part contains or is derived from the Program or any
|
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
@item
|
|
||||||
If the modified program normally reads commands interactively
|
|
||||||
when run, you must cause it, when started running for such
|
|
||||||
interactive use in the most ordinary way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
@item
|
|
||||||
You may copy and distribute the Program (or a work based on it,
|
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
@enumerate a
|
|
||||||
@item
|
|
||||||
Accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of Sections
|
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
|
||||||
|
|
||||||
@item
|
|
||||||
Accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party, for a charge no more than your
|
|
||||||
cost of physically performing source distribution, a complete
|
|
||||||
machine-readable copy of the corresponding source code, to be
|
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
@item
|
|
||||||
Accompany it with the information you received as to the offer
|
|
||||||
to distribute corresponding source code. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For an executable work, complete source
|
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
@item
|
|
||||||
You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
@item
|
|
||||||
You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
@item
|
|
||||||
If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Program at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Program by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system, which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
@item
|
|
||||||
If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
@item
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies a version number of this License which applies to it and ``any
|
|
||||||
later version'', you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
this License, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
@item
|
|
||||||
If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
@iftex
|
|
||||||
@heading NO WARRANTY
|
|
||||||
@end iftex
|
|
||||||
@ifinfo
|
|
||||||
@center NO WARRANTY
|
|
||||||
@end ifinfo
|
|
||||||
|
|
||||||
@item
|
|
||||||
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
@item
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
@iftex
|
|
||||||
@heading END OF TERMS AND CONDITIONS
|
|
||||||
@end iftex
|
|
||||||
@ifinfo
|
|
||||||
@center END OF TERMS AND CONDITIONS
|
|
||||||
@end ifinfo
|
|
||||||
|
|
||||||
@page
|
|
||||||
@unnumberedsec How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least
|
|
||||||
the ``copyright'' line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
@var{one line to give the program's name and an idea of what it does.}
|
|
||||||
Copyright (C) 19@var{yy} @var{name of author}
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License
|
|
||||||
as published by the Free Software Foundation; either version 2
|
|
||||||
of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
|
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
|
|
||||||
type `show w'. This is free software, and you are welcome
|
|
||||||
to redistribute it under certain conditions; type `show c'
|
|
||||||
for details.
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
The hypothetical commands @samp{show w} and @samp{show c} should show
|
|
||||||
the appropriate parts of the General Public License. Of course, the
|
|
||||||
commands you use may be called something other than @samp{show w} and
|
|
||||||
@samp{show c}; they could even be mouse-clicks or menu items---whatever
|
|
||||||
suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a ``copyright disclaimer'' for the program, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
@group
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright
|
|
||||||
interest in the program `Gnomovision'
|
|
||||||
(which makes passes at compilers) written
|
|
||||||
by James Hacker.
|
|
||||||
|
|
||||||
@var{signature of Ty Coon}, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
@end group
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Library General
|
|
||||||
Public License instead of this License.
|
|
||||||
119
guile.c
Normal file
119
guile.c
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
/* GNU Guile interface for GNU Make.
|
||||||
|
Copyright (C) 2011-2012 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 "make.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "dep.h"
|
||||||
|
#include "variable.h"
|
||||||
|
|
||||||
|
#include <libguile.h>
|
||||||
|
|
||||||
|
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 = allocated_variable_expand (str);
|
||||||
|
ret = scm_from_locale_string (res);
|
||||||
|
|
||||||
|
free (str);
|
||||||
|
free (res);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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, guile_expand_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 (scm_c_eval_string (arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is the function registered with make */
|
||||||
|
static char *
|
||||||
|
func_guile (char *o, char **argv, const char *funcname UNUSED)
|
||||||
|
{
|
||||||
|
if (argv[0] && argv[0][0] != '\0')
|
||||||
|
{
|
||||||
|
char *str = scm_with_guile (internal_guile_eval, argv[0]);
|
||||||
|
if (str)
|
||||||
|
{
|
||||||
|
o = variable_buffer_output (o, str, strlen (str));
|
||||||
|
free (str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----- 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 struct floc *flocp UNUSED)
|
||||||
|
{
|
||||||
|
/* Initialize the Guile interpreter. */
|
||||||
|
scm_with_guile (guile_init, NULL);
|
||||||
|
|
||||||
|
/* Create a make function "guile". */
|
||||||
|
define_new_function (NILF, "guile", 0, 1, 1, func_guile);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
330
hash.c
Normal file
330
hash.c
Normal file
@@ -0,0 +1,330 @@
|
|||||||
|
/* hash.c -- hash table maintenance
|
||||||
|
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||||
|
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "make.h"
|
||||||
|
#include "hash.h"
|
||||||
|
|
||||||
|
#define CALLOC(t, n) ((t *) calloc (sizeof (t), (n)))
|
||||||
|
#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n)))
|
||||||
|
#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n)))
|
||||||
|
#define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n)))
|
||||||
|
|
||||||
|
static void hash_rehash __P((struct hash_table* ht));
|
||||||
|
static unsigned long round_up_2 __P((unsigned long rough));
|
||||||
|
|
||||||
|
/* Implement double hashing with open addressing. The table size is
|
||||||
|
always a power of two. The secondary ('increment') hash function
|
||||||
|
is forced to return an odd-value, in order to be relatively prime
|
||||||
|
to the table size. This guarantees that the increment can
|
||||||
|
potentially hit every slot in the table during collision
|
||||||
|
resolution. */
|
||||||
|
|
||||||
|
void *hash_deleted_item = &hash_deleted_item;
|
||||||
|
|
||||||
|
/* Force the table size to be a power of two, possibly rounding up the
|
||||||
|
given size. */
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_init (struct hash_table *ht, unsigned long size,
|
||||||
|
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)
|
||||||
|
{
|
||||||
|
ht->ht_size = round_up_2 (size);
|
||||||
|
ht->ht_empty_slots = ht->ht_size;
|
||||||
|
ht->ht_vec = (void**) CALLOC (struct token *, ht->ht_size);
|
||||||
|
if (ht->ht_vec == 0)
|
||||||
|
{
|
||||||
|
fprintf (stderr, _("can't allocate %lu bytes for hash table: memory exhausted"),
|
||||||
|
ht->ht_size * (unsigned long) sizeof (struct token *));
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */
|
||||||
|
ht->ht_fill = 0;
|
||||||
|
ht->ht_collisions = 0;
|
||||||
|
ht->ht_lookups = 0;
|
||||||
|
ht->ht_rehashes = 0;
|
||||||
|
ht->ht_hash_1 = hash_1;
|
||||||
|
ht->ht_hash_2 = hash_2;
|
||||||
|
ht->ht_compare = hash_cmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Load an array of items into 'ht'. */
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_load (struct hash_table *ht, void *item_table,
|
||||||
|
unsigned long cardinality, unsigned long size)
|
||||||
|
{
|
||||||
|
char *items = (char *) item_table;
|
||||||
|
while (cardinality--)
|
||||||
|
{
|
||||||
|
hash_insert (ht, items);
|
||||||
|
items += size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns the address of the table slot matching 'key'. If 'key' is
|
||||||
|
not found, return the address of an empty slot suitable for
|
||||||
|
inserting 'key'. The caller is responsible for incrementing
|
||||||
|
ht_fill on insertion. */
|
||||||
|
|
||||||
|
void **
|
||||||
|
hash_find_slot (struct hash_table *ht, const void *key)
|
||||||
|
{
|
||||||
|
void **slot;
|
||||||
|
void **deleted_slot = 0;
|
||||||
|
unsigned int hash_2 = 0;
|
||||||
|
unsigned int hash_1 = (*ht->ht_hash_1) (key);
|
||||||
|
|
||||||
|
ht->ht_lookups++;
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
hash_1 &= (ht->ht_size - 1);
|
||||||
|
slot = &ht->ht_vec[hash_1];
|
||||||
|
|
||||||
|
if (*slot == 0)
|
||||||
|
return (deleted_slot ? deleted_slot : slot);
|
||||||
|
if (*slot == hash_deleted_item)
|
||||||
|
{
|
||||||
|
if (deleted_slot == 0)
|
||||||
|
deleted_slot = slot;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (key == *slot)
|
||||||
|
return slot;
|
||||||
|
if ((*ht->ht_compare) (key, *slot) == 0)
|
||||||
|
return slot;
|
||||||
|
ht->ht_collisions++;
|
||||||
|
}
|
||||||
|
if (!hash_2)
|
||||||
|
hash_2 = (*ht->ht_hash_2) (key) | 1;
|
||||||
|
hash_1 += hash_2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
hash_find_item (struct hash_table *ht, const void *key)
|
||||||
|
{
|
||||||
|
void **slot = hash_find_slot (ht, key);
|
||||||
|
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
hash_insert (struct hash_table *ht, const void *item)
|
||||||
|
{
|
||||||
|
void **slot = hash_find_slot (ht, item);
|
||||||
|
const void *old_item = *slot;
|
||||||
|
hash_insert_at (ht, item, slot);
|
||||||
|
return (void *)((HASH_VACANT (old_item)) ? 0 : old_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
hash_insert_at (struct hash_table *ht, const void *item, const void *slot)
|
||||||
|
{
|
||||||
|
const void *old_item = *(void **) slot;
|
||||||
|
if (HASH_VACANT (old_item))
|
||||||
|
{
|
||||||
|
ht->ht_fill++;
|
||||||
|
if (old_item == 0)
|
||||||
|
ht->ht_empty_slots--;
|
||||||
|
old_item = item;
|
||||||
|
}
|
||||||
|
*(void const **) slot = item;
|
||||||
|
if (ht->ht_empty_slots < ht->ht_size - ht->ht_capacity)
|
||||||
|
{
|
||||||
|
hash_rehash (ht);
|
||||||
|
return (void *) hash_find_slot (ht, item);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return (void *) slot;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
hash_delete (struct hash_table *ht, const void *item)
|
||||||
|
{
|
||||||
|
void **slot = hash_find_slot (ht, item);
|
||||||
|
return hash_delete_at (ht, slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
hash_delete_at (struct hash_table *ht, const void *slot)
|
||||||
|
{
|
||||||
|
void *item = *(void **) slot;
|
||||||
|
if (!HASH_VACANT (item))
|
||||||
|
{
|
||||||
|
*(void const **) slot = hash_deleted_item;
|
||||||
|
ht->ht_fill--;
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_free_items (struct hash_table *ht)
|
||||||
|
{
|
||||||
|
void **vec = ht->ht_vec;
|
||||||
|
void **end = &vec[ht->ht_size];
|
||||||
|
for (; vec < end; vec++)
|
||||||
|
{
|
||||||
|
void *item = *vec;
|
||||||
|
if (!HASH_VACANT (item))
|
||||||
|
free (item);
|
||||||
|
*vec = 0;
|
||||||
|
}
|
||||||
|
ht->ht_fill = 0;
|
||||||
|
ht->ht_empty_slots = ht->ht_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_delete_items (struct hash_table *ht)
|
||||||
|
{
|
||||||
|
void **vec = ht->ht_vec;
|
||||||
|
void **end = &vec[ht->ht_size];
|
||||||
|
for (; vec < end; vec++)
|
||||||
|
*vec = 0;
|
||||||
|
ht->ht_fill = 0;
|
||||||
|
ht->ht_collisions = 0;
|
||||||
|
ht->ht_lookups = 0;
|
||||||
|
ht->ht_rehashes = 0;
|
||||||
|
ht->ht_empty_slots = ht->ht_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_free (struct hash_table *ht, int free_items)
|
||||||
|
{
|
||||||
|
if (free_items)
|
||||||
|
hash_free_items (ht);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ht->ht_fill = 0;
|
||||||
|
ht->ht_empty_slots = ht->ht_size;
|
||||||
|
}
|
||||||
|
free (ht->ht_vec);
|
||||||
|
ht->ht_vec = 0;
|
||||||
|
ht->ht_capacity = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_map (struct hash_table *ht, hash_map_func_t map)
|
||||||
|
{
|
||||||
|
void **slot;
|
||||||
|
void **end = &ht->ht_vec[ht->ht_size];
|
||||||
|
|
||||||
|
for (slot = ht->ht_vec; slot < end; slot++)
|
||||||
|
{
|
||||||
|
if (!HASH_VACANT (*slot))
|
||||||
|
(*map) (*slot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_map_arg (struct hash_table *ht, hash_map_arg_func_t map, void *arg)
|
||||||
|
{
|
||||||
|
void **slot;
|
||||||
|
void **end = &ht->ht_vec[ht->ht_size];
|
||||||
|
|
||||||
|
for (slot = ht->ht_vec; slot < end; slot++)
|
||||||
|
{
|
||||||
|
if (!HASH_VACANT (*slot))
|
||||||
|
(*map) (*slot, arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Double the size of the hash table in the event of overflow... */
|
||||||
|
|
||||||
|
static void
|
||||||
|
hash_rehash (struct hash_table *ht)
|
||||||
|
{
|
||||||
|
unsigned long old_ht_size = ht->ht_size;
|
||||||
|
void **old_vec = ht->ht_vec;
|
||||||
|
void **ovp;
|
||||||
|
|
||||||
|
if (ht->ht_fill >= ht->ht_capacity)
|
||||||
|
{
|
||||||
|
ht->ht_size *= 2;
|
||||||
|
ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4);
|
||||||
|
}
|
||||||
|
ht->ht_rehashes++;
|
||||||
|
ht->ht_vec = (void **) CALLOC (struct token *, ht->ht_size);
|
||||||
|
|
||||||
|
for (ovp = old_vec; ovp < &old_vec[old_ht_size]; ovp++)
|
||||||
|
{
|
||||||
|
if (! HASH_VACANT (*ovp))
|
||||||
|
{
|
||||||
|
void **slot = hash_find_slot (ht, *ovp);
|
||||||
|
*slot = *ovp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ht->ht_empty_slots = ht->ht_size - ht->ht_fill;
|
||||||
|
free (old_vec);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
||||||
|
{
|
||||||
|
/* GKM FIXME: honor NO_FLOAT */
|
||||||
|
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
||||||
|
100.0 * (double) ht->ht_fill / (double) ht->ht_size);
|
||||||
|
fprintf (out_FILE, _("Rehash=%d, "), ht->ht_rehashes);
|
||||||
|
fprintf (out_FILE, _("Collisions=%ld/%ld=%.0f%%"), ht->ht_collisions, ht->ht_lookups,
|
||||||
|
(ht->ht_lookups
|
||||||
|
? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups)
|
||||||
|
: 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dump all items into a NULL-terminated vector. Use the
|
||||||
|
user-supplied vector, or malloc one. */
|
||||||
|
|
||||||
|
void **
|
||||||
|
hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
|
||||||
|
{
|
||||||
|
void **vector;
|
||||||
|
void **slot;
|
||||||
|
void **end = &ht->ht_vec[ht->ht_size];
|
||||||
|
|
||||||
|
if (vector_0 == 0)
|
||||||
|
vector_0 = MALLOC (void *, ht->ht_fill + 1);
|
||||||
|
vector = vector_0;
|
||||||
|
|
||||||
|
for (slot = ht->ht_vec; slot < end; slot++)
|
||||||
|
if (!HASH_VACANT (*slot))
|
||||||
|
*vector++ = *slot;
|
||||||
|
*vector = 0;
|
||||||
|
|
||||||
|
if (compare)
|
||||||
|
qsort (vector_0, ht->ht_fill, sizeof (void *), compare);
|
||||||
|
return vector_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Round a given number up to the nearest power of 2. */
|
||||||
|
|
||||||
|
static unsigned long
|
||||||
|
round_up_2 (unsigned long n)
|
||||||
|
{
|
||||||
|
n |= (n >> 1);
|
||||||
|
n |= (n >> 2);
|
||||||
|
n |= (n >> 4);
|
||||||
|
n |= (n >> 8);
|
||||||
|
n |= (n >> 16);
|
||||||
|
|
||||||
|
#if !defined(HAVE_LIMITS_H) || ULONG_MAX > 4294967295
|
||||||
|
/* We only need this on systems where unsigned long is >32 bits. */
|
||||||
|
n |= (n >> 32);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return n + 1;
|
||||||
|
}
|
||||||
234
hash.h
Normal file
234
hash.h
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
/* hash.h -- decls for hash table
|
||||||
|
Copyright (C) 1995, 1999, 2002, 2010 Free Software Foundation, Inc.
|
||||||
|
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
|
||||||
|
|
||||||
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#ifndef _hash_h_
|
||||||
|
#define _hash_h_
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||||
|
# if !defined __GLIBC__ || !defined __P
|
||||||
|
# undef __P
|
||||||
|
# define __P(protos) protos
|
||||||
|
# endif
|
||||||
|
#else /* Not C++ or ANSI C. */
|
||||||
|
# undef __P
|
||||||
|
# define __P(protos) ()
|
||||||
|
/* We can get away without defining 'const' here only because in this file
|
||||||
|
it is used only inside the prototype for 'fnmatch', which is elided in
|
||||||
|
non-ANSI C where 'const' is problematical. */
|
||||||
|
#endif /* C++ or ANSI C. */
|
||||||
|
|
||||||
|
typedef unsigned long (*hash_func_t) __P((void const *key));
|
||||||
|
typedef int (*hash_cmp_func_t) __P((void const *x, void const *y));
|
||||||
|
typedef void (*hash_map_func_t) __P((void const *item));
|
||||||
|
typedef void (*hash_map_arg_func_t) __P((void const *item, void *arg));
|
||||||
|
|
||||||
|
struct hash_table
|
||||||
|
{
|
||||||
|
void **ht_vec;
|
||||||
|
hash_func_t ht_hash_1; /* primary hash function */
|
||||||
|
hash_func_t ht_hash_2; /* secondary hash function */
|
||||||
|
hash_cmp_func_t ht_compare; /* comparison function */
|
||||||
|
unsigned long ht_size; /* total number of slots (power of 2) */
|
||||||
|
unsigned long ht_capacity; /* usable slots, limited by loading-factor */
|
||||||
|
unsigned long ht_fill; /* items in table */
|
||||||
|
unsigned long ht_empty_slots; /* empty slots not including deleted slots */
|
||||||
|
unsigned long ht_collisions; /* # of failed calls to comparison function */
|
||||||
|
unsigned long ht_lookups; /* # of queries */
|
||||||
|
unsigned int ht_rehashes; /* # of times we've expanded table */
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef int (*qsort_cmp_t) __P((void const *, void const *));
|
||||||
|
|
||||||
|
void hash_init __P((struct hash_table *ht, unsigned long size,
|
||||||
|
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp));
|
||||||
|
void hash_load __P((struct hash_table *ht, void *item_table,
|
||||||
|
unsigned long cardinality, unsigned long size));
|
||||||
|
void **hash_find_slot __P((struct hash_table *ht, void const *key));
|
||||||
|
void *hash_find_item __P((struct hash_table *ht, void const *key));
|
||||||
|
void *hash_insert __P((struct hash_table *ht, const void *item));
|
||||||
|
void *hash_insert_at __P((struct hash_table *ht, const void *item, void const *slot));
|
||||||
|
void *hash_delete __P((struct hash_table *ht, void const *item));
|
||||||
|
void *hash_delete_at __P((struct hash_table *ht, void const *slot));
|
||||||
|
void hash_delete_items __P((struct hash_table *ht));
|
||||||
|
void hash_free_items __P((struct hash_table *ht));
|
||||||
|
void hash_free __P((struct hash_table *ht, int free_items));
|
||||||
|
void hash_map __P((struct hash_table *ht, hash_map_func_t map));
|
||||||
|
void hash_map_arg __P((struct hash_table *ht, hash_map_arg_func_t map, void *arg));
|
||||||
|
void hash_print_stats __P((struct hash_table *ht, FILE *out_FILE));
|
||||||
|
void **hash_dump __P((struct hash_table *ht, void **vector_0, qsort_cmp_t compare));
|
||||||
|
|
||||||
|
extern void *hash_deleted_item;
|
||||||
|
#define HASH_VACANT(item) ((item) == 0 || (void *) (item) == hash_deleted_item)
|
||||||
|
|
||||||
|
|
||||||
|
/* hash and comparison macros for case-sensitive string keys. */
|
||||||
|
|
||||||
|
/* Due to the strcache, it's not uncommon for the string pointers to
|
||||||
|
be identical. Take advantage of that to short-circuit string compares. */
|
||||||
|
|
||||||
|
#define STRING_HASH_1(KEY, RESULT) do { \
|
||||||
|
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||||
|
while (*++_key_) \
|
||||||
|
(RESULT) += (*_key_ << (_key_[1] & 0xf)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_STRING_HASH_1(KEY) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
STRING_HASH_1 ((KEY), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define STRING_HASH_2(KEY, RESULT) do { \
|
||||||
|
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||||
|
while (*++_key_) \
|
||||||
|
(RESULT) += (*_key_ << (_key_[1] & 0x7)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_STRING_HASH_2(KEY) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
STRING_HASH_2 ((KEY), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define STRING_COMPARE(X, Y, RESULT) do { \
|
||||||
|
RESULT = (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_STRING_COMPARE(X, Y) do { \
|
||||||
|
return (X) == (Y) ? 0 : strcmp ((X), (Y)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
#define STRING_N_HASH_1(KEY, N, RESULT) do { \
|
||||||
|
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||||
|
int _n_ = (N); \
|
||||||
|
if (_n_) \
|
||||||
|
while (--_n_ && *++_key_) \
|
||||||
|
(RESULT) += (*_key_ << (_key_[1] & 0xf)); \
|
||||||
|
(RESULT) += *++_key_; \
|
||||||
|
} while (0)
|
||||||
|
#define return_STRING_N_HASH_1(KEY, N) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
STRING_N_HASH_1 ((KEY), (N), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define STRING_N_HASH_2(KEY, N, RESULT) do { \
|
||||||
|
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||||
|
int _n_ = (N); \
|
||||||
|
if (_n_) \
|
||||||
|
while (--_n_ && *++_key_) \
|
||||||
|
(RESULT) += (*_key_ << (_key_[1] & 0x7)); \
|
||||||
|
(RESULT) += *++_key_; \
|
||||||
|
} while (0)
|
||||||
|
#define return_STRING_N_HASH_2(KEY, N) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
STRING_N_HASH_2 ((KEY), (N), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define STRING_N_COMPARE(X, Y, N, RESULT) do { \
|
||||||
|
RESULT = (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_STRING_N_COMPARE(X, Y, N) do { \
|
||||||
|
return (X) == (Y) ? 0 : strncmp ((X), (Y), (N)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#ifdef HAVE_CASE_INSENSITIVE_FS
|
||||||
|
|
||||||
|
/* hash and comparison macros for case-insensitive string _key_s. */
|
||||||
|
|
||||||
|
#define ISTRING_HASH_1(KEY, RESULT) do { \
|
||||||
|
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||||
|
while (*++_key_) \
|
||||||
|
(RESULT) += ((isupper (*_key_) ? tolower (*_key_) : *_key_) << (_key_[1] & 0xf)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_ISTRING_HASH_1(KEY) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
ISTRING_HASH_1 ((KEY), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define ISTRING_HASH_2(KEY, RESULT) do { \
|
||||||
|
unsigned char const *_key_ = (unsigned char const *) (KEY) - 1; \
|
||||||
|
while (*++_key_) \
|
||||||
|
(RESULT) += ((isupper (*_key_) ? tolower (*_key_) : *_key_) << (_key_[1] & 0x7)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_ISTRING_HASH_2(KEY) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
ISTRING_HASH_2 ((KEY), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define ISTRING_COMPARE(X, Y, RESULT) do { \
|
||||||
|
RESULT = (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_ISTRING_COMPARE(X, Y) do { \
|
||||||
|
return (X) == (Y) ? 0 : strcasecmp ((X), (Y)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define ISTRING_HASH_1(KEY, RESULT) STRING_HASH_1 ((KEY), (RESULT))
|
||||||
|
#define return_ISTRING_HASH_1(KEY) return_STRING_HASH_1 (KEY)
|
||||||
|
|
||||||
|
#define ISTRING_HASH_2(KEY, RESULT) STRING_HASH_2 ((KEY), (RESULT))
|
||||||
|
#define return_ISTRING_HASH_2(KEY) return_STRING_HASH_2 (KEY)
|
||||||
|
|
||||||
|
#define ISTRING_COMPARE(X, Y, RESULT) STRING_COMPARE ((X), (Y), (RESULT))
|
||||||
|
#define return_ISTRING_COMPARE(X, Y) return_STRING_COMPARE ((X), (Y))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* hash and comparison macros for integer _key_s. */
|
||||||
|
|
||||||
|
#define INTEGER_HASH_1(KEY, RESULT) do { \
|
||||||
|
(RESULT) += ((unsigned long)(KEY)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_INTEGER_HASH_1(KEY) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
INTEGER_HASH_1 ((KEY), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define INTEGER_HASH_2(KEY, RESULT) do { \
|
||||||
|
(RESULT) += ~((unsigned long)(KEY)); \
|
||||||
|
} while (0)
|
||||||
|
#define return_INTEGER_HASH_2(KEY) do { \
|
||||||
|
unsigned long _result_ = 0; \
|
||||||
|
INTEGER_HASH_2 ((KEY), _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define INTEGER_COMPARE(X, Y, RESULT) do { \
|
||||||
|
(RESULT) = X - Y; \
|
||||||
|
} while (0)
|
||||||
|
#define return_INTEGER_COMPARE(X, Y) do { \
|
||||||
|
int _result_; \
|
||||||
|
INTEGER_COMPARE (X, Y, _result_); \
|
||||||
|
return _result_; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/* hash and comparison macros for address keys. */
|
||||||
|
|
||||||
|
#define ADDRESS_HASH_1(KEY, RESULT) INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3, (RESULT))
|
||||||
|
#define ADDRESS_HASH_2(KEY, RESULT) INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3, (RESULT))
|
||||||
|
#define ADDRESS_COMPARE(X, Y, RESULT) INTEGER_COMPARE ((X), (Y), (RESULT))
|
||||||
|
#define return_ADDRESS_HASH_1(KEY) return_INTEGER_HASH_1 (((unsigned long)(KEY)) >> 3)
|
||||||
|
#define return_ADDRESS_HASH_2(KEY) return_INTEGER_HASH_2 (((unsigned long)(KEY)) >> 3)
|
||||||
|
#define return_ADDRESS_COMPARE(X, Y) return_INTEGER_COMPARE ((X), (Y))
|
||||||
|
|
||||||
|
#endif /* not _hash_h_ */
|
||||||
955
implicit.c
955
implicit.c
File diff suppressed because it is too large
Load Diff
80
job.h
80
job.h
@@ -1,24 +1,39 @@
|
|||||||
/* Definitions for managing subprocesses in GNU Make.
|
/* Definitions for managing subprocesses in GNU Make.
|
||||||
Copyright (C) 1992, 1993, 1996 Free Software Foundation, Inc.
|
Copyright (C) 1992-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
#ifndef SEEN_JOB_H
|
#ifndef SEEN_JOB_H
|
||||||
#define SEEN_JOB_H
|
#define SEEN_JOB_H
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
# include <fcntl.h>
|
||||||
|
#else
|
||||||
|
# include <sys/file.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* How to set close-on-exec for a file descriptor. */
|
||||||
|
|
||||||
|
#if !defined F_SETFD
|
||||||
|
# define CLOSE_ON_EXEC(_d)
|
||||||
|
#else
|
||||||
|
# ifndef FD_CLOEXEC
|
||||||
|
# define FD_CLOEXEC 1
|
||||||
|
# endif
|
||||||
|
# define CLOSE_ON_EXEC(_d) (void) fcntl ((_d), F_SETFD, FD_CLOEXEC)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Structure describing a running or dead child process. */
|
/* Structure describing a running or dead child process. */
|
||||||
|
|
||||||
struct child
|
struct child
|
||||||
@@ -28,47 +43,54 @@ struct child
|
|||||||
struct file *file; /* File being remade. */
|
struct file *file; /* File being remade. */
|
||||||
|
|
||||||
char **environment; /* Environment for commands. */
|
char **environment; /* Environment for commands. */
|
||||||
|
char *sh_batch_file; /* Script file for shell commands */
|
||||||
char **command_lines; /* Array of variable-expanded cmd lines. */
|
char **command_lines; /* Array of variable-expanded cmd lines. */
|
||||||
unsigned int command_line; /* Index into above. */
|
|
||||||
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
||||||
|
|
||||||
pid_t pid; /* Child process's ID number. */
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
char *comname; /* Temporary command file name */
|
||||||
int efn; /* Completion event flag number */
|
int efn; /* Completion event flag number */
|
||||||
int cstatus; /* Completion status */
|
int cstatus; /* Completion status */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
unsigned int command_line; /* Index into command_lines. */
|
||||||
|
pid_t pid; /* Child process's ID number. */
|
||||||
unsigned int remote:1; /* Nonzero if executing remotely. */
|
unsigned int remote:1; /* Nonzero if executing remotely. */
|
||||||
|
unsigned int noerror:1; /* Nonzero if commands contained a '-'. */
|
||||||
unsigned int noerror:1; /* Nonzero if commands contained a `-'. */
|
|
||||||
|
|
||||||
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
||||||
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
||||||
|
unsigned int dontcare:1; /* Saved dontcare flag. */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct child *children;
|
extern struct child *children;
|
||||||
|
|
||||||
extern void new_job PARAMS ((struct file *file));
|
int is_bourne_compatible_shell(const char *path);
|
||||||
extern void reap_children PARAMS ((int block, int err));
|
void new_job (struct file *file);
|
||||||
extern void start_waiting_jobs PARAMS ((void));
|
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 **construct_command_argv (char *line, char **restp, struct file *file,
|
||||||
|
int cmd_flags, char** batch_file);
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
extern int child_execute_job PARAMS ((char *argv, struct child *child));
|
int child_execute_job (char *argv, struct child *child);
|
||||||
|
#elif defined(__EMX__)
|
||||||
|
int child_execute_job (int stdin_fd, int stdout_fd, char **argv, char **envp);
|
||||||
#else
|
#else
|
||||||
extern void child_execute_job PARAMS ((int stdin_fd, int stdout_fd, char **argv, char **envp));
|
void child_execute_job (int stdin_fd, int stdout_fd, char **argv, char **envp);
|
||||||
#endif
|
#endif
|
||||||
#ifdef _AMIGA
|
#ifdef _AMIGA
|
||||||
extern void exec_command PARAMS ((char **argv));
|
void exec_command (char **argv);
|
||||||
|
#elif defined(__EMX__)
|
||||||
|
int exec_command (char **argv, char **envp);
|
||||||
#else
|
#else
|
||||||
extern void exec_command PARAMS ((char **argv, char **envp));
|
void exec_command (char **argv, char **envp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern unsigned int job_slots_used;
|
extern unsigned int job_slots_used;
|
||||||
|
|
||||||
extern void block_sigs PARAMS ((void));
|
void block_sigs (void);
|
||||||
#ifdef POSIX
|
#ifdef POSIX
|
||||||
extern void unblock_sigs PARAMS ((void));
|
void unblock_sigs (void);
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SIGSETMASK
|
#ifdef HAVE_SIGSETMASK
|
||||||
extern int fatal_signal_mask;
|
extern int fatal_signal_mask;
|
||||||
@@ -78,4 +100,6 @@ extern int fatal_signal_mask;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern unsigned int jobserver_tokens;
|
||||||
|
|
||||||
#endif /* SEEN_JOB_H */
|
#endif /* SEEN_JOB_H */
|
||||||
|
|||||||
157
load.c
Normal file
157
load.c
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
/* Loading dynamic objects for GNU Make.
|
||||||
|
Copyright (C) 2012 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 "make.h"
|
||||||
|
|
||||||
|
#if MAKE_LOAD
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#define SYMBOL_EXTENSION "_gmake_setup"
|
||||||
|
|
||||||
|
static void *global_dl = NULL;
|
||||||
|
|
||||||
|
#include "debug.h"
|
||||||
|
#include "filedef.h"
|
||||||
|
#include "variable.h"
|
||||||
|
|
||||||
|
static int
|
||||||
|
init_symbol (const struct floc *flocp, const char *ldname, load_func_t symp)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
const char *p;
|
||||||
|
int nmlen = strlen (ldname);
|
||||||
|
char *loaded = allocated_variable_expand("$(.LOADED)");
|
||||||
|
|
||||||
|
/* If it's already been loaded don't do it again. */
|
||||||
|
p = strstr (loaded, ldname);
|
||||||
|
r = p && (p==loaded || p[-1]==' ') && (p[nmlen]=='\0' || p[nmlen]==' ');
|
||||||
|
free (loaded);
|
||||||
|
if (r)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
/* Now invoke the symbol. */
|
||||||
|
r = (*symp) (flocp);
|
||||||
|
|
||||||
|
/* If it succeeded, add the symbol to the loaded variable. */
|
||||||
|
if (r > 0)
|
||||||
|
do_variable_definition (flocp, ".LOADED", ldname, o_default, f_append, 0);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
load_file (const struct floc *flocp, const char *ldname, int noerror)
|
||||||
|
{
|
||||||
|
load_func_t symp;
|
||||||
|
const char *fp;
|
||||||
|
char *symname = NULL;
|
||||||
|
char *new = alloca (strlen (ldname) + CSTRLEN (SYMBOL_EXTENSION) + 1);
|
||||||
|
|
||||||
|
if (! global_dl)
|
||||||
|
{
|
||||||
|
global_dl = dlopen (NULL, RTLD_NOW|RTLD_GLOBAL);
|
||||||
|
if (! global_dl)
|
||||||
|
fatal (flocp, _("Failed to open global symbol table: %s"), dlerror());
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If a symbol name was provided, use it. */
|
||||||
|
fp = strchr (ldname, '(');
|
||||||
|
if (fp)
|
||||||
|
{
|
||||||
|
const char *ep;
|
||||||
|
|
||||||
|
/* If there's an open paren, 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)
|
||||||
|
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;
|
||||||
|
|
||||||
|
/* Make a copy of the symbol name part. */
|
||||||
|
symname = new + l + 1;
|
||||||
|
memcpy (symname, fp, ep - fp);
|
||||||
|
symname[ep - fp] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we didn't find a symbol name yet, construct it from the ldname. */
|
||||||
|
if (! symname)
|
||||||
|
{
|
||||||
|
char *p = new;
|
||||||
|
|
||||||
|
fp = strrchr (ldname, '/');
|
||||||
|
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));
|
||||||
|
|
||||||
|
/* See if it's already defined. */
|
||||||
|
symp = (load_func_t) dlsym (global_dl, symname);
|
||||||
|
if (! symp) {
|
||||||
|
void *dlp = dlopen (ldname, RTLD_LAZY|RTLD_GLOBAL);
|
||||||
|
if (! dlp)
|
||||||
|
{
|
||||||
|
if (noerror)
|
||||||
|
DB (DB_BASIC, ("%s", dlerror()));
|
||||||
|
else
|
||||||
|
error (flocp, "%s", dlerror());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
symp = dlsym (dlp, symname);
|
||||||
|
if (! symp)
|
||||||
|
fatal (flocp, _("Failed to load symbol %s from %s: %s"),
|
||||||
|
symname, ldname, dlerror());
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Invoke the symbol to initialize the loaded object. */
|
||||||
|
return init_symbol(flocp, ldname, symp);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int
|
||||||
|
load_file (const struct floc *flocp, const char *ldname, int noerror)
|
||||||
|
{
|
||||||
|
if (! noerror)
|
||||||
|
fatal (flocp, _("The 'load' operation is not supported on this platform."));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* MAKE_LOAD */
|
||||||
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;
|
|
||||||
}
|
|
||||||
288
maintMakefile
Normal file
288
maintMakefile
Normal file
@@ -0,0 +1,288 @@
|
|||||||
|
# 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
|
||||||
|
# tree, not a dist copy.
|
||||||
|
|
||||||
|
# We like mondo-warnings!
|
||||||
|
AM_CFLAGS += -Wall -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 README.OS2 \
|
||||||
|
config.ami configh.dos config.h.W32 config.h-vms
|
||||||
|
MTEMPLATES = Makefile.DOS SMakefile
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
$(TEMPLATES) : % : %.template Makefile
|
||||||
|
rm -f $@
|
||||||
|
sed -e 's@%VERSION%@$(VERSION)@g' \
|
||||||
|
-e 's@%PACKAGE%@$(PACKAGE)@g' \
|
||||||
|
$< > $@
|
||||||
|
chmod a-w $@
|
||||||
|
|
||||||
|
# Construct Makefiles by adding on dependencies, etc.
|
||||||
|
#
|
||||||
|
$(MTEMPLATES) : % : %.template .dep_segment Makefile
|
||||||
|
rm -f $@
|
||||||
|
sed -e 's@%VERSION%@$(VERSION)@g' \
|
||||||
|
-e 's@%PROGRAMS%@$(bin_PROGRAMS)@g' \
|
||||||
|
-e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@g' \
|
||||||
|
-e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@g' \
|
||||||
|
-e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@g' \
|
||||||
|
-e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@g' \
|
||||||
|
$< > $@
|
||||||
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
||||||
|
cat $(word 2,$^) >>$@
|
||||||
|
chmod a-w $@
|
||||||
|
|
||||||
|
NMakefile: NMakefile.template .dep_segment Makefile
|
||||||
|
rm -f $@
|
||||||
|
cp $< $@
|
||||||
|
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
||||||
|
sed 's/^\([^ ]*\)\.o:/$$(OUTDIR)\/\1.obj:/' $(word 2,$^) >>$@
|
||||||
|
chmod a-w $@
|
||||||
|
|
||||||
|
# Construct build.sh.in
|
||||||
|
#
|
||||||
|
build.sh.in: build.template Makefile
|
||||||
|
rm -f $@
|
||||||
|
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
|
||||||
|
-e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
|
||||||
|
$< > $@
|
||||||
|
chmod a-w+x $@
|
||||||
|
|
||||||
|
|
||||||
|
# Use automake to build a dependency list file, for "foreign" makefiles like
|
||||||
|
# Makefile.DOS.
|
||||||
|
#
|
||||||
|
# Automake used to have a --generate-deps flag, but it's gone now, so we have
|
||||||
|
# to do it ourselves.
|
||||||
|
#
|
||||||
|
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
|
||||||
|
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
||||||
|
rm -f $@
|
||||||
|
(for f in $(DEPDIR)/*.Po; do \
|
||||||
|
echo ""; \
|
||||||
|
echo "# $$f"; \
|
||||||
|
sed -e '/^[^:]*\.[ch] *:/d' \
|
||||||
|
-e 's, /usr/[^ ]*,,g' \
|
||||||
|
-e 's, $(srcdir)/, ,g' \
|
||||||
|
-e '/^ *\\$$/d' \
|
||||||
|
-e '/^ *$$/d' \
|
||||||
|
< $$f; \
|
||||||
|
done) > $@
|
||||||
|
|
||||||
|
# Get rid of everything "else".
|
||||||
|
#
|
||||||
|
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
|
||||||
|
|
||||||
|
CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
|
||||||
|
build.sh.in .deps .dep_segment ABOUT-NLS \
|
||||||
|
ansi2knr.*
|
||||||
|
|
||||||
|
# This rule tries to clean the tree right down to how it looks when you do a
|
||||||
|
# virgin CVS checkout.
|
||||||
|
|
||||||
|
# This target is potentially dangerous since it removes _ANY FILE_ that
|
||||||
|
# is not in CVS. Including files you might mean to add to CVS but
|
||||||
|
# haven't yet... I only use this in subdirectories where it's unlikely
|
||||||
|
# we have any new files. Still... be careful!!
|
||||||
|
|
||||||
|
cvsclean = $(PERL) -e '$$k{CVS} = 1; open(E,"< CVS/Entries") || die "CVS/Entries: $$!\n"; while (defined ($$_ = <E>)) { m%^/([^/]*)% or next; $$k{$$1} = 1; } close(E) || die "CVS/Entries: $$!\n"; opendir(D, ".") || die ".: $$!\n"; while (defined ($$_ = readdir(D))) { -f $$_ && ! exists $$k{$$_} && unlink($$_); } closedir(D) || die ".: $$!\n";'
|
||||||
|
|
||||||
|
.PHONY: cvs-clean
|
||||||
|
cvs-clean: maintainer-clean
|
||||||
|
-rm -rf *~ $(CVS-CLEAN-FILES)
|
||||||
|
-cd config && $(cvsclean)
|
||||||
|
-cd po && $(cvsclean)
|
||||||
|
-cd doc && $(cvsclean)
|
||||||
|
-cd glob && $(cvsclean)
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# The sections below were stolen from the Makefile.maint used by fileutils,
|
||||||
|
# sh-utils, textutils, CPPI, Bison, and Autoconf.
|
||||||
|
|
||||||
|
|
||||||
|
## ---------------- ##
|
||||||
|
## Updating files. ##
|
||||||
|
## ---------------- ##
|
||||||
|
|
||||||
|
WGET = wget --passive-ftp -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); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ------------------- #
|
||||||
|
# Updating PO files. #
|
||||||
|
# ------------------- #
|
||||||
|
|
||||||
|
# PO archive mirrors --- Be careful; some might not be fully populated!
|
||||||
|
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
|
||||||
|
# http://translation.sf.net/maint/
|
||||||
|
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
||||||
|
|
||||||
|
po_wget_flags = --recursive --level=1 --no-directories --no-parent \
|
||||||
|
--no-check-certificate
|
||||||
|
po_repo = http://translationproject.org/latest/$(PACKAGE)
|
||||||
|
.PHONY: do-po-update po-update
|
||||||
|
do-po-update:
|
||||||
|
tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
|
||||||
|
&& rm -rf "$$tmppo" \
|
||||||
|
&& mkdir "$$tmppo" \
|
||||||
|
&& (cd "$$tmppo" \
|
||||||
|
&& $(WGET) $(po_wget_flags) -A '*.po' $(po_repo)) \
|
||||||
|
&& cp "$$tmppo"/*.po $(top_srcdir)/po && rm -rf "$$tmppo"
|
||||||
|
cd po && $(MAKE) update-po
|
||||||
|
$(MAKE) po-check
|
||||||
|
|
||||||
|
po-update:
|
||||||
|
[ -d "po" ] && $(MAKE) do-po-update
|
||||||
|
|
||||||
|
# -------------------------- #
|
||||||
|
# Updating GNU build files. #
|
||||||
|
# -------------------------- #
|
||||||
|
|
||||||
|
# The following pseudo table associates a local directory and a URL
|
||||||
|
# with each of the files that belongs to some other package and is
|
||||||
|
# regularly updated from the specified URL.
|
||||||
|
|
||||||
|
cvs-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||||
|
git-url = http://git.savannah.gnu.org/cgit
|
||||||
|
target = $(patsubst get-%,%,$@)
|
||||||
|
|
||||||
|
config-url = $(git-url)/config.git/plain/$(patsubst get-config/%,%,$@)
|
||||||
|
get-config/config.guess get-config/config.sub:
|
||||||
|
@echo $(WGET) $(config-url) -O $(target) \
|
||||||
|
&& $(WGET) $(config-url) -O $(target).t \
|
||||||
|
&& $(move_if_change)
|
||||||
|
|
||||||
|
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-config/%,%,$@)
|
||||||
|
get-config/texinfo.tex:
|
||||||
|
@echo $(WGET) $(gnulib-url) -O $(target) \
|
||||||
|
&& $(WGET) $(gnulib-url) -O $(target).t \
|
||||||
|
&& $(move_if_change)
|
||||||
|
|
||||||
|
gnustandards-url = $(cvs-url)/gnustandards/gnustandards/$(patsubst get-doc/%,%,$@)
|
||||||
|
get-doc/make-stds.texi get-doc/fdl.texi:
|
||||||
|
@echo $(WGET) $(gnustandards-url) -O $(target) \
|
||||||
|
&& $(WGET) $(gnustandards-url) -O $(target).t \
|
||||||
|
&& $(move_if_change)
|
||||||
|
|
||||||
|
.PHONY: scm-update
|
||||||
|
scm-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub get-doc/make-stds.texi get-doc/fdl.texi
|
||||||
|
|
||||||
|
|
||||||
|
# --------------------- #
|
||||||
|
# Updating everything. #
|
||||||
|
# --------------------- #
|
||||||
|
|
||||||
|
.PHONY: update
|
||||||
|
update: po-update scm-update
|
||||||
|
|
||||||
|
|
||||||
|
## --------------- ##
|
||||||
|
## Sanity checks. ##
|
||||||
|
## --------------- ##
|
||||||
|
|
||||||
|
# Checks that don't require cvs. Run 'changelog-check' last as
|
||||||
|
# previous test may reveal problems requiring new ChangeLog entries.
|
||||||
|
local-check: po-check changelog-check
|
||||||
|
|
||||||
|
# copyright-check writable-files
|
||||||
|
|
||||||
|
changelog-check:
|
||||||
|
if head $(top_srcdir)/ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
|
||||||
|
:; \
|
||||||
|
else \
|
||||||
|
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||||
|
# Ignore make.h; it defines _().
|
||||||
|
po-check:
|
||||||
|
if test -f po/POTFILES.in; then \
|
||||||
|
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||||
|
$(PERL) -wn -e 'if (/\b_\(/) { $$ARGV eq "make.h" || print "$$ARGV\n" and close ARGV }' *.c *.h | sort > $@-2; \
|
||||||
|
diff -u $@-1 $@-2 || exit 1; \
|
||||||
|
rm -f $@-1 $@-2; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
## ------------------------- ##
|
||||||
|
## 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 6338B6D4
|
||||||
|
|
||||||
|
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-2012 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/>.
|
||||||
736
make-stds.texi
736
make-stds.texi
@@ -1,736 +0,0 @@
|
|||||||
@comment This file is included by both standards.texi and make.texinfo.
|
|
||||||
@comment It was broken out of standards.texi on 1/6/93 by roland.
|
|
||||||
|
|
||||||
@node Makefile Conventions
|
|
||||||
@chapter Makefile Conventions
|
|
||||||
@comment standards.texi does not print an index, but make.texinfo does.
|
|
||||||
@cindex makefile, conventions for
|
|
||||||
@cindex conventions for makefiles
|
|
||||||
@cindex standards for makefiles
|
|
||||||
|
|
||||||
This
|
|
||||||
@ifinfo
|
|
||||||
node
|
|
||||||
@end ifinfo
|
|
||||||
@iftex
|
|
||||||
@ifset CODESTD
|
|
||||||
section
|
|
||||||
@end ifset
|
|
||||||
@ifclear CODESTD
|
|
||||||
chapter
|
|
||||||
@end ifclear
|
|
||||||
@end iftex
|
|
||||||
describes conventions for writing the Makefiles for GNU programs.
|
|
||||||
|
|
||||||
@menu
|
|
||||||
* Makefile Basics:: General Conventions for Makefiles
|
|
||||||
* Utilities in Makefiles:: Utilities in Makefiles
|
|
||||||
* Command Variables:: Variables for Specifying Commands
|
|
||||||
* Directory Variables:: Variables for Installation Directories
|
|
||||||
* Standard Targets:: Standard Targets for Users
|
|
||||||
@end menu
|
|
||||||
|
|
||||||
@node Makefile Basics
|
|
||||||
@section General Conventions for Makefiles
|
|
||||||
|
|
||||||
Every Makefile should contain this line:
|
|
||||||
|
|
||||||
@example
|
|
||||||
SHELL = /bin/sh
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
to avoid trouble on systems where the @code{SHELL} variable might be
|
|
||||||
inherited from the environment. (This is never a problem with GNU
|
|
||||||
@code{make}.)
|
|
||||||
|
|
||||||
Different @code{make} programs have incompatible suffix lists and
|
|
||||||
implicit rules, and this sometimes creates confusion or misbehavior. So
|
|
||||||
it is a good idea to set the suffix list explicitly using only the
|
|
||||||
suffixes you need in the particular Makefile, like this:
|
|
||||||
|
|
||||||
@example
|
|
||||||
.SUFFIXES:
|
|
||||||
.SUFFIXES: .c .o
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
The first line clears out the suffix list, the second introduces all
|
|
||||||
suffixes which may be subject to implicit rules in this Makefile.
|
|
||||||
|
|
||||||
Don't assume that @file{.} is in the path for command execution. When
|
|
||||||
you need to run programs that are a part of your package during the
|
|
||||||
make, please make sure that it uses @file{./} if the program is built as
|
|
||||||
part of the make or @file{$(srcdir)/} if the file is an unchanging part
|
|
||||||
of the source code. Without one of these prefixes, the current search
|
|
||||||
path is used.
|
|
||||||
|
|
||||||
The distinction between @file{./} and @file{$(srcdir)/} is important
|
|
||||||
when using the @samp{--srcdir} option to @file{configure}. A rule of
|
|
||||||
the form:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
foo.1 : foo.man sedscript
|
|
||||||
sed -e sedscript foo.man > foo.1
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
will fail when the current directory is not the source directory,
|
|
||||||
because @file{foo.man} and @file{sedscript} are not in the current
|
|
||||||
directory.
|
|
||||||
|
|
||||||
When using GNU @code{make}, relying on @samp{VPATH} to find the source
|
|
||||||
file will work in the case where there is a single dependency file,
|
|
||||||
since the @code{make} automatic variable @samp{$<} will represent the
|
|
||||||
source file wherever it is. (Many versions of @code{make} set @samp{$<}
|
|
||||||
only in implicit rules.) A Makefile target like
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
foo.o : bar.c
|
|
||||||
$(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
should instead be written as
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
foo.o : bar.c
|
|
||||||
$(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@@
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
in order to allow @samp{VPATH} to work correctly. When the target has
|
|
||||||
multiple dependencies, using an explicit @samp{$(srcdir)} is the easiest
|
|
||||||
way to make the rule work well. For example, the target above for
|
|
||||||
@file{foo.1} is best written as:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
foo.1 : foo.man sedscript
|
|
||||||
sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
Try to make the build and installation targets, at least (and all their
|
|
||||||
subtargets) work correctly with a parallel @code{make}.
|
|
||||||
|
|
||||||
@node Utilities in Makefiles
|
|
||||||
@section Utilities in Makefiles
|
|
||||||
|
|
||||||
Write the Makefile commands (and any shell scripts, such as
|
|
||||||
@code{configure}) to run in @code{sh}, not in @code{csh}. Don't use any
|
|
||||||
special features of @code{ksh} or @code{bash}.
|
|
||||||
|
|
||||||
The @code{configure} script and the Makefile rules for building and
|
|
||||||
installation should not use any utilities directly except these:
|
|
||||||
|
|
||||||
@example
|
|
||||||
cat cmp cp echo egrep expr false grep
|
|
||||||
ln mkdir mv pwd rm rmdir sed test touch true
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Stick to the generally supported options for these programs. For
|
|
||||||
example, don't use @samp{mkdir -p}, convenient as it may be, because
|
|
||||||
most systems don't support it.
|
|
||||||
|
|
||||||
It is a good idea to avoid creating symbolic links in makefiles, since a
|
|
||||||
few systems don't support them.
|
|
||||||
|
|
||||||
The Makefile rules for building and installation can also use compilers
|
|
||||||
and related programs, but should do so via @code{make} variables so that the
|
|
||||||
user can substitute alternatives. Here are some of the programs we
|
|
||||||
mean:
|
|
||||||
|
|
||||||
@example
|
|
||||||
ar bison cc flex install ld lex
|
|
||||||
make makeinfo ranlib texi2dvi yacc
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Use the following @code{make} variables:
|
|
||||||
|
|
||||||
@example
|
|
||||||
$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX)
|
|
||||||
$(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
|
|
||||||
@end example
|
|
||||||
|
|
||||||
When you use @code{ranlib}, you should make sure nothing bad happens if
|
|
||||||
the system does not have @code{ranlib}. Arrange to ignore an error
|
|
||||||
from that command, and print a message before the command to tell the
|
|
||||||
user that failure of the @code{ranlib} command does not mean a problem.
|
|
||||||
(The Autoconf @samp{AC_PROG_RANLIB} macro can help with this.)
|
|
||||||
|
|
||||||
If you use symbolic links, you should implement a fallback for systems
|
|
||||||
that don't have symbolic links.
|
|
||||||
|
|
||||||
It is ok to use other utilities in Makefile portions (or scripts)
|
|
||||||
intended only for particular systems where you know those utilities
|
|
||||||
exist.
|
|
||||||
|
|
||||||
@node Command Variables
|
|
||||||
@section Variables for Specifying Commands
|
|
||||||
|
|
||||||
Makefiles should provide variables for overriding certain commands, options,
|
|
||||||
and so on.
|
|
||||||
|
|
||||||
In particular, you should run most utility programs via variables.
|
|
||||||
Thus, if you use Bison, have a variable named @code{BISON} whose default
|
|
||||||
value is set with @samp{BISON = bison}, and refer to it with
|
|
||||||
@code{$(BISON)} whenever you need to use Bison.
|
|
||||||
|
|
||||||
File management utilities such as @code{ln}, @code{rm}, @code{mv}, and
|
|
||||||
so on, need not be referred to through variables in this way, since users
|
|
||||||
don't need to replace them with other programs.
|
|
||||||
|
|
||||||
Each program-name variable should come with an options variable that is
|
|
||||||
used to supply options to the program. Append @samp{FLAGS} to the
|
|
||||||
program-name variable name to get the options variable name---for
|
|
||||||
example, @code{BISONFLAGS}. (The name @code{CFLAGS} is an exception to
|
|
||||||
this rule, but we keep it because it is standard.) Use @code{CPPFLAGS}
|
|
||||||
in any compilation command that runs the preprocessor, and use
|
|
||||||
@code{LDFLAGS} in any compilation command that does linking as well as
|
|
||||||
in any direct use of @code{ld}.
|
|
||||||
|
|
||||||
If there are C compiler options that @emph{must} be used for proper
|
|
||||||
compilation of certain files, do not include them in @code{CFLAGS}.
|
|
||||||
Users expect to be able to specify @code{CFLAGS} freely themselves.
|
|
||||||
Instead, arrange to pass the necessary options to the C compiler
|
|
||||||
independently of @code{CFLAGS}, by writing them explicitly in the
|
|
||||||
compilation commands or by defining an implicit rule, like this:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
CFLAGS = -g
|
|
||||||
ALL_CFLAGS = -I. $(CFLAGS)
|
|
||||||
.c.o:
|
|
||||||
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
Do include the @samp{-g} option in @code{CFLAGS}, because that is not
|
|
||||||
@emph{required} for proper compilation. You can consider it a default
|
|
||||||
that is only recommended. If the package is set up so that it is
|
|
||||||
compiled with GCC by default, then you might as well include @samp{-O}
|
|
||||||
in the default value of @code{CFLAGS} as well.
|
|
||||||
|
|
||||||
Put @code{CFLAGS} last in the compilation command, after other variables
|
|
||||||
containing compiler options, so the user can use @code{CFLAGS} to
|
|
||||||
override the others.
|
|
||||||
|
|
||||||
Every Makefile should define the variable @code{INSTALL}, which is the
|
|
||||||
basic command for installing a file into the system.
|
|
||||||
|
|
||||||
Every Makefile should also define the variables @code{INSTALL_PROGRAM}
|
|
||||||
and @code{INSTALL_DATA}. (The default for each of these should be
|
|
||||||
@code{$(INSTALL)}.) Then it should use those variables as the commands
|
|
||||||
for actual installation, for executables and nonexecutables
|
|
||||||
respectively. Use these variables as follows:
|
|
||||||
|
|
||||||
@example
|
|
||||||
$(INSTALL_PROGRAM) foo $(bindir)/foo
|
|
||||||
$(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
Always use a file name, not a directory name, as the second argument of
|
|
||||||
the installation commands. Use a separate command for each file to be
|
|
||||||
installed.
|
|
||||||
|
|
||||||
@node Directory Variables
|
|
||||||
@section Variables for Installation Directories
|
|
||||||
|
|
||||||
Installation directories should always be named by variables, so it is
|
|
||||||
easy to install in a nonstandard place. The standard names for these
|
|
||||||
variables are described below. They are based on a standard filesystem
|
|
||||||
layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
|
|
||||||
other modern operating systems.
|
|
||||||
|
|
||||||
These two variables set the root for the installation. All the other
|
|
||||||
installation directories should be subdirectories of one of these two,
|
|
||||||
and nothing should be directly installed into these two directories.
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item prefix
|
|
||||||
A prefix used in constructing the default values of the variables listed
|
|
||||||
below. The default value of @code{prefix} should be @file{/usr/local}.
|
|
||||||
When building the complete GNU system, the prefix will be empty and
|
|
||||||
@file{/usr} will be a symbolic link to @file{/}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@prefix@@}.)
|
|
||||||
|
|
||||||
@item exec_prefix
|
|
||||||
A prefix used in constructing the default values of some of the
|
|
||||||
variables listed below. The default value of @code{exec_prefix} should
|
|
||||||
be @code{$(prefix)}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@exec_prefix@@}.)
|
|
||||||
|
|
||||||
Generally, @code{$(exec_prefix)} is used for directories that contain
|
|
||||||
machine-specific files (such as executables and subroutine libraries),
|
|
||||||
while @code{$(prefix)} is used directly for other directories.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Executable programs are installed in one of the following directories.
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item bindir
|
|
||||||
The directory for installing executable programs that users can run.
|
|
||||||
This should normally be @file{/usr/local/bin}, but write it as
|
|
||||||
@file{$(exec_prefix)/bin}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@bindir@@}.)
|
|
||||||
|
|
||||||
@item sbindir
|
|
||||||
The directory for installing executable programs that can be run from
|
|
||||||
the shell, but are only generally useful to system administrators. This
|
|
||||||
should normally be @file{/usr/local/sbin}, but write it as
|
|
||||||
@file{$(exec_prefix)/sbin}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
|
|
||||||
|
|
||||||
@item libexecdir
|
|
||||||
@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
|
|
||||||
The directory for installing executable programs to be run by other
|
|
||||||
programs rather than by users. This directory should normally be
|
|
||||||
@file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@libexecdir@@}.)
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Data files used by the program during its execution are divided into
|
|
||||||
categories in two ways.
|
|
||||||
|
|
||||||
@itemize @bullet
|
|
||||||
@item
|
|
||||||
Some files are normally modified by programs; others are never normally
|
|
||||||
modified (though users may edit some of these).
|
|
||||||
|
|
||||||
@item
|
|
||||||
Some files are architecture-independent and can be shared by all
|
|
||||||
machines at a site; some are architecture-dependent and can be shared
|
|
||||||
only by machines of the same kind and operating system; others may never
|
|
||||||
be shared between two machines.
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
This makes for six different possibilities. However, we want to
|
|
||||||
discourage the use of architecture-dependent files, aside from object
|
|
||||||
files and libraries. It is much cleaner to make other data files
|
|
||||||
architecture-independent, and it is generally not hard.
|
|
||||||
|
|
||||||
Therefore, here are the variables Makefiles should use to specify
|
|
||||||
directories:
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item datadir
|
|
||||||
The directory for installing read-only architecture independent data
|
|
||||||
files. This should normally be @file{/usr/local/share}, but write it as
|
|
||||||
@file{$(prefix)/share}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@datadir@@}.)
|
|
||||||
As a special exception, see @file{$(infodir)}
|
|
||||||
and @file{$(includedir)} below.
|
|
||||||
|
|
||||||
@item sysconfdir
|
|
||||||
The directory for installing read-only data files that pertain to a
|
|
||||||
single machine--that is to say, files for configuring a host. Mailer
|
|
||||||
and network configuration files, @file{/etc/passwd}, and so forth belong
|
|
||||||
here. All the files in this directory should be ordinary ASCII text
|
|
||||||
files. This directory should normally be @file{/usr/local/etc}, but
|
|
||||||
write it as @file{$(prefix)/etc}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@sysconfdir@@}.)
|
|
||||||
|
|
||||||
@c rewritten to avoid overfull hbox --tower
|
|
||||||
Do not install executables
|
|
||||||
@c here
|
|
||||||
in this directory (they probably
|
|
||||||
belong in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not
|
|
||||||
install files that are modified in the normal course of their use
|
|
||||||
(programs whose purpose is to change the configuration of the system
|
|
||||||
excluded). Those probably belong in @file{$(localstatedir)}.
|
|
||||||
|
|
||||||
@item sharedstatedir
|
|
||||||
The directory for installing architecture-independent data files which
|
|
||||||
the programs modify while they run. This should normally be
|
|
||||||
@file{/usr/local/com}, but write it as @file{$(prefix)/com}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@sharedstatedir@@}.)
|
|
||||||
|
|
||||||
@item localstatedir
|
|
||||||
The directory for installing data files which the programs modify while
|
|
||||||
they run, and that pertain to one specific machine. Users should never
|
|
||||||
need to modify files in this directory to configure the package's
|
|
||||||
operation; put such configuration information in separate files that go
|
|
||||||
in @file{$(datadir)} or @file{$(sysconfdir)}. @file{$(localstatedir)}
|
|
||||||
should normally be @file{/usr/local/var}, but write it as
|
|
||||||
@file{$(prefix)/var}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@localstatedir@@}.)
|
|
||||||
|
|
||||||
@item libdir
|
|
||||||
The directory for object files and libraries of object code. Do not
|
|
||||||
install executables here, they probably ought to go in @file{$(libexecdir)}
|
|
||||||
instead. The value of @code{libdir} should normally be
|
|
||||||
@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@libdir@@}.)
|
|
||||||
|
|
||||||
@item infodir
|
|
||||||
The directory for installing the Info files for this package. By
|
|
||||||
default, it should be @file{/usr/local/info}, but it should be written
|
|
||||||
as @file{$(prefix)/info}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@infodir@@}.)
|
|
||||||
|
|
||||||
@item lispdir
|
|
||||||
The directory for installing any Emacs Lisp files in this package. By
|
|
||||||
default, it should be @file{/usr/local/share/emacs/site-lisp}, but it
|
|
||||||
should be written as @file{$(prefix)/share/emacs/site-lisp}.
|
|
||||||
|
|
||||||
If you are using Autoconf, write the default as @samp{@@lispdir@@}.
|
|
||||||
In order to make @samp{@@lispdir@@} work, you need the following lines
|
|
||||||
in your @file{configure.in} file:
|
|
||||||
|
|
||||||
@example
|
|
||||||
lispdir='$@{datadir@}/emacs/site-lisp'
|
|
||||||
AC_SUBST(lispdir)
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item includedir
|
|
||||||
@c rewritten to avoid overfull hbox --roland
|
|
||||||
The directory for installing header files to be included by user
|
|
||||||
programs with the C @samp{#include} preprocessor directive. This
|
|
||||||
should normally be @file{/usr/local/include}, but write it as
|
|
||||||
@file{$(prefix)/include}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@includedir@@}.)
|
|
||||||
|
|
||||||
Most compilers other than GCC do not look for header files in
|
|
||||||
@file{/usr/local/include}. So installing the header files this way is
|
|
||||||
only useful with GCC. Sometimes this is not a problem because some
|
|
||||||
libraries are only really intended to work with GCC. But some libraries
|
|
||||||
are intended to work with other compilers. They should install their
|
|
||||||
header files in two places, one specified by @code{includedir} and one
|
|
||||||
specified by @code{oldincludedir}.
|
|
||||||
|
|
||||||
@item oldincludedir
|
|
||||||
The directory for installing @samp{#include} header files for use with
|
|
||||||
compilers other than GCC. This should normally be @file{/usr/include}.
|
|
||||||
(If you are using Autoconf, you can write it as @samp{@@oldincludedir@@}.)
|
|
||||||
|
|
||||||
The Makefile commands should check whether the value of
|
|
||||||
@code{oldincludedir} is empty. If it is, they should not try to use
|
|
||||||
it; they should cancel the second installation of the header files.
|
|
||||||
|
|
||||||
A package should not replace an existing header in this directory unless
|
|
||||||
the header came from the same package. Thus, if your Foo package
|
|
||||||
provides a header file @file{foo.h}, then it should install the header
|
|
||||||
file in the @code{oldincludedir} directory if either (1) there is no
|
|
||||||
@file{foo.h} there or (2) the @file{foo.h} that exists came from the Foo
|
|
||||||
package.
|
|
||||||
|
|
||||||
To tell whether @file{foo.h} came from the Foo package, put a magic
|
|
||||||
string in the file---part of a comment---and @code{grep} for that string.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Unix-style man pages are installed in one of the following:
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item mandir
|
|
||||||
The top-level directory for installing the man pages (if any) for this
|
|
||||||
package. It will normally be @file{/usr/local/man}, but you should
|
|
||||||
write it as @file{$(prefix)/man}.
|
|
||||||
(If you are using Autoconf, write it as @samp{@@mandir@@}.)
|
|
||||||
|
|
||||||
@item man1dir
|
|
||||||
The directory for installing section 1 man pages. Write it as
|
|
||||||
@file{$(mandir)/man1}.
|
|
||||||
@item man2dir
|
|
||||||
The directory for installing section 2 man pages. Write it as
|
|
||||||
@file{$(mandir)/man2}
|
|
||||||
@item @dots{}
|
|
||||||
|
|
||||||
@strong{Don't make the primary documentation for any GNU software be a
|
|
||||||
man page. Write a manual in Texinfo instead. Man pages are just for
|
|
||||||
the sake of people running GNU software on Unix, which is a secondary
|
|
||||||
application only.}
|
|
||||||
|
|
||||||
@item manext
|
|
||||||
The file name extension for the installed man page. This should contain
|
|
||||||
a period followed by the appropriate digit; it should normally be @samp{.1}.
|
|
||||||
|
|
||||||
@item man1ext
|
|
||||||
The file name extension for installed section 1 man pages.
|
|
||||||
@item man2ext
|
|
||||||
The file name extension for installed section 2 man pages.
|
|
||||||
@item @dots{}
|
|
||||||
Use these names instead of @samp{manext} if the package needs to install man
|
|
||||||
pages in more than one section of the manual.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
And finally, you should set the following variable:
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item srcdir
|
|
||||||
The directory for the sources being compiled. The value of this
|
|
||||||
variable is normally inserted by the @code{configure} shell script.
|
|
||||||
(If you are using Autconf, use @samp{srcdir = @@srcdir@@}.)
|
|
||||||
@end table
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
@c I have changed some of the comments here slightly to fix an overfull
|
|
||||||
@c hbox, so the make manual can format correctly. --roland
|
|
||||||
# Common prefix for installation directories.
|
|
||||||
# NOTE: This directory must exist when you start the install.
|
|
||||||
prefix = /usr/local
|
|
||||||
exec_prefix = $(prefix)
|
|
||||||
# Where to put the executable for the command `gcc'.
|
|
||||||
bindir = $(exec_prefix)/bin
|
|
||||||
# Where to put the directories used by the compiler.
|
|
||||||
libexecdir = $(exec_prefix)/libexec
|
|
||||||
# Where to put the Info files.
|
|
||||||
infodir = $(prefix)/info
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
If your program installs a large number of files into one of the
|
|
||||||
standard user-specified directories, it might be useful to group them
|
|
||||||
into a subdirectory particular to that program. If you do this, you
|
|
||||||
should write the @code{install} rule to create these subdirectories.
|
|
||||||
|
|
||||||
Do not expect the user to include the subdirectory name in the value of
|
|
||||||
any of the variables listed above. The idea of having a uniform set of
|
|
||||||
variable names for installation directories is to enable the user to
|
|
||||||
specify the exact same values for several different GNU packages. In
|
|
||||||
order for this to be useful, all the packages must be designed so that
|
|
||||||
they will work sensibly when the user does so.
|
|
||||||
|
|
||||||
@node Standard Targets
|
|
||||||
@section Standard Targets for Users
|
|
||||||
|
|
||||||
All GNU programs should have the following targets in their Makefiles:
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item all
|
|
||||||
Compile the entire program. This should be the default target. This
|
|
||||||
target need not rebuild any documentation files; Info files should
|
|
||||||
normally be included in the distribution, and DVI files should be made
|
|
||||||
only when explicitly asked for.
|
|
||||||
|
|
||||||
By default, the Make rules should compile and link with @samp{-g}, so
|
|
||||||
that executable programs have debugging symbols. Users who don't mind
|
|
||||||
being helpless can strip the executables later if they wish.
|
|
||||||
|
|
||||||
@item install
|
|
||||||
Compile the program and copy the executables, libraries, and so on to
|
|
||||||
the file names where they should reside for actual use. If there is a
|
|
||||||
simple test to verify that a program is properly installed, this target
|
|
||||||
should run that test.
|
|
||||||
|
|
||||||
Do not strip executables when installing them. Devil-may-care users can
|
|
||||||
use the @code{install-strip} target to do that.
|
|
||||||
|
|
||||||
If possible, write the @code{install} target rule so that it does not
|
|
||||||
modify anything in the directory where the program was built, provided
|
|
||||||
@samp{make all} has just been done. This is convenient for building the
|
|
||||||
program under one user name and installing it under another.
|
|
||||||
|
|
||||||
The commands should create all the directories in which files are to be
|
|
||||||
installed, if they don't already exist. This includes the directories
|
|
||||||
specified as the values of the variables @code{prefix} and
|
|
||||||
@code{exec_prefix}, as well as all subdirectories that are needed.
|
|
||||||
One way to do this is by means of an @code{installdirs} target
|
|
||||||
as described below.
|
|
||||||
|
|
||||||
Use @samp{-} before any command for installing a man page, so that
|
|
||||||
@code{make} will ignore any errors. This is in case there are systems
|
|
||||||
that don't have the Unix man page documentation system installed.
|
|
||||||
|
|
||||||
The way to install Info files is to copy them into @file{$(infodir)}
|
|
||||||
with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run
|
|
||||||
the @code{install-info} program if it is present. @code{install-info}
|
|
||||||
is a program that edits the Info @file{dir} file to add or update the
|
|
||||||
menu entry for the given Info file; it is part of the Texinfo package.
|
|
||||||
Here is a sample rule to install an Info file:
|
|
||||||
|
|
||||||
@comment This example has been carefully formatted for the Make manual.
|
|
||||||
@comment Please do not reformat it without talking to roland@gnu.ai.mit.edu.
|
|
||||||
@smallexample
|
|
||||||
$(infodir)/foo.info: foo.info
|
|
||||||
# There may be a newer info file in . than in srcdir.
|
|
||||||
-if test -f foo.info; then d=.; \
|
|
||||||
else d=$(srcdir); fi; \
|
|
||||||
$(INSTALL_DATA) $$d/foo.info $@@; \
|
|
||||||
# Run install-info only if it exists.
|
|
||||||
# Use `if' instead of just prepending `-' to the
|
|
||||||
# line so we notice real errors from install-info.
|
|
||||||
# We use `$(SHELL) -c' because some shells do not
|
|
||||||
# fail gracefully when there is an unknown command.
|
|
||||||
if $(SHELL) -c 'install-info --version' \
|
|
||||||
>/dev/null 2>&1; then \
|
|
||||||
install-info --dir-file=$(infodir)/dir \
|
|
||||||
$(infodir)/foo.info; \
|
|
||||||
else true; fi
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@item uninstall
|
|
||||||
Delete all the installed files that the @samp{install} target would
|
|
||||||
create (but not the noninstalled files such as @samp{make all} would
|
|
||||||
create).
|
|
||||||
|
|
||||||
This rule should not modify the directories where compilation is done,
|
|
||||||
only the directories where files are installed.
|
|
||||||
|
|
||||||
@item install-strip
|
|
||||||
Like @code{install}, but strip the executable files while installing
|
|
||||||
them. The definition of this target can be very simple:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
install-strip:
|
|
||||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
|
|
||||||
install
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
Normally we do not recommend stripping an executable unless you are sure
|
|
||||||
the program has no bugs. However, it can be reasonable to install a
|
|
||||||
stripped executable for actual execution while saving the unstripped
|
|
||||||
executable elsewhere in case there is a bug.
|
|
||||||
|
|
||||||
@comment The gratuitous blank line here is to make the table look better
|
|
||||||
@comment in the printed Make manual. Please leave it in.
|
|
||||||
@item clean
|
|
||||||
|
|
||||||
Delete all files from the current directory that are normally created by
|
|
||||||
building the program. Don't delete the files that record the
|
|
||||||
configuration. Also preserve files that could be made by building, but
|
|
||||||
normally aren't because the distribution comes with them.
|
|
||||||
|
|
||||||
Delete @file{.dvi} files here if they are not part of the distribution.
|
|
||||||
|
|
||||||
@item distclean
|
|
||||||
Delete all files from the current directory that are created by
|
|
||||||
configuring or building the program. If you have unpacked the source
|
|
||||||
and built the program without creating any other files, @samp{make
|
|
||||||
distclean} should leave only the files that were in the distribution.
|
|
||||||
|
|
||||||
@item mostlyclean
|
|
||||||
Like @samp{clean}, but may refrain from deleting a few files that people
|
|
||||||
normally don't want to recompile. For example, the @samp{mostlyclean}
|
|
||||||
target for GCC does not delete @file{libgcc.a}, because recompiling it
|
|
||||||
is rarely necessary and takes a lot of time.
|
|
||||||
|
|
||||||
@item maintainer-clean
|
|
||||||
Delete almost everything from the current directory that can be
|
|
||||||
reconstructed with this Makefile. This typically includes everything
|
|
||||||
deleted by @code{distclean}, plus more: C source files produced by
|
|
||||||
Bison, tags tables, Info files, and so on.
|
|
||||||
|
|
||||||
The reason we say ``almost everything'' is that running the command
|
|
||||||
@samp{make maintainer-clean} should not delete @file{configure} even if
|
|
||||||
@file{configure} can be remade using a rule in the Makefile. More generally,
|
|
||||||
@samp{make maintainer-clean} should not delete anything that needs to
|
|
||||||
exist in order to run @file{configure} and then begin to build the
|
|
||||||
program. This is the only exception; @code{maintainer-clean} should
|
|
||||||
delete everything else that can be rebuilt.
|
|
||||||
|
|
||||||
The @samp{maintainer-clean} target is intended to be used by a maintainer of
|
|
||||||
the package, not by ordinary users. You may need special tools to
|
|
||||||
reconstruct some of the files that @samp{make maintainer-clean} deletes.
|
|
||||||
Since these files are normally included in the distribution, we don't
|
|
||||||
take care to make them easy to reconstruct. If you find you need to
|
|
||||||
unpack the full distribution again, don't blame us.
|
|
||||||
|
|
||||||
To help make users aware of this, the commands for the special
|
|
||||||
@code{maintainer-clean} target should start with these two:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
@@echo 'This command is intended for maintainers to use; it'
|
|
||||||
@@echo 'deletes files that may need special tools to rebuild.'
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@item TAGS
|
|
||||||
Update a tags table for this program.
|
|
||||||
@c ADR: how?
|
|
||||||
|
|
||||||
@item info
|
|
||||||
Generate any Info files needed. The best way to write the rules is as
|
|
||||||
follows:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
info: foo.info
|
|
||||||
|
|
||||||
foo.info: foo.texi chap1.texi chap2.texi
|
|
||||||
$(MAKEINFO) $(srcdir)/foo.texi
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
You must define the variable @code{MAKEINFO} in the Makefile. It should
|
|
||||||
run the @code{makeinfo} program, which is part of the Texinfo
|
|
||||||
distribution.
|
|
||||||
|
|
||||||
@item dvi
|
|
||||||
Generate DVI files for all Texinfo documentation.
|
|
||||||
For example:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
dvi: foo.dvi
|
|
||||||
|
|
||||||
foo.dvi: foo.texi chap1.texi chap2.texi
|
|
||||||
$(TEXI2DVI) $(srcdir)/foo.texi
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
@noindent
|
|
||||||
You must define the variable @code{TEXI2DVI} in the Makefile. It should
|
|
||||||
run the program @code{texi2dvi}, which is part of the Texinfo
|
|
||||||
distribution.@footnote{@code{texi2dvi} uses @TeX{} to do the real work
|
|
||||||
of formatting. @TeX{} is not distributed with Texinfo.} Alternatively,
|
|
||||||
write just the dependencies, and allow GNU @code{make} to provide the command.
|
|
||||||
|
|
||||||
@item dist
|
|
||||||
Create a distribution tar file for this program. The tar file should be
|
|
||||||
set up so that the file names in the tar file start with a subdirectory
|
|
||||||
name which is the name of the package it is a distribution for. This
|
|
||||||
name can include the version number.
|
|
||||||
|
|
||||||
For example, the distribution tar file of GCC version 1.40 unpacks into
|
|
||||||
a subdirectory named @file{gcc-1.40}.
|
|
||||||
|
|
||||||
The easiest way to do this is to create a subdirectory appropriately
|
|
||||||
named, use @code{ln} or @code{cp} to install the proper files in it, and
|
|
||||||
then @code{tar} that subdirectory.
|
|
||||||
|
|
||||||
Compress the tar file file with @code{gzip}. For example, the actual
|
|
||||||
distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
|
|
||||||
|
|
||||||
The @code{dist} target should explicitly depend on all non-source files
|
|
||||||
that are in the distribution, to make sure they are up to date in the
|
|
||||||
distribution.
|
|
||||||
@ifset CODESTD
|
|
||||||
@xref{Releases, , Making Releases}.
|
|
||||||
@end ifset
|
|
||||||
@ifclear CODESTD
|
|
||||||
@xref{Releases, , Making Releases, standards, GNU Coding Standards}.
|
|
||||||
@end ifclear
|
|
||||||
|
|
||||||
@item check
|
|
||||||
Perform self-tests (if any). The user must build the program before
|
|
||||||
running the tests, but need not install the program; you should write
|
|
||||||
the self-tests so that they work when the program is built but not
|
|
||||||
installed.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
The following targets are suggested as conventional names, for programs
|
|
||||||
in which they are useful.
|
|
||||||
|
|
||||||
@table @code
|
|
||||||
@item installcheck
|
|
||||||
Perform installation tests (if any). The user must build and install
|
|
||||||
the program before running the tests. You should not assume that
|
|
||||||
@file{$(bindir)} is in the search path.
|
|
||||||
|
|
||||||
@item installdirs
|
|
||||||
It's useful to add a target named @samp{installdirs} to create the
|
|
||||||
directories where files are installed, and their parent directories.
|
|
||||||
There is a script called @file{mkinstalldirs} which is convenient for
|
|
||||||
this; you can find it in the Texinfo package.
|
|
||||||
@c It's in /gd/gnu/lib/mkinstalldirs.
|
|
||||||
You can use a rule like this:
|
|
||||||
|
|
||||||
@comment This has been carefully formatted to look decent in the Make manual.
|
|
||||||
@comment Please be sure not to make it extend any further to the right.--roland
|
|
||||||
@smallexample
|
|
||||||
# Make sure all installation directories (e.g. $(bindir))
|
|
||||||
# actually exist by making them if necessary.
|
|
||||||
installdirs: mkinstalldirs
|
|
||||||
$(srcdir)/mkinstalldirs $(bindir) $(datadir) \
|
|
||||||
$(libdir) $(infodir) \
|
|
||||||
$(mandir)
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
This rule should not modify the directories where compilation is done.
|
|
||||||
It should do nothing but create installation directories.
|
|
||||||
@end table
|
|
||||||
267
make.1
267
make.1
@@ -1,50 +1,35 @@
|
|||||||
.TH MAKE 1L "22 August 1989" "GNU" "LOCAL USER COMMANDS"
|
.TH MAKE 1 "03 March 2012" "GNU" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
make \- GNU make utility to maintain groups of programs
|
make \- GNU make utility to maintain groups of programs
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B "make "
|
|
||||||
[
|
|
||||||
.B \-f
|
|
||||||
makefile ] [ option ] ...
|
|
||||||
target ...
|
|
||||||
.SH WARNING
|
|
||||||
This man paage 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
|
.B make
|
||||||
or the DVI file
|
[\fIOPTION\fR]... [\fITARGET\fR]...
|
||||||
.B make.dvi
|
|
||||||
which are made from the Texinfo source file
|
|
||||||
.BR make.texinfo .
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.LP
|
.LP
|
||||||
The purpose of the
|
The
|
||||||
.I make
|
.I make
|
||||||
utility is to determine automatically which
|
utility will determine automatically which pieces of a large program need to
|
||||||
pieces of a large program need to be recompiled, and issue the commands to
|
be recompiled, and issue the commands to recompile them. The manual describes
|
||||||
recompile them.
|
the GNU implementation of
|
||||||
This manual describes the GNU implementation of
|
.BR make ,
|
||||||
.IR make ,
|
which was written by Richard Stallman and Roland McGrath, and is currently
|
||||||
which was written by Richard Stallman and Roland McGrath.
|
maintained by Paul Smith. Our examples show C programs, since they are very
|
||||||
Our examples show C programs, since they are most common, but you can use
|
common, but you can use
|
||||||
.I make
|
.B make
|
||||||
with any programming language whose compiler can be run with a
|
with any programming language whose compiler can be run with a shell command.
|
||||||
shell command.
|
|
||||||
In fact,
|
In fact,
|
||||||
.I make
|
.B make
|
||||||
is not limited to programs.
|
is not limited to programs. You can use it to describe any task where some
|
||||||
You can use it to describe any task where some files must be
|
files must be updated automatically from others whenever the others change.
|
||||||
updated automatically from others whenever the others change.
|
|
||||||
.LP
|
.LP
|
||||||
To prepare to use
|
To prepare to use
|
||||||
.IR make ,
|
.BR make ,
|
||||||
you must write a file called the
|
you must write a file called the
|
||||||
.I makefile
|
.I makefile
|
||||||
that describes the relationships among files in your program, and the
|
that describes the relationships among files in your program, and the states
|
||||||
states the commands for updating each file.
|
the commands for updating each file. In a program, typically the executable
|
||||||
In a program, typically the executable file is updated from object
|
file is updated from object files, which are in turn made by compiling source
|
||||||
files, which are in turn made by compiling source files.
|
files.
|
||||||
.LP
|
.LP
|
||||||
Once a suitable makefile exists, each time you change some source files,
|
Once a suitable makefile exists, each time you change some source files,
|
||||||
this simple shell command:
|
this simple shell command:
|
||||||
@@ -55,16 +40,15 @@ this simple shell command:
|
|||||||
.sp 1
|
.sp 1
|
||||||
suffices to perform all necessary recompilations.
|
suffices to perform all necessary recompilations.
|
||||||
The
|
The
|
||||||
.I make
|
.B make
|
||||||
program uses the makefile data base and the last-modification times
|
program uses the makefile description and the last-modification times of the
|
||||||
of the files to decide which of the files need to be updated.
|
files to decide which of the files need to be updated. For each of those
|
||||||
For each of those files, it issues the commands recorded in the data base.
|
files, it issues the commands recorded in the makefile.
|
||||||
.LP
|
.LP
|
||||||
.I make
|
.B make
|
||||||
executes commands in the
|
executes commands in the
|
||||||
.I makefile
|
.I makefile
|
||||||
to update
|
to update one or more target
|
||||||
one or more target
|
|
||||||
.IR names ,
|
.IR names ,
|
||||||
where
|
where
|
||||||
.I name
|
.I name
|
||||||
@@ -72,7 +56,7 @@ is typically a program.
|
|||||||
If no
|
If no
|
||||||
.B \-f
|
.B \-f
|
||||||
option is present,
|
option is present,
|
||||||
.I make
|
.B make
|
||||||
will look for the makefiles
|
will look for the makefiles
|
||||||
.IR GNUmakefile ,
|
.IR GNUmakefile ,
|
||||||
.IR makefile ,
|
.IR makefile ,
|
||||||
@@ -91,29 +75,30 @@ listing, right near other important files such as
|
|||||||
.IR README .)
|
.IR README .)
|
||||||
The first name checked,
|
The first name checked,
|
||||||
.IR GNUmakefile ,
|
.IR GNUmakefile ,
|
||||||
is not recommended for most makefiles.
|
is not recommended for most makefiles. You should use this name if you have a
|
||||||
You should use this name if you have a makefile that is specific to GNU
|
makefile that is specific to GNU
|
||||||
.IR make ,
|
.BR make ,
|
||||||
and will not be understood by other versions of
|
and will not be understood by other versions of
|
||||||
.IR make .
|
.BR make .
|
||||||
If
|
If
|
||||||
.I makefile
|
.I makefile
|
||||||
is `\-', the standard input is read.
|
is '\-', the standard input is read.
|
||||||
.LP
|
.LP
|
||||||
.I make
|
.B make
|
||||||
updates a target if it depends on prerequisite files
|
updates a target if it depends on prerequisite files
|
||||||
that have been modified since the target was last modified,
|
that have been modified since the target was last modified,
|
||||||
or if the target does not exist.
|
or if the target does not exist.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.sp 1
|
.sp 1
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-b
|
\fB\-b\fR, \fB\-m\fR
|
||||||
.TP 0.5i
|
|
||||||
.B \-m
|
|
||||||
These options are ignored for compatibility with other versions of
|
These options are ignored for compatibility with other versions of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-C " dir
|
\fB\-B\fR, \fB\-\-always\-make\fR
|
||||||
|
Unconditionally make all targets.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
|
||||||
Change to directory
|
Change to directory
|
||||||
.I dir
|
.I dir
|
||||||
before reading the makefiles or doing anything else.
|
before reading the makefiles or doing anything else.
|
||||||
@@ -126,7 +111,7 @@ previous one:
|
|||||||
is equivalent to
|
is equivalent to
|
||||||
.BR "\-C " /etc.
|
.BR "\-C " /etc.
|
||||||
This is typically used with recursive invocations of
|
This is typically used with recursive invocations of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-d
|
.B \-d
|
||||||
Print debugging information in addition to normal processing.
|
Print debugging information in addition to normal processing.
|
||||||
@@ -134,22 +119,45 @@ The debugging information says which files are being considered for
|
|||||||
remaking, which file-times are being compared and with what results,
|
remaking, which file-times are being compared and with what results,
|
||||||
which files actually need to be remade, which implicit rules are
|
which files actually need to be remade, which implicit rules are
|
||||||
considered and which are applied---everything interesting about how
|
considered and which are applied---everything interesting about how
|
||||||
.I make
|
.B make
|
||||||
decides what to do.
|
decides what to do.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-e
|
.BI \-\-debug "[=FLAGS]"
|
||||||
|
Print debugging information in addition to normal processing.
|
||||||
|
If the
|
||||||
|
.I FLAGS
|
||||||
|
are omitted, then the behavior is the same as if
|
||||||
|
.B \-d
|
||||||
|
was specified.
|
||||||
|
.I FLAGS
|
||||||
|
may be
|
||||||
|
.I a
|
||||||
|
for all debugging output (same as using
|
||||||
|
.BR \-d ),
|
||||||
|
.I b
|
||||||
|
for basic debugging,
|
||||||
|
.I v
|
||||||
|
for more verbose basic debugging,
|
||||||
|
.I i
|
||||||
|
for showing implicit rules,
|
||||||
|
.I j
|
||||||
|
for details on invocation of commands, and
|
||||||
|
.I m
|
||||||
|
for debugging while remaking makefiles.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-e\fR, \fB\-\-environment\-overrides\fR
|
||||||
Give variables taken from the environment precedence
|
Give variables taken from the environment precedence
|
||||||
over variables from makefiles.
|
over variables from makefiles.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-f " file
|
\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
|
||||||
Use
|
Use
|
||||||
.I file
|
.I file
|
||||||
as a makefile.
|
as a makefile.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-i
|
\fB\-i\fR, \fB\-\-ignore\-errors\fR
|
||||||
Ignore all errors in commands executed to remake files.
|
Ignore all errors in commands executed to remake files.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-I " dir
|
\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
|
||||||
Specifies a directory
|
Specifies a directory
|
||||||
.I dir
|
.I dir
|
||||||
to search for included makefiles.
|
to search for included makefiles.
|
||||||
@@ -158,48 +166,53 @@ If several
|
|||||||
options are used to specify several directories, the directories are
|
options are used to specify several directories, the directories are
|
||||||
searched in the order specified.
|
searched in the order specified.
|
||||||
Unlike the arguments to other flags of
|
Unlike the arguments to other flags of
|
||||||
.IR make ,
|
.BR make ,
|
||||||
directories given with
|
directories given with
|
||||||
.B \-I
|
.B \-I
|
||||||
flags may come directly after the flag:
|
flags may come directly after the flag:
|
||||||
.BI \-I dir
|
.BI \-I dir
|
||||||
is allowed, as well as
|
is allowed, as well as
|
||||||
.BI "\-I " dir.
|
.B \-I
|
||||||
|
.IR dir .
|
||||||
This syntax is allowed for compatibility with the C
|
This syntax is allowed for compatibility with the C
|
||||||
preprocessor's
|
preprocessor's
|
||||||
.B \-I
|
.B \-I
|
||||||
flag.
|
flag.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-j " jobs
|
\fB\-j\fR [\fIjobs\fR], \fB\-\-jobs\fR[=\fIjobs\fR]
|
||||||
Specifies the number of jobs (commands) to run simultaneously.
|
Specifies the number of
|
||||||
|
.I jobs
|
||||||
|
(commands) to run simultaneously.
|
||||||
If there is more than one
|
If there is more than one
|
||||||
.B \-j
|
.B \-j
|
||||||
option, the last one is effective.
|
option, the last one is effective.
|
||||||
If the
|
If the
|
||||||
.B \-j
|
.B \-j
|
||||||
option is given without an argument,
|
option is given without an argument,
|
||||||
.IR make
|
.BR make
|
||||||
will not limit the number of jobs that can run simultaneously.
|
will not limit the number of jobs that can run simultaneously.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-k
|
\fB\-k\fR, \fB\-\-keep\-going\fR
|
||||||
Continue as much as possible after an error.
|
Continue as much as possible after an error.
|
||||||
While the target that failed, and those that depend on it, cannot
|
While the target that failed, and those that depend on it, cannot
|
||||||
be remade, the other dependencies of these targets can be processed
|
be remade, the other dependencies of these targets can be processed
|
||||||
all the same.
|
all the same.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-l
|
\fB\-l\fR [\fIload\fR], \fB\-\-load\-average\fR[=\fIload\fR]
|
||||||
.TP 0.5i
|
|
||||||
.BI "\-l " load
|
|
||||||
Specifies that no new jobs (commands) should be started if there are
|
Specifies that no new jobs (commands) should be started if there are
|
||||||
others jobs running and the load average is at least
|
others jobs running and the load average is at least
|
||||||
.I load
|
.I load
|
||||||
(a floating-point number).
|
(a floating-point number).
|
||||||
With no argument, removes a previous load limit.
|
With no argument, removes a previous load limit.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-n
|
\fB\-L\fR, \fB\-\-check\-symlink\-times\fR
|
||||||
Print the commands that would be executed, but do not execute them.
|
Use the latest mtime between symlinks and target.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-o " file
|
\fB\-n\fR, \fB\-\-just\-print\fR, \fB\-\-dry\-run\fR, \fB\-\-recon\fR
|
||||||
|
Print the commands that would be executed, but do not execute them (except in
|
||||||
|
certain circumstances).
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR
|
||||||
Do not remake the file
|
Do not remake the file
|
||||||
.I file
|
.I file
|
||||||
even if it is older than its dependencies, and do not remake anything
|
even if it is older than its dependencies, and do not remake anything
|
||||||
@@ -207,7 +220,7 @@ on account of changes in
|
|||||||
.IR file .
|
.IR file .
|
||||||
Essentially the file is treated as very old and its rules are ignored.
|
Essentially the file is treated as very old and its rules are ignored.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-p
|
\fB\-p\fR, \fB\-\-print\-data\-base\fR
|
||||||
Print the data base (rules and variable values) that results from
|
Print the data base (rules and variable values) that results from
|
||||||
reading the makefiles; then execute as usual or as otherwise
|
reading the makefiles; then execute as usual or as otherwise
|
||||||
specified.
|
specified.
|
||||||
@@ -215,64 +228,69 @@ This also prints the version information given by the
|
|||||||
.B \-v
|
.B \-v
|
||||||
switch (see below).
|
switch (see below).
|
||||||
To print the data base without trying to remake any files, use
|
To print the data base without trying to remake any files, use
|
||||||
.B make
|
.IR "make \-p \-f/dev/null" .
|
||||||
.B \-p
|
|
||||||
.BI \-f /dev/null.
|
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-q
|
\fB\-q\fR, \fB\-\-question\fR
|
||||||
``Question mode''.
|
``Question mode''.
|
||||||
Do not run any commands, or print anything; just return an exit status
|
Do not run any commands, or print anything; just return an exit status
|
||||||
that is zero if the specified targets are already up to date, nonzero
|
that is zero if the specified targets are already up to date, nonzero
|
||||||
otherwise.
|
otherwise.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-r
|
\fB\-r\fR, \fB\-\-no\-builtin\-rules\fR
|
||||||
Eliminate use of the built-in implicit rules.
|
Eliminate use of the built\-in implicit rules.
|
||||||
Also clear out the default list of suffixes for suffix rules.
|
Also clear out the default list of suffixes for suffix rules.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-s
|
\fB\-R\fR, \fB\-\-no\-builtin\-variables\fR
|
||||||
|
Don't define any built\-in variables.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-s\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
|
||||||
Silent operation; do not print the commands as they are executed.
|
Silent operation; do not print the commands as they are executed.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-S
|
\fB\-S\fR, \fB\-\-no\-keep\-going\fR, \fB\-\-stop\fR
|
||||||
Cancel the effect of the
|
Cancel the effect of the
|
||||||
.B \-k
|
.B \-k
|
||||||
option.
|
option.
|
||||||
This is never necessary except in a recursive
|
This is never necessary except in a recursive
|
||||||
.I make
|
.B make
|
||||||
where
|
where
|
||||||
.B \-k
|
.B \-k
|
||||||
might be inherited from the top-level
|
might be inherited from the top-level
|
||||||
.I make
|
.B make
|
||||||
via MAKEFLAGS or if you set
|
via MAKEFLAGS or if you set
|
||||||
.B \-k
|
.B \-k
|
||||||
in MAKEFLAGS in your environment.
|
in MAKEFLAGS in your environment.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-t
|
\fB\-t\fR, \fB\-\-touch\fR
|
||||||
Touch files (mark them up to date without really changing them)
|
Touch files (mark them up to date without really changing them)
|
||||||
instead of running their commands.
|
instead of running their commands.
|
||||||
This is used to pretend that the commands were done, in order to fool
|
This is used to pretend that the commands were done, in order to fool
|
||||||
future invocations of
|
future invocations of
|
||||||
.IR make .
|
.BR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-v
|
.B \-\-trace
|
||||||
|
Print information about the commands invoked by
|
||||||
|
.BR make.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
Print the version of the
|
Print the version of the
|
||||||
.I make
|
.B make
|
||||||
program plus a copyright, a list of authors and a notice that there
|
program plus a copyright, a list of authors and a notice that there
|
||||||
is no warranty.
|
is no warranty.
|
||||||
After this information is printed, processing continues normally.
|
|
||||||
To get this information without doing anything else, use
|
|
||||||
.B make
|
|
||||||
.B \-v
|
|
||||||
.BI \-f /dev/null.
|
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.B \-w
|
\fB\-w\fR, \fB\-\-print\-directory\fR
|
||||||
Print a message containing the working directory
|
Print a message containing the working directory
|
||||||
before and after other processing.
|
before and after other processing.
|
||||||
This may be useful for tracking down errors from complicated nests of
|
This may be useful for tracking down errors from complicated nests of
|
||||||
recursive
|
recursive
|
||||||
.I make
|
.B make
|
||||||
commands.
|
commands.
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
.BI "\-W " file
|
.B \-\-no\-print\-directory
|
||||||
|
Turn off
|
||||||
|
.BR \-w ,
|
||||||
|
even if it was turned on implicitly.
|
||||||
|
.TP 0.5i
|
||||||
|
\fB\-W\fR \fIfile\fR, \fB\-\-what\-if\fR=\fIfile\fR, \fB\-\-new\-file\fR=\fIfile\fR, \fB\-\-assume\-new\fR=\fIfile\fR
|
||||||
Pretend that the target
|
Pretend that the target
|
||||||
.I file
|
.I file
|
||||||
has just been modified.
|
has just been modified.
|
||||||
@@ -284,19 +302,56 @@ Without
|
|||||||
it is almost the same as running a
|
it is almost the same as running a
|
||||||
.I touch
|
.I touch
|
||||||
command on the given file before running
|
command on the given file before running
|
||||||
.IR make ,
|
.BR make ,
|
||||||
except that the modification time is changed only in the imagination of
|
except that the modification time is changed only in the imagination of
|
||||||
.IR make .
|
.BR make .
|
||||||
|
.TP 0.5i
|
||||||
|
.B \-\-warn\-undefined\-variables
|
||||||
|
Warn when an undefined variable is referenced.
|
||||||
|
.SH "EXIT STATUS"
|
||||||
|
GNU
|
||||||
|
.B make
|
||||||
|
exits with a status of zero if all makefiles were successfully parsed
|
||||||
|
and no targets that were built failed. A status of one will be returned
|
||||||
|
if the
|
||||||
|
.B \-q
|
||||||
|
flag was used and
|
||||||
|
.B make
|
||||||
|
determines that a target needs to be rebuilt. A status of two will be
|
||||||
|
returned if any errors were encountered.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.PD 0
|
The full documentation for
|
||||||
.TP 2.0i
|
.B make
|
||||||
/usr/local/doc/gnumake.dvi
|
is maintained as a Texinfo manual. If the
|
||||||
.I
|
.B info
|
||||||
The GNU Make Manual
|
and
|
||||||
.PD
|
.B make
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info make
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
See the chapter `Problems and Bugs' in
|
See the chapter ``Problems and Bugs'' in
|
||||||
.I "The GNU Make Manual" .
|
.IR "The GNU Make Manual" .
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
This manual page contributed by Dennis Morse of Stanford University.
|
This manual page contributed by Dennis Morse of Stanford University.
|
||||||
It has been reworked by Roland McGrath.
|
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||||
|
McGrath. Maintained by Paul Smith.
|
||||||
|
.SH "COPYRIGHT"
|
||||||
|
Copyright \(co 1992-1993, 1996-2012 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/ .
|
||||||
|
|||||||
663
make.h
663
make.h
@@ -1,42 +1,51 @@
|
|||||||
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
||||||
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
Copyright (C) 1988-2012 Free Software Foundation, Inc.
|
||||||
This file is part of GNU Make.
|
This file is part of GNU Make.
|
||||||
|
|
||||||
GNU Make is free software; you can redistribute it and/or modify
|
GNU Make is free software; you can redistribute it and/or modify it under the
|
||||||
it under the terms of the GNU General Public License as published by
|
terms of the GNU General Public License as published by the Free Software
|
||||||
the Free Software Foundation; either version 2, or (at your option)
|
Foundation; either version 3 of the License, or (at your option) any later
|
||||||
any later version.
|
version.
|
||||||
|
|
||||||
GNU Make is distributed in the hope that it will be useful,
|
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along with
|
||||||
along with GNU Make; see the file COPYING. If not, write to
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
/* AIX requires this to be the first thing in the file. */
|
|
||||||
#if defined (_AIX) && !defined (__GNUC__)
|
|
||||||
#pragma alloca
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We use <config.h> instead of "config.h" so that a compilation
|
/* 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
|
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
||||||
(which it would do because make.h was found in $srcdir). */
|
(which it would do because make.h was found in $srcdir). */
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#undef HAVE_CONFIG_H
|
#undef HAVE_CONFIG_H
|
||||||
#define HAVE_CONFIG_H
|
#define HAVE_CONFIG_H 1
|
||||||
|
|
||||||
|
/* Specify we want GNU source code. This must be defined before any
|
||||||
|
system headers are included. */
|
||||||
|
|
||||||
/* Use prototypes if available. */
|
#define _GNU_SOURCE 1
|
||||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
|
||||||
#undef PARAMS
|
/* AIX requires this to be the first thing in the file. */
|
||||||
#define PARAMS(protos) protos
|
#if HAVE_ALLOCA_H
|
||||||
#else /* Not C++ or ANSI C. */
|
# include <alloca.h>
|
||||||
#undef PARAMS
|
#else
|
||||||
#define PARAMS(protos) ()
|
# ifdef _AIX
|
||||||
#endif /* C++ or ANSI C. */
|
#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
|
||||||
|
|
||||||
|
|
||||||
#ifdef CRAY
|
#ifdef CRAY
|
||||||
@@ -45,19 +54,33 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
# define signal bsdsignal
|
# define signal bsdsignal
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
/* 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/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIMEB_H
|
#ifdef HAVE_SYS_TIMEB_H
|
||||||
/* SCO 3.2 "devsys 4.2" has a prototype for `ftime' in <time.h> that bombs
|
/* 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
|
unless <sys/timeb.h> has been included first. */
|
||||||
<sys/timeb.h>? If any does not, configure should check for it. */
|
|
||||||
# include <sys/timeb.h>
|
# include <sys/timeb.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if TIME_WITH_SYS_TIME
|
||||||
|
# include <sys/time.h>
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
|
#else
|
||||||
|
# if HAVE_SYS_TIME_H
|
||||||
|
# include <sys/time.h>
|
||||||
|
# else
|
||||||
|
# include <time.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifndef errno
|
#ifndef errno
|
||||||
@@ -71,9 +94,9 @@ extern int errno;
|
|||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
||||||
POSIX.1 behavior with `cc -YPOSIX', which predefines POSIX itself! */
|
POSIX.1 behavior with 'cc -YPOSIX', which predefines POSIX itself! */
|
||||||
#if defined (_POSIX_VERSION) && !defined (ultrix)
|
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
||||||
#define POSIX
|
# define POSIX 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -83,24 +106,7 @@ extern int errno;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
|
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
|
||||||
#define POSIX
|
# define POSIX 1
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SIGLIST
|
|
||||||
#ifndef SYS_SIGLIST_DECLARED
|
|
||||||
extern char *sys_siglist[];
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#include "signame.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Some systems do not define NSIG in <signal.h>. */
|
|
||||||
#ifndef NSIG
|
|
||||||
#ifdef _NSIG
|
|
||||||
#define NSIG _NSIG
|
|
||||||
#else
|
|
||||||
#define NSIG 32
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef RETSIGTYPE
|
#ifndef RETSIGTYPE
|
||||||
@@ -111,6 +117,10 @@ extern char *sys_siglist[];
|
|||||||
# define sigmask(sig) (1 << ((sig) - 1))
|
# define sigmask(sig) (1 << ((sig) - 1))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_SA_RESTART
|
||||||
|
# define SA_RESTART 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIMITS_H
|
#ifdef HAVE_LIMITS_H
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -121,20 +131,42 @@ extern char *sys_siglist[];
|
|||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
# ifndef POSIX
|
# ifndef POSIX
|
||||||
# define PATH_MAX MAXPATHLEN
|
# define PATH_MAX MAXPATHLEN
|
||||||
#endif /* Not POSIX. */
|
# endif
|
||||||
#endif /* No PATH_MAX. */
|
#endif
|
||||||
#ifndef MAXPATHLEN
|
#ifndef MAXPATHLEN
|
||||||
# define MAXPATHLEN 1024
|
# define MAXPATHLEN 1024
|
||||||
#endif /* No MAXPATHLEN. */
|
#endif
|
||||||
|
|
||||||
#ifdef PATH_MAX
|
#ifdef PATH_MAX
|
||||||
# define GET_PATH_MAX PATH_MAX
|
# define GET_PATH_MAX PATH_MAX
|
||||||
# define PATH_VAR(var) char var[PATH_MAX]
|
# define PATH_VAR(var) char var[PATH_MAX]
|
||||||
#else
|
#else
|
||||||
#define NEED_GET_PATH_MAX
|
# define NEED_GET_PATH_MAX 1
|
||||||
extern unsigned int get_path_max PARAMS ((void));
|
|
||||||
# define GET_PATH_MAX (get_path_max ())
|
# define GET_PATH_MAX (get_path_max ())
|
||||||
#define PATH_VAR(var) char *var = (char *) alloca (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
|
#endif
|
||||||
|
|
||||||
#ifdef STAT_MACROS_BROKEN
|
#ifdef STAT_MACROS_BROKEN
|
||||||
@@ -154,122 +186,115 @@ extern unsigned int get_path_max PARAMS ((void));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
#include <stdio.h>
|
|
||||||
# include <types.h>
|
# include <types.h>
|
||||||
# include <unixlib.h>
|
# include <unixlib.h>
|
||||||
# include <unixio.h>
|
# include <unixio.h>
|
||||||
#include <errno.h>
|
|
||||||
# include <perror.h>
|
# include <perror.h>
|
||||||
|
/* Needed to use alloca on VMS. */
|
||||||
|
# include <builtins.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) || defined(VMS))
|
#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 <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#define ANSI_STRING
|
# define ANSI_STRING 1
|
||||||
#else /* No standard headers. */
|
#else /* No standard headers. */
|
||||||
|
|
||||||
# ifdef HAVE_STRING_H
|
# ifdef HAVE_STRING_H
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#define ANSI_STRING
|
# define ANSI_STRING 1
|
||||||
# else
|
# else
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# endif
|
# endif
|
||||||
# ifdef HAVE_MEMORY_H
|
# ifdef HAVE_MEMORY_H
|
||||||
# include <memory.h>
|
# include <memory.h>
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef HAVE_STDLIB_H
|
||||||
|
# include <stdlib.h>
|
||||||
|
# else
|
||||||
|
void *malloc (int);
|
||||||
|
void *realloc (void *, int);
|
||||||
|
void free (void *);
|
||||||
|
|
||||||
extern char *malloc PARAMS ((int));
|
void abort (void) __attribute__ ((noreturn));
|
||||||
extern char *realloc PARAMS ((char *, int));
|
void exit (int) __attribute__ ((noreturn));
|
||||||
extern void free PARAMS ((char *));
|
# endif /* HAVE_STDLIB_H. */
|
||||||
|
|
||||||
extern void abort PARAMS ((void));
|
|
||||||
extern void exit PARAMS ((int));
|
|
||||||
|
|
||||||
#endif /* Standard headers. */
|
#endif /* Standard headers. */
|
||||||
|
|
||||||
#ifdef ANSI_STRING
|
/* These should be in stdlib.h. Make sure we have them. */
|
||||||
|
#ifndef EXIT_SUCCESS
|
||||||
#ifndef index
|
# define EXIT_SUCCESS 0
|
||||||
#define index(s, c) strchr((s), (c))
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef rindex
|
#ifndef EXIT_FAILURE
|
||||||
#define rindex(s, c) strrchr((s), (c))
|
# define EXIT_FAILURE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef bcmp
|
#ifndef ANSI_STRING
|
||||||
#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
|
|
||||||
#endif
|
|
||||||
#ifndef bzero
|
|
||||||
#define bzero(s, n) memset ((s), 0, (n))
|
|
||||||
#endif
|
|
||||||
#ifndef bcopy
|
|
||||||
#define bcopy(s, d, n) memcpy ((d), (s), (n))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else /* Not ANSI_STRING. */
|
|
||||||
|
|
||||||
#ifndef bcmp
|
|
||||||
extern int bcmp ();
|
|
||||||
#endif
|
|
||||||
#ifndef bzero
|
|
||||||
extern void bzero ();
|
|
||||||
#endif
|
|
||||||
#ifndef bcopy
|
|
||||||
extern void bcopy ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* ANSI_STRING. */
|
|
||||||
#undef ANSI_STRING
|
|
||||||
|
|
||||||
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
||||||
#undef strerror
|
#undef strerror
|
||||||
|
#if !defined(__DECC)
|
||||||
#if !defined(ANSI_STRING) && !defined(__DECC)
|
char *strerror (int errnum);
|
||||||
extern char *strerror PARAMS ((int errnum));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* !ANSI_STRING. */
|
||||||
|
#undef ANSI_STRING
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if HAVE_INTTYPES_H
|
||||||
#undef alloca
|
# include <inttypes.h>
|
||||||
#define alloca(n) __builtin_alloca (n)
|
#endif
|
||||||
#else /* Not GCC. */
|
#if HAVE_STDINT_H
|
||||||
#ifdef HAVE_ALLOCA_H
|
# include <stdint.h>
|
||||||
#include <alloca.h>
|
#endif
|
||||||
#else /* Not HAVE_ALLOCA_H. */
|
#define FILE_TIMESTAMP uintmax_t
|
||||||
#ifndef _AIX
|
|
||||||
extern char *alloca ();
|
|
||||||
#endif /* Not AIX. */
|
|
||||||
#endif /* HAVE_ALLOCA_H. */
|
|
||||||
#endif /* GCC. */
|
|
||||||
|
|
||||||
#ifndef iAPX286
|
#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) \
|
#define streq(a, b) \
|
||||||
((a) == (b) || \
|
((a) == (b) || \
|
||||||
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
||||||
#ifdef _AMIGA
|
|
||||||
#define strieq(a, b) \
|
/* Test if two strings are equal, but match case-insensitively on systems
|
||||||
((a) == (b) || \
|
which have case-insensitive filesystems. Should only be used for
|
||||||
(tolower(*(a)) == tolower(*(b)) && (*(a) == '\0' || !strcmpi ((a) + 1, (b) + 1))))
|
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
|
#else
|
||||||
#define strieq(a, b) \
|
# define patheq(a, b) streq(a, b)
|
||||||
((a) == (b) || \
|
|
||||||
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
|
||||||
#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
|
#endif
|
||||||
|
|
||||||
/* Add to VAR the hashing value of C, one character in a name. */
|
#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
|
||||||
#define HASH(var, c) \
|
|
||||||
((var += (c)), (var = ((var) << 7) + ((var) >> 20)))
|
|
||||||
#ifdef _AMIGA /* Fold filenames on #amiga */
|
|
||||||
#define HASHI(var, c) \
|
|
||||||
((var += tolower((c))), (var = ((var) << 7) + ((var) >> 20)))
|
|
||||||
#else
|
|
||||||
#define HASHI(var, c) HASH(var,c)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
|
#if defined(__GNUC__) || defined(ENUM_BITFIELDS)
|
||||||
# define ENUM_BITFIELD(bits) :bits
|
# define ENUM_BITFIELD(bits) :bits
|
||||||
@@ -277,124 +302,255 @@ extern char *alloca ();
|
|||||||
# define ENUM_BITFIELD(bits)
|
# define ENUM_BITFIELD(bits)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MSDOS__) || defined(WIN32)
|
/* 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 ';'
|
# define PATH_SEPARATOR_CHAR ';'
|
||||||
|
#elif !defined(PATH_SEPARATOR_CHAR)
|
||||||
|
# if defined (VMS)
|
||||||
|
# define PATH_SEPARATOR_CHAR ','
|
||||||
# else
|
# else
|
||||||
# define PATH_SEPARATOR_CHAR ':'
|
# define PATH_SEPARATOR_CHAR ':'
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
/* 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 <fcntl.h>
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
#define pipe(p) _pipe(p, 512, O_BINARY)
|
# define pipe(_p) _pipe((_p), 512, O_BINARY)
|
||||||
#define kill(pid,sig) w32_kill(pid,sig)
|
# define kill(_pid,_sig) w32_kill((_pid),(_sig))
|
||||||
|
|
||||||
extern void sync_Path_environment(void);
|
void sync_Path_environment (void);
|
||||||
extern int kill(int pid, int sig);
|
int w32_kill (pid_t pid, int sig);
|
||||||
extern int safe_stat(char *file, struct stat *sb);
|
char *end_of_token_w32 (const char *s, char stopchar);
|
||||||
extern char *end_of_token_w32();
|
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;
|
||||||
|
#endif /* WINDOWS32 */
|
||||||
|
|
||||||
|
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
|
||||||
|
# define SET_STACK_SIZE
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SET_STACK_SIZE
|
||||||
|
# include <sys/resource.h>
|
||||||
|
extern struct rlimit stack_limit;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct floc
|
||||||
|
{
|
||||||
|
const char *filenm;
|
||||||
|
unsigned long lineno;
|
||||||
|
};
|
||||||
|
#define NILF ((struct floc *)0)
|
||||||
|
|
||||||
|
#define CSTRLEN(_s) (sizeof (_s)-1)
|
||||||
|
#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
|
||||||
|
|
||||||
|
|
||||||
extern void die ();
|
/* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
|
||||||
extern void message ();
|
variadic versions of these functions. */
|
||||||
extern void fatal ();
|
|
||||||
extern void error ();
|
#if HAVE_STDARG_H || HAVE_VARARGS_H
|
||||||
extern void log_working_directory ();
|
# if HAVE_VPRINTF || HAVE_DOPRNT
|
||||||
extern void makefile_error ();
|
# define USE_VARIADIC 1
|
||||||
extern void makefile_fatal ();
|
# endif
|
||||||
extern void pfatal_with_name ();
|
#endif
|
||||||
extern void perror_with_name ();
|
|
||||||
extern char *savestring ();
|
#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
|
||||||
extern char *concat ();
|
const char *concat (unsigned int, ...);
|
||||||
extern char *xmalloc ();
|
void message (int prefix, const char *fmt, ...)
|
||||||
extern char *xrealloc ();
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||||
extern char *find_next_token ();
|
void error (const struct floc *flocp, const char *fmt, ...)
|
||||||
extern char *next_token ();
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||||
extern char *end_of_token ();
|
void fatal (const struct floc *flocp, const char *fmt, ...)
|
||||||
extern void collapse_continuations ();
|
__attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
|
||||||
extern void remove_comments ();
|
#else
|
||||||
extern char *sindex ();
|
const char *concat ();
|
||||||
extern char *lindex ();
|
void message ();
|
||||||
extern int alpha_compare ();
|
void error ();
|
||||||
extern void print_spaces ();
|
void fatal ();
|
||||||
extern struct dep *copy_dep_chain ();
|
#endif
|
||||||
extern char *find_char_unquote ();
|
|
||||||
extern char *find_percent ();
|
void die (int) __attribute__ ((noreturn));
|
||||||
|
void log_working_directory (int);
|
||||||
|
void pfatal_with_name (const char *) __attribute__ ((noreturn));
|
||||||
|
void perror_with_name (const char *, const char *);
|
||||||
|
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 **);
|
||||||
|
FILE *open_tmpfile (char **, const char *);
|
||||||
|
|
||||||
#ifndef NO_ARCHIVES
|
#ifndef NO_ARCHIVES
|
||||||
extern int ar_name ();
|
int ar_name (const char *);
|
||||||
extern void ar_parse_name ();
|
void ar_parse_name (const char *, char **, char **);
|
||||||
extern int ar_touch ();
|
int ar_touch (const char *);
|
||||||
extern time_t ar_member_date ();
|
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
|
#endif
|
||||||
|
|
||||||
extern void dir_load ();
|
int dir_file_exists_p (const char *, const char *);
|
||||||
extern int dir_file_exists_p ();
|
int file_exists_p (const char *);
|
||||||
extern int file_exists_p ();
|
int file_impossible_p (const char *);
|
||||||
extern int file_impossible_p ();
|
void file_impossible (const char *);
|
||||||
extern void file_impossible ();
|
const char *dir_name (const char *);
|
||||||
extern char *dir_name ();
|
void hash_init_directories (void);
|
||||||
|
|
||||||
extern void define_default_variables ();
|
void define_default_variables (void);
|
||||||
extern void set_default_suffixes ();
|
void set_default_suffixes (void);
|
||||||
extern void install_default_suffix_rules ();
|
void install_default_suffix_rules (void);
|
||||||
extern void install_default_implicit_rules ();
|
void install_default_implicit_rules (void);
|
||||||
extern void count_implicit_rule_limits ();
|
|
||||||
extern void convert_to_pattern ();
|
|
||||||
extern void create_pattern_rule ();
|
|
||||||
|
|
||||||
extern void build_vpath_lists ();
|
void build_vpath_lists (void);
|
||||||
extern void construct_vpath_list ();
|
void construct_vpath_list (char *pattern, char *dirpath);
|
||||||
extern int vpath_search ();
|
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);
|
||||||
|
|
||||||
extern void construct_include_path ();
|
void construct_include_path (const char **arg_dirs);
|
||||||
extern void uniquize_deps ();
|
|
||||||
|
|
||||||
extern int update_goal_chain ();
|
void user_access (void);
|
||||||
extern void notice_finished_file ();
|
void make_access (void);
|
||||||
|
void child_access (void);
|
||||||
|
|
||||||
extern void user_access ();
|
void close_stdout (void);
|
||||||
extern void make_access ();
|
|
||||||
extern void child_access ();
|
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 */
|
||||||
|
#ifdef HAVE_GUILE
|
||||||
|
int guile_gmake_setup (const struct floc *flocp);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Loadable object support */
|
||||||
|
typedef int (*load_func_t)(const struct floc *flocp);
|
||||||
|
int load_file (const struct floc *flocp, const char *filename, int noerror);
|
||||||
|
|
||||||
#ifdef HAVE_VFORK_H
|
#ifdef HAVE_VFORK_H
|
||||||
# include <vfork.h>
|
# include <vfork.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
||||||
because such systems often declare the in header files anyway. */
|
because such systems often declare them in header files anyway. */
|
||||||
|
|
||||||
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WIN32)
|
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
|
||||||
|
|
||||||
extern long int atol ();
|
long int atol ();
|
||||||
# ifndef VMS
|
# ifndef VMS
|
||||||
extern long int lseek ();
|
long int lseek ();
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif /* Not GNU C library or POSIX. */
|
#endif /* Not GNU C library or POSIX. */
|
||||||
|
|
||||||
#ifdef HAVE_GETCWD
|
#ifdef HAVE_GETCWD
|
||||||
extern char *getcwd ();
|
# if !defined(VMS) && !defined(__DECC)
|
||||||
#ifdef VMS
|
char *getcwd ();
|
||||||
extern char *getwd PARAMS ((char *));
|
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
extern char *getwd ();
|
char *getwd ();
|
||||||
# define getcwd(buf, len) getwd (buf)
|
# define getcwd(buf, len) getwd (buf)
|
||||||
#endif
|
#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
|
||||||
|
|
||||||
|
extern const struct floc *reading_file;
|
||||||
|
extern const struct floc **expanding_var;
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
extern char *reading_filename;
|
|
||||||
extern unsigned int *reading_lineno_ptr;
|
|
||||||
|
|
||||||
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
||||||
extern int debug_flag, print_data_base_flag, question_flag, touch_flag;
|
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
||||||
extern int env_overrides, no_builtin_rules_flag, print_version_flag;
|
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||||
extern int print_directory_flag, warn_undefined_variables_flag;
|
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
||||||
extern int posix_pedantic;
|
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;
|
||||||
|
|
||||||
|
/* 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 unsigned int job_slots;
|
||||||
|
extern int job_fds[2];
|
||||||
|
extern int job_rfd;
|
||||||
#ifndef NO_FLOAT
|
#ifndef NO_FLOAT
|
||||||
extern double max_load_average;
|
extern double max_load_average;
|
||||||
#else
|
#else
|
||||||
@@ -404,36 +560,83 @@ extern int max_load_average;
|
|||||||
extern char *program;
|
extern char *program;
|
||||||
extern char *starting_directory;
|
extern char *starting_directory;
|
||||||
extern unsigned int makelevel;
|
extern unsigned int makelevel;
|
||||||
extern char *version_string, *remote_description;
|
extern char *version_string, *remote_description, *make_host;
|
||||||
|
|
||||||
extern unsigned int commands_started;
|
extern unsigned int commands_started;
|
||||||
|
|
||||||
extern int handling_fatal_signal;
|
extern int handling_fatal_signal;
|
||||||
|
|
||||||
|
|
||||||
#define DEBUGPR(msg) \
|
#ifndef MIN
|
||||||
do if (debug_flag) { print_spaces (depth); printf (msg, file->name); \
|
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
|
||||||
fflush (stdout); } while (0)
|
#endif
|
||||||
|
#ifndef MAX
|
||||||
|
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
# ifndef EXIT_FAILURE
|
# define MAKE_SUCCESS 1
|
||||||
# define EXIT_FAILURE 3
|
# define MAKE_TROUBLE 2
|
||||||
# endif
|
# define MAKE_FAILURE 3
|
||||||
# ifndef EXIT_SUCCESS
|
|
||||||
# define EXIT_SUCCESS 1
|
|
||||||
# endif
|
|
||||||
# ifndef EXIT_TROUBLE
|
|
||||||
# define EXIT_TROUBLE 2
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
# ifndef EXIT_FAILURE
|
# define MAKE_SUCCESS 0
|
||||||
# define EXIT_FAILURE 2
|
# define MAKE_TROUBLE 1
|
||||||
|
# define MAKE_FAILURE 2
|
||||||
#endif
|
#endif
|
||||||
# ifndef EXIT_SUCCESS
|
|
||||||
# define EXIT_SUCCESS 0
|
/* Set up heap debugging library dmalloc. */
|
||||||
|
|
||||||
|
#ifdef HAVE_DMALLOC_H
|
||||||
|
#include <dmalloc.h>
|
||||||
#endif
|
#endif
|
||||||
# ifndef EXIT_TROUBLE
|
|
||||||
# define EXIT_TROUBLE 1
|
#ifndef initialize_main
|
||||||
|
# ifdef __EMX__
|
||||||
|
# define initialize_main(pargc, pargv) \
|
||||||
|
{ _wildcard(pargc, pargv); _response(pargc, pargv); }
|
||||||
|
# else
|
||||||
|
# define initialize_main(pargc, pargv)
|
||||||
# endif
|
# endif
|
||||||
#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)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user