mirror of
https://github.com/mirror/make.git
synced 2026-08-20 00:43:29 +08:00
Compare commits
2943 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4b3bf7f97 | ||
|
|
d18a87d0a4 | ||
|
|
41c35f2ffe | ||
|
|
deb4a42c3e | ||
|
|
252c26bd20 | ||
|
|
6f8da5f4b8 | ||
|
|
c46b5a9e0e | ||
|
|
b4157d2ff4 | ||
|
|
f364e0d8d6 | ||
|
|
bb0c05a7f0 | ||
|
|
f987d181c4 | ||
|
|
cad3ddd165 | ||
|
|
54214176b1 | ||
|
|
c2f92c980f | ||
|
|
5b1ca277ca | ||
|
|
7c71df5695 | ||
|
|
a0956c1803 | ||
|
|
4ec74e568d | ||
|
|
d9fc1ac5d2 | ||
|
|
9f55e9fd13 | ||
|
|
7bb7bb4ba4 | ||
|
|
b79791533b | ||
|
|
9d24d41801 | ||
|
|
2d943d3d2e | ||
|
|
b16913a67e | ||
|
|
72ee43c473 | ||
|
|
e5e538fb7a | ||
|
|
c453f898a0 | ||
|
|
18c4b508ef | ||
|
|
383eb3a923 | ||
|
|
01b1d4f401 | ||
|
|
bf2d71498c | ||
|
|
3e20e376b7 | ||
|
|
7ddfc42ee3 | ||
|
|
ca92d83cde | ||
|
|
ae80eefe65 | ||
|
|
01142a53c9 | ||
|
|
dee6af912a | ||
|
|
7296991d6c | ||
|
|
d51ac70122 | ||
|
|
3cb84fe933 | ||
|
|
ad84ec2fdc | ||
|
|
26b9f30714 | ||
|
|
5ac80176a3 | ||
|
|
c801a7fb67 | ||
|
|
c2eddf9be2 | ||
|
|
f8852311cc | ||
|
|
a99378ebe4 | ||
|
|
6c87f3fb85 | ||
|
|
38116baee9 | ||
|
|
614033f8c6 | ||
|
|
f3640ecf4f | ||
|
|
c4e232e44f | ||
|
|
aa99e810a9 | ||
|
|
8f49029561 | ||
|
|
f7ed583675 | ||
|
|
cf7f7de7ae | ||
|
|
d4cb7ae6d4 | ||
|
|
387d349dc8 | ||
|
|
caad0e2181 | ||
|
|
990d6f9b9a | ||
|
|
134480787e | ||
|
|
a9a4919909 | ||
|
|
d12ff78cb2 | ||
|
|
fabb03eac4 | ||
|
|
618c53a225 | ||
|
|
88d126d6c4 | ||
|
|
f6ea899d83 | ||
|
|
ee861a4e9f | ||
|
|
ca4234c4b5 | ||
|
|
257b82ac1f | ||
|
|
aac4004444 | ||
|
|
86fc644dcc | ||
|
|
02b3a6ad46 | ||
|
|
77734be2af | ||
|
|
820210ab85 | ||
|
|
77706874a7 | ||
|
|
a9548aeb8f | ||
|
|
70ba0357a0 | ||
|
|
7d48401707 | ||
|
|
1fc13bf576 | ||
|
|
896908180e | ||
|
|
80e9a422e4 | ||
|
|
15a7e3830f | ||
|
|
26e359c71d | ||
|
|
4da2055a10 | ||
|
|
a2ba5ccbda | ||
|
|
5eff618c8c | ||
|
|
10e130b207 | ||
|
|
62da1c45e5 | ||
|
|
ab31f0b594 | ||
|
|
8f1b6bca46 | ||
|
|
6faa02247e | ||
|
|
c72e1ec446 | ||
|
|
91d87ccf32 | ||
|
|
7ad2593b2d | ||
|
|
09cce75c30 | ||
|
|
07eea3aa49 | ||
|
|
16e14b4114 | ||
|
|
77881d2281 | ||
|
|
2fe96e4a41 | ||
|
|
dd24a4c1cf | ||
|
|
f36c6c7347 | ||
|
|
87d24154af | ||
|
|
614557d04c | ||
|
|
047544785b | ||
|
|
73b08af181 | ||
|
|
5c1d9e54c7 | ||
|
|
2d7b5d6d80 | ||
|
|
5dc7358547 | ||
|
|
e33af0fb4a | ||
|
|
6f7e06ec4e | ||
|
|
3f3eecc115 | ||
|
|
b09e9af0b8 | ||
|
|
9992cb0b83 | ||
|
|
0cbee1b475 | ||
|
|
d63925d863 | ||
|
|
0793658c09 | ||
|
|
98da874c43 | ||
|
|
88d6c22a48 | ||
|
|
c3b39d0654 | ||
|
|
fe55d6e1e3 | ||
|
|
768f287a06 | ||
|
|
8dd302cda6 | ||
|
|
df75efb114 | ||
|
|
3ec497f8f8 | ||
|
|
84ed34ba5a | ||
|
|
08c964b4ac | ||
|
|
97e51c0285 | ||
|
|
59abb46bc9 | ||
|
|
6d6f12b0c3 | ||
|
|
621d3196fa | ||
|
|
e4b7ac21dc | ||
|
|
d444b87173 | ||
|
|
1c179f9636 | ||
|
|
5690084634 | ||
|
|
9fa63eb918 | ||
|
|
668eda0527 | ||
|
|
4e1be4a60c | ||
|
|
5b1e871d2d | ||
|
|
2da3bb46f2 | ||
|
|
b264d3d4f8 | ||
|
|
51c1c07e7a | ||
|
|
700af780af | ||
|
|
f14824878d | ||
|
|
8c2aa889bb | ||
|
|
bb21dd4d2d | ||
|
|
93fd0c0c9a | ||
|
|
cf56036c60 | ||
|
|
88ceff8b2f | ||
|
|
9755d4c09c | ||
|
|
634ef057ad | ||
|
|
949c0464a9 | ||
|
|
416664b1e7 | ||
|
|
667d70eac2 | ||
|
|
b9078e5bd3 | ||
|
|
0de7b74896 | ||
|
|
236589642e | ||
|
|
cb9ac2b0cc | ||
|
|
40a6751abf | ||
|
|
1bc35a7ae7 | ||
|
|
8cdaabbf8e | ||
|
|
2be8661433 | ||
|
|
8b3e678ace | ||
|
|
ec09ec775a | ||
|
|
bdaeca49e9 | ||
|
|
342a9bb54b | ||
|
|
6761122be0 | ||
|
|
1fd0bfaf1e | ||
|
|
8eb171e469 | ||
|
|
7154e316b7 | ||
|
|
f3e345c869 | ||
|
|
d34f46c1f3 | ||
|
|
f0ab709640 | ||
|
|
5f2d114c6d | ||
|
|
cbe0d2e47f | ||
|
|
f485881d4a | ||
|
|
15db387f18 | ||
|
|
aab51f7ef2 | ||
|
|
2b25eac587 | ||
|
|
e72c5e021f | ||
|
|
b6a779d262 | ||
|
|
26f4bb89bd | ||
|
|
320714ae85 | ||
|
|
6682fbc2cb | ||
|
|
f2b130bda8 | ||
|
|
8aba33a8bd | ||
|
|
d365bdfdbc | ||
|
|
f440c3ebe2 | ||
|
|
3efba8a145 | ||
|
|
e7b2f6818c | ||
|
|
c90db9276a | ||
|
|
7192d0ec4a | ||
|
|
9230bfb9ae | ||
|
|
55b993ae09 | ||
|
|
1d20aa7247 | ||
|
|
21f7ac8f47 | ||
|
|
aa376ad638 | ||
|
|
35b51df110 | ||
|
|
e62f4cf9a2 | ||
|
|
116767901f | ||
|
|
71eb0a8038 | ||
|
|
d9291d09b8 | ||
|
|
f3ad572099 | ||
|
|
cefe747e85 | ||
|
|
3ecf97d3af | ||
|
|
21d3865973 | ||
|
|
29d92d4091 | ||
|
|
f8f9d371ff | ||
|
|
f5af979357 | ||
|
|
76cb186732 | ||
|
|
6c06c547dc | ||
|
|
c5d4b7b2f2 | ||
|
|
9e4b3d3f4c | ||
|
|
5a96d5a066 | ||
|
|
4488592dda | ||
|
|
e7eb8b5962 | ||
|
|
0c2fc00544 | ||
|
|
214df0e92a | ||
|
|
b2e898d0bf | ||
|
|
abb1e8d10b | ||
|
|
cc6dc70b16 | ||
|
|
2638552859 | ||
|
|
de48d6a4f7 | ||
|
|
55f06bdc3f | ||
|
|
0d367bbe6e | ||
|
|
f4b8ddf260 | ||
|
|
e13fd5c83d | ||
|
|
7c4e6b0299 | ||
|
|
b9c4fc441b | ||
|
|
65b73ce434 | ||
|
|
2d73c9bf25 | ||
|
|
33468b3f31 | ||
|
|
1cffd0a203 | ||
|
|
b580949ae0 | ||
|
|
f2771aa614 | ||
|
|
5e829188d3 | ||
|
|
297cb5adb7 | ||
|
|
012918bf11 | ||
|
|
1ae90c030d | ||
|
|
0fb6f2d985 | ||
|
|
97a8d9b45a | ||
|
|
c5c02accb7 | ||
|
|
76a099997b | ||
|
|
c5319e75f5 | ||
|
|
510e5ce801 | ||
|
|
144f436c4b | ||
|
|
52056d7b2c | ||
|
|
c66ec5fa20 | ||
|
|
da6fc6aae2 | ||
|
|
d9aff6b817 | ||
|
|
e5f6dc54b9 | ||
|
|
88732a29f2 | ||
|
|
7b0a741857 | ||
|
|
74bd8b3aa5 | ||
|
|
9043b28250 | ||
|
|
fcc11d05a6 | ||
|
|
a8f4669b23 | ||
|
|
bd4829096c | ||
|
|
7044e0c93c | ||
|
|
94d9077691 | ||
|
|
c4cc2e9595 | ||
|
|
5e234e4048 | ||
|
|
950f3d305f | ||
|
|
58a37927e6 | ||
|
|
ec272f3a9c | ||
|
|
ef6aca5a38 | ||
|
|
b262ea5d8f | ||
|
|
cc20f90507 | ||
|
|
9e2fa24649 | ||
|
|
2dc0280d82 | ||
|
|
90959b8b70 | ||
|
|
19ae6fe72a | ||
|
|
0e020bbc24 | ||
|
|
c01222c018 | ||
|
|
957aa450a0 | ||
|
|
e49e11e069 | ||
|
|
f4f353bb54 | ||
|
|
a80b0096f5 | ||
|
|
62e8f029e9 | ||
|
|
db7658e042 | ||
|
|
fa7f95c66c | ||
|
|
df5f30a76a | ||
|
|
1770540217 | ||
|
|
c8a6263eb5 | ||
|
|
a015d1f822 | ||
|
|
c604e53a45 | ||
|
|
d79fe162c0 | ||
|
|
0c326a66c9 | ||
|
|
f79bde1a6d | ||
|
|
289108cc9b | ||
|
|
61c413d5ea | ||
|
|
d3a53d5d16 | ||
|
|
1306023a4f | ||
|
|
80b90b7866 | ||
|
|
8e024a2532 | ||
|
|
660a2eafe5 | ||
|
|
8277806db6 | ||
|
|
6ba5ea022a | ||
|
|
4533348826 | ||
|
|
68fbad6667 | ||
|
|
f430a65ccb | ||
|
|
c30da63fd2 | ||
|
|
3fb7312e9f | ||
|
|
dd6adfa454 | ||
|
|
3b5e47b2e2 | ||
|
|
4e277f6fbd | ||
|
|
ec946d7e21 | ||
|
|
16d06006a4 | ||
|
|
b774aebffa | ||
|
|
06de697268 | ||
|
|
fdfe0446b6 | ||
|
|
12b14f0484 | ||
|
|
4e12a5fa45 | ||
|
|
e56243fe57 | ||
|
|
7449abfe1b | ||
|
|
53b9770b40 | ||
|
|
766baeef0a | ||
|
|
ee204c78f2 | ||
|
|
e64674b718 | ||
|
|
564fb212a7 | ||
|
|
30cc10093b | ||
|
|
69c5a2128b | ||
|
|
577dd1ff6d | ||
|
|
86f2f8bcb5 | ||
|
|
c72205b28b | ||
|
|
057e33d6b5 | ||
|
|
e4499a1fb5 | ||
|
|
57b043c7fb | ||
|
|
f389aabde6 | ||
|
|
acbef3f612 | ||
|
|
3822f77c1d | ||
|
|
1cf3932a39 | ||
|
|
33bda40086 | ||
|
|
e666a6a021 | ||
|
|
5920d6d2b3 | ||
|
|
2e6468c811 | ||
|
|
393d2a2d4a | ||
|
|
bd7d03f8cd | ||
|
|
a4a173928f | ||
|
|
0e113897f7 | ||
|
|
b0eab8ecb9 | ||
|
|
f84821b249 | ||
|
|
99d1423059 | ||
|
|
7fbd58cd6b | ||
|
|
3ede0b96ac | ||
|
|
1d289b424a | ||
|
|
96285f875b | ||
|
|
bd4ce86785 | ||
|
|
e1c072aa7e | ||
|
|
af0074547d | ||
|
|
4a7a8278e8 | ||
|
|
00fa3ca3a5 | ||
|
|
00e590fdef | ||
|
|
4c64a5f986 | ||
|
|
414af96a50 | ||
|
|
1b976397e5 | ||
|
|
9bc5491712 | ||
|
|
57b13c8020 | ||
|
|
02a4c2913a | ||
|
|
8acb89c8c4 | ||
|
|
271e572ba2 | ||
|
|
bde990bfea | ||
|
|
60e54608bd | ||
|
|
60905a8afb | ||
|
|
ebe1d37104 | ||
|
|
c0cb9c8b3d | ||
|
|
34ee9adaed | ||
|
|
64f5375fe0 | ||
|
|
da81e0815f | ||
|
|
9be3c0e2b2 | ||
|
|
9da708772c | ||
|
|
0967624050 | ||
|
|
ba950a796a | ||
|
|
005a251689 | ||
|
|
76b6e668a6 | ||
|
|
5ff6ae6177 | ||
|
|
7c202b50fa | ||
|
|
f0182df865 | ||
|
|
0a6c38eff8 | ||
|
|
4b45e2828d | ||
|
|
4f3a41c60a | ||
|
|
757a9d06e3 | ||
|
|
31394f7f53 | ||
|
|
b6884c73b7 | ||
|
|
8bffc8d53c | ||
|
|
a9609084f4 | ||
|
|
8d820d57f6 | ||
|
|
73e11a5024 | ||
|
|
85cdc9e9ae | ||
|
|
7e60ffe83e | ||
|
|
715c787dc6 | ||
|
|
e304a03b6d | ||
|
|
2273ab7069 | ||
|
|
2e388a18a1 | ||
|
|
39bf50b2da | ||
|
|
a0c17b5af1 | ||
|
|
a483334f97 | ||
|
|
069f2bca99 | ||
|
|
40847ce9b8 | ||
|
|
a01c5bee02 | ||
|
|
38e96eadea | ||
|
|
d7cfbf1961 | ||
|
|
ee167c650e | ||
|
|
4d00ceba26 | ||
|
|
1c045bca52 | ||
|
|
4ed31830cb | ||
|
|
d7ff21ecd7 | ||
|
|
da2b275658 | ||
|
|
f32ca1666f | ||
|
|
9ce370249b | ||
|
|
b5de783f77 | ||
|
|
389dcb608f | ||
|
|
8c888d95f6 | ||
|
|
1710573272 | ||
|
|
80ca781adf | ||
|
|
4a31ca461f | ||
|
|
214865ed5c | ||
|
|
5d6508a475 | ||
|
|
ac11ec5497 | ||
|
|
d603b2e6ac | ||
|
|
8fd614e238 | ||
|
|
92032bc16a | ||
|
|
67e6d81256 | ||
|
|
a1bb739165 | ||
|
|
05769ca009 | ||
|
|
e2234bc1ab | ||
|
|
f9ba22e029 | ||
|
|
eedea52afb | ||
|
|
a9975756d0 | ||
|
|
a37fa47e32 | ||
|
|
9ff4d6af92 | ||
|
|
a370268739 | ||
|
|
1129df27b8 | ||
|
|
749a54d7a4 | ||
|
|
fa937343f5 | ||
|
|
3112c87993 | ||
|
|
8bde7db16f | ||
|
|
5d985c2851 | ||
|
|
3f194b69e3 | ||
|
|
b7acb10e86 | ||
|
|
b36a8ec92a | ||
|
|
23554ee658 | ||
|
|
0ce880e5ee | ||
|
|
c808f10d08 | ||
|
|
1dfd55ca36 | ||
|
|
0bc699a761 | ||
|
|
63b42fa235 | ||
|
|
a7b0dfddac | ||
|
|
73ac4526b9 | ||
|
|
afbecbd9dc | ||
|
|
192469952f | ||
|
|
8a731d1b2c | ||
|
|
48c8a116a9 | ||
|
|
fb779d2f1e | ||
|
|
1af314465e | ||
|
|
b80837c553 | ||
|
|
aa44e66c8f | ||
|
|
a7e0dd98e4 | ||
|
|
0c44ca2683 | ||
|
|
b280989ab7 | ||
|
|
9860296198 | ||
|
|
4fd56724ad | ||
|
|
0ca31088dc | ||
|
|
ef7a1b7d6e | ||
|
|
0c5a9f9b92 | ||
|
|
6264deece3 | ||
|
|
b9c25de370 | ||
|
|
193f1e81ed | ||
|
|
d8728efc80 | ||
|
|
baa57d2cf9 | ||
|
|
7ef56bc8dc | ||
|
|
ac97214635 | ||
|
|
22fd578693 | ||
|
|
78b5fec689 | ||
|
|
75b5268faf | ||
|
|
66a9b5c3ba | ||
|
|
b552b05251 | ||
|
|
5345adf82f | ||
|
|
248f70510e | ||
|
|
b90fabc8d6 | ||
|
|
816a867ff5 | ||
|
|
8ff529b1cb | ||
|
|
5acc59c704 | ||
|
|
68be4f74fc | ||
|
|
2b8e3bb23f | ||
|
|
c4f30e6012 | ||
|
|
fbf71ec25a | ||
|
|
e20c48e385 | ||
|
|
fda00f88d3 | ||
|
|
d9d4e06084 | ||
|
|
a95cb30ab5 | ||
|
|
d351c1fef2 | ||
|
|
3daaa4dd3e | ||
|
|
a359e32eb5 | ||
|
|
bee153c762 | ||
|
|
c5ccc4930c | ||
|
|
45bf0e3a67 | ||
|
|
c6966b3238 | ||
|
|
0029ea8941 | ||
|
|
053d49367c | ||
|
|
80861cce43 | ||
|
|
72af7ce8af | ||
|
|
e4a9c9b825 | ||
|
|
3d7c17c5a9 | ||
|
|
9c487cc537 | ||
|
|
1c9790e6f5 | ||
|
|
b13dcfe501 | ||
|
|
212cb00923 | ||
|
|
ac90d80b2a | ||
|
|
a3f6e49705 | ||
|
|
db72ca1b7d | ||
|
|
8d0aff7e81 | ||
|
|
bc9d72beb0 | ||
|
|
d3bba301ce | ||
|
|
15066b73f4 | ||
|
|
7ed37f0166 | ||
|
|
912a0df127 | ||
|
|
0b41373312 | ||
|
|
6f339b22eb | ||
|
|
e26560508c | ||
|
|
9ab8af7cd8 | ||
|
|
f522852f07 | ||
|
|
a3d8c086d5 | ||
|
|
4762480ae9 | ||
|
|
ef6c059e1e | ||
|
|
cf4ed2ebe8 | ||
|
|
5a4f9a67a3 | ||
|
|
2987163ac4 | ||
|
|
ec61980122 | ||
|
|
9bb994e831 | ||
|
|
e2ebea35f1 | ||
|
|
c73ed7dd1c | ||
|
|
ba8383efd8 | ||
|
|
6f7fb050b4 | ||
|
|
45200a42d3 | ||
|
|
4c9e10fd94 | ||
|
|
6e640321fd | ||
|
|
7241d136f4 | ||
|
|
c2be1df880 | ||
|
|
f1a9625001 | ||
|
|
047bd5a16f | ||
|
|
3fc99a48e1 | ||
|
|
87a5f98d24 | ||
|
|
53554e41e8 | ||
|
|
5bd7ad2b22 | ||
|
|
65115e7095 | ||
|
|
75dd0bd8bc | ||
|
|
8b54c5cff9 | ||
|
|
65c447289e | ||
|
|
86b20728fe | ||
|
|
b8a8af6550 | ||
|
|
360b76af84 | ||
|
|
c9e6ab9ac7 | ||
|
|
40277b8850 | ||
|
|
35047f824a | ||
|
|
e97159745d | ||
|
|
2b9dd215d5 | ||
|
|
fc2ddebdae | ||
|
|
b4682cb479 | ||
|
|
09202bc880 | ||
|
|
9ae02b7916 | ||
|
|
247b71e690 | ||
|
|
e33f3d72bf | ||
|
|
fd1dd7c398 | ||
|
|
14b2d7effb | ||
|
|
85c788572d | ||
|
|
8164c8ab3d | ||
|
|
fb7a7adc8a | ||
|
|
4f8be4bb28 | ||
|
|
e2b39edc22 | ||
|
|
8530d77c68 | ||
|
|
89e18c12eb | ||
|
|
bccd01354b | ||
|
|
5f9d341160 | ||
|
|
798ebd241b | ||
|
|
4db6d0c694 | ||
|
|
b754a35df7 | ||
|
|
168f12375d | ||
|
|
83443c706a | ||
|
|
4a5377aef7 | ||
|
|
48391c2817 | ||
|
|
42745a900f | ||
|
|
43181f1f82 | ||
|
|
c18b23f7b2 | ||
|
|
fe5585528f | ||
|
|
0205d3d08c | ||
|
|
9ef06be018 | ||
|
|
ac9a39dad7 | ||
|
|
c6ac580785 | ||
|
|
9efd477e98 | ||
|
|
5036dd120a | ||
|
|
7e849f3b81 | ||
|
|
a80a8b8a10 | ||
|
|
e4ac28e830 | ||
|
|
1fae20a2b7 | ||
|
|
292da6f686 | ||
|
|
3c487e7ed5 | ||
|
|
c0380823a2 | ||
|
|
1faae1d4ed | ||
|
|
18eb093f56 | ||
|
|
894ee7f6c8 | ||
|
|
e75662bc6a | ||
|
|
d1df4b21f3 | ||
|
|
a66bf2d736 | ||
|
|
31c2024b2e | ||
|
|
7df0fe77d8 | ||
|
|
9fc787c658 | ||
|
|
1afb0ad372 | ||
|
|
86a058029b | ||
|
|
0a3a0756b9 | ||
|
|
3712e8a819 | ||
|
|
9ed452b041 | ||
|
|
b11bef0bea | ||
|
|
bd716a1ec1 | ||
|
|
b484efca56 | ||
|
|
562344122f | ||
|
|
9a2451af0b | ||
|
|
7f9ce6e97b | ||
|
|
621e9edfe9 | ||
|
|
986632ec23 | ||
|
|
95ffcda425 | ||
|
|
dcca1b5b0e | ||
|
|
9cad73ad82 | ||
|
|
8e7a28a6a4 | ||
|
|
98de32a681 | ||
|
|
5369be5079 | ||
|
|
8de07f3e4a | ||
|
|
f970315766 | ||
|
|
579ee85941 | ||
|
|
7e51810bb5 | ||
|
|
bd30df4478 | ||
|
|
1f2fd22fec | ||
|
|
ab1210b1fe | ||
|
|
241787d8e4 | ||
|
|
faeeb27166 | ||
|
|
cab353d1dd | ||
|
|
8b01e6bebf | ||
|
|
55c00544cc | ||
|
|
8d577c2ff4 | ||
|
|
e44d6a12bb | ||
|
|
423c3955d9 | ||
|
|
ac67346d0f | ||
|
|
e364498113 | ||
|
|
85047eb904 | ||
|
|
0faa98a0bb | ||
|
|
8411528fdd | ||
|
|
d2a3e9ca9c | ||
|
|
e1863c05d8 | ||
|
|
b981bfd197 | ||
|
|
88713683fe | ||
|
|
a7cac0f0e3 | ||
|
|
165ccf3137 | ||
|
|
24620378ba | ||
|
|
9c8b68a905 | ||
|
|
432cb6575d | ||
|
|
a4937bc897 | ||
|
|
889303cdfe | ||
|
|
99385ee6f7 | ||
|
|
f5f5adb62c | ||
|
|
865d90bb1e | ||
|
|
30b25acc4e | ||
|
|
f8905059c3 | ||
|
|
12a3104c3d | ||
|
|
7b485daffb | ||
|
|
757849cd93 | ||
|
|
9d58570c77 | ||
|
|
d49ab08ae0 | ||
|
|
10a4b120bd | ||
|
|
309768aff1 | ||
|
|
9c28d5125d | ||
|
|
a7794f483b | ||
|
|
5d653b535a | ||
|
|
53b4a9e668 | ||
|
|
d4723d643d | ||
|
|
107ab16bf6 | ||
|
|
07f2666b91 | ||
|
|
f4b746b8c2 | ||
|
|
d7f25cfda5 | ||
|
|
b9a01a8b3b | ||
|
|
d654bff457 | ||
|
|
74ed682c54 | ||
|
|
e498e464dc | ||
|
|
d1d737d0fa | ||
|
|
87e5b64f41 | ||
|
|
70df3c35bf | ||
|
|
01a745025d | ||
|
|
4792e154b6 | ||
|
|
188b2a0f23 | ||
|
|
52191d9d61 | ||
|
|
dc9ae5e017 | ||
|
|
723e047428 | ||
|
|
b69b04dc8c | ||
|
|
b539908f73 | ||
|
|
2fb91e19a0 | ||
|
|
f96c114e22 | ||
|
|
98197303b1 | ||
|
|
f8786092ad | ||
|
|
1d4c15b4e1 | ||
|
|
b1c7f0df4e | ||
|
|
8e12202870 | ||
|
|
1f4ca0539b | ||
|
|
d0944ee2e8 | ||
|
|
38066b6f19 | ||
|
|
3bf3fde984 | ||
|
|
543521cd47 | ||
|
|
e8122ecb5d | ||
|
|
55a0c0e414 | ||
|
|
8a3436c65d | ||
|
|
fd30db1290 | ||
|
|
c3524b83b9 | ||
|
|
0296e40fc7 | ||
|
|
f69922b335 | ||
|
|
65931ce7a9 | ||
|
|
1a991ada47 | ||
|
|
7e77685bc3 | ||
|
|
300d1296fb | ||
|
|
822f8dae41 | ||
|
|
d2d44f76c4 | ||
|
|
6c3e88e60f | ||
|
|
9cd01958da | ||
|
|
4120f91846 | ||
|
|
30a5ee0d85 | ||
|
|
8a6205b43f | ||
|
|
bc120f27bd | ||
|
|
5c0fba7240 | ||
|
|
fa0f2c516a | ||
|
|
20ecc58126 | ||
|
|
1b90248893 | ||
|
|
a4d8444b59 | ||
|
|
0a81d50d66 | ||
|
|
3aa2aa7e82 | ||
|
|
29a94ceb76 | ||
|
|
ab78cbc71c | ||
|
|
c5bfa40044 | ||
|
|
deff9dacc9 | ||
|
|
40a49f244d | ||
|
|
87ac68fe79 | ||
|
|
72462ef1e1 | ||
|
|
f80222c15b | ||
|
|
4b81f5ca92 | ||
|
|
5601726151 | ||
|
|
9453a7451d | ||
|
|
5e7bf7c554 | ||
|
|
138d020e1b | ||
|
|
5b65c5b916 | ||
|
|
cc85b927cd | ||
|
|
bee4d93a59 | ||
|
|
353fcfdb30 | ||
|
|
d4043519f7 | ||
|
|
ef11217de7 | ||
|
|
e8f5d322cf | ||
|
|
dc922e3f4c | ||
|
|
c11024b3b3 | ||
|
|
2fc0f614be | ||
|
|
bf60bbd67a | ||
|
|
d2eaed1f0a | ||
|
|
8ab3564a71 | ||
|
|
ecf307bb0b | ||
|
|
a674abe702 | ||
|
|
80183457ad | ||
|
|
cece7ad61f | ||
|
|
943c06de47 | ||
|
|
171eb41908 | ||
|
|
9babfe49a5 | ||
|
|
b16852a77f | ||
|
|
96cf67bd29 | ||
|
|
5370238316 | ||
|
|
398058a873 | ||
|
|
b730fbc6b8 | ||
|
|
c21c1455fd | ||
|
|
58dae24352 | ||
|
|
c7732bd5ad | ||
|
|
2627d83221 | ||
|
|
381baeef7a | ||
|
|
5367d393dd | ||
|
|
f0529daced | ||
|
|
a668c520b2 | ||
|
|
c8bf04e141 | ||
|
|
0a56034aac | ||
|
|
94735f0ad7 | ||
|
|
7c77486d1f | ||
|
|
13f13b96b3 | ||
|
|
c3cd78066c | ||
|
|
15f7957939 | ||
|
|
1d992d8fe7 | ||
|
|
3484c9675a | ||
|
|
a0c5d0c63f | ||
|
|
64dd61bcb8 | ||
|
|
75336026ae | ||
|
|
b8467292c9 | ||
|
|
e44c51ce41 | ||
|
|
cb2be0db36 | ||
|
|
01bad6f73a | ||
|
|
82793f85f5 | ||
|
|
a66469e003 | ||
|
|
b5ea49bae7 | ||
|
|
2926f7b466 | ||
|
|
a87ff20158 | ||
|
|
9acb657eb1 | ||
|
|
19a69bafc0 | ||
|
|
9a7fe22b19 | ||
|
|
9253a34a57 | ||
|
|
f88eb23b02 | ||
|
|
441b643355 | ||
|
|
8b034b7d18 | ||
|
|
5667376edc | ||
|
|
93843ccd08 | ||
|
|
7f01830927 | ||
|
|
30843dea3a | ||
|
|
14d7654551 | ||
|
|
054d6d91e7 | ||
|
|
e56aad4061 | ||
|
|
049f8e88fc | ||
|
|
da7df54309 | ||
|
|
f3a4b4ce6f | ||
|
|
0daa9d37c4 | ||
|
|
50e2cb1b1a | ||
|
|
330d97a9ba | ||
|
|
b5d017c624 | ||
|
|
79e9347892 | ||
|
|
2bd957a89d | ||
|
|
7f7e6f80c5 | ||
|
|
af87d56157 | ||
|
|
4bf3c33f83 | ||
|
|
cb64352c75 | ||
|
|
6a52395ed1 | ||
|
|
29cd1e9699 | ||
|
|
450b7e1a3d | ||
|
|
5058a94ee7 | ||
|
|
4baf9ab456 | ||
|
|
ac1c6b404a | ||
|
|
51fb930ef2 | ||
|
|
a45f25ece3 | ||
|
|
b70aa3709e | ||
|
|
8e0a5645b8 | ||
|
|
7899c6f383 | ||
|
|
6ca41d9b17 | ||
|
|
686a74bfb2 | ||
|
|
ca17e5538f | ||
|
|
5c69b3fe53 | ||
|
|
1d298acf9d | ||
|
|
5a5a1aff6a | ||
|
|
002702c89c | ||
|
|
a3bd466e25 | ||
|
|
97fe6e7dd1 | ||
|
|
85f9f6985d | ||
|
|
0d12b1a207 | ||
|
|
299f5faf93 | ||
|
|
0d5d963bcf | ||
|
|
715927552f | ||
|
|
7670c84f77 | ||
|
|
2efd6b47bf | ||
|
|
ca8885d5be | ||
|
|
3a285e342e | ||
|
|
f263ff4ce9 | ||
|
|
fbe5b2c9cd | ||
|
|
a94b0b0ea5 | ||
|
|
b9c4a38022 | ||
|
|
90ee335724 | ||
|
|
7d3743dfdc | ||
|
|
a839588fc9 | ||
|
|
8a0d46468a | ||
|
|
bc578b6c8e | ||
|
|
1820908804 | ||
|
|
145661a541 | ||
|
|
a95dc485fa | ||
|
|
30b2e4207d | ||
|
|
7f5309ebb4 | ||
|
|
6cb5be7813 | ||
|
|
adb50bd4c9 | ||
|
|
cf1c79c9a3 | ||
|
|
76827d7c10 | ||
|
|
eb632d7676 | ||
|
|
fdb5fcc28d | ||
|
|
23c2b99e9d | ||
|
|
405c89ba1e | ||
|
|
a77c5c0910 | ||
|
|
88f1bc8b55 | ||
|
|
6405534814 | ||
|
|
c0751bd3fc | ||
|
|
1befa76448 | ||
|
|
e3b394f3f0 | ||
|
|
ef6461611b | ||
|
|
fca11f6039 | ||
|
|
d6e1c6e6c5 | ||
|
|
aa07c06387 | ||
|
|
dc25e84754 | ||
|
|
666ad44568 | ||
|
|
dddd1be5ec | ||
|
|
eb4f966971 | ||
|
|
715a11735f | ||
|
|
89f7058b99 | ||
|
|
9fb4cdeedb | ||
|
|
0bdc191501 | ||
|
|
49cc211819 | ||
|
|
4e2e5eb199 | ||
|
|
3f6bb04e75 | ||
|
|
c992c4d80f | ||
|
|
3057357c0a | ||
|
|
cb0bedc3d0 | ||
|
|
dc2a6ceb81 | ||
|
|
4f47fbf953 | ||
|
|
9fcd90e36c | ||
|
|
83ce81fcaa | ||
|
|
63888b91f6 | ||
|
|
934f51d166 | ||
|
|
bfc3e1ca7c | ||
|
|
c7d07fd0b5 | ||
|
|
d472624f33 | ||
|
|
0369a93825 | ||
|
|
ef2b0425e7 | ||
|
|
a5c774a51b | ||
|
|
9a9f83e8b5 | ||
|
|
e4d5d43424 | ||
|
|
b06b8c64a2 | ||
|
|
f15efca811 | ||
|
|
b664d3a91d | ||
|
|
b5c065418f | ||
|
|
bd6f63e563 | ||
|
|
6979e7e43b | ||
|
|
dc90160079 | ||
|
|
a81ee5209b | ||
|
|
15a79d723d | ||
|
|
b34438bee8 | ||
|
|
1454a04f81 | ||
|
|
ae2ab76fac | ||
|
|
391456aad7 | ||
|
|
a86d1693ba | ||
|
|
3b1432d86a | ||
|
|
c3188c6f31 | ||
|
|
5acda13ace | ||
|
|
036760a9fd | ||
|
|
91be515567 | ||
|
|
b6b6875986 | ||
|
|
8f029808af | ||
|
|
95f1a32d27 | ||
|
|
59691939f9 | ||
|
|
e954532d48 | ||
|
|
f5d7411c49 | ||
|
|
fba20a776d | ||
|
|
df2fa7c5a5 | ||
|
|
9903cda2a7 | ||
|
|
ded9121846 | ||
|
|
02ff72c970 | ||
|
|
90b30b6e0e | ||
|
|
96c0761689 | ||
|
|
bbe7b86718 | ||
|
|
7ba7dbca47 | ||
|
|
b85b7e0a55 | ||
|
|
587588c1fa | ||
|
|
94bda718c4 | ||
|
|
4e4d8f246f | ||
|
|
8a0f9d7b42 | ||
|
|
c7b469f0f3 | ||
|
|
c78b7265bd | ||
|
|
fc644b4c45 | ||
|
|
97f106fa10 | ||
|
|
7746a1f74f | ||
|
|
c0239cdbfa | ||
|
|
866aa6267a | ||
|
|
b4cec7790f | ||
|
|
deace771d6 | ||
|
|
f4d9937274 | ||
|
|
b6f45ddc53 | ||
|
|
fe43fa9de3 | ||
|
|
5f188b39a4 | ||
|
|
76d2d2ca41 | ||
|
|
4e51b6d9a4 | ||
|
|
606cf9b169 | ||
|
|
131f115730 | ||
|
|
b1d34394a8 | ||
|
|
baee33eb0f | ||
|
|
bd2d124f27 | ||
|
|
4254e88cfa | ||
|
|
174e910a1d | ||
|
|
acbdc33e1c | ||
|
|
f87715a62c | ||
|
|
56653d8524 | ||
|
|
f907a4d90c | ||
|
|
f5891a26d8 | ||
|
|
f9c15cac35 | ||
|
|
bf1794767e | ||
|
|
5d19c91605 | ||
|
|
8688ef20cf | ||
|
|
44ac2cdb4d | ||
|
|
48045f99e5 | ||
|
|
5973926ce6 | ||
|
|
d65b267e4a | ||
|
|
0afbbf8595 | ||
|
|
3cc351decd | ||
|
|
8f30b68871 | ||
|
|
5abe477620 | ||
|
|
295a05fbd6 | ||
|
|
958ea92eb8 | ||
|
|
70c726c875 | ||
|
|
7deb42aafd | ||
|
|
e2f16fdf45 | ||
|
|
139c28ae69 | ||
|
|
e8fd23cc83 | ||
|
|
1471af2de2 | ||
|
|
56f70324e8 | ||
|
|
be6b22a283 | ||
|
|
dceb954f9c | ||
|
|
38b23bc3f0 | ||
|
|
bf9822658f | ||
|
|
c8840352ac | ||
|
|
d4ee001292 | ||
|
|
a72bff7cb3 | ||
|
|
0b30c8d9ce | ||
|
|
668af46980 | ||
|
|
b9f831b858 | ||
|
|
71385e1225 | ||
|
|
81f3e4babd | ||
|
|
5b4d419476 | ||
|
|
7b16a8e3ca | ||
|
|
14f3f501bc | ||
|
|
3fd62c76c2 | ||
|
|
27ef86f6b1 | ||
|
|
656b15a404 | ||
|
|
f8f3b9005b | ||
|
|
4c995f262a | ||
|
|
c7f2c384ee | ||
|
|
ed4a06e6de | ||
|
|
b50116c4ae | ||
|
|
b23b0c3552 | ||
|
|
bb7cb05da5 | ||
|
|
8d5b3d4298 | ||
|
|
2750526aa5 | ||
|
|
84e9bcd65e | ||
|
|
91b016c414 | ||
|
|
be883de241 | ||
|
|
c233a70323 | ||
|
|
8025f93312 | ||
|
|
43d81ff866 | ||
|
|
c1f71b0336 | ||
|
|
0b17d143ba | ||
|
|
2a23064da5 | ||
|
|
e54dfb4284 | ||
|
|
19b6504f8a | ||
|
|
bb4d040fad | ||
|
|
891ebd4d97 | ||
|
|
a940199072 | ||
|
|
eda0e24ccd | ||
|
|
52ebc531ce | ||
|
|
891409f212 | ||
|
|
6ccf33cdbd | ||
|
|
e4da308580 | ||
|
|
7595f38f62 | ||
|
|
c25294ad3b | ||
|
|
f222b19158 | ||
|
|
776d8b7bc2 | ||
|
|
a8f101d0bc | ||
|
|
367a49591e | ||
|
|
94aead216e | ||
|
|
24aac7f8f6 | ||
|
|
29e539bad0 | ||
|
|
22886f8a74 | ||
|
|
50eb3cf5e5 | ||
|
|
6d8d9b74d9 | ||
|
|
afc4906aca | ||
|
|
8af9389f87 | ||
|
|
08bfd86103 | ||
|
|
6e0527913c | ||
|
|
bde826b18a | ||
|
|
0806a403d6 | ||
|
|
86af3872a9 | ||
|
|
df267b31c5 | ||
|
|
a6bdc58385 | ||
|
|
24338ec929 | ||
|
|
586daef9bc | ||
|
|
5a7a42cfce | ||
|
|
d0c4e92f11 | ||
|
|
ce9c63b32b | ||
|
|
a4e3523fe4 | ||
|
|
7a8549f5dd | ||
|
|
4cd3539024 | ||
|
|
64e16d6c00 | ||
|
|
3d0d9e5d75 | ||
|
|
4bd6db9df1 | ||
|
|
3bcb608bda | ||
|
|
0e6c4f5b0e | ||
|
|
a34b85490d | ||
|
|
1fd3f9d79c | ||
|
|
3dd1faa5c8 | ||
|
|
82103b1a49 | ||
|
|
11095a90f1 | ||
|
|
66459baee2 | ||
|
|
5ee856d96d | ||
|
|
0ffd22cb44 | ||
|
|
f7598efb67 | ||
|
|
6636dc1d5c | ||
|
|
bf58e35105 | ||
|
|
e437226241 | ||
|
|
b237dff775 | ||
|
|
a53903e4c3 | ||
|
|
1e9dc3ce45 | ||
|
|
0e30f46a62 | ||
|
|
7dfa2461c3 | ||
|
|
261d7b44fa | ||
|
|
b581e1350f | ||
|
|
a36cfed31a | ||
|
|
da1b137e38 | ||
|
|
d6a7894d3a | ||
|
|
f388233b03 | ||
|
|
6cdaff0948 | ||
|
|
1dd9ed1c05 | ||
|
|
978819e1d6 | ||
|
|
467115baae | ||
|
|
974d14ac4f | ||
|
|
dd30b0552f | ||
|
|
af88a3550a | ||
|
|
e50e0fdf88 | ||
|
|
26d8d00cb7 | ||
|
|
e4c14a675c | ||
|
|
9d5b5bd2f5 | ||
|
|
49ee105c68 | ||
|
|
3daf8df6ee | ||
|
|
4923580e3a | ||
|
|
d584d0c1c6 | ||
|
|
18251c4633 | ||
|
|
2860d3b247 | ||
|
|
28078b517a | ||
|
|
cb2f200269 | ||
|
|
0759af440a | ||
|
|
a2232470c2 | ||
|
|
d2516343bc | ||
|
|
93bd1bd93c | ||
|
|
659fc6b55e | ||
|
|
9d153cc1b1 | ||
|
|
6d995b036e | ||
|
|
e8ca9b8eb1 | ||
|
|
c90f47e832 | ||
|
|
939167cfc1 | ||
|
|
1ce563a181 | ||
|
|
dff0be9e68 | ||
|
|
6c21790595 | ||
|
|
6c9e53d648 | ||
|
|
49ca261bd5 | ||
|
|
be6a8bc869 | ||
|
|
539f513773 | ||
|
|
d27cac1598 | ||
|
|
e8e4c19873 | ||
|
|
547abfa13e | ||
|
|
71fd6bfa1c | ||
|
|
b0d67e0e15 | ||
|
|
fb6410f435 | ||
|
|
341312cc57 | ||
|
|
29d78ddb28 | ||
|
|
73e7767ffc | ||
|
|
6e51d9c90a | ||
|
|
704c60cec0 | ||
|
|
9714e501fb | ||
|
|
0799ce730d | ||
|
|
08c8105c54 | ||
|
|
e334942e57 | ||
|
|
f305a52c02 | ||
|
|
213ccc2234 | ||
|
|
e3e3f15ebc | ||
|
|
59306b0223 | ||
|
|
be5b33e876 | ||
|
|
f29b86c314 | ||
|
|
be8c3dbc97 | ||
|
|
fafeb87027 | ||
|
|
1f16ee5c2d | ||
|
|
2b3ee46f4e | ||
|
|
a35db90275 | ||
|
|
ee3d37a591 | ||
|
|
76f034acaa | ||
|
|
74216b00a4 | ||
|
|
db401d8e0a | ||
|
|
e3986eea43 | ||
|
|
1a5beef51f | ||
|
|
652234e967 | ||
|
|
acb2e64966 | ||
|
|
276d0c7c64 | ||
|
|
955899ef77 | ||
|
|
4068c5e4a3 | ||
|
|
1fa3db1468 | ||
|
|
b7c728046e | ||
|
|
d33ff30145 | ||
|
|
d15a484098 | ||
|
|
dd70c67ea4 | ||
|
|
b04a205f3e | ||
|
|
d696707cb5 | ||
|
|
bd108cf45c | ||
|
|
6374309c6d | ||
|
|
8bbdbb02b3 | ||
|
|
47cd8d4624 | ||
|
|
d1d9c0274b | ||
|
|
ee9584dc8d | ||
|
|
9dc79463a9 | ||
|
|
1d3dfeb74b | ||
|
|
2de1b62112 | ||
|
|
ae003efd61 | ||
|
|
ebd05dbeb3 | ||
|
|
76652d5d02 | ||
|
|
dac7b49de4 | ||
|
|
d7ebcadadb | ||
|
|
4a11acf047 | ||
|
|
5df75e7265 | ||
|
|
bc91c0b23f | ||
|
|
5297a83b27 | ||
|
|
7ea029a07c | ||
|
|
9b41488ad1 | ||
|
|
988deb489b | ||
|
|
d2429d7508 | ||
|
|
299c72e6ed | ||
|
|
ee3a4f9dd6 | ||
|
|
f2ceb0d68a | ||
|
|
bccb277dda | ||
|
|
a56563badd | ||
|
|
21cf8c6444 | ||
|
|
4d72c4c11e | ||
|
|
6c9a393f95 | ||
|
|
724925be2b | ||
|
|
2f20fc1cc7 | ||
|
|
8572d6adf0 | ||
|
|
4a07398023 | ||
|
|
99e01f61fd | ||
|
|
9052b52dfc | ||
|
|
5dedf7be63 | ||
|
|
2276c37ae7 | ||
|
|
306462f0bd | ||
|
|
3a8a7a5d00 | ||
|
|
7ed1a08985 | ||
|
|
cae1db6ecd | ||
|
|
dad29566b3 | ||
|
|
d242ee9053 | ||
|
|
1d9d40a209 | ||
|
|
c0312423d9 | ||
|
|
9302338304 | ||
|
|
74f08c639d | ||
|
|
635a784ebf | ||
|
|
4c28600a50 | ||
|
|
ce2c6eadf1 | ||
|
|
5d582d4ba0 | ||
|
|
8f2b1e2c7c | ||
|
|
e5324a8c6a | ||
|
|
d5a04ee984 | ||
|
|
50ba270762 | ||
|
|
8ddf04c627 | ||
|
|
1a82956eae | ||
|
|
3c132f10f3 | ||
|
|
88187d9f4b | ||
|
|
775b644765 | ||
|
|
fcbfe98cbe | ||
|
|
cbe92a2241 | ||
|
|
d5f7eb2897 | ||
|
|
3e6f48b444 | ||
|
|
0d70d05458 | ||
|
|
f04e78f11b | ||
|
|
c392c19335 | ||
|
|
4972b017b6 | ||
|
|
4a5550c822 | ||
|
|
e5c40f6e5a | ||
|
|
5ed9fb46b2 | ||
|
|
f9c91ec34d | ||
|
|
f3a974bf32 | ||
|
|
c67266ceac | ||
|
|
4145bcbcda | ||
|
|
c637af71d9 | ||
|
|
a81013175c | ||
|
|
75f879f37f | ||
|
|
e68a27ec7b | ||
|
|
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 | ||
|
|
d5d49d2e5a | ||
|
|
191dc2b434 | ||
|
|
6fa74367b7 | ||
|
|
4cee1500a4 | ||
|
|
2602fb8e71 | ||
|
|
bfce132399 | ||
|
|
30cf28ef63 | ||
|
|
a7f3831457 | ||
|
|
bcd11d854b | ||
|
|
bb01a1a810 | ||
|
|
c622dd9bdf | ||
|
|
7092951361 | ||
|
|
88d39b2a22 | ||
|
|
3863dbeb03 | ||
|
|
cca242e6e3 | ||
|
|
7082394702 | ||
|
|
1f0bf7b4db | ||
|
|
b18ce15130 | ||
|
|
c41efad63b | ||
|
|
683c716de3 | ||
|
|
29253a9683 | ||
|
|
9cc98648fd | ||
|
|
d3c192e4a6 | ||
|
|
08905cdcbc | ||
|
|
4b72e38789 | ||
|
|
ce17fda12f | ||
|
|
2df6034eb6 | ||
|
|
dd0fe8f1ee | ||
|
|
37fbc32ba4 | ||
|
|
64bdaa521f | ||
|
|
37ce7efdca | ||
|
|
4b92c539d4 | ||
|
|
a22f67aaf7 | ||
|
|
9fc574683d | ||
|
|
c8e016d07a | ||
|
|
c396f06a21 | ||
|
|
fc47a2c83c | ||
|
|
561b384313 | ||
|
|
88942403a6 | ||
|
|
8733fbd646 | ||
|
|
cf2db2cf3c | ||
|
|
f0cea20864 | ||
|
|
fcb18b988b | ||
|
|
8b24ec18b0 | ||
|
|
df5ba0ef96 | ||
|
|
74475bb939 | ||
|
|
22ffba3660 | ||
|
|
9603eb13a0 | ||
|
|
fde68d03f3 | ||
|
|
56162c4968 | ||
|
|
f78bcc2e72 | ||
|
|
0c23819036 | ||
|
|
91a7257252 | ||
|
|
d5f0b88095 | ||
|
|
3024918fcd | ||
|
|
bdc49369eb | ||
|
|
610526fee7 | ||
|
|
3f60c36245 | ||
|
|
bd88059c38 | ||
|
|
63f3cf925b | ||
|
|
8541e3345d | ||
|
|
d86e4a26c8 | ||
|
|
2c973c0b46 | ||
|
|
e0620ee179 | ||
|
|
dac23b2d0b | ||
|
|
783e6680b2 | ||
|
|
2529deb2bf | ||
|
|
3d3252b8de | ||
|
|
b14b16769c | ||
|
|
e7a525c5d5 | ||
|
|
d369e0531a | ||
|
|
6701f24bbb | ||
|
|
e76076e334 | ||
|
|
673e04af3a | ||
|
|
bc8ac28654 | ||
|
|
95744a1491 | ||
|
|
78f280d541 | ||
|
|
44811ac351 | ||
|
|
6cf0e549f7 | ||
|
|
25d9818333 | ||
|
|
2a905c5e5a | ||
|
|
0ddf0df13c | ||
|
|
b4dcc6f6bd | ||
|
|
c8484a6170 | ||
|
|
7431536bed | ||
|
|
678b14fb7e | ||
|
|
efbe1b6411 | ||
|
|
5fb14db85f | ||
|
|
df99d7af1f | ||
|
|
db561cfc3e | ||
|
|
0feb1dd25f | ||
|
|
e2d8bf4aa4 | ||
|
|
dc27ebc311 | ||
|
|
989d9ecaae | ||
|
|
b0098dfd6a | ||
|
|
40a08e8a62 | ||
|
|
5e728dfa57 | ||
|
|
085eac4c74 | ||
|
|
085caaa900 | ||
|
|
cc28a52f40 | ||
|
|
1e38c11f3c | ||
|
|
58af8d9dd1 | ||
|
|
abe5f64440 | ||
|
|
68b9650616 | ||
|
|
5dfa403ec8 | ||
|
|
f7ecda9a35 | ||
|
|
e99a3aca7e | ||
|
|
73c52a3b12 | ||
|
|
4679c702de | ||
|
|
59cb26b58b | ||
|
|
386e27b622 | ||
|
|
68db062e1e | ||
|
|
a67e842fb1 | ||
|
|
712c43dde1 | ||
|
|
c0e8c1012d | ||
|
|
c97502625c | ||
|
|
9e443adaf6 | ||
|
|
dfefc77263 | ||
|
|
ee7af57e3c | ||
|
|
46a1497b8e | ||
|
|
4603f9f8c6 | ||
|
|
b2a22df721 | ||
|
|
89785948f6 | ||
|
|
8b2aca5930 | ||
|
|
b8ea37e31c | ||
|
|
e044fe76f6 | ||
|
|
557392f016 | ||
|
|
eaecc11501 | ||
|
|
b25f811f51 | ||
|
|
34b0c6b3b4 | ||
|
|
2de9513b20 | ||
|
|
8eb20e9d92 | ||
|
|
32979e8122 | ||
|
|
490f35dda4 | ||
|
|
a579af186b | ||
|
|
01d08292bc | ||
|
|
f9c4aae3bf | ||
|
|
74e456e107 | ||
|
|
f8b096b9fd | ||
|
|
527201342c | ||
|
|
5f1e98e59b | ||
|
|
f4020bfba8 | ||
|
|
4792e6f5c0 | ||
|
|
514eda2bda | ||
|
|
310f677b84 | ||
|
|
f323abd6b3 | ||
|
|
b07e961db1 | ||
|
|
5958f28900 | ||
|
|
fd504b4d84 | ||
|
|
1bb24cbbbb | ||
|
|
b255a75bab | ||
|
|
0569ceb303 | ||
|
|
8021c41954 | ||
|
|
edd7981e49 | ||
|
|
715363eb49 | ||
|
|
c36430699e | ||
|
|
5f99dee5b5 | ||
|
|
9521ecc573 | ||
|
|
cb69b06199 | ||
|
|
21fed1fbcc | ||
|
|
17aef36902 | ||
|
|
98f8d6286e | ||
|
|
d96d52d27d | ||
|
|
625b9f6ba2 | ||
|
|
8756e81616 | ||
|
|
3e141c8277 | ||
|
|
aaed50ac3f | ||
|
|
a89eb21084 | ||
|
|
4356ddddbc | ||
|
|
b8db661c24 | ||
|
|
a54c552d39 | ||
|
|
25d48503eb | ||
|
|
5df0d41985 | ||
|
|
737e056a89 | ||
|
|
8c13a20895 | ||
|
|
2a0707e1b8 | ||
|
|
d116acac75 | ||
|
|
6ab25d18b2 | ||
|
|
4061695ef6 | ||
|
|
e3200b9303 | ||
|
|
18a7013e55 | ||
|
|
624552badd | ||
|
|
76d037cb95 | ||
|
|
dfdf1bec21 | ||
|
|
caa2fe5d39 | ||
|
|
2f506a6d52 | ||
|
|
856d83462f | ||
|
|
e9fcf7ea88 | ||
|
|
bfa6ab6a0c | ||
|
|
4e6de57b8f | ||
|
|
41e6704efd | ||
|
|
ffea662953 | ||
|
|
db5cc03f75 | ||
|
|
cd851988e7 | ||
|
|
fb39f49937 | ||
|
|
dccc12dbee | ||
|
|
1305447ace | ||
|
|
5ed1a6399a | ||
|
|
3f614c58ed | ||
|
|
37cf6fdc18 | ||
|
|
808f1c1cd2 | ||
|
|
06021f945f | ||
|
|
ad61285598 | ||
|
|
10d6808977 | ||
|
|
21fbad8602 | ||
|
|
fa6d6f9150 | ||
|
|
ed02723506 | ||
|
|
692858922f | ||
|
|
9da3bccd89 | ||
|
|
16a5d4cf48 | ||
|
|
b1e6353edd | ||
|
|
e1c593016b | ||
|
|
10124ce95b | ||
|
|
6e19c6febb | ||
|
|
4314e2f987 | ||
|
|
0eab889a28 | ||
|
|
c51dd24814 | ||
|
|
41ea0f1556 | ||
|
|
ee6b27b728 | ||
|
|
af72fc38fe | ||
|
|
294c429f93 | ||
|
|
9409f5c54a | ||
|
|
78ac5bd9c7 | ||
|
|
030d31ba93 | ||
|
|
70465ffcfb | ||
|
|
ee2b67af6d | ||
|
|
0afe62e255 | ||
|
|
ee14af651f | ||
|
|
9fd3c2453b | ||
|
|
a4e66c61c0 | ||
|
|
8cfdca3e72 | ||
|
|
2c27d8dbdc | ||
|
|
d02b26a4b8 | ||
|
|
8b3f13f6ec | ||
|
|
e74b6ae5c2 | ||
|
|
f21ec15ffa | ||
|
|
3f49392b9c | ||
|
|
f9a914c035 | ||
|
|
b2fc502c55 | ||
|
|
d091a08961 | ||
|
|
eb3b7904f0 | ||
|
|
bbfb270092 | ||
|
|
c18253b59b | ||
|
|
41177916df | ||
|
|
7acd99c5e6 | ||
|
|
d6c62b351f | ||
|
|
c9c43b0871 | ||
|
|
13e8568f03 | ||
|
|
cebdba9dfa | ||
|
|
4ea152e71b | ||
|
|
443f39f4f7 | ||
|
|
675981bc4f | ||
|
|
11af972f87 | ||
|
|
d9c126da40 | ||
|
|
7170467928 | ||
|
|
81699266d3 | ||
|
|
cbdb3653da | ||
|
|
5d82479d89 | ||
|
|
ed0d607279 | ||
|
|
855bd6896d | ||
|
|
179ef370e8 | ||
|
|
01dc9a22f9 | ||
|
|
bc15ada5ed | ||
|
|
fce5e4a9b9 | ||
|
|
07a45cd0af | ||
|
|
226a132e31 | ||
|
|
b59f5f30b9 | ||
|
|
acdd73ea34 | ||
|
|
38b5b27eb5 | ||
|
|
e8325b9be2 | ||
|
|
f8eb0fc41b | ||
|
|
ea38e1fe78 | ||
|
|
ed276c008d | ||
|
|
910d25619e | ||
|
|
2ae5430550 | ||
|
|
e53ac8a6fc | ||
|
|
cb51d55ab2 | ||
|
|
0b4723a689 | ||
|
|
3f9ce84b4a | ||
|
|
bdbe8501c6 | ||
|
|
3a12be3a73 | ||
|
|
2346f99368 | ||
|
|
d855846472 | ||
|
|
b9f7d21e42 | ||
|
|
db089ad3e3 | ||
|
|
1331cca1fa | ||
|
|
fe05aaf7f2 | ||
|
|
cc35ff7381 | ||
|
|
a146085382 | ||
|
|
79fcb77ad1 | ||
|
|
3608635ec6 | ||
|
|
ca53696814 | ||
|
|
61dac07200 | ||
|
|
9e42026e08 | ||
|
|
b52ea79ee6 | ||
|
|
e483431569 | ||
|
|
28b622b8a1 | ||
|
|
cbfc50cb51 | ||
|
|
deb7cced6e | ||
|
|
f9af56ac67 | ||
|
|
3ba2e947ac | ||
|
|
13d0eeb8e5 | ||
|
|
d9f063656b | ||
|
|
aceefb74da | ||
|
|
f38d98e988 | ||
|
|
ff8ff73e65 | ||
|
|
8478b0c10a | ||
|
|
1adf3a07dc | ||
|
|
a5a27a893d | ||
|
|
595f7598ae | ||
|
|
8bc1a424e2 | ||
|
|
5e69859273 | ||
|
|
3a0f9ce0cb | ||
|
|
3aabdf96a1 | ||
|
|
55b99d4151 | ||
|
|
f3699ad75f | ||
|
|
0af0c8dba0 | ||
|
|
1280ee49bb | ||
|
|
8fc1187283 | ||
|
|
e8dcf11ae0 | ||
|
|
ce40d6af9f | ||
|
|
636435e5c2 | ||
|
|
0733d6947d | ||
|
|
b91d62feb3 | ||
|
|
f6d5cdba19 | ||
|
|
fcb29e5e96 | ||
|
|
d7a043b46c | ||
|
|
d85ab5953a | ||
|
|
93dd485ab6 | ||
|
|
5c350f4fd5 | ||
|
|
514c4bac33 | ||
|
|
8f24715a10 | ||
|
|
4c7f18cd09 | ||
|
|
c5af4810ff | ||
|
|
551c4322cb | ||
|
|
e33c50b1e2 | ||
|
|
bc1e6b66f1 | ||
|
|
bbd5e695f5 | ||
|
|
f3cfccf0b8 | ||
|
|
016e1beef5 | ||
|
|
21a8ec0d72 | ||
|
|
fecd9e661a | ||
|
|
2914c705e5 | ||
|
|
3f506aaf90 | ||
|
|
75ea6c3ce2 | ||
|
|
3fb9ebf83f | ||
|
|
b4890bdb1c | ||
|
|
2cbfa1024a | ||
|
|
258dad0f9a | ||
|
|
37358a9a82 | ||
|
|
e167e0a3c2 | ||
|
|
7879457545 | ||
|
|
d525f4dd72 | ||
|
|
bd19554ea7 | ||
|
|
fffc384bfc | ||
|
|
afd1d69e7d | ||
|
|
c1305a1a18 | ||
|
|
43d5fbfc88 | ||
|
|
a4642a6a57 | ||
|
|
11ca7f1ead | ||
|
|
4aa992616f | ||
|
|
ab0fb2fa6f | ||
|
|
e1dd3bfa4a | ||
|
|
86238ec9d3 | ||
|
|
2e9779fdb4 | ||
|
|
b61a13463d | ||
|
|
d3b9c35c8f | ||
|
|
c50b75b439 | ||
|
|
7376280c33 | ||
|
|
3c767901f6 | ||
|
|
c6dfff5f1b | ||
|
|
74540a1e91 | ||
|
|
5159db0aa4 | ||
|
|
e495d2380d | ||
|
|
1ed34a0118 | ||
|
|
e8f64b2c88 | ||
|
|
4867409da2 | ||
|
|
f801fc3521 | ||
|
|
b2c0446e71 | ||
|
|
8f98ceb724 | ||
|
|
dea9990bc8 | ||
|
|
e4c43aab3e | ||
|
|
e55ed78080 | ||
|
|
ca54a0b991 | ||
|
|
e25e2fb7f5 | ||
|
|
1a886b6359 | ||
|
|
b511712f25 | ||
|
|
30fcca501f | ||
|
|
806dc4f7c4 | ||
|
|
c0163410d2 | ||
|
|
eac1e9ee66 | ||
|
|
8ad5af7c28 | ||
|
|
857d7ad256 | ||
|
|
612a29e0dd | ||
|
|
462304918c | ||
|
|
9d36c92adb | ||
|
|
640c4ecd99 | ||
|
|
07f09cfd88 | ||
|
|
d37c9ba18a | ||
|
|
cc8d6cf343 | ||
|
|
4b17f0982b | ||
|
|
dc576b2051 | ||
|
|
a543a2ae9f | ||
|
|
0e352e4bf7 | ||
|
|
3f8bde0f25 | ||
|
|
4308542cb1 | ||
|
|
e622fcf22e | ||
|
|
1766b7fa59 | ||
|
|
fa999783d7 | ||
|
|
e97d6632b5 | ||
|
|
e3d013a79a | ||
|
|
9807a2869f | ||
|
|
e9521d3447 | ||
|
|
c62ca42327 | ||
|
|
2feb36f620 | ||
|
|
f40918e005 | ||
|
|
b13a443fa7 | ||
|
|
e938a511be | ||
|
|
a96d572aa6 | ||
|
|
990c39d973 | ||
|
|
24d37fb493 | ||
|
|
c1e20276cb | ||
|
|
9f71eaf6b5 | ||
|
|
03cd08cca2 | ||
|
|
dc44a79020 | ||
|
|
8ed6e13cfe | ||
|
|
b321e0f535 | ||
|
|
c1433e9495 | ||
|
|
e4a94e0210 | ||
|
|
9e97330bcb | ||
|
|
4969b416b8 | ||
|
|
0bd0301ae3 | ||
|
|
ff6efbadf5 | ||
|
|
0b3317d2e1 | ||
|
|
ca5a872280 | ||
|
|
4244f182f2 | ||
|
|
be6e6d74bb | ||
|
|
4c0fef3dd7 | ||
|
|
d3b65c3cb7 | ||
|
|
bc48185f8e | ||
|
|
6fcf219fa7 | ||
|
|
d2e23eefd2 | ||
|
|
55162a6730 | ||
|
|
021ea7e61c | ||
|
|
f663464925 | ||
|
|
5d435e0859 | ||
|
|
a2ab31ba62 | ||
|
|
da2ea1ea7f | ||
|
|
21a1b3b255 | ||
|
|
c8e76a708e | ||
|
|
461cffc4e9 | ||
|
|
cdd25d1fb3 | ||
|
|
9a3666d550 | ||
|
|
90dffad2cc | ||
|
|
c1f2ef6d09 | ||
|
|
51250a676d | ||
|
|
d2461a2409 | ||
|
|
fdea69c5fa | ||
|
|
7c7552336d | ||
|
|
535dcf6a22 | ||
|
|
84091971f9 | ||
|
|
61da194af9 | ||
|
|
30c1465265 | ||
|
|
b574b8ea5a | ||
|
|
710e8e6f6f | ||
|
|
4a8a7637f3 | ||
|
|
6348923799 | ||
|
|
660a23d649 | ||
|
|
5bd9836fba | ||
|
|
0cb47363e1 | ||
|
|
fff5a9ece0 | ||
|
|
e3a24fc596 | ||
|
|
bb38b0c253 | ||
|
|
d2ed03e72a | ||
|
|
e72213687f | ||
|
|
491d66a916 | ||
|
|
f4fb1be3d8 | ||
|
|
10abeb4a08 | ||
|
|
a369402d11 | ||
|
|
fe3962cf54 | ||
|
|
cf76b42f2b | ||
|
|
fb088e4526 | ||
|
|
f2804372bd | ||
|
|
c25db14264 | ||
|
|
e83c7d40cd | ||
|
|
65d0cd98a9 | ||
|
|
ec505152e0 | ||
|
|
0d2488a804 | ||
|
|
bc5f054132 | ||
|
|
e812d40f9f | ||
|
|
b12c639bb2 | ||
|
|
dd841ded6f | ||
|
|
3c9e8b266a | ||
|
|
e6bce5ef88 | ||
|
|
bdff21b09a | ||
|
|
408e868fd2 | ||
|
|
cf63c0c966 | ||
|
|
d2e496cc01 | ||
|
|
ac336f7a9c | ||
|
|
8f581d3bc0 | ||
|
|
b2522ec319 | ||
|
|
117d4e0f36 | ||
|
|
9b0a99a051 | ||
|
|
5c807f5457 | ||
|
|
7eeab2fbe1 | ||
|
|
f6716d5e74 | ||
|
|
be451f6d29 | ||
|
|
eb0dbf1993 | ||
|
|
5ebd380d7a | ||
|
|
cbfe6d75f6 | ||
|
|
716e804b5b | ||
|
|
4848c19870 | ||
|
|
bca4e882ba | ||
|
|
eb08818828 | ||
|
|
b86e35d2a6 | ||
|
|
f5b14eee67 | ||
|
|
118439508b | ||
|
|
f875c95115 | ||
|
|
f2c10dedf0 | ||
|
|
37c95f6d39 | ||
|
|
22846c7022 | ||
|
|
fd025b9089 | ||
|
|
6dc8e442f2 | ||
|
|
4e4b1ed670 | ||
|
|
3580cdedd8 | ||
|
|
108cca9aa5 | ||
|
|
98104e4d2e | ||
|
|
dc8983dc8b | ||
|
|
0513e29593 | ||
|
|
087ef58502 | ||
|
|
298a8363ff | ||
|
|
ebe1ed2e49 | ||
|
|
6a7b0d623b | ||
|
|
f0c1a986db | ||
|
|
e7defc873b | ||
|
|
4b4d5bcd0a | ||
|
|
d3fbc4f345 | ||
|
|
227cffec2b | ||
|
|
5d3189c952 | ||
|
|
c71c43c0b5 | ||
|
|
1944def8db | ||
|
|
4b7d940657 | ||
|
|
d68bb0895b | ||
|
|
29b051dc0c | ||
|
|
8e1432e250 | ||
|
|
015d472119 | ||
|
|
7aca4a343d | ||
|
|
92c245ab98 | ||
|
|
3bb79f5823 | ||
|
|
554f67bc64 | ||
|
|
5ee9dc7472 | ||
|
|
bb55335906 | ||
|
|
b5665419ba | ||
|
|
7f534ea595 | ||
|
|
23e64a0b13 | ||
|
|
1c0df127f8 | ||
|
|
68a5f2a17a | ||
|
|
50bb35c3e3 | ||
|
|
fc99c2260b | ||
|
|
f178779347 | ||
|
|
90829c3577 | ||
|
|
7c1f91ced2 | ||
|
|
b4ccaac8da | ||
|
|
2932fb1bca | ||
|
|
db98fe95a4 | ||
|
|
66784463c0 | ||
|
|
fe450df425 | ||
|
|
c9f149173f | ||
|
|
9ee5e4d17d | ||
|
|
96d67bce90 | ||
|
|
a0ab37fcd6 | ||
|
|
65b8056203 | ||
|
|
4f752036ac | ||
|
|
b8c55666a7 | ||
|
|
08e7a4fcdd | ||
|
|
386d0a7ffc | ||
|
|
c33908dea5 | ||
|
|
1bc63e8cc7 | ||
|
|
ad87633b72 | ||
|
|
21eecea26d | ||
|
|
d519e2c19b | ||
|
|
cf9bc4ae2f | ||
|
|
2a19159394 | ||
|
|
8e73c0981b | ||
|
|
f935610ca9 | ||
|
|
12113c5925 | ||
|
|
63160928cd | ||
|
|
48fe766053 | ||
|
|
acd7330a5f | ||
|
|
78454538f9 | ||
|
|
a7bafcee76 | ||
|
|
4394c7a32d | ||
|
|
38abf5e6c4 | ||
|
|
58c146fa50 | ||
|
|
e612cccef3 | ||
|
|
960650331a | ||
|
|
462e175970 | ||
|
|
a1749c85c8 | ||
|
|
c727af1bcc | ||
|
|
8cb881fa9e | ||
|
|
3aeb946943 | ||
|
|
9012e6a254 | ||
|
|
251b0fc75f | ||
|
|
f7a6c58f5b | ||
|
|
0ddf761563 | ||
|
|
58d81fe699 | ||
|
|
4daf275edd | ||
|
|
d27b2c3de5 | ||
|
|
7c456a7368 | ||
|
|
a8c24526e3 | ||
|
|
9e7e303ac8 | ||
|
|
a3d7dfa85c | ||
|
|
88054f8ad3 | ||
|
|
f5e7fb8ea0 | ||
|
|
7cb595fc60 | ||
|
|
4cbe738cfb | ||
|
|
0f83ab90e3 | ||
|
|
0e15559bbf | ||
|
|
eaba9405d7 | ||
|
|
492f92b9ec | ||
|
|
cc5be7c0cd | ||
|
|
f8300f1e1c | ||
|
|
7f71af7974 | ||
|
|
065ac461c5 | ||
|
|
f8c3e52b0f | ||
|
|
1775c102ad | ||
|
|
2a53aecb26 | ||
|
|
3087dcdb2e | ||
|
|
5174a5e5a1 | ||
|
|
b018db955c | ||
|
|
0da218acc1 | ||
|
|
9fc36f7358 | ||
|
|
ec2751c045 | ||
|
|
7b91e889b6 | ||
|
|
16667d15e0 | ||
|
|
b9337d3143 | ||
|
|
2bf7e9bcda | ||
|
|
b24a026b02 | ||
|
|
0ef3708713 | ||
|
|
2012e2877c | ||
|
|
ba45b6e5fa | ||
|
|
308e6149e6 | ||
|
|
cbbf3ee5ef | ||
|
|
8171a9ba6e | ||
|
|
8788690192 | ||
|
|
769061023a | ||
|
|
ba2c317cb7 | ||
|
|
aea1502a78 | ||
|
|
9dcfb711c1 | ||
|
|
4d8fff0ec0 | ||
|
|
3c954a048b | ||
|
|
2f8d1abe7c | ||
|
|
d2654362c5 | ||
|
|
1bafe5ed81 | ||
|
|
869ec1b877 | ||
|
|
3cc0c7306a | ||
|
|
c52575a837 | ||
|
|
6d00f337e5 | ||
|
|
b6e638af6d | ||
|
|
5fc2539281 | ||
|
|
0bab40c121 | ||
|
|
8980e49036 | ||
|
|
84b4d9cce4 | ||
|
|
92a67d1895 | ||
|
|
22cd0cd4e3 | ||
|
|
e75d998e50 | ||
|
|
ae087fbb2f | ||
|
|
714aeaf857 | ||
|
|
cbeeeafde9 | ||
|
|
572856fa8f | ||
|
|
1d9b68aef5 | ||
|
|
e813da324d | ||
|
|
b018243a45 | ||
|
|
9326e8fec5 | ||
|
|
5cf5f261d9 | ||
|
|
e22a936ca5 | ||
|
|
9f33e6cdcb | ||
|
|
16777bbe0f | ||
|
|
e851ef2303 | ||
|
|
1681a1f29a | ||
|
|
acb8140655 | ||
|
|
245d0b3772 | ||
|
|
96fb58e401 | ||
|
|
02d19fe9c1 | ||
|
|
32b80e7367 | ||
|
|
7c30adcd57 | ||
|
|
8153755c17 | ||
|
|
2a983b8ead | ||
|
|
bd395b5c02 | ||
|
|
d24f1f2330 | ||
|
|
cace096aba | ||
|
|
f0929a13c3 | ||
|
|
7a031cd4b2 | ||
|
|
fc8fa16253 | ||
|
|
ca3b88c66a | ||
|
|
f7f63b75b5 | ||
|
|
250e638f44 | ||
|
|
0a0130dcf2 | ||
|
|
aef2a1ccd0 | ||
|
|
2ef2fbe7a4 | ||
|
|
c3b30f576d | ||
|
|
c2cc8e33fb | ||
|
|
af7ef68647 | ||
|
|
9a6b8d1015 | ||
|
|
3296fa1dff | ||
|
|
5a4a5d3160 | ||
|
|
3a511f5874 | ||
|
|
2b8f817cfb | ||
|
|
7789ea8a3c | ||
|
|
5003c9b26b | ||
|
|
d92b741fce | ||
|
|
aa68ee5ce2 | ||
|
|
26c6ec1893 | ||
|
|
86d4d7425b | ||
|
|
f84518396b | ||
|
|
2e0e3d22ec | ||
|
|
d3fc910b29 | ||
|
|
9c32a4c3cd | ||
|
|
54462c9590 | ||
|
|
ae112a5cb5 | ||
|
|
4ac6d66244 | ||
|
|
08c71a7dbf | ||
|
|
5b5415bf87 | ||
|
|
f64cd37b29 | ||
|
|
8bd226777e | ||
|
|
e176cf73a5 | ||
|
|
d66f4e3407 | ||
|
|
4abb5e433f | ||
|
|
46a5b5adcc | ||
|
|
4694e31659 | ||
|
|
3d6b586776 | ||
|
|
c4cc2ec376 | ||
|
|
4a94240844 | ||
|
|
6fc0ab541e | ||
|
|
5b4a918d26 | ||
|
|
bd3309f09b | ||
|
|
122c9699fa | ||
|
|
e2f08f5dbf | ||
|
|
7089c07d4e | ||
|
|
f363e41c27 | ||
|
|
24cd5ede9e | ||
|
|
f4fac65746 | ||
|
|
f6b549870a | ||
|
|
074d147ef7 | ||
|
|
55f5d979ae | ||
|
|
00dc97cb8a | ||
|
|
9766fe1775 | ||
|
|
b5fb6b260e | ||
|
|
6382676838 | ||
|
|
14f2b39dff | ||
|
|
9697738544 | ||
|
|
4a9fdcd65f | ||
|
|
80091295df | ||
|
|
3c11aba3cd | ||
|
|
54fb272967 | ||
|
|
e12d722d99 | ||
|
|
8a5a2b9b8d | ||
|
|
0246a6dc63 | ||
|
|
60c868c193 | ||
|
|
1e71bdd085 | ||
|
|
b0a9db44b6 | ||
|
|
f846c07d43 | ||
|
|
dfc8da6e0e | ||
|
|
8960f971ca | ||
|
|
ff71fe9277 | ||
|
|
fe92d8e656 | ||
|
|
f0080188b7 | ||
|
|
5a55f43ddc | ||
|
|
63b6de85b5 | ||
|
|
29acbbea8d | ||
|
|
e66d29867e | ||
|
|
0bcabeb134 | ||
|
|
e90a315ebe | ||
|
|
b06b92566c | ||
|
|
8aa529e55e | ||
|
|
03acd42408 | ||
|
|
bc0276c3cb | ||
|
|
3d952e5879 | ||
|
|
3f15ef960a | ||
|
|
fa67064dc6 | ||
|
|
5340230f6b | ||
|
|
7162378126 | ||
|
|
534926ac7a | ||
|
|
5580266222 | ||
|
|
6c6f210456 | ||
|
|
c5c92b71ce | ||
|
|
369bb2a609 | ||
|
|
5c82e72caa | ||
|
|
ca5b7c487d | ||
|
|
9596950898 | ||
|
|
29de1a7e5a | ||
|
|
f1daf67200 | ||
|
|
e8c11d4e32 | ||
|
|
481e0e7d22 | ||
|
|
2b81718876 | ||
|
|
6ee7823efe | ||
|
|
683e4a5de9 | ||
|
|
548b4c9bf1 | ||
|
|
fba3960a6a | ||
|
|
0986bb2c43 | ||
|
|
5532d1d11d | ||
|
|
dab0d4214e | ||
|
|
088a491f10 | ||
|
|
681f7a3067 | ||
|
|
ada4528484 | ||
|
|
1386d961a9 | ||
|
|
828b45420a | ||
|
|
e9f008dc04 | ||
|
|
44ecfc2f36 | ||
|
|
e28495225d | ||
|
|
c190a98796 | ||
|
|
a03f503fb7 | ||
|
|
04789f11cd | ||
|
|
f02ced5786 | ||
|
|
2fae4442e2 | ||
|
|
f138f0eeff | ||
|
|
ea1e49e5a8 | ||
|
|
9bd8004ded | ||
|
|
596d50cb1c | ||
|
|
48f4ce2825 | ||
|
|
d8b7640a81 | ||
|
|
8c01d0459a | ||
|
|
e4dce6fa11 | ||
|
|
7831181410 | ||
|
|
2cc84f7c97 | ||
|
|
5136f317d2 | ||
|
|
ae7b53245a | ||
|
|
542a0f8112 | ||
|
|
2ed0333f3c | ||
|
|
791928d60b | ||
|
|
de21395cad | ||
|
|
5973c4e97a | ||
|
|
6dbdf2caa8 | ||
|
|
6ed99f4d40 | ||
|
|
3f0a207eaf | ||
|
|
07c6b685b7 | ||
|
|
0c1c2ff3d0 | ||
|
|
d1a988ce9f | ||
|
|
ae1278315f | ||
|
|
164dcdad22 | ||
|
|
f3bd744187 | ||
|
|
722018bdbe | ||
|
|
bfe005e8a0 | ||
|
|
f9b50f6436 | ||
|
|
28c125b725 | ||
|
|
ab9034ef4e | ||
|
|
19c3ead040 | ||
|
|
63b17f1d63 | ||
|
|
3e9cf581d1 | ||
|
|
e7b737dc5e | ||
|
|
1a56335cbf | ||
|
|
4b30933904 | ||
|
|
094f89cee5 | ||
|
|
36a66b6bec | ||
|
|
69105addb4 | ||
|
|
e4c66e2f88 | ||
|
|
d5ef06dee5 | ||
|
|
7c675f86e6 | ||
|
|
60a76e0d39 | ||
|
|
c88072ca74 | ||
|
|
a609f1f9c2 | ||
|
|
2413679845 | ||
|
|
b50f2fc0a6 | ||
|
|
4034f2bdfb | ||
|
|
b2361b3591 | ||
|
|
ed70d6422c | ||
|
|
17bc902648 | ||
|
|
db6a102206 | ||
|
|
ded09420ad | ||
|
|
078cc29e60 | ||
|
|
bede66b709 | ||
|
|
cc1433e808 | ||
|
|
4f1320fba2 | ||
|
|
b8a4e2bb0e | ||
|
|
720b21097c | ||
|
|
162269418e | ||
|
|
580e2a7391 | ||
|
|
d870f4df8c | ||
|
|
309a65a790 | ||
|
|
963f33c909 | ||
|
|
af73694245 | ||
|
|
a4f557cb63 | ||
|
|
d47d6051a3 | ||
|
|
87bb5a6259 | ||
|
|
708c7c90a3 | ||
|
|
573ddaf6da | ||
|
|
db545dffcc | ||
|
|
f7ee7d26a5 | ||
|
|
15d4ec2322 | ||
|
|
88ae51cb2e | ||
|
|
657338f0c9 | ||
|
|
fe356384aa | ||
|
|
69e442ec90 | ||
|
|
8b738924b0 | ||
|
|
afa97833cc | ||
|
|
3c516ccd35 | ||
|
|
dfaa02a8d5 | ||
|
|
50d1798203 | ||
|
|
85da8b0b54 | ||
|
|
ddd3143498 | ||
|
|
cd493b3d8f | ||
|
|
6a44c4b672 | ||
|
|
2603a60526 | ||
|
|
9a1a8d0dc6 | ||
|
|
7444af63fc | ||
|
|
ae0045f50e | ||
|
|
2c132055ef | ||
|
|
09e4a320e6 | ||
|
|
c1e3141433 | ||
|
|
c316ab7609 | ||
|
|
cf197b7550 | ||
|
|
c653200459 | ||
|
|
0b396e2587 | ||
|
|
6090eb3125 | ||
|
|
21c1a55665 | ||
|
|
c50958dd46 | ||
|
|
d56535498b | ||
|
|
81e8efbcdf | ||
|
|
c308b3a5f3 | ||
|
|
f48fcf5f45 | ||
|
|
4d36cfe6a3 | ||
|
|
2370f79846 | ||
|
|
b758dc3f8b | ||
|
|
e8a9cedc6a | ||
|
|
44078a3441 | ||
|
|
ce25808caa | ||
|
|
c2b69b5d9d | ||
|
|
6925f7153a | ||
|
|
5460cd5a00 | ||
|
|
2861ad6208 | ||
|
|
37d9554e31 | ||
|
|
633efa004c | ||
|
|
800a9e957d | ||
|
|
8ea8c0372a | ||
|
|
4dd2ed0ad1 | ||
|
|
bbf2720b4d | ||
|
|
5893545370 | ||
|
|
6ef5854e47 | ||
|
|
5c44db1b5f | ||
|
|
f0c68224d6 | ||
|
|
bb90ac7aef | ||
|
|
4694e3fe2e | ||
|
|
fae8065d7f | ||
|
|
099b4d5643 | ||
|
|
5e83d8b10a | ||
|
|
4c84e13064 | ||
|
|
ef028aa4c6 | ||
|
|
2bff7aa420 | ||
|
|
e07db8077c | ||
|
|
35ffa6973a | ||
|
|
402b400e52 | ||
|
|
6b6a4f1de2 | ||
|
|
ab6a618dac | ||
|
|
45572fa600 | ||
|
|
36a6a9eb7d | ||
|
|
7c91702697 | ||
|
|
71fceb51e3 | ||
|
|
9705781777 | ||
|
|
76ae16dee3 | ||
|
|
035157a2fd | ||
|
|
50a643208f | ||
|
|
92cd154b95 | ||
|
|
d07b95da6f | ||
|
|
2f22bfeaaa | ||
|
|
fcedb448bb | ||
|
|
5a4ab813f0 | ||
|
|
99369403b7 | ||
|
|
adde98d27b | ||
|
|
e2622b0fea | ||
|
|
99afb91aca | ||
|
|
1632e7feb3 | ||
|
|
9403ef9942 | ||
|
|
c8d4d2305d | ||
|
|
f341a61976 | ||
|
|
5778d6cdb9 | ||
|
|
f2bc0a0c93 | ||
|
|
d8817e2c39 | ||
|
|
5b45a568c0 | ||
|
|
d19c2ef049 | ||
|
|
c0c67164d5 | ||
|
|
93385de9ff | ||
|
|
9edb745a71 | ||
|
|
d315acf15e | ||
|
|
aa8a3b306d | ||
|
|
89b66be8b3 | ||
|
|
b313929074 | ||
|
|
8c6ef34e56 | ||
|
|
f4f6b2b97e | ||
|
|
c2dbc39224 | ||
|
|
2d89aa53df | ||
|
|
52930ae3a9 | ||
|
|
ede645439a | ||
|
|
95614c2e7c | ||
|
|
37fb62e217 | ||
|
|
555a705aaa | ||
|
|
123f70c521 | ||
|
|
02caa22338 | ||
|
|
38f78c7be1 | ||
|
|
fd5c585cab | ||
|
|
0aa6e8609e | ||
|
|
40463f4410 | ||
|
|
01e07f8ae2 | ||
|
|
f75288402e | ||
|
|
63fec5f467 | ||
|
|
b0a8c63bf2 | ||
|
|
2d038ae579 | ||
|
|
50f2c1fbd9 | ||
|
|
40507f313a | ||
|
|
11404035d1 | ||
|
|
3cc78a1a0f | ||
|
|
501241725a | ||
|
|
501732ca84 | ||
|
|
17d92fd05b | ||
|
|
d0d141ea5b | ||
|
|
97f458f27e | ||
|
|
da96d5b5bb | ||
|
|
68aec7ab65 | ||
|
|
c1d26a2bde | ||
|
|
dfdedfe97a | ||
|
|
8c4eb82fb8 | ||
|
|
2b42e280e8 | ||
|
|
289417e089 | ||
|
|
1faf31158c | ||
|
|
0a7da8a929 | ||
|
|
a3254ad7b3 | ||
|
|
b8b8ba69d4 | ||
|
|
081275c58e | ||
|
|
968e9fce6c | ||
|
|
b81f248c35 | ||
|
|
fa0cf27f72 | ||
|
|
4cbb8e0d70 | ||
|
|
4a970dc04e | ||
|
|
4125f8f08e | ||
|
|
45649948db | ||
|
|
7d8fafa4b7 | ||
|
|
9e258d2369 | ||
|
|
1ab478ef48 | ||
|
|
ecc3b33299 | ||
|
|
424bcccf98 | ||
|
|
d13ecbbb67 | ||
|
|
09fe55be99 | ||
|
|
1efb91cda6 | ||
|
|
3d72bcb583 | ||
|
|
2fbb3407dd | ||
|
|
9d58debbcc | ||
|
|
07a309961b | ||
|
|
eae9bb14a2 | ||
|
|
a401a5e46a | ||
|
|
019a25fa84 | ||
|
|
a8993377f7 | ||
|
|
8c9b95d07e | ||
|
|
db8c8b2ad8 | ||
|
|
55b9f37c35 | ||
|
|
815ee70d7d | ||
|
|
04b7426dfa | ||
|
|
0e4062c177 | ||
|
|
cff0af8d6d | ||
|
|
8b591a8b90 | ||
|
|
deefc22d2f | ||
|
|
a485ade084 | ||
|
|
b45d1ae3c2 | ||
|
|
7db4dd0dbd | ||
|
|
348caf1627 | ||
|
|
6683a1c8db | ||
|
|
d3543bc097 | ||
|
|
6247727678 | ||
|
|
67516d5331 | ||
|
|
e7f3e4a031 | ||
|
|
b0a49baf2f | ||
|
|
d9ffca6d79 | ||
|
|
dba6ec5d0c | ||
|
|
953f1c7df0 | ||
|
|
81acf8675a | ||
|
|
f31ff1c1c4 | ||
|
|
8140043344 | ||
|
|
29002aca14 | ||
|
|
a39f01fb1d | ||
|
|
b13de88757 | ||
|
|
b3747a6bdb | ||
|
|
112dd3508d | ||
|
|
46ccc784fe | ||
|
|
9603279fb8 | ||
|
|
e567c8d914 | ||
|
|
21d566bf51 | ||
|
|
313e5ec45d | ||
|
|
b0cafff1bf | ||
|
|
f683e78f53 | ||
|
|
be0d85ba3e | ||
|
|
6a0cfeb0f2 | ||
|
|
1f534482de | ||
|
|
144b6ecba5 | ||
|
|
53f7c27956 | ||
|
|
44251cbc0c | ||
|
|
a1849dfc5f | ||
|
|
e7930bea3a | ||
|
|
d8f06cf21f | ||
|
|
44653ac71b | ||
|
|
7f0fe7f44d | ||
|
|
47839c882d | ||
|
|
e547c81b9a | ||
|
|
b52b376cf1 | ||
|
|
e80a2e9424 | ||
|
|
e30c4023e1 | ||
|
|
5aa595c99b | ||
|
|
a301f9327a | ||
|
|
602d1e18af | ||
|
|
178a758738 | ||
|
|
381a6bbfb4 | ||
|
|
f4a089447d | ||
|
|
d080dd0182 | ||
|
|
37bfd879df | ||
|
|
4d345bdee3 | ||
|
|
e222f10616 | ||
|
|
9869db36e9 | ||
|
|
2ebdf6de85 | ||
|
|
db7633eac4 | ||
|
|
8fbb772041 | ||
|
|
3c660b4d55 | ||
|
|
0fad0bd5c5 | ||
|
|
1fa7491d02 | ||
|
|
1292aa1e4b | ||
|
|
0c61dffcb5 | ||
|
|
30016eef42 | ||
|
|
781ce7f4a8 | ||
|
|
c76d6785de | ||
|
|
81731a29d1 | ||
|
|
ad93a01fa6 | ||
|
|
423783c913 | ||
|
|
ccff1cc0d2 | ||
|
|
47707f76cb | ||
|
|
3241a91312 | ||
|
|
b732b99c0b | ||
|
|
b001b6a55a | ||
|
|
24c9aabe16 | ||
|
|
92df7dd504 | ||
|
|
fba924717c | ||
|
|
e07d203a2f | ||
|
|
92546f9ff9 | ||
|
|
849b2101e6 | ||
|
|
09a534168f | ||
|
|
a98a648754 | ||
|
|
f4c3f77b96 | ||
|
|
b95e47d401 | ||
|
|
8aff0091fc | ||
|
|
bc8c4949b7 | ||
|
|
f44c1d9366 | ||
|
|
5329b592b7 | ||
|
|
39e2dbb7b3 | ||
|
|
47db5afe4f | ||
|
|
19142fcfd4 | ||
|
|
2283b32986 | ||
|
|
2e5f56539d | ||
|
|
a63f4e1f9c | ||
|
|
1d2e7e6142 | ||
|
|
099b302768 | ||
|
|
c29174d96b | ||
|
|
cda455684c | ||
|
|
0858bbcfb5 | ||
|
|
f23e838c15 | ||
|
|
5814d65428 | ||
|
|
f8197823a4 | ||
|
|
b408ee65f6 | ||
|
|
0f045633a7 | ||
|
|
62e8630bdc | ||
|
|
eb7484abc4 | ||
|
|
8ef3af8bed | ||
|
|
4eb52d9a45 | ||
|
|
7817332cc1 | ||
|
|
e3fbb5828f | ||
|
|
45cf6ce658 | ||
|
|
69222204e6 | ||
|
|
dc2a270b71 | ||
|
|
9c7598db10 | ||
|
|
00fb56c2b9 | ||
|
|
e37b0392be | ||
|
|
7dba11957a | ||
|
|
517a17b6d9 | ||
|
|
9d3d0c6b79 | ||
|
|
bc1770c035 | ||
|
|
50cd0d5a12 | ||
|
|
8d6f98b83d | ||
|
|
8809c8ec38 | ||
|
|
6feabe12a7 | ||
|
|
41d94fb0e3 | ||
|
|
d425bd20a2 | ||
|
|
e7e9d84a54 | ||
|
|
c84a275871 | ||
|
|
8d1f6733a9 | ||
|
|
c355295fe0 | ||
|
|
9ef264a343 | ||
|
|
fec3694512 | ||
|
|
eaa2a12a44 | ||
|
|
1b3fc99e0f | ||
|
|
e293b96610 | ||
|
|
f2c51355ed | ||
|
|
7ab1580762 | ||
|
|
a819615113 | ||
|
|
f519275024 | ||
|
|
7a9130401f | ||
|
|
bfb4dddc2e | ||
|
|
6f322b59da | ||
|
|
320a119913 | ||
|
|
fcd3964082 | ||
|
|
eeb9b7065d | ||
|
|
2aed822bd7 | ||
|
|
add4780bf7 | ||
|
|
df884f9d9a | ||
|
|
498f1b50f7 | ||
|
|
29380252a8 | ||
|
|
ade465512f | ||
|
|
37fbe2a271 | ||
|
|
15614defd8 | ||
|
|
b5ee5f8539 | ||
|
|
febf5d0944 | ||
|
|
9e37e514d2 | ||
|
|
5c2f4a7d88 | ||
|
|
db8eb71a9c | ||
|
|
5780852aee | ||
|
|
6619d7d8ac | ||
|
|
82f7d51bde | ||
|
|
8407664cf6 | ||
|
|
b5b32c8f9a | ||
|
|
3dbe309fce | ||
|
|
87c5a97b91 | ||
|
|
83bb8c72a7 | ||
|
|
2172dfa41f | ||
|
|
ef46822708 | ||
|
|
78e7551083 | ||
|
|
d298fecfda | ||
|
|
d3ea420650 | ||
|
|
067777e77d | ||
|
|
5ccd482b90 | ||
|
|
3893d9217c | ||
|
|
efc335d4a1 | ||
|
|
b9f64130af | ||
|
|
0a4502e116 | ||
|
|
b6364d9ae4 | ||
|
|
59caea5674 | ||
|
|
2f5b18ba2f | ||
|
|
5631243fdd | ||
|
|
a61fc8acd1 | ||
|
|
b87ff76b7e | ||
|
|
1c9e851fe0 | ||
|
|
5382f6d197 | ||
|
|
8ca2f785e2 | ||
|
|
459c8137c0 | ||
|
|
9165d8e5d1 | ||
|
|
fcc5c80298 | ||
|
|
e309bb2f76 | ||
|
|
92dc493189 | ||
|
|
39f1bf9ce8 | ||
|
|
fe8bcf44ef | ||
|
|
56ccbcff9a | ||
|
|
72b7cf376b | ||
|
|
374e8d510a | ||
|
|
343ac48a2d | ||
|
|
85bab9477b | ||
|
|
835c266436 | ||
|
|
6b0a5fd941 | ||
|
|
1e9a5d4b8e | ||
|
|
b238874895 | ||
|
|
fc1ec6ab56 | ||
|
|
b4f6efcf69 | ||
|
|
b3cc9ddd66 | ||
|
|
3a34103bb6 | ||
|
|
6268af4ceb | ||
|
|
ecfe56b932 | ||
|
|
16d81de018 | ||
|
|
a5a036c101 | ||
|
|
792819609a | ||
|
|
3b69c7a484 | ||
|
|
8ed1c7446e | ||
|
|
8486a30c74 | ||
|
|
8696be1950 | ||
|
|
b43df925f8 | ||
|
|
cfe0c54e8c | ||
|
|
81db471695 | ||
|
|
eb5d80d39a | ||
|
|
ea3d4b3712 | ||
|
|
cf561391a1 | ||
|
|
276016fba7 | ||
|
|
d9dedc8f27 | ||
|
|
569cdeac4e | ||
|
|
48cabc8f9f | ||
|
|
69e9db54be | ||
|
|
1be71be2a2 | ||
|
|
2ebaa9f881 | ||
|
|
207db3747f | ||
|
|
a3bd6fa73f | ||
|
|
883239f29a | ||
|
|
e74b5d4fbf | ||
|
|
7a7b9644aa | ||
|
|
a2032ba51f | ||
|
|
b8d48ad379 | ||
|
|
fec655d5e9 | ||
|
|
9edeb3ad8e | ||
|
|
56f17eb659 | ||
|
|
d052fb99ee | ||
|
|
be3ab15f71 | ||
|
|
6a325039e2 | ||
|
|
08ab2b7f94 | ||
|
|
d724ba1739 | ||
|
|
687844b2fe | ||
|
|
8b8764b427 | ||
|
|
f959c6b5b5 | ||
|
|
7d375209b9 | ||
|
|
75448c19f4 | ||
|
|
a80e32c0fe | ||
|
|
02b78d7ed0 | ||
|
|
3fcefefce5 | ||
|
|
00da07ebd1 | ||
|
|
79a2237ed2 | ||
|
|
fb37865802 | ||
|
|
4ee750d034 | ||
|
|
a31b168049 | ||
|
|
22fda945cc | ||
|
|
c5f7787f37 | ||
|
|
7c92d87313 | ||
|
|
491a9d9cb4 | ||
|
|
71956239ac | ||
|
|
123c2494c3 | ||
|
|
d8742e9b3e | ||
|
|
a7ec3f0576 | ||
|
|
008dab1b25 | ||
|
|
d922934cf8 | ||
|
|
39d4bb0c7a | ||
|
|
feb8a001e1 | ||
|
|
9573cef0a8 | ||
|
|
bc8dd5d3f0 | ||
|
|
a4bfdb8264 | ||
|
|
ee200385e4 | ||
|
|
c7ba588030 | ||
|
|
8da2a78834 | ||
|
|
1fc97863a0 | ||
|
|
46677a6769 | ||
|
|
4f811a3de9 | ||
|
|
13f4412f2c | ||
|
|
edbca2344d | ||
|
|
794fb5ac89 | ||
|
|
f5c49a3f5c | ||
|
|
5adf3025db | ||
|
|
24e5b78f36 | ||
|
|
ba251262db | ||
|
|
0642eea2ab | ||
|
|
6858598bee | ||
|
|
87178cb5a4 | ||
|
|
3e08b8c56a | ||
|
|
ba26d609a1 | ||
|
|
7eda2f8293 | ||
|
|
cb14b4eb1e | ||
|
|
d2e5ab8c57 | ||
|
|
3798621e0b | ||
|
|
94527665c2 | ||
|
|
77497793e0 | ||
|
|
6a2935d67b | ||
|
|
ee02d42916 | ||
|
|
b859320606 | ||
|
|
1eadb68598 | ||
|
|
8ac061de69 | ||
|
|
45fa41ff5c | ||
|
|
bdb62b6fe9 | ||
|
|
12220aa8fd | ||
|
|
da136cba6f | ||
|
|
a4a1d4a78d | ||
|
|
6af05c6197 | ||
|
|
42289c5f18 | ||
|
|
fb0ffcddc8 | ||
|
|
97d38d0817 | ||
|
|
bd3a693fd4 | ||
|
|
4575aeb1e7 | ||
|
|
c6fec241bc | ||
|
|
b9c983dee3 | ||
|
|
1a51e308e5 | ||
|
|
462a5eabb4 | ||
|
|
59fdb0d242 | ||
|
|
19ca125ae7 | ||
|
|
47a8cea564 | ||
|
|
a7e692dc7a | ||
|
|
cd20a6a67f | ||
|
|
38892f2959 | ||
|
|
83fcf12d25 | ||
|
|
db3c60d235 | ||
|
|
2153102725 | ||
|
|
bf81164407 | ||
|
|
3206072ac3 | ||
|
|
c9be6b239c | ||
|
|
78079dd062 | ||
|
|
da1fb0f2e9 | ||
|
|
b85736329a | ||
|
|
b8342bbfa8 | ||
|
|
0bc8f78d4b | ||
|
|
03e57530fa | ||
|
|
6e427e1209 | ||
|
|
0bc6cc3735 | ||
|
|
6b7b5698e9 | ||
|
|
edacffc68d | ||
|
|
8d8b42b086 | ||
|
|
4f7ffc8c0f | ||
|
|
15c5b63713 | ||
|
|
af31731365 | ||
|
|
e693e99067 | ||
|
|
a20cb3e189 | ||
|
|
b718e918d1 | ||
|
|
7962f88558 | ||
|
|
4fdc206106 | ||
|
|
79e979db5b | ||
|
|
ed80ce66fc | ||
|
|
9cbc66ea7e | ||
|
|
b3bc7bdca8 | ||
|
|
5457895aa6 | ||
|
|
a2c4f1410a | ||
|
|
73604ef05c | ||
|
|
3b22f37119 | ||
|
|
9f8301ae1a |
28
.ccls
Normal file
28
.ccls
Normal file
@@ -0,0 +1,28 @@
|
||||
clang
|
||||
%h --include=makeint.h
|
||||
-DHAVE_CONFIG_H
|
||||
-Isrc
|
||||
-Ilib
|
||||
-DLIBDIR="/usr/local/lib"
|
||||
-DINCLUDEDIR="/usr/local/include"
|
||||
-DLOCALEDIR="/usr/local/share/locale"
|
||||
-DMAKE_MAINTAINER_MODE
|
||||
-pthread
|
||||
-isystem
|
||||
/usr/include/guile/2.0
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wno-address
|
||||
-Wwrite-strings
|
||||
-Wshadow
|
||||
-Wdeclaration-after-statement
|
||||
-Wbad-function-cast
|
||||
-Wformat-security
|
||||
-Wtype-limits
|
||||
-Wunused-but-set-parameter
|
||||
-Wlogical-op
|
||||
-Wpointer-arith
|
||||
-Wignored-qualifiers
|
||||
-Wformat-signedness
|
||||
-Wduplicated-cond
|
||||
21
.dir-locals.el
Normal file
21
.dir-locals.el
Normal file
@@ -0,0 +1,21 @@
|
||||
(
|
||||
(nil . ((bug-reference-bug-regexp . "\\(\\)\\bSV[- ]\\([0-9]+\\)")
|
||||
(bug-reference-url-format . "https://savannah.gnu.org/bugs/?%s")
|
||||
(ccls-initialization-options
|
||||
. (:index (:threads 6
|
||||
:initialBlacklist ["/make-[0-9]" "tests/work/" "/\\.deps"
|
||||
"/\\..*cache" "/\\.git"])))
|
||||
(lsp-file-watch-ignored-directories
|
||||
. ("[/\\\\]\\.git$"
|
||||
"[/\\\\]\\..*cache$"
|
||||
;; autotools content
|
||||
"[/\\\\]\\.deps$"
|
||||
"[/\\\\]autom4te\\.cache$"
|
||||
"[/\\\\]build-aux$"
|
||||
;; make-specific content
|
||||
"[/\\\\]doc[/\\\\]manual$"
|
||||
"[/\\\\]tests[/\\\\]work$"
|
||||
"[/\\\\]make-[0-9]"))
|
||||
))
|
||||
(c-mode . ((c-file-style . "gnu")))
|
||||
)
|
||||
76
.gitignore
vendored
Normal file
76
.gitignore
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
# Development artifacts
|
||||
ID
|
||||
TAGS
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
.*cache
|
||||
.*gdbinit
|
||||
.gdb_history
|
||||
.vscode
|
||||
*~
|
||||
#*
|
||||
.#*
|
||||
*.diff
|
||||
*.patch
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
# Configure artifacts
|
||||
/lib/
|
||||
/m4/
|
||||
ABOUT-NLS
|
||||
INSTALL
|
||||
Makefile
|
||||
Makefile.in
|
||||
Basic.mk
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
build-aux/
|
||||
config.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
/mk/Posix.mk
|
||||
stamp-*
|
||||
.dirstamp
|
||||
gnulib
|
||||
convert.sed
|
||||
|
||||
# Build artifacts
|
||||
.deps/
|
||||
gmk-default.h
|
||||
loadavg
|
||||
make
|
||||
*.i
|
||||
*.o
|
||||
*.a
|
||||
*.exe
|
||||
*.dll.a
|
||||
*.obj
|
||||
*.lib
|
||||
*.pdb
|
||||
*.sbr
|
||||
|
||||
# Windows build artifacts
|
||||
WinDebug/
|
||||
WinRel/
|
||||
GccDebug/
|
||||
GccRel/
|
||||
|
||||
# Test artifacts
|
||||
makeerror-*.tar.gz
|
||||
test-suite.log
|
||||
|
||||
# Distribution artifacts
|
||||
.dep_segment
|
||||
.check-git-HEAD
|
||||
ChangeLog
|
||||
README
|
||||
build.cfg
|
||||
mkconfig.h
|
||||
make-[0-9]*/
|
||||
make-[0-9]*.tar.*
|
||||
checkcfg.*.log
|
||||
122
AUTHORS
Normal file
122
AUTHORS
Normal file
@@ -0,0 +1,122 @@
|
||||
-----------------------------------
|
||||
|
||||
GNU Make development starting with GNU Make 3.76 by:
|
||||
Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
Additional development starting with GNU Make 4.3 by:
|
||||
Dmitry Goncharov <dgoncharov@users.sf.net>
|
||||
|
||||
Additional development starting with GNU Make 3.81 by:
|
||||
Boris Kolpackov <boris@kolpackov.net>
|
||||
|
||||
GNU Make development up to version 3.75 by:
|
||||
Roland McGrath <roland@gnu.org>
|
||||
|
||||
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-Windows (native/MinGW) maintained by:
|
||||
Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
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@gnu.org>
|
||||
Jonathan Grant <jg@jguk.org>
|
||||
Andreas Beuning <andreas.buening@nexgo.de>
|
||||
Earnie Boyd <earnie@uses.sf.net>
|
||||
Troy Runkel <Troy.Runkel@mathworks.com>
|
||||
Juan M. Guerrero <juan.guerrero@gmx.de>
|
||||
|
||||
-----------------------------------
|
||||
Other contributors:
|
||||
|
||||
Luke Allardyce <lukeallardyce@gmail.com>
|
||||
Aron Barath <baratharon@caesar.elte.hu>
|
||||
David Boyce <dsb@boyski.com>
|
||||
Kevin Buettner <kevinb@redhat.com>
|
||||
Janet Carson <janet_carson@tivoli.com>
|
||||
Howard Chu <hyc@highlandsun.com>
|
||||
Ludovic Courtès <ludo@gnu.org>
|
||||
Joe Crayne <oh.hello.joe@gmail.com>
|
||||
Jeremy Devenport <jeremy.devenport@gmail.com>
|
||||
Pete Dietl <petedietl@gmail.com>
|
||||
Martin Dorey <martin.dorey@hds.com>
|
||||
Christian Eggers <ceggers@arri.de>
|
||||
Paul Eggert <eggert@twinsun.com>
|
||||
Mike Frysinger <vapier@gentoo.org>
|
||||
Ramon Garcia Fernandez <ramon.garcia.f@gmail.com>
|
||||
Noah Goldstein <goldstein.w.n@gmail.com>
|
||||
Mike Haboustak <haboustak@gmail.com>
|
||||
Frank Heckenbach <f.heckenbach@fh-soft.de>
|
||||
Klaus Heinz <kamar@ease.rhein-main.de>
|
||||
Ben Hutchings <ben@decadent.org.uk>
|
||||
Cao jin <caoj.fnst@cn.fujitsu.com>
|
||||
Michael Joosten
|
||||
Christian Jullien <eligis@orange.fr>
|
||||
Jim Kelton <jim_kelton@tivoli.com>
|
||||
Kaz Kylheku <kaz@kylheku.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>
|
||||
Han-Wen Nienhuys <hanwen@cs.uu.nl>
|
||||
Enrique Olaizola <enrique_olaizola16@hotmail.com>
|
||||
Ola Olsson <ola1olsson@gmail.com>
|
||||
Jens Rehsack <sno@netbsd.org>
|
||||
Thomas Riedl <thomas.riedl@siemens.com>
|
||||
Jaak Ristioja <jaak@ristioja.ee>
|
||||
Christoph Schulz <develop@kristov.de>
|
||||
Andreas Schwab <schwab@suse.de>
|
||||
spagoveanu <spagoveanu@gmail.com>
|
||||
Carl Staelin (Princeton University)
|
||||
Ian Stewartson (Data Logic Limited)
|
||||
Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Sergei Trofimovich <siarheit@google.com>
|
||||
Marc Ullman <marc@mathworks.com>
|
||||
Christof Warlich <cwarlich@gmx.de>
|
||||
Florian Weimer <fweimer@redhat.com>
|
||||
David A. Wheeler <dwheeler@dwheeler.com>
|
||||
Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||
Ben Wijen <ben@wijen.net>
|
||||
Jouke Witteveen <j.witteveen@gmail.com>
|
||||
|
||||
With suggestions/comments/bug reports from a cast of ... well ...
|
||||
hundreds, anyway :)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2022 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 <https://www.gnu.org/licenses/>.
|
||||
133
Basic.mk.template
Normal file
133
Basic.mk.template
Normal file
@@ -0,0 +1,133 @@
|
||||
# Basic GNU -*-Makefile-*- to build GNU make
|
||||
#
|
||||
# NOTE:
|
||||
# If you have no 'make' program at all to process this makefile:
|
||||
# * On Windows, run ".\buildw32.bat" to bootstrap one.
|
||||
# * On MS-DOS, run ".\builddos.bat" to bootstrap one.
|
||||
#
|
||||
# Once you have a GNU make program created, you can use it with this makefile
|
||||
# to keep it up to date if you make changes, as:
|
||||
#
|
||||
# make.exe -f Basic.mk
|
||||
#
|
||||
# Copyright (C) 2017-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
all:
|
||||
|
||||
src = src/
|
||||
lib = lib/
|
||||
|
||||
make_SOURCES = %make_SOURCES%
|
||||
glob_SOURCES = %glob_SOURCES%
|
||||
loadavg_SOURCES = %loadavg_SOURCES%
|
||||
alloca_SOURCES = %alloca_SOURCES%
|
||||
w32_SOURCES = %w32_SOURCES%
|
||||
vms_SOURCES = %vms_SOURCES%
|
||||
amiga_SOURCES = %amiga_SOURCES%
|
||||
|
||||
remote_SOURCES = $(src)remote-stub.c
|
||||
|
||||
OUTDIR =
|
||||
SRCDIR = .
|
||||
|
||||
OBJEXT = o
|
||||
EXEEXT =
|
||||
|
||||
PREFIX = /usr/local
|
||||
INCLUDEDIR = $(PREFIX)/include
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
LOCALEDIR = $(PREFIX)/share
|
||||
|
||||
PROG = $(OUTDIR)make$(EXEEXT)
|
||||
|
||||
prog_SOURCES = $(make_SOURCES) $(remote_SOURCES)
|
||||
|
||||
BUILT_SOURCES =
|
||||
|
||||
OBJECTS = $(patsubst %.c,$(OUTDIR)%.$(OBJEXT),$(prog_SOURCES))
|
||||
|
||||
OBJDIRS = $(addsuffix .,$(sort $(dir $(OBJECTS))))
|
||||
|
||||
# Use the default value of CC
|
||||
LD = $(CC)
|
||||
|
||||
# Reserved for command-line override
|
||||
CPPFLAGS =
|
||||
CFLAGS = -g -O2
|
||||
LDFLAGS =
|
||||
|
||||
extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(OUTDIR)lib -I$(SRCDIR)/lib \
|
||||
-DLIBDIR=\"$(LIBDIR)\" -DINCLUDEDIR=\"$(INCLUDEDIR)\" -DLOCALEDIR=\"$(LOCALDIR)\"
|
||||
extra_CFLAGS =
|
||||
extra_LDFLAGS = $(extra_CFLAGS) $(CFLAGS)
|
||||
|
||||
C_SOURCE = -c
|
||||
OUTPUT_OPTION = -o $@
|
||||
LINK_OUTPUT = -o $@
|
||||
|
||||
# Command lines
|
||||
|
||||
# $(call COMPILE.cmd,<src>,<tgt>)
|
||||
COMPILE.cmd = $(CC) $(extra_CFLAGS) $(CFLAGS) $(extra_CPPFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OUTPUT_OPTION) $(C_SOURCE) $1
|
||||
|
||||
# $(call LINK.cmd,<objectlist>)
|
||||
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $1 $(LDLIBS) $(LINK_OUTPUT)
|
||||
|
||||
# $(CHECK.cmd) $(CHECK.args)
|
||||
CHECK.cmd = cd $(SRCDIR)/tests && ./run_make_tests -make $(shell cd $(<D) && pwd)/$(<F)
|
||||
CHECK.args ?=
|
||||
|
||||
# $(call MKDIR.cmd,<dirlist>)
|
||||
MKDIR.cmd = mkdir -p $1
|
||||
|
||||
# $(call RM.cmd,<filelist>)
|
||||
RM.cmd = rm -f $1
|
||||
|
||||
# $(call CP.cmd,<from>,<to>)
|
||||
CP.cmd = cp $1 $2
|
||||
|
||||
CLEANSPACE = $(call RM.cmd,$(OBJECTS) $(PROG) $(BUILT_SOURCES))
|
||||
|
||||
# Load overrides for the above variables.
|
||||
include $(firstword $(wildcard $(SRCDIR)/mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk)))
|
||||
|
||||
VPATH = $(SRCDIR)
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
$(PROG): $(OBJECTS)
|
||||
$(call LINK.cmd,$^)
|
||||
|
||||
$(OBJECTS): $(OUTDIR)%.$(OBJEXT): %.c
|
||||
$(call COMPILE.cmd,$<)
|
||||
|
||||
$(OBJECTS): | $(OBJDIRS) $(BUILT_SOURCES)
|
||||
|
||||
$(OBJDIRS):
|
||||
$(call MKDIR.cmd,$@)
|
||||
|
||||
check:
|
||||
$(CHECK.cmd) $(CHECK.args)
|
||||
|
||||
clean:
|
||||
$(CLEANSPACE)
|
||||
|
||||
$(filter %.h,$(BUILT_SOURCES)): %.h : %.in.h
|
||||
$(call RM.cmd,$@)
|
||||
$(call CP.cmd,$<,$@)
|
||||
|
||||
.PHONY: all check clean
|
||||
674
COPYING
Normal file
674
COPYING
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
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.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
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.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
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
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
4997
ChangeLog.1
Normal file
4997
ChangeLog.1
Normal file
File diff suppressed because it is too large
Load Diff
6653
ChangeLog.2
Normal file
6653
ChangeLog.2
Normal file
File diff suppressed because it is too large
Load Diff
5633
ChangeLog.3
Normal file
5633
ChangeLog.3
Normal file
File diff suppressed because it is too large
Load Diff
213
Makefile.am
Normal file
213
Makefile.am
Normal file
@@ -0,0 +1,213 @@
|
||||
# This is a -*-Makefile-*-, or close enough
|
||||
#
|
||||
# Copyright (C) 1997-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
AUTOMAKE_OPTIONS = dist-lzip silent-rules std-options subdir-objects nostdinc
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
MAKE_HOST = @MAKE_HOST@
|
||||
|
||||
SUBDIRS = lib po doc
|
||||
|
||||
bin_PROGRAMS = make
|
||||
include_HEADERS = src/gnumake.h
|
||||
|
||||
man_MANS = doc/make.1
|
||||
|
||||
make_SRCS = src/ar.c src/arscan.c src/commands.c src/commands.h \
|
||||
src/debug.h src/default.c src/dep.h src/dir.c src/expand.c \
|
||||
src/file.c src/filedef.h src/function.c src/getopt.c \
|
||||
src/getopt.h src/getopt1.c src/gettext.h src/guile.c \
|
||||
src/hash.c src/hash.h src/implicit.c src/job.c src/job.h \
|
||||
src/load.c src/loadapi.c src/main.c src/makeint.h src/misc.c \
|
||||
src/os.h src/output.c src/output.h src/read.c src/remake.c \
|
||||
src/rule.c src/rule.h src/shuffle.h src/shuffle.c \
|
||||
src/signame.c src/strcache.c src/variable.c src/variable.h \
|
||||
src/version.c src/vpath.c
|
||||
|
||||
w32_SRCS = src/w32/pathstuff.c src/w32/w32os.c src/w32/compat/dirent.c \
|
||||
src/w32/compat/posixfcn.c src/w32/include/dirent.h \
|
||||
src/w32/include/dlfcn.h src/w32/include/pathstuff.h \
|
||||
src/w32/include/sub_proc.h src/w32/include/w32err.h \
|
||||
src/w32/subproc/misc.c src/w32/subproc/proc.h \
|
||||
src/w32/subproc/sub_proc.c src/w32/subproc/w32err.c
|
||||
|
||||
vms_SRCS = src/vms_exit.c src/vms_export_symbol.c src/vms_progname.c \
|
||||
src/vmsdir.h src/vmsfunctions.c src/vmsify.c
|
||||
|
||||
amiga_SRCS = src/amiga.c src/amiga.h
|
||||
|
||||
glob_SRCS = lib/fnmatch.c lib/fnmatch.h lib/glob.c lib/glob.h
|
||||
|
||||
alloca_SRCS = lib/alloca.c
|
||||
|
||||
loadavg_SRCS = lib/getloadavg.c
|
||||
|
||||
make_SOURCES = $(make_SRCS)
|
||||
EXTRA_make_SOURCES = $(amiga_SRCS) $(vms_SRCS)
|
||||
|
||||
if HAVE_GUILE
|
||||
_GUILE_CFLAGS = $(GUILE_CFLAGS)
|
||||
_GUILE_LIBS = $(GUILE_LIBS)
|
||||
else
|
||||
_GUILE_CFLAGS =
|
||||
_GUILE_LIBS =
|
||||
endif
|
||||
|
||||
make_LDADD = $(LIBOBJS) $(_GUILE_LIBS) lib/libgnu.a $(GETLOADAVG_LIBS) \
|
||||
@LIBINTL@
|
||||
|
||||
localedir = $(datadir)/locale
|
||||
|
||||
AM_CPPFLAGS = -Isrc -I$(top_srcdir)/src -Ilib -I$(top_srcdir)/lib \
|
||||
-DLIBDIR=\"$(libdir)\" -DLOCALEDIR=\"$(localedir)\"
|
||||
|
||||
# If prefix is not a standard location, look in prefix as well
|
||||
if !KNOWN_PREFIX
|
||||
AM_CPPFLAGS += -DINCLUDEDIR=\"$(includedir)\"
|
||||
endif
|
||||
|
||||
AM_CFLAGS = $(_GUILE_CFLAGS)
|
||||
|
||||
if WINDOWSENV
|
||||
make_SOURCES += $(w32_SRCS)
|
||||
AM_CPPFLAGS += -I $(top_srcdir)/src/w32/include
|
||||
else
|
||||
make_SOURCES += src/posixos.c
|
||||
endif
|
||||
|
||||
if USE_CUSTOMS
|
||||
make_SOURCES += src/remote-cstms.c
|
||||
else
|
||||
make_SOURCES += src/remote-stub.c
|
||||
endif
|
||||
|
||||
# Extra stuff to include in the distribution.
|
||||
|
||||
mk_FILES = Basic.mk mk/msdosdjgpp.mk mk/Amiga.mk mk/VMS.mk mk/Windows32.mk
|
||||
# We don't need this, since the standard automake output will do.
|
||||
#mk/Posix.mk.in
|
||||
|
||||
m4_FILES = m4/gnulib-cache.m4
|
||||
|
||||
test_FILES = tests/run_make_tests tests/run_make_tests.bat \
|
||||
tests/run_make_tests.pl tests/test_driver.pl \
|
||||
tests/config-flags.pm.in tests/config_flags_pm.com \
|
||||
tests/config-flags.pm.W32 \
|
||||
tests/mkshadow tests/thelp.pl tests/guile.supp tests/README
|
||||
# test/scripts are added via dist-hook below.
|
||||
|
||||
EXTRA_DIST = ChangeLog INSTALL README build.sh build.cfg.in $(man_MANS) \
|
||||
src/mkconfig.h README.customs README.OS2 \
|
||||
README.Amiga SCOPTIONS src/config.ami \
|
||||
README.DOS builddos.bat src/configh.dos \
|
||||
README.W32 build_w32.bat src/config.h.W32 \
|
||||
README.VMS makefile.com src/config.h-vms src/vmsjobs.c \
|
||||
vms_export_symbol_test.com \
|
||||
src/gmk-default.scm src/gmk-default.h \
|
||||
$(mk_FILES) $(m4_FILES) $(test_FILES)
|
||||
|
||||
# --------------- Generate the Guile default module content
|
||||
|
||||
src/guile.$(OBJEXT): src/gmk-default.h
|
||||
src/gmk-default.h: $(top_srcdir)/src/gmk-default.scm
|
||||
(echo 'static const char *const GUILE_module_defn = " '\\ \
|
||||
&& sed -e 's/;.*//' -e '/^[ \t]*$$/d' -e 's/"/\\"/g' -e 's/$$/ \\/' \
|
||||
$(top_srcdir)/src/gmk-default.scm \
|
||||
&& echo '";') > src/gmk-default.h
|
||||
|
||||
# --------------- Local DIST Section
|
||||
|
||||
# Install the mk and tests subdirectories
|
||||
#
|
||||
dist-hook:
|
||||
(cd $(top_srcdir); \
|
||||
sub=`find tests/scripts -follow \( -name .git -o -name .deps -o -name work -o -name .gitignore -o -name \*.orig -o -name \*.rej -o -name \*~ -o -name \*.out -o -name Makefile \) -prune -o -type f -print`; \
|
||||
$(AMTAR) chf - $$sub) \
|
||||
| (cd $(distdir); $(AMTAR) xfBp -)
|
||||
|
||||
|
||||
# --------------- Local CHECK Section
|
||||
|
||||
check-local: check-regression
|
||||
@banner=" Regression PASSED: $(PACKAGE_STRING) ($(MAKE_HOST)) built with $(CC) "; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
echo
|
||||
|
||||
# > 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 =
|
||||
|
||||
.PHONY: check-regression
|
||||
|
||||
GMK_OUTDIR = ..
|
||||
|
||||
testlog = test-suite.log
|
||||
testresult = tests/.test-result
|
||||
errorfile = makeerror-$(host_triplet).tar.gz
|
||||
|
||||
testfiles = $(testlog) $(testresult) $(errorfile)
|
||||
MOSTLYCLEANFILES = $(testfiles)
|
||||
|
||||
errordetails = config.status config.log src/config.h $(testlog) tests/work
|
||||
|
||||
check-regression: tests/config-flags.pm
|
||||
@rm -f $(testfiles)
|
||||
@if test -f '$(top_srcdir)/tests/run_make_tests'; then \
|
||||
ulimit -n 128; \
|
||||
if $(PERL) -v >/dev/null 2>&1; then \
|
||||
case `cd '$(top_srcdir)'; pwd` in `pwd`) : ;; \
|
||||
*) test -d tests || mkdir tests; \
|
||||
rm -f srctests; \
|
||||
if ln -s '$(top_srcdir)/tests' srctests; then \
|
||||
for f in run_make_tests run_make_tests.pl test_driver.pl scripts thelp.pl; do \
|
||||
rm -f tests/$$f; ln -s ../srctests/$$f tests; \
|
||||
done; fi ;; \
|
||||
esac; \
|
||||
echo "cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir $(abs_top_srcdir) -make $(GMK_OUTDIR)/make$(EXEEXT) $(MAKETESTFLAGS)"; \
|
||||
(cd tests && $(PERL) $(PERLFLAGS) ./run_make_tests.pl -srcdir '$(abs_top_srcdir)' -make '$(GMK_OUTDIR)/make$(EXEEXT)' $(MAKETESTFLAGS); echo $$? >.test-result) 2>&1 | tee $(testlog); \
|
||||
er=$$(cat $(testresult)); if test "$$er" -ne 0; then \
|
||||
$(AMTAR) chf - $(errordetails) | eval GZIP= gzip $(GZIP_ENV) -c >$(errorfile); \
|
||||
echo '*** Testing failed! Details saved in: $(errorfile)'; \
|
||||
echo '*** Please report to <$(PACKAGE_BUGREPORT)>'; echo; \
|
||||
exit $$er; \
|
||||
fi; \
|
||||
else \
|
||||
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
|
||||
fi; \
|
||||
else \
|
||||
echo "Can't find the $(PACKAGE_NAME) test suite ($(top_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 Git
|
||||
# distribution).
|
||||
|
||||
README:
|
||||
|
||||
@MAINT_MAKEFILE@
|
||||
80
README.Amiga
Normal file
80
README.Amiga
Normal file
@@ -0,0 +1,80 @@
|
||||
Short: Port of GNU Make with SAS/C (no ixemul.library required)
|
||||
Author: GNU, Amiga port by Aaron "Optimizer" Digulla
|
||||
Uploader: Aaron "Optimizer" Digulla (digulla@fh-konstanz.de)
|
||||
Type: dev/c
|
||||
|
||||
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
|
||||
GNU Make):
|
||||
|
||||
- Runs Amiga-Commands with SystemTags() (Execute)
|
||||
- Can run multi-line statements
|
||||
- Allows to use Device-Names in targets:
|
||||
|
||||
c:make : make.o
|
||||
|
||||
is ok. To distinguish between device-names and target : or ::, MAKE
|
||||
looks for spaces. If there are any around :, it's taken as a target
|
||||
delimiter, if there are none, it's taken as the name of a device. Note
|
||||
that "make:make.o" tries to create "make.o" on the device "make:".
|
||||
- Replaces @@ by a newline in any command line:
|
||||
|
||||
if exists make @@\
|
||||
delete make.bak quiet @@\
|
||||
rename make make.bak @@\
|
||||
endif @@\
|
||||
$(CC) Link Make.o To make
|
||||
|
||||
works. Note that the @@ must stand alone (i.e., "make@@\" is illegal).
|
||||
Also be careful that there is a space after the "\" (i.e., at the
|
||||
beginning of the next line).
|
||||
- Can be made resident to save space and time
|
||||
- Amiga specific wildcards can be used in $(wildcard ...)
|
||||
|
||||
BUGS:
|
||||
- The line
|
||||
|
||||
dummy.h : src/*.c
|
||||
|
||||
tries to make dummy.h from "src/*.c" (i.e., no wildcard-expansion takes
|
||||
place). You have to use "$(wildcard src/*.c)" instead.
|
||||
|
||||
COMPILING FROM SCRATCH
|
||||
----------------------
|
||||
|
||||
To recompile, you need SAS/C 6.51.
|
||||
|
||||
As of GNU Make 4.3, the build environment has been cleaned up and alternate
|
||||
make files (including smakefiles) have been removed. If you have an existing
|
||||
version of GNU Make available you _should_ be able to run:
|
||||
|
||||
make -f Basic.mk
|
||||
|
||||
However this is untested.
|
||||
|
||||
If you have an Amiga system and would like to collaborate on getting
|
||||
bootstrapping to work properly please contact bug-make@gnu.org.
|
||||
|
||||
INSTALLATION
|
||||
|
||||
Copy make somewhere in your search path (e.g., sc:c or sc:bin).
|
||||
If you plan to use recursive makes, install make resident:
|
||||
|
||||
Resident make Add
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1995-2022 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 <https://www.gnu.org/licenses/>.
|
||||
296
README.DOS
Normal file
296
README.DOS
Normal file
@@ -0,0 +1,296 @@
|
||||
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 "check:" 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. If you have a working Make already, you can run:
|
||||
|
||||
make -f Basic.mk
|
||||
|
||||
3. If you don't have a working Make already you can bootstrap one
|
||||
by running:
|
||||
|
||||
.\builddos.bat
|
||||
|
||||
4. If you are building from outside of the source directory, you
|
||||
need to tell Make where the sources are, like this:
|
||||
|
||||
make -f c:/djgpp/gnu/make/Basic.mk SRCDIR=c:/djgpp/gnu/make
|
||||
|
||||
or:
|
||||
|
||||
c:/djgpp/gnu/make/builddos.bat c:/djgpp/gnu/make
|
||||
|
||||
5. 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.
|
||||
|
||||
6. To install copy make.exe to the preferred location.
|
||||
|
||||
Since GNU Make 4.3, support for customized platform installations
|
||||
has been removed. If you'd like to collaborate on reinstating
|
||||
these capabilities, contact bug-make@gnu.org.
|
||||
|
||||
|
||||
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-2022 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 <https://www.gnu.org/licenses/>.
|
||||
176
README.OS2
Normal file
176
README.OS2
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
|
||||
https://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 interprets 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-2022 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 <https://www.gnu.org/licenses/>.
|
||||
515
README.VMS
Normal file
515
README.VMS
Normal file
@@ -0,0 +1,515 @@
|
||||
Overview: -*-text-mode-*-
|
||||
---------
|
||||
|
||||
This version of GNU Make has been tested on:
|
||||
OpenVMS V8.3/V8.4 (Alpha) and V8.4 (Integrity) AND V7.3 (VAX)
|
||||
|
||||
This version of GNU Make is intended to be run from DCL to run
|
||||
make scripts with a special syntax that is described below. It
|
||||
likely will not be able to run unmodified Unix makefiles.
|
||||
|
||||
There is an older implementation of GNU Make that was ported to GNV.
|
||||
Work is now in progress to merge that port to get a single version
|
||||
of GNU Make available. When that merge is done, GNU Make will auto
|
||||
detect that it is running under a POSIX shell and then operate as close to
|
||||
GNU Make on Unix as possible.
|
||||
|
||||
The descriptions below are for running GNU Make from DCL or equivalent.
|
||||
|
||||
Recipe differences:
|
||||
-------------------
|
||||
|
||||
GNU Make for OpenVMS can not currently run native Unix make files because of
|
||||
differences in the implementation.
|
||||
|
||||
I am trying to document the current behavior in this section. This is based
|
||||
on the information in the file NEWS. and running the test suite.
|
||||
TODO: More tests are needed to validate and demonstrate the OpenVMS
|
||||
expected behavior.
|
||||
|
||||
In some cases the older behavior of GNU Make when run from DCL is not
|
||||
compatible with standard makefile behavior.
|
||||
|
||||
This behavior can be changed when running GNU Make from DCL by setting
|
||||
either DCL symbols or logical names of the format GNV$. The settings
|
||||
are enabled with a string starting with one of '1', 'T', or 'E' for "1",
|
||||
"TRUE", or "ENABLE". They are disabled with a '0', 'F', or 'D' for "1",
|
||||
"FALSE", or "DISABLE". If they are not explicitly set to one of these
|
||||
values, then they will be set to their default values.
|
||||
|
||||
The value of the setting DECC$FILENAME_UNIX_REPORT or
|
||||
DECC$FILENAME_UNIX_ONLY will now cause the $(dir x) function to return
|
||||
'./' or '[]' as appropriate.
|
||||
|
||||
The name GNV$MAKE_OLD_VMS when enabled will cause GNU Make to behave as
|
||||
much as the older method as can be done with out disabling VMS features.
|
||||
When it is disabled GNU Make have the new behavior which more closely
|
||||
matches Unix Make behavior.
|
||||
|
||||
The default is currently the old behavior when running GNU Make from DCL.
|
||||
In the future this may change. When running make from GNV Bash the new
|
||||
behavior is the default.
|
||||
|
||||
This is a global setting that sets the default behavior for several other
|
||||
options that can be individually changed. Many of the individual settings
|
||||
are to make it so that the self tests for GNU Make need less VMS specific
|
||||
modifications.
|
||||
|
||||
The name GNV$MAKE_COMMA when enabled will cause GNU Make to expect a comma
|
||||
for a path separator and use a comma for the separator for a list of files.
|
||||
When disabled, it will cause GNU Make to use a colon for a path separator
|
||||
and a space for the separator for a list of files. The default is to be
|
||||
enabled if the GNU Make is set to the older behavior.
|
||||
|
||||
The name GNV$MAKE_SHELL_SIM when enabled will cause GNU Make to try to
|
||||
simulate a POSIX shell more closely. The following behaviors occur:
|
||||
|
||||
* Single quotes are converted to double quotes and any double
|
||||
quotes inside of them are doubled. No environment variable expansion
|
||||
is simulated.
|
||||
* A exit command status will be converted to a POSIX Exit
|
||||
where 0 is success and non-zero is failure.
|
||||
* The $ character will cause environment variable expansion.
|
||||
* Environment variables can be set on the command line before a command.
|
||||
|
||||
VMS generally uses logical name search lists instead of path variables
|
||||
where the resolution is handled by VMS independent of the program. Which
|
||||
means that it is likely that nothing will notice if the default path
|
||||
specifier is changed in the future.
|
||||
|
||||
Currently the built in VMS specific macros and recipes depend on the comma
|
||||
being used as a file list separator.
|
||||
TODO: Remove this dependency as other functions in GNU Make depend on a
|
||||
space being used as a separator.
|
||||
|
||||
The format for recipes are a combination of Unix macros, a subset of
|
||||
simulated UNIX commands, some shell emulation, and OpenVMS commands.
|
||||
This makes the resulting makefiles unique to the OpenVMS port of GNU Make.
|
||||
|
||||
If you are creating a OpenVMS specific makefile from scratch, you should also
|
||||
look at MMK (Madgoat Make) available at https://github.com/endlesssoftware/mmk
|
||||
MMK uses full OpenVMS syntax and a persistent sub-process is used for the
|
||||
recipe lines, allowing multiple line rules.
|
||||
|
||||
The default makefile search order is "makefile.vms", "gnumakefile",
|
||||
"makefile". TODO: See if that lookup is case sensitive.
|
||||
|
||||
When Make is invoked from DCL, it will create a foreign command
|
||||
using the name of executable image, with any facility prefix removed,
|
||||
for the duration of the make program, so it can be used internally
|
||||
to recursively run make(). The macro MAKE_COMMAND will be set to
|
||||
this foreign command.
|
||||
|
||||
When make is launched from an exec*() command from a C program,
|
||||
the foreign command is not created. The macro MAKE_COMMAND will be
|
||||
set to the actual command passed as argv[0] to the exec*() function.
|
||||
|
||||
If the DCL symbol or logical name GNV$MAKE_USE_MCR exists, then
|
||||
the macro MAKE_COMMAND will be set to be an "MCR" command with the
|
||||
absolute path used by DCL to launch make. The foreign command
|
||||
will not be created.
|
||||
|
||||
The macro MAKE is set to be the same value as the macro MAKE_COMMAND
|
||||
on all platforms.
|
||||
|
||||
Each recipe command is normally run as a separate spawned processes,
|
||||
except for the cases documented below where a temporary DCL command
|
||||
file may be used.
|
||||
|
||||
BUG: Testing has shown that the commands in the temporary command files
|
||||
are not always created properly. This issue is still under investigation.
|
||||
|
||||
Any macros marked as exported are temporarily created as DCL symbols
|
||||
for child images to use. DCL symbol substitution is not done with these
|
||||
commands.
|
||||
Untested: Symbol substitution.
|
||||
|
||||
When a temporary DCL command file is used, DCL symbol substitution
|
||||
will work.
|
||||
|
||||
For VMS 7.3-1 and earlier, command lines are limited to 255 characters
|
||||
or 1024 characters in a command file.
|
||||
For VMS 7.3-2 and later, command lines are limited to 4059 characters
|
||||
or 8192 characters in a command file.
|
||||
|
||||
VMS limits each token of a command line to 256 characters, and limits
|
||||
a command line to 127 tokens.
|
||||
|
||||
Command lines above the limit length are written to a command file
|
||||
in sys$scratch:.
|
||||
|
||||
In order to handle Unix style extensions to VMS DCL, GNU Make has
|
||||
parsed the recipe commands and them modified them as needed. The
|
||||
parser has been re-written to resolve numerous bugs in handling
|
||||
valid VMS syntax and potential buffer overruns.
|
||||
|
||||
The new parser may need whitespace characters where DCL does not require
|
||||
it, and also may require that quotes are matched were DCL forgives if
|
||||
they are not. There is a small chance that existing VMS specific makefiles
|
||||
will be affected.
|
||||
|
||||
The '<', '>' was previously implemented using command files. Now
|
||||
GNU Make will check to see if the is already a VMS "PIPE" command and
|
||||
if it is not, will convert the command to a VMS "PIPE" command.
|
||||
|
||||
The '>>' redirection has been implemented by using a temporary command file.
|
||||
This will be described later.
|
||||
|
||||
The DCL symbol or logical name GNV$MAKE_USE_CMD_FILE when set to a
|
||||
string starting with one of '1','T', or 'E' for "1", "TRUE", or "ENABLE",
|
||||
then temporary DCL command files are always used for running commands.
|
||||
|
||||
Some recipe strings with embedded new lines will not be handled correctly
|
||||
when a command file is used.
|
||||
|
||||
GNU Make generally does text comparisons for the targets and sources. The
|
||||
make program itself can handle either Unix or OpenVMS format filenames, but
|
||||
normally does not do any conversions from one format to another.
|
||||
TODO: The OpenVMS format syntax handling is incomplete.
|
||||
TODO: ODS-5 EFS support is missing.
|
||||
BUG: The internal routines to convert filenames to and from OpenVMS format
|
||||
do not work correctly.
|
||||
|
||||
Note: In the examples below, line continuations such as a backslash may have
|
||||
been added to make the examples easier to read in this format.
|
||||
BUG: That feature does not completely work at this time.
|
||||
|
||||
Since the OpenVMS utilities generally expect OpenVMS format paths, you will
|
||||
usually have to use OpenVMS format paths for rules and targets.
|
||||
BUG: Relative OpenVMS paths may not work in targets, especially combined
|
||||
with vpaths. This is because GNU Make will just concatenate the directories
|
||||
as it does on Unix.
|
||||
|
||||
The variables $^ and $@ separate files with commas instead of spaces.
|
||||
This is controlled by the name GNV$MAKE_COMMA as documented in the
|
||||
previous section.
|
||||
|
||||
While this may seem the natural thing to do with OpenVMS, it actually
|
||||
causes problems when trying to use other make functions that expect the
|
||||
files to be separated by spaces. If you run into this, you need the
|
||||
following workaround to convert the output.
|
||||
TODO: Look at have the $^ and $@ use spaces like on Unix and have
|
||||
and easy to use function to do the conversions and have the built
|
||||
in OpenVMS specific recipes and macros use it.
|
||||
|
||||
Example:
|
||||
|
||||
comma := ,
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
foo: $(addsuffix .3,$(subs $(comma),$(space),$^)
|
||||
|
||||
|
||||
Makefile variables are looked up in the current environment. You can set
|
||||
symbols or logicals in DCL and evaluate them in the Makefile via
|
||||
$(<name-of-symbol-or-logical>). Variables defined in the Makefile
|
||||
override OpenVMS symbols/logicals.
|
||||
|
||||
OpenVMS logical and symbols names show up as "environment" using the
|
||||
origin function. when the "-e" option is specified, the origin function
|
||||
shows them as "environment override". On POSIX the test scripts indicate
|
||||
that they should show up just as "environment".
|
||||
|
||||
When GNU Make reads in a symbol or logical name into the environment, it
|
||||
converts any dollar signs found to double dollar signs for convenience in
|
||||
using DCL symbols and logical names in recipes. When GNU Make exports a
|
||||
DCL symbol for a child process, if the first dollar sign found is followed
|
||||
by second dollar sign, then all double dollar signs will be converted to
|
||||
single dollar signs.
|
||||
|
||||
The variable $(ARCH) is predefined as IA64, ALPHA or VAX respectively.
|
||||
Makefiles for different OpenVMS systems can now be written by checking
|
||||
$(ARCH). Since IA64 and ALPHA are similar, usually just a check for
|
||||
VAX or not VAX is sufficient.
|
||||
|
||||
You may have to update makefiles that assume VAX if not ALPHA.
|
||||
|
||||
ifeq ($(ARCH),VAX)
|
||||
$(ECHO) "On the VAX"
|
||||
else
|
||||
$(ECHO) "On the ALPHA or IA64"
|
||||
endif
|
||||
|
||||
Empty commands are handled correctly and don't end in a new DCL process.
|
||||
|
||||
The exit command needs to have OpenVMS exit codes. To pass a POSIX code
|
||||
back to the make script, you need to encode it by multiplying it by 8
|
||||
and then adding %x1035a002 for a failure code and %x1035a001 for a
|
||||
success. Make will interpret any POSIX code other than 0 as a failure.
|
||||
TODO: Add an option have simulate POSIX exit commands in recipes.
|
||||
|
||||
Lexical functions can be used in pipes to simulate shell file test rules.
|
||||
|
||||
Example:
|
||||
|
||||
POSIX:
|
||||
b : c ; [ -f $@ ] || echo >> $@
|
||||
|
||||
OpenVMS:
|
||||
b : c ; if f$$search("$@") then pipe open/append xx $@ ; write xx "" ; close xx
|
||||
|
||||
|
||||
You can also use pipes and turning messages off to silently test for a
|
||||
failure.
|
||||
|
||||
x = %x1035a00a
|
||||
|
||||
%.b : %.c
|
||||
<tab>pipe set mess/nofac/noiden/nosev/notext ; type $^/output=$@ || exit $(x)
|
||||
|
||||
|
||||
Runtime issues:
|
||||
|
||||
The OpenVMS C Runtime has a convention for encoding a POSIX exit status into
|
||||
to OpenVMS exit codes. These status codes will have the hex value of
|
||||
0x35a000. OpenVMS exit code may also have a hex value of %x10000000 set on
|
||||
them. This is a flag to tell DCL not to write out the exit code.
|
||||
|
||||
To convert an OpenVMS encoded POSIX exit status code to the original code
|
||||
You subtract %x35a000 and any flags from the OpenVMS code and divide it by 8.
|
||||
|
||||
WARNING: Backward-incompatibility!
|
||||
The make program exit now returns the same encoded POSIX exit code as on
|
||||
Unix. Previous versions returned the OpenVMS exit status code if that is what
|
||||
caused the recipe to fail.
|
||||
TODO: Provide a way for scripts calling make to obtain that OpenVMS status
|
||||
code.
|
||||
|
||||
Make internally has two error codes, MAKE_FAILURE and MAKE_TROUBLE. These
|
||||
will have the error "-E-" severity set on exit.
|
||||
|
||||
MAKE_TROUBLE is returned only if the option "-q" or "--question" is used and
|
||||
has a POSIX value of 1 and an OpenVMS status of %x1035a00a.
|
||||
|
||||
MAKE_FAILURE has a POSIX value of 2 and an OpenVMS status of %x1035a012.
|
||||
|
||||
Output from GNU Make may have single quotes around some values where on
|
||||
other platforms it does not. Also output that would be in double quotes
|
||||
on some platforms may show up as single quotes on VMS.
|
||||
|
||||
There may be extra blank lines in the output on VMS.
|
||||
https://savannah.gnu.org/bugs/?func=detailitem&item_id=41760
|
||||
|
||||
There may be a "Waiting for unfinished jobs..." show up in the output.
|
||||
|
||||
Error messages generated by Make or Unix utilities may slightly vary from
|
||||
POSIX platforms. Typically the case may be different.
|
||||
|
||||
When make deletes files, on POSIX platforms it writes out 'rm' and the list
|
||||
of files. On VMS, only the files are written out, one per line.
|
||||
TODO: VMS
|
||||
|
||||
There may be extra leading white space or additional or missing whitespace
|
||||
in the output of recipes.
|
||||
|
||||
GNU Make uses sys$scratch: for the tempfiles that it creates.
|
||||
|
||||
The OpenVMS CRTL library maps /tmp to sys$scratch if the TMP: logical name
|
||||
does not exist. As the CRTL may use both sys$scratch: and /tmp internally,
|
||||
if you define the TMP logical name to be different than SYS$SCRATCH:,
|
||||
you may end up with only some temporary files in TMP: and some in SYS$SCRATCH:
|
||||
|
||||
The default include directory for including other makefiles is
|
||||
SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
|
||||
SYS$LIBRARY: instead; maybe it wouldn't work that way).
|
||||
TODO: A better default may be desired.
|
||||
|
||||
If the device for a file in a recipe does not exist, on OpenVMS an error
|
||||
message of "stat: <file>: no such device or address" will be output.
|
||||
|
||||
Make ignores success, informational, or warning errors (-S-, -I-, or
|
||||
-W-). But it will stop on -E- and -F- errors. (unless you do something
|
||||
to override this in your makefile, or whatever).
|
||||
|
||||
|
||||
Unix compatibility features:
|
||||
----------------------------
|
||||
|
||||
If the command 'echo' is seen, any single quotes on the line will be
|
||||
converted to double quotes.
|
||||
|
||||
The variable $(CD) is implemented as a built in Change Directory
|
||||
command. This invokes the 'builtin_cd' Executing a 'set default'
|
||||
recipe doesn't do the trick, since it only affects the sub-process
|
||||
spawned for that command.
|
||||
|
||||
The 'builtin_cd' is generally expected to be on its own line.
|
||||
The 'builtin_cd' either from the expansion of $(CD) or directly
|
||||
put in a recipe line will be executed before any other commands in
|
||||
that recipe line. DCL parameter substitution will not work for the
|
||||
'builtin_cd' command.
|
||||
|
||||
Putting a 'builtin_cd' in a pipeline or an IF-THEN line should not be
|
||||
done because the 'builtin_cd' is always executed
|
||||
and executed first. The directory change is persistent.
|
||||
|
||||
Unix shell style I/O redirection is supported. You can now write lines like:
|
||||
"<tab>mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt"
|
||||
|
||||
POSIX shells have ":" as a null command. These are now handled.
|
||||
https://savannah.gnu.org/bugs/index.php?41761
|
||||
|
||||
A note on appending the redirected output. A simple mechanism is
|
||||
implemented to make ">>" work in action lines. In OpenVMS there is no simple
|
||||
feature like ">>" to have DCL command or program output redirected and
|
||||
appended to a file. GNU Make for OpenVMS implements the redirection
|
||||
of ">>" by using a command procedure.
|
||||
|
||||
The current algorithm creates the output file if it does not exist and
|
||||
then uses the DCL open/append to extend it. SYS$OUTPUT is then directed
|
||||
to that file.
|
||||
|
||||
The implementation supports only one redirected append output to a file
|
||||
and that redirection is done before any other commands in that line
|
||||
are executed, so it redirects all output for that command.
|
||||
|
||||
The older implementation wrote the output to a temporary file in
|
||||
in sys$scratch: and then attempted to append the file to the existing file.
|
||||
The temporary file names looked like "CMDxxxxx.". Any time the created
|
||||
command procedure can not complete, this happens. Pressing CTRL+Y to
|
||||
abort make is one case.
|
||||
|
||||
In case of CTRL+Y the associated command procedure is left in SYS$SCRATCH:.
|
||||
The command procedures will be named gnv$make_cmd*.com.
|
||||
|
||||
The CtrlY handler now uses $delprc to delete all children. This way also
|
||||
actions with DCL commands will be stopped. As before the CtrlY handler
|
||||
then sends SIGQUIT to itself, which is handled in common code.
|
||||
|
||||
Temporary command files are now deleted in the OpenVMS child termination
|
||||
handler. That deletes them even if a CTRL+C was pressed.
|
||||
TODO: Does the previous section about >> leaving files still apply?
|
||||
|
||||
The behavior of pressing CTRL+C is not changed. It still has only an effect,
|
||||
after the current action is terminated. If that doesn't happen or takes too
|
||||
long, CTRL+Y should be used instead.
|
||||
|
||||
|
||||
Build Options:
|
||||
|
||||
Added support to have case sensitive targets and dependencies but to
|
||||
still use case blind file names. This is especially useful for Java
|
||||
makefiles on VMS:
|
||||
|
||||
<TAB>.SUFFIXES :
|
||||
<TAB>.SUFFIXES : .class .java
|
||||
<TAB>.java.class :
|
||||
<TAB><TAB>javac "$<"
|
||||
<TAB>HelloWorld.class : HelloWorld.java
|
||||
|
||||
A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
|
||||
It needs to be enabled to get this feature; default is disabled.
|
||||
TODO: This should be a run-time setting based on if the process
|
||||
has been set to case sensitive.
|
||||
|
||||
|
||||
Unimplemented functionality:
|
||||
|
||||
The new feature "Loadable objects" is not yet supported. If you need it,
|
||||
please send a change request or submit a bug report.
|
||||
|
||||
The new option --output-sync (-O) is accepted but has no effect: GNU Make
|
||||
for OpenVMS does not support running multiple commands simultaneously.
|
||||
|
||||
|
||||
Self test failures and todos:
|
||||
-----------------------------
|
||||
|
||||
The test harness can not handle testing some of the VMS specific modes
|
||||
because of the features needed for to be set for the Perl to run.
|
||||
Need to find a way to set the VMS features before running make as a
|
||||
child.
|
||||
|
||||
GNU Make was not currently translating the OpenVMS encoded POSIX values
|
||||
returned to it back to the POSIX values. I have temporarily modified the
|
||||
Perl test script to compensate for it. This should be being handled
|
||||
internally to Make.
|
||||
TODO: Verify and update the Perl test script.
|
||||
|
||||
The features/parallelism test was failing. OpenVMS is executing the rules
|
||||
in sequence not in parallel as this feature was not implemented.
|
||||
GNU Make on VMS no longer claims it is implemented.
|
||||
TODO: Implement it.
|
||||
|
||||
Symlink support is not present. Symlinks are supported by OpenVMS 8.3 and
|
||||
later.
|
||||
|
||||
Error messages should be suppressed with the "-" at the beginning of a line.
|
||||
On openVMS they were showing up. TODO: Is this still an issue?
|
||||
|
||||
The internal vmsify and unixify OpenVMS to/from UNIX are not handling logical
|
||||
names correctly.
|
||||
|
||||
|
||||
Build instructions:
|
||||
-------------------
|
||||
|
||||
Don't use the HP C V7.2-001 compiler, which has an incompatible change
|
||||
how __STDC__ is defined. This results at least in compile time warnings.
|
||||
|
||||
Make a 1st version
|
||||
$ @makefile.com ! ignore any compiler and/or linker warning
|
||||
$ copy make.exe 1st-make.exe
|
||||
|
||||
Use the 1st version to generate a 2nd version as a test.
|
||||
$ mc sys$disk:[]1st-make clean ! ignore any file not found messages
|
||||
$ mc sys$disk:[]1st-make
|
||||
|
||||
Verify your 2nd version by building Make again.
|
||||
$ copy make.exe 2nd-make.exe
|
||||
$ mc sys$disk:[]2nd-make clean
|
||||
$ mc sys$disk:[]2nd-make
|
||||
|
||||
|
||||
Running the tests:
|
||||
------------------
|
||||
|
||||
Running the tests on OpenVMS requires the following software to be installed
|
||||
as most of the tests are Unix oriented.
|
||||
|
||||
* Perl 5.18 or later.
|
||||
https://sourceforge.net/projects/vmsperlkit/files/
|
||||
* GNV 2.1.3 + Updates including a minimum of:
|
||||
* Bash 4.3.30
|
||||
* ld_tools 3.0.2
|
||||
* coreutils 8.21
|
||||
https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/
|
||||
https://sourceforge.net/projects/gnv/files/
|
||||
|
||||
As the test scripts need to create some foreign commands that persist
|
||||
after the test is run, it is recommend that either you use a sub-process or
|
||||
a dedicated login to run the tests.
|
||||
|
||||
To get detailed information for running the tests:
|
||||
|
||||
$ set default [.tests]
|
||||
$ @run_make_tests help
|
||||
|
||||
Running the script with no parameters will run all the tests.
|
||||
|
||||
After the the test script has been run once in a session, assuming
|
||||
that you built make in sys$disk:[make], you can redefined the
|
||||
"bin" logical name as follows:
|
||||
|
||||
$ define bin sys$disk:[make],gnv$gnu:[bin]
|
||||
|
||||
Then you can use Perl to run the scripts.
|
||||
|
||||
$ perl run_make_tests.pl
|
||||
|
||||
|
||||
Acknowledgments:
|
||||
----------------
|
||||
|
||||
See NEWS. for details of past changes.
|
||||
|
||||
These are the currently known contributors to this port.
|
||||
|
||||
Hartmut Becker
|
||||
John Malmberg
|
||||
Michael Gehre
|
||||
John Eisenbraun
|
||||
Klaus Kaempf
|
||||
Mike Moretti
|
||||
John W. Eaton
|
||||
363
README.W32
Normal file
363
README.W32
Normal file
@@ -0,0 +1,363 @@
|
||||
This version of GNU Make has been tested on:
|
||||
Microsoft Windows 2000/XP/2003/Vista/7/8/10
|
||||
It has also been used on Windows 95/98/NT, and on OS/2.
|
||||
|
||||
It builds with the MinGW port of GCC (tested with GCC 3.4.2, 4.8.1,
|
||||
and 4.9.3).
|
||||
|
||||
It also builds with MSVC 2.x, 4.x, 5.x, 6.x, 2005, 2008, 2010, 2012,
|
||||
2013, and 2015 as well as with .NET 7.x and .NET 2003.
|
||||
|
||||
Building with Guile is supported (tested with Guile 2.0.x). To build
|
||||
with Guile, you will need, in addition to Guile itself, its dependency
|
||||
libraries and the pkg-config program. The latter is used to figure out
|
||||
which compilation and link switches and libraries need to be mentioned
|
||||
on the compiler command lines to correctly link with Guile. A Windows
|
||||
port of pkg-config can be found on ezwinports site:
|
||||
|
||||
https://sourceforge.net/projects/ezwinports/
|
||||
|
||||
The libraries on which Guile depends can vary depending on your
|
||||
version and build of Guile. At the very least, the Boehm's GC library
|
||||
will be needed, and typically also GNU MP, libffi, libunistring, and
|
||||
libtool's libltdl. Whoever built the port of Guile you have should
|
||||
also provide you with these dependencies or a URL where to download
|
||||
them. A precompiled 32-bit Windows build of Guile is available from
|
||||
the ezwinports site mentioned above.
|
||||
|
||||
The Windows port of GNU Make is maintained jointly by various people.
|
||||
It was originally made by Rob Tulloh.
|
||||
It is currently maintained by Eli Zaretskii.
|
||||
|
||||
|
||||
Do this first, regardless of the build method you choose:
|
||||
---------------------------------------------------------
|
||||
|
||||
1. If you have special requirements, edit config.h.W32 to your liking
|
||||
(especially the shell-related defines, or HAVE_CASE_INSENSITIVE_FS which
|
||||
corresponds to './configure --enable-case-insensitive-file-system'). We
|
||||
don't recommend to define HAVE_CASE_INSENSITIVE_FS, but you may wish to
|
||||
consider that if you have a lot of files whose names are in upper case,
|
||||
while Makefile rules are written for lower-case versions.
|
||||
|
||||
If you don't have special requirements no changes are needed.
|
||||
|
||||
|
||||
Building with (MinGW-)GCC using build_w32.bat
|
||||
---------------------------------------------
|
||||
|
||||
2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
|
||||
correct PATH and other environment variables for it, then execute ...
|
||||
|
||||
.\build_w32.bat gcc
|
||||
|
||||
This produces gnumake.exe in the GccRel directory.
|
||||
|
||||
If you want a version of GNU Make built with debugging enabled,
|
||||
add the --debug option. Output goes into the GccDebug 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
|
||||
---------------------------------------------
|
||||
|
||||
2. Open a command shell, then execute ...
|
||||
|
||||
.\build_w32.bat
|
||||
|
||||
This produces a 64bit Release build of gnumake.exe in .\WinRel, using
|
||||
the compiler found on the %Path%. If no compiler is found, the batch
|
||||
file will probe your system and choose the newest MSVC version it can
|
||||
find.
|
||||
|
||||
If you want a 32bit version of GNU Make, add the --x86 option.
|
||||
|
||||
If you want a Debug build of GNU Make, add the --debug option. Output
|
||||
will go into the .\WinDebug directory.
|
||||
|
||||
The batch file will probe for Guile installation, and will build
|
||||
gnumake.exe with Guile if it finds it. If Guile is installed,
|
||||
but you prefer to build GNU Make without Guile support, add the
|
||||
--without-guile option.
|
||||
|
||||
|
||||
Building with (MinGW-)GCC using GNU Make
|
||||
----------------------------------------
|
||||
|
||||
2. If you already have a version of GNU Make available you can use it
|
||||
to build this version. Open a W32 command prompt for your installed
|
||||
(MinGW-)GCC, setup a correct PATH and other environment variables
|
||||
for it, then execute ...
|
||||
|
||||
make -f Basic.mk TOOLCHAIN=gcc
|
||||
|
||||
This produces GccRel\gnumake.exe.
|
||||
If you want a version of GNU Make built with debugging enabled,
|
||||
add the TARGET_TYPE=debug option:
|
||||
|
||||
make -f Basic.mk TOOLCHAIN=gcc TARGET_TYPE=debug
|
||||
|
||||
The makefile doesn't support Guile integration. Use build_w32.bat
|
||||
if you want to build with Guile support.
|
||||
|
||||
|
||||
Building with (MSVC++-)cl using GNU Make
|
||||
----------------------------------------
|
||||
|
||||
2. If you already have a version of GNU Make available you can use it
|
||||
to build this version. 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, or using a corresponding start menu entry from the
|
||||
cl-installation), then execute ...
|
||||
|
||||
make -f Basic.mk
|
||||
|
||||
This produces an optimized WinRel/gnumake.exe.
|
||||
If you want a version of GNU Make built with debugging enabled,
|
||||
add the TARGET_TYPE=debug option:
|
||||
|
||||
make -f Basic.mk TARGET_TYPE=debug
|
||||
|
||||
The makefile doesn't support Guile integration. Use build_w32.bat
|
||||
if you want to build with Guile support.
|
||||
|
||||
|
||||
Running the test suite
|
||||
----------------------
|
||||
|
||||
3. You will need an installation of Perl. Be sure to use a relatively
|
||||
modern version: older versions will sometimes throw spurious errors.
|
||||
|
||||
To run the suite after building using GNU Make, use:
|
||||
|
||||
make -f Basic.mk check
|
||||
|
||||
Alternatively if you'd like to run tests by hand, use:
|
||||
|
||||
cd tests
|
||||
.\run_make_tests.bat -make <path-to-make>
|
||||
|
||||
I've found <path-to-make> seems to want forward-slashes in the path.
|
||||
For example if building with .\build_w32.bat non-debug, use:
|
||||
|
||||
cd tests
|
||||
.\run_make_tests.bat -make ../WinRel/gnumake.exe
|
||||
|
||||
I've tested this with the MSYS2 shell and POSIX tools installation
|
||||
that you get by installing Git for Windows.
|
||||
|
||||
|
||||
|
||||
-------------------
|
||||
-- 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 (https://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.
|
||||
|
||||
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. The number of
|
||||
concurrent processes has a hard limit of 4095.
|
||||
|
||||
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.
|
||||
|
||||
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-2022 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 <https://www.gnu.org/licenses/>.
|
||||
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-2022 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 <https://www.gnu.org/licenses/>.
|
||||
365
README.git
Normal file
365
README.git
Normal file
@@ -0,0 +1,365 @@
|
||||
-*-text-*-
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2002-2022 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 <https://www.gnu.org/licenses/>.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Obtaining Git Code
|
||||
------------------
|
||||
|
||||
This seems redundant, since if you're reading this you most likely have
|
||||
already performed this step; however, for completeness, you can obtain the GNU
|
||||
make source code via Git from the FSF's Savannah project
|
||||
<https://savannah.gnu.org/projects/make/>:
|
||||
|
||||
$ git clone git://git.savannah.gnu.org/make.git
|
||||
|
||||
|
||||
Changes using Git
|
||||
-----------------
|
||||
|
||||
If you do not have push privileges to the GNU Make Git repository, see the
|
||||
README file section "Submitting Patches" for information.
|
||||
|
||||
If you have push privileges to the GNU Make Git repository keep this
|
||||
information in mind:
|
||||
|
||||
Starting with GNU Make 4.0 we no longer keep a separate ChangeLog file in
|
||||
source control. We use the Gnulib git-to-changelog conversion script to
|
||||
convert the Git comments into ChangeLog-style entries for release. As a
|
||||
result, please format your Git comments carefully so they will look clean
|
||||
after conversion. In particular, each line of your comment will have a TAB
|
||||
added before it so be sure your comment lines are not longer than 72
|
||||
characters; prefer 70 or less. Please use standard ChangeLog formats for
|
||||
your commit messages (sans the leading TAB of course).
|
||||
|
||||
Rule #1: Don't rewrite pushed history on master (no "git push --force").
|
||||
Rule #2: Feel free to rewrite pushed history on personal branches.
|
||||
Rule #3: Prefer to squash-merge or rebase + merge --ff-only, rather than
|
||||
merging from personal branches into master.
|
||||
|
||||
Typical simple workflow might be:
|
||||
|
||||
* Edit files / make / make check
|
||||
* Use "git status" and "git diff" to verify your changes
|
||||
* Use "git add" to stage the changes you want to make
|
||||
* Use "git commit" to commit the staged changes to your local repository
|
||||
* Use "git pull -r" to accept new changes from the upstream repository
|
||||
* Use "git push" to push your commits back to the upstream repository
|
||||
|
||||
For Emacs users, there are many options for Git integration but I strongly
|
||||
recommend Magit: https://magit.vc/ It makes the workflow much clearer, and
|
||||
has advanced features such as constructing multiple commits from various files
|
||||
and even from different diff chunks in the same file. There is a video
|
||||
available which helps a lot.
|
||||
|
||||
|
||||
Coding Standards
|
||||
----------------
|
||||
|
||||
GNU Make code adheres to the GNU Coding Standards. Please use only spaces and
|
||||
no TAB characters in source code.
|
||||
|
||||
Additionally, GNU Make is a foundational bootstrap package for the GNU
|
||||
project; as such it is conservative about language features it expects.
|
||||
However, GNU Make does rely on the Gnulib portability library, and Gnulib
|
||||
currently requires a ISO C99 compiler. So features in ISO C99 can be
|
||||
assumed.
|
||||
|
||||
|
||||
Building From Git for POSIX
|
||||
---------------------------
|
||||
|
||||
To build GNU Make from Git on POSIX systems such as GNU/Linux, you will
|
||||
need to install the following extra software:
|
||||
|
||||
* autoconf >= 2.69
|
||||
* automake >= 1.16.1
|
||||
* gettext
|
||||
* autopoint
|
||||
* pkg-config
|
||||
* texinfo (for makeinfo)
|
||||
* GCC
|
||||
* GNU Make (POSIX make is not sufficient)
|
||||
|
||||
And any tools that those utilities require (GNU m4, etc.)
|
||||
|
||||
To run the tests you must install Perl.
|
||||
|
||||
To build a release you'll need to install lzip.
|
||||
|
||||
GNU Make requires Gnulib to provide some facilities. If you want to maintain
|
||||
a local installation of gnulib you can set GNULIB_SRCDIR to point to it.
|
||||
Otherwise, ./bootstrap will obtain a clone for you.
|
||||
|
||||
Due to issues with gnulib's getloadavg, you must have automake 1.16.1 or
|
||||
above. This version may not yet be available through GNU/Linux package
|
||||
managers. If you need to install from source be sure to set ACLOCAL_PATH to
|
||||
point to the pkg-config location (e.g., /usr/share/aclocal).
|
||||
|
||||
If you want to build from Git with a non-GCC compiler, add "MAKE_CFLAGS=" to
|
||||
your make command line (or at least remove any flags your compiler does not
|
||||
support).
|
||||
|
||||
When building from Git you must build in the source directory: "VPATH
|
||||
builds" from remote directories are not supported. Once you've created
|
||||
a distribution, of course, you can unpack it and do a VPATH build from
|
||||
there.
|
||||
|
||||
After checking out the code, you will need to run the bootstrap script:
|
||||
|
||||
$ ./bootstrap
|
||||
|
||||
Alternatively you can just pull content from remote locations with:
|
||||
|
||||
$ ./autopull.sh
|
||||
|
||||
And/or just re-generate auto-generatable files with:
|
||||
|
||||
$ ./autogen.sh
|
||||
|
||||
(Running ./bootstrap does both in one step.)
|
||||
|
||||
At this point you have successfully brought your Git copy of the GNU
|
||||
make source directory up to the point where it can be treated
|
||||
more-or-less like the official package you would get from ftp.gnu.org.
|
||||
That is, you can just run:
|
||||
|
||||
$ ./configure
|
||||
$ make check
|
||||
|
||||
to build and test GNU Make.
|
||||
|
||||
NOTE! This method builds GNU Make in "maintainer mode". Make programs built
|
||||
in this mode it will be slower, possibly MUCH slower: there are various
|
||||
sanity checks enabled. Further this mode assumes a modern GCC, GNU
|
||||
libc, and well-formed system headers and enables a high level of
|
||||
warnings AND enables -Werror to turn warnings into failures.
|
||||
|
||||
If you want to build from Git with "maintainer mode" disabled, add
|
||||
"MAKE_MAINTAINER_MODE=" to the make command line. If you want to turn
|
||||
off the extra warning flags, add "MAKE_CFLAGS=" to the make command
|
||||
line.
|
||||
|
||||
For example:
|
||||
$ ./configure
|
||||
$ make check MAKE_MAINTAINER_MODE= MAKE_CFLAGS=
|
||||
$ make install
|
||||
|
||||
|
||||
Building From Git for Windows
|
||||
-----------------------------
|
||||
|
||||
If you have a UNIX emulation like CYGWIN you can opt to run the general build
|
||||
procedure above; it will work. Consult README.W32 for information on options
|
||||
you might want to use when running ./configure.
|
||||
|
||||
If you can't or don't want to do that, then first run the .\bootstrap.bat
|
||||
script to "prime" your Git workspace:
|
||||
|
||||
> .\bootstrap.bat
|
||||
|
||||
Next, follow the instructions in the README.W32 file.
|
||||
|
||||
Note, neither of these methods are tested regularly by the GNU Make
|
||||
maintainers. Building for Windows from a distribution tarball IS tested
|
||||
regularly.
|
||||
|
||||
|
||||
Debugging and Testing
|
||||
---------------------
|
||||
|
||||
These instructions have been tested on GNU systems. I have no idea if they
|
||||
work on non-GNU systems (Windows, MacOS, etc.)
|
||||
|
||||
* Alternate Configurations:
|
||||
The maintMakefile has a rule for running configure with various different
|
||||
options, with and without packages. Run:
|
||||
|
||||
make check-alt-config
|
||||
|
||||
* Valgrind:
|
||||
You can run all tests under valgrind by passing the -memcheck option:
|
||||
|
||||
(cd tests && ./run_make_tests -make ../make -memcheck)
|
||||
|
||||
Note, this is slow! Also some tests will fail because of invoking valgrind.
|
||||
|
||||
* ASAN:
|
||||
You can build with ASAN and run tests, like this:
|
||||
|
||||
make clean
|
||||
make -j8 CFLAGS='-ggdb3 -fsanitize=address' LDFLAGS='-ggdb3 -fsanitize=address'
|
||||
(cd tests && ./run_make_tests -make ../make)
|
||||
|
||||
Note that ASAN is reporting many more errors than valgrind. I don't know
|
||||
which one is wrong: I haven't looked at them closely.
|
||||
|
||||
|
||||
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-lzip
|
||||
|
||||
Even better, you should run this:
|
||||
|
||||
$ make distcheck
|
||||
|
||||
Which will build both .gz and .lz package files, then unpack one into a
|
||||
temporary location, try to build it and repack it, then verifying that
|
||||
everything works, you get the same results, _and_ no extraneous files are
|
||||
left over after the "distclean" rule.
|
||||
|
||||
This package can be unpacked and built to give a "normal" (non-maintainer
|
||||
mode) result.
|
||||
|
||||
|
||||
Steps to Release
|
||||
----------------
|
||||
|
||||
Here are the things that need to be done (in more or less this order)
|
||||
before making an official release. If something breaks such that you need to
|
||||
change code, be sure to start over again sufficiently that everything is
|
||||
consistent (that's why we don't finalize the Git tag, etc. until the end).
|
||||
|
||||
* Update the configure.ac file with the new release number.
|
||||
* Update the EDITION value in the doc/make.texi file.
|
||||
* Update the NEWS file with the release number and date.
|
||||
* Ensure the Savannah bug list URL in the NEWS file uses the correct
|
||||
"Fixed Release" ID number.
|
||||
* Run "make distcheck" to be sure it all works.
|
||||
* Run "make check-alt-config" to be sure alternative configurations work
|
||||
* Run "make update-makeweb" to get a copy of the GNU Make web pages
|
||||
* Run "make update-gnuweb" to get a copy of the GNU website boilerplate pages
|
||||
* Update the web page boilerplate if necessary:
|
||||
../gnu-www/www/server/standards/patch-from-parent ../make-web/make.html \
|
||||
../gnu-www/www/server/standards/boilerplate.html
|
||||
* Run "make gendocs" (requires gnulib) to generate the manual files for
|
||||
the GNU Make web pages.
|
||||
* Follow the directions from gendocs for the web page repository
|
||||
* run "make tag-release" to create a Git tag for the release
|
||||
* Push everything:
|
||||
git push --tags origin master
|
||||
|
||||
Manage the Savannah project for GNU Make:
|
||||
|
||||
>>> This is only for real releases, not release candidate builds <<<
|
||||
|
||||
* In Savannah modify the "Value", "Rank", and "Description" values for the
|
||||
current "SCM" entry in both "Component Version" and "Fix Release" fields
|
||||
to refer to the new release. The "Rank" field should be 10 less than the
|
||||
previous release so it orders properly.
|
||||
* In Savannah create a new entry for the "Component Version" and "Fix
|
||||
Release" fields:
|
||||
- Value: SCM
|
||||
- Rank: 20
|
||||
- Descr: Issues found in code retrieved from Source Code Management (Git), rather than a distributed version. Please include the SHA you are working with.
|
||||
|
||||
- Descr: Fixed in Source Code Management (Git). The fix will be included in the next release of GNU Make.
|
||||
|
||||
Start the next release:
|
||||
|
||||
* Update configure.ac and add a ".90" to the release number.
|
||||
* Update the NEWS file with a new section for the release / date.
|
||||
* Update the Savannah URL for the bugs fixed in the NEWS section.
|
||||
|
||||
|
||||
Publishing a Package
|
||||
--------------------
|
||||
|
||||
In order to publish a package on the FSF FTP site, either the release
|
||||
site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
|
||||
first need to have my GPG private key and my passphrase to unlock it.
|
||||
And, you can't have them! So there! But, just so I remember here's
|
||||
what to do:
|
||||
|
||||
Make sure the "Steps to Release" are complete and committed and tagged.
|
||||
|
||||
git clone git://git.savannah.gnu.org/make.git make-release
|
||||
|
||||
cd make-release
|
||||
|
||||
<run the commands above to build the release>
|
||||
|
||||
make upload-alpha # for alpha.gnu.org (pre-releases)
|
||||
-OR-
|
||||
make upload-ftp # for ftp.gnu.org (official releases)
|
||||
|
||||
Depending on your distribution (whether GnuPG is integrated with your keyring
|
||||
etc.) it will either pop up a window asking for your GPG key passphrase one
|
||||
time, or else it will use the CLI to ask for the GPG passphrase _THREE_ times.
|
||||
Sigh.
|
||||
|
||||
|
||||
For both final releases and pre-releases, send an email with the URL of
|
||||
the package to the GNU translation robot to allow the translators to
|
||||
work on it:
|
||||
|
||||
<coordinator@translationproject.org>
|
||||
|
||||
|
||||
Where to Announce
|
||||
-----------------
|
||||
|
||||
Create the announcement in a text file, using 'git shortlog',
|
||||
then sign it with GPG:
|
||||
|
||||
gpg --clearsign <announcement.txt>
|
||||
|
||||
Or, use your mail client's PGP/GPG signing capabilities.
|
||||
|
||||
Announce the release:
|
||||
|
||||
* For release candidate builds:
|
||||
To: bug-make@gnu.org
|
||||
CC: coordinator@translationproject.org, platform-testers@gnu.org
|
||||
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||
|
||||
* For release builds
|
||||
To: info-gnu@gnu.org, bug-make@gnu.org
|
||||
CC: coordinator@translationproject.org
|
||||
BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
|
||||
|
||||
* Add a news item to the Savannah project site.
|
||||
* Add an update to freecode.com (nee freshmeat.net)
|
||||
|
||||
|
||||
Appendix A - For The Brave
|
||||
--------------------------
|
||||
|
||||
For those of you who trust me implicitly, or are just brave (or
|
||||
foolhardy), here is a canned sequence of commands to build a GNU Make
|
||||
distribution package from a virgin Git source checkout (assuming all the
|
||||
prerequisites are available of course).
|
||||
|
||||
This list is eminently suitable for a quick swipe o' the mouse and a
|
||||
swift click o' mouse-2 into an xterm. Go for it!
|
||||
|
||||
For a debugging version:
|
||||
|
||||
./bootstrap && ./configure CFLAGS=-g && make check
|
||||
|
||||
For a release version
|
||||
|
||||
./bootstrap && ./configure && make check
|
||||
221
README.in
Normal file
221
README.in
Normal file
@@ -0,0 +1,221 @@
|
||||
This directory contains the @PACKAGE_VERSION@ release of @PACKAGE_NAME@.
|
||||
|
||||
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.
|
||||
|
||||
If you are trying to build GNU Make from a Git clone rather than a downloaded
|
||||
source distribution, see the README.git file for instructions.
|
||||
|
||||
For source distribution 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 will 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 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.
|
||||
|
||||
|
||||
GNU Make is free software. See the file COPYING for copying conditions.
|
||||
GNU Make is copyright by the Free Software Foundation. Copyright notices
|
||||
condense sequential years into a range; e.g. "1987-1994" means all years
|
||||
from 1987 to 1994 inclusive.
|
||||
|
||||
Downloading
|
||||
-----------
|
||||
|
||||
GNU Make can be obtained in many different ways. See a description here:
|
||||
|
||||
https://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.texi. 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.
|
||||
|
||||
https://www.gnu.org/
|
||||
https://www.gnu.org/doc/doc.html
|
||||
https://www.gnu.org/manual/manual.html
|
||||
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
||||
GNU Make development is hosted by Savannah, the FSF's online development
|
||||
management tool. Savannah is here:
|
||||
|
||||
https://savannah.gnu.org
|
||||
|
||||
And the GNU Make development page is here:
|
||||
|
||||
https://savannah.gnu.org/projects/make/
|
||||
|
||||
You can find most information concerning the development of GNU Make at
|
||||
this site.
|
||||
|
||||
|
||||
Regression Tests
|
||||
----------------
|
||||
|
||||
GNU Make contains a suite of regression tests. To run them use "make check"
|
||||
after building GNU Make. If they fail a tar package will be created
|
||||
containing useful information, which can be emailed (as an attachment) to
|
||||
the <bug-make@gnu.org> mailing list.
|
||||
|
||||
Please note that since these tests rely on known-good-output comparisons,
|
||||
they can show spurious failures on some systems (particularly non-POSIX systems
|
||||
such as Windows).
|
||||
|
||||
|
||||
Bug Reporting
|
||||
-------------
|
||||
|
||||
If you need help using GNU Make, try asking on <help-make@gnu.org>.
|
||||
|
||||
If you found a bug, you can send a 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 do not need to subscribe to these lists first.
|
||||
|
||||
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:
|
||||
|
||||
https://savannah.gnu.org/bugs/?group=make
|
||||
|
||||
We prefer to use the bug tracking system ONLY for bugs or enhancements,
|
||||
not for help requests: please use the mailing lists to get help.
|
||||
|
||||
|
||||
Submitting Patches
|
||||
------------------
|
||||
|
||||
If you'd like to propose a change to GNU Make, you can provide a patch with
|
||||
your changes. If you are making your changes in a Git workspace you can run
|
||||
"git format-patch" to create a patch file. If not, you can use the diff(1)
|
||||
utility to create a patch file; please use "diff -u".
|
||||
|
||||
Once you have a patch you can submit it in any of these ways:
|
||||
|
||||
* Create a bug on Savannah and add the patch as an attachment:
|
||||
https://savannah.gnu.org/bugs/?group=make&func=additem
|
||||
|
||||
* Send the patch via email to <bug-make@gnu.org>: be sure to add it as an
|
||||
attachment to avoid interference by email processors.
|
||||
|
||||
All non-trivial changes require FSF copyright paperwork to be completed
|
||||
before they can be accepted. Contact <bug-make@gnu.org> for help.
|
||||
|
||||
|
||||
Git Access
|
||||
----------
|
||||
|
||||
The GNU Make source repository is available via Git from the GNU Savannah Git
|
||||
server; look here for details:
|
||||
|
||||
https://savannah.gnu.org/git/?group=make
|
||||
|
||||
Please note: you won't be able to build GNU Make from Git without installing
|
||||
appropriate maintainer's tools, such as GNU m4, automake, autoconf, Perl, GNU
|
||||
make, and GCC.
|
||||
|
||||
See the README.git file for instructions on how to build GNU Make once these
|
||||
tools are available. We make no guarantees about the contents or quality of
|
||||
the latest code in the Git repository: it is not unheard of for code that is
|
||||
known to be broken to be checked in. Use at your own risk.
|
||||
|
||||
|
||||
System-specific Notes
|
||||
---------------------
|
||||
|
||||
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
|
||||
that if you compile make with 'cc -O' on AIX 3.2, it will not work
|
||||
correctly. It is said that using 'cc' without '-O' does work.
|
||||
|
||||
The standard /bin/sh on SunOS 4.1.3_U1 and 4.1.4 is broken and cannot be
|
||||
used to configure GNU Make. Please install a different shell such as
|
||||
bash or pdksh in order to run "configure". See this message for more
|
||||
information:
|
||||
https://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00190.html
|
||||
|
||||
One area that is often a problem in configuration and porting is the code
|
||||
to check the system's current load average. To make it easier to test and
|
||||
debug this code, you can do 'make check-loadavg' to see if it works
|
||||
properly on your system. (You must run 'configure' beforehand, but you
|
||||
need not build 'make' itself to run this test.)
|
||||
|
||||
Another potential source of porting problems is the support for large
|
||||
files (LFS) in configure for those operating systems that provide it.
|
||||
Please report any bugs that you find in this area. If you run into
|
||||
difficulties, then as a workaround you should be able to disable LFS by
|
||||
adding the '--disable-largefile' option to the 'configure' script.
|
||||
|
||||
On systems that support micro- and nano-second timestamp values and
|
||||
where stat(2) provides this information, GNU Make will use it when
|
||||
comparing timestamps to get the most accurate possible result. However,
|
||||
note that many current implementations of tools that *set* timestamps do
|
||||
not preserve micro- or nano-second granularity. This means that "cp -p"
|
||||
and other similar tools (tar, etc.) may not exactly duplicate timestamps
|
||||
with micro- and nano-second granularity on some systems. If your build
|
||||
system contains rules that depend on proper behavior of tools like "cp
|
||||
-p", you should consider using the .LOW_RESOLUTION_TIME pseudo-target to
|
||||
force make to treat them properly. See the manual for details.
|
||||
|
||||
|
||||
Ports
|
||||
-----
|
||||
|
||||
- See README.customs for details on integrating GNU Make with the
|
||||
Customs distributed build environment from the Pmake distribution.
|
||||
|
||||
- See README.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 https://www.delorie.com/djgpp/ for more
|
||||
information.
|
||||
|
||||
The Cygwin project maintains its own port of GNU Make. That port may have
|
||||
patches which are not present in this version. If you are using Cygwin
|
||||
you should use their version of GNU Make, and if you have questions about
|
||||
it you should start by asking on those mailing lists and forums.
|
||||
|
||||
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-2022 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 <https://www.gnu.org/licenses/>.
|
||||
13
SCOPTIONS
Normal file
13
SCOPTIONS
Normal file
@@ -0,0 +1,13 @@
|
||||
ERRORREXX
|
||||
OPTIMIZE
|
||||
NOVERSION
|
||||
OPTIMIZERTIME
|
||||
OPTIMIZERALIAS
|
||||
DEFINE HAVE_CONFIG_H
|
||||
DEFINE INCLUDEDIR="include:"
|
||||
DEFINE LIBDIR="lib:"
|
||||
DEFINE NO_ALLOCA
|
||||
DEFINE NO_ARCHIVES
|
||||
IGNORE=161
|
||||
IGNORE=100
|
||||
STARTUP=cres
|
||||
117
TODO.private
Normal file
117
TODO.private
Normal file
@@ -0,0 +1,117 @@
|
||||
-*-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 guarantee that all of them will be ultimately deemed "good
|
||||
ideas" and implemented. These are just the ones that, at first blush,
|
||||
seem to have some merit (and that I can remember).
|
||||
|
||||
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.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2022 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 <https://www.gnu.org/licenses/>.
|
||||
486
autogen.sh
Executable file
486
autogen.sh
Executable file
@@ -0,0 +1,486 @@
|
||||
#!/bin/sh
|
||||
# Convenience script for regenerating all autogeneratable files that are
|
||||
# omitted from the version control repository. In particular, this script
|
||||
# also regenerates all aclocal.m4, config.h.in, Makefile.in, configure files
|
||||
# with new versions of autoconf or automake.
|
||||
|
||||
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Originally written by Paul Eggert. The canonical version of this
|
||||
# script is maintained as top/autogen.sh in gnulib. However, to be
|
||||
# useful to your package, you should place a copy of it under version
|
||||
# control in the top-level directory of your package. The intent is
|
||||
# that all customization can be done with a bootstrap.conf file also
|
||||
# maintained in your version control; gnulib comes with a template
|
||||
# build-aux/bootstrap.conf to get you started.
|
||||
#
|
||||
# Alternatively, you can use an autogen.sh script that is specific
|
||||
# to your package.
|
||||
|
||||
scriptversion=2022-07-24.15; # UTC
|
||||
|
||||
me="$0"
|
||||
medir=`dirname "$me"`
|
||||
|
||||
# Read the function library and the configuration.
|
||||
. "$medir"/bootstrap-funclib.sh
|
||||
|
||||
# Ensure that CDPATH is not set. Otherwise, the output from cd
|
||||
# would cause trouble in at least one use below.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
# Environment variables that may be set by the user.
|
||||
: "${AUTOPOINT=autopoint}"
|
||||
: "${AUTORECONF=autoreconf}"
|
||||
|
||||
if test "$vc_ignore" = auto; then
|
||||
vc_ignore=
|
||||
test -d .git && vc_ignore=.gitignore
|
||||
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
||||
fi
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $me [OPTION]...
|
||||
Bootstrap this package from the checked-out sources.
|
||||
|
||||
Optional environment variables:
|
||||
GNULIB_SRCDIR Specifies the local directory where gnulib
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
you want to use these sources.
|
||||
|
||||
Options:
|
||||
--copy copy files instead of creating symbolic links
|
||||
--force attempt to bootstrap even if the sources seem
|
||||
not to have been checked out
|
||||
EOF
|
||||
bootstrap_print_option_usage_hook
|
||||
cat <<EOF
|
||||
If the file bootstrap.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||
are honored.
|
||||
|
||||
Gnulib sources are assumed to be present:
|
||||
* in \$GNULIB_SRCDIR, if that environment variable is set,
|
||||
* otherwise, in the 'gnulib' submodule, if such a submodule is configured,
|
||||
* otherwise, in the 'gnulib' subdirectory.
|
||||
|
||||
Running without arguments will suffice in most cases.
|
||||
EOF
|
||||
}
|
||||
|
||||
# Parse options.
|
||||
|
||||
# Whether to use copies instead of symlinks.
|
||||
copy=false
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
--help)
|
||||
usage
|
||||
exit;;
|
||||
--version)
|
||||
set -e
|
||||
echo "autogen.sh $scriptversion"
|
||||
echo "$copyright"
|
||||
exit 0
|
||||
;;
|
||||
--force)
|
||||
checkout_only_file=;;
|
||||
--copy)
|
||||
copy=true;;
|
||||
*)
|
||||
bootstrap_option_hook $option || die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option is specified, but does not denote a directory"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Running this script from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
if $use_gnulib; then
|
||||
if test -z "$GNULIB_SRCDIR"; then
|
||||
gnulib_path=$(test -f .gitmodules && git config --file .gitmodules submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
fi
|
||||
fi
|
||||
|
||||
version_controlled_file() {
|
||||
parent=$1
|
||||
file=$2
|
||||
if test -d .git; then
|
||||
git rm -n "$file" > /dev/null 2>&1
|
||||
elif test -d .svn; then
|
||||
svn log -r HEAD "$file" > /dev/null 2>&1
|
||||
elif test -d CVS; then
|
||||
grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null
|
||||
else
|
||||
warn_ "no version control for $file?"
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
# Strip blank and comment lines to leave significant entries.
|
||||
gitignore_entries() {
|
||||
sed '/^#/d; /^$/d' "$@"
|
||||
}
|
||||
|
||||
# If $STR is not already on a line by itself in $FILE, insert it at the start.
|
||||
# Entries are inserted at the start of the ignore list to ensure existing
|
||||
# entries starting with ! are not overridden. Such entries support
|
||||
# whitelisting exceptions after a more generic blacklist pattern.
|
||||
insert_if_absent() {
|
||||
file=$1
|
||||
str=$2
|
||||
test -f $file || touch $file
|
||||
test -r $file || die "Error: failed to read ignore file: $file"
|
||||
duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
|
||||
if [ "$duplicate_entries" ] ; then
|
||||
die "Error: Duplicate entries in $file: " $duplicate_entries
|
||||
fi
|
||||
linesold=$(gitignore_entries $file | wc -l)
|
||||
linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
|
||||
if [ $linesold != $linesnew ] ; then
|
||||
{ echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|
||||
|| die "insert_if_absent $file $str: failed"
|
||||
fi
|
||||
}
|
||||
|
||||
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
# insert_if_absent.
|
||||
insert_vc_ignore() {
|
||||
vc_ignore_file="$1"
|
||||
pattern="$2"
|
||||
case $vc_ignore_file in
|
||||
*.gitignore)
|
||||
# A .gitignore entry that does not start with '/' applies
|
||||
# recursively to subdirectories, so prepend '/' to every
|
||||
# .gitignore entry.
|
||||
pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
esac
|
||||
insert_if_absent "$vc_ignore_file" "$pattern"
|
||||
}
|
||||
|
||||
symlink_to_dir()
|
||||
{
|
||||
src=$1/$2
|
||||
dst=${3-$2}
|
||||
|
||||
test -f "$src" && {
|
||||
|
||||
# If the destination directory doesn't exist, create it.
|
||||
# This is required at least for "lib/uniwidth/cjk.h".
|
||||
dst_dir=$(dirname "$dst")
|
||||
if ! test -d "$dst_dir"; then
|
||||
mkdir -p "$dst_dir"
|
||||
|
||||
# If we've just created a directory like lib/uniwidth,
|
||||
# tell version control system(s) it's ignorable.
|
||||
# FIXME: for now, this does only one level
|
||||
parent=$(dirname "$dst_dir")
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
done
|
||||
fi
|
||||
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$me: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$me: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
# Leave any existing symlink alone, if it already points to the source,
|
||||
# so that broken build tools that care about symlink times
|
||||
# aren't confused into doing unnecessary builds. Conversely, if the
|
||||
# existing symlink's timestamp is older than the source, make it afresh,
|
||||
# so that broken tools aren't confused into skipping needed builds. See
|
||||
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
||||
test -h "$dst" &&
|
||||
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
||||
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
||||
test "$src_i" = "$dst_i" &&
|
||||
both_ls=$(ls -dt "$src" "$dst") &&
|
||||
test "X$both_ls" = "X$dst$nl$src" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
die "invalid symlink calculation: $src -> $dst";;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$me: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
||||
found_aux_dir=no
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'])' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
||||
>/dev/null && found_aux_dir=yes
|
||||
test $found_aux_dir = yes \
|
||||
|| die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
|
||||
|
||||
# If $build_aux doesn't exist, create it now, otherwise some bits
|
||||
# below will malfunction. If creating it, also mark it as ignored.
|
||||
if test ! -d $build_aux; then
|
||||
mkdir $build_aux
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
insert_vc_ignore $dot_ig $build_aux
|
||||
done
|
||||
fi
|
||||
|
||||
check_build_prerequisites false
|
||||
|
||||
use_libtool=0
|
||||
# We'd like to use grep -E, to see if any of LT_INIT,
|
||||
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
||||
# but that's not portable enough (e.g., for Solaris).
|
||||
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
||||
&& use_libtool=1
|
||||
if test $use_libtool = 1; then
|
||||
find_tool LIBTOOLIZE glibtoolize libtoolize
|
||||
fi
|
||||
|
||||
if $use_gnulib; then
|
||||
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
||||
<$gnulib_tool || exit $?
|
||||
fi
|
||||
|
||||
# NOTE: we have to be careful to run both autopoint and libtoolize
|
||||
# before gnulib-tool, since gnulib-tool is likely to provide newer
|
||||
# versions of files "installed" by these two programs.
|
||||
# Then, *after* gnulib-tool (see below), we have to be careful to
|
||||
# run autoreconf in such a way that it does not run either of these
|
||||
# two just-pre-run programs.
|
||||
|
||||
# Import from gettext.
|
||||
with_gettext=yes
|
||||
grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
||||
with_gettext=no
|
||||
|
||||
if test $with_gettext = yes || test $use_libtool = 1; then
|
||||
|
||||
tempbase=.bootstrap$$
|
||||
trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
|
||||
|
||||
> $tempbase.0 > $tempbase.1 &&
|
||||
find . ! -type d -print | sort > $tempbase.0 || exit
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
# Released autopoint has the tendency to install macros that have been
|
||||
# obsoleted in current gnulib, so run this before gnulib-tool.
|
||||
echo "$0: $AUTOPOINT --force"
|
||||
$AUTOPOINT --force || exit
|
||||
fi
|
||||
|
||||
# Autoreconf runs aclocal before libtoolize, which causes spurious
|
||||
# warnings if the initial aclocal is confused by the libtoolized
|
||||
# (or worse out-of-date) macro directory.
|
||||
# libtoolize 1.9b added the --install option; but we support back
|
||||
# to libtoolize 1.5.22, where the install action was default.
|
||||
if test $use_libtool = 1; then
|
||||
install=
|
||||
case $($LIBTOOLIZE --help) in
|
||||
*--install*) install=--install ;;
|
||||
esac
|
||||
echo "running: $LIBTOOLIZE $install --copy"
|
||||
$LIBTOOLIZE $install --copy
|
||||
fi
|
||||
|
||||
find . ! -type d -print | sort >$tempbase.1
|
||||
old_IFS=$IFS
|
||||
IFS=$nl
|
||||
for file in $(comm -13 $tempbase.0 $tempbase.1); do
|
||||
IFS=$old_IFS
|
||||
parent=${file%/*}
|
||||
version_controlled_file "$parent" "$file" || {
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore "$ig" "${file##*/}"
|
||||
done
|
||||
}
|
||||
done
|
||||
IFS=$old_IFS
|
||||
|
||||
rm -f $tempbase.0 $tempbase.1
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
|
||||
# Import from gnulib.
|
||||
|
||||
if $use_gnulib; then
|
||||
gnulib_tool_options="\
|
||||
--no-changelog\
|
||||
--aux-dir=$build_aux\
|
||||
--doc-base=$doc_base\
|
||||
--lib=$gnulib_name\
|
||||
--m4-base=$m4_base/\
|
||||
--source-base=$source_base/\
|
||||
--tests-base=$tests_base\
|
||||
--local-dir=$local_gl_dir\
|
||||
$gnulib_tool_option_extras\
|
||||
"
|
||||
if test $use_libtool = 1; then
|
||||
case "$gnulib_tool_options " in
|
||||
*' --libtool '*) ;;
|
||||
*) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
|
||||
esac
|
||||
fi
|
||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|
||||
|| die "gnulib-tool failed"
|
||||
|
||||
for file in $gnulib_files; do
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
||||
|| die "failed to symlink $file"
|
||||
done
|
||||
fi
|
||||
|
||||
bootstrap_post_import_hook \
|
||||
|| die "bootstrap_post_import_hook failed"
|
||||
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||
# portability constraints of this script, that may seem a very demanding
|
||||
# requirement, but it should be ok. Ignore any failure, which is fine,
|
||||
# since this is only a convenience to help developers avoid the relatively
|
||||
# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
|
||||
# between successive runs of this script.
|
||||
find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Invoke autoreconf with --force --install to ensure upgrades of tools
|
||||
# such as ylwrap.
|
||||
AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
|
||||
|
||||
# Some systems (RHEL 5) are using ancient autotools, for which the
|
||||
# --no-recursive option had not been invented. Detect that lack and
|
||||
# omit the option when it's not supported. FIXME in 2017: remove this
|
||||
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
|
||||
case $($AUTORECONF --help) in
|
||||
*--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
|
||||
esac
|
||||
|
||||
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
|
||||
AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
|
||||
|| die "autoreconf failed"
|
||||
|
||||
# Get some extra files from gnulib, overriding existing files.
|
||||
for file in $gnulib_extra_files; do
|
||||
case $file in
|
||||
*/INSTALL) dst=INSTALL;;
|
||||
build-aux/*) dst=$build_aux/${file#build-aux/};;
|
||||
*) dst=$file;;
|
||||
esac
|
||||
symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
|
||||
|| die "failed to symlink $file"
|
||||
done
|
||||
|
||||
if test $with_gettext = yes; then
|
||||
# Create gettext configuration.
|
||||
echo "$0: Creating po/Makevars from po/Makevars.template ..."
|
||||
rm -f po/Makevars
|
||||
sed '
|
||||
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
||||
/^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
|
||||
/^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >po/Makevars \
|
||||
|| die 'cannot generate po/Makevars'
|
||||
|
||||
# If the 'gettext' module is in use, grab the latest Makefile.in.in.
|
||||
# If only the 'gettext-h' module is in use, assume autopoint already
|
||||
# put the correct version of this file into place.
|
||||
case $gnulib_modules in
|
||||
*gettext-h*) ;;
|
||||
*gettext*)
|
||||
cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
|
||||
|| die "cannot create po/Makefile.in.in"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -d runtime-po; then
|
||||
# Similarly for runtime-po/Makevars, but not quite the same.
|
||||
rm -f runtime-po/Makevars
|
||||
sed '
|
||||
/^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
|
||||
/^subdir *=.*/s/=.*/= runtime-po/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >runtime-po/Makevars \
|
||||
|| die 'cannot generate runtime-po/Makevars'
|
||||
|
||||
# Copy identical files from po to runtime-po.
|
||||
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
|
||||
fi
|
||||
fi
|
||||
|
||||
bootstrap_epilogue
|
||||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# Local Variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
273
autopull.sh
Executable file
273
autopull.sh
Executable file
@@ -0,0 +1,273 @@
|
||||
#!/bin/sh
|
||||
# Convenience script for fetching auxiliary files that are omitted from
|
||||
# the version control repository of this package.
|
||||
|
||||
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Originally written by Paul Eggert. The canonical version of this
|
||||
# script is maintained as top/autopull.sh in gnulib. However, to be
|
||||
# useful to your package, you should place a copy of it under version
|
||||
# control in the top-level directory of your package. The intent is
|
||||
# that all customization can be done with a bootstrap.conf file also
|
||||
# maintained in your version control; gnulib comes with a template
|
||||
# build-aux/bootstrap.conf to get you started.
|
||||
#
|
||||
# Alternatively, you can use an autopull.sh script that is specific
|
||||
# to your package.
|
||||
|
||||
scriptversion=2022-07-24.15; # UTC
|
||||
|
||||
me="$0"
|
||||
medir=`dirname "$me"`
|
||||
|
||||
# Read the function library and the configuration.
|
||||
. "$medir"/bootstrap-funclib.sh
|
||||
|
||||
# Ensure that CDPATH is not set. Otherwise, the output from cd
|
||||
# would cause trouble in at least one use below.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $me [OPTION]...
|
||||
Bootstrap this package from the checked-out sources.
|
||||
|
||||
Optional environment variables:
|
||||
GNULIB_SRCDIR Specifies the local directory where gnulib
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
you want to use these sources.
|
||||
GNULIB_REFDIR Specifies the local directory where a gnulib
|
||||
repository (with a .git subdirectory) resides.
|
||||
Use this if you already have gnulib sources
|
||||
and history on your machine, and do not want
|
||||
to waste your bandwidth downloading them again.
|
||||
GNULIB_URL Cloneable URL of the gnulib repository.
|
||||
|
||||
Options:
|
||||
--bootstrap-sync if this bootstrap script is not identical to
|
||||
the version in the local gnulib sources,
|
||||
update this script, and then restart it with
|
||||
/bin/sh or the shell \$CONFIG_SHELL
|
||||
--no-bootstrap-sync do not check whether bootstrap is out of sync
|
||||
--force attempt to bootstrap even if the sources seem
|
||||
not to have been checked out
|
||||
--no-git do not use git to update gnulib. Requires that
|
||||
\$GNULIB_SRCDIR or the --gnulib-srcdir option
|
||||
points to a gnulib repository with the correct
|
||||
revision
|
||||
--skip-po do not download po files
|
||||
EOF
|
||||
bootstrap_print_option_usage_hook
|
||||
cat <<EOF
|
||||
If the file bootstrap.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||
are honored.
|
||||
|
||||
Gnulib sources can be fetched in various ways:
|
||||
|
||||
* If the environment variable GNULIB_SRCDIR is set (either as an
|
||||
environment variable or via the --gnulib-srcdir option), then sources
|
||||
are fetched from that local directory. If it is a git repository and
|
||||
the configuration variable GNULIB_REVISION is set in bootstrap.conf,
|
||||
then that revision is checked out.
|
||||
|
||||
* Otherwise, if this package is in a git repository with a 'gnulib'
|
||||
submodule configured, then that submodule is initialized and updated
|
||||
and sources are fetched from there. If GNULIB_REFDIR is set (either
|
||||
as an environment variable or via the --gnulib-refdir option) and is
|
||||
a git repository, then it is used as a reference.
|
||||
|
||||
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources
|
||||
are cloned into that directory using git from \$GNULIB_URL, defaulting
|
||||
to $default_gnulib_url.
|
||||
If the configuration variable GNULIB_REVISION is set in bootstrap.conf,
|
||||
then that revision is checked out.
|
||||
|
||||
* Otherwise, the existing Gnulib sources in the 'gnulib' directory are
|
||||
used. If it is a git repository and the configuration variable
|
||||
GNULIB_REVISION is set in bootstrap.conf, then that revision is
|
||||
checked out.
|
||||
|
||||
If you maintain a package and want to pin a particular revision of the
|
||||
Gnulib sources that has been tested with your package, then there are
|
||||
two possible approaches: either configure a 'gnulib' submodule with the
|
||||
appropriate revision, or set GNULIB_REVISION (and if necessary
|
||||
GNULIB_URL) in bootstrap.conf.
|
||||
|
||||
Running without arguments will suffice in most cases.
|
||||
EOF
|
||||
}
|
||||
|
||||
# Parse options.
|
||||
|
||||
# Use git to update gnulib sources
|
||||
use_git=true
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
--help)
|
||||
usage
|
||||
exit;;
|
||||
--version)
|
||||
set -e
|
||||
echo "autopull.sh $scriptversion"
|
||||
echo "$copyright"
|
||||
exit 0
|
||||
;;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
checkout_only_file=;;
|
||||
--bootstrap-sync)
|
||||
bootstrap_sync=true;;
|
||||
--no-bootstrap-sync)
|
||||
bootstrap_sync=false;;
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
bootstrap_option_hook $option || die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
$use_git || test -n "$GNULIB_SRCDIR" \
|
||||
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option"
|
||||
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option is specified, but does not denote a directory"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Running this script from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
check_build_prerequisites $use_git
|
||||
|
||||
if $use_gnulib || $bootstrap_sync; then
|
||||
prepare_GNULIB_SRCDIR
|
||||
if $bootstrap_sync; then
|
||||
upgrade_bootstrap
|
||||
fi
|
||||
fi
|
||||
|
||||
# Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6.
|
||||
# Also find the compatible sha1 utility on the BSDs
|
||||
if test x"$SKIP_PO" = x; then
|
||||
find_tool SHA1SUM sha1sum gsha1sum shasum sha1
|
||||
fi
|
||||
|
||||
# See if we can use gnulib's git-merge-changelog merge driver.
|
||||
if $use_git && test -d .git && check_exists git; then
|
||||
if git config merge.merge-changelog.driver >/dev/null ; then
|
||||
:
|
||||
elif check_exists git-merge-changelog; then
|
||||
echo "$0: initializing git-merge-changelog driver"
|
||||
git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
|
||||
git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
|
||||
else
|
||||
echo "$0: consider installing git-merge-changelog from gnulib"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----------------------------- Get translations. -----------------------------
|
||||
|
||||
download_po_files() {
|
||||
subdir=$1
|
||||
domain=$2
|
||||
echo "$me: getting translations into $subdir for $domain..."
|
||||
cmd=$(printf "$po_download_command_format" "$subdir" "$domain")
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
# Mirror .po files to $po_dir/.reference and copy only the new
|
||||
# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
|
||||
# Note po files that exist locally only are left in $po_dir but will
|
||||
# not be included in LINGUAS and hence will not be distributed.
|
||||
update_po_files() {
|
||||
# Directory containing primary .po files.
|
||||
# Overwrite them only when we're sure a .po file is new.
|
||||
po_dir=$1
|
||||
domain=$2
|
||||
|
||||
# Mirror *.po files into this dir.
|
||||
# Usually contains *.s1 checksum files.
|
||||
ref_po_dir="$po_dir/.reference"
|
||||
|
||||
test -d $ref_po_dir || mkdir $ref_po_dir || return
|
||||
download_po_files $ref_po_dir $domain \
|
||||
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
||||
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
|
||||
|
||||
langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g')
|
||||
test "$langs" = '*' && langs=x
|
||||
for po in $langs; do
|
||||
case $po in x) continue;; esac
|
||||
new_po="$ref_po_dir/$po.po"
|
||||
cksum_file="$ref_po_dir/$po.s1"
|
||||
if ! test -f "$cksum_file" ||
|
||||
! test -f "$po_dir/$po.po" ||
|
||||
! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then
|
||||
echo "$me: updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" \
|
||||
&& $SHA1SUM < "$new_po" > "$cksum_file" || return
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
case $SKIP_PO in
|
||||
'')
|
||||
if test -d po; then
|
||||
update_po_files po $package || exit
|
||||
fi
|
||||
|
||||
if test -d runtime-po; then
|
||||
update_po_files runtime-po $package-runtime || exit
|
||||
fi;;
|
||||
esac
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
bootstrap_post_pull_hook \
|
||||
|| die "bootstrap_post_pull_hook failed"
|
||||
|
||||
# Don't proceed if there are uninitialized submodules. In particular,
|
||||
# autogen.sh will remove dangling links, which might be links into
|
||||
# uninitialized submodules.
|
||||
# But it's OK if the 'gnulib' submodule is uninitialized, as long as
|
||||
# GNULIB_SRCDIR is set.
|
||||
if $use_git; then
|
||||
# Uninitialized submodules are listed with an initial dash.
|
||||
uninitialized=`git submodule | grep '^-' | awk '{ print $2 }'`
|
||||
if test -n "$GNULIB_SRCDIR"; then
|
||||
uninitialized=`echo "$uninitialized" | grep -v '^gnulib$'`
|
||||
fi
|
||||
if test -n "$uninitialized"; then
|
||||
die "Some git submodules are not initialized: "`echo "$uninitialized" | tr '\n' ',' | sed -e 's|,$|.|'`" Either use option '--no-git', or run 'git submodule update --init' and bootstrap again."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$0: done. Now you can run './autogen.sh'."
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# Local Variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
214
bootstrap
Executable file
214
bootstrap
Executable file
@@ -0,0 +1,214 @@
|
||||
#! /bin/sh
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Originally written by Paul Eggert. The canonical version of this
|
||||
# script is maintained as top/bootstrap in gnulib. However, to be
|
||||
# useful to your package, you should place a copy of it under version
|
||||
# control in the top-level directory of your package. The intent is
|
||||
# that all customization can be done with a bootstrap.conf file also
|
||||
# maintained in your version control; gnulib comes with a template
|
||||
# build-aux/bootstrap.conf to get you started.
|
||||
|
||||
# Please report bugs or propose patches to bug-gnulib@gnu.org.
|
||||
|
||||
scriptversion=2022-07-29.23; # UTC
|
||||
|
||||
me="$0"
|
||||
medir=`dirname "$me"`
|
||||
|
||||
# Read the function library and the configuration.
|
||||
. "$medir"/bootstrap-funclib.sh
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $me [OPTION]...
|
||||
Bootstrap this package from the checked-out sources.
|
||||
|
||||
Optional environment variables:
|
||||
GNULIB_SRCDIR Specifies the local directory where gnulib
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
GNULIB_URL Cloneable URL of the gnulib repository.
|
||||
|
||||
Options:
|
||||
--gnulib-srcdir=DIRNAME specify the local directory where gnulib
|
||||
sources reside. Use this if you already
|
||||
have gnulib sources on your machine, and
|
||||
you want to use these sources. Defaults
|
||||
to \$GNULIB_SRCDIR
|
||||
--gnulib-refdir=DIRNAME specify the local directory where a gnulib
|
||||
repository (with a .git subdirectory) resides.
|
||||
Use this if you already have gnulib sources
|
||||
and history on your machine, and do not want
|
||||
to waste your bandwidth downloading them again.
|
||||
Defaults to \$GNULIB_REFDIR
|
||||
--bootstrap-sync if this bootstrap script is not identical to
|
||||
the version in the local gnulib sources,
|
||||
update this script, and then restart it with
|
||||
/bin/sh or the shell \$CONFIG_SHELL
|
||||
--no-bootstrap-sync do not check whether bootstrap is out of sync
|
||||
--copy copy files instead of creating symbolic links
|
||||
--force attempt to bootstrap even if the sources seem
|
||||
not to have been checked out
|
||||
--no-git do not use git to update gnulib. Requires that
|
||||
\$GNULIB_SRCDIR or the --gnulib-srcdir option
|
||||
points to a gnulib repository with the correct
|
||||
revision
|
||||
--skip-po do not download po files
|
||||
EOF
|
||||
bootstrap_print_option_usage_hook
|
||||
cat <<EOF
|
||||
If the file bootstrap.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
||||
are honored.
|
||||
|
||||
Gnulib sources can be fetched in various ways:
|
||||
|
||||
* If the environment variable GNULIB_SRCDIR is set (either as an
|
||||
environment variable or via the --gnulib-srcdir option), then sources
|
||||
are fetched from that local directory. If it is a git repository and
|
||||
the configuration variable GNULIB_REVISION is set in bootstrap.conf,
|
||||
then that revision is checked out.
|
||||
|
||||
* Otherwise, if this package is in a git repository with a 'gnulib'
|
||||
submodule configured, then that submodule is initialized and updated
|
||||
and sources are fetched from there. If GNULIB_REFDIR is set (either
|
||||
as an environment variable or via the --gnulib-refdir option) and is
|
||||
a git repository, then it is used as a reference.
|
||||
|
||||
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources
|
||||
are cloned into that directory using git from \$GNULIB_URL, defaulting
|
||||
to $default_gnulib_url.
|
||||
If the configuration variable GNULIB_REVISION is set in bootstrap.conf,
|
||||
then that revision is checked out.
|
||||
|
||||
* Otherwise, the existing Gnulib sources in the 'gnulib' directory are
|
||||
used. If it is a git repository and the configuration variable
|
||||
GNULIB_REVISION is set in bootstrap.conf, then that revision is
|
||||
checked out.
|
||||
|
||||
If you maintain a package and want to pin a particular revision of the
|
||||
Gnulib sources that has been tested with your package, then there are
|
||||
two possible approaches: either configure a 'gnulib' submodule with the
|
||||
appropriate revision, or set GNULIB_REVISION (and if necessary
|
||||
GNULIB_URL) in bootstrap.conf.
|
||||
|
||||
Running without arguments will suffice in most cases.
|
||||
EOF
|
||||
}
|
||||
|
||||
# Parse options.
|
||||
|
||||
# Whether to use copies instead of symlinks.
|
||||
copy=false
|
||||
|
||||
# Use git to update gnulib sources
|
||||
use_git=true
|
||||
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
--help)
|
||||
usage
|
||||
exit;;
|
||||
--version)
|
||||
set -e
|
||||
echo "bootstrap $scriptversion"
|
||||
echo "$copyright"
|
||||
exit 0
|
||||
;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
|
||||
--gnulib-refdir=*)
|
||||
GNULIB_REFDIR=${option#--gnulib-refdir=};;
|
||||
--skip-po)
|
||||
SKIP_PO=t;;
|
||||
--force)
|
||||
checkout_only_file=;;
|
||||
--copy)
|
||||
copy=true;;
|
||||
--bootstrap-sync)
|
||||
bootstrap_sync=true;;
|
||||
--no-bootstrap-sync)
|
||||
bootstrap_sync=false;;
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
bootstrap_option_hook $option || die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
$use_git || test -n "$GNULIB_SRCDIR" \
|
||||
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option"
|
||||
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option is specified, but does not denote a directory"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
check_build_prerequisites $use_git
|
||||
|
||||
if ! test -f "$medir"/bootstrap-funclib.sh; then
|
||||
# We have only completed the first phase of an upgrade from a bootstrap
|
||||
# version < 2022-07-24. Need to do the second phase now.
|
||||
bootstrap_sync=true
|
||||
fi
|
||||
|
||||
if $bootstrap_sync; then
|
||||
prepare_GNULIB_SRCDIR
|
||||
upgrade_bootstrap
|
||||
# Since we have now upgraded if needed, no need to try it a second time below.
|
||||
bootstrap_sync=false
|
||||
fi
|
||||
|
||||
echo "$0: Bootstrapping from checked-out $package sources..."
|
||||
|
||||
# Pass GNULIB_SRCDIR to autopull.sh and autogen.sh.
|
||||
export GNULIB_SRCDIR
|
||||
|
||||
# Pass GNULIB_REFDIR to autopull.sh.
|
||||
export GNULIB_REFDIR
|
||||
|
||||
if $use_git || test -z "$SKIP_PO"; then
|
||||
"$medir"/autopull.sh \
|
||||
`if $bootstrap_sync; then echo ' --bootstrap-sync'; else echo ' --no-bootstrap-sync'; fi` \
|
||||
`if test -z "$checkout_only_file"; then echo ' --force'; fi` \
|
||||
`if ! $use_git; then echo ' --no-git'; fi` \
|
||||
`if test -n "$SKIP_PO"; then echo ' --skip-po'; fi` \
|
||||
|| die "autopull.sh failed."
|
||||
fi
|
||||
|
||||
"$medir"/autogen.sh \
|
||||
`if $copy; then echo ' --copy'; fi` \
|
||||
`if test -z "$checkout_only_file"; then echo ' --force'; fi` \
|
||||
|| die "autogen.sh failed."
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# Local Variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
594
bootstrap-funclib.sh
Normal file
594
bootstrap-funclib.sh
Normal file
@@ -0,0 +1,594 @@
|
||||
# A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
|
||||
|
||||
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Originally written by Paul Eggert. The canonical version of this
|
||||
# script is maintained as top/bootstrap-funclib.sh in gnulib. However,
|
||||
# to be useful to your package, you should place a copy of it under
|
||||
# version control in the top-level directory of your package. The
|
||||
# intent is that all customization can be done with a bootstrap.conf
|
||||
# file also maintained in your version control; gnulib comes with a
|
||||
# template build-aux/bootstrap.conf to get you started.
|
||||
|
||||
scriptversion=2022-07-24.15; # UTC
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# Ensure file names are sorted consistently across platforms.
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
# Honor $PERL, but work even if there is none.
|
||||
PERL="${PERL-perl}"
|
||||
|
||||
default_gnulib_url=https://git.savannah.gnu.org/git/gnulib.git
|
||||
|
||||
# Copyright year, for the --version output.
|
||||
copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'`
|
||||
copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
|
||||
# warnf_ FORMAT-STRING ARG1...
|
||||
warnf_ ()
|
||||
{
|
||||
warnf_format_=$1
|
||||
shift
|
||||
nl='
|
||||
'
|
||||
case $* in
|
||||
*$nl*) me_=$(printf "$me"|tr "$nl|" '??')
|
||||
printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
|
||||
*) printf "$me: $warnf_format_" "$@" ;;
|
||||
esac >&2
|
||||
}
|
||||
|
||||
# warn_ WORD1...
|
||||
warn_ ()
|
||||
{
|
||||
# If IFS does not start with ' ', set it and emit the warning in a subshell.
|
||||
case $IFS in
|
||||
' '*) warnf_ '%s\n' "$*";;
|
||||
*) (IFS=' '; warn_ "$@");;
|
||||
esac
|
||||
}
|
||||
|
||||
# die WORD1...
|
||||
die() { warn_ "$@"; exit 1; }
|
||||
|
||||
# ------------------------------ Configuration. ------------------------------
|
||||
|
||||
# Directory that contains package-specific gnulib modules and/or overrides.
|
||||
local_gl_dir=gl
|
||||
|
||||
# Name of the Makefile.am
|
||||
# XXX Not used.
|
||||
gnulib_mk=gnulib.mk
|
||||
|
||||
# List of gnulib modules needed.
|
||||
gnulib_modules=
|
||||
|
||||
# Any gnulib files needed that are not in modules.
|
||||
gnulib_files=
|
||||
|
||||
# A function to be called for each unrecognized option. Returns 0 if
|
||||
# the option in $1 has been processed by the function. Returns 1 if
|
||||
# the option has not been processed by the function. Override it via
|
||||
# your own definition in bootstrap.conf
|
||||
bootstrap_option_hook() { return 1; }
|
||||
|
||||
# A function to be called in order to print the --help information
|
||||
# corresponding to user-defined command-line options.
|
||||
bootstrap_print_option_usage_hook() { :; }
|
||||
|
||||
# A function to be called at the end of autopull.sh.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_post_pull_hook() { :; }
|
||||
|
||||
# A function to be called right after gnulib-tool is run.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_post_import_hook() { :; }
|
||||
|
||||
# A function to be called after everything else in this script.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_epilogue() { :; }
|
||||
|
||||
# The command to download all .po files for a specified domain into a
|
||||
# specified directory. Fill in the first %s with the destination
|
||||
# directory and the second with the domain name.
|
||||
po_download_command_format=\
|
||||
"wget --mirror --level=1 -nd -nv -A.po -P '%s' \
|
||||
https://translationproject.org/latest/%s/"
|
||||
|
||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||
# fall back to the package name (1st argument with munging).
|
||||
extract_package_name='
|
||||
/^AC_INIT(\[*/{
|
||||
s///
|
||||
/^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
|
||||
s//\1/
|
||||
s/[],)].*//
|
||||
p
|
||||
q
|
||||
}
|
||||
s/[],)].*//
|
||||
s/^GNU //
|
||||
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
|
||||
p
|
||||
}
|
||||
'
|
||||
package=$(${AUTOCONF:-autoconf} --trace AC_INIT:\$4 configure.ac 2>/dev/null)
|
||||
if test -z "$package"; then
|
||||
package=$(sed -n "$extract_package_name" configure.ac) \
|
||||
|| die 'cannot find package name in configure.ac'
|
||||
fi
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
source_base=lib
|
||||
m4_base=m4
|
||||
doc_base=doc
|
||||
tests_base=tests
|
||||
gnulib_extra_files="
|
||||
build-aux/install-sh
|
||||
build-aux/mdate-sh
|
||||
build-aux/texinfo.tex
|
||||
build-aux/depcomp
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||
gnulib_tool_option_extras=
|
||||
|
||||
# Other locale categories that need message catalogs.
|
||||
EXTRA_LOCALE_CATEGORIES=
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
XGETTEXT_OPTIONS='\\\
|
||||
--flag=_:1:pass-c-format\\\
|
||||
--flag=N_:1:pass-c-format\\\
|
||||
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
||||
'
|
||||
|
||||
# Package bug report address and copyright holder for gettext files
|
||||
COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
|
||||
MSGID_BUGS_ADDRESS=bug-$package@gnu.org
|
||||
|
||||
# Files we don't want to import.
|
||||
# XXX Not used.
|
||||
excluded_files=
|
||||
|
||||
# File that should exist in the top directory of a checked out hierarchy,
|
||||
# but not in a distribution tarball.
|
||||
checkout_only_file=README-hacking
|
||||
|
||||
# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want
|
||||
# those files to be generated in directories like lib/, m4/, and po/.
|
||||
# Or set it to 'auto' to make this script select which to use based
|
||||
# on which version control system (if any) is used in the source directory.
|
||||
vc_ignore=auto
|
||||
|
||||
# Set this to true in bootstrap.conf to enable --bootstrap-sync by
|
||||
# default.
|
||||
bootstrap_sync=false
|
||||
|
||||
# Override the default configuration, if necessary.
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
# if we were invoked as "sh bootstrap".
|
||||
conffile=`dirname "$me"`/bootstrap.conf
|
||||
test -r "$conffile" && . "$conffile"
|
||||
|
||||
# ------------------------- Build-time prerequisites -------------------------
|
||||
|
||||
check_exists() {
|
||||
if test "$1" = "--verbose"; then
|
||||
($2 --version </dev/null) >/dev/null 2>&1
|
||||
if test $? -ge 126; then
|
||||
# If not found, run with diagnostics as one may be
|
||||
# presented with env variables to set to find the right version
|
||||
($2 --version </dev/null)
|
||||
fi
|
||||
else
|
||||
($1 --version </dev/null) >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
test $? -lt 126
|
||||
}
|
||||
|
||||
# Note this deviates from the version comparison in automake
|
||||
# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
|
||||
# but this should suffice as we won't be specifying old
|
||||
# version formats or redundant trailing .0 in bootstrap.conf.
|
||||
# If we did want full compatibility then we should probably
|
||||
# use m4_version_compare from autoconf.
|
||||
sort_ver() { # sort -V is not generally available
|
||||
ver1="$1"
|
||||
ver2="$2"
|
||||
|
||||
# split on '.' and compare each component
|
||||
i=1
|
||||
while : ; do
|
||||
p1=$(echo "$ver1" | cut -d. -f$i)
|
||||
p2=$(echo "$ver2" | cut -d. -f$i)
|
||||
if [ ! "$p1" ]; then
|
||||
echo "$1 $2"
|
||||
break
|
||||
elif [ ! "$p2" ]; then
|
||||
echo "$2 $1"
|
||||
break
|
||||
elif [ ! "$p1" = "$p2" ]; then
|
||||
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$2 $1"
|
||||
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$1 $2"
|
||||
else # numeric, then lexicographic comparison
|
||||
lp=$(printf "%s\n%s\n" "$p1" "$p2" | LANG=C sort -n | tail -n1)
|
||||
if [ "$lp" = "$p2" ]; then
|
||||
echo "$1 $2"
|
||||
else
|
||||
echo "$2 $1"
|
||||
fi
|
||||
fi
|
||||
break
|
||||
fi
|
||||
i=$(($i+1))
|
||||
done
|
||||
}
|
||||
|
||||
get_version_sed='
|
||||
# Move version to start of line.
|
||||
s/.*[v ]\([0-9]\)/\1/
|
||||
|
||||
# Skip lines that do not start with version.
|
||||
/^[0-9]/!d
|
||||
|
||||
# Remove characters after the version.
|
||||
s/[^.a-z0-9-].*//
|
||||
|
||||
# The first component must be digits only.
|
||||
s/^\([0-9]*\)[a-z-].*/\1/
|
||||
|
||||
#the following essentially does s/5.005/5.5/
|
||||
s/\.0*\([1-9]\)/.\1/g
|
||||
p
|
||||
q'
|
||||
|
||||
get_version() {
|
||||
app=$1
|
||||
|
||||
$app --version >/dev/null 2>&1 || { $app --version; return 1; }
|
||||
|
||||
$app --version 2>&1 | sed -n "$get_version_sed"
|
||||
}
|
||||
|
||||
check_versions() {
|
||||
ret=0
|
||||
|
||||
while read app req_ver; do
|
||||
# We only need libtoolize from the libtool package.
|
||||
if test "$app" = libtool; then
|
||||
app=libtoolize
|
||||
fi
|
||||
# Exempt git if git is not needed.
|
||||
if test "$app" = git; then
|
||||
$check_git || continue
|
||||
fi
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
|
||||
test "$appvar" = TAR && appvar=AMTAR
|
||||
case $appvar in
|
||||
GZIP) ;; # Do not use $GZIP: it contains gzip options.
|
||||
PERL::*) ;; # Keep perl modules as-is
|
||||
*) eval "app=\${$appvar-$app}" ;;
|
||||
esac
|
||||
|
||||
# Handle the still-experimental Automake-NG programs specially.
|
||||
# They remain named as the mainstream Automake programs ("automake",
|
||||
# and "aclocal") to avoid gratuitous incompatibilities with
|
||||
# pre-existing usages (by, say, autoreconf, or custom autogen.sh
|
||||
# scripts), but correctly identify themselves (as being part of
|
||||
# "GNU automake-ng") when asked their version.
|
||||
case $app in
|
||||
automake-ng|aclocal-ng)
|
||||
app=${app%-ng}
|
||||
($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
|
||||
warn_ "Error: '$app' not found or not from Automake-NG"
|
||||
ret=1
|
||||
continue
|
||||
} ;;
|
||||
# Another check is for perl modules. These can be written as
|
||||
# e.g. perl::XML::XPath in case of XML::XPath module, etc.
|
||||
perl::*)
|
||||
# Extract module name
|
||||
app="${app#perl::}"
|
||||
if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
|
||||
warn_ "Error: perl module '$app' not found"
|
||||
ret=1
|
||||
fi
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
if [ "$req_ver" = "-" ]; then
|
||||
# Merely require app to exist; not all prereq apps are well-behaved
|
||||
# so we have to rely on $? rather than get_version.
|
||||
if ! check_exists --verbose $app; then
|
||||
warn_ "Error: '$app' not found"
|
||||
ret=1
|
||||
fi
|
||||
else
|
||||
# Require app to produce a new enough version string.
|
||||
inst_ver=$(get_version $app)
|
||||
if [ ! "$inst_ver" ]; then
|
||||
warn_ "Error: '$app' not found"
|
||||
ret=1
|
||||
else
|
||||
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
||||
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
||||
warnf_ '%s\n' \
|
||||
"Error: '$app' version == $inst_ver is too old" \
|
||||
" '$app' version >= $req_ver is required"
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
print_versions() {
|
||||
echo "Program Min_version"
|
||||
echo "----------------------"
|
||||
printf %s "$buildreq"
|
||||
echo "----------------------"
|
||||
# can't depend on column -t
|
||||
}
|
||||
|
||||
# check_build_prerequisites check_git
|
||||
check_build_prerequisites()
|
||||
{
|
||||
check_git="$1"
|
||||
|
||||
# gnulib-tool requires at least automake and autoconf.
|
||||
# If either is not listed, add it (with minimum version) as a prerequisite.
|
||||
case $buildreq in
|
||||
*automake*) ;;
|
||||
*) buildreq="automake 1.9
|
||||
$buildreq" ;;
|
||||
esac
|
||||
case $buildreq in
|
||||
*autoconf*) ;;
|
||||
*) buildreq="autoconf 2.59
|
||||
$buildreq" ;;
|
||||
esac
|
||||
|
||||
# When we can deduce that gnulib-tool will require patch,
|
||||
# and when patch is not already listed as a prerequisite, add it, too.
|
||||
if test -d "$local_gl_dir" \
|
||||
&& ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
|
||||
case $buildreq in
|
||||
*patch*) ;;
|
||||
*) buildreq="patch -
|
||||
$buildreq" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ! printf '%s' "$buildreq" | check_versions; then
|
||||
echo >&2
|
||||
if test -f README-prereq; then
|
||||
die "See README-prereq for how to get the prerequisite programs"
|
||||
else
|
||||
die "Please install the prerequisite programs"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Warn the user if autom4te appears to be broken; this causes known
|
||||
# issues with at least gettext 0.18.3.
|
||||
probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -)
|
||||
if test "x$probe" != xhi; then
|
||||
warn_ "WARNING: your autom4te wrapper eats stdin;"
|
||||
warn_ "if bootstrap fails, consider upgrading your autotools"
|
||||
fi
|
||||
}
|
||||
|
||||
# find_tool ENVVAR NAMES...
|
||||
# -------------------------
|
||||
# Search for a required program. Use the value of ENVVAR, if set,
|
||||
# otherwise find the first of the NAMES that can be run.
|
||||
# If found, set ENVVAR to the program name, die otherwise.
|
||||
#
|
||||
# FIXME: code duplication, see also gnu-web-doc-update.
|
||||
find_tool ()
|
||||
{
|
||||
find_tool_envvar=$1
|
||||
shift
|
||||
find_tool_names=$@
|
||||
eval "find_tool_res=\$$find_tool_envvar"
|
||||
if test x"$find_tool_res" = x; then
|
||||
for i; do
|
||||
if check_exists $i; then
|
||||
find_tool_res=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test x"$find_tool_res" = x; then
|
||||
warn_ "one of these is required: $find_tool_names;"
|
||||
die "alternatively set $find_tool_envvar to a compatible tool"
|
||||
fi
|
||||
eval "$find_tool_envvar=\$find_tool_res"
|
||||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
# --------------------- Preparing GNULIB_SRCDIR for use. ---------------------
|
||||
# This is part of autopull.sh, but bootstrap needs it too, for self-upgrading.
|
||||
|
||||
cleanup_gnulib() {
|
||||
status=$?
|
||||
# XXX It's a bad idea to erase the submodule directory if it contains local
|
||||
# modifications.
|
||||
rm -fr "$gnulib_path"
|
||||
exit $status
|
||||
}
|
||||
|
||||
git_modules_config () {
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
prepare_GNULIB_SRCDIR ()
|
||||
{
|
||||
if test -n "$GNULIB_SRCDIR"; then
|
||||
# Use GNULIB_SRCDIR directly.
|
||||
# We already checked that $GNULIB_SRCDIR references a directory.
|
||||
# Verify that it contains a gnulib checkout.
|
||||
test -f "$GNULIB_SRCDIR/gnulib-tool" \
|
||||
|| die "Error: --gnulib-srcdir or \$GNULIB_SRCDIR is specified, but does not contain gnulib-tool"
|
||||
elif $use_git; then
|
||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
|
||||
# Get gnulib files. Populate $gnulib_path, possibly updating a
|
||||
# submodule, for use in the rest of the script.
|
||||
|
||||
if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git \
|
||||
&& git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
# Use GNULIB_REFDIR as a reference.
|
||||
echo "$0: getting gnulib files..."
|
||||
if git submodule -h|grep -- --reference > /dev/null; then
|
||||
# Prefer the one-liner available in git 1.6.4 or newer.
|
||||
git submodule update --init --reference "$GNULIB_REFDIR" \
|
||||
"$gnulib_path" || exit $?
|
||||
else
|
||||
# This fallback allows at least git 1.5.5.
|
||||
if test -f "$gnulib_path"/gnulib-tool; then
|
||||
# Since file already exists, assume submodule init already complete.
|
||||
git submodule update -- "$gnulib_path" || exit $?
|
||||
else
|
||||
# Older git can't clone into an empty directory.
|
||||
rmdir "$gnulib_path" 2>/dev/null
|
||||
git clone --reference "$GNULIB_REFDIR" \
|
||||
"$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
|
||||
&& git submodule init -- "$gnulib_path" \
|
||||
&& git submodule update -- "$gnulib_path" \
|
||||
|| exit $?
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# GNULIB_REFDIR is not set or not usable. Ignore it.
|
||||
if git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
echo "$0: getting gnulib files..."
|
||||
git submodule init -- "$gnulib_path" || exit $?
|
||||
git submodule update -- "$gnulib_path" || exit $?
|
||||
|
||||
elif [ ! -d "$gnulib_path" ]; then
|
||||
echo "$0: getting gnulib files..."
|
||||
|
||||
trap cleanup_gnulib 1 2 13 15
|
||||
|
||||
shallow=
|
||||
if test -z "$GNULIB_REVISION"; then
|
||||
if git clone -h 2>&1 | grep -- --depth > /dev/null; then
|
||||
shallow='--depth 2'
|
||||
fi
|
||||
git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|
||||
|| cleanup_gnulib
|
||||
else
|
||||
if git fetch -h 2>&1 | grep -- --depth > /dev/null; then
|
||||
shallow='--depth 2'
|
||||
fi
|
||||
mkdir -p "$gnulib_path"
|
||||
# Only want a shallow checkout of $GNULIB_REVISION, but git does not
|
||||
# support cloning by commit hash. So attempt a shallow fetch by commit
|
||||
# hash to minimize the amount of data downloaded and changes needed to
|
||||
# be processed, which can drastically reduce download and processing
|
||||
# time for checkout. If the fetch by commit fails, a shallow fetch can
|
||||
# not be performed because we do not know what the depth of the commit
|
||||
# is without fetching all commits. So fallback to fetching all commits.
|
||||
git -C "$gnulib_path" init
|
||||
git -C "$gnulib_path" remote add origin \
|
||||
${GNULIB_URL:-$default_gnulib_url}
|
||||
git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \
|
||||
|| git -C "$gnulib_path" fetch origin \
|
||||
|| cleanup_gnulib
|
||||
git -C "$gnulib_path" reset --hard FETCH_HEAD
|
||||
fi
|
||||
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
fi
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
# Verify that the submodule contains a gnulib checkout.
|
||||
test -f "$gnulib_path/gnulib-tool" \
|
||||
|| die "Error: $gnulib_path is supposed to contain a gnulib checkout, but does not contain gnulib-tool"
|
||||
fi
|
||||
|
||||
# XXX Should this be done if $use_git is false?
|
||||
if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
|
||||
&& ! git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
(cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib
|
||||
fi
|
||||
|
||||
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
|
||||
# we no longer need to use git or $gnulib_path below here.
|
||||
}
|
||||
|
||||
# -------- Upgrading bootstrap to the version found in GNULIB_SRCDIR. --------
|
||||
|
||||
upgrade_bootstrap ()
|
||||
{
|
||||
{ cmp -s "$medir"/bootstrap "$GNULIB_SRCDIR/top/bootstrap" \
|
||||
&& cmp -s "$medir"/bootstrap-funclib.sh "$GNULIB_SRCDIR/top/bootstrap-funclib.sh" \
|
||||
&& cmp -s "$medir"/autopull.sh "$GNULIB_SRCDIR/top/autopull.sh" \
|
||||
&& cmp -s "$medir"/autogen.sh "$GNULIB_SRCDIR/top/autogen.sh"; \
|
||||
} || {
|
||||
echo "$0: updating bootstrap & companions and restarting..."
|
||||
case $(sh -c 'echo "$1"' -- a) in
|
||||
a) ignored=--;;
|
||||
*) ignored=ignored;;
|
||||
esac
|
||||
exec sh -c \
|
||||
'{ if test -f "$1"; then cp "$1" "$3"; else cp "$2" "$3"; fi; } && { if test -f "$4"; then cp "$4" "$5"; else rm -f "$5"; fi; } && { if test -f "$6"; then cp "$6" "$7"; else rm -f "$7"; fi; } && { if test -f "$8"; then cp "$8" "$9"; else rm -f "$9"; fi; } && shift && shift && shift && shift && shift && shift && shift && shift && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||
$ignored \
|
||||
"$GNULIB_SRCDIR/top/bootstrap" "$GNULIB_SRCDIR/build-aux/bootstrap" "$medir/bootstrap" \
|
||||
"$GNULIB_SRCDIR/top/bootstrap-funclib.sh" "$medir/bootstrap-funclib.sh" \
|
||||
"$GNULIB_SRCDIR/top/autopull.sh" "$medir/autopull.sh" \
|
||||
"$GNULIB_SRCDIR/top/autogen.sh" "$medir/autogen.sh" \
|
||||
"$0" "$@" --no-bootstrap-sync
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
|
||||
use_gnulib=false
|
||||
else
|
||||
use_gnulib=true
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# Local Variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
91
bootstrap.bat
Normal file
91
bootstrap.bat
Normal file
@@ -0,0 +1,91 @@
|
||||
@echo off
|
||||
:: Copyright (C) 2018-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
setlocal
|
||||
set "svurl=https://git.savannah.gnu.org/cgit"
|
||||
set "gnuliburl=%svurl%/gnulib.git/plain"
|
||||
|
||||
where curl >nul 2>&1
|
||||
if ERRORLEVEL 1 (
|
||||
echo Cannot find curl: it must be installed for bootstrap
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
where sed >nul 2>&1
|
||||
if ERRORLEVEL 1 (
|
||||
echo Cannot find sed: it must be installed for bootstrap
|
||||
echo Hint: you can use the sed provided in the Git for Windows install
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if exist lib goto Downloads
|
||||
mkdir lib
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
|
||||
:Downloads
|
||||
echo -- Downloading Gnulib modules
|
||||
call :Download lib getloadavg.c
|
||||
call :Download lib intprops.h
|
||||
call :Download lib intprops-internal.h
|
||||
|
||||
echo -- Configuring the workspace
|
||||
copy /Y gl\lib\*.* lib > nul
|
||||
|
||||
:: Create a sed script to convert templates
|
||||
if exist convert.sed del /Q convert.sed
|
||||
echo s,@PACKAGE@,make,g > convert.sed
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
echo s,@PACKAGE_BUGREPORT@,bug-make@gnu.org,g >> convert.sed
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
echo s,@PACKAGE_NAME@,GNU Make,g >> convert.sed
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
echo s,@PACKAGE_TARNAME@,make,g >> convert.sed
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
echo s,@PACKAGE_URL@,https://www.gnu.org/software/make/,g >> convert.sed
|
||||
sed -n "s/^AC_INIT(\[GNU.Make\],\[\([0-9.]*\)\].*/s,@PACKAGE_VERSION@,\1,g/p" configure.ac >> convert.sed
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
sed -z -e s/\\\n//g -e "s/[ \t][ \t]*/ /g" -e "s, [^ ]*\.h,,g" -e "s,src/,$(src),g" -e "s,lib/,$(lib),g" Makefile.am | sed -n "s/^\([A-Za-z0-9]*\)_SRCS *= *\(.*\)/s,%%\1_SOURCES%%,\2,/p" >> convert.sed
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
|
||||
echo - Creating Basic.mk
|
||||
sed -f convert.sed Basic.mk.template > Basic.mk
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
echo - Creating src\mkconfig.h
|
||||
sed -f convert.sed src\mkconfig.h.in > src\mkconfig.h
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
|
||||
echo - Creating src\gmk-default.h
|
||||
echo static const char *const GUILE_module_defn = ^" \ > src\gmk-default.h
|
||||
sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" src\gmk-default.scm >> src\gmk-default.h
|
||||
if ERRORLEVEL 1 goto Failed
|
||||
echo ^";>> src\gmk-default.h
|
||||
|
||||
echo.
|
||||
echo Done. Run build_w32.bat to build GNU make.
|
||||
goto :EOF
|
||||
|
||||
:Download
|
||||
if exist "%1\%2" goto :EOF
|
||||
echo - Downloading %1\%2
|
||||
curl -sS -o "%1\%2" "%gnuliburl%/%1/%2"
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
goto :EOF
|
||||
|
||||
:Failed
|
||||
echo *** Bootstrap failed.
|
||||
echo Resolve the issue, or use the configured source in the release tarball
|
||||
exit /b 1
|
||||
65
bootstrap.conf
Normal file
65
bootstrap.conf
Normal file
@@ -0,0 +1,65 @@
|
||||
# Bootstrap configuration. -*-shell-script-*-
|
||||
|
||||
# Copyright (C) 2018-2022 Free Software Foundation, Inc.
|
||||
|
||||
# GNU Make is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 3 of the License, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Allow bootstrap to know that this is not a package
|
||||
checkout_only_file=README.git
|
||||
|
||||
# Choose a specific version of gnulib, when checking out
|
||||
GNULIB_REVISION=stable-202207
|
||||
|
||||
# Always copy files rather than symlink
|
||||
copy=true
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
# Ensure that all our magical output macros are correctly marked as
|
||||
# C (printf) format strings.
|
||||
XGETTEXT_OPTIONS='\\\
|
||||
--from-code=UTF-8\\\
|
||||
--flag=_:1:pass-c-format\\\
|
||||
--flag=N_:1:pass-c-format\\\
|
||||
--flag=DB:2:c-format --flag=DBF:2:c-format --flag=DBS:2:c-format\\\
|
||||
--flag=O:3:c-format --flag=OSN:3:c-format --flag=ONS:3:c-format\\\
|
||||
--flag=OS:3:c-format --flag=OSS:3:c-format --flag=OSSS:3:c-format\\\
|
||||
--flag=ON:3:c-format --flag=ONN:3:c-format\\\
|
||||
'
|
||||
|
||||
# We manage our own .gitignore files
|
||||
vc_ignore=
|
||||
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
autoconf 2.69
|
||||
automake 1.16.1
|
||||
"
|
||||
|
||||
gnulib_name=libgnu
|
||||
gnulib_files="doc/make-stds.texi m4/sig_atomic_t.m4"
|
||||
|
||||
# Using the full strtoll module pulls in a lot of stuff. But, it's pretty
|
||||
# simple to use just the base source file, so pull that. We'll use it in
|
||||
# src/misc.c if strtoll() is not found.
|
||||
gnulib_files="$gnulib_files lib/strtol.c"
|
||||
|
||||
gnulib_modules="\
|
||||
alloca
|
||||
fdl
|
||||
findprog-in
|
||||
getloadavg
|
||||
host-cpu-c-abi
|
||||
largefile
|
||||
make-glob
|
||||
make-macros"
|
||||
38
build.cfg.in
Normal file
38
build.cfg.in
Normal file
@@ -0,0 +1,38 @@
|
||||
# Configuration for building GNU Make in the absence of any 'make' program.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1993-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
# See Makefile.in for comments describing these variables.
|
||||
|
||||
top_srcdir='@top_srcdir@'
|
||||
|
||||
prefix='@prefix@'
|
||||
exec_prefix=`eval echo @exec_prefix@`
|
||||
|
||||
CC='@CC@'
|
||||
AR='@AR@'
|
||||
CFLAGS='@CFLAGS@ @GUILE_CFLAGS@'
|
||||
CPPFLAGS='@CPPFLAGS@'
|
||||
DEFS='@DEFS@'
|
||||
ARFLAGS='@ARFLAGS@'
|
||||
LDFLAGS='@AM_LDFLAGS@ @LDFLAGS@'
|
||||
ALLOCA='@ALLOCA@'
|
||||
LOADLIBES='@LIBS@ @GUILE_LIBS@ @LIBINTL@'
|
||||
REMOTE='@REMOTE@'
|
||||
OBJEXT='@OBJEXT@'
|
||||
EXEEXT='@EXEEXT@'
|
||||
157
build.sh
Executable file
157
build.sh
Executable file
@@ -0,0 +1,157 @@
|
||||
#!/bin/sh
|
||||
# Shell script to build GNU Make in the absence of any 'make' program.
|
||||
|
||||
# Copyright (C) 1993-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Get configure-generated values
|
||||
. ./build.cfg
|
||||
|
||||
: ${OUTDIR:=.}
|
||||
OUTLIB="$OUTDIR/lib"
|
||||
|
||||
# Directory to find libraries in for '-lXXX'.
|
||||
libdir=$exec_prefix/lib
|
||||
# Directory to search by default for included makefiles.
|
||||
includedir=$prefix/include
|
||||
|
||||
localedir=$prefix/share/locale
|
||||
|
||||
defines="-DLOCALEDIR=\"$localedir\" -DLIBDIR=\"$libdir\" -DINCLUDEDIR=\"$includedir\""
|
||||
|
||||
# Look up a make variable value.
|
||||
# It can handle simple recursion where variables are separate words.
|
||||
# Print the value to stdout.
|
||||
get_mk_var ()
|
||||
{
|
||||
file=$1
|
||||
var=$2
|
||||
|
||||
val=
|
||||
v=$(sed -e :a -e '/\\$/N; s/\\\n//; ta' "$file" | sed -n "s=^ *$var *\= *==p")
|
||||
for w in $v; do
|
||||
case $w in
|
||||
(\$[\(\{]*[\)\}]) w=${w#\$[\(\{]}; w=$(get_mk_var "$file" "${w%[\)\}]}") ;;
|
||||
esac
|
||||
val="${val:+$val }$w"
|
||||
done
|
||||
|
||||
printf '%s\n' "$val"
|
||||
}
|
||||
|
||||
# Compile source files. Object files are put into $objs.
|
||||
compile ()
|
||||
{
|
||||
objs=
|
||||
for ofile in "$@"; do
|
||||
# We should try to use a Makefile variable like libgnu_a_SOURCES or
|
||||
# something but just hardcode it.
|
||||
file="${ofile%.$OBJEXT}.c"
|
||||
case $file in
|
||||
(lib/libgnu_a-*.c) file="lib/${file#lib/libgnu_a-}" ;;
|
||||
esac
|
||||
echo "compiling $file..."
|
||||
of="$OUTDIR/$ofile"
|
||||
mkdir -p "${of%/*}"
|
||||
$CC $cflags $CPPFLAGS $CFLAGS -c -o "$of" "$top_srcdir/$file"
|
||||
objs="${objs:+$objs }$of"
|
||||
done
|
||||
}
|
||||
|
||||
# Use config.status to convert a .in file. Output file is put into $out.
|
||||
# $out will be empty if no conversion was needed.
|
||||
convert ()
|
||||
{
|
||||
out=
|
||||
base=$1
|
||||
var="GENERATE_$(echo $base | tr 'a-z./+' A-Z__X)"
|
||||
|
||||
# Is this file disabled?
|
||||
grep "${var}_FALSE\"]=\"\"" config.status >/dev/null && return 0
|
||||
|
||||
# If there's no .in file then no conversion needed
|
||||
in="$top_srcdir/lib/$(echo ${base%.*}.in.${base##*.} | tr / _)"
|
||||
test -f "$in" || return 0
|
||||
|
||||
# Not disabled, so create it
|
||||
out="$OUTLIB/$base"
|
||||
mkdir -p "${out%/*}"
|
||||
|
||||
# First perform the normal replacements, using config.status
|
||||
sed -e 's|@GUARD_PREFIX@|GL|g' \
|
||||
-e 's/@GNULIB_UNISTD_H_GETOPT@/0/g' \
|
||||
"$in" > "${out}_"
|
||||
./config.status --file "${out}__:${out}_"
|
||||
int="${out}__"
|
||||
|
||||
# Then see if there any files we need to include. Unfortunately there's no
|
||||
# algorithmic conversion so we just have to hard-code it.
|
||||
incls=$(sed -n 's/.*definitions* of \(_[^ $]*\).*/\1/p' "$in")
|
||||
|
||||
for inc in $incls; do
|
||||
case $inc in
|
||||
(_GL_FUNCDECL_RPL) fn=$(get_mk_var lib/Makefile CXXDEFS_H) ;;
|
||||
(_GL_ARG_NONNULL) fn=$(get_mk_var lib/Makefile ARG_NONNULL_H) ;;
|
||||
(_GL_WARN_ON_USE) fn=$(get_mk_var lib/Makefile WARN_ON_USE_H) ;;
|
||||
(_Noreturn) fn=$(get_mk_var lib/Makefile _NORETURN_H) ;;
|
||||
(*) echo "Unknown file replacement: $inc"; exit 1 ;;
|
||||
esac
|
||||
|
||||
fn="$top_srcdir/lib/${fn##*/}"
|
||||
test -f "$fn" || { echo "Missing file: $fn"; exit 1; }
|
||||
|
||||
sed "/definitions* of $inc/r $fn" "$int" > "${int}_"
|
||||
int=${int}_
|
||||
done
|
||||
|
||||
# Done!
|
||||
mv "$int" "$out"
|
||||
}
|
||||
|
||||
# Get source files provided from gnulib and convert to object files
|
||||
LIBOBJS=
|
||||
for lo in $( (get_mk_var lib/Makefile libgnu_a_OBJECTS; get_mk_var lib/Makefile libgnu_a_LIBADD) | sed "s=\$[\(\{]OBJEXT[\)\}]=$OBJEXT=g"); do
|
||||
LIBOBJS="${LIBOBJS:+$LIBOBJS }lib/$lo"
|
||||
done
|
||||
|
||||
# Get object files from the Makefile
|
||||
OBJS=$(get_mk_var Makefile make_OBJECTS | sed "s=\$[\(\{]OBJEXT[\)\}]=$OBJEXT=g")
|
||||
|
||||
# Exit as soon as any command fails.
|
||||
set -e
|
||||
|
||||
# Generate gnulib header files that would normally be created by make
|
||||
for b in $(get_mk_var lib/Makefile BUILT_SOURCES); do
|
||||
convert $b
|
||||
done
|
||||
|
||||
# Build the gnulib library
|
||||
cflags="$DEFS -I$OUTLIB -Ilib -I$top_srcdir/lib -I$OUTDIR/src -Isrc -I$top_srcdir/src"
|
||||
compile $LIBOBJS
|
||||
|
||||
echo "creating libgnu.a..."
|
||||
$AR $ARFLAGS "$OUTLIB"/libgnu.a $objs
|
||||
|
||||
# Compile the source files into those objects.
|
||||
cflags="$DEFS $defines -I$OUTDIR/src -Isrc -I$top_srcdir/src -I$OUTLIB -Ilib -I$top_srcdir/lib"
|
||||
compile $OBJS
|
||||
|
||||
# Link all the objects together.
|
||||
echo "linking make..."
|
||||
$CC $CFLAGS $LDFLAGS -L"$OUTLIB" $objs -lgnu $LOADLIBES -o "$OUTDIR/makenew$EXEEXT"
|
||||
mv -f "$OUTDIR/makenew$EXEEXT" "$OUTDIR/make$EXEEXT"
|
||||
|
||||
echo done.
|
||||
458
build_w32.bat
Normal file
458
build_w32.bat
Normal file
@@ -0,0 +1,458 @@
|
||||
@echo off
|
||||
:: Copyright (C) 1996-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
setlocal
|
||||
if not "%RECURSEME%"=="%~0" (
|
||||
set "RECURSEME=%~0"
|
||||
%ComSpec% /s /c ""%~0" %*"
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
call :Reset
|
||||
|
||||
if "%1" == "-h" goto Usage
|
||||
if "%1" == "--help" goto Usage
|
||||
|
||||
echo.
|
||||
echo Creating GNU Make for Windows 9X/NT/2K/XP/Vista/7/8/10
|
||||
echo.
|
||||
|
||||
set MAKE=gnumake
|
||||
set GUILE=Y
|
||||
set COMPILER=cl.exe
|
||||
set O=obj
|
||||
set ARCH=x64
|
||||
set DEBUG=N
|
||||
set DIRENT=Y
|
||||
set VERBOSE=N
|
||||
|
||||
if exist maintMakefile (
|
||||
set MAINT=Y
|
||||
) else (
|
||||
set MAINT=N
|
||||
)
|
||||
|
||||
:ParseSW
|
||||
if "%1" == "--verbose" goto SetVerbose
|
||||
if "%1" == "--debug" goto SetDebug
|
||||
if "%1" == "--without-guile" goto NoGuile
|
||||
if "%1" == "--x86" goto Set32Bit
|
||||
if "%1" == "gcc" goto SetCC
|
||||
if "%1" == "tcc" goto SetTCC
|
||||
if "%1" == "" goto DoneSW
|
||||
goto Usage
|
||||
|
||||
:SetVerbose
|
||||
set VERBOSE=Y
|
||||
shift
|
||||
goto ParseSW
|
||||
|
||||
:SetDebug
|
||||
set DEBUG=Y
|
||||
echo - Building without compiler optimizations
|
||||
shift
|
||||
goto ParseSW
|
||||
|
||||
:NoGuile
|
||||
set GUILE=N
|
||||
echo - Building without Guile
|
||||
shift
|
||||
goto ParseSW
|
||||
|
||||
:Set32Bit
|
||||
set ARCH=x86
|
||||
echo - Building 32bit GNU Make
|
||||
shift
|
||||
goto ParseSW
|
||||
|
||||
:SetCC
|
||||
set COMPILER=gcc
|
||||
set O=o
|
||||
echo - Building with GCC
|
||||
shift
|
||||
goto ParseSW
|
||||
|
||||
:SetTCC
|
||||
set COMPILER=tcc
|
||||
set O=o
|
||||
echo - Building with TinyC
|
||||
shift
|
||||
goto ParseSW
|
||||
|
||||
:DoneSW
|
||||
if "%MAINT%" == "Y" echo - Enabling maintainer mode
|
||||
|
||||
if "%COMPILER%" == "gcc" goto FindGcc
|
||||
if "%COMPILER%" == "tcc" goto FindTcc
|
||||
|
||||
:: Find a compiler. Visual Studio requires a lot of effort to locate :-/.
|
||||
call %COMPILER% >nul 2>&1
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
:: Visual Studio 17 and above provides the "vswhere" tool
|
||||
call :FindVswhere
|
||||
if ERRORLEVEL 1 goto LegacyVS
|
||||
|
||||
for /f "tokens=* usebackq" %%i in (`"%VSWHERE%" -latest -property installationPath`) do (
|
||||
set InstallPath=%%i
|
||||
)
|
||||
set "VSVARS=%InstallPath%\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
:: No "vswhere" or it can't find a compiler. Go old-school.
|
||||
:LegacyVS
|
||||
set "VSVARS=%VS150COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS71COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%VS70COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%V6TOOLS%\VC98\Bin\vcvars32.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%V6TOOLS%\VC97\Bin\vcvars32.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
set "VSVARS=%V5TOOLS%\VC\Bin\vcvars32.bat"
|
||||
call :CheckMSVC
|
||||
if not ERRORLEVEL 1 goto FoundMSVC
|
||||
|
||||
:: We did not find anything--fail
|
||||
echo No MSVC compiler available.
|
||||
echo Please run vcvarsall.bat and/or configure your Path.
|
||||
exit 1
|
||||
|
||||
:FoundMSVC
|
||||
set OUTDIR=.\WinRel
|
||||
set LNKOUT=./WinRel
|
||||
set "OPTS=/O2 /D NDEBUG"
|
||||
set LINKOPTS=
|
||||
if "%DEBUG%" == "Y" set OUTDIR=.\WinDebug
|
||||
if "%DEBUG%" == "Y" set LNKOUT=./WinDebug
|
||||
if "%DEBUG%" == "Y" set "OPTS=/Zi /Od /D _DEBUG"
|
||||
if "%DEBUG%" == "Y" set LINKOPTS=/DEBUG
|
||||
if "%MAINT%" == "Y" set "OPTS=%OPTS% /D MAKE_MAINTAINER_MODE"
|
||||
:: Show the compiler version that we found
|
||||
:: Unfortunately this also shows a "usage" note; I can't find anything better.
|
||||
echo.
|
||||
call %COMPILER%
|
||||
goto Build
|
||||
|
||||
:FindGcc
|
||||
set OUTDIR=.\GccRel
|
||||
set LNKOUT=./GccRel
|
||||
set OPTS=-O2
|
||||
set DIRENT=N
|
||||
if "%DEBUG%" == "Y" set OPTS=-O0
|
||||
if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug
|
||||
if "%DEBUG%" == "Y" set LNKOUT=./GccDebug
|
||||
if "%MAINT%" == "Y" set "OPTS=%OPTS% -DMAKE_MAINTAINER_MODE"
|
||||
:: Show the compiler version that we found
|
||||
echo.
|
||||
call %COMPILER% --version
|
||||
if not ERRORLEVEL 1 goto Build
|
||||
echo No %COMPILER% found.
|
||||
exit 1
|
||||
|
||||
:FindTcc
|
||||
set OUTDIR=.\TccRel
|
||||
set LNKOUT=./TccRel
|
||||
set OPTS=-O2
|
||||
if "%DEBUG%" == "Y" set OPTS=-O0
|
||||
if "%DEBUG%" == "Y" set OUTDIR=.\TccDebug
|
||||
if "%DEBUG%" == "Y" set LNKOUT=./TccDebug
|
||||
if "%MAINT%" == "Y" set "OPTS=%OPTS% -DMAKE_MAINTAINER_MODE"
|
||||
:: Show the compiler version that we found
|
||||
echo.
|
||||
call %COMPILER% -v
|
||||
if not ERRORLEVEL 1 goto Build
|
||||
echo No %COMPILER% found.
|
||||
exit 1
|
||||
|
||||
:Build
|
||||
:: Clean the directory if it exists
|
||||
if exist %OUTDIR%\nul rmdir /S /Q %OUTDIR%
|
||||
|
||||
:: Recreate it
|
||||
mkdir %OUTDIR%
|
||||
mkdir %OUTDIR%\src
|
||||
mkdir %OUTDIR%\src\w32
|
||||
mkdir %OUTDIR%\src\w32\compat
|
||||
mkdir %OUTDIR%\src\w32\subproc
|
||||
mkdir %OUTDIR%\lib
|
||||
|
||||
if "%GUILE%" == "Y" call :ChkGuile
|
||||
|
||||
if not exist src\config.h.W32 goto NotConfig
|
||||
|
||||
echo.
|
||||
echo Compiling %OUTDIR% version
|
||||
|
||||
copy src\config.h.W32 %OUTDIR%\src\config.h
|
||||
|
||||
copy lib\glob.in.h %OUTDIR%\lib\glob.h
|
||||
copy lib\fnmatch.in.h %OUTDIR%\lib\fnmatch.h
|
||||
|
||||
if exist %OUTDIR%\link.sc del %OUTDIR%\link.sc
|
||||
|
||||
call :Compile src/ar
|
||||
call :Compile src/arscan
|
||||
call :Compile src/commands
|
||||
call :Compile src/default
|
||||
call :Compile src/dir
|
||||
call :Compile src/expand
|
||||
call :Compile src/file
|
||||
call :Compile src/function
|
||||
call :Compile src/getopt
|
||||
call :Compile src/getopt1
|
||||
call :Compile src/guile GUILE
|
||||
call :Compile src/hash
|
||||
call :Compile src/implicit
|
||||
call :Compile src/job
|
||||
call :Compile src/load
|
||||
call :Compile src/loadapi
|
||||
call :Compile src/main GUILE
|
||||
call :Compile src/misc
|
||||
call :Compile src/output
|
||||
call :Compile src/read
|
||||
call :Compile src/remake
|
||||
call :Compile src/remote-stub
|
||||
call :Compile src/rule
|
||||
call :Compile src/shuffle
|
||||
call :Compile src/signame
|
||||
call :Compile src/strcache
|
||||
call :Compile src/variable
|
||||
call :Compile src/version
|
||||
call :Compile src/vpath
|
||||
call :Compile src/w32/pathstuff
|
||||
call :Compile src/w32/w32os
|
||||
call :Compile src/w32/compat/posixfcn
|
||||
call :Compile src/w32/subproc/misc
|
||||
call :Compile src/w32/subproc/sub_proc
|
||||
call :Compile src/w32/subproc/w32err
|
||||
call :Compile lib/fnmatch
|
||||
call :Compile lib/glob
|
||||
call :Compile lib/getloadavg
|
||||
|
||||
:: Compile dirent unless it is supported by compiler library (like with gcc).
|
||||
if "%DIRENT%" == "Y" call :Compile src\w32\compat\dirent
|
||||
|
||||
call :Link
|
||||
|
||||
echo.
|
||||
if exist %OUTDIR%\%MAKE%.exe goto Success
|
||||
echo %OUTDIR% build FAILED!
|
||||
exit 1
|
||||
|
||||
:Success
|
||||
echo %OUTDIR% build succeeded.
|
||||
if exist Basic.mk copy /Y Basic.mk Makefile
|
||||
if not exist tests\config-flags.pm copy /Y tests\config-flags.pm.W32 tests\config-flags.pm
|
||||
call :Reset
|
||||
goto :EOF
|
||||
|
||||
::
|
||||
:: Subroutines
|
||||
::
|
||||
|
||||
:Compile
|
||||
if "%VERBOSE%" == "N" echo - Compiling %1.c
|
||||
echo %LNKOUT%/%1.%O% >>%OUTDIR%\link.sc
|
||||
set EXTRAS=
|
||||
if "%2" == "GUILE" set "EXTRAS=%GUILECFLAGS%"
|
||||
if exist "%OUTDIR%\%1.%O%" del "%OUTDIR%\%1.%O%"
|
||||
if "%COMPILER%" == "gcc" goto GccCompile
|
||||
if "%COMPILER%" == "tcc" goto TccCompile
|
||||
|
||||
:: MSVC Compile
|
||||
if "%VERBOSE%" == "Y" echo on
|
||||
call %COMPILER% /nologo /MT /W4 /EHsc %OPTS% /I %OUTDIR%/src /I src /I %OUTDIR%/lib /I lib /I src/w32/include /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.%O% /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c
|
||||
@echo off
|
||||
goto CompileDone
|
||||
|
||||
:GccCompile
|
||||
:: GCC Compile
|
||||
if "%VERBOSE%" == "Y" echo on
|
||||
call %COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c
|
||||
@echo off
|
||||
goto CompileDone
|
||||
|
||||
:TccCompile
|
||||
:: TCC Compile
|
||||
if "%VERBOSE%" == "Y" echo on
|
||||
call %COMPILER% -mthreads -Wall -std=c11 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -D_cdecl= -D_MSC_VER -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c
|
||||
@echo off
|
||||
goto CompileDone
|
||||
|
||||
:CompileDone
|
||||
if not exist "%OUTDIR%\%1.%O%" exit 1
|
||||
goto :EOF
|
||||
|
||||
:Link
|
||||
echo.
|
||||
echo - Linking %LNKOUT%/%MAKE%.exe
|
||||
if "%COMPILER%" == "gcc" goto GccLink
|
||||
if "%COMPILER%" == "tcc" goto TccLink
|
||||
|
||||
:: MSVC Link
|
||||
echo %GUILELIBS% kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib >>%OUTDIR%\link.sc
|
||||
if "%VERBOSE%" == "Y" echo on
|
||||
call link.exe /NOLOGO /SUBSYSTEM:console /PDB:%LNKOUT%\%MAKE%.pdb %LINKOPTS% /OUT:%LNKOUT%\%MAKE%.exe @%LNKOUT%\link.sc
|
||||
@echo off
|
||||
goto :EOF
|
||||
|
||||
:GccLink
|
||||
:: GCC Link
|
||||
if "%VERBOSE%" == "Y" echo on
|
||||
echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
|
||||
call %COMPILER% -mthreads -gdwarf-2 -g3 %OPTS% -o %LNKOUT%/%MAKE%.exe @%LNKOUT%/link.sc -Wl,--out-implib=%LNKOUT%/libgnumake-1.dll.a
|
||||
@echo off
|
||||
goto :EOF
|
||||
|
||||
:TccLink
|
||||
:: TCC Link
|
||||
if "%VERBOSE%" == "Y" echo on
|
||||
echo %GUILELIBS% -lkernel32 -luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lodbc32 -lodbccp32 >>%OUTDIR%\link.sc
|
||||
call %COMPILER% -mthreads %OPTS% -o %LNKOUT%/%MAKE%.exe @%LNKOUT%/link.sc
|
||||
@echo off
|
||||
goto :EOF
|
||||
|
||||
:ChkGuile
|
||||
:: Build with Guile is supported only on NT and later versions
|
||||
if not "%OS%" == "Windows_NT" goto NoGuile
|
||||
call pkg-config --help > %OUTDIR%\guile.tmp 2> NUL
|
||||
if ERRORLEVEL 1 goto NoPkgCfg
|
||||
|
||||
set PKGMSC=
|
||||
if not "%COMPILER%" == "gcc" set PKGMSC=--msvc-syntax
|
||||
|
||||
echo Checking for Guile 2.0
|
||||
call pkg-config --cflags --short-errors "guile-2.0" > %OUTDIR%\gl-c2.tmp 2> NUL
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\gl-c2.tmp
|
||||
|
||||
call pkg-config --libs --static --short-errors %PKGMSC% "guile-2.0" > %OUTDIR%\gl-l2.tmp 2> NUL
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\gl-l2.tmp
|
||||
|
||||
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||
|
||||
echo Checking for Guile 1.8
|
||||
call pkg-config --cflags --short-errors "guile-1.8" > %OUTDIR%\gl-c18.tmp 2> NUL
|
||||
if not ERRORLEVEL 1 set /P GUILECFLAGS= < %OUTDIR%\gl-c18.tmp
|
||||
|
||||
call pkg-config --libs --static --short-errors %PKGMSC% "guile-1.8" > %OUTDIR%\gl-l18.tmp 2> NUL
|
||||
if not ERRORLEVEL 1 set /P GUILELIBS= < %OUTDIR%\gl-l18.tmp
|
||||
|
||||
if not "%GUILECFLAGS%" == "" goto GuileDone
|
||||
|
||||
echo - No Guile found, building without Guile
|
||||
goto GuileDone
|
||||
|
||||
:NoPkgCfg
|
||||
echo - pkg-config not found, building without Guile
|
||||
|
||||
:GuileDone
|
||||
if "%GUILECFLAGS%" == "" goto :EOF
|
||||
|
||||
echo - Guile found: building with Guile
|
||||
set "GUILECFLAGS=%GUILECFLAGS% -DHAVE_GUILE"
|
||||
goto :EOF
|
||||
|
||||
:FindVswhere
|
||||
set VSWHERE=vswhere
|
||||
call "%VSWHERE%" -help >nul 2>&1
|
||||
if not ERRORLEVEL 1 exit /b 0
|
||||
set "VSWHERE=C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere"
|
||||
call "%VSWHERE%" -help >nul 2>&1
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
goto :EOF
|
||||
|
||||
:CheckMSVC
|
||||
if not exist "%VSVARS%" exit /b 1
|
||||
call "%VSVARS%" %ARCH%
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
call %COMPILER% >nul 2>&1
|
||||
if ERRORLEVEL 1 exit /b 1
|
||||
goto :EOF
|
||||
|
||||
:NotConfig
|
||||
echo.
|
||||
echo *** This workspace is not configured.
|
||||
echo Either retrieve the configured source in the release tarball
|
||||
echo or, if building from Git, run the .\bootstrap.bat script first.
|
||||
exit /b 1
|
||||
|
||||
:Usage
|
||||
echo Usage: %0 [options] [gcc] OR [tcc]
|
||||
echo Options:
|
||||
echo. --without-guile Do not compile Guile support even if found
|
||||
echo. --debug Make a Debug build--default is Release
|
||||
echo. --x86 Make a 32bit binary--default is 64bit
|
||||
echo. --help Display these instructions and exit
|
||||
echo.
|
||||
echo. "gcc" means compile with GCC, "tcc" means compile with Tiny C's TCC
|
||||
goto :EOF
|
||||
|
||||
:Reset
|
||||
set ARCH=
|
||||
set COMPILER=
|
||||
set DEBUG=
|
||||
set GUILE=
|
||||
set GUILECFLAGS=
|
||||
set GUILELIBS=
|
||||
set LINKOPTS=
|
||||
set MAKE=
|
||||
set NOGUILE=
|
||||
set O=
|
||||
set OPTS=
|
||||
set OUTDIR=
|
||||
set LNKOUT=
|
||||
set PKGMSC=
|
||||
set VSVARS=
|
||||
goto :EOF
|
||||
97
builddos.bat
Normal file
97
builddos.bat
Normal file
@@ -0,0 +1,97 @@
|
||||
@echo off
|
||||
rem Copyright (C) 1998-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
echo Building Make for MSDOS with DJGPP
|
||||
|
||||
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.
|
||||
|
||||
rem Where is the srcdir?
|
||||
set XSRC=.
|
||||
if not "%XSRC%"=="." goto SmallEnv
|
||||
if "%1%"=="" goto SrcDone
|
||||
if "%1%"=="." goto SrcDone
|
||||
set XSRC=%1
|
||||
|
||||
if not "%XSRC%"=="%1" goto SmallEnv
|
||||
|
||||
:SrcDone
|
||||
|
||||
if not exist src mkdir src
|
||||
if not exist lib mkdir lib
|
||||
|
||||
copy /Y %XSRC%\src\configh.dos .\src\config.h
|
||||
|
||||
copy /Y %XSRC%\lib\glob.in.h .\lib\glob.h
|
||||
copy /Y %XSRC%\lib\fnmatch.in.h .\lib\fnmatch.h
|
||||
|
||||
rem Echo ON so they will see what is going on.
|
||||
@echo on
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/commands.c -o commands.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/output.c -o output.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/job.c -o job.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/dir.c -o dir.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/file.c -o file.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/misc.c -o misc.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DLOCALEDIR=\"/dev/env/DJDIR/share/locale\" -O2 -g %XSRC%/src/main.c -o main.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DINCLUDEDIR=\"/dev/env/DJDIR/include\" -O2 -g %XSRC%/src/read.c -o read.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -DLIBDIR=\"/dev/env/DJDIR/lib\" -O2 -g %XSRC%/src/remake.c -o remake.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/rule.c -o rule.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/implicit.c -o implicit.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/default.c -o default.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/variable.c -o variable.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/expand.c -o expand.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/function.c -o function.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/vpath.c -o vpath.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/hash.c -o hash.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/strcache.c -o strcache.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/version.c -o version.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/ar.c -o ar.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/arscan.c -o arscan.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/signame.c -o signame.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/remote-stub.c -o remote-stub.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/getopt.c -o getopt.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/getopt1.c -o getopt1.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/shuffle.c -o shuffle.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/load.c -o load.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/lib/glob.c -o lib/glob.o
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/lib/fnmatch.c -o lib/fnmatch.o
|
||||
@echo off
|
||||
echo commands.o > respf.$$$
|
||||
for %%f in (job output dir file misc main read remake rule implicit default variable load) do echo %%f.o >> respf.$$$
|
||||
for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1 shuffle) do echo %%f.o >> respf.$$$
|
||||
for %%f in (lib\glob lib\fnmatch) do echo %%f.o >> respf.$$$
|
||||
gcc -c -I./src -I%XSRC%/src -I./lib -I%XSRC%/lib -DHAVE_CONFIG_H -O2 -g %XSRC%/src/guile.c -o guile.o
|
||||
echo guile.o >> respf.$$$
|
||||
@echo Linking...
|
||||
@echo on
|
||||
gcc -o make.exe @respf.$$$
|
||||
@echo off
|
||||
if not exist make.exe echo Make.exe build failed...
|
||||
if exist make.exe echo make.exe is now built!
|
||||
if exist make.exe del respf.$$$
|
||||
if exist make.exe copy /Y %XSRC%\Basic.mk Makefile
|
||||
goto End
|
||||
|
||||
:SmallEnv
|
||||
echo Your environment is too small. Please enlarge it and run me again.
|
||||
|
||||
:End
|
||||
set XRSC=
|
||||
@echo on
|
||||
554
configure.ac
Normal file
554
configure.ac
Normal file
@@ -0,0 +1,554 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
# Copyright (C) 1993-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
AC_INIT([GNU Make],[4.3.92],[bug-make@gnu.org])
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
|
||||
# Autoconf setup
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_SRCDIR([src/vpath.c])
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
|
||||
AC_CONFIG_LIBOBJ_DIR([lib])
|
||||
|
||||
# Automake setup
|
||||
# We have to enable "foreign" because ChangeLog is auto-generated
|
||||
# Automake 1.15 and gnulib don't get along: gnulib has some strange error
|
||||
# in the way it handles getloadavg.c which causes make distcheck to fail.
|
||||
# https://lists.gnu.org/archive/html/bug-gnulib/2018-06/msg00024.html
|
||||
AM_INIT_AUTOMAKE([1.16.1 foreign -Werror -Wall])
|
||||
|
||||
# Checks for programs.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_PROG_CC
|
||||
|
||||
# Configure gnulib
|
||||
gl_EARLY
|
||||
gl_INIT
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CPP
|
||||
AC_CHECK_PROG([AR], [ar], [ar], [ar])
|
||||
# Perl is needed for the test suite (only)
|
||||
AC_CHECK_PROG([PERL], [perl], [perl], [perl])
|
||||
|
||||
# Specialized system macros
|
||||
AC_CANONICAL_HOST
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# Enable gettext, in "external" mode.
|
||||
AM_GNU_GETTEXT_VERSION([0.19.4])
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
# Checks for libraries.
|
||||
AC_SEARCH_LIBS([strerror],[cposix])
|
||||
AC_SEARCH_LIBS([getpwnam], [sun])
|
||||
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STAT
|
||||
|
||||
AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
||||
memory.h sys/param.h sys/resource.h sys/timeb.h sys/time.h \
|
||||
sys/select.h sys/file.h spawn.h])
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AC_C_CONST
|
||||
AC_TYPE_UID_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SSIZE_T
|
||||
AC_TYPE_INTMAX_T
|
||||
AC_TYPE_UINTMAX_T
|
||||
|
||||
# Check for sig_atomic_t
|
||||
gt_TYPE_SIG_ATOMIC_T
|
||||
|
||||
# Find out whether our struct stat returns nanosecond resolution timestamps.
|
||||
|
||||
AC_STRUCT_ST_MTIM_NSEC
|
||||
AC_CACHE_CHECK([whether to use high resolution file timestamps],
|
||||
[make_cv_file_timestamp_hi_res],
|
||||
[ make_cv_file_timestamp_hi_res=no
|
||||
AS_IF([test "$ac_cv_struct_st_mtim_nsec" != no],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif]],
|
||||
[[char a[0x7fffffff < (uintmax_t)-1 >> 30 ? 1 : -1];]])],
|
||||
[make_cv_file_timestamp_hi_res=yes])
|
||||
])])
|
||||
AS_IF([test "$make_cv_file_timestamp_hi_res" = yes], [val=1], [val=0])
|
||||
AC_DEFINE_UNQUOTED([FILE_TIMESTAMP_HI_RES], [$val],
|
||||
[Use high resolution file timestamps if nonzero.])
|
||||
|
||||
AS_IF([test "$make_cv_file_timestamp_hi_res" = yes],
|
||||
[ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt posix4])
|
||||
AS_IF([test "$ac_cv_search_clock_gettime" != no],
|
||||
[ AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
|
||||
[Define to 1 if you have the clock_gettime function.])
|
||||
])
|
||||
])
|
||||
|
||||
# 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;
|
||||
return 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([strtoll strdup strndup stpcpy memrchr mempcpy umask mkstemp \
|
||||
mktemp fdopen dup dup2 getcwd realpath sigsetmask sigaction \
|
||||
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||
mkfifo getrlimit setrlimit setvbuf pipe strerror strsignal \
|
||||
lstat readlink atexit isatty ttyname pselect posix_spawn \
|
||||
posix_spawnattr_setsigmask])
|
||||
|
||||
# We need to check declarations, not just existence, because on Tru64 this
|
||||
# function is not declared without special flags, which themselves cause
|
||||
# other problems. We'll just use our own.
|
||||
AC_CHECK_DECLS([bsd_signal], [], [], [[#define _GNU_SOURCE 1
|
||||
#include <signal.h>]])
|
||||
|
||||
AC_FUNC_FORK
|
||||
|
||||
# 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_CLOSEDIR_VOID
|
||||
|
||||
# dir.c and our glob.c use dirent.d_type if available
|
||||
AC_STRUCT_DIRENT_D_TYPE
|
||||
|
||||
# See if the user wants to add (or not) GNU Guile support
|
||||
AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile],
|
||||
[Support GNU Guile for embedded scripting])])
|
||||
|
||||
# Annoyingly, each version of Guile comes with it's own PC file so we have to
|
||||
# specify them as individual packages. Ugh.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
AS_IF([test "x$with_guile" != xno],
|
||||
[ guile_versions="3.0 2.2 2.0 1.8"
|
||||
guile_version=no
|
||||
have_guile=no
|
||||
AC_MSG_CHECKING([for GNU Guile])
|
||||
for v in $guile_versions; do
|
||||
PKG_CHECK_EXISTS([guile-$v], [guile_version=$v; have_guile=yes; break], [])
|
||||
done
|
||||
AC_MSG_RESULT([$guile_version])
|
||||
AS_IF([test "$have_guile" = yes],
|
||||
[ PKG_CHECK_MODULES(GUILE, [guile-$guile_version])
|
||||
# Unfortunately pkg doesn't help in multi-arch environments where the
|
||||
# package is installed for some architectures but not others; we need
|
||||
# to try to link.
|
||||
keep_CPPFLAGS="$CPPFLAGS"
|
||||
keep_LIBS="$LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $GUILE_CFLAGS"
|
||||
LIBS="$LIBS $GUILE_LIBS"
|
||||
AC_CHECK_HEADER([libguile.h],
|
||||
[AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])],
|
||||
[have_guile=no],
|
||||
[/* Avoid configuration error warnings. */])
|
||||
AS_IF([test "$have_guile" = yes],
|
||||
[ AC_MSG_CHECKING([whether we can link GNU Guile])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <libguile.h>
|
||||
static void *
|
||||
guile_init (void *arg)
|
||||
{
|
||||
(void) arg;
|
||||
return 0;
|
||||
}
|
||||
]], [[
|
||||
scm_with_guile (guile_init, 0);
|
||||
]])],
|
||||
[have_guile=yes],
|
||||
[have_guile=no])
|
||||
AC_MSG_RESULT([$have_guile])])
|
||||
CPPFLAGS="$keep_CPPFLAGS"
|
||||
LIBS="$keep_LIBS"
|
||||
])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = "yes"])
|
||||
|
||||
AC_CHECK_DECLS([sys_siglist, _sys_siglist, __sys_siglist], , ,
|
||||
[AC_INCLUDES_DEFAULT
|
||||
#include <signal.h>
|
||||
/* NetBSD declares sys_siglist in unistd.h. */
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
|
||||
# Check out the wait reality.
|
||||
AC_CHECK_HEADERS([sys/wait.h],[],[],[[#include <sys/types.h>]])
|
||||
AC_CHECK_FUNCS([waitpid wait3])
|
||||
AC_CACHE_CHECK([for union wait], [make_cv_union_wait],
|
||||
[ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#include <sys/wait.h>]],
|
||||
[[union wait status; int pid; pid = wait (&status);
|
||||
#ifdef WEXITSTATUS
|
||||
/* Some POSIXoid systems have both the new-style macros and the old
|
||||
union wait type, and they do not work together. If union wait
|
||||
conflicts with WEXITSTATUS et al, we don't want to use it at all. */
|
||||
if (WEXITSTATUS (status) != 0) pid = -1;
|
||||
#ifdef WTERMSIG
|
||||
/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
|
||||
-- blow chunks here --
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_WAITPID
|
||||
/* Make sure union wait works with waitpid. */
|
||||
pid = waitpid (-1, &status, 0);
|
||||
#endif
|
||||
]])],
|
||||
[make_cv_union_wait=yes],
|
||||
[make_cv_union_wait=no])
|
||||
])
|
||||
AS_IF([test "$make_cv_union_wait" = yes],
|
||||
[ AC_DEFINE([HAVE_UNION_WAIT], [1],
|
||||
[Define to 1 if you have the 'union wait' type in <sys/wait.h>.])
|
||||
])
|
||||
|
||||
|
||||
# If we're building on Windows/DOS/OS/2, add some support for DOS drive specs.
|
||||
AS_IF([test "$PATH_SEPARATOR" = ';'],
|
||||
[ AC_DEFINE([HAVE_DOS_PATHS], [1],
|
||||
[Define to 1 if your system requires backslashes or drive specs in pathnames.])
|
||||
])
|
||||
|
||||
# See if the user wants to use pmake's "customs" distributed build capability
|
||||
AC_SUBST([REMOTE]) REMOTE=stub
|
||||
use_customs=false
|
||||
AC_ARG_WITH([customs],
|
||||
[AS_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],
|
||||
AS_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],
|
||||
AS_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],
|
||||
AS_HELP_STRING([--disable-load],[disable support for the 'load' operation]),
|
||||
[make_cv_load="$enableval" user_load="$enableval"],
|
||||
[make_cv_load="yes"])
|
||||
|
||||
AS_CASE([/$ac_cv_have_decl_dlopen/$ac_cv_have_decl_dlsym/$ac_cv_have_decl_dlerror/],
|
||||
[*/no/*], [make_cv_load=no])
|
||||
|
||||
# We might need -ldl
|
||||
AS_IF([test "$make_cv_load" = yes], [
|
||||
AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=])
|
||||
])
|
||||
|
||||
AS_CASE([/$make_cv_load/$user_load/],
|
||||
[*/no/*], [make_cv_load=no],
|
||||
[AC_DEFINE(MAKE_LOAD, 1,
|
||||
[Define to 1 to enable 'load' support in GNU make.])
|
||||
])
|
||||
|
||||
# If we want load support, we might need to link with export-dynamic.
|
||||
# See if we can figure it out. Unfortunately this is very difficult.
|
||||
# For example passing -rdynamic to the SunPRO linker gives a warning
|
||||
# but succeeds and creates a shared object, not an executable!
|
||||
AS_IF([test "$make_cv_load" = yes], [
|
||||
AC_MSG_CHECKING([If the linker accepts -Wl,--export-dynamic])
|
||||
old_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AC_SUBST([AM_LDFLAGS], [-Wl,--export-dynamic])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([If the linker accepts -rdynamic])
|
||||
LDFLAGS="$old_LDFLAGS -rdynamic"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AC_SUBST([AM_LDFLAGS], [-rdynamic])],
|
||||
[AC_MSG_RESULT([no])])
|
||||
])
|
||||
LDFLAGS="$old_LDFLAGS"
|
||||
])
|
||||
|
||||
# if we have both lstat() and readlink() then we can support symlink
|
||||
# timechecks.
|
||||
AS_IF([test "$ac_cv_func_lstat" = yes && test "$ac_cv_func_readlink" = yes],
|
||||
[ AC_DEFINE([MAKE_SYMLINKS], [1],
|
||||
[Define to 1 to enable symbolic link timestamp checking.])
|
||||
])
|
||||
|
||||
# Use posix_spawn if we have support and the user didn't disable it
|
||||
|
||||
AC_ARG_ENABLE([posix-spawn],
|
||||
AS_HELP_STRING([--disable-posix-spawn],[disable support for posix_spawn()]),
|
||||
[make_cv_posix_spawn="$enableval" user_posix_spawn="$enableval"],
|
||||
[make_cv_posix_spawn="yes"])
|
||||
|
||||
AS_CASE([/$ac_cv_header_spawn/$ac_cv_func_posix_spawn/],
|
||||
[*/no/*], [make_cv_posix_spawn=no])
|
||||
|
||||
AS_IF([test "$make_cv_posix_spawn" = yes],
|
||||
AC_CACHE_CHECK([for posix_spawn that fails synchronously],
|
||||
[make_cv_synchronous_posix_spawn],
|
||||
[make_cv_synchronous_posix_spawn=no
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <errno.h>
|
||||
#include <spawn.h>
|
||||
extern char **environ;
|
||||
int main () {
|
||||
char path[[]] = "./xxx-non-existent";
|
||||
char *argv[[]] = {path, 0};
|
||||
return posix_spawn (0, path, 0, 0, argv, environ) == ENOENT ? 0 : 1;
|
||||
}]])],
|
||||
[make_cv_synchronous_posix_spawn=yes],
|
||||
[make_cv_synchronous_posix_spawn=no],
|
||||
[make_cv_synchronous_posix_spawn="no (cross-compiling)"])]))
|
||||
|
||||
AS_CASE([/$user_posix_spawn/$make_cv_posix_spawn/$make_cv_synchronous_posix_spawn/],
|
||||
[*/no/*], [make_cv_posix_spawn=no],
|
||||
[AC_DEFINE(USE_POSIX_SPAWN, 1, [Define to 1 to use posix_spawn().])
|
||||
])
|
||||
|
||||
# Find the SCCS commands, so we can include them in our default rules.
|
||||
|
||||
AC_CACHE_CHECK([for location of SCCS get command], [make_cv_path_sccs_get], [
|
||||
AS_IF([test -f /usr/sccs/get],
|
||||
[make_cv_path_sccs_get=/usr/sccs/get],
|
||||
[make_cv_path_sccs_get=get])
|
||||
])
|
||||
AC_DEFINE_UNQUOTED([SCCS_GET], ["$make_cv_path_sccs_get"],
|
||||
[Define to the name of the SCCS 'get' command.])
|
||||
|
||||
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
||||
AS_IF([(/usr/sccs/admin -n s.conftest || admin -n s.conftest) >/dev/null 2>&1 &&
|
||||
test -f s.conftest],
|
||||
[ # We successfully created an SCCS file.
|
||||
AC_CACHE_CHECK([if SCCS get command understands -G], [make_cv_sys_get_minus_G],
|
||||
[AS_IF([$make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
||||
test -f conftoast],
|
||||
[make_cv_sys_get_minus_G=yes],
|
||||
[make_cv_sys_get_minus_G=no])
|
||||
])
|
||||
AS_IF([test "$make_cv_sys_get_minus_G" = yes],
|
||||
[AC_DEFINE([SCCS_GET_MINUS_G], [1],
|
||||
[Define to 1 if the SCCS 'get' command understands the '-G<file>' option.])
|
||||
])
|
||||
])
|
||||
rm -f s.conftest conftoast
|
||||
|
||||
# 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], [Build for the WINDOWS32 API.])
|
||||
AC_DEFINE([HAVE_DOS_PATHS], [1], [Support DOS-style pathnames.])
|
||||
])
|
||||
|
||||
AC_DEFINE_UNQUOTED([PATH_SEPARATOR_CHAR],['$PATH_SEPARATOR'],
|
||||
[Define to the character that separates directories in PATH.])
|
||||
|
||||
AC_DEFINE_UNQUOTED([HAVE_DECL_GETLOADAVG],[$HAVE_DECL_GETLOADAVG],
|
||||
[Define to 1 if you have the declaration of 'getloadavg'.])
|
||||
|
||||
# Remember that we ran configure to generate config.h
|
||||
|
||||
AC_DEFINE([MK_CONFIGURE], [1],
|
||||
[Define to 1 if config.h is generated by running the configure script.])
|
||||
|
||||
# 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
|
||||
])
|
||||
|
||||
AS_IF([test "x$make_cv_posix_spawn" = xno && test "x$user_posix_spawn" = xyes],
|
||||
[ echo
|
||||
echo "WARNING: posix_spawn() is not supported on this system."
|
||||
echo
|
||||
])
|
||||
|
||||
# autoconf initializes $prefix to NONE.
|
||||
AM_CONDITIONAL([KNOWN_PREFIX],
|
||||
[test "x$prefix" = xNONE -o "x$prefix" = x/usr/local \
|
||||
-o "x$prefix" = x/usr/gnu -o "x$prefix" = x/usr])
|
||||
|
||||
# Specify what files are to be created.
|
||||
AC_CONFIG_FILES([build.cfg tests/config-flags.pm \
|
||||
Makefile lib/Makefile doc/Makefile po/Makefile.in])
|
||||
# We don't need this: the standard automake output suffices for POSIX systems.
|
||||
#mk/Posix.mk
|
||||
|
||||
# Put build.sh in the build directory so it's easy to find
|
||||
AC_CONFIG_LINKS([build.sh:build.sh])
|
||||
|
||||
# OK, do it!
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
dnl Local Variables:
|
||||
dnl comment-start: "dnl "
|
||||
dnl comment-end: ""
|
||||
dnl comment-start-skip: "\\bdnl\\b\\s *"
|
||||
dnl compile-command: "make configure config.h.in"
|
||||
dnl End:
|
||||
23
doc/.gitignore
vendored
Normal file
23
doc/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
manual/
|
||||
make.t2p/
|
||||
gendocs_template
|
||||
fdl.texi
|
||||
make-stds.texi
|
||||
stamp-vti
|
||||
version.texi
|
||||
make.info*
|
||||
make*.html
|
||||
make.aux
|
||||
make.cp
|
||||
make.cps
|
||||
make.dvi
|
||||
make.fn
|
||||
make.fns
|
||||
make.ky
|
||||
make.log
|
||||
make.pdf
|
||||
make.pg
|
||||
make.ps
|
||||
make.toc
|
||||
make.tp
|
||||
make.vr
|
||||
24
doc/Makefile.am
Normal file
24
doc/Makefile.am
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 2000-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
TEXI2HTML = texi2html
|
||||
TEXI2HTML_FLAGS = -split_chapter
|
||||
|
||||
info_TEXINFOS = make.texi
|
||||
make_TEXINFOS = fdl.texi make-stds.texi
|
||||
|
||||
CLEANFILES = make*.html
|
||||
416
doc/make.1
Normal file
416
doc/make.1
Normal file
@@ -0,0 +1,416 @@
|
||||
.TH MAKE 1 "31 May 2022" "GNU" "User Commands"
|
||||
.SH NAME
|
||||
make \- GNU make utility to maintain groups of programs
|
||||
.SH SYNOPSIS
|
||||
.B make
|
||||
[\fIOPTION\fR]... [\fITARGET\fR]...
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
The
|
||||
.I make
|
||||
utility will determine automatically which pieces of a large program need to
|
||||
be recompiled, and issue the commands to recompile them. The manual describes
|
||||
the GNU implementation of
|
||||
.BR make ,
|
||||
which was written by Richard Stallman and Roland McGrath, and is currently
|
||||
maintained by Paul Smith. Our examples show C programs, since they are very
|
||||
common, but you can use
|
||||
.B make
|
||||
with any programming language whose compiler can be run with a shell command.
|
||||
In fact,
|
||||
.B make
|
||||
is not limited to programs. You can use it to describe any task where some
|
||||
files must be updated automatically from others whenever the others change.
|
||||
.LP
|
||||
To prepare to use
|
||||
.BR make ,
|
||||
you must write a file called the
|
||||
.I makefile
|
||||
that describes the relationships among files in your program, and provides
|
||||
commands for updating each file. In a program, typically the executable file
|
||||
is updated from object files, which are in turn made by compiling source
|
||||
files.
|
||||
.LP
|
||||
Once a suitable makefile exists, each time you change some source files,
|
||||
this simple shell command:
|
||||
.sp 1
|
||||
.RS
|
||||
.B make
|
||||
.RE
|
||||
.sp 1
|
||||
suffices to perform all necessary recompilations.
|
||||
The
|
||||
.B make
|
||||
program uses the makefile description and the last-modification times of the
|
||||
files to decide which of the files need to be updated. For each of those
|
||||
files, it issues the commands recorded in the makefile.
|
||||
.LP
|
||||
.B make
|
||||
executes commands in the
|
||||
.I makefile
|
||||
to update one or more
|
||||
.IR targets ,
|
||||
where
|
||||
.I target
|
||||
is typically a program.
|
||||
If no
|
||||
.B \-f
|
||||
option is present,
|
||||
.B make
|
||||
will look for the makefiles
|
||||
.IR GNUmakefile ,
|
||||
.IR makefile ,
|
||||
and
|
||||
.IR Makefile ,
|
||||
in that order.
|
||||
.LP
|
||||
Normally you should call your makefile either
|
||||
.I makefile
|
||||
or
|
||||
.IR Makefile .
|
||||
(We recommend
|
||||
.I Makefile
|
||||
because it appears prominently near the beginning of a directory
|
||||
listing, right near other important files such as
|
||||
.IR README .)
|
||||
The first name checked,
|
||||
.IR GNUmakefile ,
|
||||
is not recommended for most makefiles. You should use this name if you have a
|
||||
makefile that is specific to GNU
|
||||
.BR make ,
|
||||
and will not be understood by other versions of
|
||||
.BR make .
|
||||
If
|
||||
.I makefile
|
||||
is '\-', the standard input is read.
|
||||
.LP
|
||||
.B make
|
||||
updates a target if it depends on prerequisite files
|
||||
that have been modified since the target was last modified,
|
||||
or if the target does not exist.
|
||||
.SH OPTIONS
|
||||
.sp 1
|
||||
.TP 0.5i
|
||||
\fB\-b\fR, \fB\-m\fR
|
||||
These options are ignored for compatibility with other versions of
|
||||
.BR make .
|
||||
.TP 0.5i
|
||||
\fB\-B\fR, \fB\-\-always\-make\fR
|
||||
Unconditionally make all targets.
|
||||
.TP 0.5i
|
||||
\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
|
||||
Change to directory
|
||||
.I dir
|
||||
before reading the makefiles or doing anything else.
|
||||
If multiple
|
||||
.B \-C
|
||||
options are specified, each is interpreted relative to the
|
||||
previous one:
|
||||
.BR "\-C " /
|
||||
.BR "\-C " etc
|
||||
is equivalent to
|
||||
.BR "\-C " /etc.
|
||||
This is typically used with recursive invocations of
|
||||
.BR make .
|
||||
.TP 0.5i
|
||||
.B \-d
|
||||
Print debugging information in addition to normal processing.
|
||||
The debugging information says which files are being considered for
|
||||
remaking, which file-times are being compared and with what results,
|
||||
which files actually need to be remade, which implicit rules are
|
||||
considered and which are applied---everything interesting about how
|
||||
.B make
|
||||
decides what to do.
|
||||
.TP 0.5i
|
||||
.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 any or all of the following names, comma- or space-separated. Only the
|
||||
first character is significant: the rest may be omitted:
|
||||
.I all
|
||||
for all debugging output (same as using
|
||||
.BR \-d ),
|
||||
.I basic
|
||||
for basic debugging,
|
||||
.I verbose
|
||||
for more verbose basic debugging,
|
||||
.I implicit
|
||||
for showing implicit rule search operations,
|
||||
.I jobs
|
||||
for details on invocation of commands,
|
||||
.I makefile
|
||||
for debugging while remaking makefiles,
|
||||
.I print
|
||||
shows all recipes that are run even if they are silent, and
|
||||
.I why
|
||||
shows the reason
|
||||
.BR make
|
||||
decided to rebuild each target. Use
|
||||
.I none
|
||||
to disable all previous debugging flags.
|
||||
.TP 0.5i
|
||||
\fB\-e\fR, \fB\-\-environment\-overrides\fR
|
||||
Give variables taken from the environment precedence over variables
|
||||
from makefiles.
|
||||
.TP 0.5i
|
||||
\fB\-E\fR \fIstring\fR, \fB\-\-eval\fR \fIstring\fR
|
||||
Interpret \fIstring\fR using the \fBeval\fR function, before parsing any
|
||||
makefiles.
|
||||
.TP 0.5i
|
||||
\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
|
||||
Use
|
||||
.I file
|
||||
as a makefile.
|
||||
.TP 0.5i
|
||||
\fB\-i\fR, \fB\-\-ignore\-errors\fR
|
||||
Ignore all errors in commands executed to remake files.
|
||||
.TP 0.5i
|
||||
\fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
|
||||
Specifies a directory
|
||||
.I dir
|
||||
to search for included makefiles.
|
||||
If several
|
||||
.B \-I
|
||||
options are used to specify several directories, the directories are
|
||||
searched in the order specified.
|
||||
Unlike the arguments to other flags of
|
||||
.BR make ,
|
||||
directories given with
|
||||
.B \-I
|
||||
flags may come directly after the flag:
|
||||
.BI \-I dir
|
||||
is allowed, as well as
|
||||
.B \-I
|
||||
.IR dir .
|
||||
This syntax is allowed for compatibility with the C
|
||||
preprocessor's
|
||||
.B \-I
|
||||
flag.
|
||||
.TP 0.5i
|
||||
\fB\-j\fR [\fIjobs\fR], \fB\-\-jobs\fR[=\fIjobs\fR]
|
||||
Specifies the number of
|
||||
.I jobs
|
||||
(commands) to run simultaneously.
|
||||
If there is more than one
|
||||
.B \-j
|
||||
option, the last one is effective.
|
||||
If the
|
||||
.B \-j
|
||||
option is given without an argument,
|
||||
.BR make
|
||||
will not limit the number of jobs that can run simultaneously.
|
||||
.TP 0.5i
|
||||
\fB\--jobserver-style=\fR\fIstyle\fR
|
||||
The style of jobserver to use. The
|
||||
.I style
|
||||
may be one of
|
||||
.BR fifo ,
|
||||
.BR pipe ,
|
||||
or
|
||||
.B sem
|
||||
(Windows only).
|
||||
.TP 0.5i
|
||||
\fB\-k\fR, \fB\-\-keep\-going\fR
|
||||
Continue as much as possible after an error.
|
||||
While the target that failed, and those that depend on it, cannot
|
||||
be remade, the other dependencies of these targets can be processed
|
||||
all the same.
|
||||
.TP 0.5i
|
||||
\fB\-l\fR [\fIload\fR], \fB\-\-load\-average\fR[=\fIload\fR]
|
||||
Specifies that no new jobs (commands) should be started if there are
|
||||
others jobs running and the load average is at least
|
||||
.I load
|
||||
(a floating-point number).
|
||||
With no argument, removes a previous load limit.
|
||||
.TP 0.5i
|
||||
\fB\-L\fR, \fB\-\-check\-symlink\-times\fR
|
||||
Use the latest mtime between symlinks and target.
|
||||
.TP 0.5i
|
||||
\fB\-n\fR, \fB\-\-just\-print\fR, \fB\-\-dry\-run\fR, \fB\-\-recon\fR
|
||||
Print the commands that would be executed, but do not execute them (except in
|
||||
certain circumstances).
|
||||
.TP 0.5i
|
||||
\fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR
|
||||
Do not remake the file
|
||||
.I file
|
||||
even if it is older than its dependencies, and do not remake anything
|
||||
on account of changes in
|
||||
.IR file .
|
||||
Essentially the file is treated as very old and its rules are ignored.
|
||||
.TP 0.5i
|
||||
\fB\-O\fR[\fItype\fR], \fB\-\-output\-sync\fR[=\fItype\fR]
|
||||
When running multiple jobs in parallel with \fB-j\fR, ensure the output of
|
||||
each job is collected together rather than interspersed with output from
|
||||
other jobs. If
|
||||
.I type
|
||||
is not specified or is
|
||||
.B target
|
||||
the output from the entire recipe for each target is grouped together. If
|
||||
.I type
|
||||
is
|
||||
.B line
|
||||
the output from each command line within a recipe is grouped together.
|
||||
If
|
||||
.I type
|
||||
is
|
||||
.B recurse
|
||||
output from an entire recursive make is grouped together. If
|
||||
.I type
|
||||
is
|
||||
.B none
|
||||
output synchronization is disabled.
|
||||
.TP 0.5i
|
||||
\fB\-p\fR, \fB\-\-print\-data\-base\fR
|
||||
Print the data base (rules and variable values) that results from
|
||||
reading the makefiles; then execute as usual or as otherwise
|
||||
specified.
|
||||
This also prints the version information given by the
|
||||
.B \-v
|
||||
switch (see below).
|
||||
To print the data base without trying to remake any files, use
|
||||
.IR "make \-p \-f/dev/null" .
|
||||
.TP 0.5i
|
||||
\fB\-q\fR, \fB\-\-question\fR
|
||||
``Question mode''.
|
||||
Do not run any commands, or print anything; just return an exit status
|
||||
that is zero if the specified targets are already up to date, nonzero
|
||||
otherwise.
|
||||
.TP 0.5i
|
||||
\fB\-r\fR, \fB\-\-no\-builtin\-rules\fR
|
||||
Eliminate use of the built\-in implicit rules.
|
||||
Also clear out the default list of suffixes for suffix rules.
|
||||
.TP 0.5i
|
||||
\fB\-R\fR, \fB\-\-no\-builtin\-variables\fR
|
||||
Don't define any built\-in variables.
|
||||
.TP 0.5i
|
||||
\fB\-s\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
|
||||
Silent operation; do not print the commands as they are executed.
|
||||
.TP 0.5i
|
||||
.B \-\-no\-silent
|
||||
Cancel the effect of the \fB\-s\fR option.
|
||||
.TP 0.5i
|
||||
\fB\-S\fR, \fB\-\-no\-keep\-going\fR, \fB\-\-stop\fR
|
||||
Cancel the effect of the
|
||||
.B \-k
|
||||
option.
|
||||
.TP 0.5i
|
||||
\fB\-t\fR, \fB\-\-touch\fR
|
||||
Touch files (mark them up to date without really changing them)
|
||||
instead of running their commands.
|
||||
This is used to pretend that the commands were done, in order to fool
|
||||
future invocations of
|
||||
.BR make .
|
||||
.TP 0.5i
|
||||
.B \-\-trace
|
||||
Information about the disposition of each target is printed (why the target is
|
||||
being rebuilt and what commands are run to rebuild it).
|
||||
.TP 0.5i
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
Print the version of the
|
||||
.B make
|
||||
program plus a copyright, a list of authors and a notice that there
|
||||
is no warranty.
|
||||
.TP 0.5i
|
||||
\fB\-w\fR, \fB\-\-print\-directory\fR
|
||||
Print a message containing the working directory
|
||||
before and after other processing.
|
||||
This may be useful for tracking down errors from complicated nests of
|
||||
recursive
|
||||
.B make
|
||||
commands.
|
||||
.TP 0.5i
|
||||
.B \-\-no\-print\-directory
|
||||
Turn off
|
||||
.BR \-w ,
|
||||
even if it was turned on implicitly.
|
||||
.TP 0.5i
|
||||
.BI \-\-shuffle "[=MODE]"
|
||||
Enable shuffling of goal and prerequisite ordering.
|
||||
.I MODE
|
||||
is one of
|
||||
.I none
|
||||
to disable shuffle mode,
|
||||
.I random
|
||||
to shuffle prerequisites in random order,
|
||||
.I reverse
|
||||
to consider prerequisites in reverse order, or an integer
|
||||
.I <seed>
|
||||
which enables
|
||||
.I random
|
||||
mode with a specific
|
||||
.I seed
|
||||
value. If
|
||||
.I MODE
|
||||
is omitted the default is
|
||||
.IR random .
|
||||
.TP 0.5i
|
||||
\fB\-W\fR \fIfile\fR, \fB\-\-what\-if\fR=\fIfile\fR, \fB\-\-new\-file\fR=\fIfile\fR, \fB\-\-assume\-new\fR=\fIfile\fR
|
||||
Pretend that the target
|
||||
.I file
|
||||
has just been modified.
|
||||
When used with the
|
||||
.B \-n
|
||||
flag, this shows you what would happen if you were to modify that file.
|
||||
Without
|
||||
.BR \-n ,
|
||||
it is almost the same as running a
|
||||
.I touch
|
||||
command on the given file before running
|
||||
.BR make ,
|
||||
except that the modification time is changed only in the imagination of
|
||||
.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"
|
||||
The full documentation for
|
||||
.B make
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B make
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info make
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
.SH BUGS
|
||||
See the chapter ``Problems and Bugs'' in
|
||||
.IR "The GNU Make Manual" .
|
||||
.SH AUTHOR
|
||||
This manual page contributed by Dennis Morse of Stanford University.
|
||||
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||
McGrath. Maintained by Paul Smith.
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 1992-1993, 1996-2022 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 https://www.gnu.org/licenses/ .
|
||||
13722
doc/make.texi
Normal file
13722
doc/make.texi
Normal file
File diff suppressed because it is too large
Load Diff
10
gl/.gitignore
vendored
Normal file
10
gl/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
*~
|
||||
#*
|
||||
.#*
|
||||
.*cache
|
||||
*.diff
|
||||
*.patch
|
||||
*.orig
|
||||
*.rej
|
||||
*.out
|
||||
*.log
|
||||
65
gl/README
Normal file
65
gl/README
Normal file
@@ -0,0 +1,65 @@
|
||||
04 July 2022 -*-text-*-
|
||||
|
||||
The gnulib project provides a fantastic array of modules that can support both
|
||||
POSIX and also extended features for GNU software.
|
||||
|
||||
Unfortunately using it in GNU make is problematic: GNU make is a foundational
|
||||
utility (if you don't have a "make" program you pretty much can't build any
|
||||
software), one of our goals in GNU make is to provide scripts (e.g.,
|
||||
"build.sh") that will build GNU make without needing an instance of make.
|
||||
|
||||
Instead of running "./configure && make", you should be able to run
|
||||
"./configure && ./build.sh" and get a build of GNU make as a result.
|
||||
|
||||
However, more and more gnulib modules are relying not on M4 macros and
|
||||
the configure script to manage their configuration, but in addition special
|
||||
makefile recipes that perform various post-configure operations. Since we
|
||||
don't have an instance of "make", we cannot use these modules as-is.
|
||||
|
||||
There are various options we could choose for solving this:
|
||||
|
||||
- Avoid gnulib modules and write our own portability interfaces.
|
||||
I really am not too excited about this.
|
||||
|
||||
- Give up on "build.sh" and require users to already have "make".
|
||||
The argument here is that you must already have a compiler, and it couldn't
|
||||
have been built without "make", and/or if you build it with a cross-compiler
|
||||
then you should be able to use that cross-development environment to build
|
||||
GNU make as well.
|
||||
|
||||
- Provide a "mini-make" with just enough functionality to support the gnulib
|
||||
makefiles but no extra features, that didn't need any complex gnulib
|
||||
modules. As with the first option, I'm not too excited about this.
|
||||
|
||||
Although arguably the second option is the sane one, I'm not really excited
|
||||
about any of them for the time being. So I elected to try something between
|
||||
the first and second options:
|
||||
|
||||
The gnulib-port Git branch will contain unmodified copies of gnulib modules
|
||||
that we want to use with GNU make. From there, we merge them into the main
|
||||
Git branch then modify / simplify them to avoid unnecessary extra modules and
|
||||
allow "build.sh" to be used.
|
||||
|
||||
By keeping the unmodified versions on the gnulib-port branch, we enable Git
|
||||
merge facilities to merge in new versions as follows:
|
||||
|
||||
* Check out the gnulib-port branch
|
||||
|
||||
* Update its content with any updates to gnulib modules. Something like:
|
||||
(
|
||||
cd gl \
|
||||
&& find */. -type f \
|
||||
| while read fn; do
|
||||
test -f "$GNULIB_SRCDIR/$fn" && cp "$GNULIB_SRCDIR/$fn" "$fn"
|
||||
done
|
||||
)
|
||||
|
||||
* Commit the changes _without modification_
|
||||
|
||||
* Check out the main branch
|
||||
|
||||
* Run "git merge --no-ff gnulib-port" to merge in the changes
|
||||
|
||||
* Resolve any conflicts and commit the merge.
|
||||
|
||||
-- pds
|
||||
489
gl/lib/fnmatch.c
Normal file
489
gl/lib/fnmatch.c
Normal file
@@ -0,0 +1,489 @@
|
||||
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Free Software
|
||||
Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Enable GNU extensions in fnmatch.h. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <fnmatch.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
|
||||
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. */
|
||||
|
||||
#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
|
||||
extern int errno;
|
||||
# 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
|
||||
it matches, nonzero if not. */
|
||||
static int internal_fnmatch __P ((const char *pattern, const char *string,
|
||||
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 *string;
|
||||
int no_leading_period;
|
||||
int flags;
|
||||
{
|
||||
register const char *p = pattern, *n = string;
|
||||
register unsigned char c;
|
||||
|
||||
/* Note that this evaluates C many times. */
|
||||
# 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')
|
||||
{
|
||||
c = FOLD (c);
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '?':
|
||||
if (*n == '\0')
|
||||
return FNM_NOMATCH;
|
||||
else if (*n == '/' && (flags & FNM_FILE_NAME))
|
||||
return FNM_NOMATCH;
|
||||
else if (*n == '.' && no_leading_period
|
||||
&& (n == string
|
||||
|| (n[-1] == '/' && (flags & FNM_FILE_NAME))))
|
||||
return FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
case '\\':
|
||||
if (!(flags & FNM_NOESCAPE))
|
||||
{
|
||||
c = *p++;
|
||||
if (c == '\0')
|
||||
/* Trailing \ loses. */
|
||||
return FNM_NOMATCH;
|
||||
c = FOLD (c);
|
||||
}
|
||||
if (FOLD ((unsigned char) *n) != c)
|
||||
return FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
case '*':
|
||||
if (*n == '.' && no_leading_period
|
||||
&& (n == string
|
||||
|| (n[-1] == '/' && (flags & FNM_FILE_NAME))))
|
||||
return FNM_NOMATCH;
|
||||
|
||||
for (c = *p++; c == '?' || c == '*'; c = *p++)
|
||||
{
|
||||
if (*n == '/' && (flags & FNM_FILE_NAME))
|
||||
/* A slash does not match a wildcard under FNM_FILE_NAME. */
|
||||
return FNM_NOMATCH;
|
||||
else if (c == '?')
|
||||
{
|
||||
/* A ? needs to match one character. */
|
||||
if (*n == '\0')
|
||||
/* There isn't another character; no match. */
|
||||
return FNM_NOMATCH;
|
||||
else
|
||||
/* One character of the string is consumed in matching
|
||||
this ? wildcard, so *??? won't match if there are
|
||||
less than three characters. */
|
||||
++n;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == '\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
|
||||
{
|
||||
const char *endp;
|
||||
|
||||
endp = __strchrnul (n, (flags & FNM_FILE_NAME) ? '/' : '\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;
|
||||
}
|
||||
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 '[':
|
||||
{
|
||||
/* Nonzero if the sense of the character class is inverted. */
|
||||
static int posixly_correct;
|
||||
register int not;
|
||||
char cold;
|
||||
|
||||
if (posixly_correct == 0)
|
||||
posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1;
|
||||
|
||||
if (*n == '\0')
|
||||
return FNM_NOMATCH;
|
||||
|
||||
if (*n == '.' && no_leading_period && (n == string
|
||||
|| (n[-1] == '/'
|
||||
&& (flags
|
||||
& FNM_FILE_NAME))))
|
||||
return FNM_NOMATCH;
|
||||
|
||||
if (*n == '/' && (flags & FNM_FILE_NAME))
|
||||
/* `/' cannot be matched. */
|
||||
return FNM_NOMATCH;
|
||||
|
||||
not = (*p == '!' || (posixly_correct < 0 && *p == '^'));
|
||||
if (not)
|
||||
++p;
|
||||
|
||||
c = *p++;
|
||||
for (;;)
|
||||
{
|
||||
unsigned char fn = FOLD ((unsigned char) *n);
|
||||
|
||||
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
||||
{
|
||||
if (*p == '\0')
|
||||
return FNM_NOMATCH;
|
||||
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;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (c1 == CHAR_CLASS_MAX_LENGTH)
|
||||
/* The name is too long and therefore the pattern
|
||||
is ill-formed. */
|
||||
return FNM_NOMATCH;
|
||||
|
||||
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. */
|
||||
return FNM_NOMATCH;
|
||||
else
|
||||
{
|
||||
normal_bracket:
|
||||
if (FOLD (c) == fn)
|
||||
goto matched;
|
||||
|
||||
cold = c;
|
||||
c = *p++;
|
||||
|
||||
if (c == '-' && *p != ']')
|
||||
{
|
||||
/* It is a range. */
|
||||
unsigned char cend = *p++;
|
||||
if (!(flags & FNM_NOESCAPE) && cend == '\\')
|
||||
cend = *p++;
|
||||
if (cend == '\0')
|
||||
return FNM_NOMATCH;
|
||||
|
||||
if (cold <= fn && fn <= FOLD (cend))
|
||||
goto matched;
|
||||
|
||||
c = *p++;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == ']')
|
||||
break;
|
||||
}
|
||||
|
||||
if (!not)
|
||||
return FNM_NOMATCH;
|
||||
break;
|
||||
|
||||
matched:
|
||||
/* Skip the rest of the [...] that already matched. */
|
||||
while (c != ']')
|
||||
{
|
||||
if (c == '\0')
|
||||
/* [... (unterminated) loses. */
|
||||
return FNM_NOMATCH;
|
||||
|
||||
c = *p++;
|
||||
if (!(flags & FNM_NOESCAPE) && c == '\\')
|
||||
{
|
||||
if (*p == '\0')
|
||||
return FNM_NOMATCH;
|
||||
/* XXX 1003.2d11 is unclear if this is right. */
|
||||
++p;
|
||||
}
|
||||
else if (c == '[' && *p == ':')
|
||||
{
|
||||
do
|
||||
if (*++p == '\0')
|
||||
return FNM_NOMATCH;
|
||||
while (*p != ':' || p[1] == ']');
|
||||
p += 2;
|
||||
c = *p;
|
||||
}
|
||||
}
|
||||
if (not)
|
||||
return FNM_NOMATCH;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (c != FOLD ((unsigned char) *n))
|
||||
return FNM_NOMATCH;
|
||||
}
|
||||
|
||||
++n;
|
||||
}
|
||||
|
||||
if (*n == '\0')
|
||||
return 0;
|
||||
|
||||
if ((flags & FNM_LEADING_DIR) && *n == '/')
|
||||
/* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */
|
||||
return 0;
|
||||
|
||||
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__. */
|
||||
85
gl/lib/fnmatch.in.h
Normal file
85
gl/lib/fnmatch.in.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Free Software
|
||||
Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA. */
|
||||
|
||||
#ifndef _FNMATCH_H
|
||||
#define _FNMATCH_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__
|
||||
# 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. */
|
||||
|
||||
#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
|
||||
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||
#undef FNM_PATHNAME
|
||||
#undef FNM_NOESCAPE
|
||||
#undef FNM_PERIOD
|
||||
|
||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||
|
||||
#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
|
||||
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||
#endif
|
||||
|
||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||
#define FNM_NOMATCH 1
|
||||
|
||||
/* 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. */
|
||||
extern int fnmatch __P ((__const char *__pattern, __const char *__name,
|
||||
int __flags));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* fnmatch.h */
|
||||
1437
gl/lib/glob.c
Normal file
1437
gl/lib/glob.c
Normal file
File diff suppressed because it is too large
Load Diff
210
gl/lib/glob.in.h
Normal file
210
gl/lib/glob.in.h
Normal file
@@ -0,0 +1,210 @@
|
||||
/* Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
||||
USA. */
|
||||
|
||||
#ifndef _GLOB_H
|
||||
#define _GLOB_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef __ptr_t
|
||||
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
|
||||
# if !defined __GLIBC__
|
||||
# undef __P
|
||||
# undef __PMT
|
||||
# define __P(protos) protos
|
||||
# define __PMT(protos) protos
|
||||
# if !defined __GNUC__ || __GNUC__ < 2
|
||||
# undef __const
|
||||
# define __const const
|
||||
# endif
|
||||
# endif
|
||||
# define __ptr_t void *
|
||||
#else /* Not C++ or ANSI C. */
|
||||
# undef __P
|
||||
# undef __PMT
|
||||
# define __P(protos) ()
|
||||
# define __PMT(protos) ()
|
||||
# undef __const
|
||||
# define __const
|
||||
# define __ptr_t char *
|
||||
#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 already defined type __size_t.
|
||||
* Defining an own type with a name beginning with '__' is no good.
|
||||
* Anyway if DECC is used and __SIZE_T is defined then __size_t is
|
||||
* already defined (and I hope it's exactly the one we need here).
|
||||
*/
|
||||
# if !(defined __DECC && defined __SIZE_T)
|
||||
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'. */
|
||||
#define GLOB_ERR (1 << 0)/* Return on read errors. */
|
||||
#define GLOB_MARK (1 << 1)/* Append a slash to each name. */
|
||||
#define GLOB_NOSORT (1 << 2)/* Don't sort the names. */
|
||||
#define GLOB_DOOFFS (1 << 3)/* Insert PGLOB->gl_offs NULLs. */
|
||||
#define GLOB_NOCHECK (1 << 4)/* If nothing matches, return the pattern. */
|
||||
#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */
|
||||
#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */
|
||||
#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */
|
||||
|
||||
#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_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */
|
||||
# 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_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
|
||||
|
||||
/* Error returns from `glob'. */
|
||||
#define GLOB_NOSPACE 1 /* Ran out of memory. */
|
||||
#define GLOB_ABORTED 2 /* Read error. */
|
||||
#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. */
|
||||
#if !defined _AMIGA && !defined VMS /* Buggy compiler. */
|
||||
struct stat;
|
||||
#endif
|
||||
typedef struct
|
||||
{
|
||||
__size_t gl_pathc; /* Count of paths matched by the pattern. */
|
||||
char **gl_pathv; /* List of matched pathnames. */
|
||||
__size_t gl_offs; /* Slots to reserve in `gl_pathv'. */
|
||||
int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */
|
||||
|
||||
/* 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 dirent *(*gl_readdir) __PMT ((void *));
|
||||
__ptr_t (*gl_opendir) __PMT ((__const char *));
|
||||
int (*gl_lstat) __PMT ((__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;
|
||||
|
||||
#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.
|
||||
The bits defined above may be set in FLAGS.
|
||||
If a directory cannot be opened or read and ERRFUNC is not nil,
|
||||
it is called with the pathname that caused the error, and the
|
||||
`errno' value from the failing call; if it returns non-zero
|
||||
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
|
||||
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
|
||||
Otherwise, `glob' returns zero. */
|
||||
#if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2
|
||||
extern int glob __P ((__const char *__pattern, int __flags,
|
||||
int (*__errfunc) (__const char *, int),
|
||||
glob_t *__pglob));
|
||||
|
||||
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
||||
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
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* glob.h */
|
||||
132
gl/m4/acinclude.m4
Normal file
132
gl/m4/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-2022 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 <https://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
|
||||
]
|
||||
)
|
||||
33
gl/m4/dospaths.m4
Normal file
33
gl/m4/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-2022 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 <https://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.])])
|
||||
])
|
||||
216
gl/m4/getloadavg.m4
Normal file
216
gl/m4/getloadavg.m4
Normal file
@@ -0,0 +1,216 @@
|
||||
# Check for getloadavg.
|
||||
|
||||
# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 10
|
||||
|
||||
# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
|
||||
# New applications should use gl_GETLOADAVG instead.
|
||||
|
||||
# gl_GETLOADAVG
|
||||
# -------------
|
||||
AC_DEFUN([gl_GETLOADAVG],
|
||||
[AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||
|
||||
# Persuade glibc <stdlib.h> to declare getloadavg().
|
||||
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
||||
|
||||
gl_save_LIBS=$LIBS
|
||||
|
||||
# getloadavg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
|
||||
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
|
||||
HAVE_GETLOADAVG=1
|
||||
AC_CHECK_FUNC([getloadavg], [],
|
||||
[gl_func_getloadavg_done=no
|
||||
|
||||
# Some systems with -lutil have (and need) -lkvm as well, some do not.
|
||||
# On Solaris, -lkvm requires nlist from -lelf, so check that first
|
||||
# to get the right answer into the cache.
|
||||
# For kstat on solaris, we need to test for libelf and libkvm to force the
|
||||
# definition of SVR4 below.
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
AC_CHECK_LIB([elf], [elf_begin], [LIBS="-lelf $LIBS"])
|
||||
AC_CHECK_LIB([kvm], [kvm_open], [LIBS="-lkvm $LIBS"])
|
||||
# Check for the 4.4BSD definition of getloadavg.
|
||||
AC_CHECK_LIB([util], [getloadavg],
|
||||
[LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes])
|
||||
fi
|
||||
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
# There is a commonly available library for RS/6000 AIX.
|
||||
# Since it is not a standard part of AIX, it might be installed locally.
|
||||
gl_getloadavg_LIBS=$LIBS
|
||||
if test $cross_compiling != yes; then
|
||||
LIBS="-L/usr/local/lib $LIBS"
|
||||
fi
|
||||
AC_CHECK_LIB([getloadavg], [getloadavg],
|
||||
[LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes],
|
||||
[LIBS=$gl_getloadavg_LIBS])
|
||||
fi
|
||||
|
||||
# Set up the replacement function if necessary.
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
HAVE_GETLOADAVG=0
|
||||
|
||||
# Solaris has libkstat which does not require root.
|
||||
AC_CHECK_LIB([kstat], [kstat_open])
|
||||
test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
|
||||
|
||||
# AIX has libperfstat which does not require root
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
AC_CHECK_LIB([perfstat], [perfstat_cpu_total])
|
||||
test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
|
||||
fi
|
||||
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
AC_CHECK_HEADER([sys/dg_sys_info.h],
|
||||
[gl_func_getloadavg_done=yes
|
||||
AC_DEFINE([DGUX], [1], [Define to 1 for DGUX with <sys/dg_sys_info.h>.])
|
||||
AC_CHECK_LIB([dgc], [dg_sys_info])])
|
||||
fi
|
||||
fi])
|
||||
|
||||
if test "x$gl_save_LIBS" = x; then
|
||||
GETLOADAVG_LIBS=$LIBS
|
||||
else
|
||||
GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
|
||||
fi
|
||||
LIBS=$gl_save_LIBS
|
||||
|
||||
AC_SUBST([GETLOADAVG_LIBS])dnl
|
||||
|
||||
# Test whether the system declares getloadavg. Solaris has the function
|
||||
# but declares it in <sys/loadavg.h>, not <stdlib.h>.
|
||||
AC_CHECK_HEADERS([sys/loadavg.h])
|
||||
if test $ac_cv_header_sys_loadavg_h = yes; then
|
||||
HAVE_SYS_LOADAVG_H=1
|
||||
else
|
||||
HAVE_SYS_LOADAVG_H=0
|
||||
fi
|
||||
AC_CHECK_DECL([getloadavg], [], [HAVE_DECL_GETLOADAVG=0],
|
||||
[[#if HAVE_SYS_LOADAVG_H
|
||||
/* OpenIndiana has a bug: <sys/time.h> must be included before
|
||||
<sys/loadavg.h>. */
|
||||
# include <sys/time.h>
|
||||
# include <sys/loadavg.h>
|
||||
#endif
|
||||
#include <stdlib.h>]])
|
||||
])# gl_GETLOADAVG
|
||||
|
||||
|
||||
# gl_PREREQ_GETLOADAVG
|
||||
# --------------------
|
||||
# Set up the AC_LIBOBJ replacement of 'getloadavg'.
|
||||
AC_DEFUN([gl_PREREQ_GETLOADAVG],
|
||||
[
|
||||
# Figure out what our getloadavg.c needs.
|
||||
|
||||
AC_CHECK_HEADERS_ONCE([sys/param.h unistd.h])
|
||||
|
||||
# On HPUX9, an unprivileged user can get load averages this way.
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
AC_CHECK_FUNCS([pstat_getdynamic], [gl_func_getloadavg_done=yes])
|
||||
fi
|
||||
|
||||
# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
|
||||
# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
|
||||
# Irix 4.0.5F has the header but not the library.
|
||||
if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
|
||||
&& test "$ac_cv_lib_kvm_kvm_open" = yes; then
|
||||
gl_func_getloadavg_done=yes
|
||||
AC_DEFINE([SVR4], [1], [Define to 1 on System V Release 4.])
|
||||
fi
|
||||
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
AC_CHECK_HEADER([inq_stats/cpustats.h],
|
||||
[gl_func_getloadavg_done=yes
|
||||
AC_DEFINE([UMAX], [1], [Define to 1 for Encore UMAX.])
|
||||
AC_DEFINE([UMAX4_3], [1],
|
||||
[Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h>
|
||||
instead of <sys/cpustats.h>.])])
|
||||
fi
|
||||
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
AC_CHECK_HEADER([sys/cpustats.h],
|
||||
[gl_func_getloadavg_done=yes; AC_DEFINE([UMAX])])
|
||||
fi
|
||||
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
AC_CHECK_HEADERS([mach/mach.h])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([nlist.h],
|
||||
[AC_CHECK_MEMBERS([struct nlist.n_un.n_name],
|
||||
[], [],
|
||||
[#include <nlist.h>])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
|
||||
[[struct nlist x;
|
||||
#ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
|
||||
x.n_un.n_name = "";
|
||||
#else
|
||||
x.n_name = "";
|
||||
#endif]])],
|
||||
[AC_DEFINE([N_NAME_POINTER], [1],
|
||||
[Define to 1 if the nlist n_name member is a pointer])])
|
||||
])dnl
|
||||
])# gl_PREREQ_GETLOADAVG
|
||||
|
||||
# ---- GNU make
|
||||
# These macros are imported from stdlib which we don't want to include
|
||||
# Only the getloadavg content is imported.
|
||||
|
||||
AC_DEFUN_ONCE([gl_STDLIB_H],
|
||||
[
|
||||
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||
|
||||
dnl Check for declarations of anything we want to poison if the
|
||||
dnl corresponding gnulib module is not in use, and which is not
|
||||
dnl guaranteed by C89.
|
||||
gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
|
||||
#if HAVE_SYS_LOADAVG_H
|
||||
/* OpenIndiana has a bug: <sys/time.h> must be included before
|
||||
<sys/loadavg.h>. */
|
||||
# include <sys/time.h>
|
||||
# include <sys/loadavg.h>
|
||||
#endif
|
||||
#if HAVE_RANDOM_H
|
||||
# include <random.h>
|
||||
#endif
|
||||
]], [getloadavg])
|
||||
])
|
||||
|
||||
# gl_STDLIB_MODULE_INDICATOR([modulename])
|
||||
# sets the shell variable that indicates the presence of the given module
|
||||
# to a C preprocessor expression that will evaluate to 1.
|
||||
# This macro invocation must not occur in macros that are AC_REQUIREd.
|
||||
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
|
||||
[
|
||||
dnl Ensure to expand the default settings once only.
|
||||
gl_STDLIB_H_REQUIRE_DEFAULTS
|
||||
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR_FOR_TESTS([$1])
|
||||
])
|
||||
|
||||
# Initializes the default values for AC_SUBSTed shell variables.
|
||||
# This macro must not be AC_REQUIREd. It must only be invoked, and only
|
||||
# outside of macros or in macros that are not AC_REQUIREd.
|
||||
AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
|
||||
[
|
||||
m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS], [
|
||||
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG])
|
||||
])
|
||||
m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS])
|
||||
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
||||
[
|
||||
dnl Assume proper GNU behavior unless another module says otherwise.
|
||||
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
|
||||
])
|
||||
24
gl/modules/concat-filename
Normal file
24
gl/modules/concat-filename
Normal file
@@ -0,0 +1,24 @@
|
||||
Description:
|
||||
Construct a full filename by concatenating a directory name, a relative
|
||||
filename, and a suffix.
|
||||
|
||||
Files:
|
||||
lib/concat-filename.h
|
||||
lib/concat-filename.c
|
||||
|
||||
Depends-on:
|
||||
filename
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
lib_SOURCES += concat-filename.c
|
||||
|
||||
Include:
|
||||
"concat-filename.h"
|
||||
|
||||
License:
|
||||
LGPLv2+
|
||||
|
||||
Maintainer:
|
||||
all
|
||||
28
gl/modules/findprog-in
Normal file
28
gl/modules/findprog-in
Normal file
@@ -0,0 +1,28 @@
|
||||
Description:
|
||||
Locating a program in a given path.
|
||||
|
||||
Files:
|
||||
lib/findprog.h
|
||||
lib/findprog-in.c
|
||||
m4/findprog-in.m4
|
||||
m4/eaccess.m4
|
||||
|
||||
Depends-on:
|
||||
stdbool
|
||||
filename
|
||||
concat-filename
|
||||
|
||||
configure.ac:
|
||||
gl_FINDPROG_IN
|
||||
|
||||
Makefile.am:
|
||||
lib_SOURCES += findprog.h findprog-in.c
|
||||
|
||||
Include:
|
||||
"findprog.h"
|
||||
|
||||
License:
|
||||
LGPLv2+
|
||||
|
||||
Maintainer:
|
||||
all
|
||||
40
gl/modules/getloadavg
Normal file
40
gl/modules/getloadavg
Normal file
@@ -0,0 +1,40 @@
|
||||
Description:
|
||||
Return the current system load averages.
|
||||
|
||||
Files:
|
||||
lib/getloadavg.c
|
||||
m4/getloadavg.m4
|
||||
|
||||
Depends-on:
|
||||
snippet/warn-on-use
|
||||
extensions
|
||||
intprops [test $HAVE_GETLOADAVG = 0]
|
||||
stdbool [test $HAVE_GETLOADAVG = 0]
|
||||
|
||||
configure.ac:
|
||||
gl_STDLIB_H
|
||||
gl_STDLIB_H_REQUIRE_DEFAULTS
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
gl_GETLOADAVG
|
||||
gl_CONDITIONAL([GL_COND_OBJ_GETLOADAVG], [test $HAVE_GETLOADAVG = 0])
|
||||
AM_COND_IF([GL_COND_OBJ_GETLOADAVG], [
|
||||
gl_PREREQ_GETLOADAVG
|
||||
])
|
||||
gl_STDLIB_MODULE_INDICATOR([getloadavg])
|
||||
|
||||
Makefile.am:
|
||||
if GL_COND_OBJ_GETLOADAVG
|
||||
lib_SOURCES += getloadavg.c
|
||||
endif
|
||||
|
||||
Include:
|
||||
<stdlib.h>
|
||||
|
||||
Link:
|
||||
$(GETLOADAVG_LIBS)
|
||||
|
||||
License:
|
||||
GPL
|
||||
|
||||
Maintainer:
|
||||
Jim Meyering
|
||||
74
gl/modules/make-glob
Normal file
74
gl/modules/make-glob
Normal file
@@ -0,0 +1,74 @@
|
||||
Description:
|
||||
GNU make version of fnmatch()/glob() functions. This is a holdover from
|
||||
a very old version of the globbing library.
|
||||
|
||||
Files:
|
||||
lib/fnmatch.c
|
||||
lib/fnmatch.in.h
|
||||
lib/glob.c
|
||||
lib/glob.in.h
|
||||
|
||||
configure.ac:
|
||||
# Check the system to see if it provides GNU glob. If not, use our
|
||||
# local version.
|
||||
AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
|
||||
[ AC_EGREP_CPP([gnu glob],[
|
||||
#include <features.h>
|
||||
#include <glob.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
||||
# include <gnu-versions.h>
|
||||
# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
|
||||
gnu glob
|
||||
# endif
|
||||
#endif],
|
||||
[make_cv_sys_gnu_glob=yes],
|
||||
[make_cv_sys_gnu_glob=no])])
|
||||
|
||||
# Tell automake about this, so it can build the right .c files.
|
||||
AM_CONDITIONAL([USE_SYSTEM_GLOB], [test "$make_cv_sys_gnu_glob" = yes])
|
||||
|
||||
# Tell build.sh which to use
|
||||
USE_SYSTEM_GLOB="$make_cv_sys_gnu_glob"
|
||||
AC_SUBST([USE_SYSTEM_GLOB])
|
||||
|
||||
Makefile.am:
|
||||
if !USE_SYSTEM_GLOB
|
||||
libgnu_a_SOURCES += fnmatch.c
|
||||
|
||||
BUILT_SOURCES += fnmatch.h
|
||||
|
||||
fnmatch.h: fnmatch.in.h $(top_builddir)/config.status
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
cat $(srcdir)/fnmatch.in.h; \
|
||||
} > $@-t && \
|
||||
mv -f $@-t $@
|
||||
|
||||
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
|
||||
|
||||
libgnu_a_SOURCES += glob.c
|
||||
|
||||
BUILT_SOURCES += glob.h
|
||||
|
||||
glob.h: glob.in.h $(top_builddir)/config.status
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
cat $(srcdir)/glob.in.h; \
|
||||
} > $@-t && \
|
||||
mv -f $@-t $@
|
||||
|
||||
MOSTLYCLEANFILES += glob.h glob.h-t
|
||||
endif
|
||||
|
||||
EXTRA_DIST += fnmatch.in.h glob.in.h
|
||||
|
||||
Include:
|
||||
<glob.h>
|
||||
|
||||
License:
|
||||
LGPLv2+
|
||||
|
||||
Maintainer:
|
||||
all, glibc
|
||||
16
gl/modules/make-macros
Normal file
16
gl/modules/make-macros
Normal file
@@ -0,0 +1,16 @@
|
||||
Description:
|
||||
Install m4 macros for GNU make.
|
||||
|
||||
Files:
|
||||
m4/acinclude.m4
|
||||
m4/dospaths.m4
|
||||
|
||||
configure.ac:
|
||||
# Check for DOS-style pathnames.
|
||||
pds_AC_DOS_PATHS
|
||||
|
||||
License:
|
||||
GPLv3+
|
||||
|
||||
Maintainer:
|
||||
gnumake
|
||||
549
maintMakefile
Normal file
549
maintMakefile
Normal file
@@ -0,0 +1,549 @@
|
||||
# Maintainer-only makefile segment. This contains things that are relevant
|
||||
# only if you have the full copy of the GNU make sources from the Git
|
||||
# tree, not a dist copy.
|
||||
|
||||
# --------------------- #
|
||||
# Updating everything. #
|
||||
# --------------------- #
|
||||
|
||||
.PHONY: update
|
||||
update:
|
||||
|
||||
BUGLIST := bug-make@gnu.org
|
||||
|
||||
# These are related to my personal setup.
|
||||
GPG_KEYID := 80CB727A20C79BB2
|
||||
|
||||
# SRCROOTDIR is just a handy location to keep source files in
|
||||
SRCROOTDIR ?= $(HOME)/src
|
||||
|
||||
# Where to put the CVS checkout of the GNU web repository
|
||||
GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
|
||||
|
||||
# Where to put the CVS checkout of the GNU make web repository
|
||||
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
|
||||
|
||||
# Enable Perl warnings for the test suite
|
||||
PERLFLAGS := -w
|
||||
|
||||
# We like mondo-warnings!
|
||||
# Also force comments to be preserved. This helps when using ccache, in
|
||||
# combination with GCC 7's implicit-fallthrough warning.
|
||||
MAKE_CFLAGS := -C -Wall -Wextra -Werror -Wwrite-strings -Wshadow \
|
||||
-Wdeclaration-after-statement -Wbad-function-cast -Wformat-security \
|
||||
-Wtype-limits -Wunused-but-set-parameter -Wlogical-op -Wpointer-arith \
|
||||
-Wignored-qualifiers -Wformat-signedness -Wduplicated-cond
|
||||
|
||||
AM_CFLAGS += $(MAKE_CFLAGS)
|
||||
|
||||
# Unfortunately the Guile headers are sometimes broken. Convince GCC
|
||||
# to treat them as system headers so warnings are ignored.
|
||||
GUILE_CFLAGS := $(patsubst -I%,-isystem %,$(GUILE_CFLAGS))
|
||||
|
||||
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
|
||||
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
||||
|
||||
# Create preprocessor output files--GCC specific!
|
||||
%.i : %.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
|
||||
|
||||
# Create the mkconfig.h file for non-POSIX config headers
|
||||
|
||||
all: src/mkconfig.h
|
||||
src/mkconfig.h: src/mkconfig.h.in config.status
|
||||
./config.status --header=$@
|
||||
|
||||
# Build the README
|
||||
|
||||
all: README
|
||||
README : README.in config.status
|
||||
./config.status --file=$@
|
||||
|
||||
# Construct Makefiles by adding on dependencies, etc.
|
||||
#
|
||||
cvt = $(patsubst $1/%,$$($1)%,$(filter %.c,$2))
|
||||
Basic.mk: Basic.mk.template .dep_segment Makefile
|
||||
rm -f $@
|
||||
sed -e 's@%make_SOURCES%@$(call cvt,src,$(make_SRCS))@g' \
|
||||
-e 's@%w32_SOURCES%@$(call cvt,src,$(w32_SRCS))@g' \
|
||||
-e 's@%vms_SOURCES%@$(call cvt,src,$(vms_SRCS))@g' \
|
||||
-e 's@%amiga_SOURCES%@$(call cvt,src,$(amiga_SRCS))@g' \
|
||||
-e 's@%loadavg_SOURCES%@$(call cvt,lib,$(loadavg_SRCS))@g' \
|
||||
-e 's@%alloca_SOURCES%@$(call cvt,lib,$(alloca_SRCS))@g' \
|
||||
-e 's@%glob_SOURCES%@$(call cvt,lib,$(glob_SRCS))@g' \
|
||||
$< > $@
|
||||
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
|
||||
echo >>$@; echo '$$(OBJECTS): $$(SRCDIR)/src/mkconfig.h' >>$@; \
|
||||
sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)\1.$$(OBJEXT):@' \
|
||||
-e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
|
||||
-e 's@$$(SRCDIR)/src/config.h@$$(OUTDIR)src/config.h@g' \
|
||||
-e 's@$$(SRCDIR)/lib/alloca.h@@g' \
|
||||
-e 's@$$(SRCDIR)/lib/stdbool.h@@g' \
|
||||
$(word 2,$^) >>$@
|
||||
chmod a-w $@
|
||||
|
||||
|
||||
# Use automake to build a dependency list file, for Makebase.mk.
|
||||
#
|
||||
# Automake used to have a --generate-deps flag but it's gone now, so we have
|
||||
# to do it ourselves.
|
||||
#
|
||||
DEP_FILES := $(wildcard src/$(DEPDIR)/*.Po)
|
||||
.dep_segment: Makefile.am maintMakefile $(DEP_FILES)
|
||||
rm -f $@
|
||||
(for f in src/$(DEPDIR)/*.Po; do \
|
||||
echo ""; \
|
||||
echo "# $$f"; \
|
||||
sed -e '/^[^:]*\.[ch] *:/d' \
|
||||
-e 's, /usr/[^ ]*,,g' \
|
||||
-e 's, $(srcdir)/, ,g' \
|
||||
-e '/^ *\\$$/d' \
|
||||
-e '/^ *$$/d' \
|
||||
< $$f; \
|
||||
done) > $@
|
||||
|
||||
# Cleaning
|
||||
|
||||
GIT := git
|
||||
|
||||
# git-clean: Clean all "ignored" files. Leave untracked files.
|
||||
# git-very-clean: Clean all files that aren't stored in source control.
|
||||
|
||||
.PHONY: git-clean git-very-clean
|
||||
git-clean:
|
||||
-$(GIT) clean -fdX
|
||||
git-very-clean: git-clean
|
||||
-$(GIT) clean -fdx
|
||||
|
||||
|
||||
## ---------------------- ##
|
||||
## Generating ChangeLog. ##
|
||||
## ---------------------- ##
|
||||
|
||||
# Where the gnulib project has been locally cloned
|
||||
GNULIBDIR ?= $(or $(wildcard $(GNULIB_SRCDIR)),./gnulib)
|
||||
|
||||
gl2cl-date := 2013-10-10
|
||||
gl2cl := $(GNULIBDIR)/build-aux/gitlog-to-changelog
|
||||
|
||||
# Rebuild the changelog whenever a new commit is added
|
||||
ChangeLog: .check-git-HEAD
|
||||
if test -f '$(gl2cl)'; then \
|
||||
'$(gl2cl)' --since='$(gl2cl-date)' > '$@'; \
|
||||
else \
|
||||
echo "WARNING: $(gl2cl) is not available. No $@ generated."; \
|
||||
fi
|
||||
|
||||
.check-git-HEAD: FORCE
|
||||
sha="`git rev-parse HEAD`"; \
|
||||
test -f '$@' && [ "`cat '$@' 2>/dev/null`" = "$$sha" ] \
|
||||
|| echo "$$sha" > '$@'
|
||||
|
||||
.PHONY: FORCE
|
||||
FORCE:;@:
|
||||
|
||||
## ---------------- ##
|
||||
## Updating files. ##
|
||||
## ---------------- ##
|
||||
RSYNC = rsync -Lrtvz
|
||||
WGET = wget --passive-ftp -np -nv
|
||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||
|
||||
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
|
||||
echo $(target) is unchanged; rm -f $(target).t; \
|
||||
else \
|
||||
mv -f $(target).t $(target); \
|
||||
fi
|
||||
|
||||
# ------------------- #
|
||||
# Updating PO files. #
|
||||
# ------------------- #
|
||||
|
||||
# NOTE: This is handled by the bootstrap script now
|
||||
|
||||
#update: po-update
|
||||
update: po-check
|
||||
|
||||
# PO archive mirrors --- Be careful; some might not be fully populated!
|
||||
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
|
||||
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
|
||||
|
||||
po_wget_flags = --recursive --level=1 --no-directories --no-check-certificate
|
||||
po_repo = https://translationproject.org/latest/$(PACKAGE)
|
||||
po_sync = translationproject.org::tp/latest/$(PACKAGE)/
|
||||
|
||||
.PHONY: do-po-update po-update
|
||||
do-po-update:
|
||||
tmppo="/tmp/po-$(PACKAGE)-$(PACKAGE_VERSION).$$$$" \
|
||||
&& rm -rf "$$tmppo" \
|
||||
&& mkdir "$$tmppo" \
|
||||
&& $(RSYNC) $(po_sync) "$$tmppo" \
|
||||
&& cp "$$tmppo"/*.po $(top_srcdir)/po \
|
||||
&& rm -rf "$$tmppo"
|
||||
cd po && $(MAKE) update-po
|
||||
$(MAKE) po-check
|
||||
|
||||
po-update:
|
||||
test -d "po" && $(MAKE) do-po-update
|
||||
|
||||
# -------------------------- #
|
||||
# Updating GNU build files. #
|
||||
# -------------------------- #
|
||||
|
||||
# Note: this is handled by the bootstrap script now
|
||||
#update: scm-update
|
||||
|
||||
.PHONY: scm-update
|
||||
scm-update: get-build-aux/texinfo.tex get-build-aux/config.guess \
|
||||
get-build-aux/config.sub get-doc/make-stds.texi get-doc/fdl.texi
|
||||
|
||||
# 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 = https://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
|
||||
git-url = https://git.savannah.gnu.org/cgit
|
||||
target = $(patsubst get-%,%,$@)
|
||||
|
||||
config-url = $(git-url)/config.git/plain/$(patsubst get-build-aux/%,%,$@)
|
||||
get-build-aux/config.guess get-build-aux/config.sub:
|
||||
@echo Retrieving $(target) from $(config-url)
|
||||
$(WGET) $(config-url) -O $(target).t \
|
||||
&& $(move_if_change)
|
||||
|
||||
gnulib-url = $(git-url)/gnulib.git/plain/build-aux/$(patsubst get-build-aux/%,%,$@)
|
||||
get-build-aux/texinfo.tex:
|
||||
@echo Retrieving $(target) from $(gnulib-url)
|
||||
$(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 Retrieving $(target) from $(gnustandards-url)
|
||||
$(WGET) $(gnustandards-url) -O $(target).t \
|
||||
&& $(move_if_change)
|
||||
|
||||
|
||||
# ---------------------------- #
|
||||
# Extra configuration checks. #
|
||||
# ---------------------------- #
|
||||
|
||||
# Make the dist file contents more regular, if we're using GNU tar.
|
||||
# Suggested by Tzvetelin Katchov <katchov@gnu.org>
|
||||
|
||||
export TAR_OPTIONS := --mode=u+w,go-w --owner=0 --group=0 --numeric-owner --sort=name
|
||||
|
||||
# When I released 4.3 somehow the INSTALL file was missing.
|
||||
# When I tried to build it again, it was there. I have no idea what happened
|
||||
# but add a new check to be sure it doesn't happen again.
|
||||
mk_dist_files = AUTHORS ChangeLog COPYING INSTALL README src/mkconfig.h
|
||||
|
||||
dist: mk-distcheck
|
||||
|
||||
.PHONY: mk-distcheck
|
||||
mk-distcheck: distdir
|
||||
@echo "Checking for extra installed files..."
|
||||
for fn in $(mk_dist_files); do \
|
||||
test -f '$(distdir)'/"$$fn" \
|
||||
|| { echo "Missing dist file: $$fn"; exit 1; }; \
|
||||
done; true
|
||||
|
||||
|
||||
# ---------------------------------- #
|
||||
# Alternative configuration checks. #
|
||||
# ---------------------------------- #
|
||||
|
||||
CFGCHECK_CONFIGFLAGS =
|
||||
CFGCHECK_BUILDFLAGS =
|
||||
# We can't use our mondo warnings as these are used to compile gnulib modules
|
||||
# as well, and that will fail.
|
||||
CFGCHECK_MAKEFLAGS = # CFLAGS='$(AM_CFLAGS)'
|
||||
|
||||
# This test can no longer be run: now that we rely on gnulib we must use C99+
|
||||
checkcfg.strict-c90: CFGCHECK_CONFIGFLAGS = CFLAGS='-std=c90 -pedantic'
|
||||
checkcfg.strict-c90: CFGCHECK_MAKEFLAGS =
|
||||
|
||||
checkcfg.no-jobserver:CFGCHECK_CONFIGFLAGS = --disable-job-server
|
||||
checkcfg.no-load: CFGCHECK_CONFIGFLAGS = --disable-load
|
||||
checkcfg.no-guile: CFGCHECK_CONFIGFLAGS = --without-guile
|
||||
checkcfg.no-spawn: CFGCHECK_CONFIGFLAGS = --disable-posix-spawn
|
||||
checkcfg.no-sysglob: CFGCHECK_CONFIGFLAGS = make_cv_sys_gnu_glob=no
|
||||
checkcfg.no-loadavg: CFGCHECK_CONFIGFLAGS = ac_cv_func_getloadavg=no \
|
||||
ac_cv_have_decl_getloadavg=no \
|
||||
gl_cv_have_raw_decl_getloadavg=no \
|
||||
ac_cv_lib_util_getloadavg=no \
|
||||
ac_cv_lib_getloadavg_getloadavg=no
|
||||
checkcfg.no-sync: CFGCHECK_CONFIGFLAGS = CPPFLAGS=-DNO_OUTPUT_SYNC
|
||||
checkcfg.no-archives: CFGCHECK_CONFIGFLAGS = CPPFLAGS=-DNO_ARCHIVES
|
||||
|
||||
CONFIG_CHECKS := \
|
||||
checkcfg.no-jobserver \
|
||||
checkcfg.no-load \
|
||||
checkcfg.no-guile \
|
||||
checkcfg.no-spawn \
|
||||
checkcfg.no-sysglob \
|
||||
checkcfg.no-loadavg \
|
||||
checkcfg.no-sync \
|
||||
checkcfg.no-archives
|
||||
|
||||
.PHONY: check-alt-config
|
||||
check-alt-config: $(CONFIG_CHECKS)
|
||||
|
||||
# Trick GNU make so it doesn't run the submake as a recursive make.
|
||||
NR_MAKE = $(MAKE)
|
||||
|
||||
# Check builds both with build.sh and with make
|
||||
build.sh_SCRIPT = exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
||||
cd $(distdir)/_build \
|
||||
&& OUTDIR=_bld ../build.sh $(CFGCHECK_BUILD_FLAGS) \
|
||||
&& _bld/make GMK_OUTDIR=../_bld $(AM_MAKEFLAGS) check-local \
|
||||
&& _bld/make GMK_OUTDIR=../_bld $(AM_MAKEFLAGS) clean
|
||||
|
||||
nrmake_SCRIPT = exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
||||
cd $(distdir)/_build \
|
||||
&& $(NR_MAKE) $(AM_MAKEFLAGS) $(CFGCHECK_MAKEFLAGS) \
|
||||
&& ./make $(AM_MAKEFLAGS) check \
|
||||
&& ./make $(AM_MAKEFLAGS) clean
|
||||
|
||||
$(CONFIG_CHECKS): checkcfg.%: distdir
|
||||
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||
exec >'checkcfg.$*.log' 2>&1; \
|
||||
echo "Testing configure with $(CFGCHECK_CONFIGFLAGS)"; set -x; \
|
||||
rm -rf $(distdir)/_build \
|
||||
&& mkdir $(distdir)/_build \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. $(CFGCHECK_CONFIGFLAGS) \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
||||
$(build.sh_SCRIPT)
|
||||
$(nrmake_SCRIPT)
|
||||
|
||||
# Try using Basic.mk. I can't test this on POSIX systems because it is only
|
||||
# used for non-POSIX systems; POSIX systems can just use normal
|
||||
# configure/Makefile.in etc.
|
||||
checkcfg.basicmk: checkcfg.% : distdir
|
||||
@echo "Building $@ (output in checkcfg.$*.log)"
|
||||
exec >'checkcfg.$*.log' 2>&1; \
|
||||
echo "Testing Basic.mk SRCDIR=.."; set -x; \
|
||||
rm -rf $(distdir)/_build \
|
||||
&& mkdir $(distdir)/_build \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS)
|
||||
exec >>'checkcfg.$*.log' 2>&1; set -x; \
|
||||
cd $(distdir)/_build \
|
||||
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. $(CFGCHECK_MAKEFLAGS)
|
||||
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. check \
|
||||
&& ./make $(AM_MAKEFLAGS) -f ../Basic.mk SRCDIR=.. clean
|
||||
exec >>'checkcfg.$*.log' 2>&1; \
|
||||
echo "Testing Basic.mk SRCDIR=."; set -x; \
|
||||
&& rm -rf $(distdir)/_build \
|
||||
&& cd $(distdir) \
|
||||
&& ./configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(NR_MAKE) $(AM_MAKEFLAGS) -f Basic.mk $(CFGCHECK_MAKEFLAGS)' \
|
||||
&& ./make $(AM_MAKEFLAGS) -f Basic.mk check \
|
||||
&& ./make $(AM_MAKEFLAGS) -f Basic.mk clean
|
||||
|
||||
|
||||
## --------------- ##
|
||||
## Sanity checks. ##
|
||||
## --------------- ##
|
||||
|
||||
# Before we build a distribution be sure we run our local checks
|
||||
#distdir: local-check
|
||||
|
||||
.PHONY: local-check po-check changelog-check
|
||||
|
||||
# Checks that don't require Git. Run 'changelog-check' last as
|
||||
# previous test may reveal problems requiring new ChangeLog entries.
|
||||
local-check: po-check changelog-check
|
||||
|
||||
# copyright-check writable-files
|
||||
|
||||
changelog-check:
|
||||
if head $(top_srcdir)/ChangeLog | grep 'Version $(PACKAGE_VERSION)' >/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(PACKAGE_VERSION) not in ChangeLog" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||
# Ignore src/makeint.h; it defines _().
|
||||
po-check:
|
||||
if test -f po/POTFILES.in; then \
|
||||
grep '^[^#]' po/POTFILES.in | sort > $@-1; \
|
||||
find [a-z]* -name '*.[ch]' | xargs grep -l '\b_(' | grep -v src/makeint.h | sort > $@-2; \
|
||||
diff -u $@-1 $@-2 || exit 1; \
|
||||
rm -f $@-1 $@-2; \
|
||||
fi
|
||||
|
||||
|
||||
## --------------- ##
|
||||
## Generate docs. ##
|
||||
## --------------- ##
|
||||
|
||||
.PHONY: update-makeweb gendocs
|
||||
|
||||
CVS = cvs
|
||||
|
||||
makeweb-repo = $(USER)@cvs.sv.gnu.org:/web/make
|
||||
gnuweb-repo = :pserver:anonymous@cvs.sv.gnu.org:/web/www
|
||||
gnuweb-dir = www/server/standards
|
||||
|
||||
# Get the GNU make web page boilerplate etc.
|
||||
update-makeweb:
|
||||
test -d '$(MAKEWEBDIR)' || mkdir -p '$(MAKEWEBDIR)'
|
||||
test -d '$(MAKEWEBDIR)'/CVS \
|
||||
&& { cd '$(MAKEWEBDIR)' && $(CVS) update; } \
|
||||
|| { mkdir -p '$(dir $(MAKEWEBDIR))' && cd '$(dir $(MAKEWEBDIR))' \
|
||||
&& $(CVS) -d $(makeweb-repo) co -d '$(notdir $(MAKEWEBDIR))' make; }
|
||||
|
||||
# Get the GNU web page boilerplate etc.
|
||||
update-gnuweb:
|
||||
test -d '$(GNUWEBDIR)' || mkdir -p '$(GNUWEBDIR)'
|
||||
test -d '$(GNUWEBDIR)/$(gnuweb-dir)'/CVS \
|
||||
&& { cd '$(GNUWEBDIR)/$(gnuweb-dir)' && $(CVS) update; } \
|
||||
|| { cd '$(GNUWEBDIR)' && $(CVS) -d $(gnuweb-repo) co '$(gnuweb-dir)'; }
|
||||
|
||||
gendocs: update-gnuweb update-makeweb
|
||||
cp $(GNULIBDIR)/doc/gendocs_template doc
|
||||
cd doc \
|
||||
&& rm -rf doc/manual \
|
||||
&& $(GNULIBDIR)/build-aux/gendocs.sh --email '$(BUGLIST)' \
|
||||
make '$(PACKAGE_NAME) Manual'
|
||||
find '$(MAKEWEBDIR)'/manual \( -name CVS -prune \) -o \( -name '[!.]*' -type f -exec rm -f '{}' \; \)
|
||||
cp -r doc/manual '$(MAKEWEBDIR)'
|
||||
@echo 'Status of $(MAKEWEBDIR) repo:' && cd '$(MAKEWEBDIR)' \
|
||||
&& cvs -q -n update | grep -v '^M '
|
||||
@echo '- cvs add <new files>' \
|
||||
&& echo '- cvs remove <deleted files>' \
|
||||
&& echo '- cvs commit' \
|
||||
&& echo '- cvs tag make-$(subst .,-,$(PACKAGE_VERSION))'
|
||||
|
||||
|
||||
## --------------------------------------------- ##
|
||||
## Submitting Coverity cov-build results to Scan ##
|
||||
## --------------------------------------------- ##
|
||||
|
||||
# Note you must have set COVERITY_TOKEN and COVERITY_EMAIL properly
|
||||
# to submit results. COVERITY_PATH can be set to the root of the
|
||||
# cov-build tools if it's not already on your PATH.
|
||||
|
||||
COV_BUILD_FILE := cov-build.tgz
|
||||
|
||||
.PHONY: cov-build cov-submit
|
||||
|
||||
cov-build: $(COV_BUILD_FILE)
|
||||
|
||||
$(COV_BUILD_FILE): $(filter %.c %.h,$(DISTFILES))
|
||||
$(MAKE) distdir
|
||||
@echo "Running Coverity cov-build"
|
||||
rm -rf '$(distdir)'/_build
|
||||
mkdir '$(distdir)'/_build
|
||||
cd '$(distdir)'/_build \
|
||||
&& ../configure --srcdir=.. \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(CFGCHECK_MAKEFLAGS)
|
||||
PATH="$${COVERITY_PATH:+$$COVERITY_PATH/bin:}$$PATH"; \
|
||||
cd '$(distdir)'/_build \
|
||||
&& cov-build --dir cov-int ../build.sh
|
||||
rm -f '$@'
|
||||
(cd '$(distdir)'/_build && tar czf - cov-int) > '$@'
|
||||
|
||||
cov-submit: $(COV_BUILD_FILE)-submitted
|
||||
|
||||
$(COV_BUILD_FILE)-submitted: $(COV_BUILD_FILE)
|
||||
@test -n "$(COVERITY_TOKEN)" || { echo 'COVERITY_TOKEN not set'; exit 1; }
|
||||
@test -n "$(COVERITY_EMAIL)" || { echo 'COVERITY_EMAIL not set'; exit 1; }
|
||||
rm -f '$@'
|
||||
case '$(PACKAGE_VERSION)' in \
|
||||
(*.*.9*) type="daily build"; ext=".$$(date +%Y%m%d)" ;; \
|
||||
(*) type="release"; ext= ;; \
|
||||
esac; \
|
||||
curl --form token='$(COVERITY_TOKEN)' \
|
||||
--form email='$(COVERITY_EMAIL)' \
|
||||
--form file='@$<' \
|
||||
--form version="$(PACKAGE_VERSION)$$ext" \
|
||||
--form description="$(PACKAGE_NAME) $$type" \
|
||||
'https://scan.coverity.com/builds?project=gmake'
|
||||
cp '$<' '$@'
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## Make release targets. ##
|
||||
## ------------------------- ##
|
||||
|
||||
.PHONY: tag-release
|
||||
tag-release:
|
||||
case '$(PACKAGE_VERSION)' in \
|
||||
(*.*.9*) message=" candidate" ;; \
|
||||
(*) message= ;; \
|
||||
esac; \
|
||||
$(GIT) tag -m "$(PACKAGE_NAME) release$$message $(PACKAGE_VERSION)" -u '$(GPG_KEYID)' '$(PACKAGE_VERSION)'
|
||||
|
||||
|
||||
## ------------------------- ##
|
||||
## GNU FTP upload artifacts. ##
|
||||
## ------------------------- ##
|
||||
|
||||
# This target creates the upload artifacts.
|
||||
# Sign it with my key. If you don't have my key/passphrase then sorry,
|
||||
# you're SOL! :)
|
||||
|
||||
GPG = gpg
|
||||
GPGFLAGS = -u $(GPG_KEYID)
|
||||
|
||||
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 signed directive file '$@':"
|
||||
@( \
|
||||
echo 'version: 1.2'; \
|
||||
echo 'directory: make'; \
|
||||
echo 'filename: $*'; \
|
||||
echo 'comment: Official upload of $(PACKAGE_NAME) version $(PACKAGE_VERSION)'; \
|
||||
) > "$*.directive"
|
||||
$(GPG) $(GPGFLAGS) -o "$@" --clearsign "$*.directive"
|
||||
@rm -f "$*.directive"
|
||||
|
||||
# Upload the artifacts
|
||||
|
||||
FTPPUT := $(firstword $(shell command -v ncftpput) $(wildcard $(GNULIBDIR)/build-aux/ncftpput-ftp) invalid)
|
||||
gnu-upload-host = ftp-upload.gnu.org
|
||||
gnu-upload-dir = /incoming
|
||||
|
||||
|
||||
UPLOADS = upload-alpha upload-ftp
|
||||
.PHONY: $(UPLOADS)
|
||||
$(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
|
||||
$(FTPPUT) "$(gnu-upload-host)" "$(gnu-upload-dir)/$(@:upload-%=%)" $^
|
||||
|
||||
|
||||
# Rebuild Makefile.in if this file is modifed.
|
||||
Makefile.in: maintMakefile
|
||||
|
||||
# Copyright (C) 1997-2022 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 <https://www.gnu.org/licenses/>.
|
||||
281
make-gdb.py
Normal file
281
make-gdb.py
Normal file
@@ -0,0 +1,281 @@
|
||||
"""GDB pretty-printer macros for GNU Make."""
|
||||
|
||||
import gdb # pylint: disable=import-error
|
||||
import gdb.printing # pylint: disable=import-error
|
||||
|
||||
|
||||
# Memoize types we commonly use
|
||||
_TYPES = {}
|
||||
|
||||
|
||||
def getType(tname):
|
||||
"""Given a type name return a GDB type."""
|
||||
global _TYPES
|
||||
if tname not in _TYPES:
|
||||
tn = tname.rstrip('*')
|
||||
if tn not in _TYPES:
|
||||
_TYPES[tn] = gdb.lookup_type(tn)
|
||||
while tn != tname:
|
||||
# Want a pointer type
|
||||
t = tn
|
||||
tn += '*'
|
||||
_TYPES[tn] = _TYPES[t].pointer()
|
||||
return _TYPES[tname]
|
||||
|
||||
|
||||
def isNullptr(val):
|
||||
"""Return True if the value is a null pointer."""
|
||||
return int(val.cast(getType('unsigned long long'))) == 0
|
||||
|
||||
|
||||
class ShowArgv(gdb.Command):
|
||||
"""Print a null-terminated array of strings.
|
||||
|
||||
Argument:
|
||||
A char** where the last one is NULL (e.g., argv)
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""Create the showargv function."""
|
||||
gdb.Command.__init__(self, "showargv", gdb.COMMAND_USER)
|
||||
|
||||
def invoke(self, arg, from_tty):
|
||||
"""Show the argv."""
|
||||
args = gdb.string_to_argv(arg)
|
||||
if len(args) != 1:
|
||||
raise gdb.GdbError(self._usage)
|
||||
|
||||
val = gdb.parse_and_eval(args[0])
|
||||
if val is None:
|
||||
raise gdb.GdbError('%s is not a valid expression' % (args[0]))
|
||||
|
||||
strs = []
|
||||
while not isNullptr(val.dereference()):
|
||||
strs.append('"'+val.dereference().string()+'"')
|
||||
val += 1
|
||||
|
||||
gdb.write("[%d] = [%s]\n" % (len(strs), ', '.join(strs)))
|
||||
gdb.flush()
|
||||
|
||||
|
||||
ShowArgv()
|
||||
|
||||
|
||||
class ShowNextList(gdb.Command):
|
||||
"""Print a structure that has a "next" pointer.
|
||||
|
||||
Argument:
|
||||
A pointer to a struct which contains a "next" member.
|
||||
"""
|
||||
|
||||
_usage = 'usage: showlist <listptr>'
|
||||
|
||||
def __init__(self):
|
||||
"""Create a "showlist" function."""
|
||||
gdb.Command.__init__(self, "showlist", gdb.COMMAND_USER)
|
||||
|
||||
def invoke(self, arg, from_tty):
|
||||
"""Show the elements in the provided list."""
|
||||
args = gdb.string_to_argv(arg)
|
||||
if len(args) != 1:
|
||||
raise gdb.GdbError(self._usage)
|
||||
|
||||
val = gdb.parse_and_eval(args[0])
|
||||
if val is None:
|
||||
raise gdb.GdbError('%s is not a valid expression' % (args[0]))
|
||||
i = 0
|
||||
while not isNullptr(val):
|
||||
gdb.write("%s : %s\n" % (val, val.dereference()))
|
||||
gdb.flush()
|
||||
i += 1
|
||||
val = val['next']
|
||||
gdb.write("%s contains %d elements\n" % (args[0], i))
|
||||
gdb.flush()
|
||||
|
||||
|
||||
ShowNextList()
|
||||
|
||||
|
||||
class FileLocation(object):
|
||||
"""Print a file location."""
|
||||
|
||||
def __init__(self, val):
|
||||
"""Create a FileLocation object."""
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
"""Convert a FileLocation to a string."""
|
||||
if int(self.val['filenm']):
|
||||
return "%s:%d" % (str(self.val['filenm']), self.val['lineno'])
|
||||
return 'NILF'
|
||||
|
||||
|
||||
class StringListPrinter(object):
|
||||
"""Print a stringlist."""
|
||||
|
||||
def __init__(self, val):
|
||||
"""Create a StringListPrinter object."""
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
"""Convert a HashTable into a string."""
|
||||
return "size=%d, capacity=%d" % (self.val['idx'], self.val['max'])
|
||||
|
||||
def children(self):
|
||||
"""Yield each string in the list."""
|
||||
i = 0
|
||||
elts = self.val['list']
|
||||
while i < self.val['idx']:
|
||||
nm = '[%d] ' % i
|
||||
yield (nm, elts.dereference())
|
||||
i += 1
|
||||
elts += 1
|
||||
|
||||
def display_hint(self):
|
||||
"""Show the display hint for the pretty-printer."""
|
||||
return 'array'
|
||||
|
||||
|
||||
class VariablePrinter(object):
|
||||
"""Print a struct variable."""
|
||||
|
||||
def __init__(self, val):
|
||||
"""Create a VariablePrinter object."""
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
"""Convert a VariablePrinter object into a string."""
|
||||
if self.val['append']:
|
||||
a = '+='
|
||||
elif self.val['conditional']:
|
||||
a = '?='
|
||||
else:
|
||||
a = '='
|
||||
flags = []
|
||||
s = str(self.val['flavor'])
|
||||
if s != 'f_bogus':
|
||||
flags.append(s)
|
||||
s = str(self.val['origin'])
|
||||
if s != 'o_default':
|
||||
flags.append(s)
|
||||
s = str(self.val['export'])
|
||||
if s != 'v_default':
|
||||
flags.append(s)
|
||||
return '%s[%s]: "%s" %s "%s"' % (
|
||||
self.val['fileinfo'], ','.join(flags),
|
||||
self.val['name'].string(), a, self.val['value'].string())
|
||||
|
||||
|
||||
class HashTablePrinter(object):
|
||||
"""Pretty-print a hash table."""
|
||||
|
||||
DELITEM = None
|
||||
|
||||
def __init__(self, val):
|
||||
"""Create a HashTablePrinter object."""
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
"""Convert a HashTable into a string."""
|
||||
return "size=%d, capacity=%d, empty=%d, collisions=%d, rehashes=%d" % (
|
||||
self.val['ht_size'], self.val['ht_capacity'],
|
||||
self.val['ht_empty_slots'], self.val['ht_collisions'],
|
||||
self.val['ht_rehashes'])
|
||||
|
||||
def children(self):
|
||||
"""Yield each ID and value."""
|
||||
for (i, v) in self.iterator():
|
||||
nm = '[%d] ' % i
|
||||
yield (nm, i)
|
||||
yield (nm, v)
|
||||
|
||||
def iterator(self):
|
||||
"""Provide an iterator for HashTable."""
|
||||
if HashTablePrinter.DELITEM is None:
|
||||
HashTablePrinter.DELITEM = gdb.lookup_global_symbol('hash_deleted_item').value()
|
||||
lst = self.val['ht_vec']
|
||||
for i in range(0, self.val['ht_size']):
|
||||
v = lst[i]
|
||||
if int(v) != 0 and v != HashTablePrinter.DELITEM:
|
||||
yield (i, v)
|
||||
|
||||
def display_hint(self):
|
||||
"""Show the display hint for the pretty-printer."""
|
||||
return 'map'
|
||||
|
||||
|
||||
class VariableSetPrinter(object):
|
||||
"""Print a variable_set."""
|
||||
|
||||
def __init__(self, val):
|
||||
"""Create a variable_set pretty-printer."""
|
||||
self.tbl = HashTablePrinter(val['table'])
|
||||
|
||||
def to_string(self):
|
||||
"""Convert a variable_set to string."""
|
||||
return self.tbl.to_string()
|
||||
|
||||
def children(self):
|
||||
"""Iterate through variables and values."""
|
||||
for (i, v) in self.tbl.iterator():
|
||||
ptr = v.cast(getType('struct variable*'))
|
||||
nm = '[%d] ' % (i)
|
||||
yield (nm, ptr)
|
||||
yield (nm, str(ptr.dereference()))
|
||||
|
||||
def display_hint(self):
|
||||
"""Show the display hint for the pretty-printer."""
|
||||
return 'map'
|
||||
|
||||
|
||||
class VariableSetListPrinter(object):
|
||||
"""Print a variable_set_list."""
|
||||
|
||||
GLOBALSET = None
|
||||
|
||||
def __init__(self, val):
|
||||
"""Create a variable_set_list pretty-printer."""
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
"""Convert a variable_set_list to string."""
|
||||
return str(self.val.address)
|
||||
|
||||
def children(self):
|
||||
"""Iterate through variables and values."""
|
||||
if VariableSetListPrinter.GLOBALSET is None:
|
||||
block = gdb.lookup_global_symbol('init_hash_global_variable_set').symtab.static_block()
|
||||
VariableSetListPrinter.GLOBALSET = gdb.lookup_symbol(
|
||||
'global_variable_set', block)[0].value().address
|
||||
ptr = self.val.address
|
||||
i = 0
|
||||
while not isNullptr(ptr):
|
||||
nm = '[%d] ' % (i)
|
||||
yield (nm, ptr['set'])
|
||||
if int(ptr['set']) == int(VariableSetListPrinter.GLOBALSET):
|
||||
yield (nm, "global_variable_set")
|
||||
else:
|
||||
yield (nm, str(ptr['set'].dereference()))
|
||||
i += 1
|
||||
ptr = ptr['next']
|
||||
|
||||
def display_hint(self):
|
||||
"""Show the display hint for the pretty-printer."""
|
||||
return 'map'
|
||||
|
||||
|
||||
def build_pretty_printer():
|
||||
"""Install all the pretty-printers."""
|
||||
pp = gdb.printing.RegexpCollectionPrettyPrinter("gnumake")
|
||||
pp.add_printer('floc', r'^floc$', FileLocation)
|
||||
pp.add_printer('stringlist', r'^stringlist$', StringListPrinter)
|
||||
pp.add_printer('variable', r'^variable$', VariablePrinter)
|
||||
pp.add_printer('hashtable', r'^hash_table$', HashTablePrinter)
|
||||
pp.add_printer('variableset', r'^variable_set$', VariableSetPrinter)
|
||||
pp.add_printer('variablesetlist', r'^variable_set_list$', VariableSetListPrinter)
|
||||
return pp
|
||||
|
||||
|
||||
# Use replace=True so we can re-source this file
|
||||
gdb.printing.register_pretty_printer(gdb.current_objfile(),
|
||||
build_pretty_printer(), replace=True)
|
||||
3705
make.texinfo
3705
make.texinfo
File diff suppressed because it is too large
Load Diff
171
makefile.com
Normal file
171
makefile.com
Normal file
@@ -0,0 +1,171 @@
|
||||
$!
|
||||
$! Makefile.com - builds GNU Make for VMS
|
||||
$!
|
||||
$! P1 = LIST will provide compiler listings.
|
||||
$! P2 = DEBUG will build an image with debug information
|
||||
$! P3 = WALL will enable all warning messages (some are suppressed since
|
||||
$! one macro intentionally causes an error condition)
|
||||
$!
|
||||
$! In case of problems with the install you might contact me at
|
||||
$! zinser@decus.de (preferred) or zinser@sysdev.deutsche-boerse.com
|
||||
$
|
||||
$! hb
|
||||
$! But don't ask Martin Zinser about the lines, I added/changed.
|
||||
$! In case of an error do some cleanup
|
||||
$ on error then $ goto cleanup
|
||||
$! in case somebody set up her/his own symbol for cc
|
||||
$ set symbol/scope=(nolocal,noglobal)
|
||||
$!
|
||||
$! Just some general constants...
|
||||
$!
|
||||
$ true = 1
|
||||
$ false = 0
|
||||
$ tmpnam = "temp_" + f$getjpi("","pid")
|
||||
$ tt = tmpnam + ".txt"
|
||||
$ tc = tmpnam + ".c"
|
||||
$!
|
||||
$! Look for the compiler used
|
||||
$!
|
||||
$ lval = ""
|
||||
$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
|
||||
$ then
|
||||
$ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
|
||||
$ ccopt = ""
|
||||
$ else
|
||||
$ ccopt = "/decc/prefix=(all,except=(globfree,glob))"
|
||||
$ if f$trnlnm("SYS").eqs.""
|
||||
$ then
|
||||
$ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes.""
|
||||
$ then
|
||||
$ define sys decc$library_include:
|
||||
$ else
|
||||
$ if f$search("SYS$COMMON:[DECC$LIB.REFERENCE]DECC$RTLDEF.DIR").nes."" -
|
||||
then lval = "SYS$COMMON:[DECC$LIB.REFERENCE.DECC$RTLDEF],"
|
||||
$ if f$search("SYS$COMMON:[DECC$LIB.REFERENCE]SYS$STARLET_C.DIR").nes."" -
|
||||
then lval = lval+"SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C],"
|
||||
$ lval=lval+"SYS$LIBRARY:"
|
||||
$ define sys 'lval
|
||||
$ endif
|
||||
$ endif
|
||||
$ endif
|
||||
$!
|
||||
$!
|
||||
$ if (p1 .eqs. "LIST")
|
||||
$ then
|
||||
$ ccopt = ccopt + "/list/show=(expan,inclu)"
|
||||
$ endif
|
||||
$!
|
||||
$! Should we build a debug image
|
||||
$!
|
||||
$ if (p2.eqs."DEBUG")
|
||||
$ then
|
||||
$ ccopt = ccopt + "/noopt/debug"
|
||||
$ lopt = "/debug"
|
||||
$ else
|
||||
$ lopt = ""
|
||||
$ endif
|
||||
$!
|
||||
$! Do we want to see all warnings
|
||||
$!
|
||||
$ if (p3.nes."WALL")
|
||||
$ then
|
||||
$ gosub check_cc_qual
|
||||
$ endif
|
||||
$ filelist = "[.src]ar [.src]arscan [.src]commands [.src]default [.src]dir " + -
|
||||
"[.src]expand [.src]file [.src]function [.src]guile " + -
|
||||
"[.src]hash [.src]implicit [.src]job [.src]load [.src]main " + -
|
||||
"[.src]misc [.src]read [.src]remake [.src]remote-stub " + -
|
||||
"[.src]rule [.src]output [.src]signame [.src]variable " + -
|
||||
"[.src]version [.src]shuffle [.src]strcache [.src]vpath " + -
|
||||
"[.src]vmsfunctions [.src]vmsify [.src]vms_progname " + -
|
||||
"[.src]vms_exit [.src]vms_export_symbol " + -
|
||||
"[.lib]alloca [.lib]fnmatch [.lib]glob [.src]getopt1 [.src]getopt"
|
||||
$!
|
||||
$ copy [.src]config.h-vms [.src]config.h
|
||||
$ copy [.lib]fnmatch.in.h [.lib]fnmatch.h
|
||||
$ copy [.lib]glob.in.h [.lib]glob.h
|
||||
$ n=0
|
||||
$ open/write optf make.opt
|
||||
$ loop:
|
||||
$ cfile = f$elem(n," ",filelist)
|
||||
$ if cfile .eqs. " " then goto linkit
|
||||
$ write sys$output "Compiling ''cfile'..."
|
||||
$ call compileit 'cfile'
|
||||
$ n = n + 1
|
||||
$ goto loop
|
||||
$ linkit:
|
||||
$ close optf
|
||||
$ link/exe=make make.opt/opt'lopt
|
||||
$ goto cleanup
|
||||
$
|
||||
$ cleanup:
|
||||
$ if f$trnlnm("SYS").nes."" then $ deassign sys
|
||||
$ if f$trnlnm("OPTF").nes."" then $ close optf
|
||||
$ if f$search("make.opt").nes."" then $ del make.opt;*
|
||||
$ exit
|
||||
$!
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!
|
||||
$! Check if this is a define relating to the properties of the C/C++
|
||||
$! compiler
|
||||
$!
|
||||
$CHECK_CC_QUAL:
|
||||
$ open/write tmpc 'tc
|
||||
$ ccqual = "/warn=(disable=questcompare)"
|
||||
$ write tmpc "#include <stdio.h>"
|
||||
$ write tmpc "unsigned int i = 1;"
|
||||
$ write tmpc "int main(){"
|
||||
$ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}"
|
||||
$ close tmpc
|
||||
$ gosub cc_qual_check
|
||||
$ return
|
||||
$!
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!
|
||||
$! Check for properties of C/C++ compiler
|
||||
$!
|
||||
$CC_QUAL_CHECK:
|
||||
$ cc_qual = false
|
||||
$ set message/nofac/noident/nosever/notext
|
||||
$ cc 'ccqual' 'tmpnam'
|
||||
$ if $status then cc_qual = true
|
||||
$ set message/fac/ident/sever/text
|
||||
$ delete/nolog 'tmpnam'.*;*
|
||||
$ if cc_qual then ccopt = ccopt + ccqual
|
||||
$ return
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!
|
||||
$ compileit : subroutine
|
||||
$ ploc = f$locate("]",p1)
|
||||
$! filnam = p1
|
||||
$ if ploc .lt. f$length(p1)
|
||||
$ then
|
||||
$ objdir = f$extract(0, ploc+1, p1)
|
||||
$ write optf p1
|
||||
$ else
|
||||
$ objdir := []
|
||||
$ write optf objdir+p1
|
||||
$ endif
|
||||
$ cc'ccopt'/nested=none/include=([],[.src],[.lib])/obj='objdir' -
|
||||
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file",-
|
||||
"unlink=remove","HAVE_CONFIG_H","VMS") -
|
||||
'p1'
|
||||
$ exit
|
||||
$ endsubroutine : compileit
|
||||
$!
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!Copyright (C) 1996-2022 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 <https://www.gnu.org/licenses/>.
|
||||
45
mk/Amiga.mk
Normal file
45
mk/Amiga.mk
Normal file
@@ -0,0 +1,45 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on Amiga
|
||||
#
|
||||
# Amiga overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
CC = sc
|
||||
LD = $(CC) Link
|
||||
|
||||
MKDIR.cmd = makedir $1
|
||||
RM.cmd = delete $1
|
||||
CP.cmd = copy $1 To $2
|
||||
|
||||
CPPFLAGS =
|
||||
CFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
prog_SOURCES += $(alloca_SOURCES) $(loadavg_SOURCES) $(glob_SOURCES) $(amiga_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
extra_CPPFLAGS = IDir $(OUTDIR)src IDir $(SRCDIR)/src IDir $(OUTDIR)lib IDir $(SRCDIR)/lib
|
||||
|
||||
C_SOURCE =
|
||||
OUTPUT_OPTION =
|
||||
LDFLAGS = From LIB:cres.o
|
||||
LDLIBS = Lib LIB:sc.lib LIB:amiga.lib
|
||||
LINK_OUTPUT = To $@
|
||||
|
||||
$(OUTDIR)src/config.h: $(SRCDIR)/src/config.ami
|
||||
$(call CP.cmd,$<,$@)
|
||||
28
mk/Posix.mk.in
Normal file
28
mk/Posix.mk.in
Normal file
@@ -0,0 +1,28 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on POSIX systems
|
||||
#
|
||||
# POSIX overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Very little is needed here since the default Basic.mk assumes POSIX
|
||||
|
||||
prog_SOURCES += $(src)/posixos.c
|
||||
|
||||
extra_CPPFLAGS += @GUILE_CFLAGS@
|
||||
extra_LDFLAGS += @AM_LDFLAGS@
|
||||
LDLIBS += @LIBOBJS@ @gl_LIBOBS@ @ALLOCA@
|
||||
LDLIBS += @GUILE_LIBS@ @GETLOADAVG_LIBS@ @LIBINTL@ @LIBS@
|
||||
97
mk/VMS.mk
Normal file
97
mk/VMS.mk
Normal file
@@ -0,0 +1,97 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on VMS
|
||||
#
|
||||
# VMS overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
src = [.src]
|
||||
lib = [.lib]
|
||||
SRCDIR = []
|
||||
|
||||
OBJEXT = .obj
|
||||
EXEEXT = .exe
|
||||
|
||||
e =
|
||||
s = $e $e
|
||||
c = ,
|
||||
|
||||
defs = HAVE_CONFIG_H
|
||||
|
||||
ifeq ($(CC),cc)
|
||||
defs += VMS unlink=remove allocated_variable_expand_for_file=alloc_var_expand_for_file
|
||||
else
|
||||
defs += GCC_IS_NATIVE
|
||||
ifeq ($(ARCH),VAX)
|
||||
defs += VAX
|
||||
endif
|
||||
endif
|
||||
|
||||
extra_CPPFLAGS = /define=($(subst $s,$c,$(patsubst %,"%",$(defs))))
|
||||
|
||||
cinclude = /nested=none/include=($(src),$(lib))
|
||||
ifeq ($(CC),cc)
|
||||
cprefix = /prefix=(all,except=(glob,globfree))
|
||||
cwarn = /standard=relaxed/warn=(disable=questcompare)
|
||||
endif
|
||||
|
||||
extra_CFLAGS = $(cinclude)$(cprefix)$(cwarn)
|
||||
|
||||
#extra_LDFLAGS = /deb
|
||||
extra_LDFLAGS =
|
||||
|
||||
# If your system needs extra libraries loaded in, define them here.
|
||||
# System V probably need -lPW for alloca.
|
||||
# if on vax, uncomment the following line
|
||||
#LDLIBS = ,c.opt/opt
|
||||
ifeq ($(CC),cc)
|
||||
#LDLIBS =,sys$$library:vaxcrtl.olb/lib
|
||||
else
|
||||
LDLIBS =,gnu_cc_library:libgcc.olb/lib
|
||||
endif
|
||||
|
||||
# If your system doesn't have alloca, or the one provided is bad,
|
||||
# uncomment this
|
||||
#ALLOCA = $(alloca_SOURCES)
|
||||
|
||||
# If your system doesn't have alloca.h, or the one provided is bad,
|
||||
# uncomment this
|
||||
#BUILT_SOURCES += $(lib)alloca.h
|
||||
|
||||
prog_SOURCES += $(ALLOCA) $(glob_SOURCES) $(vms_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
COMPILE.cmd = $(CC) $(extra_CFLAGS)$(CFLAGS)/obj=$@ $(extra_CPPFLAGS)$(CPPFLAGS) $1
|
||||
|
||||
LINK.cmd = $(LD)$(extra_LDFLAGS)$(LDFLAGS)/exe=$@ $(subst $s,$c,$1)$(LDLIBS)
|
||||
|
||||
# Don't know how to do this
|
||||
CHECK.cmd =
|
||||
|
||||
MKDIR.cmd = create/dir $1
|
||||
RM.cmd = delete $1
|
||||
CP.cmd = copy $1 $2
|
||||
|
||||
define CLEANSPACE
|
||||
-purge [...]
|
||||
-delete $(PROG);
|
||||
-delete $(src)*.$(OBJEXT);
|
||||
endef
|
||||
|
||||
|
||||
$(OUTDIR)$(src)config.h: $(SRCDIR)$(src)config.h-vms
|
||||
$(call CP.cmd,$<,$@)
|
||||
122
mk/Windows32.mk
Normal file
122
mk/Windows32.mk
Normal file
@@ -0,0 +1,122 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on Windows
|
||||
#
|
||||
# Windows overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
# TARGET_TYPE can be either "release" or "debug"
|
||||
TARGET_TYPE = release
|
||||
|
||||
# TOOLCHAIN can be either "msvc" or "gcc"
|
||||
TOOLCHAIN = msvc
|
||||
|
||||
# Translate a POSIX path into a Windows path. Don't bother with drives.
|
||||
# Used only inside recipes, with DOS/CMD tools that require it.
|
||||
P2W = $(subst /,\,$1)
|
||||
|
||||
prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES) $(w32_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
w32_LIBS = kernel32 user32 gdi32 winspool comdlg32 advapi32 shell32 ole32 \
|
||||
oleaut32 uuid odbc32 odbccp32
|
||||
|
||||
CPPFLAGS =
|
||||
CFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
# --- Visual Studio
|
||||
msvc_CC = cl.exe
|
||||
msvc_LD = link.exe
|
||||
|
||||
msvc_CPPFLAGS = /DHAVE_CONFIG_H /DWINDOWS32 /DWIN32 /D_CONSOLE
|
||||
msvc_CPPFLAGS += /I$(OUTDIR)src /I$(SRCDIR)/src /I$(SRCDIR)/src/w32/include /I$(OUTDIR)lib /I$(SRCDIR)/lib
|
||||
|
||||
msvc_CFLAGS = /nologo /MT /W4 /EHsc
|
||||
msvc_CFLAGS += /FR$(OUTDIR) /Fp$(BASE_PROG).pch /Fd$(BASE_PROG).pdb
|
||||
|
||||
msvc_LDFLAGS = /nologo /SUBSYSTEM:console /PDB:$(BASE_PROG).pdb
|
||||
|
||||
msvc_LDLIBS = $(addsuffix .lib,$(w32_LIBS))
|
||||
|
||||
msvc_C_SOURCE = /c
|
||||
msvc_OUTPUT_OPTION = /Fo$@
|
||||
msvc_LINK_OUTPUT = /OUT:$@
|
||||
|
||||
release_msvc_OUTDIR = ./WinRel/
|
||||
release_msvc_CPPFLAGS = /D NDEBUG
|
||||
release_msvc_CFLAGS = /O2
|
||||
|
||||
debug_msvc_OUTDIR = ./WinDebug/
|
||||
debug_msvc_CPPFLAGS = /D _DEBUG
|
||||
debug_msvc_CFLAGS = /Zi /Od
|
||||
debug_msvc_LDFLAGS = /DEBUG
|
||||
|
||||
# --- GCC
|
||||
gcc_CC = gcc
|
||||
gcc_LD = $(gcc_CC)
|
||||
|
||||
release_gcc_OUTDIR = ./GccRel/
|
||||
debug_gcc_OUTDIR = ./GccDebug/
|
||||
|
||||
gcc_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR)src -I$(SRCDIR)/src -I$(SRCDIR)/src/w32/include -I$(OUTDIR)lib -I$(SRCDIR)/lib
|
||||
gcc_CFLAGS = -mthreads -Wall -std=gnu99 -gdwarf-2 -g3
|
||||
gcc_LDFLAGS = -mthreads -gdwarf-2 -g3
|
||||
gcc_LDLIBS = $(addprefix -l,$(w32_libs))
|
||||
|
||||
gcc_C_SOURCE = -c
|
||||
gcc_OUTPUT_OPTION = -o $@
|
||||
gcc_LINK_OUTPUT = -o $@
|
||||
|
||||
debug_gcc_CFLAGS = -O0
|
||||
release_gcc_CFLAGS = -O2
|
||||
|
||||
# ---
|
||||
|
||||
LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $1 $(LDLIBS) $(LINK_OUTPUT)
|
||||
|
||||
CHECK.cmd = cmd /c cd tests \& .\run_make_tests.bat -make ../$(PROG)
|
||||
|
||||
MKDIR.cmd = cmd /c mkdir $(call P2W,$1)
|
||||
RM.cmd = cmd /c del /F /Q $(call P2W,$1)
|
||||
CP.cmd = cmd /c copy /Y $(call P2W,$1 $2)
|
||||
|
||||
CC = $($(TOOLCHAIN)_CC)
|
||||
LD = $($(TOOLCHAIN)_LD)
|
||||
|
||||
C_SOURCE = $($(TOOLCHAIN)_C_SOURCE)
|
||||
OUTPUT_OPTION = $($(TOOLCHAIN)_OUTPUT_OPTION)
|
||||
LINK_OUTPUT = $($(TOOLCHAIN)_LINK_OUTPUT)
|
||||
|
||||
OUTDIR = $($(TARGET_TYPE)_$(TOOLCHAIN)_OUTDIR)
|
||||
|
||||
OBJEXT = obj
|
||||
EXEEXT = .exe
|
||||
|
||||
_CUSTOM = $($(TOOLCHAIN)_$1) $($(TARGET_TYPE)_$1) $($(TARGET_TYPE)_$(TOOLCHAIN)_$1)
|
||||
|
||||
# I'm not sure why this builds gnumake rather than make...?
|
||||
PROG = $(OUTDIR)gnumake$(EXEEXT)
|
||||
BASE_PROG = $(basename $(PROG))
|
||||
|
||||
extra_CPPFLAGS = $(call _CUSTOM,CPPFLAGS)
|
||||
extra_CFLAGS = $(call _CUSTOM,CFLAGS)
|
||||
extra_LDFLAGS = $(call _CUSTOM,LDFLAGS)
|
||||
LDLIBS = $(call _CUSTOM,LDLIBS)
|
||||
|
||||
$(OUTDIR)src/config.h: $(SRCDIR)/src/config.h.W32
|
||||
$(call CP.cmd,$<,$@)
|
||||
43
mk/msdosdjgpp.mk
Normal file
43
mk/msdosdjgpp.mk
Normal file
@@ -0,0 +1,43 @@
|
||||
# GNU -*-Makefile-*- to build GNU make on MS-DOS with DJGPP
|
||||
#
|
||||
# MS-DOS overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
OBJEXT = o
|
||||
EXEEXT = .exe
|
||||
|
||||
CC = gcc
|
||||
|
||||
# Translate a POSIX path into a Windows path. Don't bother with drives.
|
||||
# Used only inside recipes, with DOS/CMD tools that require it.
|
||||
P2W = $(subst /,\,$1)
|
||||
|
||||
prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES)
|
||||
|
||||
BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h
|
||||
|
||||
INCLUDEDIR = c:/djgpp/include
|
||||
LIBDIR = c:/djgpp/lib
|
||||
LOCALEDIR = c:/djgpp/share
|
||||
|
||||
MKDIR.cmd = command.com /c mkdir $(call P2W,$1)
|
||||
RM.cmd = command.com /c del /F /Q $(call P2W,$1)
|
||||
CP.cmd = command.com /c copy /Y $(call P2W,$1 $2)
|
||||
|
||||
$(OUTDIR)src/config.h: $(SRCDIR)/src/configh.dos
|
||||
$(call CP.cmd,$<,$@)
|
||||
4
po/.gitignore
vendored
Normal file
4
po/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!.gitignore
|
||||
!LINGUAS
|
||||
!POTFILES.in
|
||||
30
po/LINGUAS
Normal file
30
po/LINGUAS
Normal file
@@ -0,0 +1,30 @@
|
||||
be
|
||||
bg
|
||||
cs
|
||||
da
|
||||
de
|
||||
es
|
||||
fi
|
||||
fr
|
||||
ga
|
||||
gl
|
||||
he
|
||||
hr
|
||||
id
|
||||
it
|
||||
ja
|
||||
ko
|
||||
lt
|
||||
nl
|
||||
pl
|
||||
pt
|
||||
pt_BR
|
||||
ro
|
||||
ru
|
||||
sr
|
||||
sv
|
||||
tr
|
||||
uk
|
||||
vi
|
||||
zh_CN
|
||||
zh_TW
|
||||
48
po/POTFILES.in
Normal file
48
po/POTFILES.in
Normal file
@@ -0,0 +1,48 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Copyright (C) 2000-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
src/ar.c
|
||||
src/arscan.c
|
||||
src/commands.c
|
||||
src/dir.c
|
||||
src/expand.c
|
||||
src/file.c
|
||||
src/function.c
|
||||
src/getopt.c
|
||||
src/guile.c
|
||||
src/hash.c
|
||||
src/implicit.c
|
||||
src/job.c
|
||||
src/load.c
|
||||
src/main.c
|
||||
src/misc.c
|
||||
src/output.c
|
||||
src/output.h
|
||||
src/posixos.c
|
||||
src/read.c
|
||||
src/remake.c
|
||||
src/remote-cstms.c
|
||||
src/rule.c
|
||||
src/shuffle.c
|
||||
src/signame.c
|
||||
src/strcache.c
|
||||
src/variable.c
|
||||
src/variable.h
|
||||
src/vmsfunctions.c
|
||||
src/vmsjobs.c
|
||||
src/vpath.c
|
||||
src/w32/w32os.c
|
||||
63
prepare_vms.com
Normal file
63
prepare_vms.com
Normal file
@@ -0,0 +1,63 @@
|
||||
$!
|
||||
$! prepare_vms.com - Build config.h-vms from master on VMS.
|
||||
$!
|
||||
$! This is used for building off the master instead of a release tarball.
|
||||
$!
|
||||
$!
|
||||
$! First try ODS-5, Pathworks V6 or UNZIP name.
|
||||
$!
|
||||
$ config_template = f$search("sys$disk:[.src]mkconfig*h.in")
|
||||
$ if config_template .eqs. ""
|
||||
$ then
|
||||
$!
|
||||
$! Try NFS, VMStar, or Pathworks V5 ODS-2 encoded name.
|
||||
$!
|
||||
$ config_template = f$search("sys$disk:[.src]mkconfig.h*in")
|
||||
$ if config_template .eqs. ""
|
||||
$ then
|
||||
$ write sys$output "Could not find mkconfig.h.in!"
|
||||
$ exit 44
|
||||
$ endif
|
||||
$ endif
|
||||
$ config_template_file = f$parse(config_template,,,"name")
|
||||
$ config_template_type = f$parse(config_template,,,"type")
|
||||
$ config_template = "sys$disk:[.src]" + config_template_file + config_template_type
|
||||
$!
|
||||
$!
|
||||
$! Pull the version from configure.ac
|
||||
$!
|
||||
$ open/read ac_file sys$disk:[]configure.ac
|
||||
$ac_read_loop:
|
||||
$ read ac_file/end=ac_read_loop_end line_in
|
||||
$ key = f$extract(0, 7, line_in)
|
||||
$ if key .nes. "AC_INIT" then goto ac_read_loop
|
||||
$ package = f$element (1,"[",line_in)
|
||||
$ package = f$element (0,"]",package)
|
||||
$ version = f$element (2,"[",line_in)
|
||||
$ version = f$element (0,"]",version)
|
||||
$ac_read_loop_end:
|
||||
$ close ac_file
|
||||
$!
|
||||
$ if (version .eqs. "")
|
||||
$ then
|
||||
$ write sys$output "Unable to determine version!"
|
||||
$ exit 44
|
||||
$ endif
|
||||
$!
|
||||
$!
|
||||
$ outfile = "sys$disk:[.src]mkconfig.h"
|
||||
$!
|
||||
$! Note the pipe command is close to the length of 255, which is the
|
||||
$! maximum token length prior to VMS V8.2:
|
||||
$! %DCL-W-TKNOVF, command element is too long - shorten
|
||||
$! PDS: Blown out; someone else will have to figure this out
|
||||
$ pipe (write sys$output "sub,@PACKAGE@,make,WHOLE/NOTYPE" ;-
|
||||
write sys$output "sub,@PACKAGE_BUGREPORT@,bug-make@gnu.org,WHOLE/NOTYPE" ;-
|
||||
write sys$output "sub,@PACKAGE_NAME@,GNU Make,WHOLE/NOTYPE" ;-
|
||||
write sys$output "sub,@PACKAGE_TARNAME@,make,WHOLE/NOTYPE" ;-
|
||||
write sys$output "sub,@PACKAGE_URL@,https://www.gnu.org/software/make/,WHOLE/NOTYPE" ;-
|
||||
write sys$output "sub,@PACKAGE_VERSION@,''version',WHOLE/NOTYPE" ;-
|
||||
write sys$output "exit") |-
|
||||
edit/edt 'config_template'/out='outfile'/command=sys$pipe >nla0:
|
||||
$!
|
||||
$ write sys$output "GNU Make version: ", version, " prepared for VMS"
|
||||
63
scripts/copyright-update
Executable file
63
scripts/copyright-update
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2014-2022 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# Update GNU make copyrights using gnulib update-copyright
|
||||
|
||||
EXCLUDE='^\(\.[a-z].*\|.*/\.[a-z].*\|.*COPYING\|src/hash\.[ch]\|ChangeLog.*\|.*/ChangeLog.*\|INSTALL\|doc/make\.texi\|bootstrap\)$'
|
||||
|
||||
update=${UPDATE_COPYRIGHT:-${GNULIB_SRCDIR:-../../gnulib}/build-aux/update-copyright}
|
||||
|
||||
die () { echo "$*"; exit 1; }
|
||||
|
||||
getfiles () {
|
||||
git ls-files | grep -v "$EXCLUDE"
|
||||
}
|
||||
|
||||
run () {
|
||||
cmd=$(command -v "$update") || die "Cannot locate update-copyright ($update)"
|
||||
test -x "$cmd" || die "Cannot locate update-copyright ($update)"
|
||||
|
||||
force=false
|
||||
|
||||
case $1 in
|
||||
(-v) getfiles | sort; exit 0 ;;
|
||||
(-f) force=true ;;
|
||||
(--) : ;;
|
||||
(-*) echo "usage: $0 [-v]"; exit 1 ;;
|
||||
esac
|
||||
|
||||
if $force; then
|
||||
: just do it
|
||||
elif test ! -f src/makeint.h; then
|
||||
die "Run in the root of the GNU make workspace"
|
||||
elif test -f configure; then
|
||||
die "Run in a clean workspace (git clean -fdX)"
|
||||
fi
|
||||
|
||||
# We use intervals
|
||||
export UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||
|
||||
"$cmd" $(getfiles)
|
||||
|
||||
echo "*** Update doc/make.texi copyright by hand!"
|
||||
echo "*** Update src/main.c:print_version() copyright by hand!"
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
run "$@"
|
||||
|
||||
# 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 <https://www.gnu.org/licenses/>.
|
||||
113
src/amiga.c
Normal file
113
src/amiga.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/* Running commands on Amiga
|
||||
Copyright (C) 1995-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
#include "variable.h"
|
||||
#include "amiga.h"
|
||||
#include <assert.h>
|
||||
#include <exec/memory.h>
|
||||
#include <dos/dostags.h>
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
|
||||
static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n"
|
||||
"Amiga Port by A. Digulla (digulla@home.lake.de)";
|
||||
|
||||
int
|
||||
MyExecute (char **argv)
|
||||
{
|
||||
char * buffer, * ptr;
|
||||
char ** aptr;
|
||||
int len = 0;
|
||||
int status;
|
||||
|
||||
for (aptr=argv; *aptr; aptr++)
|
||||
{
|
||||
len += strlen (*aptr) + 4;
|
||||
}
|
||||
|
||||
buffer = AllocMem (len, MEMF_ANY);
|
||||
|
||||
if (!buffer)
|
||||
O (fatal, NILF, "MyExecute: Cannot allocate space for calling a command");
|
||||
|
||||
ptr = buffer;
|
||||
|
||||
for (aptr=argv; *aptr; aptr++)
|
||||
{
|
||||
if (((*aptr)[0] == ';' && !(*aptr)[1]))
|
||||
{
|
||||
*ptr ++ = '"';
|
||||
ptr = stpcpy (ptr, *aptr);
|
||||
*(ptr++) = '"';
|
||||
}
|
||||
else if ((*aptr)[0] == '@' && (*aptr)[1] == '@' && !(*aptr)[2])
|
||||
{
|
||||
*ptr ++ = '\n';
|
||||
continue;
|
||||
}
|
||||
else
|
||||
ptr = stpcpy (ptr, *aptr);
|
||||
*ptr ++ = ' ';
|
||||
*ptr = 0;
|
||||
}
|
||||
|
||||
ptr[-1] = '\n';
|
||||
|
||||
status = SystemTags (buffer,
|
||||
SYS_UserShell, TRUE,
|
||||
TAG_END);
|
||||
|
||||
FreeMem (buffer, len);
|
||||
|
||||
if (SetSignal (0L,0L) & SIGBREAKF_CTRL_C)
|
||||
status = 20;
|
||||
|
||||
/* Warnings don't count */
|
||||
if (status == 5)
|
||||
status = 0;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
char *
|
||||
wildcard_expansion (char *wc, char *o)
|
||||
{
|
||||
# define PATH_SIZE 1024
|
||||
struct AnchorPath * apath;
|
||||
|
||||
if ( (apath = AllocMem (sizeof (struct AnchorPath) + PATH_SIZE,
|
||||
MEMF_CLEAR))
|
||||
)
|
||||
{
|
||||
apath->ap_Strlen = PATH_SIZE;
|
||||
|
||||
if (MatchFirst (wc, apath) == 0)
|
||||
{
|
||||
do
|
||||
{
|
||||
o = variable_buffer_output (o, apath->ap_Buf,
|
||||
strlen (apath->ap_Buf));
|
||||
o = variable_buffer_output (o, " ",1);
|
||||
} while (MatchNext (apath) == 0);
|
||||
}
|
||||
|
||||
MatchEnd (apath);
|
||||
FreeMem (apath, sizeof (struct AnchorPath) + PATH_SIZE);
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
18
src/amiga.h
Normal file
18
src/amiga.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/* Definitions for amiga specific things
|
||||
Copyright (C) 1995-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
int MyExecute (char ** argv);
|
||||
char * wildcard_expansion (char * wc, char * o);
|
||||
329
src/ar.c
Normal file
329
src/ar.c
Normal file
@@ -0,0 +1,329 @@
|
||||
/* Interface to 'ar' archives for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
|
||||
#include "filedef.h"
|
||||
#include "dep.h"
|
||||
#include <fnmatch.h>
|
||||
#include <intprops.h>
|
||||
|
||||
/* Return nonzero if NAME is an archive-member reference, zero if not. An
|
||||
archive-member reference is a name like 'lib(member)' where member is a
|
||||
non-empty string.
|
||||
If a name like 'lib((entry))' is used, a fatal error is signaled at
|
||||
the attempt to use this unsupported feature. */
|
||||
|
||||
int
|
||||
ar_name (const char *name)
|
||||
{
|
||||
const char *p = strchr (name, '(');
|
||||
const char *end;
|
||||
|
||||
if (p == 0 || p == name)
|
||||
return 0;
|
||||
|
||||
end = p + strlen (p) - 1;
|
||||
if (*end != ')' || end == p + 1)
|
||||
return 0;
|
||||
|
||||
if (p[1] == '(' && end[-1] == ')')
|
||||
OS (fatal, NILF, _("attempt to use unsupported feature: '%s'"), name);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Parse the archive-member reference NAME into the archive and member names.
|
||||
Creates one allocated string containing both names, pointed to by ARNAME_P.
|
||||
MEMNAME_P points to the member. */
|
||||
|
||||
void
|
||||
ar_parse_name (const char *name, char **arname_p, char **memname_p)
|
||||
{
|
||||
char *p;
|
||||
|
||||
*arname_p = xstrdup (name);
|
||||
p = strchr (*arname_p, '(');
|
||||
*(p++) = '\0';
|
||||
p[strlen (p) - 1] = '\0';
|
||||
*memname_p = p;
|
||||
}
|
||||
|
||||
|
||||
/* This function is called by 'ar_scan' to find which member to look at. */
|
||||
|
||||
/* ARGSUSED */
|
||||
static intmax_t
|
||||
ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
|
||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||
long int size UNUSED, intmax_t date,
|
||||
int uid UNUSED, int gid UNUSED, unsigned int mode UNUSED,
|
||||
const void *name)
|
||||
{
|
||||
return ar_name_equal (name, mem, truncated) ? date : 0;
|
||||
}
|
||||
|
||||
/* Return the modtime of NAME. */
|
||||
|
||||
time_t
|
||||
ar_member_date (const char *name)
|
||||
{
|
||||
char *arname;
|
||||
char *memname;
|
||||
intmax_t val;
|
||||
|
||||
ar_parse_name (name, &arname, &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.
|
||||
|
||||
But we must be careful not to enter_file the archive itself if it does
|
||||
not exist, because pattern_search assumes that files found in the data
|
||||
base exist or can be made. */
|
||||
{
|
||||
struct file *arfile;
|
||||
arfile = lookup_file (arname);
|
||||
if (arfile == 0 && file_exists_p (arname))
|
||||
arfile = enter_file (strcache_add (arname));
|
||||
|
||||
if (arfile != 0)
|
||||
(void) f_mtime (arfile, 0);
|
||||
}
|
||||
|
||||
val = ar_scan (arname, ar_member_date_1, memname);
|
||||
|
||||
free (arname);
|
||||
|
||||
return 0 < val && val <= TYPE_MAXIMUM (time_t) ? val : -1;
|
||||
}
|
||||
|
||||
/* Set the archive-member NAME's modtime to now. */
|
||||
|
||||
#ifdef VMS
|
||||
int
|
||||
ar_touch (const char *name)
|
||||
{
|
||||
O (error, NILF, _("touch archive member is not available on VMS"));
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
int
|
||||
ar_touch (const char *name)
|
||||
{
|
||||
char *arname, *memname;
|
||||
int val;
|
||||
|
||||
ar_parse_name (name, &arname, &memname);
|
||||
|
||||
/* Make sure we know the modtime of the archive itself before we
|
||||
touch the member, since this will change the archive modtime. */
|
||||
{
|
||||
struct file *arfile;
|
||||
arfile = enter_file (strcache_add (arname));
|
||||
f_mtime (arfile, 0);
|
||||
}
|
||||
|
||||
val = 1;
|
||||
switch (ar_member_touch (arname, memname))
|
||||
{
|
||||
case -1:
|
||||
OS (error, NILF, _("touch: Archive '%s' does not exist"), arname);
|
||||
break;
|
||||
case -2:
|
||||
OS (error, NILF, _("touch: '%s' is not a valid archive"), arname);
|
||||
break;
|
||||
case -3:
|
||||
perror_with_name ("touch: ", arname);
|
||||
break;
|
||||
case 1:
|
||||
OSS (error, NILF,
|
||||
_("touch: Member '%s' does not exist in '%s'"), memname, arname);
|
||||
break;
|
||||
case 0:
|
||||
val = 0;
|
||||
break;
|
||||
default:
|
||||
OS (error, NILF,
|
||||
_("touch: Bad return code from ar_member_touch on '%s'"), name);
|
||||
}
|
||||
|
||||
free (arname);
|
||||
|
||||
return val;
|
||||
}
|
||||
#endif /* !VMS */
|
||||
|
||||
/* State of an 'ar_glob' run, passed to 'ar_glob_match'. */
|
||||
|
||||
/* On VMS, (object) modules in libraries do not have suffixes. That is, to
|
||||
find a match for a pattern, the pattern must not have any suffix. So the
|
||||
suffix of the pattern is saved and the pattern is stripped (ar_glob).
|
||||
If there is a match and the match, which is a module name, is added to
|
||||
the chain, the saved suffix is added back to construct a source filename
|
||||
(ar_glob_match). */
|
||||
|
||||
struct ar_glob_state
|
||||
{
|
||||
const char *arname;
|
||||
const char *pattern;
|
||||
#ifdef VMS
|
||||
char *suffix;
|
||||
#endif
|
||||
size_t size;
|
||||
struct nameseq *chain;
|
||||
unsigned int n;
|
||||
};
|
||||
|
||||
/* This function is called by 'ar_scan' to match one archive
|
||||
element against the pattern in STATE. */
|
||||
|
||||
static intmax_t
|
||||
ar_glob_match (int desc UNUSED, const char *mem, int truncated UNUSED,
|
||||
long int hdrpos UNUSED, long int datapos UNUSED,
|
||||
long int size UNUSED, intmax_t date UNUSED, int uid UNUSED,
|
||||
int gid UNUSED, unsigned int mode UNUSED, const void *arg)
|
||||
{
|
||||
struct ar_glob_state *state = (struct ar_glob_state *)arg;
|
||||
|
||||
if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0)
|
||||
{
|
||||
/* We have a match. Add it to the chain. */
|
||||
struct nameseq *new = xcalloc (state->size);
|
||||
#ifdef VMS
|
||||
if (state->suffix)
|
||||
new->name = strcache_add(
|
||||
concat(5, state->arname, "(", mem, state->suffix, ")"));
|
||||
else
|
||||
#endif
|
||||
new->name = strcache_add(concat(4, state->arname, "(", mem, ")"));
|
||||
new->next = state->chain;
|
||||
state->chain = new;
|
||||
++state->n;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return nonzero if PATTERN contains any metacharacters.
|
||||
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
|
||||
static int
|
||||
ar_glob_pattern_p (const char *pattern, int quote)
|
||||
{
|
||||
const char *p;
|
||||
int opened = 0;
|
||||
|
||||
for (p = pattern; *p != '\0'; ++p)
|
||||
switch (*p)
|
||||
{
|
||||
case '?':
|
||||
case '*':
|
||||
return 1;
|
||||
|
||||
case '\\':
|
||||
if (quote)
|
||||
++p;
|
||||
break;
|
||||
|
||||
case '[':
|
||||
opened = 1;
|
||||
break;
|
||||
|
||||
case ']':
|
||||
if (opened)
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Glob for MEMBER_PATTERN in archive ARNAME.
|
||||
Return a malloc'd chain of matching elements (or nil if none). */
|
||||
|
||||
struct nameseq *
|
||||
ar_glob (const char *arname, const char *member_pattern, size_t size)
|
||||
{
|
||||
struct ar_glob_state state;
|
||||
struct nameseq *n;
|
||||
const char **names;
|
||||
unsigned int i;
|
||||
#ifdef VMS
|
||||
char *vms_member_pattern;
|
||||
#endif
|
||||
if (! ar_glob_pattern_p (member_pattern, 1))
|
||||
return 0;
|
||||
|
||||
/* Scan the archive for matches.
|
||||
ar_glob_match will accumulate them in STATE.chain. */
|
||||
state.arname = arname;
|
||||
state.pattern = member_pattern;
|
||||
#ifdef VMS
|
||||
{
|
||||
/* In a copy of the pattern, find the suffix, save it and remove it from
|
||||
the pattern */
|
||||
char *lastdot;
|
||||
vms_member_pattern = xstrdup(member_pattern);
|
||||
lastdot = strrchr(vms_member_pattern, '.');
|
||||
state.suffix = lastdot;
|
||||
if (lastdot)
|
||||
{
|
||||
state.suffix = xstrdup(lastdot);
|
||||
*lastdot = 0;
|
||||
}
|
||||
state.pattern = vms_member_pattern;
|
||||
}
|
||||
#endif
|
||||
state.size = size;
|
||||
state.chain = 0;
|
||||
state.n = 0;
|
||||
ar_scan (arname, ar_glob_match, &state);
|
||||
|
||||
#ifdef VMS
|
||||
/* Deallocate any duplicated string */
|
||||
free(vms_member_pattern);
|
||||
if (state.suffix)
|
||||
{
|
||||
free(state.suffix);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (state.chain == 0)
|
||||
return 0;
|
||||
|
||||
/* Now put the names into a vector for sorting. */
|
||||
names = alloca (state.n * sizeof (const char *));
|
||||
i = 0;
|
||||
for (n = state.chain; n != 0; n = n->next)
|
||||
names[i++] = n->name;
|
||||
|
||||
/* Sort them alphabetically. */
|
||||
/* MSVC erroneously warns without a cast here. */
|
||||
qsort ((void *)names, i, sizeof (*names), alpha_compare);
|
||||
|
||||
/* Put them back into the chain in the sorted order. */
|
||||
i = 0;
|
||||
for (n = state.chain; n != 0; n = n->next)
|
||||
n->name = names[i++];
|
||||
|
||||
return state.chain;
|
||||
}
|
||||
|
||||
#endif /* Not NO_ARCHIVES. */
|
||||
1013
src/arscan.c
Normal file
1013
src/arscan.c
Normal file
File diff suppressed because it is too large
Load Diff
712
src/commands.c
Normal file
712
src/commands.c
Normal file
@@ -0,0 +1,712 @@
|
||||
/* Command processing for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
#include "filedef.h"
|
||||
#include "os.h"
|
||||
#include "dep.h"
|
||||
#include "variable.h"
|
||||
#include "job.h"
|
||||
#include "commands.h"
|
||||
#ifdef WINDOWS32
|
||||
#include <windows.h>
|
||||
#include "w32err.h"
|
||||
#endif
|
||||
|
||||
#if VMS
|
||||
# define FILE_LIST_SEPARATOR (vms_comma_separator ? ',' : ' ')
|
||||
#else
|
||||
# define FILE_LIST_SEPARATOR ' '
|
||||
#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.
|
||||
* Use STEM to set $*.
|
||||
* If STEM is 0, then set FILE->STEM and $* to the target name with any
|
||||
* suffix in the .SUFFIXES list stripped off. */
|
||||
|
||||
void
|
||||
set_file_variables (struct file *file, const char *stem)
|
||||
{
|
||||
struct dep *d;
|
||||
const char *at, *percent, *star, *less;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
/* If the target is an archive member 'lib(member)',
|
||||
then $@ is 'lib' and $% is 'member'. */
|
||||
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
size_t len;
|
||||
const char *cp;
|
||||
char *p;
|
||||
|
||||
cp = strchr (file->name, '(');
|
||||
p = alloca (cp - file->name + 1);
|
||||
memcpy (p, file->name, cp - file->name);
|
||||
p[cp - file->name] = '\0';
|
||||
at = p;
|
||||
len = strlen (cp + 1);
|
||||
p = alloca (len);
|
||||
memcpy (p, cp + 1, len - 1);
|
||||
p[len - 1] = '\0';
|
||||
percent = p;
|
||||
}
|
||||
else
|
||||
#endif /* NO_ARCHIVES. */
|
||||
{
|
||||
at = file->name;
|
||||
percent = "";
|
||||
}
|
||||
|
||||
/* $* is the stem from an implicit or static pattern rule. */
|
||||
if (stem == 0)
|
||||
{
|
||||
/* In Unix make, $* is set to the target name with
|
||||
any suffix in the .SUFFIXES list stripped off for
|
||||
explicit rules. We store this in the 'stem' member. */
|
||||
const char *name;
|
||||
size_t len;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
name = strchr (file->name, '(') + 1;
|
||||
len = strlen (name) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
name = file->name;
|
||||
len = strlen (name);
|
||||
}
|
||||
|
||||
for (d = enter_file (strcache_add (".SUFFIXES"))->deps; d ; d = d->next)
|
||||
{
|
||||
const char *dn = dep_name (d);
|
||||
size_t slen = strlen (dn);
|
||||
if (len > slen && memcmp (dn, name + (len - slen), slen) == 0)
|
||||
{
|
||||
file->stem = stem = strcache_add_len (name, len - slen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (d == 0)
|
||||
file->stem = stem = "";
|
||||
}
|
||||
star = stem;
|
||||
|
||||
/* $< is the first not order-only dependency. */
|
||||
less = "";
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (!d->ignore_mtime && !d->ignore_automatic_vars && !d->need_2nd_expansion)
|
||||
{
|
||||
less = dep_name (d);
|
||||
break;
|
||||
}
|
||||
|
||||
if (file->cmds != 0 && file->cmds == default_file->cmds)
|
||||
/* This file got its commands from .DEFAULT.
|
||||
In this case $< is the same as $@. */
|
||||
less = at;
|
||||
|
||||
#define DEFINE_VARIABLE(name, len, value) \
|
||||
(void) define_variable_for_file (name,len,value,o_automatic,0,file)
|
||||
|
||||
/* Define the variables. */
|
||||
|
||||
DEFINE_VARIABLE ("<", 1, less);
|
||||
DEFINE_VARIABLE ("*", 1, star);
|
||||
DEFINE_VARIABLE ("@", 1, at);
|
||||
DEFINE_VARIABLE ("%", 1, percent);
|
||||
|
||||
/* Compute the values for $^, $+, $?, and $|. */
|
||||
|
||||
{
|
||||
static char *plus_value=0, *bar_value=0, *qmark_value=0;
|
||||
static size_t plus_max=0, bar_max=0, qmark_max=0;
|
||||
|
||||
size_t qmark_len, plus_len, bar_len;
|
||||
char *cp;
|
||||
char *caret_value;
|
||||
char *qp;
|
||||
char *bp;
|
||||
size_t len;
|
||||
|
||||
struct hash_table dep_hash;
|
||||
void **slot;
|
||||
|
||||
/* Compute first the value for $+, which is supposed to contain
|
||||
duplicate dependencies as they were listed in the makefile. */
|
||||
|
||||
plus_len = 0;
|
||||
bar_len = 0;
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
if (!d->need_2nd_expansion && !d->ignore_automatic_vars)
|
||||
{
|
||||
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 && ! d->ignore_automatic_vars)
|
||||
{
|
||||
const char *c = dep_name (d);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
len = strlen (c) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
len = strlen (c);
|
||||
|
||||
cp = mempcpy (cp, c, len);
|
||||
*cp++ = FILE_LIST_SEPARATOR;
|
||||
if (! (d->changed || always_make_flag))
|
||||
qmark_len -= len + 1; /* Don't space in $? for this one. */
|
||||
}
|
||||
|
||||
/* Kill the last space and define the variable. */
|
||||
|
||||
cp[cp > plus_value ? -1 : 0] = '\0';
|
||||
DEFINE_VARIABLE ("+", 1, plus_value);
|
||||
|
||||
/* Compute the values for $^, $?, and $|. */
|
||||
|
||||
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
|
||||
|
||||
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)
|
||||
{
|
||||
if (d->need_2nd_expansion || d->ignore_automatic_vars)
|
||||
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 || d->ignore_automatic_vars || hash_find_item (&dep_hash, d) != d)
|
||||
continue;
|
||||
|
||||
c = dep_name (d);
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (c))
|
||||
{
|
||||
c = strchr (c, '(') + 1;
|
||||
len = strlen (c) - 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
len = strlen (c);
|
||||
|
||||
if (d->ignore_mtime)
|
||||
{
|
||||
bp = mempcpy (bp, c, len);
|
||||
*bp++ = FILE_LIST_SEPARATOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
cp = mempcpy (cp, c, len);
|
||||
*cp++ = FILE_LIST_SEPARATOR;
|
||||
if (d->changed || always_make_flag)
|
||||
{
|
||||
qp = mempcpy (qp, c, len);
|
||||
*qp++ = FILE_LIST_SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hash_free (&dep_hash, 0);
|
||||
|
||||
/* Kill the last spaces and define the variables. */
|
||||
|
||||
cp[cp > caret_value ? -1 : 0] = '\0';
|
||||
DEFINE_VARIABLE ("^", 1, caret_value);
|
||||
|
||||
qp[qp > qmark_value ? -1 : 0] = '\0';
|
||||
DEFINE_VARIABLE ("?", 1, qmark_value);
|
||||
|
||||
bp[bp > bar_value ? -1 : 0] = '\0';
|
||||
DEFINE_VARIABLE ("|", 1, bar_value);
|
||||
}
|
||||
|
||||
#undef DEFINE_VARIABLE
|
||||
}
|
||||
|
||||
/* Chop CMDS up into individual command lines if necessary.
|
||||
Also set the 'lines_flags' and 'any_recurse' members. */
|
||||
|
||||
void
|
||||
chop_commands (struct commands *cmds)
|
||||
{
|
||||
unsigned short nlines;
|
||||
unsigned short i;
|
||||
char **lines;
|
||||
|
||||
/* If we don't have any commands, or we already parsed them, never mind. */
|
||||
if (!cmds || cmds->command_lines != NULL)
|
||||
return;
|
||||
|
||||
/* Chop CMDS->commands up into lines in CMDS->command_lines. */
|
||||
|
||||
if (one_shell)
|
||||
{
|
||||
size_t 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 = cmds->commands;
|
||||
size_t max = 5;
|
||||
|
||||
nlines = 0;
|
||||
lines = xmalloc (max * sizeof (char *));
|
||||
while (*p != '\0')
|
||||
{
|
||||
const char *end = p;
|
||||
find_end:;
|
||||
end = strchr (end, '\n');
|
||||
if (end == NULL)
|
||||
end = p + strlen (p);
|
||||
else if (end > p && end[-1] == '\\')
|
||||
{
|
||||
int backslash = 1;
|
||||
if (end > p + 1)
|
||||
{
|
||||
const char *b;
|
||||
for (b = end - 2; b >= p && *b == '\\'; --b)
|
||||
backslash = !backslash;
|
||||
}
|
||||
if (backslash)
|
||||
{
|
||||
++end;
|
||||
goto find_end;
|
||||
}
|
||||
}
|
||||
|
||||
if (nlines == USHRT_MAX)
|
||||
ON (fatal, &cmds->fileinfo,
|
||||
_("Recipe has too many lines (limit %hu)"), nlines);
|
||||
|
||||
if (nlines == max)
|
||||
{
|
||||
max += 2;
|
||||
lines = xrealloc (lines, max * sizeof (char *));
|
||||
}
|
||||
|
||||
lines[nlines++] = xstrndup (p, (size_t) (end - p));
|
||||
p = end;
|
||||
if (*p != '\0')
|
||||
++p;
|
||||
}
|
||||
}
|
||||
|
||||
/* Finally, set the corresponding CMDS->lines_flags elements and the
|
||||
CMDS->any_recurse flag. */
|
||||
|
||||
cmds->ncommand_lines = nlines;
|
||||
cmds->command_lines = lines;
|
||||
|
||||
cmds->any_recurse = 0;
|
||||
cmds->lines_flags = xmalloc (nlines);
|
||||
|
||||
for (i = 0; i < nlines; ++i)
|
||||
{
|
||||
unsigned char flags = 0;
|
||||
const char *p = lines[i];
|
||||
|
||||
while (ISBLANK (*p) || *p == '-' || *p == '@' || *p == '+')
|
||||
switch (*(p++))
|
||||
{
|
||||
case '+':
|
||||
flags |= COMMANDS_RECURSE;
|
||||
break;
|
||||
case '@':
|
||||
flags |= COMMANDS_SILENT;
|
||||
break;
|
||||
case '-':
|
||||
flags |= COMMANDS_NOERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
/* If no explicit '+' was given, look for MAKE variable references. */
|
||||
if (! ANY_SET (flags, COMMANDS_RECURSE)
|
||||
&& (strstr (p, "$(MAKE)") != 0 || strstr (p, "${MAKE}") != 0))
|
||||
flags |= COMMANDS_RECURSE;
|
||||
|
||||
cmds->lines_flags[i] = flags;
|
||||
cmds->any_recurse |= ANY_SET (flags, COMMANDS_RECURSE) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Execute the commands to remake FILE. If they are currently executing,
|
||||
return or have already finished executing, just return. Otherwise,
|
||||
fork off a child process to run the first command line in the sequence. */
|
||||
|
||||
void
|
||||
execute_file_commands (struct file *file)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
/* Don't go through all the preparations if
|
||||
the commands are nothing but whitespace. */
|
||||
|
||||
for (p = file->cmds->commands; *p != '\0'; ++p)
|
||||
if (!ISSPACE (*p) && *p != '-' && *p != '@' && *p != '+')
|
||||
break;
|
||||
if (*p == '\0')
|
||||
{
|
||||
/* If there are no commands, assume everything worked. */
|
||||
set_command_state (file, cs_running);
|
||||
file->update_status = us_success;
|
||||
notice_finished_file (file);
|
||||
return;
|
||||
}
|
||||
|
||||
/* First set the automatic variables according to this file. */
|
||||
|
||||
initialize_file_variables (file, 0);
|
||||
|
||||
set_file_variables (file, file->stem);
|
||||
|
||||
/* Some systems don't support overwriting a loaded object so if this one
|
||||
unload it before remaking. Keep its name in .LOADED: it will be rebuilt
|
||||
and loaded again. If rebuilding or loading again fail, then we'll exit
|
||||
anyway and it won't matter. */
|
||||
if (file->loaded && unload_file (file->name) == 0)
|
||||
{
|
||||
file->loaded = 0;
|
||||
file->unloaded = 1;
|
||||
}
|
||||
|
||||
/* Start the commands running. */
|
||||
new_job (file);
|
||||
}
|
||||
|
||||
/* This is set while we are inside fatal_error_signal,
|
||||
so things can avoid nonreentrant operations. */
|
||||
|
||||
volatile sig_atomic_t handling_fatal_signal = 0;
|
||||
|
||||
/* Handle fatal signals. */
|
||||
|
||||
void
|
||||
fatal_error_signal (int sig)
|
||||
{
|
||||
#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);
|
||||
exit (EXIT_FAILURE);
|
||||
#else /* not __MSDOS__ */
|
||||
#ifdef _AMIGA
|
||||
remove_intermediates (1);
|
||||
if (sig == SIGINT)
|
||||
fputs (_("*** Break.\n"), stderr);
|
||||
|
||||
exit (10);
|
||||
#else /* not Amiga */
|
||||
#ifdef WINDOWS32
|
||||
extern HANDLE main_thread;
|
||||
|
||||
/* Windows creates a separate 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 = %lu\n", susp_count);
|
||||
else if (susp_count == (DWORD)-1)
|
||||
{
|
||||
DWORD ierr = GetLastError ();
|
||||
|
||||
fprintf (stderr, "SuspendThread: error %lu: %s\n",
|
||||
ierr, map_windows32_error_to_string (ierr));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
handling_fatal_signal = 1;
|
||||
|
||||
/* Set the handling for this signal to the default.
|
||||
It is blocked now while we run this handler. */
|
||||
signal (sig, SIG_DFL);
|
||||
|
||||
temp_stdin_unlink ();
|
||||
osync_clear ();
|
||||
jobserver_clear ();
|
||||
|
||||
/* A termination signal won't be sent to the entire
|
||||
process group, but it means we want to kill the children. */
|
||||
|
||||
if (sig == SIGTERM)
|
||||
{
|
||||
struct child *c;
|
||||
for (c = children; c != 0; c = c->next)
|
||||
if (!c->remote && c->pid > 0)
|
||||
(void) kill (c->pid, SIGTERM);
|
||||
}
|
||||
|
||||
/* If we got a signal that means the user
|
||||
wanted to kill make, remove pending targets. */
|
||||
|
||||
if (sig == SIGTERM || sig == SIGINT
|
||||
#ifdef SIGHUP
|
||||
|| sig == SIGHUP
|
||||
#endif
|
||||
#ifdef SIGQUIT
|
||||
|| sig == SIGQUIT
|
||||
#endif
|
||||
)
|
||||
{
|
||||
struct child *c;
|
||||
|
||||
/* Remote children won't automatically get signals sent
|
||||
to the process group, so we must send them. */
|
||||
for (c = children; c != 0; c = c->next)
|
||||
if (c->remote && c->pid > 0)
|
||||
(void) remote_kill (c->pid, sig);
|
||||
|
||||
for (c = children; c != 0; c = c->next)
|
||||
delete_child_targets (c);
|
||||
|
||||
/* Clean up the children. We don't just use the call below because
|
||||
we don't want to print the "Waiting for children" message. */
|
||||
while (job_slots_used > 0)
|
||||
reap_children (1, 0);
|
||||
}
|
||||
else
|
||||
/* Wait for our children to die. */
|
||||
while (job_slots_used > 0)
|
||||
reap_children (1, 1);
|
||||
|
||||
/* Delete any non-precious intermediate files that were made. */
|
||||
|
||||
remove_intermediates (1);
|
||||
|
||||
#ifdef SIGQUIT
|
||||
if (sig == SIGQUIT)
|
||||
/* We don't want to send ourselves SIGQUIT, because it will
|
||||
cause a core dump. Just exit instead. */
|
||||
exit (MAKE_TROUBLE);
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
if (main_thread)
|
||||
CloseHandle (main_thread);
|
||||
/* Cannot call W32_kill with a pid (it needs a handle). The exit
|
||||
status of 130 emulates what happens in Bash. */
|
||||
exit (130);
|
||||
#else
|
||||
/* Signal the same code; this time it will really be fatal. The signal
|
||||
will be unblocked when we return and arrive then to kill us. */
|
||||
if (kill (make_pid (), sig) < 0)
|
||||
pfatal_with_name ("kill");
|
||||
#endif /* not WINDOWS32 */
|
||||
#endif /* not Amiga */
|
||||
#endif /* not __MSDOS__ */
|
||||
}
|
||||
|
||||
/* Delete FILE unless it's precious or not actually a file (phony),
|
||||
and it has changed on disk since we last stat'd it. */
|
||||
|
||||
static void
|
||||
delete_target (struct file *file, const char *on_behalf_of)
|
||||
{
|
||||
struct stat st;
|
||||
int e;
|
||||
|
||||
if (file->precious || file->phony)
|
||||
return;
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (ar_name (file->name))
|
||||
{
|
||||
time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
|
||||
? (time_t) -1
|
||||
: (time_t) FILE_TIMESTAMP_S (file->last_mtime));
|
||||
if (ar_member_date (file->name) != file_date)
|
||||
{
|
||||
if (on_behalf_of)
|
||||
OSS (error, NILF,
|
||||
_("*** [%s] Archive member '%s' may be bogus; not deleted"),
|
||||
on_behalf_of, file->name);
|
||||
else
|
||||
OS (error, NILF,
|
||||
_("*** Archive member '%s' may be bogus; not deleted"),
|
||||
file->name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
EINTRLOOP (e, stat (file->name, &st));
|
||||
if (e == 0
|
||||
&& S_ISREG (st.st_mode)
|
||||
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
|
||||
{
|
||||
if (on_behalf_of)
|
||||
OSS (error, NILF,
|
||||
_("*** [%s] Deleting file '%s'"), on_behalf_of, file->name);
|
||||
else
|
||||
OS (error, NILF, _("*** Deleting file '%s'"), file->name);
|
||||
if (unlink (file->name) < 0
|
||||
&& errno != ENOENT) /* It disappeared; so what. */
|
||||
perror_with_name ("unlink: ", file->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Delete all non-precious targets of CHILD unless they were already deleted.
|
||||
Set the flag in CHILD to say they've been deleted. */
|
||||
|
||||
void
|
||||
delete_child_targets (struct child *child)
|
||||
{
|
||||
struct dep *d;
|
||||
|
||||
if (child->deleted || child->pid < 0)
|
||||
return;
|
||||
|
||||
/* Delete the target file if it changed. */
|
||||
delete_target (child->file, NULL);
|
||||
|
||||
/* Also remove any non-precious targets listed in the 'also_make' member. */
|
||||
for (d = child->file->also_make; d != 0; d = d->next)
|
||||
delete_target (d->file, child->file->name);
|
||||
|
||||
child->deleted = 1;
|
||||
}
|
||||
|
||||
/* Print out the commands in CMDS. */
|
||||
|
||||
void
|
||||
print_commands (const struct commands *cmds)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
fputs (_("# recipe to execute"), stdout);
|
||||
|
||||
if (cmds->fileinfo.filenm == 0)
|
||||
puts (_(" (built-in):"));
|
||||
else
|
||||
printf (_(" (from '%s', line %lu):\n"),
|
||||
cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
||||
|
||||
s = cmds->commands;
|
||||
while (*s != '\0')
|
||||
{
|
||||
const char *end;
|
||||
int bs;
|
||||
|
||||
/* Print one full logical recipe line: find a non-escaped newline. */
|
||||
for (end = s, bs = 0; *end != '\0'; ++end)
|
||||
{
|
||||
if (*end == '\n' && !bs)
|
||||
break;
|
||||
|
||||
bs = *end == '\\' ? !bs : 0;
|
||||
}
|
||||
|
||||
printf ("%c%.*s\n", cmd_prefix, (int) (end - s), s);
|
||||
|
||||
s = end + (end[0] == '\n');
|
||||
}
|
||||
}
|
||||
45
src/commands.h
Normal file
45
src/commands.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Definition of data structures describing shell commands for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Structure that gives the commands to make a file
|
||||
and information about where these commands came from. */
|
||||
|
||||
struct commands
|
||||
{
|
||||
floc fileinfo; /* Where commands were defined. */
|
||||
char *commands; /* Commands text. */
|
||||
char **command_lines; /* Commands chopped up into lines. */
|
||||
unsigned char *lines_flags; /* One set of flag bits for each line. */
|
||||
unsigned short ncommand_lines;/* Number of command lines. */
|
||||
char recipe_prefix; /* Recipe prefix for this command set. */
|
||||
unsigned int any_recurse:1; /* Nonzero if any 'lines_flags' elt has */
|
||||
/* the COMMANDS_RECURSE bit set. */
|
||||
};
|
||||
|
||||
/* Bits in 'lines_flags'. */
|
||||
#define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
|
||||
#define COMMANDS_SILENT 2 /* Silent: @. */
|
||||
#define COMMANDS_NOERROR 4 /* No errors: -. */
|
||||
|
||||
struct file;
|
||||
struct child;
|
||||
|
||||
void fatal_error_signal (int sig);
|
||||
void execute_file_commands (struct file *file);
|
||||
void print_commands (const struct commands *cmds);
|
||||
void delete_child_targets (struct child *child);
|
||||
void chop_commands (struct commands *cmds);
|
||||
void set_file_variables (struct file *file, const char *stem);
|
||||
331
src/config.ami
Normal file
331
src/config.ami
Normal file
@@ -0,0 +1,331 @@
|
||||
/* config.h -- hand-massaged for Amiga -*-C-*-
|
||||
Copyright (C) 1995-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "mkconfig.h"
|
||||
|
||||
#define MK_AMIGAOS 1
|
||||
|
||||
/* 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. */
|
||||
#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. */
|
||||
/* #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 to the widest signed integer type if <stdint.h> and <inttypes.h> do
|
||||
not define. */
|
||||
#define intmax_t long
|
||||
|
||||
/* Define to 'unsigned long' or 'unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#define uintmax_t unsigned long
|
||||
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
#define gid_t int
|
||||
|
||||
/* 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 to 1 if you have the declaration of 'getloadavg'. */
|
||||
/* #undef HAVE_DECL_GETLOADAVG */
|
||||
|
||||
/* Define if your system has a working fnmatch function. */
|
||||
/* #undef HAVE_FNMATCH */
|
||||
|
||||
/* Define if you have the getmntent function. */
|
||||
/* #undef HAVE_GETMNTENT */
|
||||
|
||||
/* Embed GNU Guile support */
|
||||
/* #undef HAVE_GUILE */
|
||||
|
||||
/* Define if the 'long double' type works. */
|
||||
/* #undef HAVE_LONG_DOUBLE */
|
||||
|
||||
/* Define if you support file names longer than 14 characters. */
|
||||
#define HAVE_LONG_FILE_NAMES 1
|
||||
|
||||
/* Define if you have a working 'mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
/* #undef HAVE_ST_BLKSIZE */
|
||||
|
||||
/* Define if your struct stat has st_blocks. */
|
||||
/* #undef HAVE_ST_BLOCKS */
|
||||
|
||||
/* Define if you have the strcoll function and it is properly defined. */
|
||||
#define HAVE_STRCOLL 1
|
||||
|
||||
/* Define if your struct stat has st_rdev. */
|
||||
#define HAVE_ST_RDEV 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define if your struct tm has tm_zone. */
|
||||
/* #undef HAVE_TM_ZONE */
|
||||
|
||||
/* Define if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
#define HAVE_TZNAME 1
|
||||
|
||||
/* Define if you have <unistd.h>. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
/* #undef HAVE_UTIME_NULL */
|
||||
|
||||
/* 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. */
|
||||
#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 */
|
||||
|
||||
/* 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
|
||||
*/
|
||||
#define STACK_DIRECTION -1
|
||||
|
||||
/* Define if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define 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. */
|
||||
#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 to the name of the SCCS 'get' command. */
|
||||
#define SCCS_GET "get"
|
||||
|
||||
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||
/* #undef SCCS_GET_MINUS_G */
|
||||
|
||||
/* Define this to enable job server support in GNU make. */
|
||||
/* #undef MAKE_JOBSERVER */
|
||||
|
||||
/* Define to be the nanoseconds member of struct stat's st_mtim,
|
||||
if it exists. */
|
||||
/* #undef ST_MTIM_NSEC */
|
||||
|
||||
/* Define this if the C library defines the variable 'sys_siglist'. */
|
||||
/* #undef HAVE_SYS_SIGLIST */
|
||||
|
||||
/* Define this if the C library defines the variable '_sys_siglist'. */
|
||||
/* #undef HAVE__SYS_SIGLIST */
|
||||
|
||||
/* Define this if you have the 'union wait' type in <sys/wait.h>. */
|
||||
/* #undef HAVE_UNION_WAIT */
|
||||
|
||||
/* Define if you have the dup2 function. */
|
||||
/* #undef HAVE_DUP2 */
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the getgroups function. */
|
||||
/* #undef HAVE_GETGROUPS */
|
||||
|
||||
/* Define if you have the gethostbyname function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
/* #undef HAVE_GETHOSTNAME */
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define if you have the mktemp function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define if you have the psignal function. */
|
||||
/* #undef HAVE_PSIGNAL */
|
||||
|
||||
/* Define if you have the pstat_getdynamic function. */
|
||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||
|
||||
/* Define if you have the setegid function. */
|
||||
/* #undef HAVE_SETEGID */
|
||||
|
||||
/* Define if you have the seteuid function. */
|
||||
/* #undef HAVE_SETEUID */
|
||||
|
||||
/* Define if you have the setlinebuf function. */
|
||||
/* #undef HAVE_SETLINEBUF */
|
||||
|
||||
/* Define if you have the setregid function. */
|
||||
/* #undef HAVE_SETREGID */
|
||||
|
||||
/* Define if you have the setreuid function. */
|
||||
/* #undef HAVE_SETREUID */
|
||||
|
||||
/* Define if you have the sigsetmask function. */
|
||||
/* #undef HAVE_SIGSETMASK */
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
/* #undef HAVE_SOCKET */
|
||||
|
||||
/* Define 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 strsignal function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define if you have the strtoll function. */
|
||||
/* #undef HAVE_STRTOLL */
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <mach/mach.h> header file. */
|
||||
/* #undef HAVE_MACH_MACH_H */
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
/* #undef HAVE_MEMORY_H */
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
/* #undef HAVE_STDLIB_H */
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
#define HAVE_SYS_DIR_H 1
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if you have the dgc library (-ldgc). */
|
||||
/* #undef HAVE_LIBDGC */
|
||||
|
||||
/* Define if you have the kstat library (-lkstat). */
|
||||
/* #undef HAVE_LIBKSTAT */
|
||||
|
||||
/* Define to 1 if you have the `isatty' function. */
|
||||
/* #undef HAVE_ISATTY */
|
||||
|
||||
/* Define to 1 if you have the `ttyname' function. */
|
||||
/* #undef HAVE_TTYNAME */
|
||||
|
||||
/* Define if you have the sun library (-lsun). */
|
||||
/* #undef HAVE_LIBSUN */
|
||||
|
||||
/* Output sync support */
|
||||
#define NO_OUTPUT_SYNC
|
||||
|
||||
/* Define for Case Insensitive behavior */
|
||||
#define HAVE_CASE_INSENSITIVE_FS
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "Amiga"
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#define ssize_t int
|
||||
430
src/config.h-vms
Normal file
430
src/config.h-vms
Normal file
@@ -0,0 +1,430 @@
|
||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
||||
|
||||
Copyright (C) 1996-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "mkconfig.h"
|
||||
|
||||
#define MK_VMS 1
|
||||
|
||||
/* Pull in types.h here to get __CRTL_VER defined for old versions of the
|
||||
compiler which don't define it. */
|
||||
#ifdef __DECC
|
||||
# include <types.h>
|
||||
#endif
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Define to 1 if NLS is requested. */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
/* Define as 1 if you have dcgettext. */
|
||||
/* #undef HAVE_DCGETTEXT */
|
||||
|
||||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
||||
/* #undef HAVE_GETTEXT */
|
||||
|
||||
/* 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. */
|
||||
/* #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 to the widest signed integer type if <stdint.h> and <inttypes.h> do
|
||||
not define. */
|
||||
#define intmax_t unsigned long
|
||||
|
||||
/* Define to 'unsigned long' or 'unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#define uintmax_t unsigned long
|
||||
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
/* #undef gid_t */
|
||||
|
||||
/* Define to 1 if you have alloca, as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define to 1 if you have the declaration of 'getloadavg'. */
|
||||
/* #undef HAVE_DECL_GETLOADAVG */
|
||||
|
||||
/* 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 you have the getmntent function. */
|
||||
/* #undef HAVE_GETMNTENT */
|
||||
|
||||
/* Define to 1 if the 'long double' type works. */
|
||||
/* #undef HAVE_LONG_DOUBLE */
|
||||
|
||||
/* Define to 1 if you support file names longer than 14 characters. */
|
||||
#define HAVE_LONG_FILE_NAMES 1
|
||||
|
||||
/* Define to 1 if you have a working 'mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to 1 if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||
|
||||
/* Define to 1 if your struct stat has st_blksize. */
|
||||
/* #undef HAVE_ST_BLKSIZE */
|
||||
|
||||
/* Define to 1 if your struct stat has st_blocks. */
|
||||
/* #undef HAVE_ST_BLOCKS */
|
||||
|
||||
/* Define to 1 if you have the strcoll function and it is properly defined. */
|
||||
/* #undef HAVE_STRCOLL */
|
||||
|
||||
/* Define to 1 if you have the strncasecmp' function. */
|
||||
#if __CRTL_VER >= 70000000
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if your struct stat has st_rdev. */
|
||||
/* #undef HAVE_ST_RDEV */
|
||||
|
||||
/* Define to 1 if you have the strftime function. */
|
||||
/* #undef HAVE_STRFTIME */
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to 1 if your struct tm has tm_zone. */
|
||||
/* #undef HAVE_TM_ZONE */
|
||||
|
||||
/* Define to 1 if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
/* #undef HAVE_TZNAME */
|
||||
|
||||
/* Define to 1 if you have <unistd.h>. */
|
||||
#ifdef __DECC
|
||||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if utime(file, NULL) sets file's timestamp to the present. */
|
||||
/* #undef HAVE_UTIME_NULL */
|
||||
|
||||
/* Define to 1 if you have the wait3 system call. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to 1 if your struct nlist has an n_un member. */
|
||||
/* #undef NLIST_NAME_UNION */
|
||||
|
||||
/* Define to 1 if you have <nlist.h>. */
|
||||
/* #undef NLIST_STRUCT */
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
/* I assume types.h is available for all 5.0 cc/cxx compilers */
|
||||
#if __DECC_VER < 50090000
|
||||
#define pid_t int
|
||||
#endif
|
||||
|
||||
/* Define to 1 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 */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* #undef STDC_HEADERS */
|
||||
|
||||
/* Define on System V Release 4. */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Define to 1 if 'sys_siglist' is declared by <signal.h>. */
|
||||
/* #undef SYS_SIGLIST_DECLARED */
|
||||
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
#if __DECC_VER < 50090000
|
||||
#define uid_t int
|
||||
#endif
|
||||
|
||||
/* 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 to the name of the SCCS 'get' command. */
|
||||
/* #undef SCCS_GET */
|
||||
|
||||
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||
/* #undef SCCS_GET_MINUS_G */
|
||||
|
||||
/* Define this to enable job server support in GNU make. */
|
||||
/* #undef MAKE_JOBSERVER */
|
||||
|
||||
/* Define to be the nanoseconds member of struct stat's st_mtim,
|
||||
if it exists. */
|
||||
/* #undef ST_MTIM_NSEC */
|
||||
|
||||
/* Define 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 */
|
||||
|
||||
/* 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 dup2 function. */
|
||||
#define HAVE_DUP2 1
|
||||
|
||||
/* Define to 1 if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the getgroups function. */
|
||||
/* #undef HAVE_GETGROUPS */
|
||||
|
||||
/* Define to 1 if you have the gethostbyname function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define to 1 if you have the gethostname function. */
|
||||
/* #undef HAVE_GETHOSTNAME */
|
||||
|
||||
/* Define to 1 if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the 'mkfifo' function. */
|
||||
/* #undef HAVE_MKFIFO */
|
||||
|
||||
/* Define to 1 if you have the mktemp function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have the psignal function. */
|
||||
/* #undef HAVE_PSIGNAL */
|
||||
|
||||
/* Define to 1 if you have the pstat_getdynamic function. */
|
||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||
|
||||
/* 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 setregid function. */
|
||||
/* #undefine HAVE_SETREGID */
|
||||
|
||||
/* 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 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 strsignal function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#define HAVE_STRTOLL 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 you have the <dirent.h> header file. */
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#ifdef __DECC
|
||||
#define HAVE_FCNTL_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* 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. */
|
||||
/* #undef HAVE_MEMORY_H */
|
||||
|
||||
/* Define to 1 if you have the `mempcpy' function. */
|
||||
/* #undef HAVE_MEMPCPY */
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* 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 to 1 if you have the <sys/dir.h> header file. */
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file. */
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/timeb.h> header file. */
|
||||
#ifndef __GNUC__
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* 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 sun library (-lsun). */
|
||||
/* #undef HAVE_LIBSUN */
|
||||
|
||||
/* Define to 1 if you have the `isatty' function. */
|
||||
/* #undef HAVE_ISATTY */
|
||||
|
||||
/* Define to 1 if you have the `ttyname' function. */
|
||||
/* #undef HAVE_TTYNAME */
|
||||
|
||||
/* Use high resolution file timestamps if nonzero. */
|
||||
#define FILE_TIMESTAMP_HI_RES 0
|
||||
|
||||
/* Define for case insensitve filenames */
|
||||
#define HAVE_CASE_INSENSITIVE_FS 1
|
||||
|
||||
/* VMS specific, define it if you want to use case 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 use non-VMS code for opendir() etc. */
|
||||
#if __CRTL_VER < 70000000
|
||||
# define HAVE_VMSDIR_H 1
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_VMSDIR_H) && defined(HAVE_DIRENT_H)
|
||||
#undef HAVE_DIRENT_H
|
||||
#endif
|
||||
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define INCLUDEDIR "sys$sysroot:[syslib]"
|
||||
#define LIBDIR "sys$sysroot:[syslib]"
|
||||
|
||||
/* Don't use RTL functions of OpenVMS */
|
||||
#ifdef __DECC
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#define getopt gnu_getopt
|
||||
#define optarg gnu_optarg
|
||||
#define optopt gnu_optopt
|
||||
#define optind gnu_optind
|
||||
#define opterr gnu_opterr
|
||||
#define globfree gnu_globfree
|
||||
#define glob gnu_glob
|
||||
#endif
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
/* maybe this should be placed into makeint.h */
|
||||
#if defined(__VAX) && defined(__DECC)
|
||||
#define alloca(n) __ALLOCA(n)
|
||||
#endif
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Output sync sypport */
|
||||
#define NO_OUTPUT_SYNC
|
||||
|
||||
/* Define to 1 to write even short single-line actions into a VMS/DCL command
|
||||
file; this also enables exporting make environment variables into the
|
||||
(sub-)process, which executes the action.
|
||||
The usual make rules apply whether a shell variable - here a DCL symbol or
|
||||
VMS logical [see CRTL getenv()] - is added to the make environment and
|
||||
is exported. */
|
||||
#define USE_DCL_COM_FILE 1
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "VMS"
|
||||
623
src/config.h.W32
Normal file
623
src/config.h.W32
Normal file
@@ -0,0 +1,623 @@
|
||||
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
||||
|
||||
Copyright (C) 1996-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "mkconfig.h"
|
||||
|
||||
#define MK_W32 1
|
||||
|
||||
/* Build for the WINDOWS32 API. */
|
||||
#define WINDOWS32 1
|
||||
|
||||
/* 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:4130) /* logical operation on address of string constant */
|
||||
# pragma warning(disable:4131) /* uses old-style declarator */
|
||||
# pragma warning(disable:4702) /* unreachable code */
|
||||
# define _CRT_SECURE_NO_WARNINGS 1 /* function or variable may be unsafe */
|
||||
# define _CRT_NONSTDC_NO_WARNINGS 1 /* functions w/o a leading underscore */
|
||||
#endif
|
||||
|
||||
/* Define to 1 if the 'closedir' function returns void instead of 'int'. */
|
||||
/* #undef CLOSEDIR_VOID */
|
||||
|
||||
/* Define to 1 if using 'alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
|
||||
/* #undef DGUX */
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
/* Use high resolution file timestamps if nonzero. */
|
||||
#define FILE_TIMESTAMP_HI_RES 0
|
||||
|
||||
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
|
||||
may be supplied by this distribution. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if <alloca.h> works. */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define to 1 if you have the 'atexit' function. */
|
||||
#define HAVE_ATEXIT 1
|
||||
|
||||
/* Use case insensitive file names */
|
||||
/* #undef HAVE_CASE_INSENSITIVE_FS */
|
||||
|
||||
/* Define to 1 if you have the clock_gettime function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
/* #undef HAVE_DCGETTEXT */
|
||||
|
||||
/* Define to 1 if you have the declaration of 'bsd_signal', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_BSD_SIGNAL 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `dlerror', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_DLERROR 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `dlopen', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL_DLOPEN 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `dlsym', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL_DLSYM 0
|
||||
|
||||
/* Define to 1 if you have the declaration of 'getloadavg'. */
|
||||
/* #undef HAVE_DECL_GETLOADAVG */
|
||||
|
||||
/* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_SYS_SIGLIST 0
|
||||
|
||||
/* Define to 1 if you have the declaration of '_sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL__SYS_SIGLIST 0
|
||||
|
||||
/* Define to 1 if you have the declaration of '__sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL___SYS_SIGLIST 0
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
|
||||
*/
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file, and it defines getcwd()
|
||||
and chdir().
|
||||
*/
|
||||
#if (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TINYC__)) && !defined(__INTERIX)
|
||||
# define HAVE_DIRECT_H 1
|
||||
#endif
|
||||
|
||||
/* Support DOS-style pathnames. */
|
||||
#define HAVE_DOS_PATHS 1
|
||||
|
||||
/* Define to 1 if you have the 'dup' function. */
|
||||
#define HAVE_DUP 1
|
||||
|
||||
/* Define to 1 if you have the 'dup2' function. */
|
||||
#define HAVE_DUP2 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the 'fdopen' function. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_FDOPEN 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
/* #undef HAVE_FORK */
|
||||
|
||||
/* Define to 1 if you have the 'getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the 'getgroups' function. */
|
||||
/* #undef HAVE_GETGROUPS */
|
||||
|
||||
/* Define to 1 if you have the 'gethostbyname' function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define to 1 if you have the 'gethostname' function. */
|
||||
/* #undef HAVE_GETHOSTNAME */
|
||||
|
||||
/* Define to 1 if you have the 'getrlimit' function. */
|
||||
/* #undef HAVE_GETRLIMIT */
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
/* #undef HAVE_GETTEXT */
|
||||
|
||||
/* Define to 1 if you have a standard gettimeofday function */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#endif
|
||||
|
||||
/* Embed GNU Guile support. Windows build sets this on the
|
||||
compilation command line. */
|
||||
/* #undef HAVE_GUILE */
|
||||
|
||||
/* 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 `isatty' function. */
|
||||
#define HAVE_ISATTY 1
|
||||
|
||||
/* 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 `perfstat' library (-lperfstat). */
|
||||
/* #undef HAVE_LIBPERFSTAT */
|
||||
|
||||
/* 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. */
|
||||
/* #undef HAVE_LOCALE_H */
|
||||
|
||||
/* Define to 1 if the system has the type 'long long int'. */
|
||||
#define HAVE_LONG_LONG_INT 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 `mempcpy' function. */
|
||||
/* #undef HAVE_MEMPCPY */
|
||||
|
||||
/* Define to 1 if you have the `memrchr' function. */
|
||||
/* #undef HAVE_MEMRCHR */
|
||||
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
/* #undef HAVE_MINIX_CONFIG_H */
|
||||
|
||||
/* Define to 1 if you have the 'mkfifo' function. */
|
||||
/* #undef HAVE_MKFIFO */
|
||||
|
||||
/* Define to 1 if you have the 'mkstemp' function. */
|
||||
/* #undef HAVE_MKSTEMP */
|
||||
|
||||
/* 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 `posix_spawn' function. */
|
||||
/* #undef HAVE_POSIX_SPAWN */
|
||||
|
||||
/* Define to 1 if you have the `posix_spawnattr_setsigmask' function. */
|
||||
/* #undef HAVE_POSIX_SPAWNATTR_SETSIGMASK */
|
||||
|
||||
/* Define to 1 if you have the `pselect' function. */
|
||||
/* #undef HAVE_PSELECT */
|
||||
|
||||
/* 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 '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 <spawn.h> header file. */
|
||||
/* #undef HAVE_SPAWN_H */
|
||||
|
||||
/* 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 <stdio.h> header file. */
|
||||
#define HAVE_STDIO_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 `stpcpy' function. */
|
||||
/* #undef HAVE_STPCPY */
|
||||
|
||||
/* Define to 1 if you have the 'strcasecmp' function. */
|
||||
#if defined(__MINGW32__) || defined(__TINYC__)
|
||||
#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. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_STRINGS_H 1
|
||||
#endif
|
||||
|
||||
/* 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. */
|
||||
#if defined(__MINGW32__) || defined(__TINYC__)
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'strncmpi' function. */
|
||||
/* #undef HAVE_STRNCMPI */
|
||||
|
||||
/* Define to 1 if you have the 'strndup' function. */
|
||||
/* #undef HAVE_STRNDUP */
|
||||
|
||||
/* Define to 1 if you have the 'strnicmp' function. */
|
||||
#ifdef __MINGW32__
|
||||
#define HAVE_STRNICMP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the 'strsignal' function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#define HAVE_STRTOLL 1
|
||||
|
||||
/* Define to 1 if `d_type' is a member of `struct dirent'. */
|
||||
/* SV 57152: MinGW64 version of dirent doesn't support d_type. */
|
||||
#ifndef __MINGW64__
|
||||
# define HAVE_STRUCT_DIRENT_D_TYPE 1
|
||||
#endif
|
||||
|
||||
/* 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/file.h> header file. */
|
||||
/* #undef HAVE_SYS_FILE_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/loadavg.h> header file. */
|
||||
/* #undef HAVE_SYS_LOADAVG_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/select.h> header file. */
|
||||
/* #undef HAVE_SYS_SELECT_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 `ttyname' function. */
|
||||
#define HAVE_TTYNAME 1
|
||||
char *ttyname (int);
|
||||
|
||||
/* Define to 1 if the system has the type `intmax_t'. */
|
||||
#define HAVE_INTMAX_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `uintmax_t'. */
|
||||
#define HAVE_UINTMAX_T 1
|
||||
|
||||
/* Define to 1 if you have the `umask' function. */
|
||||
#if defined(__MINGW32__) || defined(__TINYC__)
|
||||
# define HAVE_UMASK 1
|
||||
#endif
|
||||
|
||||
/* 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 the system has the type 'unsigned long long int'. */
|
||||
#define HAVE_UNSIGNED_LONG_LONG_INT 1
|
||||
|
||||
/* 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 'wait3' function. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define to 1 if you have the 'waitpid' function. */
|
||||
/* #undef HAVE_WAITPID */
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
/* #undef HAVE_WCHAR_H */
|
||||
|
||||
/* Define to 1 if `fork' works. */
|
||||
/* #undef HAVE_WORKING_FORK */
|
||||
|
||||
/* Define to 1 if `vfork' works. */
|
||||
/* #undef HAVE_WORKING_VFORK */
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
/* #undef HAVE__BOOL */
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "Windows32"
|
||||
|
||||
/* Define to 1 to enable job server support in GNU make. */
|
||||
#define MAKE_JOBSERVER 1
|
||||
|
||||
/* Define to 1 to enable 'load' support in GNU make. */
|
||||
#define MAKE_LOAD 1
|
||||
|
||||
/* Define to 1 to enable symbolic link timestamp checking. */
|
||||
/* #undef MAKE_SYMLINKS */
|
||||
|
||||
/* Define to 1 if your 'struct nlist' has an 'n_un' member. Obsolete, depend
|
||||
on 'HAVE_STRUCT_NLIST_N_UN_N_NAME */
|
||||
/* #undef NLIST_NAME_UNION */
|
||||
|
||||
/* Define to 1 if struct nlist.n_name is a pointer rather than an array. */
|
||||
/* #undef NLIST_STRUCT */
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Define to the character that separates directories in PATH. */
|
||||
#define PATH_SEPARATOR_CHAR ';'
|
||||
|
||||
/* Define to the name of the SCCS 'get' command. */
|
||||
#define SCCS_GET "echo no sccs get"
|
||||
|
||||
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
|
||||
/* #undef SCCS_GET_MINUS_G */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if the 'S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if struct stat contains a nanoseconds field */
|
||||
/* #undef ST_MTIM_NSEC */
|
||||
|
||||
/* Define to 1 on System V Release 4. */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Define to 1 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 */
|
||||
|
||||
/* 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
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
|
||||
/* 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 */
|
||||
|
||||
#ifdef __MINGW32__
|
||||
# undef __USE_MINGW_ANSI_STDIO
|
||||
# define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif
|
||||
|
||||
/* Number of bits in a timestamp, on hosts where this is settable. */
|
||||
/* #undef _TIME_BITS */
|
||||
|
||||
/* For 64-bit time_t on 32-bit mingw. */
|
||||
#ifdef __MINGW32__
|
||||
# define __MINGW_USE_VC2005_COMPAT 1
|
||||
#endif
|
||||
|
||||
#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> does not define. */
|
||||
#define ssize_t int
|
||||
|
||||
/* Define to 'int' if <sys/types.h> doesn't define. */
|
||||
#define uid_t int
|
||||
|
||||
/* Define {u,}intmax_t if not defined in <stdint.h> or <inttypes.h>. */
|
||||
#if !HAVE_STDINT_H && !HAVE_INTTYPES_H
|
||||
#define intmax_t long long
|
||||
#define uintmax_t unsigned long long
|
||||
#endif
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to the installation directory for locales. */
|
||||
#define LOCALEDIR ""
|
||||
|
||||
/*
|
||||
* Refer to README.W32 for info on the following settings
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* If you have a shell that does not grok 'sh -c quoted-command-line'
|
||||
* correctly, you need this setting; it is the default for tcc.
|
||||
* Please see below for specific shell support.
|
||||
*/
|
||||
#if defined(__TINYC__)
|
||||
#define BATCH_MODE_ONLY_SHELL 1
|
||||
#else
|
||||
/*#define BATCH_MODE_ONLY_SHELL 1 */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 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 MKS tool set or shell. Do NOT define
|
||||
* BATCH_MODE_ONLY_SHELL if you define HAVE_MKS_SHELL
|
||||
*/
|
||||
/*#define HAVE_MKS_SHELL 1 */
|
||||
|
||||
/*
|
||||
* Enforce the mutual exclusivity restriction.
|
||||
*/
|
||||
#ifdef HAVE_MKS_SHELL
|
||||
#undef BATCH_MODE_ONLY_SHELL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CYGWIN_SHELL
|
||||
#undef BATCH_MODE_ONLY_SHELL
|
||||
#endif
|
||||
111
src/configh.dos
Normal file
111
src/configh.dos
Normal file
@@ -0,0 +1,111 @@
|
||||
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
||||
|
||||
Copyright (C) 1994-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "mkconfig.h"
|
||||
|
||||
#define MK_DJGPP 1
|
||||
|
||||
/* Include this header to make __DJGPP_MINOR__ available because DJGPP ports
|
||||
of GCC 4.3.0 and later no longer do it automatically. */
|
||||
#include <sys/version.h>
|
||||
|
||||
/* Many things are defined already by a system header. */
|
||||
#include <sys/config.h>
|
||||
|
||||
#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 1
|
||||
|
||||
/* Define to 1 if 'sys_siglist' is declared by <signal.h> or <unistd.h>. */
|
||||
# define SYS_SIGLIST_DECLARED 1
|
||||
|
||||
/* Define to 1 if the C library defines the variable '_sys_siglist'. */
|
||||
# define HAVE_DECL_SYS_SIGLIST 1
|
||||
|
||||
#else
|
||||
|
||||
/* Define NSIG. */
|
||||
# define NSIG SIGMAX
|
||||
|
||||
#endif
|
||||
|
||||
/* Use high resolution file timestamps if nonzero. */
|
||||
#define FILE_TIMESTAMP_HI_RES 0
|
||||
|
||||
/* Define to 1 if you have 'alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have the fdopen function. */
|
||||
#define HAVE_FDOPEN 1
|
||||
|
||||
/* Define to 1 if you have the 'getgroups' function. */
|
||||
#define HAVE_GETGROUPS 1
|
||||
|
||||
/* Define to 1 if the system has the type 'long long int'. */
|
||||
#define HAVE_LONG_LONG_INT 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the mkstemp function. */
|
||||
#define HAVE_MKSTEMP 1
|
||||
|
||||
/* Define to 1 if you have the 'mktemp' function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have the 'setlinebuf' function. */
|
||||
#define HAVE_SETLINEBUF 1
|
||||
|
||||
/* Define to 1 if you have the 'setvbuf' function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
#define SCCS_GET "get"
|
||||
|
||||
/* Define to 1 if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define to 1 if you have the 'strncasecmp' function. */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#define HAVE_STRTOLL 1
|
||||
|
||||
/* Output sync support */
|
||||
#define NO_OUTPUT_SYNC 1
|
||||
|
||||
/* Build host information. */
|
||||
#define MAKE_HOST "i386-pc-msdosdjgpp"
|
||||
|
||||
/* Grok DOS paths (drive specs and backslash path element separators) */
|
||||
#define HAVE_DOS_PATHS 1
|
||||
|
||||
/* Define the type of the first arg to select(). */
|
||||
#define fd_set_size_t int
|
||||
|
||||
/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
|
||||
not define. */
|
||||
#define intmax_t long long
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 5
|
||||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
/* Define to 'unsigned long' or 'unsigned long long'
|
||||
if <inttypes.h> doesn't define. */
|
||||
#define uintmax_t unsigned long long
|
||||
41
src/debug.h
Normal file
41
src/debug.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Debugging macros and interface.
|
||||
Copyright (C) 1999-2022 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 <https://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_PRINT (0x010)
|
||||
#define DB_WHY (0x020)
|
||||
#define DB_MAKEFILES (0x100)
|
||||
|
||||
#define DB_ALL (0xfff)
|
||||
|
||||
extern int db_level;
|
||||
|
||||
#define ISDB(_l) ((_l)&db_level)
|
||||
|
||||
/* When adding macros to this list be sure to update the value of
|
||||
XGETTEXT_OPTIONS in the po/Makevars file. */
|
||||
#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)
|
||||
762
src/default.c
Normal file
762
src/default.c
Normal file
@@ -0,0 +1,762 @@
|
||||
/* Data base of default implicit rules for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "filedef.h"
|
||||
#include "variable.h"
|
||||
#include "rule.h"
|
||||
#include "dep.h"
|
||||
#include "job.h"
|
||||
#include "commands.h"
|
||||
|
||||
/* Define GCC_IS_NATIVE if gcc is the native development environment on
|
||||
your system (gcc/bison/flex vs cc/yacc/lex). */
|
||||
#if defined(__MSDOS__) || defined(__EMX__)
|
||||
# define GCC_IS_NATIVE
|
||||
#endif
|
||||
|
||||
|
||||
/* This is the default list of suffixes for suffix rules.
|
||||
'.s' must come last, so that a '.o' file will be made from
|
||||
a '.c' or '.p' or ... file rather than from a .s file. */
|
||||
|
||||
static char default_suffixes[]
|
||||
#ifdef VMS
|
||||
/* VMS should include all UNIX/POSIX + some VMS extensions */
|
||||
= ".out .exe .a .olb .hlb .tlb .mlb .ln .o .obj .c .cxx .cc .cpp .pas .p \
|
||||
.for .f .r .y .l .ym .yl .mar .s .ss .i .ii .mod .sym .def .h .info .dvi \
|
||||
.tex .texinfo .texi .txinfo .mem .hlp .brn .rnh .rno .rnt .rnx .w .ch .cweb \
|
||||
.web .com .sh .elc .el";
|
||||
#elif defined(__EMX__)
|
||||
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
|
||||
#else
|
||||
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
|
||||
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
|
||||
.w .ch .web .sh .elc .el";
|
||||
#endif
|
||||
|
||||
static struct pspec default_pattern_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
{ "(%)", "%",
|
||||
"@if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/"
|
||||
"$(or "
|
||||
"$(patsubst %,TEXT,$(filter %.tlb %.TLB,$@)),"
|
||||
"$(patsubst %,HELP,$(filter %.hlb %.HLB,$@)),"
|
||||
"$(patsubst %,MACRO,$(filter %.mlb %.MLB,$@)),"
|
||||
"$(and "
|
||||
"$(patsubst %,SHARE,$(filter %.olb %.OLB,$@)),"
|
||||
"$(patsubst %,SHARE,$(filter %.exe %.EXE,$<))),"
|
||||
"OBJECT)"
|
||||
" $@\n"
|
||||
"$(AR) $(ARFLAGS) $@ $<" },
|
||||
|
||||
#else
|
||||
{ "(%)", "%",
|
||||
"$(AR) $(ARFLAGS) $@ $<" },
|
||||
#endif
|
||||
/* The X.out rules are only in BSD's default set because
|
||||
BSD Make has no null-suffix rules, so 'foo.out' and
|
||||
'foo' are the same thing. */
|
||||
#ifdef VMS
|
||||
{ "%.exe", "%",
|
||||
"$(CP) $< $@" },
|
||||
|
||||
#endif
|
||||
{ "%.out", "%",
|
||||
"@rm -f $@ \n cp $< $@" },
|
||||
|
||||
/* Syntax is "ctangle foo.w foo.ch foo.c". */
|
||||
{ "%.c", "%.w %.ch",
|
||||
"$(CTANGLE) $^ $@" },
|
||||
{ "%.tex", "%.w %.ch",
|
||||
"$(CWEAVE) $^ $@" },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
static struct pspec default_terminal_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
|
||||
/* RCS. */
|
||||
{ "%", "%$$5lv", /* Multinet style */
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "[.$$rcs]%$$5lv", /* Multinet style */
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "%_v", /* Normal style */
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
{ "%", "[.rcs]%_v", /* Normal style */
|
||||
"if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
|
||||
|
||||
/* SCCS. */
|
||||
/* ain't no SCCS on vms */
|
||||
|
||||
#else
|
||||
/* RCS. */
|
||||
{ "%", "%,v",
|
||||
"$(CHECKOUT,v)" },
|
||||
{ "%", "RCS/%,v",
|
||||
"$(CHECKOUT,v)" },
|
||||
{ "%", "RCS/%",
|
||||
"$(CHECKOUT,v)" },
|
||||
|
||||
/* SCCS. */
|
||||
{ "%", "s.%",
|
||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||
{ "%", "SCCS/s.%",
|
||||
"$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
|
||||
#endif /* !VMS */
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
static const char *default_suffix_rules[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
".o",
|
||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".obj",
|
||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".s",
|
||||
"$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".S",
|
||||
"$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".c",
|
||||
"$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".cc",
|
||||
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".C",
|
||||
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".cpp",
|
||||
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".f",
|
||||
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".m",
|
||||
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".p",
|
||||
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".F",
|
||||
"$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".r",
|
||||
"$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".mod",
|
||||
"$(COMPILE.mod) -o $@ -e $@ $^",
|
||||
|
||||
".def.sym",
|
||||
"$(COMPILE.def) -o $@ $<",
|
||||
|
||||
".sh",
|
||||
"copy $< >$@",
|
||||
|
||||
".obj.exe",
|
||||
"$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".mar.exe",
|
||||
"$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".s.o",
|
||||
"$(COMPILE.s) -o $@ $<",
|
||||
".s.exe",
|
||||
"$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".c.exe",
|
||||
"$(COMPILE.c) $^ \n $(LINK.obj) $(subst .c,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
|
||||
".cc.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",
|
||||
"$(COMPILE.for) $^ \n $(LINK.obj) $(subst .for,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
||||
".pas.exe",
|
||||
"$(COMPILE.pas) $^ \n $(LINK.obj) $(subst .pas,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
|
||||
|
||||
".com",
|
||||
"copy $< >$@",
|
||||
|
||||
".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",
|
||||
"$(COMPILE.c) /obj=$@ $<",
|
||||
".c.o",
|
||||
"$(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",
|
||||
"$(COMPILE.cc) /obj=$@ $<",
|
||||
".cc.o",
|
||||
"$(COMPILE.cc) /obj=$@ $<",
|
||||
".cxx.obj",
|
||||
"$(COMPILE.cxx) /obj=$@ $<",
|
||||
".cxx.o",
|
||||
"$(COMPILE.cxx) /obj=$@ $<",
|
||||
".for.obj",
|
||||
"$(COMPILE.for) /obj=$@ $<",
|
||||
".for.o",
|
||||
"$(COMPILE.for) /obj=$@ $<",
|
||||
".pas.obj",
|
||||
"$(COMPILE.pas) /obj=$@ $<",
|
||||
".pas.o",
|
||||
"$(COMPILE.pas) /obj=$@ $<",
|
||||
|
||||
".y.c",
|
||||
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||
".l.c",
|
||||
"$(LEX.l) $< \n rename lexyy.c $@",
|
||||
|
||||
".texinfo.info",
|
||||
"$(MAKEINFO) $<",
|
||||
|
||||
".tex.dvi",
|
||||
"$(TEX) $<",
|
||||
|
||||
".cpp.o",
|
||||
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||
".f.o",
|
||||
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||
".m.o",
|
||||
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||
".p.o",
|
||||
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||
".r.o",
|
||||
"$(COMPILE.r) $(OUTPUT_OPTION) $<",
|
||||
".mod.o",
|
||||
"$(COMPILE.mod) -o $@ $<",
|
||||
|
||||
".c.ln",
|
||||
"$(LINT.c) -C$* $<",
|
||||
".y.ln",
|
||||
"$(YACC.y) $< \n rename y_tab.c $@",
|
||||
|
||||
".l.ln",
|
||||
"@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
|
||||
|
||||
#else /* ! VMS */
|
||||
|
||||
".o",
|
||||
"$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".s",
|
||||
"$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".S",
|
||||
"$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".c",
|
||||
"$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".cc",
|
||||
"$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".C",
|
||||
"$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".cpp",
|
||||
"$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".f",
|
||||
"$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".m",
|
||||
"$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".p",
|
||||
"$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".F",
|
||||
"$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".r",
|
||||
"$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
|
||||
".mod",
|
||||
"$(COMPILE.mod) -o $@ -e $@ $^",
|
||||
|
||||
".def.sym",
|
||||
"$(COMPILE.def) -o $@ $<",
|
||||
|
||||
".sh",
|
||||
"cat $< >$@ \n chmod a+x $@",
|
||||
|
||||
".s.o",
|
||||
"$(COMPILE.s) -o $@ $<",
|
||||
".S.o",
|
||||
"$(COMPILE.S) -o $@ $<",
|
||||
".c.o",
|
||||
"$(COMPILE.c) $(OUTPUT_OPTION) $<",
|
||||
".cc.o",
|
||||
"$(COMPILE.cc) $(OUTPUT_OPTION) $<",
|
||||
".C.o",
|
||||
"$(COMPILE.C) $(OUTPUT_OPTION) $<",
|
||||
".cpp.o",
|
||||
"$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
|
||||
".f.o",
|
||||
"$(COMPILE.f) $(OUTPUT_OPTION) $<",
|
||||
".m.o",
|
||||
"$(COMPILE.m) $(OUTPUT_OPTION) $<",
|
||||
".p.o",
|
||||
"$(COMPILE.p) $(OUTPUT_OPTION) $<",
|
||||
".F.o",
|
||||
"$(COMPILE.F) $(OUTPUT_OPTION) $<",
|
||||
".r.o",
|
||||
"$(COMPILE.r) $(OUTPUT_OPTION) $<",
|
||||
".mod.o",
|
||||
"$(COMPILE.mod) -o $@ $<",
|
||||
|
||||
".c.ln",
|
||||
"$(LINT.c) -C$* $<",
|
||||
".y.ln",
|
||||
#ifndef __MSDOS__
|
||||
"$(YACC.y) $< \n $(LINT.c) -C$* y.tab.c \n $(RM) y.tab.c",
|
||||
#else
|
||||
"$(YACC.y) $< \n $(LINT.c) -C$* y_tab.c \n $(RM) y_tab.c",
|
||||
#endif
|
||||
".l.ln",
|
||||
"@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
|
||||
|
||||
".y.c",
|
||||
#ifndef __MSDOS__
|
||||
"$(YACC.y) $< \n mv -f y.tab.c $@",
|
||||
#else
|
||||
"$(YACC.y) $< \n mv -f y_tab.c $@",
|
||||
#endif
|
||||
".l.c",
|
||||
"@$(RM) $@ \n $(LEX.l) $< > $@",
|
||||
".ym.m",
|
||||
"$(YACC.m) $< \n mv -f y.tab.c $@",
|
||||
".lm.m",
|
||||
"@$(RM) $@ \n $(LEX.m) $< > $@",
|
||||
|
||||
".F.f",
|
||||
"$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
|
||||
".r.f",
|
||||
"$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
|
||||
|
||||
/* This might actually make lex.yy.c if there's no %R% directive in $*.l,
|
||||
but in that case why were you trying to make $*.r anyway? */
|
||||
".l.r",
|
||||
"$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
|
||||
|
||||
".S.s",
|
||||
"$(PREPROCESS.S) $< > $@",
|
||||
|
||||
".texinfo.info",
|
||||
"$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
|
||||
|
||||
".texi.info",
|
||||
"$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
|
||||
|
||||
".txinfo.info",
|
||||
"$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
|
||||
|
||||
".tex.dvi",
|
||||
"$(TEX) $<",
|
||||
|
||||
".texinfo.dvi",
|
||||
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
||||
|
||||
".texi.dvi",
|
||||
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
||||
|
||||
".txinfo.dvi",
|
||||
"$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
|
||||
|
||||
".w.c",
|
||||
"$(CTANGLE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||
|
||||
".web.p",
|
||||
"$(TANGLE) $<",
|
||||
|
||||
".w.tex",
|
||||
"$(CWEAVE) $< - $@", /* The '-' says there is no '.ch' file. */
|
||||
|
||||
".web.tex",
|
||||
"$(WEAVE) $<",
|
||||
|
||||
#endif /* !VMS */
|
||||
|
||||
0, 0,
|
||||
};
|
||||
|
||||
static const char *default_variables[] =
|
||||
{
|
||||
#ifdef VMS
|
||||
#ifdef __ALPHA
|
||||
"ARCH", "ALPHA",
|
||||
#endif
|
||||
#ifdef __ia64
|
||||
"ARCH", "IA64",
|
||||
#endif
|
||||
#ifdef __VAX
|
||||
"ARCH", "VAX",
|
||||
#endif
|
||||
"AR", "library",
|
||||
"LIBRARY", "library",
|
||||
"ARFLAGS", "/replace",
|
||||
"AS", "macro",
|
||||
"MACRO", "macro",
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"CC", "gcc",
|
||||
#else
|
||||
"CC", "cc",
|
||||
#endif
|
||||
"CD", "builtin_cd",
|
||||
"ECHO", "builtin_echo",
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"C++", "gcc/plus",
|
||||
"CXX", "gcc/plus",
|
||||
#else
|
||||
"C++", "cxx",
|
||||
"CXX", "cxx",
|
||||
#ifndef __ia64
|
||||
"CXXLD", "cxxlink",
|
||||
"CXXLINK", "cxxlink",
|
||||
#else
|
||||
/* CXXLINK is not used on VMS/IA64 */
|
||||
"CXXLD", "link",
|
||||
"CXXLINK", "link",
|
||||
#endif
|
||||
#endif
|
||||
"CO", "co",
|
||||
"CPP", "$(CC) /preprocess_only",
|
||||
"FC", "fortran",
|
||||
/* System V uses these, so explicit rules using them should work.
|
||||
However, there is no way to make implicit rules use them and FC. */
|
||||
"F77", "$(FC)",
|
||||
"F77FLAGS", "$(FFLAGS)",
|
||||
"LD", "link",
|
||||
"LEX", "lex",
|
||||
"PC", "pascal",
|
||||
"YACC", "bison/yacc",
|
||||
"YFLAGS", "/Define/Verbose",
|
||||
"BISON", "bison",
|
||||
"MAKEINFO", "makeinfo",
|
||||
"TEX", "tex",
|
||||
"TEXINDEX", "texindex",
|
||||
|
||||
"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.o", "$(LD) $(LDFLAGS)",
|
||||
"LINK.obj", "$(LD) $(LDFLAGS)",
|
||||
#ifndef GCC_IS_NATIVE
|
||||
"CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
|
||||
"COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
#endif
|
||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.C", "$(COMPILE.cc)",
|
||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||
"LINK.C", "$(LINK.cc)",
|
||||
"LINK.cpp", "$(LINK.cc)",
|
||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||
"LEX.l", "$(LEX) $(LFLAGS)",
|
||||
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||
"COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
|
||||
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
||||
"LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
||||
"COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
|
||||
"PREPROCESS.S", "$(CPP) $(CPPFLAGS)",
|
||||
"PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
|
||||
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
|
||||
"MV", "rename/new_version",
|
||||
"CP", "copy",
|
||||
".LIBPATTERNS", "%.olb lib%.a",
|
||||
|
||||
#else /* !VMS */
|
||||
|
||||
"AR", "ar",
|
||||
#ifdef _AIX
|
||||
/* AIX requires object file format specification: choose -Xany. */
|
||||
"ARFLAGS", "-Xany -rv",
|
||||
#else
|
||||
"ARFLAGS", "-rv",
|
||||
#endif
|
||||
"AS", "as",
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"CC", "gcc",
|
||||
# ifdef __MSDOS__
|
||||
"CXX", "gpp", /* g++ is an invalid name on MSDOS */
|
||||
# else
|
||||
"CXX", "gcc",
|
||||
# endif /* __MSDOS__ */
|
||||
"OBJC", "gcc",
|
||||
#else
|
||||
"CC", "cc",
|
||||
"CXX", "g++",
|
||||
"OBJC", "cc",
|
||||
#endif
|
||||
|
||||
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
||||
and to the empty string if $@ does exist. */
|
||||
"CHECKOUT,v", "+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
|
||||
"CO", "co",
|
||||
"COFLAGS", "",
|
||||
|
||||
"CPP", "$(CC) -E",
|
||||
#ifdef CRAY
|
||||
"CF77PPFLAGS", "-P",
|
||||
"CF77PP", "/lib/cpp",
|
||||
"CFT", "cft77",
|
||||
"CF", "cf77",
|
||||
"FC", "$(CF)",
|
||||
#else /* Not CRAY. */
|
||||
#ifdef _IBMR2
|
||||
"FC", "xlf",
|
||||
#else
|
||||
#ifdef __convex__
|
||||
"FC", "fc",
|
||||
#else
|
||||
"FC", "f77",
|
||||
#endif /* __convex__ */
|
||||
#endif /* _IBMR2 */
|
||||
/* System V uses these, so explicit rules using them should work.
|
||||
However, there is no way to make implicit rules use them and FC. */
|
||||
"F77", "$(FC)",
|
||||
"F77FLAGS", "$(FFLAGS)",
|
||||
#endif /* Cray. */
|
||||
"GET", SCCS_GET,
|
||||
"LD", "ld",
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"LEX", "flex",
|
||||
#else
|
||||
"LEX", "lex",
|
||||
#endif
|
||||
"LINT", "lint",
|
||||
"M2C", "m2c",
|
||||
#ifdef pyr
|
||||
"PC", "pascal",
|
||||
#else
|
||||
#ifdef CRAY
|
||||
"PC", "PASCAL",
|
||||
"SEGLDR", "segldr",
|
||||
#else
|
||||
"PC", "pc",
|
||||
#endif /* CRAY. */
|
||||
#endif /* pyr. */
|
||||
#ifdef GCC_IS_NATIVE
|
||||
"YACC", "bison -y",
|
||||
#else
|
||||
"YACC", "yacc", /* Or "bison -y" */
|
||||
#endif
|
||||
"MAKEINFO", "makeinfo",
|
||||
"TEX", "tex",
|
||||
"TEXI2DVI", "texi2dvi",
|
||||
"WEAVE", "weave",
|
||||
"CWEAVE", "cweave",
|
||||
"TANGLE", "tangle",
|
||||
"CTANGLE", "ctangle",
|
||||
|
||||
"RM", "rm -f",
|
||||
|
||||
"LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||
/* On case-insensitive filesystems, treat *.C files as *.c files,
|
||||
to avoid erroneously compiling C sources as C++, which will
|
||||
probably fail. */
|
||||
"COMPILE.C", "$(COMPILE.cc)",
|
||||
#else
|
||||
"COMPILE.C", "$(COMPILE.c)",
|
||||
#endif
|
||||
"COMPILE.cpp", "$(COMPILE.cc)",
|
||||
"LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
#ifndef HAVE_CASE_INSENSITIVE_FS
|
||||
"LINK.C", "$(LINK.cc)",
|
||||
#else
|
||||
"LINK.C", "$(LINK.c)",
|
||||
#endif
|
||||
"LINK.cpp", "$(LINK.cc)",
|
||||
"YACC.y", "$(YACC) $(YFLAGS)",
|
||||
"LEX.l", "$(LEX) $(LFLAGS) -t",
|
||||
"YACC.m", "$(YACC) $(YFLAGS)",
|
||||
"LEX.m", "$(LEX) $(LFLAGS) -t",
|
||||
"COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
|
||||
"COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
|
||||
"LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
|
||||
"LINK.s", "$(CC) $(ASFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
||||
"COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
|
||||
"LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
|
||||
"COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
|
||||
"PREPROCESS.S", "$(CPP) $(CPPFLAGS)",
|
||||
"PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
|
||||
"PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
|
||||
"LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
|
||||
|
||||
#ifndef NO_MINUS_C_MINUS_O
|
||||
"OUTPUT_OPTION", "-o $@",
|
||||
#endif
|
||||
|
||||
#ifdef SCCS_GET_MINUS_G
|
||||
"SCCS_OUTPUT_OPTION", "-G$@",
|
||||
#endif
|
||||
|
||||
#if defined(_AMIGA)
|
||||
".LIBPATTERNS", "%.lib",
|
||||
#elif defined(__MSDOS__)
|
||||
".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
|
||||
#elif defined(__APPLE__)
|
||||
".LIBPATTERNS", "lib%.dylib lib%.a",
|
||||
#elif defined(__CYGWIN__) || defined(WINDOWS32)
|
||||
".LIBPATTERNS", "lib%.dll.a %.dll.a lib%.a %.lib lib%.dll %.dll",
|
||||
#else
|
||||
".LIBPATTERNS", "lib%.so lib%.a",
|
||||
#endif
|
||||
|
||||
#endif /* !VMS */
|
||||
/* Make this assignment to avoid undefined variable warnings. */
|
||||
GNUMAKEFLAGS_NAME, "",
|
||||
0, 0
|
||||
};
|
||||
|
||||
/* Set up the default .SUFFIXES list. */
|
||||
|
||||
void
|
||||
set_default_suffixes (void)
|
||||
{
|
||||
suffix_file = enter_file (strcache_add (".SUFFIXES"));
|
||||
suffix_file->builtin = 1;
|
||||
|
||||
if (no_builtin_rules_flag)
|
||||
define_variable_cname ("SUFFIXES", "", o_default, 0);
|
||||
else
|
||||
{
|
||||
struct dep *d;
|
||||
const char *p = default_suffixes;
|
||||
suffix_file->deps = enter_prereqs (PARSE_SIMPLE_SEQ ((char **)&p, struct dep),
|
||||
NULL);
|
||||
for (d = suffix_file->deps; d; d = d->next)
|
||||
d->file->builtin = 1;
|
||||
|
||||
define_variable_cname ("SUFFIXES", default_suffixes, o_default, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Enter the default suffix rules as file rules. This used to be done in
|
||||
install_default_implicit_rules, but that loses because we want the
|
||||
suffix rules installed before reading makefiles, and the pattern rules
|
||||
installed after. */
|
||||
|
||||
void
|
||||
install_default_suffix_rules (void)
|
||||
{
|
||||
const char **s;
|
||||
|
||||
if (no_builtin_rules_flag)
|
||||
return;
|
||||
|
||||
for (s = default_suffix_rules; *s != 0; s += 2)
|
||||
{
|
||||
struct file *f = enter_file (strcache_add (s[0]));
|
||||
/* This function should run before any makefile is parsed. */
|
||||
assert (f->cmds == 0);
|
||||
f->cmds = xmalloc (sizeof (struct commands));
|
||||
f->cmds->fileinfo.filenm = 0;
|
||||
f->cmds->commands = xstrdup (s[1]);
|
||||
f->cmds->command_lines = 0;
|
||||
f->cmds->recipe_prefix = RECIPEPREFIX_DEFAULT;
|
||||
f->builtin = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Install the default pattern rules. */
|
||||
|
||||
void
|
||||
install_default_implicit_rules (void)
|
||||
{
|
||||
struct pspec *p;
|
||||
|
||||
if (no_builtin_rules_flag)
|
||||
return;
|
||||
|
||||
for (p = default_pattern_rules; p->target != 0; ++p)
|
||||
install_pattern_rule (p, 0);
|
||||
|
||||
for (p = default_terminal_rules; p->target != 0; ++p)
|
||||
install_pattern_rule (p, 1);
|
||||
}
|
||||
|
||||
void
|
||||
define_default_variables (void)
|
||||
{
|
||||
const char **s;
|
||||
|
||||
if (no_builtin_variables_flag)
|
||||
return;
|
||||
|
||||
for (s = default_variables; *s != 0; s += 2)
|
||||
define_variable (s[0], strlen (s[0]), s[1], o_default, 1);
|
||||
}
|
||||
|
||||
void
|
||||
undefine_default_variables (void)
|
||||
{
|
||||
const char **s;
|
||||
|
||||
for (s = default_variables; *s != 0; s += 2)
|
||||
undefine_variable_global (s[0], strlen (s[0]), o_default);
|
||||
}
|
||||
139
src/dep.h
Normal file
139
src/dep.h
Normal file
@@ -0,0 +1,139 @@
|
||||
/* Definitions of dependency data structures for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Structure used in chains of names, for parsing and globbing. */
|
||||
|
||||
#define NAMESEQ(_t) \
|
||||
_t *next; \
|
||||
const char *name
|
||||
|
||||
struct nameseq
|
||||
{
|
||||
NAMESEQ (struct nameseq);
|
||||
};
|
||||
|
||||
/* Flag bits for the second argument to 'read_makefile'.
|
||||
These flags are saved in the 'flags' field of each
|
||||
'struct goaldep' in the chain returned by 'read_all_makefiles'. */
|
||||
|
||||
#define RM_NOFLAG 0
|
||||
#define RM_NO_DEFAULT_GOAL (1 << 0) /* Do not set default goal. */
|
||||
#define RM_INCLUDED (1 << 1) /* Search makefile search path. */
|
||||
#define RM_DONTCARE (1 << 2) /* No error if it doesn't exist. */
|
||||
#define RM_NO_TILDE (1 << 3) /* Don't expand ~ in file name. */
|
||||
|
||||
/* Structure representing one dependency of a file.
|
||||
Each struct file's 'deps' points to a chain of these, through 'next'.
|
||||
'stem' is the stem for this dep line of static pattern rule or NULL.
|
||||
explicit is set when implicit rule search is performed and the prerequisite
|
||||
does not contain %. When explicit is set the file is not intermediate. */
|
||||
|
||||
|
||||
#define DEP(_t) \
|
||||
NAMESEQ (_t); \
|
||||
struct file *file; \
|
||||
_t *shuf; \
|
||||
const char *stem; \
|
||||
unsigned int flags : 8; \
|
||||
unsigned int changed : 1; \
|
||||
unsigned int ignore_mtime : 1; \
|
||||
unsigned int staticpattern : 1; \
|
||||
unsigned int need_2nd_expansion : 1; \
|
||||
unsigned int ignore_automatic_vars : 1; \
|
||||
unsigned int is_explicit : 1; \
|
||||
unsigned int wait_here : 1
|
||||
|
||||
struct dep
|
||||
{
|
||||
DEP (struct dep);
|
||||
};
|
||||
|
||||
/* Structure representing one goal.
|
||||
The goals to be built constitute a chain of these, chained through 'next'.
|
||||
'stem' is not used, but it's simpler to include and ignore it. */
|
||||
|
||||
struct goaldep
|
||||
{
|
||||
DEP (struct goaldep);
|
||||
int error;
|
||||
floc floc;
|
||||
};
|
||||
|
||||
/* Options for parsing lists of filenames. */
|
||||
|
||||
#define PARSEFS_NONE 0x0000
|
||||
#define PARSEFS_NOSTRIP 0x0001
|
||||
#define PARSEFS_NOAR 0x0002
|
||||
#define PARSEFS_NOGLOB 0x0004
|
||||
#define PARSEFS_EXISTS 0x0008
|
||||
#define PARSEFS_NOCACHE 0x0010
|
||||
#define PARSEFS_ONEWORD 0x0020
|
||||
#define PARSEFS_WAIT 0x0040
|
||||
|
||||
#define PARSE_FILE_SEQ(_s,_t,_c,_p,_f) \
|
||||
(_t *)parse_file_seq ((_s),sizeof (_t),(_c),(_p),(_f))
|
||||
#define PARSE_SIMPLE_SEQ(_s,_t) \
|
||||
(_t *)parse_file_seq ((_s),sizeof (_t),MAP_NUL,NULL,PARSEFS_NONE)
|
||||
|
||||
#ifdef VMS
|
||||
void *parse_file_seq ();
|
||||
#else
|
||||
void *parse_file_seq (char **stringp, size_t size,
|
||||
int stopmap, const char *prefix, int flags);
|
||||
#endif
|
||||
|
||||
char *tilde_expand (const char *name);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
struct nameseq *ar_glob (const char *arname, const char *member_pattern, size_t size);
|
||||
#endif
|
||||
|
||||
#define dep_name(d) ((d)->name ? (d)->name : (d)->file->name)
|
||||
|
||||
#define alloc_seq_elt(_t) xcalloc (sizeof (_t))
|
||||
void free_ns_chain (struct nameseq *n);
|
||||
|
||||
#if defined(MAKE_MAINTAINER_MODE) && defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
/* Use inline to get real type-checking. */
|
||||
#define SI static inline
|
||||
SI struct nameseq *alloc_ns (void) { return alloc_seq_elt (struct nameseq); }
|
||||
SI struct dep *alloc_dep (void) { return alloc_seq_elt (struct dep); }
|
||||
SI struct goaldep *alloc_goaldep (void) { return alloc_seq_elt (struct goaldep); }
|
||||
|
||||
SI void free_ns (struct nameseq *n) { free (n); }
|
||||
SI void free_dep (struct dep *d) { free_ns ((struct nameseq *)d); }
|
||||
SI void free_goaldep (struct goaldep *g) { free_dep ((struct dep *)g); }
|
||||
SI void free_dep_chain (struct dep *d) { free_ns_chain((struct nameseq *)d); }
|
||||
SI void free_goal_chain (struct goaldep *g) { free_dep_chain((struct dep *)g); }
|
||||
#else
|
||||
# define alloc_ns() alloc_seq_elt (struct nameseq)
|
||||
# define alloc_dep() alloc_seq_elt (struct dep)
|
||||
# define alloc_goaldep() alloc_seq_elt (struct goaldep)
|
||||
|
||||
# define free_ns(_n) free (_n)
|
||||
# define free_dep(_d) free_ns (_d)
|
||||
# define free_goaldep(_g) free_dep (_g)
|
||||
|
||||
# define free_dep_chain(_d) free_ns_chain ((struct nameseq *)(_d))
|
||||
# define free_goal_chain(_g) free_ns_chain ((struct nameseq *)(_g))
|
||||
#endif
|
||||
|
||||
struct dep *copy_dep_chain (const struct dep *d);
|
||||
|
||||
struct goaldep *read_all_makefiles (const char **makefiles);
|
||||
void eval_buffer (char *buffer, const floc *floc);
|
||||
enum update_status update_goal_chain (struct goaldep *goals);
|
||||
621
src/expand.c
Normal file
621
src/expand.c
Normal file
@@ -0,0 +1,621 @@
|
||||
/* Variable expansion functions for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "commands.h"
|
||||
#include "debug.h"
|
||||
#include "filedef.h"
|
||||
#include "job.h"
|
||||
#include "variable.h"
|
||||
#include "rule.h"
|
||||
|
||||
/* Initially, any errors reported when expanding strings will be reported
|
||||
against the file where the error appears. */
|
||||
const floc **expanding_var = &reading_file;
|
||||
|
||||
/* The next two describe the variable output buffer.
|
||||
This buffer is used to hold the variable-expansion of a line of the
|
||||
makefile. It is made bigger with realloc whenever it is too small.
|
||||
variable_buffer_length is the size currently allocated.
|
||||
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 size_t variable_buffer_length;
|
||||
char *variable_buffer;
|
||||
|
||||
/* Subroutine of variable_expand and friends:
|
||||
The text to add is LENGTH chars starting at STRING to the variable_buffer.
|
||||
The text is added to the buffer at PTR, and the updated pointer into
|
||||
the buffer is returned as the value. Thus, the value returned by
|
||||
each call to variable_buffer_output should be the first argument to
|
||||
the following call. */
|
||||
|
||||
char *
|
||||
variable_buffer_output (char *ptr, const char *string, size_t length)
|
||||
{
|
||||
size_t newlen = length + (ptr - variable_buffer);
|
||||
|
||||
if ((newlen + VARIABLE_BUFFER_ZONE) > variable_buffer_length)
|
||||
{
|
||||
size_t offset = ptr - variable_buffer;
|
||||
variable_buffer_length = (newlen + 100 > 2 * variable_buffer_length
|
||||
? newlen + 100
|
||||
: 2 * variable_buffer_length);
|
||||
variable_buffer = xrealloc (variable_buffer, variable_buffer_length);
|
||||
ptr = variable_buffer + offset;
|
||||
}
|
||||
|
||||
return mempcpy (ptr, string, length);
|
||||
}
|
||||
|
||||
/* Return a pointer to the beginning of the variable buffer.
|
||||
This is called from main() and it should never be null afterward. */
|
||||
|
||||
char *
|
||||
initialize_variable_output ()
|
||||
{
|
||||
/* If we don't have a variable output buffer yet, get one. */
|
||||
|
||||
if (variable_buffer == 0)
|
||||
{
|
||||
variable_buffer_length = 200;
|
||||
variable_buffer = xmalloc (variable_buffer_length);
|
||||
variable_buffer[0] = '\0';
|
||||
}
|
||||
|
||||
return variable_buffer;
|
||||
}
|
||||
|
||||
/* Recursively expand V. The returned string is malloc'd. */
|
||||
|
||||
static char *allocated_variable_append (const struct variable *v);
|
||||
|
||||
char *
|
||||
recursively_expand_for_file (struct variable *v, struct file *file)
|
||||
{
|
||||
char *value;
|
||||
const floc *this_var;
|
||||
const floc **saved_varp;
|
||||
struct variable_set_list *save = 0;
|
||||
int set_reading = 0;
|
||||
|
||||
/* If we're expanding to put into the environment of a shell function then
|
||||
ignore any recursion issues: for backward-compatibility we will use
|
||||
the value of the environment variable we were started with. */
|
||||
if (v->expanding && env_recursion)
|
||||
{
|
||||
size_t nl = strlen (v->name);
|
||||
char **ep;
|
||||
DB (DB_VERBOSE,
|
||||
(_("%s:%lu: not recursively expanding %s to export to shell function\n"),
|
||||
v->fileinfo.filenm, v->fileinfo.lineno, v->name));
|
||||
|
||||
/* We could create a hash for the original environment for speed, but a
|
||||
reasonably written makefile shouldn't hit this situation... */
|
||||
for (ep = environ; *ep != 0; ++ep)
|
||||
if ((*ep)[nl] == '=' && strncmp (*ep, v->name, nl) == 0)
|
||||
return xstrdup ((*ep) + nl + 1);
|
||||
|
||||
/* If there's nothing in the parent environment, use the empty string.
|
||||
This isn't quite correct since the variable should not exist at all,
|
||||
but getting that to work would be involved. */
|
||||
return xstrdup ("");
|
||||
}
|
||||
|
||||
/* Don't install a new location if this location is empty.
|
||||
This can happen for command-line variables, builtin variables, etc. */
|
||||
saved_varp = expanding_var;
|
||||
if (v->fileinfo.filenm)
|
||||
{
|
||||
this_var = &v->fileinfo;
|
||||
expanding_var = &this_var;
|
||||
}
|
||||
|
||||
/* If we have no other file-reading context, use the variable's context. */
|
||||
if (!reading_file)
|
||||
{
|
||||
set_reading = 1;
|
||||
reading_file = &v->fileinfo;
|
||||
}
|
||||
|
||||
if (v->expanding)
|
||||
{
|
||||
if (!v->exp_count)
|
||||
/* Expanding V causes infinite recursion. Lose. */
|
||||
OS (fatal, *expanding_var,
|
||||
_("Recursive variable '%s' references itself (eventually)"),
|
||||
v->name);
|
||||
--v->exp_count;
|
||||
}
|
||||
|
||||
if (file)
|
||||
{
|
||||
save = current_variable_set_list;
|
||||
current_variable_set_list = file->variables;
|
||||
}
|
||||
|
||||
v->expanding = 1;
|
||||
if (v->append)
|
||||
value = allocated_variable_append (v);
|
||||
else
|
||||
value = allocated_variable_expand (v->value);
|
||||
v->expanding = 0;
|
||||
|
||||
if (set_reading)
|
||||
reading_file = 0;
|
||||
|
||||
if (file)
|
||||
current_variable_set_list = save;
|
||||
|
||||
expanding_var = saved_varp;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/* Expand a simple reference to variable NAME, which is LENGTH chars long. */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
#endif
|
||||
static char *
|
||||
reference_variable (char *o, const char *name, size_t length)
|
||||
{
|
||||
struct variable *v;
|
||||
char *value;
|
||||
|
||||
v = lookup_variable (name, length);
|
||||
|
||||
if (v == 0)
|
||||
warn_undefined (name, length);
|
||||
|
||||
/* If there's no variable by that name or it has no value, stop now. */
|
||||
if (v == 0 || (*v->value == '\0' && !v->append))
|
||||
return o;
|
||||
|
||||
value = (v->recursive ? recursively_expand (v) : v->value);
|
||||
|
||||
o = variable_buffer_output (o, value, strlen (value));
|
||||
|
||||
if (v->recursive)
|
||||
free (value);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
/* Scan STRING for variable references and expansion-function calls. Only
|
||||
LENGTH bytes of STRING are actually scanned. If LENGTH is -1, scan until
|
||||
a null byte is found.
|
||||
|
||||
Write the results to LINE, which must point into 'variable_buffer'. If
|
||||
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 *
|
||||
variable_expand_string (char *line, const char *string, size_t length)
|
||||
{
|
||||
struct variable *v;
|
||||
const char *p, *p1;
|
||||
char *save;
|
||||
char *o;
|
||||
size_t line_offset;
|
||||
|
||||
if (!line)
|
||||
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 == SIZE_MAX ? xstrdup (string) : xstrndup (string, length);
|
||||
p = save;
|
||||
|
||||
while (1)
|
||||
{
|
||||
/* Copy all following uninteresting chars all at once to the
|
||||
variable output buffer, and skip them. Uninteresting chars end
|
||||
at the next $ or the end of the input. */
|
||||
|
||||
p1 = strchr (p, '$');
|
||||
|
||||
o = variable_buffer_output (o, p, p1 != 0 ? (size_t) (p1 - p) : strlen (p) + 1);
|
||||
|
||||
if (p1 == 0)
|
||||
break;
|
||||
p = p1 + 1;
|
||||
|
||||
/* Dispatch on the char that follows the $. */
|
||||
|
||||
switch (*p)
|
||||
{
|
||||
case '$':
|
||||
case '\0':
|
||||
/* $$ or $ at the end of the string means output one $ to the
|
||||
variable output buffer. */
|
||||
o = variable_buffer_output (o, p1, 1);
|
||||
break;
|
||||
|
||||
case '(':
|
||||
case '{':
|
||||
/* $(...) or ${...} is the general case of substitution. */
|
||||
{
|
||||
char openparen = *p;
|
||||
char closeparen = (openparen == '(') ? ')' : '}';
|
||||
const char *begp;
|
||||
const char *beg = p + 1;
|
||||
char *op;
|
||||
char *abeg = NULL;
|
||||
const char *end, *colon;
|
||||
|
||||
op = o;
|
||||
begp = p;
|
||||
if (handle_function (&op, &begp))
|
||||
{
|
||||
o = op;
|
||||
p = begp;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Is there a variable reference inside the parens or braces?
|
||||
If so, expand it before expanding the entire reference. */
|
||||
|
||||
end = strchr (beg, closeparen);
|
||||
if (end == 0)
|
||||
/* Unterminated variable reference. */
|
||||
O (fatal, *expanding_var, _("unterminated variable reference"));
|
||||
p1 = lindex (beg, end, '$');
|
||||
if (p1 != 0)
|
||||
{
|
||||
/* BEG now points past the opening paren or brace.
|
||||
Count parens or braces until it is matched. */
|
||||
int count = 0;
|
||||
for (p = beg; *p != '\0'; ++p)
|
||||
{
|
||||
if (*p == openparen)
|
||||
++count;
|
||||
else if (*p == closeparen && --count < 0)
|
||||
break;
|
||||
}
|
||||
/* If COUNT is >= 0, there were unmatched opening parens
|
||||
or braces, so we go to the simple case of a variable name
|
||||
such as '$($(a)'. */
|
||||
if (count < 0)
|
||||
{
|
||||
abeg = expand_argument (beg, p); /* Expand the name. */
|
||||
beg = abeg;
|
||||
end = strchr (beg, '\0');
|
||||
}
|
||||
}
|
||||
else
|
||||
/* Advance P to the end of this reference. After we are
|
||||
finished expanding this one, P will be incremented to
|
||||
continue the scan. */
|
||||
p = end;
|
||||
|
||||
/* This is not a reference to a built-in function and
|
||||
any variable references inside are now expanded.
|
||||
Is the resultant text a substitution reference? */
|
||||
|
||||
colon = lindex (beg, end, ':');
|
||||
if (colon)
|
||||
{
|
||||
/* This looks like a substitution reference: $(FOO:A=B). */
|
||||
const char *subst_beg = colon + 1;
|
||||
const char *subst_end = lindex (subst_beg, end, '=');
|
||||
if (subst_end == 0)
|
||||
/* There is no = in sight. Punt on the substitution
|
||||
reference and treat this as a variable name containing
|
||||
a colon, in the code below. */
|
||||
colon = 0;
|
||||
else
|
||||
{
|
||||
const char *replace_beg = subst_end + 1;
|
||||
const char *replace_end = end;
|
||||
|
||||
/* Extract the variable name before the colon
|
||||
and look up that variable. */
|
||||
v = lookup_variable (beg, colon - beg);
|
||||
if (v == 0)
|
||||
warn_undefined (beg, colon - beg);
|
||||
|
||||
/* If the variable is not empty, perform the
|
||||
substitution. */
|
||||
if (v != 0 && *v->value != '\0')
|
||||
{
|
||||
char *pattern, *replace, *ppercent, *rpercent;
|
||||
char *value = (v->recursive
|
||||
? recursively_expand (v)
|
||||
: v->value);
|
||||
|
||||
/* Copy the pattern and the replacement. Add in an
|
||||
extra % at the beginning to use in case there
|
||||
isn't one in the pattern. */
|
||||
pattern = alloca (subst_end - subst_beg + 2);
|
||||
*(pattern++) = '%';
|
||||
memcpy (pattern, subst_beg, subst_end - subst_beg);
|
||||
pattern[subst_end - subst_beg] = '\0';
|
||||
|
||||
replace = alloca (replace_end - replace_beg + 2);
|
||||
*(replace++) = '%';
|
||||
memcpy (replace, replace_beg,
|
||||
replace_end - replace_beg);
|
||||
replace[replace_end - replace_beg] = '\0';
|
||||
|
||||
/* Look for %. Set the percent pointers properly
|
||||
based on whether we find one or not. */
|
||||
ppercent = find_percent (pattern);
|
||||
if (ppercent)
|
||||
{
|
||||
++ppercent;
|
||||
rpercent = find_percent (replace);
|
||||
if (rpercent)
|
||||
++rpercent;
|
||||
}
|
||||
else
|
||||
{
|
||||
ppercent = pattern;
|
||||
rpercent = replace;
|
||||
--pattern;
|
||||
--replace;
|
||||
}
|
||||
|
||||
o = patsubst_expand_pat (o, value, pattern, replace,
|
||||
ppercent, rpercent);
|
||||
|
||||
if (v->recursive)
|
||||
free (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (colon == 0)
|
||||
/* This is an ordinary variable reference.
|
||||
Look up the value of the variable. */
|
||||
o = reference_variable (o, beg, end - beg);
|
||||
|
||||
free (abeg);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (ISSPACE (p[-1]))
|
||||
break;
|
||||
|
||||
/* A $ followed by a random char is a variable reference:
|
||||
$a is equivalent to $(a). */
|
||||
o = reference_variable (o, p, 1);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (*p == '\0')
|
||||
break;
|
||||
|
||||
++p;
|
||||
}
|
||||
|
||||
free (save);
|
||||
|
||||
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, SIZE_MAX);
|
||||
}
|
||||
|
||||
/* Expand an argument for an expansion function.
|
||||
The text starting at STR and ending at END is variable-expanded
|
||||
into a null-terminated string that is returned as the value.
|
||||
This is done without clobbering 'variable_buffer' or the current
|
||||
variable-expansion that is in progress. */
|
||||
|
||||
char *
|
||||
expand_argument (const char *str, const char *end)
|
||||
{
|
||||
char *tmp, *alloc = NULL;
|
||||
char *r;
|
||||
|
||||
if (str == end)
|
||||
return xstrdup ("");
|
||||
|
||||
if (!end || *end == '\0')
|
||||
return allocated_variable_expand (str);
|
||||
|
||||
if (end - str + 1 > 1000)
|
||||
tmp = alloc = xmalloc (end - str + 1);
|
||||
else
|
||||
tmp = alloca (end - str + 1);
|
||||
|
||||
memcpy (tmp, str, end - str);
|
||||
tmp[end - str] = '\0';
|
||||
|
||||
r = allocated_variable_expand (tmp);
|
||||
|
||||
free (alloc);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Expand LINE for FILE. Error messages refer to the file and line where
|
||||
FILE's commands were found. Expansion uses FILE's variable set list. */
|
||||
|
||||
char *
|
||||
variable_expand_for_file (const char *line, struct file *file)
|
||||
{
|
||||
char *result;
|
||||
struct variable_set_list *savev;
|
||||
const floc *savef;
|
||||
|
||||
if (file == 0)
|
||||
return variable_expand (line);
|
||||
|
||||
savev = current_variable_set_list;
|
||||
current_variable_set_list = file->variables;
|
||||
|
||||
savef = reading_file;
|
||||
if (file->cmds && file->cmds->fileinfo.filenm)
|
||||
reading_file = &file->cmds->fileinfo;
|
||||
else
|
||||
reading_file = 0;
|
||||
|
||||
result = variable_expand (line);
|
||||
|
||||
current_variable_set_list = savev;
|
||||
reading_file = savef;
|
||||
|
||||
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, size_t length,
|
||||
const struct variable_set_list *set, int local)
|
||||
{
|
||||
const struct variable *v;
|
||||
char *buf = 0;
|
||||
int nextlocal;
|
||||
|
||||
/* If there's nothing left to check, return the empty buffer. */
|
||||
if (!set)
|
||||
return initialize_variable_output ();
|
||||
|
||||
/* If this set is local and the next is not a parent, then next is local. */
|
||||
nextlocal = local && set->next_is_parent == 0;
|
||||
|
||||
/* 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;
|
||||
size_t 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.
|
||||
This function is called a lot. It wants to be efficient. */
|
||||
|
||||
char *
|
||||
allocated_variable_expand_for_file (const char *line, struct file *file)
|
||||
{
|
||||
char *value;
|
||||
|
||||
char *obuf = variable_buffer;
|
||||
size_t olen = variable_buffer_length;
|
||||
|
||||
variable_buffer = 0;
|
||||
|
||||
value = variable_expand_for_file (line, file);
|
||||
|
||||
variable_buffer = obuf;
|
||||
variable_buffer_length = olen;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/* Install a new variable_buffer context, returning the current one for
|
||||
safe-keeping. */
|
||||
|
||||
void
|
||||
install_variable_buffer (char **bufp, size_t *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, size_t len)
|
||||
{
|
||||
free (variable_buffer);
|
||||
|
||||
variable_buffer = buf;
|
||||
variable_buffer_length = len;
|
||||
}
|
||||
1278
src/file.c
Normal file
1278
src/file.c
Normal file
File diff suppressed because it is too large
Load Diff
229
src/filedef.h
Normal file
229
src/filedef.h
Normal file
@@ -0,0 +1,229 @@
|
||||
/* Definition of target file data structures for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Structure that represents the info on one file
|
||||
that the makefile says how to make.
|
||||
All of these are chained together through 'next'. */
|
||||
|
||||
#include "hash.h"
|
||||
|
||||
struct commands;
|
||||
struct dep;
|
||||
struct variable;
|
||||
struct variable_set_list;
|
||||
|
||||
struct file
|
||||
{
|
||||
const char *name;
|
||||
const char *hname; /* Hashed filename */
|
||||
const char *vpath; /* VPATH/vpath pathname */
|
||||
struct dep *deps; /* all dependencies, including duplicates */
|
||||
struct commands *cmds; /* Commands to execute for this target. */
|
||||
const char *stem; /* Implicit stem, if an implicit
|
||||
rule has been used */
|
||||
struct dep *also_make; /* Targets that are made by making this. */
|
||||
struct file *prev; /* Previous entry for same file name;
|
||||
used when there are multiple double-colon
|
||||
entries for the same file. */
|
||||
struct file *last; /* Last entry for the same file name. */
|
||||
|
||||
/* File that this file was renamed to. After any time that a
|
||||
file could be renamed, call 'check_renamed' (below). */
|
||||
struct file *renamed;
|
||||
|
||||
/* List of variable sets used for this file. */
|
||||
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,
|
||||
or nil if there isn't one. */
|
||||
struct file *parent;
|
||||
|
||||
/* For a double-colon entry, this is the first double-colon entry for
|
||||
the same file. Otherwise this is null. */
|
||||
struct file *double_colon;
|
||||
|
||||
FILE_TIMESTAMP last_mtime; /* File's modtime, if already known. */
|
||||
FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
|
||||
has been performed. */
|
||||
unsigned int considered; /* equal to 'considered' if file has been
|
||||
considered on current scan of goal chain */
|
||||
int command_flags; /* Flags OR'd in for cmds; see commands.h. */
|
||||
enum update_status /* Status of the last attempt to update. */
|
||||
{
|
||||
us_success = 0, /* Successfully updated. Must be 0! */
|
||||
us_none, /* No attempt to update has been made. */
|
||||
us_question, /* Needs to be updated (-q is is set). */
|
||||
us_failed /* Update failed. */
|
||||
} update_status ENUM_BITFIELD (2);
|
||||
enum cmd_state /* State of commands. ORDER IS IMPORTANT! */
|
||||
{
|
||||
cs_not_started = 0, /* Not yet started. Must be 0! */
|
||||
cs_deps_running, /* Dep commands running. */
|
||||
cs_running, /* Commands running. */
|
||||
cs_finished /* Commands finished. */
|
||||
} command_state ENUM_BITFIELD (2);
|
||||
|
||||
unsigned int builtin:1; /* True if the file is a builtin rule. */
|
||||
unsigned int precious:1; /* Non-0 means don't delete file on quit */
|
||||
unsigned int loaded:1; /* True if the file is a loaded object. */
|
||||
unsigned int unloaded:1; /* True if this loaded object was unloaded. */
|
||||
unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
|
||||
has only one-second resolution. */
|
||||
unsigned int tried_implicit:1; /* Nonzero if have searched
|
||||
for implicit rule for making
|
||||
this file; don't search again. */
|
||||
unsigned int updating:1; /* Nonzero while updating deps of this file */
|
||||
unsigned int updated:1; /* Nonzero if this file has been remade. */
|
||||
unsigned int is_target:1; /* Nonzero if file is described as target. */
|
||||
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
|
||||
unsigned int phony:1; /* Nonzero if this is a phony file
|
||||
i.e., a prerequisite of .PHONY. */
|
||||
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
|
||||
unsigned int is_explicit:1; /* Nonzero if explicitly mentioned. */
|
||||
unsigned int secondary:1; /* Nonzero means remove_intermediates should
|
||||
not delete it. */
|
||||
unsigned int notintermediate:1; /* Nonzero means a file is a prereq to
|
||||
.NOTINTERMEDIATE. */
|
||||
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
|
||||
this target cannot be remade. */
|
||||
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
|
||||
unsigned int pat_searched:1;/* Nonzero if we already searched for
|
||||
pattern-specific variables. */
|
||||
unsigned int no_diag:1; /* True if the file failed to update and no
|
||||
diagnostics has been issued (dontcare). */
|
||||
unsigned int was_shuffled:1; /* Did we already shuffle 'deps'? used when
|
||||
--shuffle passes through the graph. */
|
||||
unsigned int snapped:1; /* True if the deps of this file have been
|
||||
secondary expanded. */
|
||||
};
|
||||
|
||||
|
||||
extern struct file *default_file;
|
||||
|
||||
|
||||
struct file *lookup_file (const char *name);
|
||||
struct file *enter_file (const char *name);
|
||||
struct dep *split_prereqs (char *prereqstr);
|
||||
struct dep *enter_prereqs (struct dep *prereqs, const char *stem);
|
||||
void expand_deps (struct file *f);
|
||||
struct dep *expand_extra_prereqs (const struct variable *extra);
|
||||
void remove_intermediates (int sig);
|
||||
void snap_deps (void);
|
||||
void rename_file (struct file *file, const char *name);
|
||||
void rehash_file (struct file *file, const char *name);
|
||||
void set_command_state (struct file *file, enum cmd_state state);
|
||||
void notice_finished_file (struct file *file);
|
||||
void init_hash_files (void);
|
||||
void verify_file_data_base (void);
|
||||
char *build_target_list (char *old_list);
|
||||
void print_prereqs (const struct dep *deps);
|
||||
void print_file_data_base (void);
|
||||
int try_implicit_rule (struct file *file, unsigned int depth);
|
||||
int stemlen_compare (const void *v1, const void *v2);
|
||||
|
||||
#if 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 29,
|
||||
since the year might be less than -999 or greater than 9999.
|
||||
|
||||
Subtract one for the sign bit if in case file timestamps can be negative;
|
||||
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.
|
||||
The value is NONEXISTENT_MTIME if the file does not exist. */
|
||||
#define file_mtime(f) file_mtime_1 ((f), 1)
|
||||
/* Return the mtime of file F (a struct file *), caching it.
|
||||
Don't search using vpath for the file--if it doesn't actually exist,
|
||||
we don't find it.
|
||||
The value is NONEXISTENT_MTIME if the file does not exist. */
|
||||
#define file_mtime_no_search(f) file_mtime_1 ((f), 0)
|
||||
FILE_TIMESTAMP f_mtime (struct file *file, int search);
|
||||
#define file_mtime_1(f, v) \
|
||||
((f)->last_mtime == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)
|
||||
|
||||
/* Special timestamp values. */
|
||||
|
||||
/* The file's timestamp is not yet known. */
|
||||
#define UNKNOWN_MTIME 0
|
||||
|
||||
/* The file does not exist. */
|
||||
#define NONEXISTENT_MTIME 1
|
||||
|
||||
/* The file does not exist, and we assume that it is older than any
|
||||
actual file. */
|
||||
#define OLD_MTIME 2
|
||||
|
||||
/* The smallest and largest ordinary timestamps. */
|
||||
#define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
|
||||
#define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
|
||||
<< FILE_TIMESTAMP_LO_BITS) \
|
||||
+ ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
|
||||
|
||||
#define is_ordinary_mtime(_t) ((_t) >= ORDINARY_MTIME_MIN && (_t) <= ORDINARY_MTIME_MAX)
|
||||
|
||||
/* Modtime value to use for 'infinitely new'. We used to get the current time
|
||||
from the system and use that whenever we wanted 'new'. But that causes
|
||||
trouble when the machine running make and the machine holding a file have
|
||||
different ideas about what time it is; and can also lose for 'force'
|
||||
targets, which need to be considered newer than anything that depends on
|
||||
them, even if said dependents' modtimes are in the future. */
|
||||
#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
|
||||
|
||||
#define check_renamed(file) \
|
||||
while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
|
||||
|
||||
/* Have we snapped deps yet? */
|
||||
extern int snapped_deps;
|
||||
2825
src/function.c
Normal file
2825
src/function.c
Normal file
File diff suppressed because it is too large
Load Diff
1026
src/getopt.c
Normal file
1026
src/getopt.c
Normal file
File diff suppressed because it is too large
Load Diff
130
src/getopt.h
Normal file
130
src/getopt.h
Normal file
@@ -0,0 +1,130 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989-2022 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 <https://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
src/getopt1.c
Normal file
176
src/getopt1.c
Normal file
@@ -0,0 +1,176 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987-1994, 1996-2022 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 <https://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
src/gettext.h
Normal file
57
src/gettext.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-2022 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 <https://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 */
|
||||
53
src/gmk-default.scm
Normal file
53
src/gmk-default.scm
Normal file
@@ -0,0 +1,53 @@
|
||||
;; Contents of the (gnu make) Guile module
|
||||
;; Copyright (C) 2011-2022 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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
(define (to-string-maybe x)
|
||||
(cond
|
||||
;; In GNU make, "false" is the empty string
|
||||
((or (not x)
|
||||
(unspecified? x)
|
||||
(variable? x)
|
||||
(null? x)
|
||||
(and (string? x) (string-null? x)))
|
||||
#f)
|
||||
;; We want something not false... not sure about this
|
||||
((eq? x #t) "#t")
|
||||
;; Basics
|
||||
((or (symbol? x) (number? x))
|
||||
(object->string x))
|
||||
((char? x)
|
||||
(string x))
|
||||
;; Printable string (no special characters)
|
||||
((and (string? x) (string-every char-set:printing x))
|
||||
x)
|
||||
;; No idea: fail
|
||||
(else (error "Unknown object:" x))))
|
||||
|
||||
(define (obj-to-str x)
|
||||
(let ((acc '()))
|
||||
(define (walk x)
|
||||
(cond ((pair? x) (walk (car x)) (walk (cdr x)))
|
||||
((to-string-maybe x) => (lambda (s) (set! acc (cons s acc))))))
|
||||
(walk x)
|
||||
(string-join (reverse! acc))))
|
||||
|
||||
;; Return the value of the GNU make variable V
|
||||
(define (gmk-var v)
|
||||
(gmk-expand (format #f "$(~a)" (obj-to-str v))))
|
||||
|
||||
;; Export the public interfaces
|
||||
(export gmk-expand gmk-eval gmk-var)
|
||||
79
src/gnumake.h
Normal file
79
src/gnumake.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* External interfaces usable by dynamic objects loaded into GNU Make.
|
||||
--THIS API IS A "TECHNOLOGY PREVIEW" ONLY. IT IS NOT A STABLE INTERFACE--
|
||||
|
||||
Copyright (C) 2013-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _GNUMAKE_H_
|
||||
#define _GNUMAKE_H_
|
||||
|
||||
/* Specify the location of elements read from makefiles. */
|
||||
typedef struct
|
||||
{
|
||||
const char *filenm;
|
||||
unsigned long lineno;
|
||||
} gmk_floc;
|
||||
|
||||
typedef char *(*gmk_func_ptr)(const char *nm, unsigned int argc, char **argv);
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef GMK_BUILDING_MAKE
|
||||
# define GMK_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define GMK_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define GMK_EXPORT
|
||||
#endif
|
||||
|
||||
/* Free memory returned by the gmk_expand() function. */
|
||||
GMK_EXPORT void gmk_free (char *str);
|
||||
|
||||
/* Allocate memory in GNU make's context. */
|
||||
GMK_EXPORT char *gmk_alloc (unsigned int len);
|
||||
|
||||
/* Run $(eval ...) on the provided string BUFFER. */
|
||||
GMK_EXPORT void gmk_eval (const char *buffer, const gmk_floc *floc);
|
||||
|
||||
/* Run GNU make expansion on the provided string STR.
|
||||
Returns an allocated buffer that the caller must free with gmk_free(). */
|
||||
GMK_EXPORT char *gmk_expand (const char *str);
|
||||
|
||||
/* Register a new GNU make function NAME (maximum of 255 chars long).
|
||||
When the function is expanded in the makefile, FUNC will be invoked with
|
||||
the appropriate arguments.
|
||||
|
||||
The return value of FUNC must be either NULL, in which case it expands to
|
||||
the empty string, or a pointer to the result of the expansion in a string
|
||||
created by gmk_alloc(). GNU make will free the memory when it's done.
|
||||
|
||||
MIN_ARGS is the minimum number of arguments the function requires.
|
||||
MAX_ARGS is the maximum number of arguments (or 0 if there's no maximum).
|
||||
MIN_ARGS and MAX_ARGS may not exceed 255.
|
||||
|
||||
The FLAGS value may be GMK_FUNC_DEFAULT, or one or more of the following
|
||||
flags OR'd together:
|
||||
|
||||
GMK_FUNC_NOEXPAND: the arguments to the function will be not be expanded
|
||||
before FUNC is called.
|
||||
*/
|
||||
GMK_EXPORT void gmk_add_function (const char *name, gmk_func_ptr func,
|
||||
unsigned int min_args, unsigned int max_args,
|
||||
unsigned int flags);
|
||||
|
||||
#define GMK_FUNC_DEFAULT 0x00
|
||||
#define GMK_FUNC_NOEXPAND 0x01
|
||||
|
||||
#endif /* _GNUMAKE_H_ */
|
||||
159
src/guile.c
Normal file
159
src/guile.c
Normal file
@@ -0,0 +1,159 @@
|
||||
/* GNU Guile interface for GNU Make.
|
||||
Copyright (C) 2011-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
#include "gnumake.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "filedef.h"
|
||||
#include "dep.h"
|
||||
#include "variable.h"
|
||||
|
||||
#include <libguile.h>
|
||||
|
||||
/* Pre-2.0 versions of Guile don't have a typedef for gsubr function types. */
|
||||
#if SCM_MAJOR_VERSION < 2
|
||||
# define GSUBR_TYPE SCM (*) ()
|
||||
/* Guile 1.x doesn't really support i18n. */
|
||||
# define EVAL_STRING(_s) scm_c_eval_string (_s)
|
||||
#else
|
||||
# define GSUBR_TYPE scm_t_subr
|
||||
# define EVAL_STRING(_s) scm_eval_string (scm_from_utf8_string (_s))
|
||||
#endif
|
||||
|
||||
static SCM make_mod = SCM_EOL;
|
||||
static SCM obj_to_str = SCM_EOL;
|
||||
|
||||
/* Convert an SCM object into a string. */
|
||||
static char *
|
||||
cvt_scm_to_str (SCM obj)
|
||||
{
|
||||
return scm_to_locale_string (scm_call_1 (obj_to_str, obj));
|
||||
}
|
||||
|
||||
/* Perform the GNU make expansion function. */
|
||||
static SCM
|
||||
guile_expand_wrapper (SCM obj)
|
||||
{
|
||||
char *str = cvt_scm_to_str (obj);
|
||||
SCM ret;
|
||||
char *res;
|
||||
|
||||
DB (DB_BASIC, (_("guile: Expanding '%s'\n"), str));
|
||||
res = gmk_expand (str);
|
||||
ret = scm_from_locale_string (res);
|
||||
|
||||
free (str);
|
||||
free (res);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Perform the GNU make eval function. */
|
||||
static SCM
|
||||
guile_eval_wrapper (SCM obj)
|
||||
{
|
||||
char *str = cvt_scm_to_str (obj);
|
||||
|
||||
DB (DB_BASIC, (_("guile: Evaluating '%s'\n"), str));
|
||||
gmk_eval (str, 0);
|
||||
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
|
||||
/* Invoked by scm_c_define_module(), in the context of the GNU make module. */
|
||||
static void
|
||||
guile_define_module (void *data UNUSED)
|
||||
{
|
||||
/* Ingest the predefined Guile module for GNU make. */
|
||||
#include "gmk-default.h"
|
||||
|
||||
/* Register a subr for GNU make's eval capability. */
|
||||
scm_c_define_gsubr ("gmk-expand", 1, 0, 0, (GSUBR_TYPE) guile_expand_wrapper);
|
||||
|
||||
/* Register a subr for GNU make's eval capability. */
|
||||
scm_c_define_gsubr ("gmk-eval", 1, 0, 0, (GSUBR_TYPE) guile_eval_wrapper);
|
||||
|
||||
/* Define the rest of the module. */
|
||||
scm_c_eval_string (GUILE_module_defn);
|
||||
}
|
||||
|
||||
/* Initialize the GNU make Guile module. */
|
||||
static void *
|
||||
guile_init (void *arg UNUSED)
|
||||
{
|
||||
/* Define the module. */
|
||||
make_mod = scm_c_define_module ("gnu make", guile_define_module, NULL);
|
||||
|
||||
/* Get a reference to the object-to-string translator, for later. */
|
||||
obj_to_str = scm_variable_ref (scm_c_module_lookup (make_mod, "obj-to-str"));
|
||||
|
||||
/* Import the GNU make module exports into the generic space. */
|
||||
scm_c_eval_string ("(use-modules (gnu make))");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *
|
||||
internal_guile_eval (void *arg)
|
||||
{
|
||||
return cvt_scm_to_str (EVAL_STRING (arg));
|
||||
}
|
||||
|
||||
/* This is the function registered with make */
|
||||
static char *
|
||||
func_guile (const char *funcname UNUSED, unsigned int argc UNUSED, char **argv)
|
||||
{
|
||||
static int init = 0;
|
||||
|
||||
if (! init)
|
||||
{
|
||||
/* Initialize the Guile interpreter. */
|
||||
scm_with_guile (guile_init, NULL);
|
||||
init = 1;
|
||||
}
|
||||
|
||||
if (argv[0] && argv[0][0] != '\0')
|
||||
return scm_with_guile (internal_guile_eval, argv[0]);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ----- Public interface ----- */
|
||||
|
||||
/* We could send the flocp to define_new_function(), but since guile is
|
||||
"kind of" built-in, that didn't seem so useful. */
|
||||
int
|
||||
guile_gmake_setup (const floc *flocp UNUSED)
|
||||
{
|
||||
/* Create a make function "guile". */
|
||||
gmk_add_function ("guile", func_guile, 0, 1, GMK_FUNC_DEFAULT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
guile_gmake_setup (const floc *flocp UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
495
src/hash.c
Normal file
495
src/hash.c
Normal file
@@ -0,0 +1,495 @@
|
||||
/* 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
#include "hash.h"
|
||||
#include <assert.h>
|
||||
|
||||
#define CALLOC(t, n) ((t *) xcalloc (sizeof (t) * (n)))
|
||||
#define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n)))
|
||||
#define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n)))
|
||||
#define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n)))
|
||||
|
||||
static void hash_rehash __P((struct hash_table* ht));
|
||||
static unsigned long round_up_2 __P((unsigned long rough));
|
||||
|
||||
/* Implement double hashing with open addressing. The table size is
|
||||
always a power of two. The secondary ('increment') hash function
|
||||
is forced to return an odd-value, in order to be relatively prime
|
||||
to the table size. This guarantees that the increment can
|
||||
potentially hit every slot in the table during collision
|
||||
resolution. */
|
||||
|
||||
void *hash_deleted_item = &hash_deleted_item;
|
||||
|
||||
/* Force the table size to be a power of two, possibly rounding up the
|
||||
given size. */
|
||||
|
||||
void
|
||||
hash_init (struct hash_table *ht, unsigned long size,
|
||||
hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)
|
||||
{
|
||||
ht->ht_size = round_up_2 (size);
|
||||
ht->ht_empty_slots = ht->ht_size;
|
||||
ht->ht_vec = CALLOC (void *, 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 (void *));
|
||||
exit (MAKE_TROUBLE);
|
||||
}
|
||||
|
||||
ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_collisions = 0;
|
||||
ht->ht_lookups = 0;
|
||||
ht->ht_rehashes = 0;
|
||||
ht->ht_hash_1 = hash_1;
|
||||
ht->ht_hash_2 = hash_2;
|
||||
ht->ht_compare = hash_cmp;
|
||||
}
|
||||
|
||||
/* Load an array of items into 'ht'. */
|
||||
|
||||
void
|
||||
hash_load (struct hash_table *ht, void *item_table,
|
||||
unsigned long cardinality, unsigned long size)
|
||||
{
|
||||
char *items = (char *) item_table;
|
||||
while (cardinality--)
|
||||
{
|
||||
hash_insert (ht, items);
|
||||
items += size;
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns the address of the table slot matching 'key'. If 'key' is
|
||||
not found, return the address of an empty slot suitable for
|
||||
inserting 'key'. The caller is responsible for incrementing
|
||||
ht_fill on insertion. */
|
||||
|
||||
void **
|
||||
hash_find_slot (struct hash_table *ht, const void *key)
|
||||
{
|
||||
void **slot;
|
||||
void **deleted_slot = 0;
|
||||
unsigned int hash_2 = 0;
|
||||
unsigned int hash_1 = (*ht->ht_hash_1) (key);
|
||||
|
||||
ht->ht_lookups++;
|
||||
for (;;)
|
||||
{
|
||||
hash_1 &= (ht->ht_size - 1);
|
||||
slot = &ht->ht_vec[hash_1];
|
||||
|
||||
if (*slot == 0)
|
||||
return (deleted_slot ? deleted_slot : slot);
|
||||
if (*slot == hash_deleted_item)
|
||||
{
|
||||
if (deleted_slot == 0)
|
||||
deleted_slot = slot;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (key == *slot)
|
||||
return slot;
|
||||
if ((*ht->ht_compare) (key, *slot) == 0)
|
||||
return slot;
|
||||
ht->ht_collisions++;
|
||||
}
|
||||
if (!hash_2)
|
||||
hash_2 = (*ht->ht_hash_2) (key) | 1;
|
||||
hash_1 += hash_2;
|
||||
}
|
||||
}
|
||||
|
||||
void *
|
||||
hash_find_item (struct hash_table *ht, const void *key)
|
||||
{
|
||||
void **slot = hash_find_slot (ht, key);
|
||||
return ((HASH_VACANT (*slot)) ? 0 : *slot);
|
||||
}
|
||||
|
||||
void *
|
||||
hash_insert (struct hash_table *ht, const void *item)
|
||||
{
|
||||
void **slot = hash_find_slot (ht, item);
|
||||
const void *old_item = *slot;
|
||||
hash_insert_at (ht, item, slot);
|
||||
return (void *)((HASH_VACANT (old_item)) ? 0 : old_item);
|
||||
}
|
||||
|
||||
void *
|
||||
hash_insert_at (struct hash_table *ht, const void *item, const void *slot)
|
||||
{
|
||||
const void *old_item = *(void **) slot;
|
||||
if (HASH_VACANT (old_item))
|
||||
{
|
||||
ht->ht_fill++;
|
||||
if (old_item == 0)
|
||||
ht->ht_empty_slots--;
|
||||
old_item = item;
|
||||
}
|
||||
*(void const **) slot = item;
|
||||
if (ht->ht_empty_slots < ht->ht_size - ht->ht_capacity)
|
||||
{
|
||||
hash_rehash (ht);
|
||||
return (void *) hash_find_slot (ht, item);
|
||||
}
|
||||
else
|
||||
return (void *) slot;
|
||||
}
|
||||
|
||||
void *
|
||||
hash_delete (struct hash_table *ht, const void *item)
|
||||
{
|
||||
void **slot = hash_find_slot (ht, item);
|
||||
return hash_delete_at (ht, slot);
|
||||
}
|
||||
|
||||
void *
|
||||
hash_delete_at (struct hash_table *ht, const void *slot)
|
||||
{
|
||||
void *item = *(void **) slot;
|
||||
if (!HASH_VACANT (item))
|
||||
{
|
||||
*(void const **) slot = hash_deleted_item;
|
||||
ht->ht_fill--;
|
||||
return item;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
hash_free_items (struct hash_table *ht)
|
||||
{
|
||||
void **vec = ht->ht_vec;
|
||||
void **end = &vec[ht->ht_size];
|
||||
for (; vec < end; vec++)
|
||||
{
|
||||
void *item = *vec;
|
||||
if (!HASH_VACANT (item))
|
||||
free (item);
|
||||
*vec = 0;
|
||||
}
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_empty_slots = ht->ht_size;
|
||||
}
|
||||
|
||||
void
|
||||
hash_delete_items (struct hash_table *ht)
|
||||
{
|
||||
void **vec = ht->ht_vec;
|
||||
void **end = &vec[ht->ht_size];
|
||||
for (; vec < end; vec++)
|
||||
*vec = 0;
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_collisions = 0;
|
||||
ht->ht_lookups = 0;
|
||||
ht->ht_rehashes = 0;
|
||||
ht->ht_empty_slots = ht->ht_size;
|
||||
}
|
||||
|
||||
void
|
||||
hash_free (struct hash_table *ht, int free_items)
|
||||
{
|
||||
if (free_items)
|
||||
hash_free_items (ht);
|
||||
else
|
||||
{
|
||||
ht->ht_fill = 0;
|
||||
ht->ht_empty_slots = ht->ht_size;
|
||||
}
|
||||
free (ht->ht_vec);
|
||||
ht->ht_vec = 0;
|
||||
ht->ht_capacity = 0;
|
||||
}
|
||||
|
||||
void
|
||||
hash_map (struct hash_table *ht, hash_map_func_t map)
|
||||
{
|
||||
void **slot;
|
||||
void **end = &ht->ht_vec[ht->ht_size];
|
||||
|
||||
for (slot = ht->ht_vec; slot < end; slot++)
|
||||
{
|
||||
if (!HASH_VACANT (*slot))
|
||||
(*map) (*slot);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
hash_map_arg (struct hash_table *ht, hash_map_arg_func_t map, void *arg)
|
||||
{
|
||||
void **slot;
|
||||
void **end = &ht->ht_vec[ht->ht_size];
|
||||
|
||||
for (slot = ht->ht_vec; slot < end; slot++)
|
||||
{
|
||||
if (!HASH_VACANT (*slot))
|
||||
(*map) (*slot, arg);
|
||||
}
|
||||
}
|
||||
|
||||
/* Double the size of the hash table in the event of overflow... */
|
||||
|
||||
static void
|
||||
hash_rehash (struct hash_table *ht)
|
||||
{
|
||||
unsigned long old_ht_size = ht->ht_size;
|
||||
void **old_vec = ht->ht_vec;
|
||||
void **ovp;
|
||||
|
||||
if (ht->ht_fill >= ht->ht_capacity)
|
||||
{
|
||||
ht->ht_size *= 2;
|
||||
ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4);
|
||||
}
|
||||
ht->ht_rehashes++;
|
||||
ht->ht_vec = CALLOC (void *, 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)
|
||||
{
|
||||
fprintf (out_FILE, _("Load=%lu/%lu=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
||||
100.0 * (double) ht->ht_fill / (double) ht->ht_size);
|
||||
fprintf (out_FILE, _("Rehash=%u, "), ht->ht_rehashes);
|
||||
fprintf (out_FILE, _("Collisions=%lu/%lu=%.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;
|
||||
}
|
||||
|
||||
#define rol32(v, n) \
|
||||
((v) << (n) | ((v) >> (32 - (n))))
|
||||
|
||||
/* jhash_mix -- mix 3 32-bit values reversibly. */
|
||||
#define jhash_mix(a, b, c) \
|
||||
{ \
|
||||
a -= c; a ^= rol32(c, 4); c += b; \
|
||||
b -= a; b ^= rol32(a, 6); a += c; \
|
||||
c -= b; c ^= rol32(b, 8); b += a; \
|
||||
a -= c; a ^= rol32(c, 16); c += b; \
|
||||
b -= a; b ^= rol32(a, 19); a += c; \
|
||||
c -= b; c ^= rol32(b, 4); b += a; \
|
||||
}
|
||||
|
||||
/* jhash_final - final mixing of 3 32-bit values (a,b,c) into c */
|
||||
#define jhash_final(a, b, c) \
|
||||
{ \
|
||||
c ^= b; c -= rol32(b, 14); \
|
||||
a ^= c; a -= rol32(c, 11); \
|
||||
b ^= a; b -= rol32(a, 25); \
|
||||
c ^= b; c -= rol32(b, 16); \
|
||||
a ^= c; a -= rol32(c, 4); \
|
||||
b ^= a; b -= rol32(a, 14); \
|
||||
c ^= b; c -= rol32(b, 24); \
|
||||
}
|
||||
|
||||
/* An arbitrary initial parameter */
|
||||
#define JHASH_INITVAL 0xdeadbeef
|
||||
|
||||
#define sum_get_unaligned_32(r, p) \
|
||||
do { \
|
||||
unsigned int val; \
|
||||
memcpy(&val, (p), 4); \
|
||||
r += val; \
|
||||
} while(0);
|
||||
|
||||
unsigned int
|
||||
jhash(unsigned const char *k, int length)
|
||||
{
|
||||
unsigned int a, b, c;
|
||||
|
||||
/* Set up the internal state */
|
||||
a = b = c = JHASH_INITVAL + length;
|
||||
|
||||
/* All but the last block: affect some 32 bits of (a,b,c) */
|
||||
while (length > 12) {
|
||||
sum_get_unaligned_32(a, k);
|
||||
sum_get_unaligned_32(b, k + 4);
|
||||
sum_get_unaligned_32(c, k + 8);
|
||||
jhash_mix(a, b, c);
|
||||
length -= 12;
|
||||
k += 12;
|
||||
}
|
||||
|
||||
if (!length)
|
||||
return c;
|
||||
|
||||
if (length > 8)
|
||||
{
|
||||
sum_get_unaligned_32(a, k);
|
||||
length -= 4;
|
||||
k += 4;
|
||||
}
|
||||
if (length > 4)
|
||||
{
|
||||
sum_get_unaligned_32(b, k);
|
||||
length -= 4;
|
||||
k += 4;
|
||||
}
|
||||
|
||||
if (length == 4)
|
||||
c += (unsigned)k[3]<<24;
|
||||
if (length >= 3)
|
||||
c += (unsigned)k[2]<<16;
|
||||
if (length >= 2)
|
||||
c += (unsigned)k[1]<<8;
|
||||
c += k[0];
|
||||
jhash_final(a, b, c);
|
||||
return c;
|
||||
}
|
||||
|
||||
#define UINTSZ sizeof (unsigned int)
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
/* The ifs are ordered from the first byte in memory to the last. */
|
||||
#define sum_up_to_nul(r, p, plen, flag) \
|
||||
do { \
|
||||
unsigned int val = 0; \
|
||||
size_t pn = (plen); \
|
||||
size_t n = pn < UINTSZ ? pn : UINTSZ; \
|
||||
memcpy (&val, (p), n); \
|
||||
if ((val & 0xFF000000) == 0) \
|
||||
flag = 1; \
|
||||
else if ((val & 0xFF0000) == 0) \
|
||||
r += val & ~0xFFFF, flag = 1; \
|
||||
else if ((val & 0xFF00) == 0) \
|
||||
r += val & ~0xFF, flag = 1; \
|
||||
else \
|
||||
r += val, flag = (val & 0xFF) == 0; \
|
||||
} while (0)
|
||||
#else
|
||||
/* First detect the presence of zeroes. If there is none, we can
|
||||
sum the 4 bytes directly. Otherwise, the ifs are ordered as in the
|
||||
big endian case, from the first byte in memory to the last. */
|
||||
#define sum_up_to_nul(r, p, plen, flag) \
|
||||
do { \
|
||||
unsigned int val = 0; \
|
||||
size_t pn = (plen); \
|
||||
size_t n = pn < UINTSZ ? pn : UINTSZ; \
|
||||
memcpy (&val, (p), n); \
|
||||
flag = ((val - 0x01010101) & ~val) & 0x80808080; \
|
||||
if (!flag) \
|
||||
r += val; \
|
||||
else if (val & 0xFF) \
|
||||
{ \
|
||||
if ((val & 0xFF00) == 0) \
|
||||
r += val & 0xFF; \
|
||||
else if ((val & 0xFF0000) == 0) \
|
||||
r += val & 0xFFFF; \
|
||||
else \
|
||||
r += val; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
unsigned int
|
||||
jhash_string(unsigned const char *k)
|
||||
{
|
||||
unsigned int a, b, c;
|
||||
unsigned int have_nul = 0;
|
||||
unsigned const char *start = k;
|
||||
size_t klen = strlen ((const char*)k);
|
||||
|
||||
/* Set up the internal state */
|
||||
a = b = c = JHASH_INITVAL;
|
||||
|
||||
/* All but the last block: affect some 32 bits of (a,b,c) */
|
||||
for (;;) {
|
||||
sum_up_to_nul(a, k, klen, have_nul);
|
||||
if (have_nul)
|
||||
break;
|
||||
k += UINTSZ;
|
||||
assert (klen >= UINTSZ);
|
||||
klen -= UINTSZ;
|
||||
|
||||
sum_up_to_nul(b, k, klen, have_nul);
|
||||
if (have_nul)
|
||||
break;
|
||||
k += UINTSZ;
|
||||
assert (klen >= UINTSZ);
|
||||
klen -= UINTSZ;
|
||||
|
||||
sum_up_to_nul(c, k, klen, have_nul);
|
||||
if (have_nul)
|
||||
break;
|
||||
k += UINTSZ;
|
||||
assert (klen >= UINTSZ);
|
||||
klen -= UINTSZ;
|
||||
jhash_mix(a, b, c);
|
||||
}
|
||||
|
||||
jhash_final(a, b, c);
|
||||
return c + (unsigned) (k - start);
|
||||
}
|
||||
234
src/hash.h
Normal file
234
src/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 <https://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 unsigned jhash(unsigned char const *key, int n);
|
||||
extern unsigned jhash_string(unsigned char const *key);
|
||||
|
||||
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); \
|
||||
(RESULT) += jhash_string(_key_); \
|
||||
} while (0)
|
||||
#define return_STRING_HASH_1(KEY) do { \
|
||||
unsigned long _result_ = 0; \
|
||||
STRING_HASH_1 ((KEY), _result_); \
|
||||
return _result_; \
|
||||
} while (0)
|
||||
|
||||
/* No need for a second hash because jhash already provides
|
||||
pretty good results. However, do evaluate the arguments
|
||||
to avoid warnings. */
|
||||
#define STRING_HASH_2(KEY, RESULT) do { \
|
||||
(void)(KEY); \
|
||||
} 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); \
|
||||
(RESULT) += jhash(_key_, N); \
|
||||
} 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)
|
||||
|
||||
/* No need for a second hash because jhash already provides
|
||||
pretty good results. However, do evaluate the arguments
|
||||
to avoid warnings. */
|
||||
#define STRING_N_HASH_2(KEY, N, RESULT) do { \
|
||||
(void)(KEY); \
|
||||
(void)(N); \
|
||||
} 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 : memcmp ((X), (Y), (N)); \
|
||||
} while (0)
|
||||
#define return_STRING_N_COMPARE(X, Y, N) do { \
|
||||
return (X) == (Y) ? 0 : memcmp ((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) += (tolower (*_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) += (tolower (*_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_ */
|
||||
1159
src/implicit.c
Normal file
1159
src/implicit.c
Normal file
File diff suppressed because it is too large
Load Diff
92
src/job.h
Normal file
92
src/job.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/* Definitions for managing subprocesses in GNU Make.
|
||||
Copyright (C) 1992-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "output.h"
|
||||
|
||||
/* Structure describing a running or dead child process. */
|
||||
|
||||
#ifdef VMS
|
||||
#define VMSCHILD \
|
||||
char *comname; /* Temporary command file name */ \
|
||||
int efn; /* Completion event flag number */ \
|
||||
int cstatus; /* Completion status */ \
|
||||
int vms_launch_status; /* non-zero if lib$spawn, etc failed */
|
||||
#else
|
||||
#define VMSCHILD
|
||||
#endif
|
||||
|
||||
#define CHILDBASE \
|
||||
char *cmd_name; /* Allocated copy of command run. */ \
|
||||
char **environment; /* Environment for commands. */ \
|
||||
VMSCHILD \
|
||||
struct output output /* Output for this child. */
|
||||
|
||||
|
||||
struct childbase
|
||||
{
|
||||
CHILDBASE;
|
||||
};
|
||||
|
||||
struct child
|
||||
{
|
||||
CHILDBASE;
|
||||
|
||||
struct child *next; /* Link in the chain. */
|
||||
|
||||
struct file *file; /* File being remade. */
|
||||
|
||||
char *sh_batch_file; /* Script file for shell commands */
|
||||
char **command_lines; /* Array of variable-expanded cmd lines. */
|
||||
char *command_ptr; /* Ptr into command_lines[command_line]. */
|
||||
|
||||
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 noerror:1; /* Nonzero if commands contained a '-'. */
|
||||
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
|
||||
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
|
||||
unsigned int recursive:1; /* Nonzero for recursive command ('+' etc.) */
|
||||
unsigned int jobslot:1; /* Nonzero if it's reserved a job slot. */
|
||||
unsigned int dontcare:1; /* Saved dontcare flag. */
|
||||
};
|
||||
|
||||
extern struct child *children;
|
||||
|
||||
/* A signal handler for SIGCHLD, if needed. */
|
||||
void child_handler (int sig);
|
||||
int is_bourne_compatible_shell(const char *path);
|
||||
void new_job (struct file *file);
|
||||
void reap_children (int block, int err);
|
||||
void start_waiting_jobs (void);
|
||||
void free_childbase (struct childbase* child);
|
||||
|
||||
char **construct_command_argv (char *line, char **restp, struct file *file,
|
||||
int cmd_flags, char** batch_file);
|
||||
|
||||
pid_t child_execute_job (struct childbase *child, int good_stdin, char **argv);
|
||||
|
||||
#ifdef _AMIGA
|
||||
void exec_command (char **argv) NORETURN;
|
||||
#else
|
||||
pid_t exec_command (char **argv, char **envp);
|
||||
#endif
|
||||
|
||||
void unblock_all_sigs (void);
|
||||
|
||||
extern unsigned int job_slots_used;
|
||||
extern unsigned int jobserver_tokens;
|
||||
262
src/load.c
Normal file
262
src/load.c
Normal file
@@ -0,0 +1,262 @@
|
||||
/* Loading dynamic objects for GNU Make.
|
||||
Copyright (C) 2012-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#if MAKE_LOAD
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define SYMBOL_EXTENSION "_gmk_setup"
|
||||
|
||||
#include "debug.h"
|
||||
#include "filedef.h"
|
||||
#include "variable.h"
|
||||
|
||||
/* Tru64 V4.0 does not have this flag */
|
||||
#ifndef RTLD_GLOBAL
|
||||
# define RTLD_GLOBAL 0
|
||||
#endif
|
||||
|
||||
struct load_list
|
||||
{
|
||||
struct load_list *next;
|
||||
const char *name;
|
||||
void *dlp;
|
||||
};
|
||||
|
||||
static struct load_list *loaded_syms = NULL;
|
||||
|
||||
static load_func_t
|
||||
load_object (const floc *flocp, int noerror, const char *ldname,
|
||||
const char *symname)
|
||||
{
|
||||
static void *global_dl = NULL;
|
||||
load_func_t symp;
|
||||
|
||||
if (! global_dl)
|
||||
{
|
||||
global_dl = dlopen (NULL, RTLD_NOW|RTLD_GLOBAL);
|
||||
if (! global_dl)
|
||||
{
|
||||
const char *err = dlerror ();
|
||||
OS (fatal, flocp, _("Failed to open global symbol table: %s"), err);
|
||||
}
|
||||
}
|
||||
|
||||
symp = (load_func_t) dlsym (global_dl, symname);
|
||||
if (! symp)
|
||||
{
|
||||
struct load_list *new;
|
||||
void *dlp = NULL;
|
||||
|
||||
/* If the path has no "/", try the current directory first. */
|
||||
if (! strchr (ldname, '/')
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
&& ! strchr (ldname, '\\')
|
||||
#endif
|
||||
)
|
||||
dlp = dlopen (concat (2, "./", ldname), RTLD_LAZY|RTLD_GLOBAL);
|
||||
|
||||
/* If we haven't opened it yet, try the default search path. */
|
||||
if (! dlp)
|
||||
dlp = dlopen (ldname, RTLD_LAZY|RTLD_GLOBAL);
|
||||
|
||||
/* Still no? Then fail. */
|
||||
if (! dlp)
|
||||
{
|
||||
const char *err = dlerror ();
|
||||
if (noerror)
|
||||
DB (DB_BASIC, ("%s\n", err));
|
||||
else
|
||||
OS (error, flocp, "%s", err);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DB (DB_VERBOSE, (_("Loaded shared object %s\n"), ldname));
|
||||
|
||||
/* Assert that the GPL license symbol is defined. */
|
||||
symp = (load_func_t) dlsym (dlp, "plugin_is_GPL_compatible");
|
||||
if (! symp)
|
||||
OS (fatal, flocp,
|
||||
_("Loaded object %s is not declared to be GPL compatible"),
|
||||
ldname);
|
||||
|
||||
symp = (load_func_t) dlsym (dlp, symname);
|
||||
if (! symp)
|
||||
{
|
||||
const char *err = dlerror ();
|
||||
OSSS (fatal, flocp, _("Failed to load symbol %s from %s: %s"),
|
||||
symname, ldname, err);
|
||||
}
|
||||
|
||||
/* Add this symbol to a trivial lookup table. This is not efficient but
|
||||
it's highly unlikely we'll be loading lots of objects, and we only
|
||||
need it to look them up on unload, if we rebuild them. */
|
||||
new = xmalloc (sizeof (struct load_list));
|
||||
new->name = xstrdup (ldname);
|
||||
new->dlp = dlp;
|
||||
new->next = loaded_syms;
|
||||
loaded_syms = new;
|
||||
}
|
||||
|
||||
return symp;
|
||||
}
|
||||
|
||||
int
|
||||
load_file (const floc *flocp, struct file *file, int noerror)
|
||||
{
|
||||
const char *ldname = file->name;
|
||||
size_t nmlen = strlen (ldname);
|
||||
char *new = alloca (nmlen + CSTRLEN (SYMBOL_EXTENSION) + 1);
|
||||
char *symname = NULL;
|
||||
const char *fp;
|
||||
int r;
|
||||
load_func_t symp;
|
||||
|
||||
/* Break the input into an object file name and a symbol name. If no symbol
|
||||
name was provided, compute one from the object file name. */
|
||||
fp = strchr (ldname, '(');
|
||||
if (fp)
|
||||
{
|
||||
const char *ep;
|
||||
|
||||
/* There's an open paren, so see if there's a close paren: if so use
|
||||
that as the symbol name. We can't have whitespace: it would have
|
||||
been chopped up before this function is called. */
|
||||
ep = strchr (fp+1, ')');
|
||||
if (ep && ep[1] == '\0')
|
||||
{
|
||||
size_t l = fp - ldname;
|
||||
|
||||
++fp;
|
||||
if (fp == ep)
|
||||
OS (fatal, flocp, _("Empty symbol name for load: %s"), ldname);
|
||||
|
||||
/* Make a copy of the ldname part. */
|
||||
memcpy (new, ldname, l);
|
||||
new[l] = '\0';
|
||||
ldname = new;
|
||||
nmlen = l;
|
||||
|
||||
/* Make a copy of the symbol name part. */
|
||||
symname = new + l + 1;
|
||||
memcpy (symname, fp, ep - fp);
|
||||
symname[ep - fp] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure this name is in the string cache. */
|
||||
ldname = file->name = strcache_add (ldname);
|
||||
|
||||
/* If this object has been loaded, we're done: return -1 to ensure make does
|
||||
not rebuild again. If a rebuild is allowed it was set up when this
|
||||
object was initially loaded. */
|
||||
file = lookup_file (ldname);
|
||||
if (file && file->loaded)
|
||||
return -1;
|
||||
|
||||
/* If we didn't find a symbol name yet, construct it from the ldname. */
|
||||
if (! symname)
|
||||
{
|
||||
char *p = new;
|
||||
|
||||
fp = strrchr (ldname, '/');
|
||||
#ifdef HAVE_DOS_PATHS
|
||||
if (fp)
|
||||
{
|
||||
const char *fp2 = strchr (fp, '\\');
|
||||
|
||||
if (fp2 > fp)
|
||||
fp = fp2;
|
||||
}
|
||||
else
|
||||
fp = strrchr (ldname, '\\');
|
||||
/* The (improbable) case of d:foo. */
|
||||
if (fp && *fp && fp[1] == ':')
|
||||
fp++;
|
||||
#endif
|
||||
if (!fp)
|
||||
fp = ldname;
|
||||
else
|
||||
++fp;
|
||||
while (isalnum ((unsigned char) *fp) || *fp == '_')
|
||||
*(p++) = *(fp++);
|
||||
strcpy (p, SYMBOL_EXTENSION);
|
||||
symname = new;
|
||||
}
|
||||
|
||||
DB (DB_VERBOSE, (_("Loading symbol %s from %s\n"), symname, ldname));
|
||||
|
||||
/* Load it! */
|
||||
symp = load_object (flocp, noerror, ldname, symname);
|
||||
if (! symp)
|
||||
return 0;
|
||||
|
||||
/* Invoke the symbol. */
|
||||
r = (*symp) (flocp);
|
||||
|
||||
/* If the load didn't fail, add the file to the .LOADED variable. */
|
||||
if (r)
|
||||
do_variable_definition(flocp, ".LOADED", ldname, o_file, f_append_value, 0);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int
|
||||
unload_file (const char *name)
|
||||
{
|
||||
int rc = 0;
|
||||
struct load_list *d;
|
||||
|
||||
for (d = loaded_syms; d != NULL; d = d->next)
|
||||
if (streq (d->name, name) && d->dlp)
|
||||
{
|
||||
DB (DB_VERBOSE, (_("Unloading shared object %s\n"), name));
|
||||
rc = dlclose (d->dlp);
|
||||
if (rc)
|
||||
perror_with_name ("dlclose: ", d->name);
|
||||
else
|
||||
d->dlp = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
load_file (const floc *flocp, struct file *file UNUSED, int noerror)
|
||||
{
|
||||
if (! noerror)
|
||||
O (fatal, flocp,
|
||||
_("The 'load' operation is not supported on this platform"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
unload_file (const char *name UNUSED)
|
||||
{
|
||||
O (fatal, NILF, "INTERNAL: Cannot unload when load is not supported");
|
||||
}
|
||||
|
||||
#endif /* MAKE_LOAD */
|
||||
82
src/loadapi.c
Normal file
82
src/loadapi.c
Normal file
@@ -0,0 +1,82 @@
|
||||
/* API for GNU Make dynamic objects.
|
||||
Copyright (C) 2013-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
|
||||
#include "filedef.h"
|
||||
#include "variable.h"
|
||||
#include "dep.h"
|
||||
|
||||
/* Allocate a buffer in our context, so we can free it. */
|
||||
char *
|
||||
gmk_alloc (unsigned int len)
|
||||
{
|
||||
return xmalloc (len);
|
||||
}
|
||||
|
||||
/* Free a buffer returned by gmk_expand(). */
|
||||
void
|
||||
gmk_free (char *s)
|
||||
{
|
||||
free (s);
|
||||
}
|
||||
|
||||
/* Evaluate a buffer as make syntax.
|
||||
Ideally eval_buffer() will take const char *, but not yet. */
|
||||
void
|
||||
gmk_eval (const char *buffer, const gmk_floc *gfloc)
|
||||
{
|
||||
/* Preserve existing variable buffer context. */
|
||||
char *pbuf;
|
||||
size_t plen;
|
||||
char *s;
|
||||
floc fl;
|
||||
floc *flp;
|
||||
|
||||
if (gfloc)
|
||||
{
|
||||
fl.filenm = gfloc->filenm;
|
||||
fl.lineno = gfloc->lineno;
|
||||
fl.offset = 0;
|
||||
flp = &fl;
|
||||
}
|
||||
else
|
||||
flp = NULL;
|
||||
|
||||
install_variable_buffer (&pbuf, &plen);
|
||||
|
||||
s = xstrdup (buffer);
|
||||
eval_buffer (s, flp);
|
||||
free (s);
|
||||
|
||||
restore_variable_buffer (pbuf, plen);
|
||||
}
|
||||
|
||||
/* Expand a string and return an allocated buffer.
|
||||
Caller must call gmk_free() with this buffer. */
|
||||
char *
|
||||
gmk_expand (const char *ref)
|
||||
{
|
||||
return allocated_variable_expand (ref);
|
||||
}
|
||||
|
||||
/* Register a function to be called from makefiles. */
|
||||
void
|
||||
gmk_add_function (const char *name, gmk_func_ptr func,
|
||||
unsigned int min, unsigned int max, unsigned int flags)
|
||||
{
|
||||
define_new_function (reading_file, name, min, max, flags, func);
|
||||
}
|
||||
3800
src/main.c
Normal file
3800
src/main.c
Normal file
File diff suppressed because it is too large
Load Diff
881
src/makeint.h
Normal file
881
src/makeint.h
Normal file
@@ -0,0 +1,881 @@
|
||||
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* We use <config.h> instead of "config.h" so that a compilation
|
||||
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
|
||||
(which it would do because makeint.h was found in $srcdir). */
|
||||
#include <config.h>
|
||||
#undef HAVE_CONFIG_H
|
||||
#define HAVE_CONFIG_H 1
|
||||
|
||||
/* Specify we want GNU source code. This must be defined before any
|
||||
system headers are included. */
|
||||
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
/* AIX requires this to be the first thing in the file. */
|
||||
#if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# if !defined(__GNUC__) && !defined(WINDOWS32)
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some versions of GCC (e.g., 10.x) set the warn_unused_result attribute on
|
||||
__builtin_alloca. This causes alloca(0) to fail and is not easily worked
|
||||
around so avoid it via the preprocessor.
|
||||
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98055 */
|
||||
|
||||
#if defined (__has_builtin)
|
||||
# if __has_builtin (__builtin_alloca)
|
||||
# define free_alloca()
|
||||
# else
|
||||
# define free_alloca() alloca (0)
|
||||
# endif
|
||||
#else
|
||||
# define free_alloca() alloca (0)
|
||||
#endif
|
||||
|
||||
/* Disable assert() unless we're a maintainer.
|
||||
Some asserts are compute-intensive. */
|
||||
#ifndef MAKE_MAINTAINER_MODE
|
||||
# define NDEBUG 1
|
||||
#endif
|
||||
|
||||
/* Include the externally-visible content.
|
||||
Be sure to use the local one, and not one installed on the system.
|
||||
Define GMK_BUILDING_MAKE for proper selection of dllexport/dllimport
|
||||
declarations for MS-Windows. */
|
||||
#ifdef WINDOWS32
|
||||
# define GMK_BUILDING_MAKE
|
||||
#endif
|
||||
#include "gnumake.h"
|
||||
|
||||
#ifdef CRAY
|
||||
/* This must happen before #include <signal.h> so
|
||||
that the declaration therein is changed. */
|
||||
# define signal bsdsignal
|
||||
#endif
|
||||
|
||||
/* If we're compiling for the dmalloc debugger, turn off string inlining. */
|
||||
#if defined(HAVE_DMALLOC_H) && defined(__GNUC__)
|
||||
# define __NO_STRING_INLINES
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
/* SCO 3.2 "devsys 4.2" has a prototype for 'ftime' in <time.h> that bombs
|
||||
unless <sys/timeb.h> has been included first. */
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef __VMS
|
||||
/* In strict ANSI mode, VMS compilers should not be defining the
|
||||
VMS macro. Define it here instead of a bulk edit for the correct code.
|
||||
*/
|
||||
# ifndef VMS
|
||||
# define VMS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
/* Ultrix's unistd.h always defines _POSIX_VERSION, but you only get
|
||||
POSIX.1 behavior with 'cc -YPOSIX', which predefines POSIX itself! */
|
||||
# if defined (_POSIX_VERSION) && !defined (ultrix) && !defined (VMS)
|
||||
# define POSIX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some systems define _POSIX_VERSION but are not really POSIX.1. */
|
||||
#if (defined (butterfly) || (defined (__mips) && defined (_SYSTYPE_SVR3)) || (defined (sequent) && defined (i386)))
|
||||
# undef POSIX
|
||||
#endif
|
||||
|
||||
#if !defined (POSIX) && defined (_AIX) && defined (_POSIX_SOURCE)
|
||||
# define POSIX 1
|
||||
#endif
|
||||
|
||||
#ifndef sigmask
|
||||
# define sigmask(sig) (1 << ((sig) - 1))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SA_RESTART
|
||||
# define SA_RESTART 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VFORK_H
|
||||
# include <vfork.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# ifdef MAXPATHLEN
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# else
|
||||
/* Some systems (HURD) have fully dynamic pathnames with no maximum.
|
||||
Ideally we'd support this but it will take some work. */
|
||||
# define PATH_MAX 4096
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PATH_MAX
|
||||
# define GET_PATH_MAX PATH_MAX
|
||||
# define PATH_VAR(var) char var[PATH_MAX+1]
|
||||
#else
|
||||
# define NEED_GET_PATH_MAX 1
|
||||
# define GET_PATH_MAX (get_path_max ())
|
||||
# define PATH_VAR(var) char *var = alloca (GET_PATH_MAX+1)
|
||||
unsigned int get_path_max (void);
|
||||
#endif
|
||||
|
||||
#ifndef CHAR_BIT
|
||||
# define CHAR_BIT 8
|
||||
#endif
|
||||
|
||||
#ifndef USHRT_MAX
|
||||
# define USHRT_MAX 65535
|
||||
#endif
|
||||
|
||||
/* Nonzero if the integer type T is signed.
|
||||
Use <= to avoid GCC warnings about always-false expressions. */
|
||||
#define INTEGER_TYPE_SIGNED(t) ((t) -1 <= 0)
|
||||
|
||||
/* The minimum and maximum values for the integer type T.
|
||||
Use ~ (t) 0, not -1, for portability to 1's complement hosts. */
|
||||
#define INTEGER_TYPE_MINIMUM(t) \
|
||||
(! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
|
||||
#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
|
||||
|
||||
#ifndef CHAR_MAX
|
||||
# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
|
||||
#endif
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# ifdef S_ISREG
|
||||
# undef S_ISREG
|
||||
# endif
|
||||
# ifdef S_ISDIR
|
||||
# undef S_ISDIR
|
||||
# endif
|
||||
#endif /* STAT_MACROS_BROKEN. */
|
||||
|
||||
#ifndef S_ISREG
|
||||
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
#ifndef S_ISDIR
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# include <fcntl.h>
|
||||
# include <types.h>
|
||||
# include <unixlib.h>
|
||||
# include <unixio.h>
|
||||
# include <perror.h>
|
||||
/* Needed to use alloca on VMS. */
|
||||
# include <builtins.h>
|
||||
|
||||
extern int vms_use_mcr_command;
|
||||
extern int vms_always_use_cmd_file;
|
||||
extern int vms_gnv_shell;
|
||||
extern int vms_comma_separator;
|
||||
extern int vms_legacy_behavior;
|
||||
extern int vms_unix_simulation;
|
||||
#endif
|
||||
|
||||
#if !defined(__attribute__) && (__GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
|
||||
/* Don't use __attribute__ if it's not supported. */
|
||||
# define ATTRIBUTE(x)
|
||||
#else
|
||||
# define ATTRIBUTE(x) __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
|
||||
|
||||
#define UNUSED ATTRIBUTE ((unused))
|
||||
#define NORETURN ATTRIBUTE ((noreturn))
|
||||
|
||||
#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# define ANSI_STRING 1
|
||||
#else /* No standard headers. */
|
||||
# ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
# define ANSI_STRING 1
|
||||
# else
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# else
|
||||
void *malloc (int);
|
||||
void *realloc (void *, int);
|
||||
void free (void *);
|
||||
|
||||
void abort (void) NORETURN;
|
||||
void exit (int) NORETURN;
|
||||
# endif /* HAVE_STDLIB_H. */
|
||||
|
||||
#endif /* Standard headers. */
|
||||
|
||||
/* These should be in stdlib.h. Make sure we have them. */
|
||||
#ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
#ifndef ANSI_STRING
|
||||
|
||||
/* SCO Xenix has a buggy macro definition in <string.h>. */
|
||||
#undef strerror
|
||||
#if !defined(__DECC)
|
||||
char *strerror (int errnum);
|
||||
#endif
|
||||
|
||||
#endif /* !ANSI_STRING. */
|
||||
#undef ANSI_STRING
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
# define MK_PRI64_PREFIX "I64"
|
||||
#else
|
||||
# define MK_PRI64_PREFIX "ll"
|
||||
#endif
|
||||
#ifndef PRIdMAX
|
||||
# define PRIdMAX MK_PRI64_PREFIX "d"
|
||||
#endif
|
||||
#ifndef PRIuMAX
|
||||
# define PRIuMAX MK_PRI64_PREFIX "u"
|
||||
#endif
|
||||
#ifndef SCNdMAX
|
||||
# define SCNdMAX PRIdMAX
|
||||
#endif
|
||||
#define FILE_TIMESTAMP uintmax_t
|
||||
|
||||
#if !defined(HAVE_STRSIGNAL)
|
||||
char *strsignal (int signum);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UMASK)
|
||||
typedef int mode_t;
|
||||
extern mode_t umask (mode_t);
|
||||
#endif
|
||||
|
||||
/* ISDIGIT offers the following features:
|
||||
- Its arg may be any int or unsigned int; it need not be an unsigned char.
|
||||
- It's guaranteed to evaluate its argument exactly once.
|
||||
NOTE! Make relies on this behavior, don't change it!
|
||||
- It's typically faster.
|
||||
POSIX 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
|
||||
only '0' through '9' are digits. Prefer ISDIGIT to isdigit() unless
|
||||
it's important to use the locale's definition of 'digit' even when the
|
||||
host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
|
||||
|
||||
/* Test if two strings are equal. Is this worthwhile? Should be profiled. */
|
||||
#define streq(a, b) \
|
||||
((a) == (b) || \
|
||||
(*(a) == *(b) && (*(a) == '\0' || !strcmp ((a) + 1, (b) + 1))))
|
||||
|
||||
/* Test if two strings are equal, but match case-insensitively on systems
|
||||
which have case-insensitive filesystems. Should only be used for
|
||||
filenames! */
|
||||
#ifdef HAVE_CASE_INSENSITIVE_FS
|
||||
# define patheq(a, b) \
|
||||
((a) == (b) \
|
||||
|| (tolower((unsigned char)*(a)) == tolower((unsigned char)*(b)) \
|
||||
&& (*(a) == '\0' || !strcasecmp ((a) + 1, (b) + 1))))
|
||||
#else
|
||||
# define patheq(a, b) streq(a, b)
|
||||
#endif
|
||||
|
||||
#define strneq(a, b, l) (strncmp ((a), (b), (l)) == 0)
|
||||
|
||||
#if defined(ENUM_BITFIELDS) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
|
||||
# define ENUM_BITFIELD(bits) :bits
|
||||
#else
|
||||
# define ENUM_BITFIELD(bits)
|
||||
#endif
|
||||
|
||||
/* Handle gettext and locales. */
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#else
|
||||
# define setlocale(category, locale)
|
||||
#endif
|
||||
|
||||
#include <gettext.h>
|
||||
|
||||
#define _(msgid) gettext (msgid)
|
||||
#define N_(msgid) gettext_noop (msgid)
|
||||
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
|
||||
|
||||
/* This is needed for getcwd() and chdir(), on some W32 systems. */
|
||||
#if defined(HAVE_DIRECT_H)
|
||||
# include <direct.h>
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
||||
# include <fcntl.h>
|
||||
# include <malloc.h>
|
||||
# define pipe(_p) _pipe((_p), 512, O_BINARY)
|
||||
# define kill(_pid,_sig) w32_kill((_pid),(_sig))
|
||||
/* MSVC and Watcom C don't have ftruncate. */
|
||||
# if defined(_MSC_VER) || defined(__WATCOMC__)
|
||||
# define ftruncate(_fd,_len) _chsize(_fd,_len)
|
||||
# endif
|
||||
/* MinGW64 doesn't have _S_ISDIR. */
|
||||
# ifndef _S_ISDIR
|
||||
# define _S_ISDIR(m) S_ISDIR(m)
|
||||
# endif
|
||||
|
||||
void sync_Path_environment (void);
|
||||
int w32_kill (pid_t pid, int sig);
|
||||
int find_and_set_default_shell (const char *token);
|
||||
|
||||
/* indicates whether or not we have Bourne shell */
|
||||
extern int no_default_sh_exe;
|
||||
|
||||
/* is default_shell unixy? */
|
||||
extern int unixy_shell;
|
||||
|
||||
/* We don't have a preferred fixed value for LOCALEDIR. */
|
||||
# ifndef LOCALEDIR
|
||||
# define LOCALEDIR NULL
|
||||
# endif
|
||||
|
||||
/* Include only the minimal stuff from windows.h. */
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
#endif /* WINDOWS32 */
|
||||
|
||||
/* ALL_SET() evaluates the second argument twice. */
|
||||
#define ANY_SET(_v,_m) (((_v)&(_m)) != 0)
|
||||
#define NONE_SET(_v,_m) (! ANY_SET ((_v),(_m)))
|
||||
#define ALL_SET(_v,_m) (((_v)&(_m)) == (_m))
|
||||
|
||||
#define MAP_NUL 0x0001
|
||||
#define MAP_BLANK 0x0002 /* space, TAB */
|
||||
#define MAP_NEWLINE 0x0004
|
||||
#define MAP_COMMENT 0x0008
|
||||
#define MAP_SEMI 0x0010
|
||||
#define MAP_EQUALS 0x0020
|
||||
#define MAP_COLON 0x0040
|
||||
#define MAP_VARSEP 0x0080
|
||||
#define MAP_PIPE 0x0100
|
||||
#define MAP_DOT 0x0200
|
||||
#define MAP_COMMA 0x0400
|
||||
|
||||
/* These are the valid characters for a user-defined function. */
|
||||
#define MAP_USERFUNC 0x2000
|
||||
/* This means not only a '$', but skip the variable reference. */
|
||||
#define MAP_VARIABLE 0x4000
|
||||
/* The set of characters which are directory separators is OS-specific. */
|
||||
#define MAP_DIRSEP 0x8000
|
||||
|
||||
#ifdef VMS
|
||||
# define MAP_VMSCOMMA MAP_COMMA
|
||||
#else
|
||||
# define MAP_VMSCOMMA 0x0000
|
||||
#endif
|
||||
|
||||
#define MAP_SPACE (MAP_BLANK|MAP_NEWLINE)
|
||||
|
||||
/* Handle other OSs.
|
||||
To overcome an issue parsing paths in a DOS/Windows environment when
|
||||
built in a unix based environment, override the PATH_SEPARATOR_CHAR
|
||||
definition unless being built for Cygwin. */
|
||||
#if defined(HAVE_DOS_PATHS) && !defined(__CYGWIN__)
|
||||
# undef PATH_SEPARATOR_CHAR
|
||||
# define PATH_SEPARATOR_CHAR ';'
|
||||
# define MAP_PATHSEP MAP_SEMI
|
||||
#elif !defined(PATH_SEPARATOR_CHAR)
|
||||
# if defined (VMS)
|
||||
# define PATH_SEPARATOR_CHAR (vms_comma_separator ? ',' : ':')
|
||||
# define MAP_PATHSEP (vms_comma_separator ? MAP_COMMA : MAP_SEMI)
|
||||
# else
|
||||
# define PATH_SEPARATOR_CHAR ':'
|
||||
# define MAP_PATHSEP MAP_COLON
|
||||
# endif
|
||||
#elif PATH_SEPARATOR_CHAR == ':'
|
||||
# define MAP_PATHSEP MAP_COLON
|
||||
#elif PATH_SEPARATOR_CHAR == ';'
|
||||
# define MAP_PATHSEP MAP_SEMI
|
||||
#elif PATH_SEPARATOR_CHAR == ','
|
||||
# define MAP_PATHSEP MAP_COMMA
|
||||
#else
|
||||
# error "Unknown PATH_SEPARATOR_CHAR"
|
||||
#endif
|
||||
|
||||
#define STOP_SET(_v,_m) ANY_SET(stopchar_map[(unsigned char)(_v)],(_m))
|
||||
|
||||
/* True if C is a directory separator on the current system. */
|
||||
#define ISDIRSEP(c) STOP_SET((c),MAP_DIRSEP)
|
||||
/* True if C is whitespace but not newline. */
|
||||
#define ISBLANK(c) STOP_SET((c),MAP_BLANK)
|
||||
/* True if C is whitespace including newlines. */
|
||||
#define ISSPACE(c) STOP_SET((c),MAP_SPACE)
|
||||
/* True if C is nul or whitespace (including newline). */
|
||||
#define END_OF_TOKEN(c) STOP_SET((c),MAP_SPACE|MAP_NUL)
|
||||
/* Move S past all whitespace (including newlines). */
|
||||
#define NEXT_TOKEN(s) while (ISSPACE (*(s))) ++(s)
|
||||
|
||||
/* We can't run setrlimit when using posix_spawn. */
|
||||
#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) && !defined(USE_POSIX_SPAWN)
|
||||
# define SET_STACK_SIZE
|
||||
#endif
|
||||
#ifdef SET_STACK_SIZE
|
||||
# include <sys/resource.h>
|
||||
extern struct rlimit stack_limit;
|
||||
#endif
|
||||
|
||||
#include <glob.h>
|
||||
|
||||
#define NILF ((floc *)0)
|
||||
|
||||
/* Number of characters in a string constant. Does NOT include the \0 byte. */
|
||||
#define CSTRLEN(_s) (sizeof (_s)-1)
|
||||
|
||||
/* Only usable when NOT calling a macro: only use it for local functions. */
|
||||
#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
|
||||
|
||||
/* The number of bytes needed to represent the largest signed and unsigned
|
||||
integers as a string.
|
||||
Does NOT include space for \0 so be sure to add it if needed.
|
||||
Math suggested by Edward Welbourne <edward.welbourne@qt.io> */
|
||||
#define INTSTR_LENGTH (53 * sizeof(uintmax_t) / 22 + 3)
|
||||
|
||||
#define DEFAULT_TTYNAME "true"
|
||||
#ifdef HAVE_TTYNAME
|
||||
# define TTYNAME(_f) ttyname (_f)
|
||||
#else
|
||||
# define TTYNAME(_f) DEFAULT_TTYNAME
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# define DEFAULT_TMPDIR "/sys$scratch/"
|
||||
#elif defined(P_tmpdir)
|
||||
# define DEFAULT_TMPDIR P_tmpdir
|
||||
#else
|
||||
# define DEFAULT_TMPDIR "/tmp"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
struct file;
|
||||
|
||||
/* Specify the location of elements read from makefiles. */
|
||||
typedef struct
|
||||
{
|
||||
const char *filenm;
|
||||
unsigned long lineno;
|
||||
unsigned long offset;
|
||||
} floc;
|
||||
|
||||
const char *concat (unsigned int, ...);
|
||||
void message (int prefix, size_t length, const char *fmt, ...)
|
||||
ATTRIBUTE ((__format__ (__printf__, 3, 4)));
|
||||
void error (const floc *flocp, size_t length, const char *fmt, ...)
|
||||
ATTRIBUTE ((__format__ (__printf__, 3, 4)));
|
||||
void fatal (const floc *flocp, size_t length, const char *fmt, ...)
|
||||
ATTRIBUTE ((noreturn, __format__ (__printf__, 3, 4)));
|
||||
void out_of_memory (void) NORETURN;
|
||||
|
||||
/* When adding macros to this list be sure to update the value of
|
||||
XGETTEXT_OPTIONS in the po/Makevars file. */
|
||||
#define O(_t,_a,_f) _t((_a), 0, (_f))
|
||||
#define OS(_t,_a,_f,_s) _t((_a), strlen (_s), (_f), (_s))
|
||||
#define OSS(_t,_a,_f,_s1,_s2) _t((_a), strlen (_s1) + strlen (_s2), \
|
||||
(_f), (_s1), (_s2))
|
||||
#define OSSS(_t,_a,_f,_s1,_s2,_s3) _t((_a), strlen (_s1) + strlen (_s2) + strlen (_s3), \
|
||||
(_f), (_s1), (_s2), (_s3))
|
||||
#define ON(_t,_a,_f,_n) _t((_a), INTSTR_LENGTH, (_f), (_n))
|
||||
#define ONN(_t,_a,_f,_n1,_n2) _t((_a), INTSTR_LENGTH*2, (_f), (_n1), (_n2))
|
||||
|
||||
#define OSN(_t,_a,_f,_s,_n) _t((_a), strlen (_s) + INTSTR_LENGTH, \
|
||||
(_f), (_s), (_n))
|
||||
#define ONS(_t,_a,_f,_n,_s) _t((_a), INTSTR_LENGTH + strlen (_s), \
|
||||
(_f), (_n), (_s))
|
||||
|
||||
void decode_env_switches (const char*, size_t line);
|
||||
void temp_stdin_unlink (void);
|
||||
void die (int) NORETURN;
|
||||
void pfatal_with_name (const char *) NORETURN;
|
||||
void perror_with_name (const char *, const char *);
|
||||
#define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s))
|
||||
unsigned int make_toui (const char*, const char**);
|
||||
char *make_lltoa (long long, char *);
|
||||
char *make_ulltoa (unsigned long long, char *);
|
||||
void make_seed (unsigned int);
|
||||
unsigned int make_rand (void);
|
||||
pid_t make_pid (void);
|
||||
void *xmalloc (size_t);
|
||||
void *xcalloc (size_t);
|
||||
void *xrealloc (void *, size_t);
|
||||
char *xstrdup (const char *);
|
||||
char *xstrndup (const char *, size_t);
|
||||
char *find_next_token (const char **, size_t *);
|
||||
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 **);
|
||||
const char *get_tmpdir (void);
|
||||
int get_tmpfd (char **);
|
||||
FILE *get_tmpfile (char **);
|
||||
ssize_t writebuf (int, const void *, size_t);
|
||||
ssize_t readbuf (int, void *, size_t);
|
||||
|
||||
#ifndef HAVE_MEMRCHR
|
||||
void *memrchr(const void *, int, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
int ar_name (const char *);
|
||||
void ar_parse_name (const char *, char **, char **);
|
||||
int ar_touch (const char *);
|
||||
time_t ar_member_date (const char *);
|
||||
|
||||
typedef intmax_t (*ar_member_func_t) (int desc, const char *mem, int truncated,
|
||||
long int hdrpos, long int datapos,
|
||||
long int size, intmax_t date, int uid,
|
||||
int gid, unsigned int mode,
|
||||
const void *arg);
|
||||
|
||||
intmax_t ar_scan (const char *archive, ar_member_func_t function,
|
||||
const void *arg);
|
||||
int ar_name_equal (const char *name, const char *mem, int truncated);
|
||||
#ifndef VMS
|
||||
int ar_member_touch (const char *arname, const char *memname);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int dir_file_exists_p (const char *, const char *);
|
||||
int file_exists_p (const char *);
|
||||
int file_impossible_p (const char *);
|
||||
void file_impossible (const char *);
|
||||
const char *dir_name (const char *);
|
||||
void print_dir_data_base (void);
|
||||
void dir_setup_glob (glob_t *);
|
||||
void hash_init_directories (void);
|
||||
|
||||
void define_default_variables (void);
|
||||
void undefine_default_variables (void);
|
||||
void set_default_suffixes (void);
|
||||
void install_default_suffix_rules (void);
|
||||
void install_default_implicit_rules (void);
|
||||
|
||||
void build_vpath_lists (void);
|
||||
void construct_vpath_list (char *pattern, char *dirpath);
|
||||
const char *vpath_search (const char *file, FILE_TIMESTAMP *mtime_ptr,
|
||||
unsigned int* vpath_index, unsigned int* path_index);
|
||||
int gpath_search (const char *file, size_t len);
|
||||
|
||||
void construct_include_path (const char **arg_dirs);
|
||||
|
||||
char *strip_whitespace (const char **begpp, const char **endpp);
|
||||
|
||||
void show_goal_error (void);
|
||||
|
||||
/* 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, size_t len);
|
||||
|
||||
/* Guile support */
|
||||
int guile_gmake_setup (const floc *flocp);
|
||||
|
||||
/* Loadable object support. Sets to the strcached name of the loaded file. */
|
||||
typedef int (*load_func_t)(const floc *flocp);
|
||||
int load_file (const floc *flocp, struct file *file, int noerror);
|
||||
int unload_file (const char *name);
|
||||
|
||||
/* Maintainer mode support */
|
||||
#ifdef MAKE_MAINTAINER_MODE
|
||||
# define SPIN(_s) spin (_s)
|
||||
void spin (const char* suffix);
|
||||
# define DBG(_f) dbg _f
|
||||
void dbg (const char *fmt, ...);
|
||||
#else
|
||||
# define SPIN(_s)
|
||||
/* Never put this code into Git or a release. */
|
||||
# define DBG(_f) compile-error
|
||||
#endif
|
||||
|
||||
/* We omit these declarations on non-POSIX systems which define _POSIX_VERSION,
|
||||
because such systems often declare them in header files anyway. */
|
||||
|
||||
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
|
||||
|
||||
# ifndef VMS
|
||||
long int lseek ();
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_GETCWD
|
||||
# if !defined(VMS) && !defined(__DECC)
|
||||
char *getcwd (void);
|
||||
# endif
|
||||
# else
|
||||
char *getwd (void);
|
||||
# define getcwd(buf, len) getwd (buf)
|
||||
# endif
|
||||
|
||||
#endif /* Not GNU C library or POSIX. */
|
||||
|
||||
#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, size_t n);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_MEMPCPY
|
||||
/* Create our own, in misc.c */
|
||||
void *mempcpy (void *dest, const void *src, size_t n);
|
||||
#endif
|
||||
|
||||
#if !HAVE_STPCPY
|
||||
/* Create our own, in misc.c */
|
||||
char *stpcpy (char *dest, const char *src);
|
||||
#endif
|
||||
|
||||
#define OUTPUT_SYNC_NONE 0
|
||||
#define OUTPUT_SYNC_LINE 1
|
||||
#define OUTPUT_SYNC_TARGET 2
|
||||
#define OUTPUT_SYNC_RECURSE 3
|
||||
|
||||
/* Non-GNU systems may not declare this in unistd.h. */
|
||||
extern char **environ;
|
||||
|
||||
extern const floc *reading_file;
|
||||
extern const floc **expanding_var;
|
||||
|
||||
extern unsigned short stopchar_map[];
|
||||
|
||||
extern int just_print_flag, run_silent, ignore_errors_flag, keep_going_flag;
|
||||
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
||||
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||
extern int print_version_flag, print_directory, check_symlink_flag;
|
||||
extern int warn_undefined_variables_flag, posix_pedantic;
|
||||
extern int not_parallel, second_expansion, clock_skew_detected;
|
||||
extern int rebuilding_makefiles, one_shell, output_sync, verify_flag;
|
||||
extern unsigned long command_count;
|
||||
|
||||
extern const char *default_shell;
|
||||
|
||||
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
||||
extern int batch_mode_shell;
|
||||
|
||||
#define GNUMAKEFLAGS_NAME "GNUMAKEFLAGS"
|
||||
#define MAKEFLAGS_NAME "MAKEFLAGS"
|
||||
|
||||
/* Resetting the command script introduction prefix character. */
|
||||
#define RECIPEPREFIX_NAME ".RECIPEPREFIX"
|
||||
#define RECIPEPREFIX_DEFAULT '\t'
|
||||
extern char cmd_prefix;
|
||||
|
||||
#define JOBSERVER_AUTH_OPT "jobserver-auth"
|
||||
|
||||
extern char *jobserver_auth;
|
||||
extern unsigned int job_slots;
|
||||
extern double max_load_average;
|
||||
|
||||
extern const char *program;
|
||||
|
||||
#ifdef VMS
|
||||
const char *vms_command (const char *argv0);
|
||||
const char *vms_progname (const char *argv0);
|
||||
|
||||
void vms_exit (int);
|
||||
# define _exit(foo) vms_exit(foo)
|
||||
# define exit(foo) vms_exit(foo)
|
||||
|
||||
extern char *program_name;
|
||||
|
||||
void
|
||||
set_program_name (const char *arv0);
|
||||
|
||||
int
|
||||
need_vms_symbol (void);
|
||||
|
||||
int
|
||||
create_foreign_command (const char *command, const char *image);
|
||||
|
||||
int
|
||||
vms_export_dcl_symbol (const char *name, const char *value);
|
||||
|
||||
int
|
||||
vms_putenv_symbol (const char *string);
|
||||
|
||||
void
|
||||
vms_restore_symbol (const char *string);
|
||||
|
||||
#endif
|
||||
|
||||
void remote_setup (void);
|
||||
void remote_cleanup (void);
|
||||
int start_remote_job_p (int);
|
||||
int start_remote_job (char **, char **, int, int *, pid_t *, int *);
|
||||
int remote_status (int *, int *, int *, int);
|
||||
void block_remote_children (void);
|
||||
void unblock_remote_children (void);
|
||||
int remote_kill (pid_t id, int sig);
|
||||
void print_variable_data_base (void);
|
||||
void print_vpath_data_base (void);
|
||||
|
||||
extern char *starting_directory;
|
||||
extern unsigned int makelevel;
|
||||
extern char *version_string, *remote_description, *make_host;
|
||||
|
||||
extern unsigned int commands_started;
|
||||
|
||||
extern volatile sig_atomic_t handling_fatal_signal;
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
|
||||
#endif
|
||||
#ifndef MAX
|
||||
#define MAX(_a,_b) ((_a)>(_b)?(_a):(_b))
|
||||
#endif
|
||||
|
||||
#define MAKE_SUCCESS 0
|
||||
#define MAKE_TROUBLE 1
|
||||
#define MAKE_FAILURE 2
|
||||
|
||||
/* Set up heap debugging library dmalloc. */
|
||||
|
||||
#ifdef HAVE_DMALLOC_H
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
#ifndef initialize_main
|
||||
# ifdef __EMX__
|
||||
# define initialize_main(pargc, pargv) \
|
||||
{ _wildcard(pargc, pargv); _response(pargc, pargv); }
|
||||
# else
|
||||
# define initialize_main(pargc, pargv)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __EMX__
|
||||
# if !defined chdir
|
||||
# define chdir _chdir2
|
||||
# endif
|
||||
# if !defined getcwd
|
||||
# define getcwd _getcwd2
|
||||
# endif
|
||||
|
||||
/* NO_CHDIR2 causes make not to use _chdir2() and _getcwd2() instead of
|
||||
chdir() and getcwd(). This avoids some error messages for the
|
||||
make testsuite but restricts the drive letter support. */
|
||||
# ifdef NO_CHDIR2
|
||||
# warning NO_CHDIR2: usage of drive letters restricted
|
||||
# undef chdir
|
||||
# undef getcwd
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef initialize_main
|
||||
# define initialize_main(pargc, pargv)
|
||||
#endif
|
||||
|
||||
|
||||
/* Some systems (like Solaris, PTX, etc.) do not support the SA_RESTART flag
|
||||
properly according to POSIX. So, we try to wrap common system calls with
|
||||
checks for EINTR. Note that there are still plenty of system calls that
|
||||
can fail with EINTR but this, reportedly, gets the vast majority of
|
||||
failure cases. If you still experience failures you'll need to either get
|
||||
a system where SA_RESTART works, or you need to avoid -j. */
|
||||
|
||||
#define EINTRLOOP(_v,_c) while (((_v)=_c)==-1 && errno==EINTR)
|
||||
|
||||
/* While system calls that return integers are pretty consistent about
|
||||
returning -1 on failure and setting errno in that case, functions that
|
||||
return pointers are not always so well behaved. Sometimes they return
|
||||
NULL for expected behavior: one good example is readdir() which returns
|
||||
NULL at the end of the directory--and _doesn't_ reset errno. So, we have
|
||||
to do it ourselves here. */
|
||||
|
||||
#define ENULLLOOP(_v,_c) do { errno = 0; (_v) = _c; } \
|
||||
while((_v)==0 && errno==EINTR)
|
||||
969
src/misc.c
Normal file
969
src/misc.c
Normal file
@@ -0,0 +1,969 @@
|
||||
/* Miscellaneous generic support functions for GNU Make.
|
||||
Copyright (C) 1988-2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "makeint.h"
|
||||
#include "filedef.h"
|
||||
#include "dep.h"
|
||||
#include "os.h"
|
||||
#include "debug.h"
|
||||
|
||||
/* GNU make no longer supports pre-ANSI89 environments. */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef WINDOWS32
|
||||
# include <windows.h>
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#else
|
||||
# include <sys/file.h>
|
||||
#endif
|
||||
|
||||
unsigned int
|
||||
make_toui (const char *str, const char **error)
|
||||
{
|
||||
char *end;
|
||||
unsigned long val = strtoul (str, &end, 10);
|
||||
|
||||
if (error)
|
||||
{
|
||||
if (str[0] == '\0')
|
||||
*error = "Missing value";
|
||||
else if (*end != '\0')
|
||||
*error = "Invalid value";
|
||||
else
|
||||
*error = NULL;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
/* Convert val into a string, written to buf. buf must be large enough
|
||||
to hold the largest possible value, plus a nul byte. Returns buf.
|
||||
We can't use standard PRI* here: those are based on intNN_t types. */
|
||||
|
||||
char *
|
||||
make_lltoa (long long val, char *buf)
|
||||
{
|
||||
sprintf (buf, "%" MK_PRI64_PREFIX "d", val);
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *
|
||||
make_ulltoa (unsigned long long val, char *buf)
|
||||
{
|
||||
sprintf (buf, "%" MK_PRI64_PREFIX "u", val);
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* Simple random number generator, for use with shuffle.
|
||||
This doesn't need to be truly random, just pretty random. Use our own
|
||||
implementation rather than relying on the C runtime's rand() so we always
|
||||
get the same results for a given seed, regardless of C runtime. */
|
||||
|
||||
static unsigned int mk_state = 0;
|
||||
|
||||
void
|
||||
make_seed (unsigned int seed)
|
||||
{
|
||||
mk_state = seed;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
make_rand ()
|
||||
{
|
||||
/* mk_state must never be 0. */
|
||||
if (mk_state == 0)
|
||||
mk_state = (unsigned int)(time (NULL) ^ make_pid ()) + 1;
|
||||
|
||||
/* A simple xorshift RNG. */
|
||||
mk_state ^= mk_state << 13;
|
||||
mk_state ^= mk_state >> 17;
|
||||
mk_state ^= mk_state << 5;
|
||||
|
||||
return mk_state;
|
||||
}
|
||||
|
||||
/* Compare strings *S1 and *S2.
|
||||
Return negative if the first is less, positive if it is greater,
|
||||
zero if they are equal. */
|
||||
|
||||
int
|
||||
alpha_compare (const void *v1, const void *v2)
|
||||
{
|
||||
const char *s1 = *((char **)v1);
|
||||
const char *s2 = *((char **)v2);
|
||||
|
||||
if (*s1 != *s2)
|
||||
return *s1 - *s2;
|
||||
return strcmp (s1, s2);
|
||||
}
|
||||
|
||||
/* Discard each backslash-newline combination from LINE.
|
||||
Backslash-backslash-newline combinations become backslash-newlines.
|
||||
This is done by copying the text at LINE into itself. */
|
||||
|
||||
void
|
||||
collapse_continuations (char *line)
|
||||
{
|
||||
char *out = line;
|
||||
char *in = line;
|
||||
char *q;
|
||||
|
||||
q = strchr(in, '\n');
|
||||
if (q == 0)
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
char *p = q;
|
||||
int i;
|
||||
size_t out_line_length;
|
||||
|
||||
if (q > line && q[-1] == '\\')
|
||||
{
|
||||
/* Search for more backslashes. */
|
||||
i = -2;
|
||||
while (&p[i] >= line && p[i] == '\\')
|
||||
--i;
|
||||
++i;
|
||||
}
|
||||
else
|
||||
i = 0;
|
||||
|
||||
/* The number of backslashes is now -I, keep half of them. */
|
||||
out_line_length = (p - in) + i - i/2;
|
||||
if (out != in)
|
||||
memmove (out, in, out_line_length);
|
||||
out += out_line_length;
|
||||
|
||||
/* When advancing IN, skip the newline too. */
|
||||
in = q + 1;
|
||||
|
||||
if (i & 1)
|
||||
{
|
||||
/* Backslash/newline handling:
|
||||
In traditional GNU make all trailing whitespace, consecutive
|
||||
backslash/newlines, and any leading non-newline whitespace on the
|
||||
next line is reduced to a single space.
|
||||
In POSIX, each backslash/newline and is replaced by a space. */
|
||||
while (ISBLANK (*in))
|
||||
++in;
|
||||
if (! posix_pedantic)
|
||||
while (out > line && ISBLANK (out[-1]))
|
||||
--out;
|
||||
*out++ = ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If the newline isn't quoted, put it in the output. */
|
||||
*out++ = '\n';
|
||||
}
|
||||
|
||||
q = strchr(in, '\n');
|
||||
}
|
||||
while (q);
|
||||
|
||||
memmove(out, in, strlen(in) + 1);
|
||||
}
|
||||
|
||||
/* Print N spaces (used in debug for target-depth). */
|
||||
|
||||
void
|
||||
print_spaces (unsigned int n)
|
||||
{
|
||||
while (n-- > 0)
|
||||
putchar (' ');
|
||||
}
|
||||
|
||||
|
||||
/* Return a string whose contents concatenate the NUM strings provided
|
||||
This string lives in static, re-used memory. */
|
||||
|
||||
const char *
|
||||
concat (unsigned int num, ...)
|
||||
{
|
||||
static size_t rlen = 0;
|
||||
static char *result = NULL;
|
||||
size_t ri = 0;
|
||||
va_list args;
|
||||
|
||||
va_start (args, num);
|
||||
|
||||
while (num-- > 0)
|
||||
{
|
||||
const char *s = va_arg (args, const char *);
|
||||
size_t l = xstrlen (s);
|
||||
|
||||
if (l == 0)
|
||||
continue;
|
||||
|
||||
if (ri + l > rlen)
|
||||
{
|
||||
rlen = ((rlen ? rlen : 60) + l) * 2;
|
||||
result = xrealloc (result, rlen);
|
||||
}
|
||||
|
||||
memcpy (result + ri, s, l);
|
||||
ri += l;
|
||||
}
|
||||
|
||||
va_end (args);
|
||||
|
||||
/* Get some more memory if we don't have enough space for the
|
||||
terminating '\0'. */
|
||||
if (ri == rlen)
|
||||
{
|
||||
rlen = (rlen ? rlen : 60) * 2;
|
||||
result = xrealloc (result, rlen);
|
||||
}
|
||||
|
||||
result[ri] = '\0';
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_UNISTD_H
|
||||
pid_t getpid ();
|
||||
#endif
|
||||
|
||||
pid_t make_pid ()
|
||||
{
|
||||
return getpid ();
|
||||
}
|
||||
|
||||
/* Like malloc but get fatal error if memory is exhausted. */
|
||||
/* Don't bother if we're using dmalloc; it provides these for us. */
|
||||
|
||||
#ifndef HAVE_DMALLOC_H
|
||||
|
||||
#undef xmalloc
|
||||
#undef xcalloc
|
||||
#undef xrealloc
|
||||
#undef xstrdup
|
||||
|
||||
void *
|
||||
xmalloc (size_t size)
|
||||
{
|
||||
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
||||
void *result = malloc (size ? size : 1);
|
||||
if (result == 0)
|
||||
out_of_memory ();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
xcalloc (size_t size)
|
||||
{
|
||||
/* Make sure we don't allocate 0, for pre-ISO implementations. */
|
||||
void *result = calloc (size ? size : 1, 1);
|
||||
if (result == 0)
|
||||
out_of_memory ();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
xrealloc (void *ptr, size_t size)
|
||||
{
|
||||
void *result;
|
||||
|
||||
/* Some older implementations of realloc() don't conform to ISO. */
|
||||
if (! size)
|
||||
size = 1;
|
||||
result = ptr ? realloc (ptr, size) : malloc (size);
|
||||
if (result == 0)
|
||||
out_of_memory ();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
xstrdup (const char *ptr)
|
||||
{
|
||||
char *result;
|
||||
|
||||
#ifdef HAVE_STRDUP
|
||||
result = strdup (ptr);
|
||||
#else
|
||||
result = malloc (strlen (ptr) + 1);
|
||||
#endif
|
||||
|
||||
if (result == 0)
|
||||
out_of_memory ();
|
||||
|
||||
#ifdef HAVE_STRDUP
|
||||
return result;
|
||||
#else
|
||||
return strcpy (result, ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* HAVE_DMALLOC_H */
|
||||
|
||||
char *
|
||||
xstrndup (const char *str, size_t length)
|
||||
{
|
||||
char *result;
|
||||
|
||||
#ifdef HAVE_STRNDUP
|
||||
result = strndup (str, length);
|
||||
if (result == 0)
|
||||
out_of_memory ();
|
||||
#else
|
||||
result = xmalloc (length + 1);
|
||||
if (length > 0)
|
||||
strncpy (result, str, length);
|
||||
result[length] = '\0';
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef HAVE_MEMRCHR
|
||||
void *
|
||||
memrchr(const void* str, int ch, size_t len)
|
||||
{
|
||||
const char* sp = str;
|
||||
const char* cp = sp;
|
||||
|
||||
if (len == 0)
|
||||
return NULL;
|
||||
|
||||
cp += len - 1;
|
||||
|
||||
while (cp[0] != ch)
|
||||
{
|
||||
if (cp == sp)
|
||||
return NULL;
|
||||
--cp;
|
||||
}
|
||||
|
||||
return (void*)cp;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Limited INDEX:
|
||||
Search through the string STRING, which ends at LIMIT, for the character C.
|
||||
Returns a pointer to the first occurrence, or nil if none is found.
|
||||
Like INDEX except that the string searched ends where specified
|
||||
instead of at the first null. */
|
||||
|
||||
char *
|
||||
lindex (const char *s, const char *limit, int c)
|
||||
{
|
||||
while (s < limit)
|
||||
if (*s++ == c)
|
||||
return (char *)(s - 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return the address of the first whitespace or null in the string S. */
|
||||
|
||||
char *
|
||||
end_of_token (const char *s)
|
||||
{
|
||||
while (! END_OF_TOKEN (*s))
|
||||
++s;
|
||||
return (char *)s;
|
||||
}
|
||||
|
||||
/* Return the address of the first nonwhitespace or null in the string S. */
|
||||
|
||||
char *
|
||||
next_token (const char *s)
|
||||
{
|
||||
NEXT_TOKEN (s);
|
||||
return (char *)s;
|
||||
}
|
||||
|
||||
/* Find the next token in PTR; return the address of it, and store the length
|
||||
of the token into *LENGTHPTR if LENGTHPTR is not nil. Set *PTR to the end
|
||||
of the token, so this function can be called repeatedly in a loop. */
|
||||
|
||||
char *
|
||||
find_next_token (const char **ptr, size_t *lengthptr)
|
||||
{
|
||||
const char *p = next_token (*ptr);
|
||||
|
||||
if (*p == '\0')
|
||||
return 0;
|
||||
|
||||
*ptr = end_of_token (p);
|
||||
if (lengthptr != 0)
|
||||
*lengthptr = *ptr - p;
|
||||
|
||||
return (char *)p;
|
||||
}
|
||||
|
||||
/* Write a BUFFER of size LEN to file descriptor FD.
|
||||
Retry short writes from EINTR. Return LEN, or -1 on error. */
|
||||
ssize_t
|
||||
writebuf (int fd, const void *buffer, size_t len)
|
||||
{
|
||||
const char *msg = buffer;
|
||||
size_t l = len;
|
||||
while (l)
|
||||
{
|
||||
ssize_t r;
|
||||
|
||||
EINTRLOOP (r, write (fd, msg, l));
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
l -= r;
|
||||
msg += r;
|
||||
}
|
||||
|
||||
return (ssize_t)len;
|
||||
}
|
||||
|
||||
/* Read until we get LEN bytes from file descriptor FD, into BUFFER.
|
||||
Retry short reads on EINTR. If we get an error, return it.
|
||||
Return 0 at EOF. */
|
||||
ssize_t
|
||||
readbuf (int fd, void *buffer, size_t len)
|
||||
{
|
||||
char *msg = buffer;
|
||||
while (len)
|
||||
{
|
||||
ssize_t r;
|
||||
|
||||
EINTRLOOP (r, read (fd, msg, len));
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
len -= r;
|
||||
msg += r;
|
||||
}
|
||||
|
||||
return (ssize_t)(msg - (char*)buffer);
|
||||
}
|
||||
|
||||
|
||||
/* Copy a chain of 'struct dep'. For 2nd expansion deps, dup the name. */
|
||||
|
||||
struct dep *
|
||||
copy_dep_chain (const struct dep *d)
|
||||
{
|
||||
struct dep *firstnew = 0;
|
||||
struct dep *lastnew = 0;
|
||||
|
||||
while (d != 0)
|
||||
{
|
||||
struct dep *c = xmalloc (sizeof (struct dep));
|
||||
memcpy (c, d, sizeof (struct dep));
|
||||
|
||||
if (c->need_2nd_expansion)
|
||||
c->name = xstrdup (c->name);
|
||||
|
||||
c->next = 0;
|
||||
if (firstnew == 0)
|
||||
firstnew = lastnew = c;
|
||||
else
|
||||
lastnew = lastnew->next = c;
|
||||
|
||||
d = d->next;
|
||||
}
|
||||
|
||||
return firstnew;
|
||||
}
|
||||
|
||||
/* Free a chain of struct nameseq.
|
||||
For struct dep chains use free_dep_chain. */
|
||||
|
||||
void
|
||||
free_ns_chain (struct nameseq *ns)
|
||||
{
|
||||
while (ns != 0)
|
||||
{
|
||||
struct nameseq *t = ns;
|
||||
ns = ns->next;
|
||||
free_ns (t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef MAKE_MAINTAINER_MODE
|
||||
|
||||
void
|
||||
spin (const char* type)
|
||||
{
|
||||
char filenm[256];
|
||||
struct stat dummy;
|
||||
|
||||
sprintf (filenm, ".make-spin-%s", type);
|
||||
|
||||
if (stat (filenm, &dummy) == 0)
|
||||
{
|
||||
fprintf (stderr, "SPIN on %s\n", filenm);
|
||||
do
|
||||
#ifdef WINDOWS32
|
||||
Sleep (1000);
|
||||
#else
|
||||
sleep (1);
|
||||
#endif
|
||||
while (stat (filenm, &dummy) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dbg (const char *fmt, ...)
|
||||
{
|
||||
FILE *fp = fopen ("/tmp/gmkdebug.log", "a+");
|
||||
va_list args;
|
||||
char buf[4096];
|
||||
|
||||
va_start (args, fmt);
|
||||
vsprintf (buf, fmt, args);
|
||||
va_end (args);
|
||||
|
||||
fprintf(fp, "%u: %s\n", (unsigned) make_pid (), buf);
|
||||
fflush (fp);
|
||||
fclose (fp);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Provide support for temporary files. */
|
||||
|
||||
#ifndef HAVE_STDLIB_H
|
||||
# ifdef HAVE_MKSTEMP
|
||||
int mkstemp (char *template);
|
||||
# else
|
||||
char *mktemp (char *template);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UMASK
|
||||
mode_t
|
||||
umask (mode_t mask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# define DEFAULT_TMPFILE "sys$scratch:gnv$make_cmdXXXXXX.com"
|
||||
#else
|
||||
# define DEFAULT_TMPFILE "GmXXXXXX"
|
||||
#endif
|
||||
|
||||
const char *
|
||||
get_tmpdir ()
|
||||
{
|
||||
static const char *tmpdir = NULL;
|
||||
|
||||
if (!tmpdir)
|
||||
{
|
||||
#if defined (__MSDOS__) || defined (WINDOWS32) || defined (__EMX__)
|
||||
# define TMP_EXTRAS "TMP", "TEMP",
|
||||
#else
|
||||
# define TMP_EXTRAS
|
||||
#endif
|
||||
const char *tlist[] = { "MAKE_TMPDIR", "TMPDIR", TMP_EXTRAS NULL };
|
||||
const char **tp;
|
||||
unsigned int found = 0;
|
||||
|
||||
for (tp = tlist; *tp; ++tp)
|
||||
if ((tmpdir = getenv (*tp)) && *tmpdir != '\0')
|
||||
{
|
||||
struct stat st;
|
||||
int r;
|
||||
found = 1;
|
||||
EINTRLOOP(r, stat (tmpdir, &st));
|
||||
if (r < 0)
|
||||
OSSS (error, NILF,
|
||||
_("%s value %s: %s"), *tp, tmpdir, strerror (errno));
|
||||
else if (! S_ISDIR (st.st_mode))
|
||||
OSS (error, NILF,
|
||||
_("%s value %s: not a directory"), *tp, tmpdir);
|
||||
else
|
||||
return tmpdir;
|
||||
}
|
||||
|
||||
tmpdir = DEFAULT_TMPDIR;
|
||||
|
||||
if (found)
|
||||
OS (error, NILF, _("using default temporary directory '%s'"), tmpdir);
|
||||
}
|
||||
|
||||
return tmpdir;
|
||||
}
|
||||
|
||||
static char *
|
||||
get_tmptemplate ()
|
||||
{
|
||||
const char *tmpdir = get_tmpdir ();
|
||||
char *template;
|
||||
char *cp;
|
||||
|
||||
template = xmalloc (strlen (tmpdir) + CSTRLEN (DEFAULT_TMPFILE) + 2);
|
||||
cp = stpcpy (template, tmpdir);
|
||||
|
||||
#if !defined VMS
|
||||
/* It's not possible for tmpdir to be empty. */
|
||||
if (! ISDIRSEP (cp[-1]))
|
||||
*(cp++) = '/';
|
||||
#endif
|
||||
|
||||
strcpy (cp, DEFAULT_TMPFILE);
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
#if !HAVE_MKSTEMP || !HAVE_FDOPEN
|
||||
/* Generate a temporary filename. This is not safe as another program could
|
||||
snipe our filename after we've generated it: use this only on systems
|
||||
without more secure alternatives. */
|
||||
|
||||
static char *
|
||||
get_tmppath ()
|
||||
{
|
||||
char *path;
|
||||
|
||||
# ifdef HAVE_MKTEMP
|
||||
path = get_tmptemplate ();
|
||||
if (*mktemp (path) == '\0')
|
||||
pfatal_with_name ("mktemp");
|
||||
# else
|
||||
path = xmalloc (L_tmpnam + 1);
|
||||
if (tmpnam (path) == NULL)
|
||||
pfatal_with_name ("tmpnam");
|
||||
# endif
|
||||
|
||||
return path;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Generate a temporary file and return an fd for it. If name is NULL then
|
||||
the temp file is anonymous and will be deleted when the process exits. */
|
||||
int
|
||||
get_tmpfd (char **name)
|
||||
{
|
||||
int fd = -1;
|
||||
char *tmpnm;
|
||||
|
||||
/* If there's an os-specific way to get an anoymous temp file use it. */
|
||||
if (!name)
|
||||
{
|
||||
fd = os_anontmp ();
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
}
|
||||
|
||||
#if defined(HAVE_MKSTEMP)
|
||||
tmpnm = get_tmptemplate ();
|
||||
|
||||
/* It's safest to use mkstemp(), if we can. */
|
||||
EINTRLOOP (fd, mkstemp (tmpnm));
|
||||
#else
|
||||
tmpnm = get_tmppath ();
|
||||
|
||||
/* Can't use mkstemp(), but try to guard against a race condition. */
|
||||
EINTRLOOP (fd, open (tmpnm, O_CREAT|O_EXCL|O_RDWR, 0600));
|
||||
#endif
|
||||
if (fd < 0)
|
||||
OSS (fatal, NILF,
|
||||
_("create temporary file %s: %s"), tmpnm, strerror (errno));
|
||||
|
||||
if (name)
|
||||
*name = tmpnm;
|
||||
else
|
||||
{
|
||||
int r;
|
||||
EINTRLOOP (r, unlink (tmpnm));
|
||||
if (r < 0)
|
||||
OSS (fatal, NILF,
|
||||
_("unlink temporary file %s: %s"), tmpnm, strerror (errno));
|
||||
free (tmpnm);
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
/* Return a FILE* for a temporary file, opened in the safest way possible.
|
||||
Set name to point to an allocated buffer containing the name of the file.
|
||||
Note, this cannot be NULL! */
|
||||
FILE *
|
||||
get_tmpfile (char **name)
|
||||
{
|
||||
/* Be consistent with tmpfile, which opens as if by "wb+". */
|
||||
const char *tmpfile_mode = "wb+";
|
||||
FILE *file;
|
||||
|
||||
#if defined(HAVE_FDOPEN)
|
||||
int fd = get_tmpfd (name);
|
||||
|
||||
ENULLLOOP (file, fdopen (fd, tmpfile_mode));
|
||||
if (file == NULL)
|
||||
OSS (fatal, NILF,
|
||||
_("fdopen: temporary file %s: %s"), *name, strerror (errno));
|
||||
#else
|
||||
/* Preserve the current umask, and set a restrictive one for temp files. */
|
||||
mode_t mask = umask (0077);
|
||||
int err;
|
||||
|
||||
*name = get_tmppath ();
|
||||
|
||||
/* Although this fopen is insecure, it is executed only on non-fdopen
|
||||
platforms, which should be a rarity nowadays. */
|
||||
|
||||
ENULLLOOP (file, fopen (*name, tmpfile_mode));
|
||||
if (file == NULL)
|
||||
OSS (fatal, NILF,
|
||||
_("fopen: temporary file %s: %s"), *name, strerror (errno));
|
||||
|
||||
umask (mask);
|
||||
#endif
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
#if !HAVE_STRCASECMP && !HAVE_STRICMP && !HAVE_STRCMPI
|
||||
/* If we don't have strcasecmp() (from POSIX), or anything that can substitute
|
||||
for it, define our own version. */
|
||||
|
||||
int
|
||||
strcasecmp (const char *s1, const char *s2)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
int c1 = (unsigned char) *(s1++);
|
||||
int c2 = (unsigned char) *(s2++);
|
||||
|
||||
if (isalpha (c1))
|
||||
c1 = tolower (c1);
|
||||
if (isalpha (c2))
|
||||
c2 = tolower (c2);
|
||||
|
||||
if (c1 != '\0' && c1 == c2)
|
||||
continue;
|
||||
|
||||
return (c1 - c2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRNCASECMP && !HAVE_STRNICMP && !HAVE_STRNCMPI
|
||||
/* If we don't have strncasecmp() (from POSIX), or anything that can
|
||||
substitute for it, define our own version. */
|
||||
|
||||
int
|
||||
strncasecmp (const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
while (n-- > 0)
|
||||
{
|
||||
int c1 = (unsigned char) *(s1++);
|
||||
int c2 = (unsigned char) *(s2++);
|
||||
|
||||
if (isalpha (c1))
|
||||
c1 = tolower (c1);
|
||||
if (isalpha (c2))
|
||||
c2 = tolower (c2);
|
||||
|
||||
if (c1 != '\0' && c1 == c2)
|
||||
continue;
|
||||
|
||||
return (c1 - c2);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NEED_GET_PATH_MAX
|
||||
unsigned int
|
||||
get_path_max (void)
|
||||
{
|
||||
static unsigned int value;
|
||||
|
||||
if (value == 0)
|
||||
{
|
||||
long x = pathconf ("/", _PC_PATH_MAX);
|
||||
if (x > 0)
|
||||
value = (unsigned int) x;
|
||||
else
|
||||
value = PATH_MAX;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_MEMPCPY
|
||||
void *
|
||||
mempcpy (void *dest, const void *src, size_t n)
|
||||
{
|
||||
return (char *) memcpy (dest, src, n) + n;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_STPCPY
|
||||
char *
|
||||
stpcpy (char *dest, const char *src)
|
||||
{
|
||||
char *d = dest;
|
||||
const char *s = src;
|
||||
|
||||
do
|
||||
*d++ = *s;
|
||||
while (*s++ != '\0');
|
||||
|
||||
return d - 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRTOLL
|
||||
# undef UNSIGNED
|
||||
# undef USE_NUMBER_GROUPING
|
||||
# undef USE_WIDE_CHAR
|
||||
# define QUAD 1
|
||||
# include <strtol.c>
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRERROR
|
||||
char *
|
||||
strerror (int errnum)
|
||||
{
|
||||
static char msg[256];
|
||||
|
||||
#define SETMSG(_e, _m) case _e: strcpy(msg, _m); break
|
||||
|
||||
switch (errnum)
|
||||
{
|
||||
#ifdef EPERM
|
||||
SETMSG (EPERM , "Operation not permitted");
|
||||
#endif
|
||||
#ifdef ENOENT
|
||||
SETMSG (ENOENT , "No such file or directory");
|
||||
#endif
|
||||
#ifdef ESRCH
|
||||
SETMSG (ESRCH , "No such process");
|
||||
#endif
|
||||
#ifdef EINTR
|
||||
SETMSG (EINTR , "Interrupted system call");
|
||||
#endif
|
||||
#ifdef EIO
|
||||
SETMSG (EIO , "I/O error");
|
||||
#endif
|
||||
#ifdef ENXIO
|
||||
SETMSG (ENXIO , "No such device or address");
|
||||
#endif
|
||||
#ifdef E2BIG
|
||||
SETMSG (E2BIG , "Argument list too long");
|
||||
#endif
|
||||
#ifdef ENOEXEC
|
||||
SETMSG (ENOEXEC, "Exec format error");
|
||||
#endif
|
||||
#ifdef EBADF
|
||||
SETMSG (EBADF , "Bad file number");
|
||||
#endif
|
||||
#ifdef ECHILD
|
||||
SETMSG (ECHILD , "No child processes");
|
||||
#endif
|
||||
#ifdef EAGAIN
|
||||
SETMSG (EAGAIN , "Try again");
|
||||
#endif
|
||||
#ifdef ENOMEM
|
||||
SETMSG (ENOMEM , "Out of memory");
|
||||
#endif
|
||||
#ifdef EACCES
|
||||
SETMSG (EACCES , "Permission denied");
|
||||
#endif
|
||||
#ifdef EFAULT
|
||||
SETMSG (EFAULT , "Bad address");
|
||||
#endif
|
||||
#ifdef ENOTBLK
|
||||
SETMSG (ENOTBLK, "Block device required");
|
||||
#endif
|
||||
#ifdef EBUSY
|
||||
SETMSG (EBUSY , "Device or resource busy");
|
||||
#endif
|
||||
#ifdef EEXIST
|
||||
SETMSG (EEXIST , "File exists");
|
||||
#endif
|
||||
#ifdef EXDEV
|
||||
SETMSG (EXDEV , "Cross-device link");
|
||||
#endif
|
||||
#ifdef ENODEV
|
||||
SETMSG (ENODEV , "No such device");
|
||||
#endif
|
||||
#ifdef ENOTDIR
|
||||
SETMSG (ENOTDIR, "Not a directory");
|
||||
#endif
|
||||
#ifdef EISDIR
|
||||
SETMSG (EISDIR , "Is a directory");
|
||||
#endif
|
||||
#ifdef EINVAL
|
||||
SETMSG (EINVAL , "Invalid argument");
|
||||
#endif
|
||||
#ifdef ENFILE
|
||||
SETMSG (ENFILE , "File table overflow");
|
||||
#endif
|
||||
#ifdef EMFILE
|
||||
SETMSG (EMFILE , "Too many open files");
|
||||
#endif
|
||||
#ifdef ENOTTY
|
||||
SETMSG (ENOTTY , "Not a typewriter");
|
||||
#endif
|
||||
#ifdef ETXTBSY
|
||||
SETMSG (ETXTBSY, "Text file busy");
|
||||
#endif
|
||||
#ifdef EFBIG
|
||||
SETMSG (EFBIG , "File too large");
|
||||
#endif
|
||||
#ifdef ENOSPC
|
||||
SETMSG (ENOSPC , "No space left on device");
|
||||
#endif
|
||||
#ifdef ESPIPE
|
||||
SETMSG (ESPIPE , "Illegal seek");
|
||||
#endif
|
||||
#ifdef EROFS
|
||||
SETMSG (EROFS , "Read-only file system");
|
||||
#endif
|
||||
#ifdef EMLINK
|
||||
SETMSG (EMLINK , "Too many links");
|
||||
#endif
|
||||
#ifdef EPIPE
|
||||
SETMSG (EPIPE , "Broken pipe");
|
||||
#endif
|
||||
#ifdef EDOM
|
||||
SETMSG (EDOM , "Math argument out of domain of func");
|
||||
#endif
|
||||
#ifdef ERANGE
|
||||
SETMSG (ERANGE , "Math result not representable");
|
||||
#endif
|
||||
default: sprintf (msg, "Unknown error %d", errnum); break;
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
#endif
|
||||
36
src/mkconfig.h.in
Normal file
36
src/mkconfig.h.in
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Autoconf values for use on non-POSIX systems.
|
||||
Copyright (C) 2022 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "@PACKAGE@"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "@PACKAGE_NAME@"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "@PACKAGE_NAME@ @PACKAGE_VERSION@"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL "@PACKAGE_URL@"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user